The Pinball Machine Reverse Engineering Kit (PMREK) includes source code for a Linux 2.6 kernel module and a user program to control Bally pinball machines manufactured between 1977 and 1985 via memory-mapped I/O.
ECG manages different emulator projects. Each project has cpu information (bits, opcodes, registers, etc.) and memory managment(Description, Mirrors, etc.). Once you have done the CPU and Memory Project, you will be able to cross/generate C/C++ code.