Creating a MO5 template to stop fighting the build
Lately, I had way too many topics open at the same time.
Way too many 😅
In no particular order, there were:
- continuing my experiments to better understand how graphics mode works on the MO5
- completing the documentation of my RAG server
- modifying that RAG server to simplify keyword management, then redeploying it with the new documentation
- hosting my MCP server
- building a small graphics-mode game on the MO5
And in the middle of all that, a very down-to-earth problem kept coming back:
every new MO5 project made me lose time reconfiguring the build, the tools, and the floppy disk conversions.
That’s how the idea of creating a MO5 project template was born.
Graphics on the MO5… from emulator to real hardware
For my graphics experiments, I naturally started with DCMOTO.
Fast, convenient, perfect for iterating.
But as soon as I wanted to move to a real MO5, an important hardware reality hit me:
- the emulator works with .fd (floppy disk) files
- SDDRIVE expects .sd files on the SD card
Which means you can’t test directly without a conversion step.
The .fd → .sd conversion: the little grain of sand
There is an existing utility (a Windows .exe) to convert .fd files into .sd.
But in my case, it was far from ideal:
- not integrated into the build
- OS-dependent
- yet another manual step
In short, exactly the kind of thing I wanted to automate away.
So I went back to the sources and wrote a Python script responsible for handling the conversion.
Instead of copying it everywhere, I integrated it directly into my MO5 SDK, so there would be a single source of truth.
The template idea
At that point, I thought:
“If I have to redo this for every new project, I’m going to lose my mind.”
What I needed was a template that takes care of all the boring parts.
A base project that:
- automatically fetches Olivier P’s repository to generate
.fdfiles - fetches my MO5 SDK, compiles it, and produces a
.astatic library plus headers - correctly configures the cmoc command line (includes + library)
- compiles the user project
- generates a
.fdfile for emulator testing - generates a
.sdfile to test directly on a real MO5 using SDDRIVE
In other words: I write code, I run make, and it works.
GitHub + templates = ❤️
GitHub offers a simple but perfect feature for this: repository templates.
Exactly what I needed.
Let’s be honest:
- this template is intentionally simple
- it’s basically a Makefile and an example
main.c
But it lays down all the foundations to start a MO5 project without wasting an hour on configuration.
So I created the template and published it on GitHub:
👉 https://github.com/thlg057/mo5_template
How to use it
Nothing fancy.
On GitHub:
- go to the template repository
- click “Use this template”
- create a new repository
- start coding 🎉
Everything else is handled by the Makefile.
What’s next?
This template will become my foundation for:
- continuing my graphics experiments on the MO5
- developing a small game
- testing quickly on both emulator and real hardware
And most importantly:
stop wasting time on the build and focus on the fun.
Enjoy 👋