Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:30 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM2: Extending Z-MIM

Author Message
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 04:46pm 05 Dec 2020
Copy link to clipboard 
Print this post

I received this via email from @markboston36 and with his permission I'm moving the discussion onto TBS (in the event that anybody else is interested and more selfishly so that all my CMM2 discussion is in one place.)

  markboston36 said  So how would we update Z-MIM to run later versions of z-machine games?


Can I point you at the Z-Machine Standards Document. Have you read it ?

As I recall (and it's been at least 6 months since I read the document myself) extending Z-MIM to handle the .z4 and .z5 standards involves:

1. Support a different rule for packed addresses.
2. Implement a couple of dozen additional op-codes/instructions.
3. Handle split screen (upper and lower window) display.

Of these 2 is probably quite time-consuming and 3 is likely to be technically the hardest to grok and implement - at the moment Z-MIM doesn't even support a status line.

If I were to look at doing it myself I would probably start by making the decision to drop any pretence of support for the original Colour Maximite. This would then allow you to rewrite "execute.inc" so that each Z-Machine instruction was implemented by a separate SUB called from a SELECT/CASE acting as the instruction dispatcher. This should give you familiarity with the code and make it much easier to add the new instructions. It is also a stepping stone towards using CALL for instruction dispatch which in theory will make Z-MIM considerably faster.

Best wishes,

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
markboston36
Regular Member

Joined: 27/10/2020
Location: United States
Posts: 76
Posted: 03:46am 11 Dec 2020
Copy link to clipboard 
Print this post

Hello back from the dead(not really i just discovered ics and it got me back into playing). im willing to help @thwill and you said someone else was also?
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 12:11pm 11 Dec 2020
Copy link to clipboard 
Print this post

  markboston36 said  I'm willing to help @thwill ...


Hi Mark, to be honest I thought you were going to self-start and "do the work" rather than "help" and I was simply going to be on-hand to offer some guidance and answer questions about the existing implementation. If you need more from me than that then I'm afraid that just isn't possible at the moment.

  markboston36 said  ... and you said someone else was also?


I suggested someone else might be interested in following the development I didn't mean to imply that they might contribute.

In general I prefer to discuss my CMM2 projects in "public" on TBS (sorry everyone) as it provides a permanent record and allows others to chip in with ideas that I might not have considered. I also think if we all discussed our projects more it would make for a more vibrant community instead of one that 75% consists of people asking @matherp for something

YMMV

Tom
Edited 2020-12-11 22:54 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4044
Posted: 02:35pm 11 Dec 2020
Copy link to clipboard 
Print this post

  thwill said  In general I prefer to discuss my CMM2 projects in "public" on TBS (sorry everyone) ...


I'm not sorry at all. Very useful is my 2c on it.  Keep up the good work please :)

John
 
markboston36
Regular Member

Joined: 27/10/2020
Location: United States
Posts: 76
Posted: 03:05pm 11 Dec 2020
Copy link to clipboard 
Print this post

thats what i meant by "help". i think this would be a fascinating project to take on.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 03:11pm 11 Dec 2020
Copy link to clipboard 
Print this post

  markboston36 said  thats what i meant by "help". i think this would be a fascinating project to take on.


Great, just a misunderstanding then.

Take a fork from https://github.com/thwill1000/zmim and see how you get on.

Let me know if you have any questions,

Tom
Edited 2020-12-12 01:12 by thwill
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 4311
Posted: 03:45pm 11 Dec 2020
Copy link to clipboard 
Print this post

Note when looking at the existing implementation you want to start from the file "src/main.bas" NOT "zmim.bas".

The former is the "development version" of the code split over multiple .inc files with long identifiers, symbolic constants, comments and an integrated Z-Machine debugger.

The latter is the faster "runtime version" of the code. It is a transpiled from the former squashing everything into a single file, compressing the identifiers, inlining the constants, eliminating the comments (not really necessary on the CMM2) and omitting the debugging code. It is created by running "sptrans" from this repo: https://github.com/thwill1000/sptools on the file "src/zmim_cm2.mbt".

Tom
MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025