![]() |
Forum Index : Microcontroller and PC projects : CMM2: Extending Z-MIM
Author | Message | ||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
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.) 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 StatesPosts: 76 |
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 KingdomPosts: 4311 |
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. 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 KingdomPosts: 4044 |
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 StatesPosts: 76 |
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 KingdomPosts: 4311 |
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 KingdomPosts: 4311 |
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 |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |