Jinx Adventure Game

General discussions related to the Altair 8800 Clone

Jinx Adventure Game

Postby Wayne Parham » July 14th, 2022, 10:06 am

One of the first programs I thought was really cool was the Zork text adventure game. The one I first saw was the Fortran version popular on DEC and Data General minicomputers.

A couple years later, it was split into three - Zork I, II and III - and made available on a variety of microcomputer platforms, including the Altair.

Jinx is my own little creation and follows in the Zork tradition, borrowing heavily from it in user-interface and "look and feel."

I wrote it originally to be compiled on an ANSI C compiler designed for use on 6502-based micros like the Apple II. But after getting into Altairs, I felt I just had to back-port it to the K&R-style BDS C compiler. Totally different bird.

But it's done and ready to run. Download a copy here:


The download is a ZIP archive with executable for various platforms, as well as documentation. The Altair program is in the Altair directory. Look at the PDF files to help you get started.

I haven't included the source code, because that would sort of spoil the game. Looking at the source is sort of like cheating. But if you want the source code, email me and I'll send it to you.
Wayne Parham
 
Posts: 240
Joined: March 18th, 2022, 3:01 pm

Re: Jinx Adventure Game

Postby BillO » July 19th, 2022, 8:56 am

Hi Wayne,

I tried the PC version and it seems to work just fine (nice game!), but the Altair one gives me a "load error" when I try to run it. Any ideas?
BillO
 
Posts: 136
Joined: November 11th, 2020, 6:29 am

Re: Jinx Adventure Game

Postby Wayne Parham » July 19th, 2022, 10:34 am

You need to have CP/M configured for maximum memory. So run MOVCPM and SYSGEN to create a CP/M boot disk for larger memory.

I compiled it and ran it on a 64K CP/M. Haven't tried smaller systems, so I probably should dial it back in 2Kb increments to find the minimum memory requirement.
Wayne Parham
 
Posts: 240
Joined: March 18th, 2022, 3:01 pm

Re: Jinx Adventure Game

Postby BillO » July 19th, 2022, 10:57 am

Okay, I'll try that. I'll increase a bit at a time and get back with what works.

Thanks!
BillO
 
Posts: 136
Joined: November 11th, 2020, 6:29 am

Re: Jinx Adventure Game

Postby Wayne Parham » July 19th, 2022, 3:41 pm

I have found that it runs on the Altair Clone that Mike sells, which has a 63K CP/M. But it does not run on the 8800c, even if SYSGEN is used to create a 63K CP/M boot disk.

So I might look into optimizing the code to decrease space. It's a tight fit - as it is, I had to disable the save/load functionality - but I may be able to squeeze it a little more so it'll run on the 8800c.
Wayne Parham
 
Posts: 240
Joined: March 18th, 2022, 3:01 pm

Re: Jinx Adventure Game

Postby BillO » July 20th, 2022, 7:11 am

Thanks Wayne - you saved me some time.
BillO
 
Posts: 136
Joined: November 11th, 2020, 6:29 am

Re: Jinx Adventure Game

Postby toml_12953 » July 20th, 2022, 8:29 am

Wayne Parham wrote:I have found that it runs on the Altair Clone that Mike sells, which has a 63K CP/M. But it does not run on the 8800c, even if SYSGEN is used to create a 63K CP/M boot disk.

So I might look into optimizing the code to decrease space. It's a tight fit - as it is, I had to disable the save/load functionality - but I may be able to squeeze it a little more so it'll run on the 8800c.


If you're using the FDC+, there's a small mod you can make that lets you use all 64K. As shipped, the top 256 bytes are unavailable (page 5 of the FDC+ manual). If you use the 88-2SIOJP board, you can have the ROMs switched out after bootup to allow access to all 64K RAM (page 4 of the 88-2SIOJP manual). Depending on how much ROM space you're using, this can recover from 2K - 16K of space for RAM.
toml_12953
 
Posts: 297
Joined: June 7th, 2013, 12:54 pm

Re: Jinx Adventure Game

Postby Wayne Parham » August 10th, 2022, 10:22 am

Update:

I've ported the game to Aztec C and made some memory optimizations, reducing the size of the executable. I'm happy to say it works well on most systems now. I've tested it on SimH, Mike's clone and on the 8800c with the Burcom CP/M build, sysgen'ed as low as 56Kb. Since it works on the Burcom version of CP/M, I'm sure it would work on the Lifeboat version too.

The only other version of CP/M that I'm interested in supporting - but that it still doesn't run under - is Mike's version for 1.5Mb diskettes. It's still just a smidge too big for that system. CP/M for 1.5Mb trades a little TPA RAM to support the larger disk space. I'm hoping to use overlays or some other optimization to be able to run on 1.5Mb CP/M too, but we're not there yet.

Still, if you're running 330Kb (or smaller) disk drives, the Jinx game at the link above will work.
Wayne Parham
 
Posts: 240
Joined: March 18th, 2022, 3:01 pm

Re: Jinx Adventure Game

Postby Wayne Parham » August 20th, 2022, 5:27 pm

New update available.

If you downloaded Jinx in the past, please download the most recent build. It's available at the link in the first post of this thread.

This one is a bugfix build. It fixes problems in the "examine" and the "read" commands. But it also includes versions that will run on 330Kb CP/M diskettes and on 1.5Mb CP/M diskettes.

I found the problems by accident, while working on creating overlays. I was testing a function that I had overlayed, started Jinx and went to the coin shop by the Telex factory, 'cause there's an item there that's close to the beginning of the game. Start the game, type "e", "n", "w", "n" and there's the coin - an easy 5 points. I needed to check functions that are called when that happens.

I typed "examine coin" expecting to see "It's an ordinary coin." It gave no reply at all. Thought I screwed up the overlay call. Tried "read coin" and saw "Nothing to open." Then I was sure I had totally horked up memory somehow.

I started to look at the overlay code, but it all looked fine. As a "sanity check" I tried running the non-overlayed Aztec build of Jinx. It did the exact same thing. I even went back to the first Altair back-port using BDS C and it did it too. So since I knew it was a problem with the initial back-port, I rolled up my sleeves and found it pretty quickly.

I thought I had tested it pretty well, but really, I just walked around and did a few things and called it good. My main focus was to ensure the map was right, so I walked the entire landscape and checked that it was right. But I didn't interact with each of the things in the game, so I missed a few things.

If an object had detailed information associated with it, then the "examine" command worked fine. If not, it wouldn't return any information, or even give a response. This was because a conditional I used to test whether there was extended information worked fine in ANSI, but not in K&R. Easy fix once I spotted it.

Likewise, if an object had something to read on it, the "read" command worked. But if not, it would reply "nothing to open." Internally, what was happening was the variables had names that overlapped and so you saw the contents of the "NothingToOpen" string rather than "NothingToRead." Aztec and BDS only care about the first eight characters of variable or function names. They were matching the "nothingt" portion and the rest of the variable name was superfluous.

Jinx started life as a program that had longer variable and function names. When I backported it, I tried to find all of those but missed this one.

Remember back when you were limited to two-character variable names in BASIC? Everything was "A" or "T" or "S1." Then you moved to C or a later flavor of BASIC and could have variables like "count" or "length." Then the C++ craze was to prefix the variable name with its type, like pstAuthUser for a pointer to a structure of user authentication information. These days, seems like the Java guys use whole phrases for variable names. Everything has variables like "validateUserAuthenticated" or something like that. Well, Jinx originally had long variable names like that too.
Wayne Parham
 
Posts: 240
Joined: March 18th, 2022, 3:01 pm

Re: Jinx Adventure Game

Postby Wayne Parham » August 24th, 2022, 7:18 pm

I've completed the overlayed version of Jinx and included it in the distribution file linked in the first post.

It's a little slower 'cause it swaps memory to disk, but I've tested it on CP/M 2.2 for 1.5Mb diskettes. It works on systems gen'ed for 63Kb.

The version without save/load also works on the 1.5Mb systems.

And of course, the original - that includes save/load - works on pretty much any of the 330Kb CP/M disk versions. I've run it on systems gen'ed as low as 56Kb.

Please let me know if you find any bugs. Otherwise, I hope you enjoy the game!
Wayne Parham
 
Posts: 240
Joined: March 18th, 2022, 3:01 pm

Next

Return to General Discussions

Who is online

Users browsing this forum: No registered users and 14 guests

cron