andlabs Blog Code Music Writings Résumé About

Sega Mega Drive/Genesis undumped software: Wonder MIDI

2023-12-03 13:29:17 -0500 EST Sega Mega Drive/Genesis Sega Mega CD/Sega CD Software Dumps

Okay, this took a little longer than a day, because of some last-minute research finds.

The Mega Drive still has a handful of licensed software releases that remain undumped, and today I'll be filling one of those holes: Wonder MIDI, developed (according to the back of the box and a message in the ROM) by Game Arts (of Lunar and Grandia fame) and published by Victor (the company known outside Japan as JVC) in Japan sometime in 1992 exclusively for the Wondermega.

Title screen

The Wondermega was a Mega Drive/Mega CD combo unit developed as part of a partnership between Sega and Victor and introduced in 1992 in Japan. It was explicitly aimed at the high end of the home entertainment market — rather than simply being a video game console, the Wondermega was meant to be an all-inclusive home entertainment package, with specialty features to take advantage of the wonders of the data-based CD. Or at least that's likely how it was envisioned; in the early 1990s a lot of companies were producing devices with a similar vision, with people using CDs not just for playing music and conventional video games, but also for watching video, playing video games built around video clips, doing general reference, and other ideas thought up by C-suite suits and marketing guys but that ultimately were rejected by the general public, who preferred to use computers for those things instead.

It did not help that the Wondermega was absurdly expensive (reflecting its position at the high end of the market) — while the Mega Drive was introduced at a cost of ¥21,000 (in October 1988) and the Mega CD at ¥49,800 (in December 1991), the Wondermega was introduced at a cost of ¥79,800 (in April 1992). Victor even produced their own branded version of the Wondermega that was identical to Sega's, and sold it at the even higher price of ¥82,800! In 1993, some of the extra features were removed and the exterior casing was redesigned; this version, the Wondermega M2, was sold exclusively by Victor for the much more reasonable by comparison ¥59,800 (though still much more expensive than the ¥12,800 Mega Drive 2 and ¥29,800 Mega CD 2 around the same time), and was eventually brought to the US as the JVC X'Eye. (These higher prices do make slightly more sense in the context of the Wondermega as hi-fi equipment sold at hi-fi stores instead of a video game system sold at video game stores, but only slightly more sense.)

One extra hardware feature exclusive to the original model Wondermega is an extra port on the side which provides MIDI Out. Yes, only MIDI Out — you unfortunately won't be able to use a Wondermega to control the Mega Drive/Mega CD's sound chips. What you can do, and what Wonder MIDI is designed to let you do, is connect a dedicated MIDI synthesizer to the Wondermega and have the Wondermega send MIDI data to it. And that MIDI data would come on CD.

Yes, there was a serious attempt at using CDs to distribute MIDI data in the early 1990s. This did not pan out at all, which further adds to Wonder MIDI's rarity. This system stores the MIDI data in the subcode channels of an audio CD, just like how the graphics data on a CD+G is stored. This means that these MIDI CDs are standard Red Book audio CDs that also have extra MIDI data on them, with the audio presumably being a recording of the song in question. This effort was originally introduced by NEC in partnership with Rittor Music, a Japanese publisher primarily known for a series of music magazines, and was billed as "MIDIworld". After making some dedicated hardware units (using the same modular CD drive as the original PC Engine CD-ROM²), NEC seemed to have dropped out, leaving Rittor Music to continue to promote MIDIworld on their own, which is where Wonder MIDI comes in.

Wonder MIDI seems to have been specifically built for MIDIworld. On the rear of the box, the software is explicitly billed as a decoder for MIDIworld discs. It's one of the first things discussed in the manual, and the manual talks about MIDIworld a lot. The ROM header even calls the software "MIDI World". There was apparently also a MIDIworld sampler disc made specifically for Wonder MIDI, called "Wonder MIDI Collection", however it appears to have been sold separately, and may be even rarer than the software itself at this point.

Information on the Internet about MIDIworld is particularly sparse. This forum post by longtime Sega Retro contributor Pirate Dragon contains print advertisements for Wonder MIDI, which helps to show off some of the things Wonder MIDI can do (which is important, as this post will be light on those details for reasons we'll get to later). (It also is where the picture of the NEC unit I linked above comes from.) I found a few expired listings on Yahoo Japan Auctions, Mercari, and other Japanese storefronts, mostly for various MIDIworld discs (or entire sets of discs); one was for similar MIDIworld player software for the FM TOWNS computer (called "MIDIworld TOWNS"). None of the MIDIworld discs are on either Discogs or the Internet Archive. (It also doesn't help that "MIDI World" is a very generic name; it's now more known as the name of an entirely unrelated website where you can download MIDI files.) There's also this blog post about a different manufacturer's MIDI-enabled CDs that seems to be similar to MIDIworld, but the description seems somewhat different — there's a standard Track 1 data track (in addition to a floppy disk?) and the MIDI seems to be on entirely separate tracks, it implies CD+G players came with MIDI ports, and there's no mention of MIDIworld. It'd be worth exploring if these discs are compatible with Wonder MIDI.

By luck, there does happen to be one CD on the Internet Archive that does claim compatibility with Wonder MIDI. "NIFTY-Serve MIDI Forum Original Music Vol. 1" appears to be an independently released compilation of recordings by the MIDI community that was on NIFTY-Serve, a pre-web online service in Japan that offered things like chat rooms (its parent company, Nifty, still provides other Internet services today). It came out (according to its cover) in 1992, and its booklet indicates that it supports the Wondermega software (they don't call it Wonder MIDI); it also incorrectly credits Victor for the technology and also incorrectly claims that Wonder MIDI is the only player that supports it. However, I won't be able to actually test it myself, because I ran into issues getting Wonder MIDI to run in any of the three open-source emulators that have a chance at running it, and another issue prevents the one emulator that could get far enough to read a CD has something else preventing me from doing so.

I could, however, get the software to boot to its title screen animation in one emulator, which is where the screenshots on this page come from. And it turns out this is enough to test Wonder MIDI's MIDI capabilities: the title screen theme is actually MIDI and played through the MIDI port! From looking at the ROM, there appears to be several MIDI sequences built into Wonder MIDI, but I have not tried figuring out how to extract them. (I also won't be providing a sample of that MIDI from the emulation, for reasons described below.)

Knowing that, what does Wonder MIDI do? The manual shows the main menu has four options: "MIDI Mixer", "Session", "Setting", and "BGV". MIDI Mixer is the main CD player interface. It has a lot of functionality, including the ability to control the volume levels of all 16 MIDI channels, the ability to enable or disable General MIDI support, transposing notes up and down, changing the tempo, and other things. Session mode gives you a music training course of some sort, a metronome, and an on-screen virtual band; I assume these tie into the built-in MIDI sequences somehow, but I'm not sure. Setting just lets you set some global settings. BGV is another CD player that shows animations the manual calls "relaxing"; the sole screenshot on the box (of a night scene with a crescent moon) comes from this mode (the screenshot is also in the manual). Sorry for the vague descriptions — I don't know Japanese, and this manual is 28 pages of dense information; someone will need to translate it.

Before we talk about emulation, I should emphasize that Wonder MIDI is a cartridge. Cartridges can use the Mega CD hardware, but cartridges are responsible for initializing the Mega CD and decompressing the normally-compressed BIOS routines into memory on their own. Two other licensed cartridge programs were released in the Mega CD's lifetime, and both have already had their ROMs dumped ages ago, so several Mega Drive emulators support this setup as well. Wonder Library is a program that turns a Wondermega into a reader for the EBXA ebook format (best known for their use by Sony's Data Discman range of portable reference machines); it, Wonder MIDI, and a demo disc called Wondermega Collection that came with every Wondermega are the only three pieces of Wondermega-specific software (though it may be possible to use Wonder Library on a Mega CD 2; I've wanted to investigate that for a while and it may be a future blog post). Flux is a music visualizer released in Europe much later in the Mega CD's lifetime, and is meant to be used with audio CDs.

Okay, let's talk about emulation. The MIDI functionality is provided by the Wondermega BIOS through special BIOS subroutines reserved specifically for it. The MIDI port is accessible by the 68000 on the Mega CD side (the "sub CPU"). Judging solely from emulator logs of accesses to the I/O ports on the sub CPU, the byte at address $FDFFFD will have bit 7 set to 0 when a single byte of MIDI data can be written, and that byte is written to address $FDFFFF. The specific hardware requirements (such as timings and other stuff) aren't known, but we won't need that for just getting the game to boot. The three emulators I tried are BlastEm, ares, and MAME, and they all fail to make Wonder MIDI functional even if the most basic possible implementation of these MIDI ports are added, all for entirely different reasons.

BlastEm is the only one of the three that Wonder MIDI will actually boot on, since it fully supports other cartridges that require a Mega CD. In addition to adding the MIDI port code to the emulator (which as of writing means modifying laseractive_read8() and laseractive_write8() in segacd.c), a C needs to be added to the ROM itself at location $191 in order to signal to BlastEm that this is a cartridge that requires the Mega CD. And by adding some extremely rudimentary MIDI output code, I'm able to listen to an incorrectly timed version of what that title screen theme is supposed to sound like. However, the timing is still incorrect enough that I don't feel comfortable sharing a sample here lest it become representative of how Wonder MIDI is supposed to sound, and my use of ALSA's raw MIDI output for testing this slows down the emulator significantly. It will even get past the title screen shown above and play its full title animation, which shows the character Wonder Dog (a mascot for the Wondermega and the star of his own Mega CD game) as an orchestra conductor.

Wonder Dog from the title screen animation

However, after that animation finishes, it tries to open the Mega CD's disc tray, demanding that you insert a disc. It doesn't show any message on screen telling you that it's waiting for a disc; it just silently opens the disc tray. BlastEm doesn't support the CD controller call to open the disc tray, so the sub CPU will lock up, waiting for the tray to open forever. I tried to do an as-minimal-as-possible implementation of this call, and also a simulated closing of the disc tray, but Wonder MIDI just opened the disc tray again.

So could we not just preload the disc image of that Nifty CD from above so that it doesn't have to open the disc tray? The raw disc dump of that is provided in the format produced by CloneCD, which consists of a CCD file, an IMG file, and a SUB file; this last file contains the subcode data. Unfortunately, BlastEm only supports CD dumps in either ISO format (which has no support for subcodes, or even Red Book audio for that matter) or as a pair of BIN and CUE files. And while some code in BlastEm's cdimage.c (in parse_toc()) suggests that if the CUE sheet is formatted properly that a BIN file containing "raw" subcode information can be read and used, there is currently no free and open-source tool that can convert from CCD/IMG/SUB to BIN/CUE. There is an ancient GNU Project program called ccd2cue that can convert just the CCD file into just the CUE file, and for discs without subcode data simply renaming the IMG to BIN would suffice, but we need that subcode data since it has the MIDI data!

CD format conversion is actually a serious problem in general; the tools, if they do exist, are extremely sparse or fully proprietary, and as more accurate CD rips become more common, emulation and open-source disc image mounting or manipulation will only become a bigger problem over time. I don't have the resources to fix this myself, unfortunately. I will have to start worrying about that soon, since I have a bunch of unusual CDs in nonstandard formats to rip...

ares for some reason would not boot the ROM far enough to even start touching the MIDI port. The C byte change does seem to be necessary, and it does ask for a CD image to mount alongside the ROM (I haven't checked if it supports CloneCD), but the code, which I added to MCD::read() in ares/md/mcd/bus-internal.cpp, never seems to get called, even if I set up the Wondermega BIOS and force the system region to Japan. My attempts at hooking gdb up to figure out what it's doing also failed (gdb never connected to ares).

MAME wouldn't even let me load the ROM at all. While MAME's Mega CD emulation is currently marked as "not working", the Mega Drive parts are fairly complete, and I decided to see how far I could get with it with as little of the Mega CD part as possible (especially since it will boot to the BIOS without a disc image). However, MAME treats all Mega CDs as dedicated consoles which only have a CD drive. Since the code for these consoles derive from the base class that the Mega Drives use, I tried to set all the cartridge slot-related fields to valid values, but MAME's media manager refused to recognize the cartridge slot, only giving me a CD drive to put media into, and I don't understand enough of MAME's internals to figure out why, since it seems like it should just automatically pick up the cartridge slot. Getting rid of the CD drive just caused MAME to complain that a required device was missing, and changing device requirements didn't help (though I forget what settings I tried). It appears MAME doesn't support CloneCD images anyway, and not only does it not support opening the disc tray, it's actually programmed to abort the emulator with a fatal error if a game tries.

Now that the ROM is released, we can get to a point where all these emulators (and more?) can support Wonder MIDI, but I likely won't be updating this post when that happens.

This dump was done with the INLretro dumper, just like the Crying Dragon prototype. All the components are soldered to the board, so a direct dump of the ROM chip won't happen right now. I also have the case and manual; these were scanned with an Epson Perfection V39 in color at 1200dpi.

PCB front PCB back

Oh yeah, there's a RAM battery and an 8KB SRAM chip. This genuinely surprised me when I opened this cartridge. I was not expecting Wonder MIDI to save anything, and even if it did, I would have expected it to use the built-in backup memory of the Wondermega itself instead of providing its own. Unfortunately the battery has long since died and the INLretro dumper produced only $FF bytes when I tried dumping the SRAM area, so there's no SRAM dump included here.

Cartridge front Cartridge top

I also wanted to scan the cartridge label. On my copy it was already starting to peel off, so I tried to finish the job. Unfortunately I didn't try loosening the adhesive first and a tiny bit of the printing came off the glossy top layer. It's barely noticeable (near the top left of the treble clef art) and is still on the adhesive (so it looks correct with the label pressed back against the cart), but I decided not to press my luck further and settled for photos. Lessons learned the hard way, I guess. I'll need to figure out how to safely remove labels in the future; I have some other undumped Mega Drive cartridges with stickers covering the screw holes. On that note, my cart's back is just a standard Sega shell and I haven't included a picture here. I've seen another copy of Wonder MIDI for sale whose listing included a picture of the back of the cart and it has a standard Sega of Japan safety sticker on the back that's missing on mine, including the adhesive. I'm guessing a previous owner discarded the sticker and cleaned the rear of the cartridge.

With the photos out of the way, we can get to the scans, and then wrap this long post up. The manual scan should be fine as-is, but there's additional damage to the cover that was already there when I bought it. The cover insert feels like it was printed on very cheap paper and has noticeable warping. It was folded in on itself on the front near the spine; this crease is noticeable on the scan. A previous owner applied a large blob of white-out to a part of the rear above the UPC code. The listing for that other copy of Wonder MIDI I mentioned in the last paragraph also included a picture of the back cover, and that one shows that the white-out isn't covering anything — it's just the black background of the cover — but it does come extremely close to a diagram of the full Wonder MIDI setup immediately above it. Finally, the spine appears to be somewhat sun-faded, especially on the Wonder MIDI logo. I'm providing a scan of it for completeness, but I probably wouldn't use it as a sterling example.

All right, I think that's everything to say about this. Enjoy!

Wonder MIDI ROM
Size: 524288 bytes
CRC32: dc466543
MD5: b4fcbed3c08f1eeacd808e2394979e92
SHA1: 54ee39f92aad2863eb9a40523155324b8c6e5edd
SHA256: 230e73b5937051fe33541b9f2a6693490c5d851a58dede2dd363892a0335ae8e

Wonder MIDI Manual (PDF)
Size: 276637949 bytes
CRC32: 2599509a
MD5: 274af20874da045c63a26717f14cee9f
SHA1: 467a8e18d8107e16bdb3d70e0e8d66e792a59e0e
SHA256: f0f7344e190bdb8db7e681e7def3474e3f489a9dd8f4f3b76ab2f04f3084b0ac

Wonder MIDI Cover Insert (PDF) (note the warning above)
Size: 54159313 bytes
CRC32: 616edd81
MD5: df99645d10a2a54a37c7c831a464d6c0
SHA1: 6ee57caae7ff86fa2f85f3d15c45e079cec0ef80
SHA256: 7c3388266fe2f7d4218f3856ffded6efadec37d6c41c9410e60827745c2b26f0

Internet Archive mirror.

Thanks to Sik for assistance.