Page 1 of 3

Possibly hundreds (?) of new games for the MTX

Posted: 14 Dec 2019 18:45
by Bill B
But does anyone want them?
Zork_2.png
Zork_2.png (10.73 KiB) Viewed 12601 times
The Z-Machine is a virtual computer for running text adventure games stored in "story files". Originally developed by Infocom in 1969 for their games, the Z-Machine is considered to be one of the first uses of virtual memory. Both the Z-Machine specification and tools for developing story files are now publicly available. As a result there are now many implementations of the Z-Machine and a large number of story files available for free download.

As well as Windows and Linux versions of the Z-Machine, there are a couple of implementations for Z80 machines:
I have a first draft of a port to the MTX. It at least partially works, but it is horribly slow. I can see a few ways it might be speeded up a bit, but whether enough to make it reasonably playable I don't know. This raises a couple of questions.

Is it worth continuing with? If you just want to play the games, use one of the Z-Machine implementations for modern machine. The port is only worthwhile if you want to play the games on real MTX hardware.

What MTX specification to target in attempting to speed up the software?
  • MEMU - No point, as above.
  • Standard SDX. This is probably the largest number of potential target machines, however it has the least options for speeding the software. A disk drive is essential as story files can be up to 512KB. The drive is likely to be heavily worked by the virtual memory. Also, the Z-Machine standard recommends a minimum screen width of 60 characters, which would require using skinny characters as per Andy's SCPM ROM.
  • SDX with extra 512K of RAM. The RAM could be used to provide the Z-Machine virtual memory (not a RAM-disk) speeding the software. However, as Andy has found, there are at least two versions of the 512K RAM expansion in SDX drives:
    • One where the extra RAM is available in both SDX and CP/M modes, but is not correctly mapped in CP/M mode.
    • One where the extra RAM is correctly mapped, but only accessible in CP/M mode.
  • Standard CP/M. This at least provides 80 character wide screen. The disk drive(s) can be used for VM. This is the target for my current draft port.
  • CP/M with 512K RAM expansion. Again using this extra RAM directly (not as a RAM disk) could improve speed, but also raises the issue of the different RAM mappings.
  • CP/M with Silicon Disk (includes the CFX-II). Accessing the Silicon Disk memory directly (not as a disk drive) could also speed the VM, but not as much as 512K paged RAM. It would require a different version of the software.
Comments as to whether to continue, and for which hardware, please :?

Re: Possibly hundreds (?) of new games for the MTX

Posted: 15 Dec 2019 18:00
by Martin A
Do I want them, yes.

Is it sensible, probably no, but then is doing anything new on retro computers sensible ? Probably not, but that hasn't stopped either of us in the past.

The key seems to be whether there is sufficient wiggle room to improve the performance.

For the widest possible audience, the target system would be 64k ram and a disc drive. That would cover the original disc systems as well as modern replacements. Whether you launch from CPM or Basic, that's a design choice.

Andy's new rom card and the CPM to ROM utility might help performance ?? That's not perfect, as saving the game state then becomes a "problem".

The 60 column recommendation that's interesting, as I'm sure had Hitchhikers Guide to the Galaxy on the Atari 800XL, that was only 40 columns. (and a seriously slow serial disc drive too.)

I'm guessing that might be due to the more generic nature of the modern interpreter ?

Re: Possibly hundreds (?) of new games for the MTX

Posted: 15 Dec 2019 19:13
by Bill B
Martin,

Was "Hitchhikers Guide to the Galaxy" a Z-Machine game? Not every adventure game was.

Only 64K of RAM. OK, that means first trying to improve the disk caching. I have some ideas on that. Then see whether the implementation of the Z-Machine emulation can be improved.

I was not sure whether all SDX's included the CP/M boot ROM, or whether some only had the Disk Basic ROM. Still, if I can achieve reasonable performance under CP/M, it should not be too difficult to then refit with VDP output.

Re: Possibly hundreds (?) of new games for the MTX

Posted: 15 Dec 2019 20:37
by Dave
Hi Bill,

I agree with Martin, it's always nice to get extra "Memotech" software and I am likely to have a little play with it, but does it justify your efforts ? - probably not. Still, on these long, cold, winter nights, you'll need something to keep you busy :-)

Hitch-hikers guide is available for Z machine. A chap called Edilbert Kirk created a Z machine for the Commodore PET (6502) and the Z machine file is available here

http://petsd.net/petfood.php

His implementation will run on a 32k PET, but happens to be one of the very few programs that can take advantage of the 64k extra RAM board (96k total) in my PET 8096

regards
Dave

Re: Possibly hundreds (?) of new games for the MTX

Posted: 17 Dec 2019 16:25
by thewiz
I have the same sentiment. Its not whether its a good idea or not but will you enjoy the challenge? Having more of this kind of thing for the MTX might also interest more people which can't be a bad thing either.

Well done in getting something up and running too. Do you know which part is causing the slowness?

Now if only someone would port AGD. :D

Re: Possibly hundreds (?) of new games for the MTX

Posted: 26 Dec 2019 13:11
by Bill B
By totally re-writing the virtual memory code, using different algorithms, I have speeded up the program (factor of three by one estimate). However I am still not sure it is fast enough to be playable :( Profiling shows that VM access is still the bottleneck.

If anyone else wants to have a hack, executable and source code is attached. You will probably also need my assembler to build the code.
thewiz wrote: 17 Dec 2019 16:25 Now if only someone would port AGD. :D
And what is AGD?

Merry Christmas and a Happy Memotech New Year all :)

Re: Possibly hundreds (?) of new games for the MTX

Posted: 27 Dec 2019 16:21
by 1024MAK
Bill B wrote: 26 Dec 2019 13:11
thewiz wrote: 17 Dec 2019 16:25 Now if only someone would port AGD. :D
And what is AGD?
Arcade Game Designer I presume...

Mark

Re: Possibly hundreds (?) of new games for the MTX

Posted: 27 Dec 2019 21:58
by Bill B
It does not look like the source is available, so that is not a port, it would be a reverse engineer.

Re: Possibly hundreds (?) of new games for the MTX

Posted: 28 Dec 2019 22:09
by Dave

Re: Possibly hundreds (?) of new games for the MTX

Posted: 29 Dec 2019 10:19
by Bill B
Possibly, for whomever has the time. Not me, I have already got too many projects that are not getting completed because of diversions :roll: