Generic Emulators
Barebone emulator, or “generic emulator”, is a customizable emulator of CPU + memory + serial terminal. You can configure it by simple config file. Let’s long story short…
First of all, prepare a config file, e.g. “mycomputer.emu”. Extension “.emu” is mandatory. File should contain this:
Format is really simple: Each line contains one directive. Lines with “;” at the same beginning are comments. Here are parameters:
Two serial ports are available – 6850 is the standard ACIA circuit, “simple” is a generic serial port with no complicated functions, just read and send bytes.
How to use it? It’s simple, just tell which emulator should use by the “.engine” directive (without “.emu”), like this:
It’s a simple “hello” program, using the above configuration. Just save it as “test.z80” and click to “Emulate (F10)”. It should compile and run emulator with given configuration.
For 6502-based computer you can use this config file (e.g.”my6502.emu”):
Please notice the “serial.map” directive. It means that serial port is not mapped into “I/O” space (like Z80/8080 does), but into memory space. Serial.data and serial.control are addresses now.
6502 requires RAM in a bottom part of address space, ROM at the top.
Try this code:
Other processors and peripherals are on its way…
Last updated