Over the last month or so, I finally started to look at an idea that had been brewing since my days at Sony.
What it boils down to is this;
One of the goals of emulation is documenting the original systems. C/C++/Java/…etc have all been used in the task of writing of emulators, the documentation of the system is generally a result of the code. However the code often fails to mirror the original hardware, shortcuts are taken, code is optimised etc.
What if, instead of using an existing language, a new one was designed specifically to describe the hardware as close as possible?
That has been the focus of my attention, and the work has already produced some results I have decided to share.
A combination of flex,bison and LLVM are used to create the compiler for the language. LLVM is an astonishing achievement and has greatly reduced the time it would have taken for me to get the compiler off the ground.
The first component I chose to describe was the Intel 8080 processor primarily because the documentation on the processor is so explicit. The next few posts will deal with this processor and how the language helps to describe it.
The 8080 was used in the classic arcade machine Space Invaders, possibly the most emulated arcade machine ever. Needless to say, I have used the emulated 8080 to write a quick and dirty space invaders emulation.