New project: DRÖM, a DREAM 6800 emulator

Posted:
3 minute read

For this year’s RetroChallenge, I’m going to make an emulator for a 41 year old Australian hobby computer.

This post is part of a series on writing an emulator for the DREAM 6800 computer. Read the DREAM 6800 posts and look at the emulator’s repository.

I’ve been very interested in CHIP-8 lately (researching its history here), which is an interpreted bytecode language invented by Joe Weisbecker for the RCA CDP1802-based COSMAC VIP computer in 1977. I also made a few CHIP-8 “emulators” (interpreters), but as it is an interpreted language running on several different computers, there are many small differences and incompatibilities in the hundreds of CHIP-8 programs that have been created over the decades (and yes, it’s still going strong). Making one emulator that can run all CHIP-8 programs is pretty hard when you don’t know the intricacies of the different platforms.

So for this year’s RetroChallenge I decided to create an emulator for actual CHIP-8 hardware. The COSMAC VIP (and basically all 1802-based computers, including another part of the CHIP-8 pedigree, 1982’s Australian ETI-660) is already well emulated in the Emma 02 emulator. However, one of the earliest CHIP-8 computers is a bit lacking in that department: DREAM 6800.

DREAM system at _Electronics Australia_ office (1979)

The DREAM 6800 was an Australian hobby computer kit detailed in Electronics Australia (or EA, which incidentally is also my daughter’s name) in 1979, designed by Michael J. Bauer. Although it used the Motorola 6800 CPU (ie. the MC6800 MPU), it was heavily inspired by the COSMAC VIP, and came with a CHIP-8 interpreter on EPROM (with the blessing of its creator Joe Weisbecker, according to Bauer), baked into the computer’s monitor (operating system), CHIPOS.

MAME emulates the DREAM 6800, because of course it does. However, I found the experience a bit lacking. First of all, not being too familiar with MAME, it was a struggle to get it to work (not an uncommon experience, I hear). Secondly, the display looks a little wonky. I’m not sure if this is intentional or not, but I guess it’s supposed to look kind of like a bad imitation of a CRT?

DREAM 6800 running in MAME

It seems to be a faithful and accurate emulation, so you can run DREAM 6800 programs on it (conservation is MAME’s main goal), but as a tool it’s not terribly useful. The debug capabilities are OK, but not great. There’s everything you really need; instruction stepping, breakpoints, memory viewer, disassembly, etc. However, these all pop up in different windows that steal focus from the main window. It’s not possible to step without having the debug window in focus, which means that it’s not possible to press a key on the DREAM keypad while stepping. This was mostly cumbersome for me while writing my own emulator, but perhaps not an inconvenience to others…

Probably more annoyingly, the DREAM had a hexidecimal keypad with 16 keys arranged in a 4x4 grid, labeled 0 to F (the hex digits), but MAME maps the actual keyboard keys 0–F to these keys. This makes it easy to operate CHIPOS to input hexadecimal numbers, but virtually impossible to play any CHIP-8 games, where the keys 5, 8, 9 and A would correspond to the “WASD”-like arrow key formation, for example.

So while MAME has an accurate DREAM emulator, it’s not very convenient to use, and not very pretty. Given the lack of other emulators out there, I decided to give it a shot. Because I’m very comfortable in Lua, I figured I’d make the emulator in LÖVE, a Lua game framework, so I christened the project “DRÖM” (“DREAM” in Swedish). To make the UI a bit more cohesive, without lots of pop-up windows, I decided to use dear-imgui.

I will chronicle my trials and tribulations here. There will probably be a few, since it’s my first actual emulator! Stay tuned.

Comments