Vezza, a new Z-Machine for CP/M

Miscellaneous brainstorming:

Dumb terminal version: Usually these just omit any text that would be printed to the upper window, with predictable results. My advocacy here is mainly based on the idea that any z-machine is better than none (and also perhaps by my own quixotic delight at getting z-machines running on just about every imaginable machine, Doom-on-a-toaster-style). But in my experience relatively few z-code games actually require the status line in game-breaking ways; certainly most of Infocom’s z3 games don’t, and even Curses! (which uses a custom multi-line statusbar, help menus, and boxed quotations) is perfectly winnable without them as long as you know what you’re getting into. This is why dumb-terminal implementations like the xyzzy discord bot generally work.

Disk switching: This one’s weirder but if you do want to go down this route, I think there are probably two comparatively easy ways to do this. This is applicable to any CP/M system with SS/SD or SS/DD 5.25" drives (a lot of them: Osborne 1, Apple II, Kaypro II, earlier Amstrad CPCs and PCWs, Xerox 820, etc.), but I’ll use the Apple II as an example since that’s the platform I am most familiar with. Apple II double-density disks have a nominal capacity of 140kb but are practically limited to about 127kb when formatted for CP/M.

Two methods:

1 - quasi-Infocom method (thanks @fredrik): read a portion of the game into memory, prompt for Disk 2, and then do any necessary disk access on that one disk. The Infocom terps on the Apple II require 128kb of RAM to do this and do some funky business with track interleaving to pack more than 140kb of data onto Disk 2, which allows them to run story files up to 256kb. An easier method might be to just read 32kb of dynamic and static memory, prompt for Disk 2, and then read from disk as usual with an offset of -32kb, permitting story files up to 32kb + 127kb = 159kb.

2 - dual-disk setup: load the story file as usual, but read all data after (say) 112kb from a second file handle pointing to drive B:. This would require two drives (pretty standard on machines of this era), but would let you run games up to ~239kb (or ~254kb if you loaded the terp from drive B: and then swapped out the disk).

How helpful would this actually be? Because I’m a scientist and I like data, I pulled a few rough statistics. The games/zcode folder of ifarchive contains about 250 files that are <128kb and about another 250 files that are 128kb-256kb. Of course, the smaller files disproportionately include minigames and low-effort experiments. For a more realistic sample of what I would want to play, my personal folder of classic z-code games contains about 50 games that are <128kb (of which 23 are Infocom) and about another 80 that are 128kb-256kb. Many of my favorite z-code games - such as Savoir-Faire and The Mulldoon Legacy - are >256kb, but these mostly require too much dynamic memory to run anyway. Still, the 128-256kb range contains some great classics that should work, such as Spider and Web, Christminster, Metamorphoses, Curses, Winter Wonderland, All Roads, Ad Verbum, etc.

The number of classic games which would benefit from the first 159kb disk scheme is relatively small, but there are some (e.g., Ad Verbum, The Moonlit Tower, The Weapon, Janitor, Insight, Final Selection, All Things Devours). The bigger advantage would be the ability to run 128kb Infocom games from a single disk drive - although if you like to live dangerously, you can already do this by quickly hot-swapping the disk after Vezza loads but before it begins reading the story file. (I can confirm that this does, technically, work.)

Hmmm some quick brainstorming responses while I digest the remainder.

Aside: FYI it might be worth downloading the current version of the terp as I’ve enabled the split-screen version of the sonarscope in SeaStalker for the Apple II (if you use turn on sonarscope instead of examine sonarscope) Please do let me know if it behaves oddly.

I’m not sure if 32K for the front portion of the game is feasible on most systems. On anything that doesn’t bank CP/M, it will be closer to 22K that would be initially loaded in. It’s a slightly different architecture (memory map) to the C64. If it’s banked then 32K is much more feasible, however, that seems an unlikely combination. (banked CP/M and a small drive).

I’m also thinking in your calculation that anything z3 might not be the greatest example of making Vezza headless - after all, the original infocom terp takes care of these already.

You have made me think of a possible other path - are you using a single floppy drive on your hardware? You have mentioned hot-swapping disks - would a feature to swap disks during load be helpful? i.e. not splitting the game file, simply prompting to swap during for the load of the game file? I can look into that although I may also need to look as well as swapping for game saves too if that’s the case.

Aside: FYI it might be worth downloading the current version of the terp as I’ve enabled the split-screen version of the sonarscope in SeaStalker for the Apple II (if you use turn on sonarscope instead of examine sonarscope) Please do let me know if it behaves oddly.

Thanks!

would a feature to swap disks during load be helpful?

Potentially, e.g., a “Press any key once game disk is inserted.” prompt before loading. This could be restricted to certain ports or activated with a command-line switch if you didn’t want to annoy other users. It’s probably not necessary to prompt before saving since the player can usually swap disks while waiting at the regular command prompt if they need to.

This is mainly only relevant to games that are small enough to fit on a single disk, but large enough that you can’t also fit the interpreter on the same disk (to be fair, this does include a number of the larger z3 Infocom games on the Apple II). Most Apple II users do have multiple drives; mine is just malfunctioning at the moment.

Zork: The Undiscovered Underground appears to be working well on the latest Vezza-MB

1 Like

Okay so some more updates - more platforms added, and some cosmetic fixes. To be honest, I don’t know why erase lower screen worked as-is on my original TRS-80 versions…

Current build list:

Available builds (requires CP/M version 3 or compatible system):
  vezza-nb.com - 80x24 screen, vt52 terminal (e.g. Amstrad CPC)
  vezza-b.com  - 80x24 screen, vt52 + Banked CP/M 3
  vezza-51.com - 51x24 screen, vt52 terminal (e.g. Spectrum +3)
  vezza-90.com - 90x32 screen, vt52 terminal (e.g. PCW)
  vezza-h.com  - 80x25 screen, HGT + Banked CP.M 3 (e.g. CPU280)
  vezza-so.com - 80x24 screen, Soroc IQ 120 terminal (e.g. Apple Softcard CP/M3)
  vezza-a3.com - 80x24 screen (trimmed), Banked, ADM-3a/TVI-912 (e.g. MicroBee)
  vezza-MB.com - 80x24 screen (trimmed), Banked, ADM-3a + ANSI colour (Microbee)
Other builds (Large memory CP/M 2.2, no timed input):
  vezza-SC.com - 80x24 VT52 runninng SAMDos (SAMCoupe)
  vezza-A8.com - 80x24 RunCPM Adm3a - Atari 800 with FujiNet and DT80
  vezza-C2.com - 80x24 RunCPM VT100
  vezza-CC.com - 80x24 RunCPM VT100 with colour

Latest cosmetic victories: Shogun works consistently now (Microbee, SamCoupe, TRS-80 model 4, RunCPM):


3 Likes

Is there any reason why your new VEZZA-K2 (for Kaypro 2) should not run on a 64k Microbee CP/M 2.2 as both have 64k mem and ADM-3a terminal ?

The short answer is sort of yes. From a personal perspective I’d like to streamline it, so I’m open to ideas.

The longer answer is when I started this, I was really hoping to streamline and simplify things. Minimum versions of CP/M. Minimum number of terminals to support. Short answer is that yes it will run, however, the Kaypro 2 & 4 do not come with any highlighting unless you get the graphics add-ons, such as for the Kaypro 4/84. This means the rendering on the Microbee would suffer because the original Kaypro was a lot older and did’t have the cool features.

Further to this, as far as I can tell, the real ADM-3a terminals had no highlighting. So when it is added to a platform, there is no standard. The Microbee reverse text and bright text codes are totally different to the Kaypro 4/84 codes which I’m yet to get working (I can’t get the emulator to play nicely - work in progress),

Cheers,
Shawn

1 Like

Then is it possible for a cp/m 2.2 version (now that you have the Kaypro etc working) as a separate version also for the Microbee 64k models. So 2 versions, one for the 128k models (running CP/M 3) and one for 64k & 256k models (running CP/M 2.2), with the latter not having to run the difficult ones like Trinity with highlighting only included.
Alan

If you’ve got a recommended emulator & boot disk, I’m happy to take a look at the Microbee 64k to see what I can do. I have indeed started to crack the 2.2 nut. For the Kaypro & MSX versions, it’s a fair bit slower then the CPM3 versions. The BIOS is unfriendly so all the BIOS calls need way more register saving/restoring. It’s also blown the code out, reducing the available cache which reduces performance further.

These aren’t as well tested - I’ve recently discovered that there’s some problems with $verify, and the MSX2 version seems to crash on some obscure games. Same binary works find on MSX1. FYI MSX-DOS is CP/M 2.2 compatible, and equally bad with register destruction.

The SAMDos version is also CP/M 2.2 compatible, but has a much cleaner BIOS. I could leave the speed optimisations of the code largely untouched. $verify works on SAMDos.

1 Like

Thanks Shawn, I’ve emailed you a Microbee 64k boot disk image.

1 Like

Thanks to testing from @ChickenMan I’ve made the MicroBee 64k CP/M 2.2 version available. It won’t do Beyond Zork, Trinity or AMFV due to memory limitations, but it’s available on the site as vezza-MA.com

After some feedback and updates to the code, as well as some stability fixes, the MSX-2 (and similarly MSX-1 with a mighty 40 column display) are also working. I had to be creative with the display options as the MSX doesn’t support inverse characters. Enjoy!

1 Like

This is Beyond Zork running on my real Premium 128k Microbee using a Gotek.

6 Likes

With all of the other features, I’ve pulled together an experimental Osborne 1 version vezza-O1.com. I have no idea how nicely the BIOS plays, so I’ve taken the slower, push all the stack option. I also can’t really properly test it as I am not sure where to find a reliable emulator (there seems to be MAME files but haven’t figured out how to get it working yet), and I don’t have access to a machine. Do you have access to a machine or emulator? Is so, are you able to help test? Ultimately I would love a photo of a z5 game running on real hardware.

1 Like

Update: I have MAME working, but only with single density disks. 90KB of storage on a disk is a significant restriction. I have also noticed that I can’t get underline to work at all (possibly an emulator flaw? or documentation doesn’t reflect all hardware capabilities?) Anyway, here’s Balances running on an Osborne 1 on MAME, in full screen width glory - I did have to adapt the code to handle “bold” but no reverse. Any guidance on emulated vs real hardware, and how to use the double density feature, would be greatly appreciated:

1 Like

Vessa-MB running fine with Beyond Zork on MAME as a Microbee Prem 128k

and Vessa-MA running fine also with Shogun on MANE as a Microbee 64k

2 Likes

Awesome! I’ve also managed to get the Bondwell 12 version running, although the double-sided disk format for the Bondwell 14 seems to elude me. I still have questions about the accuracy of some of these emulationns.

1 Like

Very cool! One of my family members has an Osborne, so I’ll see if I can get it running.

Many Osborne users today have upgraded double-density drives, although the original shipped with dual single-density drives by default. That pretty much limits you to Zork 1-3 without disk swapping (one of the reasons I floated the idea of a dual-disk read option).

2 Likes

Thanks for that. The double density as defacto standard makes sense to me Great news on the real hardware front too! Happy to provide you with an image of the 40tk SSDD disk I’m booting on the Osborne 1 on MAME for the screenshot above if that’s of any use?

1 Like

In Osborne 1 related news, I’ve been able to make the display even better. I found a reference to the actual underline codes which worked, and have been able to selectively apply the underline codes to only the bottom row of the status (upper window). I’ve uploaded the new version. I think it’s nicer than using the underscores. The results look like:

3 Likes

I would love to try this on Zesarux or Fuse emulators.

How would I do that? Is it a .tap file?