Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 18:10 20 Apr 2024 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 : Z-MIM the Z-machine Interpreter for Colour Maximite 2

     Page 3 of 3    
Author Message
cosmic frog
Senior Member

Joined: 09/02/2012
Location: United Kingdom
Posts: 278
Posted: 01:59pm 14 Jul 2020
Copy link to clipboard 
Print this post

Hi Tom, thanks, that works great and it's amazing to see Zork running in BASIC on the colour Maximite. It's a pity it's a little slow but still a brilliant achievement.

Have you seen the version for the Arduino? Zorkduino
I built one a few years ago and it runs at a good usable speed.

Thanks for all your help.

Dave.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3831
Posted: 02:34pm 14 Jul 2020
Copy link to clipboard 
Print this post

  cosmic frog said  Hi Tom, thanks, that works great and it's amazing to see Zork running in BASIC on the colour Maximite. It's a pity it's a little slow but still a brilliant achievement.


Thanks Dave.

Judging by the YouTube video I just looked at (https://www.youtube.com/watch?v=-4dWXJrqxUk) the Colour Maximite 2 version is about as fast as the Zorkduino version.

  Quote  Have you seen the version for the Arduino? Zorkduino
I built one a few years ago and it runs at a good usable speed.


I didn't see it until I was near the end of my current effort.

It looks like they've implemented support for z4 and .z5 stories and also put more effort into its appearance with a graphic intro and a proper implementation of the status bar - something I planned to do, but haven't had the time.

Of course they are also running the Z-machine as firmware whereas Z-MIM is interpreted BASIC. If I were to do the same for Z-MIM then I assume that:

(a) the performance would greatly exceed that of Zorkduino (I believe the 'mites are more powerful)
(b) no one would play it because it requires them to re-flash their 'mite

Best wishes,

Tom
Edited 2020-07-15 00:48 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1592
Posted: 08:44am 20 Aug 2020
Copy link to clipboard 
Print this post

Hi Tom,

I was going to try Z-MIN on the mono Maximite but I had a peep at the program and found a problem right away:

  Quote  ' Autogenerated on 11-07-2020 21:20:15

If Mm.Device$<>"Colour Maximite"Then
Option Explicit On
Option Default Integer
EndIf

MM.DEVICE$ will return "Maximite" for the mono Maximite. I expect that commenting out those four lines is all that is needed. Might try it tomorrow if I get the time.

Bill
Keep safe. Live long and prosper.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3831
Posted: 09:40am 20 Aug 2020
Copy link to clipboard 
Print this post

  Turbo46 said  Hi Tom,

I was going to try Z-MIN on the mono Maximite but I had a peep at the program and found a problem right away ... MM.DEVICE$ will return "Maximite" for the mono Maximite. I expect that commenting out those four lines is all that is needed. Might try it tomorrow if I get the time.

Bill


Well caught Bill, that shouldn't really be there in "zmim_cm1.bas", or it should be modified to cover the Mono Maximite as well.

Commenting out those lines is hopefully all that is needed. Let me know how it goes, I suspect it will be excruciatingly slow, just as is it is on the CMM1.

Best wishes,

Tom
Edited 2020-08-20 21:53 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Jamesk
Newbie

Joined: 04/08/2020
Location: United States
Posts: 3
Posted: 09:43pm 20 Aug 2020
Copy link to clipboard 
Print this post

Tom, thanks for putting this interpreter together. Amazing to see it being done in basic. I think every "retro" platform needs to have a Z-machine interpreter implemented on it. It's a right of passage. But this is even more special because we can take a peek behind the curtain and see how the system works.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3831
Posted: 10:01pm 20 Aug 2020
Copy link to clipboard 
Print this post

  Jamesk said  Tom, thanks for putting this interpreter together. Amazing to see it being done in basic. I think every "retro" platform needs to have a Z-machine interpreter implemented on it. It's a right of passage. But this is even more special because we can take a peek behind the curtain and see how the system works.


Thanks for the kind words James.

It may interest you that if you run the unoptimised version:
RUN "/zmim/src/main.bas"

then once you've started a story:

- Type '*break' to enter the Z-machine interactive debugger
       - read-only, it doesn't have functionality to change the state of the Z-machine.
- Type 'h' at the 'DEBUG >> prompt' for get a list of the options available.
- Uncomment lines 131-135 of "main.bas" if you want to break into the debugger immediately the story starts executing.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1592
Posted: 07:37am 21 Aug 2020
Copy link to clipboard 
Print this post

Hi Tom,

I commented out those 4 lines and tried ZMIM in the original mono Maximite and ran the file ZMIM_CM1 and got:

  Quote  [777] Open f$ for input as #1
Error: cannot find or create directory

I replaced line 777 with:
  Quote  print f$ : end

and, when run again, it printed:
  Quote  \zmim\resources\titl_cm1.txt

Considering the manual says:
  Quote  File names must be in 8.3 format prefixed with an optional drive prefix A: or B: (the same as DOS or Windows). Long file names and directories are not supported. The default drive is B: and this can be changed with the DRIVE command.

I'm surprised that it works on the CM1?
The FILES command on the mono Maximite reports the resources directory as:
  Quote  <DIR> RESOUR~1

As does the FILES command on the CM1.

Go figure???

Bill
Keep safe. Live long and prosper.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3831
Posted: 08:24am 21 Aug 2020
Copy link to clipboard 
Print this post

Hi Bill,

It's a repetition of the same issue as before, see lines 1224-1228:

If Mm.Device$="Colour Maximite"Then
ss$(1)=ss$(0)+"\resour~1"
Else
ss$(1)=ss$(0)+"\resources"
EndIf


I seem to recall you don't need the A:\ or B:\ on the CM1, if you just use \ then it uses the current default drive as returned by Mm.Drive$, probably the same on the MonoMaximite.

Regards,

Tom
Edited 2020-08-21 18:25 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1592
Posted: 09:28am 21 Aug 2020
Copy link to clipboard 
Print this post

Thanks,
I changed line 1224 to:
  Quote  If Mm.Device$="Colour Maximite" OR MM.Device$="Maximite" Then

and it worked! Well in started the tutorial OK. About the same speed as the CM1.

Bill
Keep safe. Live long and prosper.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3831
Posted: 09:30am 21 Aug 2020
Copy link to clipboard 
Print this post

Thanks for letting me know Bill, I've taken some notes to fix these issues when I next have some time to work on it.

Do you have, are you getting a CMM2 ?

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1592
Posted: 09:42am 21 Aug 2020
Copy link to clipboard 
Print this post

Yes I do. All the Maximites and a few of the other mite variaties.

Bill
Keep safe. Live long and prosper.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3831
Posted: 09:56am 21 Aug 2020
Copy link to clipboard 
Print this post

  Turbo46 said  Yes I do. All the Maximites and a few of the other mite varieties.


OK, just being nostalgic, or community spirited I appreciate it either way.

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1592
Posted: 09:13pm 21 Aug 2020
Copy link to clipboard 
Print this post

Please pardon me if I'm being blindingly obvious, but would just be simpler to just "autogenerate" a separate version for the "Maximite" rather than cater for the "Colour Maximite" and the "Maximite" in a single version?

Having said that, if the version is generated specifically for the CM1, why is the testing of MM.Device$ even necessary? I'm guessing it's part of a larger plan to perhaps cater for other devices.

Bill
Keep safe. Live long and prosper.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3831
Posted: 09:49pm 21 Aug 2020
Copy link to clipboard 
Print this post

Hi Bill,

This check is so that for testing purposes I can run the CM1 version on the CM2 ... it obviously needs some work

With the benefit of experience what might make more sense is to check whether we are running on the CM2 instead of checking whether we are running on the CM1.

Here's a question you might be able to answer, does a Micromite have a file-system ... I should probably report an error if Z-MIM finds itself installed on one.

Regards,

Tom
Edited 2020-08-22 07:49 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1592
Posted: 10:20pm 21 Aug 2020
Copy link to clipboard 
Print this post

The basic   Micromite MKII doesn't have a file system but the Micromite plus does. I would expect that the Micromite Extreme and other creations of Peter's do also but I have not used them.

Hmm, I expect that ZMIM would come close to working on one of those with output to the console rather than the LCD.

Bill
Keep safe. Live long and prosper.
 
     Page 3 of 3    
Print this page


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

© JAQ Software 2024