Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Starflight FORTH interpreter

455 views
Skip to first unread message

migueletto

unread,
Jan 3, 2007, 3:28:39 PM1/3/07
to
Hi,

In a previous age there was a great DOS game named Starflight. Some
time ago I found that it was implemented in FORTH and x86 Assembly.

Here you can find some details of this particular FORTH implementation:

http://meusite.uai.com.br/~mmand/starflight/

Regards,
Marcio.

m-coughlin

unread,
Jan 4, 2007, 12:55:59 AM1/4/07
to
migueletto wrote:

Yes, Starflight is still regarded as a great program by
admirers of computer games. There are game programmers who want
to study its internal logic use it on modern machines.
Unfortunately having it written in Forth is a great
disadvantage. Since it was a commercial game, it was copyrighted
and probably still covered by a non-disclosure agreement from
the authors. Reverse engineering is very difficult, especially
by programmers not familiar with Forth. The code had to be
squeezed onto 360k byte floppy disks so things like the Forth
dictionary are stripped out. Some of the original authors have
written about their work and part of their Forth code is on the
web. But only a part. They offer no instruction on how to use
Forth as a great game writing language. The current copyright
owner has no interest in releasing the complete source code.

Compare that with a newer game that was not written in
Forth, like Doom. Instead of keeping the program a big secret,
the Doom engine source code has been published under the GPL.
Only the data for a particular Doom game is copyrighted and
sold. Anyone can write a game using the engine. The old code is
no longer state of the art, but it has been rewritten several
times to run under Windows, Linux, MacOSX and other platforms.
Many students have learned programming games and advanced
computer graphics from looking at the Doom code and are now
earning good livings as professionals. Its too bad that the Doom
authors did not appreciate Forth the way the Starflight authors did.

--
Michael Coughlin m-cou...@comcast.net Cambridge, MA USA

Ed Beroset

unread,
Jan 4, 2007, 6:49:39 AM1/4/07
to
m-coughlin wrote:
> migueletto wrote:
>
>
>>In a previous age there was a great DOS game named Starflight.
>>Some time ago I found that it was implemented in FORTH and x86
>>Assembly.
>>
>>Here you can find some details of this particular FORTH
>>implementation:
>>
>>http://meusite.uai.com.br/~mmand/starflight/
>
>
> Yes, Starflight is still regarded as a great program by
> admirers of computer games. There are game programmers who want
> to study its internal logic use it on modern machines.
> Unfortunately having it written in Forth is a great
> disadvantage. Since it was a commercial game, it was copyrighted
> and probably still covered by a non-disclosure agreement from
> the authors.

Actually, the source code was made available by one of the authors some
years ago: http://www.geocities.com/TimesSquare/Maze/4979/lee.html

Ed

Andreas Kochenburger

unread,
Jan 4, 2007, 8:46:14 AM1/4/07
to
On Thu, 04 Jan 2007 11:49:39 GMT, Ed Beroset <ber...@mindspring.com>

>Actually, the source code was made available by one of the authors
some
>years ago: http://www.geocities.com/TimesSquare/Maze/4979/lee.html

The link is dead


Andreas
-------
1 + 1 = 3, for large values of 1.

Coos Haak

unread,
Jan 4, 2007, 10:14:09 AM1/4/07
to
Op Thu, 04 Jan 2007 14:46:14 +0100 schreef Andreas Kochenburger:

> On Thu, 04 Jan 2007 11:49:39 GMT, Ed Beroset <ber...@mindspring.com>
>>Actually, the source code was made available by one of the authors
> some
>>years ago: http://www.geocities.com/TimesSquare/Maze/4979/lee.html
>
> The link is dead

Not when I looked just now ;-)

--
Coos

CHForth, 16 bit DOS applications
http://home.hccnet.nl/j.j.haak/forth.html

jmdra...@yahoo.com

unread,
Jan 4, 2007, 11:11:15 AM1/4/07
to

m-coughlin wrote:
> migueletto wrote:
>
> > In a previous age there was a great DOS game named Starflight.
> > Some time ago I found that it was implemented in FORTH and x86
> > Assembly.
> >
> > Here you can find some details of this particular FORTH
> > implementation:
> >
> > http://meusite.uai.com.br/~mmand/starflight/
>
> Yes, Starflight is still regarded as a great program by
> admirers of computer games. There are game programmers who want
> to study its internal logic use it on modern machines.
> Unfortunately having it written in Forth is a great
> disadvantage.

How is being written in Forth a disadvantage?

> Since it was a commercial game, it was copyrighted
> and probably still covered by a non-disclosure agreement from
> the authors.

All of the design docs and much of the source was posted to
the web years ago.

> Reverse engineering is very difficult, especially
> by programmers not familiar with Forth.

Nonsense. Reverse engineering ANY complied program
is tough. If someone disassembles highly optimized C
code they won't necessarily end up with anything that
looks like the original program. And of course Forth
is difficult for someone who doesn't know Forth. Spanish
is difficult for someone who doesn't know Spanish. So?

> The code had to be
> squeezed onto 360k byte floppy disks so things like the Forth
> dictionary are stripped out. Some of the original authors have
> written about their work and part of their Forth code is on the
> web. But only a part. They offer no instruction on how to use
> Forth as a great game writing language. The current copyright
> owner has no interest in releasing the complete source code.

Have you asked the current copyright owner? Has anybody?
Maybe nobody can put their hands on the source. It was written
a long time ago after all and on media that most modern
computers can't read.

> Compare that with a newer game that was not written in
> Forth, like Doom. Instead of keeping the program a big secret,
> the Doom engine source code has been published under the GPL.
> Only the data for a particular Doom game is copyrighted and
> sold.

And what on EARTH does that have to do with Forth? There's
nothing about C that makes it more or less likely for people to
release copyrighted code. Is the source code for HALO
publicly available for instance? No.

Regards,

John M. Drake

m-coughlin

unread,
Jan 4, 2007, 1:30:51 PM1/4/07
to

Yes the link is still good and just I downloaded the file SFFiles.zip
However it looks like it is not complete but there is enough to
drive you crazy if you try to use it. The Forth source code file
is named disys.tex. It is a classic Forth listing with 1024 byte
blocks, 16 lines of 64 characters. The first screen states "338
IS LAST BLOCK" but the file is only 309,804 bytes long. The file
dir.txt lists over 200 files that were used, including PIC
graphics. I don't see a mention of what Forth system it was used
with. Was there ever a Forth system named Forthought???

If there is any programmer who still enjoys using Forth on
the original IBM-PC and wants to hack this thing to work on
currently used hardware, I volunteer to be a beta tester. After
all Tim Lee (one of the original authors) includes the design
documents and states they did a good job of organizing them. I'm
sorry I don't have an IBM-PC Jr. anymore to use for this project.

Tarkin

unread,
Jan 4, 2007, 10:25:33 PM1/4/07
to

On Jan 4, 1:30 pm, m-coughlin <m-cough...@comcast.net> wrote:
> Coos Haak wrote:
>
> > Op Thu, 04 Jan 2007 14:46:14 +0100 schreef Andreas Kochenburger:
>
> > > On Thu, 04 Jan 2007 11:49:39 GMT, Ed Beroset

> > <bero...@mindspring.com>


> > >>Actually, the source code was made available by one of the
> > >> authors some years ago:
> > >>http://www.geocities.com/TimesSquare/Maze/4979/lee.html
>
> > > The link is dead
>
> > Not when I looked just now ;-)
>
> > --
> > Coos
>
> > CHForth, 16 bit DOS applications
> >http://home.hccnet.nl/j.j.haak/forth.html Yes the link is still good and just I downloaded the file SFFiles.zip
> However it looks like it is not complete but there is enough to
> drive you crazy if you try to use it. The Forth source code file
> is named disys.tex. It is a classic Forth listing with 1024 byte
> blocks, 16 lines of 64 characters. The first screen states "338
> IS LAST BLOCK" but the file is only 309,804 bytes long. The file
> dir.txt lists over 200 files that were used, including PIC
> graphics. I don't see a mention of what Forth system it was used
> with. Was there ever a Forth system named Forthought???
>
> If there is any programmer who still enjoys using Forth on
> the original IBM-PC and wants to hack this thing to work on
> currently used hardware, I volunteer to be a beta tester. After
> all Tim Lee (one of the original authors) includes the design
> documents and states they did a good job of organizing them. I'm
> sorry I don't have an IBM-PC Jr. anymore to use for this project.
>
> --

> Michael Coughlin m-cough...@comcast.net Cambridge, MA USA

Ummm....IF IBM could be persuaded to GPL
the BIOS, couldn't it (the PC) be emulated
well enough on Bochs? For that matter,
it may work with the 'stock' Bochs BIOS....

IIRC, trolling through R. Browns Int. List
and the PC-HELP (sorry, Mr. Author, I don't
remember your name...)utility, there were very
few 'quirks' about the IBM PC- the JR had a
few more, but none that I can imagine would
make it difficult to port to newer hardware.

Come to think of it, one of the few problems I
had playing it on a Pentium 100MHz box was
that it was too fast...animations like the countdown
before lifting off from a planet went by too quick,
and controlling the the captain at the spaceport was
tricky. I had the same problem with some other
DOS games, which were written when 486's at
33, 50, or 66 MHz were top o'the line.

There are numerous CPU-hogging programs
on the web that are made for just this scenario-
they put a load on the CPU so your game
appears to running at 'normal' speed.

Running the game via Bochs gives you
access to parameters which control the
rate of execution of the simulation...
and thus the perceived system 'speed'.
I think this is probably the best solution,
as it is cross-platform,and probably a
little more 'tune-able' then the CPU
cycle-hoggers.

Heck, I may even try it myself...

Cheers,
Tarkin

Frank Buss

unread,
Jan 4, 2007, 11:05:14 PM1/4/07
to
m-coughlin wrote:

> Yes the link is still good and just I downloaded the file SFFiles.zip
> However it looks like it is not complete but there is enough to
> drive you crazy if you try to use it.

It's not that bad, but looks like it's just the system abstraction, no game
logic. So if you need some Forth code with mixed x86 assembler to draw
lines on antique Hercules graphics cards, this code is useful :-)

But it is a good idea to use Forth for games, because I think the
interactive programming style helps a lot while developing.

--
Frank Buss, f...@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de

werty

unread,
Jan 6, 2007, 3:06:28 PM1/6/07
to

> Andreas
> -------
> 1 + 1 = 3, for large values of 1.
-------------------------------------------------------

ha he ha he very Good joke Andreas .....

I was eductated also in Luddite institutions ...

But I had to re-educate myself after leaving school

to improve my math , so now i can do all

math , even divide by zero ... ha ha ha ...

Worthless Educational Institutions !!!

Teachers : " Pay Me , Pay Me , Pay Me ......

Ed

unread,
Jan 8, 2007, 2:43:19 AM1/8/07
to

"werty" <we...@swissinfo.org> wrote in message news:1168113988....@v33g2000cwv.googlegroups.com...

How do you "divide by zero"? What result did you get?

Ed

m-coughlin

unread,
Jan 10, 2007, 12:47:38 PM1/10/07
to
Tarkin wrote:
>
[snip]

>
> Ummm....IF IBM could be persuaded to GPL
> the BIOS, couldn't it (the PC) be emulated
> well enough on Bochs? For that matter,
> it may work with the 'stock' Bochs BIOS....

There is no need for IBM to be persuaded to GPL the BIOS. The
first thing they did was publish the IBM-PC BIOS code along with
the plans for the motherboard. It was a very radical thing to do
and changed the whole computer industry in ways that we still
don't fully understand.

[snip]


>
> Come to think of it, one of the few problems I
> had playing it on a Pentium 100MHz box was
> that it was too fast...animations like the countdown
> before lifting off from a planet went by too quick,
> and controlling the the captain at the spaceport was
> tricky. I had the same problem with some other
> DOS games, which were written when 486's at
> 33, 50, or 66 MHz were top o'the line.

[snip]

Do you mean playing Starflight? There is a special GPL'd old
IBM-PC + MS-DOS emulator to use old programs with new MS-Windows
called DOSBox. http://dosbox.sourceforge.net/ It changes
running speed, displays old graphics, even plays the music that
came out of the IBM-PC's onboard speaker.

I think a more interesting game would be to take what is left
of Starflight and get it running as a Forth program updated with
a Forth development system. Didn't anybody check up on the
original posters web page?
http://meusite.uai.com.br/~mmand/starflight/
http://meusite.uai.com.br/~mmand/starflight/kernel.html
Marcio has found several important things about the internals of
the game. It is a working Forth system from 1985. The dictionary
has " every character of word names ... xored with 0x7F "

I guess Forth programmers are all too busy doing important
things to bother playing games.

Frank Buss

unread,
Jan 10, 2007, 9:54:18 PM1/10/07
to
m-coughlin wrote:

> I guess Forth programmers are all too busy doing important
> things to bother playing games.

I've played it and even today it is great! On page 29 of
http://www.forth.org/fd/FD-V9N2.pdf you can read an interview with Tim Lee,
one of the main programmer of the game. An interesting advice from him is
that you should write your own Forth system, if you want to learn Forth.

ken...@cix.compulink.co.uk

unread,
Jan 11, 2007, 6:27:35 AM1/11/07
to
In article <45A526B6...@comcast.net>,
m-cou...@comcast.net (m-coughlin) wrote:

> There is no need for IBM to be persuaded to GPL the
> BIOS. The first thing they did was publish the IBM-PC
> BIOS code along with the plans for the motherboard.

As far as I remember the BIOS code was published but
copyright. This actually made life harder for clone
makers. IIRC they had to set up two teams, one to draw up
a BIOS specification based on the published code and
another to write the BIOS without ever seeing any IBM code.

Ken Young

m-coughlin

unread,
Jan 11, 2007, 11:34:10 AM1/11/07
to

Yes, that is right. I met someone who wrote an IBM-PC clone
BIOS in the early days. Since he had all the necessary ideas and
information written by someone who had read the IBM code and
comments, but having nothing directly copied from the listings,
he wrote a new equivalent BIOS in less than two months.

It is not necessary to rewrite the BIOS to make a game like
Starflight. Knowing exactly how to access the BIOS and what it
does is all that is needed. Things are harder today. There is
not just one BIOS from IBM to work with. There are different
ones for each motherboard and they get debugged and updated and
flashed into some boards and not others. There is BIOS code on
things like video cards. We are still tied to the original IBM
BIOS with software generated interrupts for the 16 bit 8088.
There is nobody who can set the rules for a new BIOS standard
for compatible 64 or even 32 bit motherboards.

There are new free open source BIOS's being written. It is
no longer a two month job. Ten years is not enough. I met a C
programmer who was working on a BIOS based on the Fcode Open
Firmware standard. He asked me "Do people still write programs
with the Forth language?" Yet out of all this confusion there
will be a BIOS on new computer boards and it could be somehow
used for a game like Starflight.

0 new messages