A Chip8 Emulator For 68000-based Macs

Among this crowd, it’s safe to say that the original 68000 Macintosh computers need no introduction, but it’s possible some of you aren’t familiar with Chip8. It was an interpreted virtual machine originally created for the COSMAC VIP microcomputer by [Joe Weisbecker] way back in 1977. It enabled coding simple games on the COSMAC VIP without getting into machine code on the VIP’s CDP1802 processor. For the obvious reason of “Why not?” [KenDesigns] decided to put the two together with Chip4Mac68000, a Chip8 emulator for the original Macintosh.

Chip4Mac68000 is not actually a Macintosh program; it doesn’t run in the System Software. Instead, it is a bootdisk that runs bare-metal on the 68000 processor, bypassing Apple’s ROM completely. Doing that is probably more impressive than emulating Chip8 — anyone who wants to get into writing emulators starts with Chip8. That’s not to knock on anyone who goes to the effort of writing an emulator, it’s just that given its origins in a 1970s micro, it’s understandably a very simple system. Not many people do bare-metal coding on this sort of hardware anymore; it’s not like there’s an SDK you can go grab.

Or there wasn’t, anyway, because in order to get this emulator to work, [KenDesigns] wrote a bare-metal SDK for 68000-based Macs. Note that when he says 68000, he does mean 68000 — anything newer than a Macintosh Classic is out. It’s 68000, not 680xx. It was not a trivial endeavour. In the demo video embedded below, you can see his 512k Macintosh in pieces because he’s been poking at it with a logic analyzer to verify the hardware does what he thinks it’s being told.

If you want to try it out, apparently you don’t need real hardware: [KenDesigns] says MAME is accurate enough to make it all work, but miniVmac is not. No word if it would work on the RP2040-based PicoMac; if you try it, let us know how it works out.

This isn’t the first time we’ve seen people writing new software for old Macs of late. If you’re working new magic on very old machines, drop us a line. We’d love to hear about it.

Continue reading “A Chip8 Emulator For 68000-based Macs” →

Retro Computing Coding Competition Still Open

There’s still time to enter Octojam 10, a competition to write a new program for a rather old (and virtual) machine: the CHIP-8. This interpreted language on a virtual machine was used in the 1970s and 1980s to write games that could run on several consoles, such as the COSMAC VIP. Since then, a community of tinkerers has grown up around CHIP-8 and figuring out how to get the most out of the minimal resources the machine gives you.

Continue reading “Retro Computing Coding Competition Still Open” →

Inside CHIP-8

Certain old computers — most frequently those using the RCA 1802 — were fond of using an early form of byte-code interpreter for programs, especially games. The interpreter, CHIP-8, was very simple to create but offered high-level features that were tedious to recreate in the native assembly language. Because there are a fair number of simple games written in CHIP-8, there are of course, emulators for it, and [River Gillis] decided to look inside the CHIP-8 byte code interpreter.

Part of the power of CHIP-8 was it only had 35 virtual instructions. That was important when you were trying to shoehorn a game and the interpreter into a very small memory. Remember, in those days 1K of memory wasn’t an unusual number, although the prototypical CHIP-8 host would have 4K.

Continue reading “Inside CHIP-8” →

Procedurally Generated Retrocomputer Emulators

[Marquis de Geek] has a profound love of old systems. Tired of writing new emulators from scratch for each project, his newest project EMF generates the emulator for him. An XML document describes the layout of the memory, CPU description, and screen handler. The output is currently a single-page Javascript emulator application with an assembly and a dissembler. However, but that backend can easily be swapped to another language such as Rust or C++.

Since EMF is a framework that provides a common way to describe the emulated machine, you get a common emulator user interface for free. There’s a lot of flexibility offered here as well. Opcodes can be implemented as a large switch statement or individual functions, depending on the target language’s performance. Self-modifying code can be detected and handled separately. Custom features or hardware can be injected easily by writing a module in the target language.

While the source code for the EMF hasn’t been released yet, several of the machines that [Marquis de Geek] has built with EMF are open-source on GitHub. So far the list includes Dragon32, Sinclair ZX80, Sinclair ZX81, Sinclair ZX Spectrum, Elliott 903, Chip8, Cosmac VIP, and the MegaProcessor. Each has a live emulator that runs in your browser.

While [Marquis de Geek] hopes to release a binary version of the EMF soon, we’re very much looking forward to the EMF source coming out once the code has been cleaned up. We love the trend towards creating easier and more accessible emulators, such as this Twitter bot that runs Atari programs.

Continue reading “Procedurally Generated Retrocomputer Emulators” →

Reliving 1977’s Cutting-edge Computer With The Pocket Mini Computer

Classic computers are just up [Jeff]’s alley, so when he looked for a new project for his Pocket Mini Computer, he looked at one of the earliest microcomputers available: the COSMAC VIP, a 1.76 MHz beast from 1977.

The COSMAC VIP was a single-board educational computer released by RCA in 1977. Priced at just a hair under $300, the COSMAC was much more affordable than infamous $1300 ‘fruit’ computer also released that year. To get young programmers up and running quickly, the COSMAC came bundled with the CHIP-8 programming language, making it very easy to generate graphics on-screen for all the eventual PONG and Breakout clones.

[Jeff]’s COSMAC VIP runs on a Pocket Mini Computer, a very cool Parallax Propeller-powered board we’ve seen before emulate other retro computers including the venerable Commodore SID synthesizer chip.

Because the COSMAC’s user interface was the very, very old-school 4×4 hexadecimal keypad, [Jeff] found it necessary to emulate this retro feature by soldering his own 4×4 keypad. After soldering 16 buttons into 8 columns and rows, [Jeff] connected this keyboard to a PFC8574a I2C I/O expander and connected this chip to the I2C bus on the Pocket Mini Computer.

The result is an emulated COSMAC VIP that’s just begging for an ‘introduction to microprocessors’ class or just a round of Tetris, Tic-tac-toe, Lunar Lander, or one of the several Breakout clones available for this very cool computer. A pretty awesome build, even if it is from the dawn of the computer age.