New Z-Machine now available for earlier TRS-80 models M3ZVM and M1ZVM - Release 1

I’ve completely recut M4ZVM to retain as many benefits as possible, but sitting inside the 48K envelope through a 64x16 display. This meant analysing games to see where the best compromise laid for playing games. PunyInform games are of course excellent to run, and a lot of infocom z5 games work. The z4 games are either too large or need tweaking to fit inside the screen real estate.

  • z1, z2, z3, z4 and z5 games can execute
  • Supports full 64x16 display (no trimmed last column unlike the original)
  • Named game save and load
  • Timed input
  • Transcript (printing)
  • Accented chatacters
  • Fast execution of games (z3 games now execute faster than the original)
  • z3 status line supports am/pm time including Cut Throats easter egg
  • Supports Z-code ‘Dynmem’ dynamic memory size up to 18k

I had to remove the debug feature, adapt to the new screen, remove z6 support, and reduce the available dynamic z-memory to allow for optimal performance. Requires 48K and Disk support. At this point they both require LDOS 5.3 to run.

Full downloads including source, along with more detailed features and limitations are available from:
sijnstra / M1ZVM · GitLab
sijnstra / m3zvm · GitLab

TRS-80 Model 1, 3 and 4 all running the z5 Sherlock Infocom game:

13 Likes

I’ve had some great feedback over the past two weeks and have been able to turn around a second release. Many thanks to Jonathan Hoof for thoroughly testing the Model 3 version which not only helped prove the stability, it also helped me find edge cases that could improve performance. Also thanks to Ira Goldklang who tested the software across a number of different DOS releases on the model 1 (NewDos80, DOSPlus).
Release 2 improvements include:

  • Save/load was rewritten and works faster now on real hardware
  • Compatibility across multiple DOS versions allows games to load more broadly
  • Refining of code and memory map to allow floating amount of cache (upper and lower boundary) to improve performance
  • New Cache method allows the software to run now on real and emulated hard disks - playing games on FreHD is highly recommended
  • Highlighting simulation visually improved to look more right-sized for single row status bars, and switches to deeper graphics for multiple rows
  • Extra memory recovered allowed v6 back in, so now you can play Arthur (without any images) on a TRS-80 model 1 or 3. Hard disk or virtual floppy (HxC2001 or Gotek) highly recommended due to high memory usage causing high cache turnover (i.e. high amount of disk usage)

Download updates from the same links above.

5 Likes

Great work!

2 Likes

Version bump - release 3 for both model 1 & 3:

; [+] Fixed up arrow key mapping (fixes zsnake.z5)
; [+] Rewrote scrolling routines to fix cosmetics
; [+] Use native DOS error messages to improve error message meaning
; [+] Multiple speed improvements across core and routines
; [+] Improved memory usage to increase cache by 2 more sectors
; [+] Bugfixes
2 Likes

A new release is out, with a focus primarily on speed. The core has been thoroughly rewritten (and properly aligned across the Model 1, 3 and 4 versions for my own efficiency). It’s also been thoroughly tested (thanks again to Jonathan Hoof for support, feedback and testing). Speed and code size have been improved each release. To give an idea of the improvement between this and the previous versions, I’ve timed an interaction in Zork: The Undiscovered Underground, which is much more computationally intensive than any previous infocom releases.

The timing is taken from starting in the first room of the game, using the command “look” from after you press enter, until you are prompted again. I run it twice so that it fully caches the required data, and randomness from disk I/O is excluded, and the emulator can count CPU cycles which I can divide by 2MHz. The results look like to me:
ZTUU using M3ZVM Release 3 takes 3.06s
ZTUU using M3ZVM Release 4 takes 2.71s
As a comparison:
Zork 1 R119 - using M3ZVM Release 4 takes 1.97s (down from 2.24s in Rel 3).

As the core processing code is common across the versions, the Model 4 version will have the same proportion of results operating at 4MHz, so you can halve the times.

The links are the same as above, with a summary of updates in the changelog:

; [+] Rewritten ZPC tracking for speed improvement
;       Courtesy of Garry Lancaster (zxzvm for Spectrum Next)
; [+] Bugfix: now processes requests for "Stream 0"
; [+] Core code speed rewrites for text encode, call, return, branch,
;		timed input, instruction decode
; [+] Rewrote memory management to improve speed
; [+] Multiple fixes to increase available cache
; [+] Synchronised core code 1/3/4

Thanks also go out to Garry Lancaster for further encouragement and ideas on optimising. If you’re a Spectrum Next user, I highly recommend checking the updates Garry Lancaster has made to ZXZVM at Garry Lancaster / zxzvm · GitLab

Enjoy!

2 Likes

After posting this I had the sudden urge to go back and check a few things.

That Zork 1 timing seemed slow, so I tried an earlier release. This time, Release 75. Sure enough…
Zork 1 Rel 75 Using M3ZVM R4 takes 1.03s
Almost exactly the same for Zork 1 Release 88. What happened after the Masterpieces version?

2 Likes

One of the ZIL programmers here could probably explain what happens mechanically, but R119 of Zork I is a “Final Internal Release” (source: Infocom Fact Sheet). That designation can be a little misleading, as many FIRs have serious and often game-breaking problems. For instance, the diver’s hose tears for no reason in Cutthroats, Planetfall can stop listing dropped items in room descriptions, etc. Sadly, I know this from playing several FIRs unknowingly!

While I can’t say what’s different in Zork I R119, I can say that FIRs aren’t usually customized or tested for consumer audiences.

Thanks for making this resource available to the community!

2 Likes

Teaser campaign for the next upcoming release - Shogun in 48k…
After the past few months of gradual speed and memory footprint improvements, I’ve carved out enough space to be able to allow for some slightly larger games to be playable on the 48k TRS-80 Model 1 or Model III. Border Zone and Shogun (without the graphics, making the maze a little tricky). I would also highly recommend a hard drive to play these. While I’m still testing to make sure things are running as expected, here’s some emulator screenshots of what it looks like to play Shogun on a platform it really wasn’t intended for:

image

6 Likes

The next release of M1ZVM/M3ZVM/M4ZVM has been released! Apart from general speed improvements, and the ability to now load and play Border Zone and Shogun on the Model I/III, other fixes include:

  • fixed transcripting function
  • fixed the timer (needed for Border Zone as well as other z-Machine real time arcade games)

binaries and source code for the model III version are available from sijnstra / m3zvm · GitLab which links through to the other versions. Feel free to reach out with any questions/comments/feedback.

6 Likes

Further speed enhancements have been designed, built, tested and released! This latest round brings improvements most noticeable in the more recent, more CPU-heavy games. Adding to the previous table, using the same benchmark:
ZTUU using M3ZVM Release 3 takes 3.06s
ZTUU using M3ZVM Release 4 takes 2.71s
ZTUU using M3ZVM Release 6 takes 2.46s
Downloads are at:
Model 3: sijnstra / m3zvm · GitLab
Model 1: sijnstra / M1ZVM · GitLab

5 Likes