Cross platform Mega Drive / 32X toolchain and Makefile abuse.
Follow the Installation Guide to get started.
Marsdev is split into several targets so you can build just the parts you need. For more information about each of them, read the Target Reference.
The examples
directory contains various skeleton/example projects to base others on.
For more information on each read examples/README.md.
Should be as easy as a make
for any of them.
sudo apt install -y git build-essential texinfo wget openjdk-11-jre
git clone https://github.com/andwn/marsdev && cd marsdev
make m68k-toolchain z80-tools sgdk
- Copy out the
examples/sgdk-skeleton
project and start coding.
SGDK's bundled toolchain only works on Windows, and Gendev only on Linux. The goal originally was to have something I could use on all of the "big 3" platforms, but now with WSL it's a moot point and I only have to worry about the Unix-likes. So here are the main things I am aiming for these days:
- Keep up to date with GCC and SGDK
- Support more hosts than just x86_64
- Make as much of the toolchain optional as possible
The intention of letting users cherry pick targets is to be easy to integrate into other devkits or frameworks, while also being usable on its own.
In theory you would only have to set GENDEV and MARSDEV to the same place, but every project is different.
There are so many of these and they all have different places you have to go to configure paths. In general the only thing you should NEED to do, is point it to the headers.
- GCC Headers:
$(MARSDEV)/m68k-elf/lib/gcc/m68k-elf/$(GCC_VER)/include
- SGDK Headers:
$(MARSDEV)/m68k-elf/include
- Newlib Headers:
$(MARSDEV)/m68k-elf/m68k-elf/include
If your IDE lets you configure what the build/run buttons do, just have it run something like this.
- Build:
make MARSDEV=/path/to/mars
- Run:
/path/to/an/emulator out.bin
MSYS2 might still work, but it's a pain to use and maintain.
GCC is a big boy so we just have to be patient. Alternatively,
- Self-host a mirror for the toolchain
- Checksum for downloaded files
- Fix SGDK skeleton so its Makefile can build Stef's samples
- C++ example
- この文書化を日本語で翻訳する (Reorganize the English first though)
- Include tools necessary for Mega CD and an example project
- Write out some information about the C ABI, and how it changes with -mshort
- Investigate how difficult a Human68k target would be (Xfile binaries, dos.h porting, etc)