/m68k-gcc

Homebrew megadrive/genesis framework buildable on *nix/mac, ARM64, etc

Primary LanguageC

New: Mega EverDrive Pro tool

If you have USB, the tools/everpi tool should allow you to load and launch
a compiled local .rom file directly to your Genesis/Megaddrive.
tools/everpi rom path/to/rom.bin
tools/everpi memread|memset|memset16|memset32 can be run from the MEDP
interrupt menu while the game is running.

Be sure you are on a brand new install of Raspbian if you can, fully updated.
The tool has been tested on Ubuntu 21 64-bit as well.
Due to changes in the way macOS handles serial connections, it will NOT work on newer macs.
If you are having issues accessing the port, ensure that your user has dialout group priveleges:
sudo usermod -a -G dialout $USER

If you want to build the GCC compiler yourself:


On linux, you can try to build using this repo by kentosama:
https://github.com/kentosama/m68k-elf-gcc
Or you might have better luck using this guide:
https://darkdust.net/writings/megadrive/crosscompiler
For MacOS try to build with Retro68:
https://github.com/autc04/Retro68
You may have to download and build the Bison extension from source

It installs to '/usr/local/bison'

I had to change line 24 of Rez/CMakeLists.txt to this and clean/redo the build:

set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} "/usr/local/bison/bin")


Using a standard GCC build from source, you should be able to compile targeting m68k using the following:

./configure --disable-mcs51-port \
--disable-r2k-port \
--disable-r2ka-port \
--disable-r3ka-port \
--disable-tlcs90-port \
--disable-ds390-port \
--disable-ds400-port \
--disable-pic14-port \
--disable-pic16-port \
--disable-hc08-port \
--disable-s08-port \
--disable-pdk13-port \
--disable-pdk14-port \
--disable-pdk15-port \
--enable-pdk16-port

Good luck and feel free to open issues with questions.

If you a lazybones:

These are slightly out-of-date. I currently use GCC 9.3 built on both Raspberry Pi and Apple Silicon.

-nostdlib for these builds is a required CFLAG or building will fail

6.3.0 (GCC) binary for RPi-arm71:


In /tools is an RPi-arm71 build of DGen with debugger on (tilde key).
You can also build it yourself using `install-dgen-dev.sh`.

9.1.0 (GCC) binary for MacOS x86_64


By default, `make` will create `out.md` in the root folder.