CyEmu is a software environment that models the cybiko.
It does this by simulating the H8 CPU and all the additional perphierals attached to it.
The emulator will be written in C# using The Microsoft .NET Framework version 2.0 and has been developed using Visual Studio 2005.
The only other emulator environment for the cybiko is c4pc but this is closed source and doesn't expose enough of the internal registers of the H8. It does however provide a comparison platform against which to compare this tool.
The project is based upon the java code of Meik Felser's RCXSimulator which emulates the H8 driven environment of the Lego Mindstorm RCX.
Who based his emulator upon the topsySim MIPS R3000 emulator by George Fankhauser of the Swiss Federal Institute of Technology.
Portions of code and ideas also from Gary Linscott's Gameboy Advance Emulator
Portions of code from MAME - The Multiple Arcade Machine Emulator site emulator
21 December 2005 Snapshot
This is an interim release of the project. It's alpha which means that not all the functionality is implemented and what is there may not function as expected.
I'm doing this so the interested can study the programs framework and architecture.
To recompile the source you will need Visual Studio 2005.
Running the binaries will require the .NET 2.0 runtime distribution
The status of the project will flucuate as I make progress - things that I thought where dead and buried often raise their heads later with some strange bug.
I've got it to execute this very simple program:
#define ICC_UCHAR *(volatile unsigned char *) #define P2DR (ICC_UCHAR (0xff61)) /* Port 2 data */ /* * Toggle the GREEN LED bit ON/OFF */ int main() { while(1) { P2DR |= 8; P2DR &= ~8; } }
This is a list of tasks that I need to complete:
Complete rewrite of the disassembler. The engine inherited from Mike Felser's project only handled 16-bit addressing and the corresponding instructions. You can now dissassemble the full gammet of the H8/300 instruction set.
address: bytes operator operand 00008000: 79 07 fb fc mov.w #fbfc, R7
Updated the disassembler gui interface to correctly handle multi byte instructions. The code was based on Gary Linscott's gui interface for his ARM chip but this assumed 2 byte instructions.
Ported the MAME H8/300H cpu core into the project. I am still missing all the H8S/2000 instructions thou, and oddly enough have discovered there are some holes in the H8/300H implementation. But at least its now running in a full 32bit address space.