News for hackers. Stuff that matters.
Re:Z3 – The Zork CPU by captncraig on Monday September 04, 2017 @03:13PM (#15170256)
This is awesome to see. There's been a lot of articles about zork lately, so I started writing my own interpreter, just to see what all the fuss is about. It's a pretty interesting system. I'm currently trying to step/debug through zork too see how they implemented the parsing, game state, and other such things, and it is really quite interesting.

I've considered trying to do a hardware implementation, but concluded it is beyond my skill. Some things like user input can be complicated. It is the interpreter's job to split the input on a program-defined set of delimiters, look up each token in a dictionary provided by the program, and copy a variable number of specified values it finds base on that info into other locations. That's really complicated for a single instruction, and makes it pretty apparent to me that their target from the beginning was interpreters, not any kind of special hardware.

Nevertheless, its an awesome project, and a really fun thought experiment. I'd love to see a physical version of something like this from 74xx chips.

Re:Z3 – The Zork CPU by duskwuff on Monday September 04, 2017 @06:13PM (#15171161)
> I'm currently trying to step/debug through zork too see how they implemented the parsing, game state, and other such things, and it is really quite interesting.

FYI: Allen Garvin has a set of tools to generate annotated disassemblies of many of Infocom's games -- not just Zork I:

https://github.com/allengarvin/reform-conf

Re:Z3 – The Zork CPU by kmill on Monday September 04, 2017 @03:38PM (#15170379)
I believe the hardware version traps to the OS for the aread instruction which then executes a bunch of low-level instructions to do IO and parsing.

You could start by making a CPU that traps to the OS for every single instruction (except for some minimal core), and then incrementally implement hardware versions to speed up execution.