First post, by baku-chan
I mean, seriously... alright, not really quite that seriously. But it's something that's always nagged at me upon falling into the XG MIDI rabbit hole and then hearing about how the Dreamcast apparently has XG MIDI support and how that's so awesome, right? Gushing over SEGA sound hardware has always been something of a trend, really, and there's nothing necessarily wrong with that because, really, most of it actually is pretty damn awesome. With that said, exaggerations do exist, which often get in the way of determining what these sound chips are truly capable of, whether that be for better or for worse. And, more to the point here: I have yet to find any actual documentation about how XG MIDI support works on the Dreamcast, or indeed any confirmation that it ever did support XG MIDI in the first place besides secondary sources such as Sega Retro and the like (versus, say, SEGA or Yamaha themselves).
According to everything that I've heard from those familiar with Dreamcast hardware — think emulator developers specifically — its AICA sound chip is architecturally almost identical to its predecessor in the Saturn called the SCSP. The former is basically a direct hardware superset of the latter; as in, fundamentals like the ADSR envelope engine and the DSP are all but the same between the two (to the point where code is often shared between SCSP and AICA emulators, such as with the Highly Theoretical plug-in for foobar2000). As to how that's relevant to the subject at hand, the SCSP — which, again, AICA is in all likelihood a direct hardware superset of — was finalized in late 1993 if available SEGA documents are to be believed. Whereas the first commercial XG product from Yamaha was the MU80, and that was released in 1994. Which means that — unless Yamaha designed the SCSP with the then-nascent XG specification in mind and then proceeded to tell no one about it — one can't help but beg the question: if AICA is architecturally an SCSP, then how, exactly, can AICA be compatible with XG? I mean, it's not as if one can reasonably say that Yamaha was lying about the Dreamcast having XG support (again, if they did in fact ever say that) or anything like that, but... just how!? Is there something that I'm missing here? It's just that I'd imagine that the inner playback engines of the SCSP — and thus by extension AICA — would be completely different from whatever solution Yamaha used for their XG hardware given how they were almost certainly developed independently, and in that case, well...
Meanwhile, there's also the matter how XG — in most of the ways that it was used by Yamaha, at least — is rather fundamentally different from how video game consoles of the 32-bit era handled their synthesized music. Especially given the latter's memory constraints stemming from the fact that their budgets for things like sound are much, much smaller than those of multi-hundred dollar XG sound modules that probably cost more than an entire PS1 or Saturn alone. To the point: said sound modules were ROMplers, with the highest-end examples of them consisting of the MU2000EX with its 20 MiB of sample ROM. Video game consoles, meanwhile, again didn't have the luxury of such space with 90s-era memory prices and consumer-level price targets, and as such the sound hardware of consoles from that era — or rather the PS1 and the Saturn specifically; we don't speak of what the N64 did, oof — instead used a relatively tiny 512 KiB of dedicated RAM, not ROM, to store samples in (or the rough equivalent of 1820 KiB in uncompressed terms if you were fortunate enough to be working with the PS1's SPU with its 32:9 hardware ADPCM compression that the Saturn's SCSP lacked, but I digress). They were essentially what you could call RAMplers, with developers being prompted to basically "bring your own samples" (BYOS) rather than rely on a fixed, pre-determined pool of them supplied by Sony or Yamaha or whoever. Now, there was of course the CD-ROM medium used by the PS1 and Saturn that could hold much more than 512 KiB or even 20 MiB. But then constantly accessing the disc drive isn't practical for a game console because you would wear the hell out of said drive by doing that and developers had to prioritize streaming other things from disc over something as relatively trivial as samples in any case (like voice acting streams, game assets, and such). Plus, you still only had 512 KiB of sound RAM even with an entire CD-ROM available to you, which means that the sound chip still can't actually play more than 512 KiB of samples at any given time and you would have to constantly swap from disc — and thus also constantly delete samples from RAM, so hopefully you weren't planning to use them or anything! — if you wanted more. All in all, then, it's hard for me to see how XG as Yamaha liked to use it back then — again, with relatively expensive, professional-grade sound modules — is really compatible with how video game sound chips of that era worked, with those tiny amounts of memory available to them. Now, our subject at hand — the Dreamcast's AICA — does happen to have 2 MiB of sound RAM available to it in a four-fold increase over its SCSP predecessor (or sixteen-fold if you count the 4:1 hardware ADPCM compression that increases the effective sound RAM to 8 MiB in uncompressed terms). But even the S-YXG50 softsynth relies on 4 MiB of sample ROM, let alone the aforementioned MU2000EX with its 20 MiB of sample ROM which the Dreamcast, for all of its significant improvements in the sound memory department versus the Saturn, still doesn't come anywhere close to reaching.
Speaking of things like the S-XYG50 and the MU2000EX, there's also the issue of exactly what level of XG AICA is capable of representing, even before we get to the issue of things like memory constraints as discussed above. For the uninitiated, the S-YXG50 from everything that I've heard seems to be roughly equivalent on paper to a MU50 with fewer effects, or in practice arguably close-sounding to a MU80 with less polyphony and also fewer effects. Meanwhile, the AICA with its 64 hardware channels would seem — on paper, anyway — to be comfortable with the polyphony requirements of something like a MU100 (32 parts, 64 hardware voices). And assuming that the DSP is indeed identical to that of its predecessor in the Saturn which itself is a programmable 128-step DSP that runs "mini-programs" which individually enable things like reverb, chorus, EQ, and the like, it doesn't seem unreasonable that AICA could run the equivalent of at least a reverb and chorus buss on there, if not much more. Especially given how, according to certain SEGA documents outlining the default effects of the DSP on the Saturn's SCSP, "Reverb" takes up 34 steps and 30 KiB of sound RAM while "Chorus" takes up 22 steps and 2 KiB of sound RAM. Assuming that the DSP works the way that I think it does and you can run any combination of DSP effects you want as long as you don't exceed 128 steps, whatever available sound RAM you happen to have, or the 16-channel limit of the DSP's I/O, that leaves 72 steps and 480 KiB of sound RAM available to you on SCSP (and way more than that on AICA with its 2 MiB of sound RAM, to the point where it's almost not even worth considering DSP RAM usage there). As for some of the other DSP effects available, according to those same documents? "Early Reflection" (100 steps and 26 KiB), "Echo/Delay" (20 steps and 52 KiB), "Flanger" (20 steps and 4 KiB) and others, albeit in not nearly as great of a quantity as something like a MU50. Unless SEGA documents simply don't go into it — hardly farfetched given that this is SEGA in the 90s we're talking about here; their reputation for crappy documentation was nothing short of legendary during that time — it seems that the DSP only has one reverb effect and one chorus effect, versus literally over a dozen of both on the aforementioned MU50; to say nothing of later, more advanced XG modules.
Given all of the above, then, there are really only two scenarios that I can imagine XG MIDI working in any meaningful way on the Dreamcast. One such scenario would be if there's some kind of program running on the Dreamcast — perhaps provided to developers in the official Dreamcast SDK — that translates XG commands to AICA-compatible ones in real-time, thus compensating for the vast fundamental differences between the two. Such a scenario doesn't explain how the latter's memory constraints are dealt with, however (unless everything is stored in the Dreamcast's 16 MiB of main RAM... somehow). Meanwhile, the other — and more likely scenario, in my opinion — is that XG MIDI support on the Dreamcast is actually entirely done on the CPU — as in, not the ARM CPU that runs AICA, but rather the main SH4 CPU — in a similar manner as Yamaha's softsynths of the late 90s (including, indeed, the aforementioned S-YXG50). I'm not too sure about how well the Dreamcast's CPU would be able to handle that — let alone while also running game code — although given that an average PC in 1997 when the Dreamcast's hardware was finalized was probably running around 200MHz-ish Pentiums, perhaps it's not entirely farfetched after all. With that said, I'd imagine that the resulting sound capabilities would be quite a bit below what you could do by just using the AICA sound chip natively; as in, if you were to create a plain SMF MIDI sequence, sample bank, and instrument definition file for it using SEGA's bespoke tools and file formats (dedicated sound chips in hardware were a thing back then for a reason, after all). That is, unless such a software solution is actually more clever than I think it is and actually does take advantage of AICA's hardware capabilities somehow (such as, the actual sound generation is handled by the main SH4 CPU, but AICA is used to apply DSP effects to the final mix, or to a certain number of voices that are mixed into a single sound and then sent to AICA for further processing on the DSP, à la insertion effects on a higher-end XG implementation).
Anyone have any insights or thoughts about any of this? Thank you in advance for any answers!