Here is another project I was working on, to bridge the gap from February 2013 until now. I've developed midi replay library for Atari 16/32 bit line of computers for some long time (as one of many side projects), somewhere around 2014 Doug Little (DML) revived his interest in [BadMood engine](http://devilsdoorbell.com), showed some updated versions and opened official site. There were vacancies in music departament, so I've contacted him about adding MIDI music support. There were ports of Doom before on Atari, but midi music was often neglected, so it was great opportunity to change the matter of things.
During integration of MIDI replay with BadMood there were three main problems, midi data load times were too long. Midi formats are maybe good for data exchange, but they have alot of irrelevant data and event parsing during replay wasn't desirable on m68030@16mhz cpu). So, I've made custom binary format called ("NKT') and I've written converter, which took MIDI data extracted from MUS file format (using ID Software original code) and translated it into more suitable form. I've separated midi events and midi data in separate streams and this gave me possibility to load file in one go (two big reads, one for events, one for other data instead of hundreds of smaller one's) without need of additional file parsing, but at expense of memory (,but data could be additionally packed). As my player couldn't use system calls to send midi data (no possibility to use system calls in interrupts) there were some problems with ACIA (sometimes during replay we had hanging notes), which fortunately were fixed. I've also revised the api and I've made minimal version, so everything was just plug and play, added possibility to exchange memory allocation routines to custom ones, so player memory was managed by BadMood engine internal memory allocators. It turned out that using direct hardware approach had other side effect, it helped improve Hatari emulator to better support midi ports 🙂
In the mean time Doug has added MIDI emulation to BM sound engine, so music plays without need of additional MIDI sound modules at cost of cpu time and is mixed with sound effects.
The rest is a history, first version of BadMood with midi support was presented at SillyVenture 2014 demoparty in Gdansk (December 2014) with customised assets and attract mode. Following video demonstrates this version with enabled software MIDI replay (by DML):
Soon after next official updates followed. Here is BadMood 0.32 version. This video, was recorded from real hardware (unaltered Atari Falcon030 with FPU, 14 MiB of RAM) by me. It uses original Doom data and MIDI music is played via external Roland sound module ( CM-500 ). Screen capture isn't very good, because it is grabbed from composite video output, so be warned (it looks best on real RGB monitor):
Recent versions were released which target better cpu’s like mc68040 and mc68060.