I visited Revision again this year. And I took my IBM PC/XT 5160 with me. And I made a quick release. That release was a plan that I’ve had for a while, and which I mentioned in my previous blogpost: a music disk for the IBM Music Feature Card.
And here is the pouet.net page. You could download the binaries, but not many people will have the required hardware, I guess. And it will also break many emulators, because IBM Music Feature Card support is not a common feature in emulators (yet). I made sure that the code runs on my DOSBox pre-release with IMFC support, and AMAME, as described in my previous blogpost.
Code was done by me, graphics by VileR of 8088 MPH fame, and the music was done by UP-C.
If you look closely, the graphics aren’t just rips of the original Sega title screens, but they are an impression that combine the title/logo with some in-game view. All this in colourful composite CGA of course.
Likewise, the music is not a straight rip, but is tuned specifically for the IBM Music Feature Card/Yamaha FB-01 with custom SysEx messages embedded in the MIDI data.
The minimum requirements are: IBM PC or compatible, 8088 CPU at 4.77 MHz, 128kb memory, composite CGA, IBM Music Feature Card, 360kb 5.25″ floppy drive, PC-DOS 2.0.
The code is reasonably straightforward. The MIDI player is based on my pre-processed data format, combined with my streaming disk routine. Why the streaming disk routine, you might ask? Well, I originally developed that for the PCjr MIDI player for the DreamBlaster S2P. The problem with MIDI data is that it has no structure. It is just a linear sequence of note data and delays. So when a part of a song is repeated multiple times, the data is duplicated. The PCjr only has 128k of memory, which is shared with video memory, and your average MIDI file will be too large to fit in memory entirely.
Since that code was already done, and it worked well, even from floppy, I figured I could just replace the code for the DreamBlaster S2P with IMFC code and use the rest as-is. That way, this music disk will run even on PCs with low memory.
In the future I might experiment with data compression. I have tried Trixter’s LZ4 code on some MIDI data, and it compresses really well. For example, the Hang-On song is about 112k, but compresses down to less than 7k. That might be very interesting, especially for PCjr, since it lacks the DMA controller to load from floppy in the background.
There is not too much to tell, other than that. Perhaps that the interrupt controller uses Auto-EOI mode, as discussed earlier. And there’s two cute tricks for the graphics. The first is that I am using a cute trick that is possible in CGA composite mode 6: fade in/out. I had already used that in the sprite part of 8088 MPH. Namely, by adjusting the background colour, you can affect the luminance, so I get 4 levels of luminance to fade the screen. The second trick is made possible because of this: I start with the screen faded to black. Then I load the graphics directly from disk into CGA memory. And then I fade in. This way I do not need any graphics data in system memory at all, which again is very nice for low-memory configurations.
That’s about it for now, hope you liked it!