Kjetil's Information Center: A Blog About My Projects

CP/M-68K and Motorola 68000 Emulator

Earlier this year I started coding on a Motorola 68000 emulator. The original plan was to just add an MMU and do some minor changes to convert it to a Motorola 68010 after the base 68000 work had finished. But I discovered that the 68010 is not that widely supported software wise compared to the later Motorola 68020 which even more advanced. So instead I focused on pure 68000 support and adapted the emulator to run CP/M-68K instead, which I have used before.

Get the first version 0.1 here or check out the GitHub or GitLab repositories.

A custom CP/M BIOS was written that is tied together with the emulator to handle console and RAM disk access. I followed Digital Research's advice and placed the TPA (Transient Program Area) at address 0x400 and the CP/M system and BIOS at the far end of the 24-bit address space at 0xFF0000 which means most programs should work. Only programs with the ".68K" extension are dependent on a specific TPA, while programs with the ".REL" extension are relocatable and should run on all systems.

The console portion of the emulator does not depend on curses unlike many of my other emulators, only regular stdin/stdout is used. Some CP/M programs however may emit terminal control codes which are simply passed through. On the input side LF (Line Feed) is converted to CR (Carriage Return) and DEL (Delete) is converted to BS (Backspace) to improve compatibility.

It is probably most convenient to use cpmtools to manage the RAM disk images used by the emulator, but there are also some custom CP/M commands that can read and write files from/to the host system, similar to YAZE. Additional technical details can be found in the README file included with the source code.

Here is a screenshot of compiling a CBASIC "Hello World" program:

Screenshot of CBASIC68.


And here is a screenshot of compiling the FORTRAN 77 "Heron" program:

Screenshot of FORTRAN77.


Here is also a video showing some more programs being run.

Topic: Open Source, by Kjetil @ 10/10-2025, Article Link