4 ms·
It didn't really match the modern definition of emulator. AKA, something that takes raw machine code and implements all the IO capabilities of the target device
by phire 3y ago
It didn't really match the modern definition of emulator. AKA, something that takes raw machine code and implements all the IO capabilities of the target device.
Instead, Paul Allen's emulator worked at the code source level, and was implemented as a macros for the assembler. This wasn't even an 8080 assembler, it was a PDP-10 assembler and they created a bunch of macros to output the proper bytes for 8080 machine code.
For PDP-10 mode, they switched to a different set of macros, that took the same source code but for each 8080 instruction, it generated one or more PDP-10 to replicated the behaviour of 8080. The source code also replaced the IO code with native PDP-10 IO routines. This gives you a PDP-10 binary that you can run as normal.
I'm sure Paul Allen could have written an 8080 machine code interpreter if he wanted to; It's really not that hard to make an emulator of a single CPU with limited IO, especially when the instructions are all documented. But the goal wasn't to emulate other people's 8080 binaries, the goal was to quickly create a programming environment to target the 8080 platform.
- akira2501 3y agoSo.. like.. troff?
- tgv 3y agotroff was a text oriented macro processor, based on roff, and almost certainly didn't run on the PDP-10, because it was written for unix. Roff was based on runoff, which was for IBM hardware. A more likely candidate would have been https://en.wikipedia.org/wiki/MACRO-10 https://en.wikipedia.org/wiki/MACRO-10
- deleted 3y ago[deleted]
- tambourine_man 3y agoMore like a cross compiler, perhaps
- phire 3y agoIt's really not a cross compiler. IMO, the problem that our modern definition of "emulator" is overly opinionated. The strict definition requires that the emulator take the CPU's machine code at runtime and either interpret it, or dynamically recompile it. You could have an xbox emulator that dynamically recompiled x86 to x86 and everyone would agree that's an "emulator". But you make a few minor changes to that dynamic decompiler and turn it into a static decompiler and suddenly people start debating if it's still an emulator. If you go a step further and switch to using the CPU's virtualisation support or even just running the x86 code direction people will really put their foot down and say it's not an emulator. Despite the fact it's still emulating the GPU and Audio DSP and a bunch of other hardware. The CPU is usually one of the simpler parts to emulate, the real complexity is in emulating the rest of the hardware, so I find it really weird that our definition of "emulator" only cares about how the CPU is implemented. If we switch to a slightly less strict definition of "emulator" then there is nothing wrong with Paul Allen's 8080 emulator meeting the definition. It still emulates the behaviour of the 8080 cpu, so it is an emulator.
- tambourine_man 3y agoSure, categorizing stuff is really hard. Almost anything looks like a compiler if you squint at it.
- HeyLaughingBoy 3y ago> I'm sure Paul Allen could have written an 8080 machine code interpreter if he wanted to That's what I was thinking. These guys were pretty bright and an 8080 is not exactly a complex CPU. It wouldn't be a trivial task by any means, but I'm sure he or billg could have pulled it off.
- deleted 3y ago[deleted]
- gumby 3y agoYeah I wrote one when I was in high school (on a PDP-10 running ITS in fact). Don't get me wrong: I doubt it was enough enough to run a BASIC implementation but the 8080 instruction set is so simple that I was able to write a few simple bit-manipulation programs and believe they worked. I'm sure Allen's was much more capable, but it would not have needed to do any of the things expected of a modern emulator (timing, cache, complex addressing modes, interrupts...)