• Attempting to reverse-engineer Infocom's Z3 interpreter again

    From Steve Nickolas@21:1/5 to All on Mon Jan 10 10:21:33 2022
    This message is in MIME format. The first part should be readable text,
    while the remaining parts are likely unreadable without MIME-aware tools.

    I've gotten quite a bit further this time than I did last time.


    (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

    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. 🤪


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Steve Nickolas@21:1/5 to All on Tue Jan 11 20:55:16 2022
    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_.


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Steve Nickolas@21:1/5 to All on Wed Jan 12 14:07:23 2022
    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.


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)