Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Attempting to reverse-engineer Infocom's Z3 interpreter again

84 views
Skip to first unread message

Steve Nickolas

unread,
Jan 10, 2022, 10:21:41 AM1/10/22
to
I've gotten quite a bit further this time than I did last time.

https://6.buric.co/zterp.a65.txt
https://6.buric.co/zterp.lst.txt

(I know there's a disassembly of another version; this one's
machine-readable and is of the latest known version, that's why I'm doing
it.)

The image I disassembled is captured from where execution hits $176B.
I've actually identified a few subroutines and tables (for example there's
some RWTS data tables starting at 0B23, which is a really unusual place to
put them but I think the code is trying to use as little memory as
possible). As I believe I've mentioned, the entire interpreter, including
the IPL, only takes 8K on disk; track $02 is empty (and my Apple ///
compatibility hack exploits this). I know there's disk code in 0900-0AFF
and 0C00-0D2E at least.

My intentions are:

1. If I can sufficiently understand it, I would like to relocate the code
and make a more proper Apple ///-compatible interpreter. (I had to
cripple it on the /// because of the 80-column text memory being located
in 0800-0BFF.)

2. I'm thinking about teaching myself a bit about other 6502-based systems
by porting the code over ;). I know there's a PET interpreter already but
I want to kind-of get my wings by trying to port this one over.

3. I'm thinking of translating the code to 8086 for kicks. 🤪

-uso.

Steve Nickolas

unread,
Jan 11, 2022, 8:55:20 PM1/11/22
to
Replying to myself. I've been periodically updating the documents at the
links in my previous post as I've figured out more things about the code.

I now actually have the jump tables fully parsed out and labelled, but I
haven't figured them out fully to comment them. These entry points are
all labelled starting Z_.

-uso.

Steve Nickolas

unread,
Jan 12, 2022, 2:07:25 PM1/12/22
to
Just in case someone asks why I didn't start from
https://github.com/brouhaha/a2zip

It looks like at some point between interpreters B and E, there was an
overhaul of the code. E, however, does seem to highly resemble M.

I can't seem to figure out some very important parts of how the code
works - like the paging functionality. But I *have* at least fully
commented the dispatch tables.

-uso.
0 new messages