Cool, thanks for the video! Also, I'm going to implement the gameplay / levelling up things still, but the music thing kept me busy a bit longer than expected, so here's an interim build and some development news.
So, I got a new MIDI-based gameplay tune from Tim (samoff.com) and started working on creating some tooling to translate it directly to OPL-2 commands. One thing lead to another, and after some unsuccessful tries creating a tune of my own on my MIDI keyboard, I ended up being kinda successful with creating a tune interactively (no real-time playing) using a MIDI editor. So, we now have two songs, the "S" button now toggles between those in game.
As an added bonus, I've received my OPL2LPT this week, so I've added native support for that as well, you get to choose at the beginning (port 0x388 for normal adlib, or the two OPL2LPT options that appear if you have LPT1 and LPT2 on your machine, respectively). I guess that's really the first time I've tested it on a real OPL-2? Looks like the rhythm section things at the intro are a bit off with OPL-2 (works fine with OPL-3), but the music works great with the OPL-2 as well.
And having done that, and learned a lot about the MIDI protocol, I started wondering how easy or hard it would be to add MPU-401 (MIDI) support to it. Turns out not that hard, so I extended my MIDI-to-OPL2 tool to also output raw MIDI commands, and added MPU-401 support to the game as well. It works nicely in DOSBox (which emulates an MPU-401 in UART mode and the backing synth on macOS at least is the General Midi softsynth provided by apple). So General MIDI is now an option.
For MPU-401, I've looked up some Sound Blaster docs, and it says 0x330 is the default and 0x300 is an option. Are there any other weird MPU401-compatible boards that have different ports that I should support?
However, I've tried it on my retro PC, SB16 with a Roland SCB-7 WaveBlaster daughterboard and I didn't sound at all correct. Is there anything I need to send to the WaveBlaster board to make it switch to the general MIDI program list or is there something else I'm doing wrong? Anyway, maybe you have more luck with these options than me (the MIDI stuff works fine with e.g. Windows Media Player + CANYON.MID). So consider the MIDI support experimental.
New build (r24) attached. This is uncompressed, and I haven't really looked into making the binary smaller, so it's a whopping 32 KiB at the moment, roughly 14 KiB of which is just the music data (2 songs in both OPL-2 and MPU-401 format, I could just store one variant and "generate" the other, but this way it's easier with tooling and presumably more efficient at runtime [it just needs to blast those bytes out the right ports]).