Playable version of Mini-Zork II

If I’m correct about which text it was supposed to write, it was “Your little finger begins to twitch, and then your whole body is free again”. (At least, I didn’t see that text even through the spell timed out.)

Henrik’s optimized abbreviations included:

        .FSTR FSTR?14,", and "            ;   31x, saved 148
        .FSTR FSTR?16," your "            ;   40x, saved 154
        .FSTR FSTR?18," is "              ;  132x, saved 260
        .FSTR FSTR?21," and "             ;   78x, saved 229
        .FSTR FSTR?22,", "                ;  197x, saved 194
        .FSTR FSTR?27," to "              ;   85x, saved 166
        .FSTR FSTR?37,"and"               ;   88x, saved 85
        .FSTR FSTR?42,"ing"               ;   81x, saved 78
        .FSTR FSTR?64," you"              ;   28x, saved 52
        .FSTR FSTR?94,"You"               ;   20x, saved 36

So at least some of those should be used, right? For the “Time passes…” message, there’s this:

        .FSTR FSTR?57,"s."                ;   62x, saved 59

I’m thinking this could happen it it needs three pages at the same time in the buffer that can only hold two pages - one page where the PC points, one page with the string to be printed and then a third page holding the abbreviation string.

I haven’t managed to reproduce this yet, but will look for problems in the code regarding this theory.

With the infrastructure already in place, it seems that adding a “mutiple exception” isn’t such a big deal. Something like this seems to take care of the “DROP ALL” glitch:

	     (<AND <EQUAL? ,P-GETFLAGS ,P-ALL>
		   <VERB? DROP PUT PUT-ON GIVE SGIVE>
		   <NOT <IN? .O ,WINNER>>>
	      <AGAIN>)

So that might be safer than removing SEARCHBIT. You still get the glitch if you “DROP BRICK AND STRING”, but there I think it makes sense.

What’s the size limit for the game if Ozmoo needs to use three pages? Is it a bug if Ozmoo can’t live with only two?

The size limit would be the same as for two pages, minus 256 bytes.

If this is indeed the cause, I can probably fix it without increasing the buffer size.

Let’s hope so. The current development version of the game is 53,400 bytes with Henrik’s abbreviations. Disabling the debug commands brings it down to 53,284 bytes. If I understand correctly, that’s still slightly too large for a 3-page version.

1 Like

I just uploaded an experimental version which skips the buffers altogether. It may be a tad slower, but if the problem had to do with the limited buffer it should now be gone.

Getting rid of the buffers also means it should now, in theory, be possible to build a game where the storyfile is up to 54272 bytes, although I’m currently having trouble using the last 256 bytes of that.

The same thing happened to me again, I’m afraid:I got “zzz.” instead of the text telling me that the Wizard’s spell had timed out. It seems all I had to do to reproduce that was to wait in the first room for the Wizard to appear and cast a spell where you do get a message when it times out. (I.e. one of Feeble, Freeze, Ferment and Float.)

Annoyingly, it can take quite a while for him to appear.

1 Like

On another subject…

I tried my new twist to the abbreviations and the one above that previous compiled to 53,400 bytes now compiles to 53,342 bytes.

1 Like

Hm, that is the very last string in the storyfile. I’ll try to decode it by hand to see if there’s anything special about it.

I see nothing strange about the message. It starts with the abbreviation “You” and has lots of other abbreviations in it, but it looks fine.

I tried building the game as a normal disk-based game with Ozmoo, waited about 500 moves until he cast the right spell, and sure enough I got the correct message. So it’s not related to the buffers, but to the non-virtual memory build somehow. Will investigate further tomorrow.

1 Like

Found the problem. Ozmoo skips everything past the last page border - the last 122 bytes are not in memory. This probably happened when I hacked make.rb to not pad the storyfile to a 512 byte multiple when building a single-file game, to make it fit. Will have a look and certainly find a solution tomorrow.

I uploaded a fixed version of Minizork 2, nobuffers. It has all the content of the story file.

Much better!

2 Likes

Great to see!

In hindsight, I should have realized right away that “zzz” is exactly the reply you get if the first two bytes of the compressed string are $FF $FF, and C64 memory is filled with alternating areas of $00 and $FF from start…

1 Like

I decided to make a Release 13 with the last few fixes I’ve made. Maybe it can get some outside testing, because right now I’m not sure if I’m the only one who’s ever played it through from start to finish.

This one grew a bit: It’s 54,160 bytes with ZILF 0.9 abbreviations. Unlike earlier releases, I wasn’t able to find anything to remove to offset the changes I made. But I don’t think it’s a problem.

I actually played it through yesterday. Not on C64 & VICE, only in Frotz, to see if the “zzz”-bug only was in C64…

Without the bank and the maze this is almost a better game than the full Zork II.

3 Likes

Thanks! I take it you didn’t encounter any serious bugs along the way?

Only the brick and the string.