cybiko:cyemu

Cybiko Emulator

yellowclassic.jpg 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


Click image to Zoom.

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.

It will not execute H8/2246 native code as it only implements a H8/300H cpu core.

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:

  • Obtained the java source code for the RCXSimuator from Meik (thanks)
  • GUI Architecture of original source discarded and a new infrastructure built.
  • Docking infrastructure using dockpanelsuite
  • LCD Panel and Registers - debugged and working.
  • Loading ROM from external file done (binary and Srecord).
  • Ports memory mapped and GUI - cybiko specifics need looking into.
  • SCI logic and GUI
  • 8bit Timer logic and GUI
  • LED indicator mapped onto Port2
  • Memory debugger
  • CPU Class (H8/3000)
  • Debug docking panel monitor
  • GUI for Disassembler and simulation execution (Still need lots of testing :-( )
  • 16bit Timer TPU comparison logic needs to be figured out.
  • A/D Converter periphery not implemented yet.
  • Keyboard interface driver.
  • Software power down / reset.
  • Console interface serial interface
  • Loading a file into arbitary memory space
  • Automatic cybiko ROM load on startup

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.

  • cybiko/cyemu.txt
  • Last modified: 2016/03/21 03:30
  • by brett