Hi everyone,
I’ve been working on my own Z-Machine interpreter here : [link]https://github.com/zsteve/zebra-zmachine-interpreter[/link].
I have just finished writing the opcode implementations for V3 and fixing bugs, and now I’ve encountered this (very) annoying problem.
Running it on Zork 2 (z3), I get this output :
Zork II: The Wizard of Frobozz
....
Inside the Barrow
.... You can see a faint glow at the far end.
(Fails to indicate the presence of the sword and lamp)
> (I input some text here)
And then the interpreter main loop starts this eternal loop.
Trying Gus’s Death (z3), I get the introduction etc line, and then it enters an eternal loop again, this time without executing a READ instruction.
Can anyone help me out? It might have been caused by an obscure bug hidden deep in the code.
Most code has been tested, EXCEPT for code in zopcode_impl.cpp (ZOpcodeImpl namespace).
Thanks in advance,
Stephen
If you can’t eyeball this sort of problem, you pretty much have to load up the game in two interpreters, single-step, and watch to see where they diverge. Although this is tedious by hand, and I don’t know if any interpreters support automated tracing of that sort.
Hmmm ok. Currently I have been able to get the start-up screen of Zork II to work “byte perfect”. However, entering commands seem to have weird consequences.
I’ll try to compile frotz on linux and then step through.
If anyone is interested in helping, please do!