The Oregon Trail for FORTRAN 77

The other day I’d been alerted to this fantastic port of the BASIC game to Fortran 77 by Kidon, bringing it to mainframe and midrange machines of the 1970s!

You can read more information at it’s home page here, along with getting the source code and building it out.

Naturally I had to build it using f2c, and QuickC for Windows. Just some minor tweeks and it runs!

Victory! …?!?

Although victory could have gone a bit better. I know it’s largely my fault trying to introduce a clean way to pause before exiting. Obviously there is tonnes of Fortran compilers out there, for many old platforms, so perhaps this will make the Oregon Trail the ‘DooM’ of machines with F77?! Give it a try, there is extensive build instructions, and a quick list of known good platforms, be sure to update with newer (older) stuff that is found to fun!

Bringing back the WinZork demo via jsDOSBox

So with all the excitement with jsDOSBox it was about time I tried to get something from my old java dosbox stuff running again.

As a quick note, as of right now, you cannot boot into a disk image… Nor can you really run bat files, or any kind of drivers beforehand.  It’s basically either use a script that adds files one by one, or use an image file which gets mounted, and you run your exe/com file from that.

So here we go, back again is the old Fortran Dungeon (zork) compiled with QuickC for Windows, running on the working model version of Windows 3.0.

Dungeon via F2C

Dungeon via F2C

Click here, and enjoy!

For anyone interested my old post about this Fortran/Zork adventure is here.

 

Dungeon for the SHARP x68000 (on NetBSD)

Dungeon on the x68000

Its been a while since I’ve added a new port of Dungeon (zork!) so here we go!

Building f2c was a snap on the x68000, it just took a while..

Getting data into the VM was easy, just make an ISO image, and mount it.. Getting data out was.. a challenge, as the floppy doesn’t work under NetBSD, and it didn’t seem to want to see my other hard disks, just my root.  Well thankfully it’s virtual so I just did a:

tar -cvf /dev/sd0c dungeon.tar.gz

NEVER do that on a real machine kids!!!

Anyways here you go, for anyone who loves zork & the m68k!

Video of Fortran Dungeon…

I forget how I got linked back to this, but I figured in the new year vogue, I’d make a video to show how … convaluted it is to build dungeon via f2c.


As you can see, first I have to compile f2c as a Windows QuickWin exe as the MS-DOS version just runs out of memory without some kind of DOS Extender, and Windows 3.0 makes a suitable extender..

Next, I had to make a ‘list’ program that then exectued f2c against the Fortran converting them to C.  Then finally I just compile the libf2c components, then statically add in the Dungeon source that was just converted.  There is some ‘out of range’ case statement, not sure why, but it works… as you can see.

It builds/runs in 286 enhanced mode and beyond..  Obviously the more memory the better.

This was on Qemu 0.15.0 with MS-DOS 4.01 & Windows 3.0

I’ve got to stop watching the blogger stats…

Because then I see something like this come my way as a query from google:

“is there a version of colossal cave adventure that runs on 64 bit systems”

Well I certainly can’t let that one go unanswered.

So whomever you are stranger, here it is. Well for Win64 x86_64 machines.

This is built using f2c on MinGW64. I’ll spare you the details, but it compiled, and fired up and I got lost in the woods… So I assume it is working…..

For those of you not in the know, colossal cave adventure, or sometimes known simply as ‘adventure’ is the grand daddy of all text adventure games.

As mentioned in this timeline of adventure versions, adventure was written by Willie Crowther and expanded by Don Woods. This version, the Kenneth Plotkin version was derived from Kevin Black’s DOS version and Bob Supnik’s Decus versions.

With that said, there is a tonne of INT2 and INT4 casting, which I’ve just removed as I’m passing it through f2c. I suppose I could have seen about fixing the variables, but I just fixed the ones f2c and gcc really complained about. Included in the download is the modified source, and the original source, so anyone can take a look at it.

Naturally Wikipedia has a most excellent article on the history of adventure, check it out.

Colossal Cave in 64bits!

Colossal Cave in 64bits!

Enjoy!

16bit Fortran …

Ok, so I was looking at this ancient machine the other day, and I was wondering if I could at least build the f2c to run on either Win16 or OS/2 1.x. There was mention of it running on MS-DOS ages ago but I thought it’d be more interesting to try something else…

Well one thing is for sure, QuickC for Windows, wins HANDS DOWN for a ‘nice’ environment for building stuff… Once it was all said & done, on Windows 2000, I had f2c running, and converted the dungeon source, and building dungeon along with the libf2c. I couldn’t find a ‘nice’ way to build libraries with QuickC, and building a windows dll for libf2c would mean re-writing the IO for Win16.. If it were 15 years ago I may have done so, but nobody will use it now, so I just took the short cut of compiling the dungeon program & the library together… Surprisingly on a ‘fast’ machine with Virtual PC, 100,000+ lines of code compiles in under 10 seconds!

So the first result I got for my effort was this:

Dungeon in QuickWin on Windows 3.0 via F2C

 

Which wasn’t that bad, and I’m just amazed it works… You can download it from here. And thanks to the power of jDOSBox, you can run it live here.

The next thing I did was break out some ancient Microsoft C, and start to build f2c. That is when I found out that the resulting exe with C 5.1 doesn’t work, and 6.0a crashes when compiling part of the translator… However using 6.0a for *MOST* of f2c, and building the one faulting module with 5.1 results in a working f2c. The library built without issues, although I had a *HELL* of a time trying to remember how to build a static library for OS/2. I ended up just using lib & gluing it together one object file at a time… Not the ‘best’ but it works.

The next hardest thing was figuring out the linker definitions & response files to build a ‘windowed’ text client for OS/2. Luckily I was able to go through enough things to do it, and it was a LOT of work…. I almost wonder if it’s worth posting about it… But all my build steps are in the zip file located here.

Dungeon on OS/2 in a window via special linking..

 

It was a *LOT* of nonsense work to get this thing in a window for a good screencap… lol but in the end I guess it was worth it. I suppose I could try building it for MS-DOS, but really, where is the fun in that?

One thing is for sure, having this back when I actually used OS/2 1.3 or Windows 3.0 (I had CGA!!!) would have been cool… But now I guess it’s totally pointless, but whatever.