Do you like my hacking? If so, please consider leaving something in the
Fediverse (Mastodon etc): @Sprite_tm@social. spritesmods.com
The software consists of two parts: the bit that runs on the AVR and the main synth code running on the GBA.
While the main synth code obviously is the biggest bulk of code, I had the most trouble getting the AVR code to work. While the physical way the serial port works in multiboot is understood quite well and has some really clear implementations, the encryption protocol has some... legacy. Even the clearest implementation I found shows this: The multiboot encryption code which has been implemented by Nintendo, was reverse engineered and implemented in a commercial cable. The software for this cable was then reverse-engineered and implemented in x86 assembly, then rewritten into C, which was then rewritten into Java. Needless to say, it took me a while to get everything right and implemented into the AVR.
The AVR-code is implemented as a bootloader, with the GBA code as the 'main program'. This may seem weird because the main program is ARM-code to be executed by the GBA and completely unusable by the AVR, but it has the advantage that the main code can now update the ARM code over the MIDI port. Basically, this makes it possible to convert a newer version of the synth code to a .mid-file. When you send this file to the MIDI input, the firmware gets updated.
The GBA code that sits in the rest of the AVRs program memory is the actual synthesizer. It is divided in three parts: a routine that receives MIDI bytes from the AVR, an user interface to display on the GBAs LCD, a tiny sequencer and the routines that actually make the noise. The routines export most of the knobs and settings the original GameBoy hardware has to the user interface and MIDI control channels. It also has a polyphonic DDS-based soft-synth, with modifiable waveforms.
Ofcourse I can try and explain every effect and channel in detail, but instead of a wall of text, I'll just drop this little video here. If anything, it proves I'm still about as musical as a slab of concrete, but it illustrates the capabilities of the sequencer.
There are some effects not completely explained, like the quantizer the sequencer has or how the LFOs work, but the UI is fairly self-explanatory and I've included some documentation in the code package.