After some prompting and testing by @cjstoddard I’ve updated my MMBasic Z-Machine implementation (Z-MIM) to run on the PicoCalc:
The download includes “minizork” but Z-MIM should be capable of playing all of Infocom’s classic .z3 adventures if you have the files:
ballyhoo.z3 - Ballyhoo
cutthroat.z3 - Cuthroats
enchanter.z3 - Enchanter
hollywood.z3 - Hollywood Hijinx
lgop.z3 - Leather Goddesses of Phobos
lurking.z3 - The Lurking Horror
planetfall.z3 - Planetfall
plundered.z3 - Plundered Hearts
seastalker.z3 - Seastalker
sorcerer.z3 - Sorcerer
spellbrkr.z3 - Spellbreaker
wishbringer.z3 - Wishbringer
infidel.z3 - Infidel
zork1.z3 - Zork: The Great Underground Empire - Part I
zork2.z3 - Zork II: The Wizard of Frobozz
zork3.z3 - Zork III: The Dungeon Master
Note: Z-MIM is not firmware, it is an MMBasic program that runs under the PicoMite firmware (v6.00+).
Caveat: The performance could generously be described as “leisurely”, especially on the Pico 1. Cut it some slack, it is implementing a 16-bit virtual machine in BASIC !
*break is to break into the interactive Z-Machine debugger, you probably don’t need that unless you are planning on writing your own story or extending/fixing Z-MIM.
In a game is there an easy way to exit (maybe saving progress at the same time) ?. Only seems to be *break followed by q ?
In general just type save to save and quit to quit, with no * prefix.
Note the meta-commands *save and *restore are really there for any stories that don’t provide their own save/restore.
*save, *restore… Will these work fine if flipping between different stories ?
save and restore provide 10 independent save slots per story.
Note - if you do *break followed by ‘h’ the output is not properly formatted for the PicoCalc screen hence difficult to read.
Thanks, I’m not sure the PicoCalc is the ideal platform for using the debugger, but I’ll take a look next time I am passing through.
Well that’s looks like a new firmware bug - I speculate that it is no longer correctly handling reading from files that just have line-feed ‘\n’ line-endings.
It’s possible Peter cocked it up in the PicoMite main-line, I’ll try and find time to check tomorrow.
However I also know that @adcockm “fixed” a PicoCalc specific bug with line-endings read from standard input using INPUT … and I can’t help but wonder if that fix broke reading from files ?
Please note I don’t have a PicoCalc so it’s difficult for me to do any debugging specific for that platform.
Yes probably. I just tried deleting the whole folder and copying back to the PicoCalc incase of file corruption… exact same error . A coffee awaits if you can find a way round this !
And this is why I wait two or three revisions between upgrading firmware. I am hoping adcockm finds a nice stable RC of 6.00.02, does his thing with it, then stops trying to chase Peter and settles into a nice leisurely once a month update.
txt$ = "Moses supposes his toeses are "
Cat txt$, "roses; Moses supposes "
Cat txt$, "eroneously, For nobody's "
Cat txt$, "toeses are roses or "
Cat txt$, "posies, As Moses "
Cat txt$, "supposes his toeses "
Cat txt$, "to be."
Open "output.txt" For Output As #1
For i = 1 To 20
' End line with just \n
Print #1, txt$; Chr$(10);
Next
Close #1
Open "output.txt" For Input As #1
Do While Not Eof(#1)
Line Input #1, s$
Print s$
Loop
It should print the rhyme about Moses 20 times, if as I suspect the PicoCalc firmware is broken then you will get a “Line is too long” error from line 16.
I have tested Z-MIM with RC22 of the standard PicoMite (LCD) build (RC20 is no longer available for download) and it works fine so on the balance of probabilities I believe this is a new PicoCalc specific bug.
OK, I’ve poked some more, and I think I’m wrong, that error is not from LINE INPUT, it’s from the new line continuation feature.
Try disabling it with OPTION CONTINUATION LINES OFF and see if the problem persists.
I’m not sure exactly how this caused the specific error you saw (which may be transitory and fixed by RC22), but I do need to make some fixes to Z-MIM because it was using _ as the name of a (dummy) variable in places.
I just picked up that fix from Peter’s mainline changes.
But I see you found the issue with the “_”. I turned off line continuation after trying it, since it already had one bug reported shortly after it was added. And it’s not on by default on PicoCalc though it can be turned on. Personally, i found it an… odd choice to dynamically change source code back and forth in the editor and assume that it wouldn’t break anything, especially when the underscore character presumably had no special meaning before, and could have been used by programs already. And your program is a perfect example. If official changes to the PicoMite code can break existing code so easily, it makes me question the long term stability of it. At least the line continuation is optional and can be turned off.
Both Visual Basic and FreeBASIC use an underscore as a line continuation character, but Peter’s implementation is idiosyncratic, as you say, you wouldn’t expect it to be reformatting the source (but I know why he has to do it).
If official changes to the PicoMite code can break existing code so easily, it makes me question the long term stability of it.
It’s relatively rare but not unheard of, and we are currently in a very prolonged alpha/beta/rc phase.
Since this is my first experience with a “release cycle” of PicoMite, I can only hope that it reaches some kind of stable state. It seems that even though these are RCs and the intention is to get to some final release, random new features keep being added that create more code churn and create new bugs. At this rate there doesn’t seem to be an end in sight, and while that might work for Peter and many PicoMite fans, at some point I’m going to burn out or lose interest, or both. This kind of frenzied development can be impressive, but to have a group of people expecting to rely on the latest bleeding edge release is unusual. And it also seems to require folks to rewrite their code when the system changes out from under them. Maybe that’s part of the reason to try to stay caught up, because required changes to existing programs would be even more drastic from one major release to the next?
In any case, i’m looking forward to a stable release as well!
I hesitated to even try to add the PicoCalc specific keyboard backlight and battery stuff, but that seemed pretty isolated and something people had been interested in.