On 4/4/07, David Griffith <dgriffi at cs.csubak.edu> wrote:
This sounds like it could be adapted for my purposes.
Some things I'd
want to address:
1) Can you specify which pages to swap? For the Z-machine, one would
want to swap the game data first, then the interpreter (if at all).
This is more targeted towards the VM model for a native Zmachine, but
the philosophy holds, I think... The model that Infocom used was to
not swap the interpreter ever. The interpreters written in assembler
for the 6502 were a few K-bytes. The one that Mike Riley wrote for
the 1802 is also a few K-bytes. By "few", I mean more than 5, less
than 10. The pure (unchanging) game file pages could be overwritten
at any time because it was easier to re-fetch them from known places
on the disk than to track where they might end up if written
dynamically. The "impure" game file storage (variables, stack...)
were read in from the floppy *once* per session, then written out as
the saved game. They were never swapped out during game play (the
performance hit would be *terrible*), though there's nothing in the
architecture that forbids it. The model was to never write to the
game floppy, only to read from it. Games were saved by request, all
at once, by recording all of the changed game pages to a floppy (a
C-64 floppy could hold, IIRC, 4 v3-game saves per 170K, but there's no
guarantee they were using the disk efficiently).
I would think that emulating a processor that's running an interpreter
would make it exceedingly difficult to differentiate memory types used
but the application. This would turn the -8 emulator code into,
essentially, a huge exercise in disk swapping with the side effect of
interpreting PDP-11 code, I'd think.
2) Perhaps this emulator could be stripped down to to
run one particular
program: Frotz compiled for pdp11.
3) Can the emulator be wrapped up with the only binary it will run? The
idea is to have a single Frotz binary for pdp8 to simplify distribution.
I would think that if you were going to try to emulate an -11 on an
-8, you'd want the simplest possible -11 program running under that
environment - Frotz isn't that simple. Megan Gentry has a nicely
working Zmachine written in MACRO-11 for RT-11.
Frotz, owing to its origins in C, is going to have huge amounts of
library overhead.
-ethan