Z-Machine Implemented in Hardware


I thought people here might be interested in this. It’s the V3 Z-Machine implemented in an FPGA so Z-code runs natively without an interpreter. Presumably the first ever implementation in hardware as no one else would be crazy enough to do it :slight_smile: To avoid any suggestion of cheating I purposely didn’t microcode the CPU (if I had it could be argued it’s still an interpreter) so not particularly efficient in terms of number of gates used but still fits on very cheap (<£10) FPGA dev boards.

The virtual machine of course expects some sort of terminal to be present so I implemented this in a BIOS (written using a hack version of Inform with a couple extra opcodes added to allow interaction with a screen). I ended up with 3-4Kb free space in the BIOS so I added a Space Invaders clone as an easter egg too.

There’s a video about it here…


All the source code, information on benchmarks and build notes has been released on to github at…


Hope people like it,



Yep, the first as far as I know.

Someone asked about this topic a few months ago: https://intfiction.org/t/hardware-z-machine/7024/1

BTW: Congratulations, very nice. :slight_smile:

Haha, this is great. I’d never be able to try to do this without you blazing the trail, nice work.


So a real life IF tablet would be completely doable. No one would buy one, but it’s possible.

This is so totally awesome.


1 Like

I would totally buy an IF tablet, but only with a hardware keyboard. Come to think of it, that’s what my cell phone is.

Nice work! Could this thing possibly be implemented with discrete logic chips? See homebrewcpu.org/ for an example of someone using discrete logic to build a general purpose computer about the size of a breadbox.

Watched the video, totally brilliant :slight_smile:

oh boy :laughing: