Yep. As far as I remember they double buffered the Z80 RAM to get this quality. So double buffering is a technique that allows software both read and write to memory. While the Z80 (secondary CPU) was playing the samples in order, the M68000 (main CPU) was filling the other buffer. When the time comes, you swap the buffers, rinse and repeat.
Toy Story's title screen and credits songs are actually standard 4-channel Amiga MODs being played back with software mixing and pitch adjustment through resampling! You can actually overwrite those songs in the ROM with any other standard MOD file that fits and it will play (assuming it doesn't do anything too weird, the player isn't 100% ProTracker compatible).
VitinhoCarneiro Never knew the Amiga had the game?? the MOD worked though. Cool that all these years I knew that music had an Amiga sound to it on the Sega Genesis.
Depends how good your modplayer code was, really. The MD's PCM channel appears to be hardware limited to roughly 26khz (about half the chip's overall effective output rate, seems the PCM can only load a new sample every other tick), which is about midrange vs most other hardware of the time - e.g. Mac at 22khz, Soundblaster at 22~24khz, Amiga at ~29khz, SNES at 32khz (and Atari STe at 50khz max but rather more comfortable at 25khz), and whilst not CD quality still sounds perfectly fine for something coming out of your TV so long as the samples are fairly clean. Replay-code wise, it's probably best to compare against other software-mixing modplayers of the time, especially on 7 to 8mhz class 68000-based machines. The Amiga itself is a tricky one because its main output was through very nearly selfcontained hardware - the CPU just had to update each channel in terms of sample start position in memory, length, playback rate and volume/panning, then didn't need to be bothered with it in any way, there wasn't even any RAM access contention because of interleaved access. However it did have some trick software like Octamed that did various things to add additional channels beyond the 4 hardware ones. I don't know the exact typical rates that could be achieved on the 7.1mhz models, but they can be looked up. However ISTR something like you could do 5 or 6 channels at full rate or very close to it, after which it started to drop off pretty hard, maybe even only 15-16khz with 8 channels? Certainly it seemed to be that generally only 7 would be used, 6 were lower frequency (three pairs, essentially, corresponding to hardware channels), and the 7th was pure hardware for high frequency sounds. Still, that suggests software mixing could be done at fairly high frequencies for 4-channel playback. The other less obvious issue but one that can be heard with the Toy Story modules (esp. the ending theme) is a loss of dynamic range / bit depth. Yer Amiga hardware actually has four clean 8-bit samples, which are prescaled through analogue attenuators, added together through analogue mixer / amps, and given a pass through an analogue low-pass filter to get rid of any nasty hissy quantisation/sampling noise... the overall result can be equivalent to having 14 bits or more overall. Mixing in software, often the result isn't anywhere near as clean as various corners get cut with sticking the samples together, most particularly mixing everything down to a single 8-bit value without any filtering and with fairly janky amplitude scaling (essentially doing fused multiply-adds in an age where the term hadn't yet been thought of, so making it happen at speed on a very much integer-focused chip required reducing the mathematical precision). Taking the hardware channels and other such complication out of the picture, I'd expect similar baseline performance from any other similarly powerful machine. For example the STe can replay 4-channel mods quite nicely at 25khz mixing rate, and on a good day manage 50khz with various tricks calling on other hardware like the Blitter to act as an ersatz DMA burst transfer device for data other than images. However as it only has *two* hardware PCM channels (with adjustable volume at least), even this requires a degree of software mixing, so the ultimate fidelity isn't quite as good, particularly at 25k (which is a fixed figure - it can actually only DMA at one of four different set rates, binary divisions of 50k, thus some extra distortion and system load comes in from either having to precalculate / timestretch any samples that aren't an exact multiple into the buffer, whereas the miggy has fairly fine-grained hardware sampling rates). And whilst it also has hardware post-filtering on each of those two channels, that doesn't operate on the individual samples at the point they're being summed. It is, however, maybe what we'd call second best, leaving PCs and later Macs out of the picture. Taking an aside for a moment, a slower PC with a Soundblaster Pro card or an older Mac which was capable of stereo but still at a fixed ~22.2khz rate would count as third-best on this scale, for the same reasons... their hardware is essentially of the same type but at progressively (slightly) lower rates, and with lesser post-filtering. The SB could at least be set to various arbitrary output rates, but not super-fine-grained and any paired samples would still need some degree of stretching if they weren't replaying at the same rate as each other (just like using Octamed, really). SNES is a tricky one because it has its own entirely independent sound unit, which basically runs as software by default, and whilst it has 8 independent channels that can each run at up to 32khz with fairly deep bit depth digital mixing, levelling/panning and filtering (and reverb!), the samples themselves are stuck as 4-bit ADPCM with a rather rough encoding scheme and the module only has 64kb memory for all of samples, sequences, and replay routines, so we hit the problem of a very good quality output stage, compromised by crappy input to that part. However the 8-channel / 32khz bit alone kinda disqualifies it from this discussion, as if all the machines had the same quality samples coming in, it would win easily with near-zero CPU use. Back to the main track, Megadrive I expect would be the next-best thing, but not far off the bottom of the list, saved only by its DAC channel being a proper 8-bit output into which samples could be latched without any further messing around, at an entirely arbitrary rate (upto a max of 26khz). So if you had ready-baked sounds that were perfectly good when played that way, and didn't want to mix them at all, the output would be top notch, as demonstrated here with the better quality percussion - only one sound plays at a time, at presumably maximum digital amplitude (so best possible resolution), and at exactly the same rate that it was sampled. No stretching, no low-precision multiplication, etc. Post filtering of course varied per model (bit of a sore point for some people). However that starts to fall away when you want to mix 2 or more sounds together, especially in completely variable ways instead of in any direct 2:1 or other integer relationship in terms of volume or speed, because we're right back to what had to happen for the STe/etc, and with Octamed. Except now there might be four different sounds trying to cram into the same channel, and even if you approach it in a sophisticated way using 16-bit ints or some kind of floating point, it still eventually has to be truncated to a single somewhat scratchy 8-bit value which hasn't had the benefit of any proper filtering or the like along the way. So the waveform gets a bit muddied up rather like pulling 8 channels out of the STe or 16 from the Amiga. And if the maths have been simplified to get a better output rate, that's even worse. Rate-wise, it's probably not so bad. You're performing 3 mult-adds (probably safe to assume that the loudest channel is taken as the thing that all the others add to, with their scaling normalised to the difference between their notional amplitudes, and it's kept digitally at 100% then attenuated down to its set value in hardware... some pre-calculation before writing the actual song data to ROM would help simplify things eg by always having the loudest thing in channel 0) alongside 4 pieces of rate scaling, and maybe a final divide or truncate. Essentially the same as getting 5 channels (4.5?) out of the STe (4 channels there would only need 2 additions) or 6 (...5?) out of the Amiga, so a playback rate in the 20s of khz should be doable if nothing else was going on. Keeping it going alongside a game might be more challenging, but as it was only used alongside title and credits screens (in the Toy Story case), it's not anything that we'd need to worry about. Figuring how bad it may be in more challenging cases requires looking at PSG based machinery - and the example actually shown off in this video can be a good guide. Other more comprehensively exercised examples are the non-e ST's and things like the Spectrum, MSX, Tandy PC etc. They can be manipulated into producing sample output with about 4 to 8 bits of effective resolution, nominally up to very high frequencies, but the amount of software calculation required to come up with the appropriate PSG values tends to mean relatively low sampling rates, with there generally being a tradeoff in terms of bit depth vs frequency (4 or 5 bits, depending on the actual chip, is essentially plain PCM, because it can be pulled out of a single channel, or the master volume register; anything greater means using combinations of channels, possibly with the main volume too, and relying on some maths and some look-up tables, and maybe a hell of a lot of precalculation before writing the ROM... or in other words there's a quality vs how much effort you can be bothered to put in tradeoff). On top of which there's all the other stuff about combining multiple samples into a single limited-precision channel, the calculation required to produce the combined value that then has to be translated into PSG commands, utter lack of filtering at any stage, etc. Good results were achievable, albeit with a lot of work and mainly but not always with static or fairly simple screens. A game on a PSG system that had a good "digital" soundtrack alongside any kind of serious action was a particular triumph - even now I'm having trouble thinking of any that weren't essentially early 80s arcade clones like Pacman With Fancier Sprites And Music and so-on. Even then you might really be looking at sample rates in the low or mid teens khz and effective resolution of maybe 6 bits in the main. What actually was rather more common than a full MOD-style soundtrack on that hardware was to use samples in the same way as a lot of the examples in this video - to provide fixed-frequency, 1-channel "digidrums".
I mean, the original Amiga computers, at least most of them, had only 4 sound channels total. Granted they were PCM, but if you wanted music with a lot of depth it required effort to do so. Limitations breed creativity, of course.
European game developers in general back then produced some wonky games with amazing music. See: Monty On The Run for C64. Looks terrible, plays meh, wow that soundtrack.
@@invalid_user_handle it is 4 channels of hard panned PCM only You could get more with sofware ddrivers like octamed but the paula only does 4 PCM channels I think only 8 bit samples tho
@@rfmerrillOr the Follin brothers. Mostly they worked on average licensed games but they never miss on the soundtrack. See Silver Surfer or Incredible Crash Dummies
+andyukmonkey The 8-bit DAC is fed with the sum of two 7-bit "virtual channels". This sort of thing was very common on the GBA to produce sample-based music.
Digging Mega Drive music is one of the most fascinating things in gaming. It might be the third time that I watch this video and I still enjoy every bits :) Some of the extracts instantly make me want to jump into related games which is what I gonna do with Chelnov (Atomic Runner) and Dynamite Headdy!
Interesting stuff. The difference is like night and day when you isolate the PCM channel! It's different when they're in the mix, though. I'd argue that, in some cases, the lower quality PCM actually added to the overall feel of the soundtrack, especially when it comes to voice samples. I can't imagine some of my favourite Mega Drive soundtracks with crystal clear percussion - it would sound too clean!
The most interesting thing about this to me is how, in some cases, the not-so-great sounding examples have a weird aesthetic charm to them. Like, there's no arguing they're not the best use of the PCM capability for any of the reasons listed, but something about them still works. I dunno. Skitchin' always stood out to me for it's use of extensively sampled guitars, too. I know a few of the EA Fifa games used similar (or even the same) samples in the scant few tracks those games had, but nowhere near to the extent Skitchin' does. It's partially why I like the score to that game so much- the other reason is because the compositions themselves are pretty great.
I think the key is using the chip and the samples as an "instrument" in their own right and getting the best out of it by playing with what it can do in its own unique way, rather than trying to emulate an existing physical one and it being all too obvious where the chip then falls short of that. Like, the guitar sample is just the starting point for what you then do with it in the composition, rather than an end point in itself.
Great video! This wold make a great series of videos really digging into the Genesis sound chip. Fascinating. Would love to here your thoughts on Hitoshi Sakamoto's incredible Gauntlet 4 soundtrack.
Although Genesis/MegaDrive didn’t have advanced sound hardware like the SNES had it made the sound designers take very creative paths to achieve beautiful sounds on the Genesis/MegaDrive
Funnily I don't think they actually sounded any different in the PC version... the audio driver was probably fine, they were just really poor samples for some reason!
The thing with contra actually is it was found to be adjusting the pitch and volume while mixing 4 channels simultainously for all the sound effects and music so it doesn't get drowned out. But sound effects will sometimes drain out others from overflow
One of the amazing things of modern day is Markeyjester's crystal clear DualPCM DAC driver, which is beautiful. I have always wondered what some games would sound like with superclear samples, like Ristar, Sonic 3, and others. But in all seriousness, Sonic 3 was not all that clear really, especially listening to the Michael Jackson voice samples. If only I understood these things from a technical standpoint. I would love to make songs almost purely of samples for the fun of it.
Agreed on Sonic 3. That's why I, unpopular opinion, think Sonic 3 has one of my least favorite Sonic OSTs ever made, only behind Chronicles and Boom RoL of course. I'm sorry, but I just think the entire game was overrated.
Sonic 3 did at least set the PCM channel to left or right on occasion, most Mega Drive games didn't even go that far so at least that's something. The obvious example of this is Hydrocity Zone Act 2.
What does DualPCM do then? I assume uses the regular channel with volume manipulation of either PSG or FM channels to add in missing LSBs and improve the dynamic range?
@@solarflare9078 there's no way you compared 3 soundtrack to sonic boom rise of lyric for me it's a really good soundtrack and I don't know why the PCM samples are what determines the quality of a game OST even though sonic 2 had some pretty low quality samples compared to 1 and 3 samples are better and more creative than 2 and 1 which are just snare drums so yeah can't see how that game OST is bad to you but I guess 🤷♂️
Skitchin guitars were so good. I had a feeling the toy story track was recorded or sampled in as full track from another source- but now question is can a bunch of other music be done like that and modded to sound just as good- and does it eat up memory?
It seems to be a cover of the track "Battle of the Mounds" from the Conan the Barbarian OST, which cover, unfortunately for us, seems to still be unreleased. You can hear the snippet from Conan in question by following this link: ua-cam.com/video/3bh63oQKdus/v-deo.html and going to 1:56 This info was posted somewhere below but I'm paraphrasing and condensing from multiple sources and posting here for visibility
@@zacharybrown3010 It's more likely a cover of the intro theme to Alternate Reality: The City and Alternate Reality: The Dungeon, which was itself an homage to the Conan movie soundtrack. It was released on a ton of microcomputers back in the day. The track didn't translate well to the Amiga but the Atari 8-bit home computer and C64 versions are legendary.
Does anyone know how to recreate these playback effects using VSTs? Throw some reverb onto these and they'd work great if you input uncanny, unsettling sounds
Yeah, but Traveller's Tales still had quite a good handle on the Mega Drive to get that stuff, and other things besides, to work on the same game. They even managed sprite scaling.
+Purple Trolling? Anyway it's because it was the earliest attempt like this on Mega Drive and it's already pretty cool! But, as it has already been pointed out, the Mega Drive can handle streamed music during gameplay, alongside sound fx, as Sonic the Next Level does. And Markey Jester, the author of said demo, recently upgraded his sound engine... :)
Jeff Dyck is a god. FIFA '95 is similar to Skitchin' in execution but one of the drum sounds has reverb, plus the guitar is down and dirty. I didn't even know the DAC could exist anywhere outside of a mono sound space, so Atomic Runner and Dynamite Headdy are a huge surprise.
I believe the sample channel works like any other FM channel on the 2612, meaning that it can play left, right, or both at once. As long as the sample channel is playing one sample at a time, it can alternate this way.
I have to ask about that music in the intro; I know its from the soundtrack to Conan the Barbarian. Did you arrange that? Otherwise, who did that? Cuz its fucking amazing
MastaGambit, Savaged Regime produced that himself. Look at his Videos for Anvil of Crom. The dude's a beast; there are some good modern YM2612 composers out there, but he may be the best. Also check out his renditions of Ken's theme from SFII and Theme of Simon from Super Castlevania IV.
+Nathan Daniels But Masta and I want the music that plays here, during the first 50 sec of the vid (and which doesn't appear in his Anvil of Crom cover). It's so epic and beautiful...
Fifa 1 and Fifa 95 are also great tonal sample examples, both by Jeff Dyck using the same driver as Skitchin (Kevin Pickell's EA sound driver, mostly used in EA Sports games, possibly the one in NBA Live).
Thanks for helping to kill the myths; I can just link now instead of saying it. Most of the cleanest examples here, besides Matt Furniss' work, come from Data East titles: Atomic Runner, Side Pocket, Vapor Trail; others not included are Mega Turrican and High Seas Havoc. And yeah, Ristar's DAC was my only disappointment with that soundtrack; same for Sonic 3&K. What we need now is more insight on HOW. Did anyone try importing a really slow sample and then play back an octave higher, for example? Streaming tricks with certain drivers, superior compression methods, what? Someone explain "YOU'VE GOT A SECRET BONUS POINT!"
konakonaa Sample playback is actually pretty great for the most part in GEMS (See also: 2:46). In fact, it's the one thing that sound driver does right.
@@solarflare9078 The only real issue with GEMS was the dogshit stock patches and samples that most composers didn't have the knowledge to swap out. Sonic Spinball and most games scored by Drossin use GEMS (being lead dev on the project helps a bit), Ecco the Dolphin (and the sequel?), probably a few other classics you don't think about because they aren't hitting you with the fart bass constantly
@@shukterhousejive Yeah you're right, alot of devs liked using that ''AHa Take On Me'' bass patch for their GEMS osts. Chakan, Barbie and Ballz 3D are some of the worst sounding GEMS you could listen to.
Thanks for the informative video, it provided great insight on the sound capabilities of the Sega Genesis/Mega Drive. Also, the Riders of Doom arrangement was phenomenal!!
If you were a sampling guy who makes your own music from samples I'd imagine playing with these could be a good challange to make a good unique tune from.
An homage was used in Alternate Reality: The City and Alternate Reality: The Dungeon main title themes but this is likely an homage to/remix of that. Granted, I haven't heard every possible version of Alternate Reality since it was released on nearly every microcomputer (Atari 8-bit, Atari ST, C64, Amiga, Apple II, DOS, etc).
+za909returns yep, most sound drivers run a loop on the z80 that streams the sample data to the DAC channel, and when the vblank interrupt occurs the code that updates the FM and PSG channels is run. some drivers do those updates with the 68000, which allows the z80 to keep running the sample loop throughout. fully z80 based drivers have to pause the sample loop to update the other channels. there are trade offs either way, partially 68000 based drivers allow for slightly better quality samples, fully z80 based frees up a bit more cpu time on the 68000 for gameplay
Crash I imagine with some very hard work and a thoughtfully designed FM and PSG routine you could still keep the PCM running, but you'd have to manually time runs of the sample updater while doing your FM and PSG stuff... So a sample should be output to the DAC every x clock cycles, and therefore you have to call the same routine that is normally running during the rest of the frame. Sucks that the Z80 only has one interrupt available. This idea sounds like a nightmare to implement, kind of like doing anything on the Atari 2600.
how do you cycle count effectively in a sound driver with 10+ channels? not every channel updates every frame. 90% of frames will have no channel commands issued, then all of a sudden almost all channels will be updated on the same frame. Do you just waste the cpu time required to update every channel on every frame? do you only allow 1 or 2 channels to be updated per frame? there's not really an optimal solution to this without introducing some severe restrictions on the music composer
As long as the time difference between those successive samples output during the sound driver execution isn't that great, it shouldn't be that noticeable. At the very least it should be better than no output at all during that period.
there's another proven option: a big old ram buffer that gets streamed to the dac channel. i don't think it was ever used back in the day, but in modern times multiple people (stef, markeyjester) have made drivers that use a buffer to 1) avoid dma bus contention 2) software mix multple dac samples 3) fuckin just be cool as fuck
@@user-ql2re2es9y you can just download this video's audio, plop it into the samples tab in OpenMPT, select a portion, copy to a new sample, crop off and loop here and there, save, have fun (oh yeah, and tune your samples to C- if they're not percussion) :)
TheRedFox I can't give a technical explanation but by using all the psg sound channels you can play pcm samples, or something similar. There were a few Master System games that used the trick but the music had to cut out briefly for the sample to play. There are videos on UA-cam that compile examples of this from Master System games.
Basically if you set a channel to one of the frequency extremes (can't remember if max or min, but it doesn't really matter for now), it will hold the square wave output as a steady "on", and then you can directly control the sample value by changing the channel volume. Think it might even be by design (or a happy accident they decided to leave in) and mentioned in the data sheets. Works similarly for both the SN7 PSG and the more common AY8910/YM2149. It's kinda crude and only really has 4 to 5 bits of resolution (made both worse and better by the volume being logarithmic not linear), and any kind of decent sample rate murders the CPU, but it's better than no PCM at all and can be quite effective in the right circumstances. Plus, and IDK if it's doable or was ever used on the MD, there are additional techniques - particularly for the 2149 - which can improve the apparent bit depth somewhat, by using all three channels and adjusting their volume independently, which can give you an extra bit and a half or so of dynamics, but that puts even more demand on the bus and can't really be used for live mixing (rather than straight replay of specially encoded samples or looping pieces of music) because the order in which you address each channel becomes crucial and really needs to be worked out algorithmically ahead of time on a much more powerful computer...
Since the 68000 could access the sound chips, you could just use the Z80 to drive PCM and the 68000 to drive everything else. Or you could use intricite code.
Of course you didn't know that *Barkley shut up and Jam! 2* have some few instrument Sax, Jazz, sounds and hip hop drum beats only for the PCM as well. Good idea with this video by the way.
I got 1000 words to say how amezing it is that the genesis can pull off. Such great pcm sound, if developers just doing it right, it can be on par with with gba sound,but because game developers were sooo greedy on saving money, they decided too lower down the quality of samples to save space. Or they even decided to use the psg chip for pcm sound to save a heaviy load on the cpu chip and to save bankwidch. Nowaday's memory space is no longer an issue so now we can upgrade games to fully pull off the real power off the genesis,like as proven with hacked versions of altered beast & streetfighter 2.
@@LevskiBADBOY heck, its even got several strides on the Amiga in all ways except for amount of sample/score memory, unless you're one of those clever types who've figured out livestreaming of fresh data to the SPC700 whilst it's still playing... More channels, full coprocessor rather than just a DMA mule, etc...
+Hal Coley Well, it is a (converted?) 4 channel MOD file, after all (the original file is actually tied in with the credits theme). Funny thing is that the song is listed in this video as being by Randy Newman, while the MOD file is listed as being by Allister Brimble. Not sure who's correct here.
+Scooblee Randy Newman, arr. Allister Brimble. Strange Things for the Start Menu; Friend in Me for the Credits. Feel free to look up Toy Story in the Mod Archive! :D
Speaking of which, seeing how After Burner II used the SN76489 to play the PCM samples... How hard would it be for the SMS to do that? Whenever it plays voice samples in most games I have played on it, it seems to freeze up while playing them sadly. Why is that?
The Megadrive effectively has an entire SMS built into it, dedicated to reading the joypads and playing music, pretty much. It can be completely maxed out doing that, so consider what would happen if you tried to play a game at the same time without the rest of the MD bolted on. It really doesn't have that much processing ability and was never meant to have any sample ability at all, hence the offering of the FM module in Japan... Any machine that managed such things was either 68000 based / using some equivalent 16-bit setup, or had an audio coprocessor. Sometimes both...
@@RWL2012 difference being that the gameboy has a wave channel. Which can morph into anything you want within 0 to 15 registers (you can stack multiple to achieve a sample)
Toy Story has a driver that barely plays an Amiga MOD file and sends it pre-mixed to the PCM channel. the CPU is too weak to run this track (and the one other one like this) in-game, so they're only used on title and credits screens. ironically the in-game tracks don't even properly use the OPN FM, and are OPL-sounding FM done with the infamous GEMS driver!
@@RWL2012 Actually, GEMS still lets you customize the different OPN patches. It's an extremely flexible sound driver, even moreso than Sound-Sorce/SMPS in a lot of aspects. It's up to the developers to configure them and squeeze the most out of it, which most didn't do at all.
@@marcelopires711 the 2608 is still better, though. But as Sega retained the original SMS hardware and threw in a parallel 68000 and DMA system as well they probably thought it unnecessary to retain that and the PSG parts of it. Bit of a shame really, even though it did make the machine cheaper. Six PSG channels and two squares (plus the envelope generator and wider frequency range for half of that) instead of a bare 3+1 wouldn't have gone amiss alongside the FM section, nor having a more automated and natively ADPCM capable sample engine... More channels but less CPU load (and the potential of upto six scratchy PCMs alongside the main 8-bit one), what's not to like? Anyway to answer Jg's original question... What if, indeed. The Z80 should have been entirely capable of feeding instrument and note data to the FM and PSG parts, and PCM would no longer have been as much of a pain and would have sounded much cleaner and more consistent, as to the copro it would have seemed just like another such channel but with a different set of data (all of about seven or eight bytes per instance, or just one or two if repeatedly playing the same thing) going into the registers to initiate the DMA process. After which the sound chip would have been able to bus master during DMA cycles and fetch the much bulkier sample data for itself without any timing jitter. Which is why it sounded so good in the PC98 et al, and why it's part of a fantasy spec of mine for a better attempt at the Atari STe. You get a lot of capability for minimal CPU load, and it can just drop in place of an existing PSG from the POV of the computer bus and software (and fairly minimal board rework and addition of a DAC on the other side of the hardware bridge). It was actually meant to be used in conjunction with relatively low powered CPUs originally, after all, which wouldn't have had the ability to brute force the samples into a simpler MD style DAC whilst still being able to do something else. The only problem would likely have been the cost. Yamaha were probably a bit ambitious thinking it would get paired with noddy CPUs, and IRL it was mainly standalone synths/keyboards, arcade machines and higher end home computers that made use of it or anything particularly similar. It was even too pricey to make it into the MD, so it would never have been a practical option for the SMS even if it had been available a little earlier. That's why the SMS FM option is a much simpler and cheaper OPLL instead of an OPNA...
the only thing that suck is probably the polyphony with the sampler, only one sample single shot at a time, but in game like Skitchin' i wonder how they do that crazy guitar plus drum sound.
@@Mizu2023 can be easy trick using an auto chop software like recycle from propellerheads software, back then you can also try with an akai hardware sampler but all sample must converted lofi with the sega sdk.
it really says something when after burner 2, using samples on the psg, has some better sounding samples than super mario bros 3, the nes one, from 1988
That's because the NES samples are only 1-bit delta compressed, but the PSG can manage at least 4-bit even when used very simply. (well OK the NES *could* do 8-bit, but that needed both more bus and CPU load, and a lot more storage space in what were generally very cramped cartridges, especially vs the more prestigious of the Megadrive ones)
The CPU has no sound output capability. All it can do is feed data and commands to the sound chip, which has a very rudimentary PCM ability based on setting a channel's note value to zero then rapidly altering its volume to shape the waveform... It's about the same concept as how samples are fed to the 2612, just with lower resolution and some reassignment of register roles.
Does anybody know how NBA Live 95 and Skitchin’ are using multiple samples simultaneously? I have to think they’re using some sort of sound driver to allow for the use of simultaneous samples. That or using both the ym2612 and the sn76489 to play multiple samples, but idk enough about this stuff to know
So the Toy Story programmer himself made a video about that song.
Yep. As far as I remember they double buffered the Z80 RAM to get this quality.
So double buffering is a technique that allows software both read and write to memory. While the Z80 (secondary CPU) was playing the samples in order, the M68000 (main CPU) was filling the other buffer. When the time comes, you swap the buffers, rinse and repeat.
The Zilog Z80 uses Amiga MOD file!.
ua-cam.com/video/nsJ0kT7EvXQ/v-deo.html
@@TheZudah It's a Namco XGM MOD expansion!.
Freegin John and TT were programming ninjas! Gamehut videos never disappoint!
Toy Story's title screen and credits songs are actually standard 4-channel Amiga MODs being played back with software mixing and pitch adjustment through resampling! You can actually overwrite those songs in the ROM with any other standard MOD file that fits and it will play (assuming it doesn't do anything too weird, the player isn't 100% ProTracker compatible).
Do you happen to have or know where I can download the MOD files from the game itself to see if my Amiga 1200 will play them back? :)
VitinhoCarneiro Never knew the Amiga had the game?? the MOD worked though. Cool that all these years I knew that music had an Amiga sound to it on the Sega Genesis.
898doffo I don't think this game ever released on the Amiga.
Anyone know what would be the quality limit if you use more than one channel of sampled sound at once? I remember reading 22Khz somewhere.
Depends how good your modplayer code was, really. The MD's PCM channel appears to be hardware limited to roughly 26khz (about half the chip's overall effective output rate, seems the PCM can only load a new sample every other tick), which is about midrange vs most other hardware of the time - e.g. Mac at 22khz, Soundblaster at 22~24khz, Amiga at ~29khz, SNES at 32khz (and Atari STe at 50khz max but rather more comfortable at 25khz), and whilst not CD quality still sounds perfectly fine for something coming out of your TV so long as the samples are fairly clean.
Replay-code wise, it's probably best to compare against other software-mixing modplayers of the time, especially on 7 to 8mhz class 68000-based machines.
The Amiga itself is a tricky one because its main output was through very nearly selfcontained hardware - the CPU just had to update each channel in terms of sample start position in memory, length, playback rate and volume/panning, then didn't need to be bothered with it in any way, there wasn't even any RAM access contention because of interleaved access. However it did have some trick software like Octamed that did various things to add additional channels beyond the 4 hardware ones. I don't know the exact typical rates that could be achieved on the 7.1mhz models, but they can be looked up. However ISTR something like you could do 5 or 6 channels at full rate or very close to it, after which it started to drop off pretty hard, maybe even only 15-16khz with 8 channels? Certainly it seemed to be that generally only 7 would be used, 6 were lower frequency (three pairs, essentially, corresponding to hardware channels), and the 7th was pure hardware for high frequency sounds. Still, that suggests software mixing could be done at fairly high frequencies for 4-channel playback.
The other less obvious issue but one that can be heard with the Toy Story modules (esp. the ending theme) is a loss of dynamic range / bit depth. Yer Amiga hardware actually has four clean 8-bit samples, which are prescaled through analogue attenuators, added together through analogue mixer / amps, and given a pass through an analogue low-pass filter to get rid of any nasty hissy quantisation/sampling noise... the overall result can be equivalent to having 14 bits or more overall. Mixing in software, often the result isn't anywhere near as clean as various corners get cut with sticking the samples together, most particularly mixing everything down to a single 8-bit value without any filtering and with fairly janky amplitude scaling (essentially doing fused multiply-adds in an age where the term hadn't yet been thought of, so making it happen at speed on a very much integer-focused chip required reducing the mathematical precision).
Taking the hardware channels and other such complication out of the picture, I'd expect similar baseline performance from any other similarly powerful machine. For example the STe can replay 4-channel mods quite nicely at 25khz mixing rate, and on a good day manage 50khz with various tricks calling on other hardware like the Blitter to act as an ersatz DMA burst transfer device for data other than images. However as it only has *two* hardware PCM channels (with adjustable volume at least), even this requires a degree of software mixing, so the ultimate fidelity isn't quite as good, particularly at 25k (which is a fixed figure - it can actually only DMA at one of four different set rates, binary divisions of 50k, thus some extra distortion and system load comes in from either having to precalculate / timestretch any samples that aren't an exact multiple into the buffer, whereas the miggy has fairly fine-grained hardware sampling rates). And whilst it also has hardware post-filtering on each of those two channels, that doesn't operate on the individual samples at the point they're being summed. It is, however, maybe what we'd call second best, leaving PCs and later Macs out of the picture.
Taking an aside for a moment, a slower PC with a Soundblaster Pro card or an older Mac which was capable of stereo but still at a fixed ~22.2khz rate would count as third-best on this scale, for the same reasons... their hardware is essentially of the same type but at progressively (slightly) lower rates, and with lesser post-filtering. The SB could at least be set to various arbitrary output rates, but not super-fine-grained and any paired samples would still need some degree of stretching if they weren't replaying at the same rate as each other (just like using Octamed, really).
SNES is a tricky one because it has its own entirely independent sound unit, which basically runs as software by default, and whilst it has 8 independent channels that can each run at up to 32khz with fairly deep bit depth digital mixing, levelling/panning and filtering (and reverb!), the samples themselves are stuck as 4-bit ADPCM with a rather rough encoding scheme and the module only has 64kb memory for all of samples, sequences, and replay routines, so we hit the problem of a very good quality output stage, compromised by crappy input to that part. However the 8-channel / 32khz bit alone kinda disqualifies it from this discussion, as if all the machines had the same quality samples coming in, it would win easily with near-zero CPU use.
Back to the main track, Megadrive I expect would be the next-best thing, but not far off the bottom of the list, saved only by its DAC channel being a proper 8-bit output into which samples could be latched without any further messing around, at an entirely arbitrary rate (upto a max of 26khz). So if you had ready-baked sounds that were perfectly good when played that way, and didn't want to mix them at all, the output would be top notch, as demonstrated here with the better quality percussion - only one sound plays at a time, at presumably maximum digital amplitude (so best possible resolution), and at exactly the same rate that it was sampled. No stretching, no low-precision multiplication, etc. Post filtering of course varied per model (bit of a sore point for some people).
However that starts to fall away when you want to mix 2 or more sounds together, especially in completely variable ways instead of in any direct 2:1 or other integer relationship in terms of volume or speed, because we're right back to what had to happen for the STe/etc, and with Octamed. Except now there might be four different sounds trying to cram into the same channel, and even if you approach it in a sophisticated way using 16-bit ints or some kind of floating point, it still eventually has to be truncated to a single somewhat scratchy 8-bit value which hasn't had the benefit of any proper filtering or the like along the way. So the waveform gets a bit muddied up rather like pulling 8 channels out of the STe or 16 from the Amiga. And if the maths have been simplified to get a better output rate, that's even worse.
Rate-wise, it's probably not so bad. You're performing 3 mult-adds (probably safe to assume that the loudest channel is taken as the thing that all the others add to, with their scaling normalised to the difference between their notional amplitudes, and it's kept digitally at 100% then attenuated down to its set value in hardware... some pre-calculation before writing the actual song data to ROM would help simplify things eg by always having the loudest thing in channel 0) alongside 4 pieces of rate scaling, and maybe a final divide or truncate. Essentially the same as getting 5 channels (4.5?) out of the STe (4 channels there would only need 2 additions) or 6 (...5?) out of the Amiga, so a playback rate in the 20s of khz should be doable if nothing else was going on. Keeping it going alongside a game might be more challenging, but as it was only used alongside title and credits screens (in the Toy Story case), it's not anything that we'd need to worry about.
Figuring how bad it may be in more challenging cases requires looking at PSG based machinery - and the example actually shown off in this video can be a good guide. Other more comprehensively exercised examples are the non-e ST's and things like the Spectrum, MSX, Tandy PC etc. They can be manipulated into producing sample output with about 4 to 8 bits of effective resolution, nominally up to very high frequencies, but the amount of software calculation required to come up with the appropriate PSG values tends to mean relatively low sampling rates, with there generally being a tradeoff in terms of bit depth vs frequency (4 or 5 bits, depending on the actual chip, is essentially plain PCM, because it can be pulled out of a single channel, or the master volume register; anything greater means using combinations of channels, possibly with the main volume too, and relying on some maths and some look-up tables, and maybe a hell of a lot of precalculation before writing the ROM... or in other words there's a quality vs how much effort you can be bothered to put in tradeoff). On top of which there's all the other stuff about combining multiple samples into a single limited-precision channel, the calculation required to produce the combined value that then has to be translated into PSG commands, utter lack of filtering at any stage, etc.
Good results were achievable, albeit with a lot of work and mainly but not always with static or fairly simple screens. A game on a PSG system that had a good "digital" soundtrack alongside any kind of serious action was a particular triumph - even now I'm having trouble thinking of any that weren't essentially early 80s arcade clones like Pacman With Fancier Sprites And Music and so-on. Even then you might really be looking at sample rates in the low or mid teens khz and effective resolution of maybe 6 bits in the main. What actually was rather more common than a full MOD-style soundtrack on that hardware was to use samples in the same way as a lot of the examples in this video - to provide fixed-frequency, 1-channel "digidrums".
Dynamite Headdy had some incredibly clear-sounding samples, especially the character voices.
domdomdomdomdomdomdomdomdom
kuma
@@khhnator Ma-ma-ma-ma-ma-maruyama.
Strider II/Returns too.
The game is garbage but the sampled speeches amazing.
You got another try!
I have the theory that, while the games they made may be a bit of a mixed bag, Amiga-based devs reeeeeeeeeeally knew how make hardware sing.
I mean, the original Amiga computers, at least most of them, had only 4 sound channels total. Granted they were PCM, but if you wanted music with a lot of depth it required effort to do so. Limitations breed creativity, of course.
European game developers in general back then produced some wonky games with amazing music. See: Monty On The Run for C64. Looks terrible, plays meh, wow that soundtrack.
@@invalid_user_handle it is 4 channels of hard panned PCM only
You could get more with sofware ddrivers like octamed but the paula only does 4 PCM channels
I think only 8 bit samples tho
@@rfmerrillOr the Follin brothers. Mostly they worked on average licensed games but they never miss on the soundtrack. See Silver Surfer or Incredible Crash Dummies
3:38 "Now, this is the story all about how my life got flipped, turned upside-down..."
Matt Furniss and Yuzo Koshiro knew their shit on the Genesis sound chip.
It should be noted that Ristar's drivers do support playing two samples at once. Which it's doing in your example.
+andyukmonkey The 8-bit DAC is fed with the sum of two 7-bit "virtual channels". This sort of thing was very common on the GBA to produce sample-based music.
za909returns
That's the sort of thing you wouldn't expect in a commercial Megadrive game but rather a tech demo or something.
A MOD audio?.
@@user-ql2re2es9y Yes just me suffering things straight-up disappearing then...
Is that 2 samples tho? It sounds like 3 (2 vocal + drum, you can hear the higher vocal cut off sooner than the lower)
Digging Mega Drive music is one of the most fascinating things in gaming. It might be the third time that I watch this video and I still enjoy every bits :) Some of the extracts instantly make me want to jump into related games which is what I gonna do with Chelnov (Atomic Runner) and Dynamite Headdy!
i agree. older games than ps1 arent really my thing when it goes to actual playing, but i sure as hell enjoy the music and the videos about it!
6:10-That track was actually a AMIGA music file from the Ultimate Soundtracker program.
Interesting stuff. The difference is like night and day when you isolate the PCM channel!
It's different when they're in the mix, though. I'd argue that, in some cases, the lower quality PCM actually added to the overall feel of the soundtrack, especially when it comes to voice samples. I can't imagine some of my favourite Mega Drive soundtracks with crystal clear percussion - it would sound too clean!
+Okami McCormick™ on the Mega Drive? That's a tough call...probably a tie between Thunder Force IV and Rocket Knight Adventures.
@Lucas Molessani Since nobody asked, I have a tough time choosing between Revenge of Shinobi, Herzog Zwei, and Sword of Vermilion. Also Gauntlet IV.
@Lucas Molessani yeah Mega turrican has a huge Snare sample, but the rest of the FM patches are pretty weak in my opinion
Fascinating and educational, thanks! Always loved the sort of things the console could do, soundwise, in creative hands.
The most interesting thing about this to me is how, in some cases, the not-so-great sounding examples have a weird aesthetic charm to them. Like, there's no arguing they're not the best use of the PCM capability for any of the reasons listed, but something about them still works. I dunno.
Skitchin' always stood out to me for it's use of extensively sampled guitars, too. I know a few of the EA Fifa games used similar (or even the same) samples in the scant few tracks those games had, but nowhere near to the extent Skitchin' does. It's partially why I like the score to that game so much- the other reason is because the compositions themselves are pretty great.
I think the key is using the chip and the samples as an "instrument" in their own right and getting the best out of it by playing with what it can do in its own unique way, rather than trying to emulate an existing physical one and it being all too obvious where the chip then falls short of that.
Like, the guitar sample is just the starting point for what you then do with it in the composition, rather than an end point in itself.
"Toy Story
Randy Newman
(WTF IS GOING ON)"
Samuel Shock *blind kid trying to play football*
GameHut
(main developer) explain this feature on youtube.
Blast Processing in action XD
Should be Randy Newman/Allister Brimble.
Newman composed for the actual movie,while Brimble converted the music.
Great video! This wold make a great series of videos really digging into the Genesis sound chip. Fascinating. Would love to here your thoughts on Hitoshi Sakamoto's incredible Gauntlet 4 soundtrack.
+Nick Thuren Check out his cover of "Anvil of Crom".
+SpiralPegasus So good I almost punched a camel.
6:10 Write "Toy Story's Hardware Defying Music - How We Did It" a few secrets was explain in there
Although Genesis/MegaDrive didn’t have advanced sound hardware like the SNES had it made the sound designers take very creative paths to achieve beautiful sounds on the Genesis/MegaDrive
Your comment on the Toy Story music definitely had me laughing.
Nicely informative exploration.
I don't know why, but I liked the way drums sound in Micro Machines TT.
Funnily I don't think they actually sounded any different in the PC version... the audio driver was probably fine, they were just really poor samples for some reason!
me too
The thing with contra actually is it was found to be adjusting the pitch and volume while mixing 4 channels simultainously for all the sound effects and music so it doesn't get drowned out. But sound effects will sometimes drain out others from overflow
Dynamite Headdy RULES!!
dude I so need those Skitchin guitars in soundfont form D:
One of the amazing things of modern day is Markeyjester's crystal clear DualPCM DAC driver, which is beautiful. I have always wondered what some games would sound like with superclear samples, like Ristar, Sonic 3, and others.
But in all seriousness, Sonic 3 was not all that clear really, especially listening to the Michael Jackson voice samples.
If only I understood these things from a technical standpoint. I would love to make songs almost purely of samples for the fun of it.
Agreed on Sonic 3. That's why I, unpopular opinion, think Sonic 3 has one of my least favorite Sonic OSTs ever made, only behind Chronicles and Boom RoL of course. I'm sorry, but I just think the entire game was overrated.
Sonic 3 did at least set the PCM channel to left or right on occasion, most Mega Drive games didn't even go that far so at least that's something. The obvious example of this is Hydrocity Zone Act 2.
@@stephandolby Sonic 3 is actually my favourite soundtrack of the series, especially the first six zones and Sonic 3 alone's exclusive themes.
What does DualPCM do then? I assume uses the regular channel with volume manipulation of either PSG or FM channels to add in missing LSBs and improve the dynamic range?
@@solarflare9078 there's no way you compared 3 soundtrack to sonic boom rise of lyric for me it's a really good soundtrack and I don't know why the PCM samples are what determines the quality of a game OST even though sonic 2 had some pretty low quality samples compared to 1 and 3 samples are better and more creative than 2 and 1 which are just snare drums so yeah can't see how that game OST is bad to you but I guess 🤷♂️
Dangit. I need to hear the rest of the "riders of doom" you made..... Sounds good!
Skitchin guitars were so good. I had a feeling the toy story track was recorded or sampled in as full track from another source- but now question is can a bunch of other music be done like that and modded to sound just as good- and does it eat up memory?
Toy Story actually mixes the 4 Amiga MOD channels to the 1 channel on the fly with a driver in the game
@@RWL2012 at what khz and bit?
@@rustymixer2886 around 10K hz or something like that.
@@crimson-foxtwitch2581 ah ok thx
@@rustymixer2886 It’s actually 8 KHz
Insta-LOL at 6:10 when you know the trick. ;)
What track is used in the very beginning, before the sonic loops?
It seems to be a cover of the track "Battle of the Mounds" from the Conan the Barbarian OST, which cover, unfortunately for us, seems to still be unreleased. You can hear the snippet from Conan in question by following this link: ua-cam.com/video/3bh63oQKdus/v-deo.html and going to 1:56
This info was posted somewhere below but I'm paraphrasing and condensing from multiple sources and posting here for visibility
Now I really wanna hear that music, holy crap
@@zacharybrown3010 It's more likely a cover of the intro theme to Alternate Reality: The City and Alternate Reality: The Dungeon, which was itself an homage to the Conan movie soundtrack. It was released on a ton of microcomputers back in the day. The track didn't translate well to the Amiga but the Atari 8-bit home computer and C64 versions are legendary.
@@emmettturner9452 It's very clearly more like the conan track.
Does anyone know how to recreate these playback effects using VSTs? Throw some reverb onto these and they'd work great if you input uncanny, unsettling sounds
Upload the whole intro, please.. it is amazing!
I like how, in Toy Story, only the title screen and credits musics are sampled like this
Sonic the Next Level has sampled music during actual gameplay (meaning in addition to the game running + some sound effects).
Yeah but that was based off Tweaker's own music engine.
Yeah, but Traveller's Tales still had quite a good handle on the Mega Drive to get that stuff, and other things besides, to work on the same game. They even managed sprite scaling.
+Purple
Trolling?
Anyway it's because it was the earliest attempt like this on Mega Drive and it's already pretty cool! But, as it has already been pointed out, the Mega Drive can handle streamed music during gameplay, alongside sound fx, as Sonic the Next Level does. And Markey Jester, the author of said demo, recently upgraded his sound engine... :)
They aren't sampled, but 4 MIDI-like channels mixed into the DAC.
Zilog plays the sample, while the FM channel 6 acts as DAC.
4:51 YOOOO!
Please, PLEASE release the Battle of the Mounds! And if you don't, then to hell with you! :D :D
Jeff Dyck is a god. FIFA '95 is similar to Skitchin' in execution but one of the drum sounds has reverb, plus the guitar is down and dirty.
I didn't even know the DAC could exist anywhere outside of a mono sound space, so Atomic Runner and Dynamite Headdy are a huge surprise.
I believe the sample channel works like any other FM channel on the 2612, meaning that it can play left, right, or both at once. As long as the sample channel is playing one sample at a time, it can alternate this way.
I have to ask about that music in the intro; I know its from the soundtrack to Conan the Barbarian. Did you arrange that? Otherwise, who did that? Cuz its fucking amazing
Arf, I expected to find the ref of that track in the comments... Cuz it's indeed amazing.
MastaGambit, Savaged Regime produced that himself. Look at his Videos for Anvil of Crom. The dude's a beast; there are some good modern YM2612 composers out there, but he may be the best. Also check out his renditions of Ken's theme from SFII and Theme of Simon from Super Castlevania IV.
+Nathan Daniels
But Masta and I want the music that plays here, during the first 50 sec of the vid (and which doesn't appear in his Anvil of Crom cover). It's so epic and beautiful...
Oops! can't help you there. It IS amazing.....
+Nathan Daniels
Let's hope it's one of Savaged Regime's future uploads :)
Fifa 1 and Fifa 95 are also great tonal sample examples, both by Jeff Dyck using the same driver as Skitchin (Kevin Pickell's EA sound driver, mostly used in EA Sports games, possibly the one in NBA Live).
4:40 I started singing the pink panther theme to that beat
So similar!
😂
Dat Toy Story track was the icing on the cake!
No Mega Turrican? I'm _so dissapointed_ :(
mega turrican's drums sound really clean
I recall Mega Turricane having some of the best samples found on this console
Thanks for helping to kill the myths; I can just link now instead of saying it. Most of the cleanest examples here, besides Matt Furniss' work, come from Data East titles: Atomic Runner, Side Pocket, Vapor Trail; others not included are Mega Turrican and High Seas Havoc. And yeah, Ristar's DAC was my only disappointment with that soundtrack; same for Sonic 3&K. What we need now is more insight on HOW. Did anyone try importing a really slow sample and then play back an octave higher, for example? Streaming tricks with certain drivers, superior compression methods, what? Someone explain "YOU'VE GOT A SECRET BONUS POINT!"
JoseBronxRican u
konakonaa Sample playback is actually pretty great for the most part in GEMS (See also: 2:46). In fact, it's the one thing that sound driver does right.
@@solarflare9078 The only real issue with GEMS was the dogshit stock patches and samples that most composers didn't have the knowledge to swap out. Sonic Spinball and most games scored by Drossin use GEMS (being lead dev on the project helps a bit), Ecco the Dolphin (and the sequel?), probably a few other classics you don't think about because they aren't hitting you with the fart bass constantly
@@shukterhousejive Yeah you're right, alot of devs liked using that ''AHa Take On Me'' bass patch for their GEMS osts. Chakan, Barbie and Ballz 3D are some of the worst sounding GEMS you could listen to.
@@shukterhousejive Ecco didn't use GEMS, and neither did Barbie @Adrian. Ecco used Novatrade's in-house driver and Barbie used Sound Images, iirc
alien soldier had some damn good sounds
Thanks for the informative video, it provided great insight on the sound capabilities of the Sega Genesis/Mega Drive. Also, the Riders of Doom arrangement was phenomenal!!
If you were a sampling guy who makes your own music from samples I'd imagine playing with these could be a good challange to make a good unique tune from.
It all comes down to knowing how to use the system to its advantages!
Shit like this makes me wanna go back to making music, if I had the equipment again
Edit: I got my equipment back, so that's great CX
Where can we find this amazing version of the Battle of the Mounds used in the beginning of the video?
An homage was used in Alternate Reality: The City and Alternate Reality: The Dungeon main title themes but this is likely an homage to/remix of that. Granted, I haven't heard every possible version of Alternate Reality since it was released on nearly every microcomputer (Atari 8-bit, Atari ST, C64, Amiga, Apple II, DOS, etc).
Everyone else’s dreams: flying, finding the loved one of someone’s dreams, getting rich, ETC
My dreams, for no reason whatsoever: 2:15 - 2:31
In the right hands this instrument sounded better than the snes non instrument samples imo
I'd like to hear a full version of your Battle of the Mounds arrangement.
That's probably gonna be epic.
nobody gonna talk about how 2:24 goes so damn *HARD*
When is that song in the intro gonna be released???
The people want to know!
I wonder, which driver does the famous "Simon Wai" prototype of Sonic 2 use?
It uses an early version of Sonic 2's sound driver, which is actually a Z80 port of Sonic 1's 68k driver.
During those interruptions, I believe the FM and PSG sound driver is running, that's why the Z80 can't stream PCM data during that period.
+za909returns yep, most sound drivers run a loop on the z80 that streams the sample data to the DAC channel, and when the vblank interrupt occurs the code that updates the FM and PSG channels is run. some drivers do those updates with the 68000, which allows the z80 to keep running the sample loop throughout. fully z80 based drivers have to pause the sample loop to update the other channels.
there are trade offs either way, partially 68000 based drivers allow for slightly better quality samples, fully z80 based frees up a bit more cpu time on the 68000 for gameplay
Crash
I imagine with some very hard work and a thoughtfully designed FM and PSG routine you could still keep the PCM running, but you'd have to manually time runs of the sample updater while doing your FM and PSG stuff... So a sample should be output to the DAC every x clock cycles, and therefore you have to call the same routine that is normally running during the rest of the frame. Sucks that the Z80 only has one interrupt available.
This idea sounds like a nightmare to implement, kind of like doing anything on the Atari 2600.
how do you cycle count effectively in a sound driver with 10+ channels? not every channel updates every frame. 90% of frames will have no channel commands issued, then all of a sudden almost all channels will be updated on the same frame. Do you just waste the cpu time required to update every channel on every frame? do you only allow 1 or 2 channels to be updated per frame? there's not really an optimal solution to this without introducing some severe restrictions on the music composer
As long as the time difference between those successive samples output during the sound driver execution isn't that great, it shouldn't be that noticeable. At the very least it should be better than no output at all during that period.
there's another proven option: a big old ram buffer that gets streamed to the dac channel. i don't think it was ever used back in the day, but in modern times multiple people (stef, markeyjester) have made drivers that use a buffer to 1) avoid dma bus contention 2) software mix multple dac samples 3) fuckin just be cool as fuck
Most VGMs like Ristar, NBA Live '95, Skitchin', and Toy Story(Toytitle) probably uses MOD-based audio. I love the Toytitle.mod!!!!.😍😍💕💞💕💞💕
and I'm sure people downloaded the audio of this video to use in their own MOD tunes :D
@@bsdims idk where to download its separate wav/flac samples?. maybe you need amiga music trackers to rip it like openmpt, and many more.
@@user-ql2re2es9y you can just download this video's audio, plop it into the samples tab in OpenMPT, select a portion, copy to a new sample, crop off and loop here and there, save, have fun (oh yeah, and tune your samples to C- if they're not percussion) :)
2:06 It uses the PSG chip for sample playback? Wow, that's incredible! How does it work?
TheRedFox I can't give a technical explanation but by using all the psg sound channels you can play pcm samples, or something similar. There were a few Master System games that used the trick but the music had to cut out briefly for the sample to play.
There are videos on UA-cam that compile examples of this from Master System games.
Ok, thank you!
Basically if you set a channel to one of the frequency extremes (can't remember if max or min, but it doesn't really matter for now), it will hold the square wave output as a steady "on", and then you can directly control the sample value by changing the channel volume. Think it might even be by design (or a happy accident they decided to leave in) and mentioned in the data sheets. Works similarly for both the SN7 PSG and the more common AY8910/YM2149.
It's kinda crude and only really has 4 to 5 bits of resolution (made both worse and better by the volume being logarithmic not linear), and any kind of decent sample rate murders the CPU, but it's better than no PCM at all and can be quite effective in the right circumstances.
Plus, and IDK if it's doable or was ever used on the MD, there are additional techniques - particularly for the 2149 - which can improve the apparent bit depth somewhat, by using all three channels and adjusting their volume independently, which can give you an extra bit and a half or so of dynamics, but that puts even more demand on the bus and can't really be used for live mixing (rather than straight replay of specially encoded samples or looping pieces of music) because the order in which you address each channel becomes crucial and really needs to be worked out algorithmically ahead of time on a much more powerful computer...
matt furniss does good job
the drums on power rangers the movie are perfect and real. also the bass on top gear as well
Since the 68000 could access the sound chips, you could just use the Z80 to drive PCM and the 68000 to drive everything else. Or you could use intricite code.
Of course you didn't know that *Barkley shut up and Jam! 2* have some few instrument Sax, Jazz, sounds and hip hop drum beats only for the PCM as well.
Good idea with this video by the way.
could you please tell me the name of the song at the start of the video i just really love it please
I wonder if the Unreal Gold soundtrack could be mixed in software to play on the Mega Drive.
4:12 sounds like Brinstar's theme from Super Metroid
*opens MODtracker*
thanx for the idea fam lol
*6:12** I love how the editor is completely confused after realizing what he's hearing is said to be impossible.* 😅
street racer is cleaner sounding than i knew was capable by the system
Atomic runner ftw!
What is the intro music? It sounds like something composed by Hitoshi Sakimoto
sparkster7744 16 bit version of Battle of the mounds, from the Conan The Barbarian movie
@@willthomas2310 ...and the main theme to Alternate Reality.
4:33 Windows' native MIDI driver, is that you?
Sound like generic synth keyboard cymbals to me... Though which generation of windows (and PC sound hardware) are we talking about?
I'm thinking of Windows 98 or 2000's.
Name of the song in the beginning
Does anyone know the song that first played is and where it’s from?
I got 1000 words to say how amezing it is that the genesis can pull off. Such great pcm sound, if developers just doing it right, it can be on par with with gba sound,but because game developers were sooo greedy on saving money, they decided too lower down the quality of samples to save space.
Or they even decided to use the psg chip for pcm sound to save a heaviy load on the cpu chip and to save bankwidch.
Nowaday's memory space is no longer an issue so now we can upgrade games to fully pull off the real power off the genesis,like as proven with hacked versions of altered beast & streetfighter 2.
Genesis does what Nintendon’t: figure out how to play Amiga music using a single sample channel
Cuz snes dont need to skeet, its already sample based unlike md
@@LevskiBADBOY heck, its even got several strides on the Amiga in all ways except for amount of sample/score memory, unless you're one of those clever types who've figured out livestreaming of fresh data to the SPC700 whilst it's still playing... More channels, full coprocessor rather than just a DMA mule, etc...
Yes so great sounds
That Toy Story track is great, those are some phat amiga-esque samples. Here's the original MOD. ua-cam.com/video/kKTjQCtGu_U/v-deo.html
+Hal Coley Well, it is a (converted?) 4 channel MOD file, after all (the original file is actually tied in with the credits theme). Funny thing is that the song is listed in this video as being by Randy Newman, while the MOD file is listed as being by Allister Brimble. Not sure who's correct here.
+Scooblee It's composed by Allister Brimble. Randy Newman did the soundtrack to the actual movie. xD
+Scooblee Randy Newman, arr. Allister Brimble.
Strange Things for the Start Menu; Friend in Me for the Credits.
Feel free to look up Toy Story in the Mod Archive! :D
In Earthworm Jim more PCM samples.
Yo what was that first song in this vid?
ThaKoolest 16 bit version of Battle of the mounds, from the Conan The Barbarian movie
@@willthomas2310 ...and Alternate Reality main/title theme.
Speaking of which, seeing how After Burner II used the SN76489 to play the PCM samples...
How hard would it be for the SMS to do that? Whenever it plays voice samples in most games I have played on it, it seems to freeze up while playing them sadly. Why is that?
Instead of using a separate cpu, the Z80 IS the cpu, costing a lot of cpu time.
The Megadrive effectively has an entire SMS built into it, dedicated to reading the joypads and playing music, pretty much. It can be completely maxed out doing that, so consider what would happen if you tried to play a game at the same time without the rest of the MD bolted on. It really doesn't have that much processing ability and was never meant to have any sample ability at all, hence the offering of the FM module in Japan...
Any machine that managed such things was either 68000 based / using some equivalent 16-bit setup, or had an audio coprocessor. Sometimes both...
The genesis just needs more cart space and a better engine to playback amazing sample quality
toystoryはPCMに丸ごと音楽ぶち込んだのか・・・
2:00 So this uses the PSG chip for sample playback... Interesting...
Viola e Pietro Games 1000 how’s it even possible when the PSG has no PCM channel?
@@RyDawg96 the Game Boy manages the same thing
@@RWL2012 difference being that the gameboy has a wave channel. Which can morph into anything you want within 0 to 15 registers (you can stack multiple to achieve a sample)
this is great!
Domdomdomdomdomdomdom. Kuma!
5:47 that actually sounds a bit snes like , thats actually impressive
Yes quite as good this time
Gba style
The toy story song reminds me Beach Boys - Heroes and Villans
Really? It kinda reminds me of Strange Things..... oh wait
What is the name of the song at the beginning of the video
6:10 wow! They were able to reproduce an entire song
Toy Story has a driver that barely plays an Amiga MOD file and sends it pre-mixed to the PCM channel. the CPU is too weak to run this track (and the one other one like this) in-game, so they're only used on title and credits screens.
ironically the in-game tracks don't even properly use the OPN FM, and are OPL-sounding FM done with the infamous GEMS driver!
@@RWL2012 I see
@@miguelalbuquerque8450 there's a video explaining how it was done, search "Toy Story impossible music"
@@RWL2012 Actually, GEMS still lets you customize the different OPN patches. It's an extremely flexible sound driver, even moreso than Sound-Sorce/SMPS in a lot of aspects. It's up to the developers to configure them and squeeze the most out of it, which most didn't do at all.
2:32 Russian hardbass?
wheeze, needs more fade-out
quick question, what if sega would have used the ym2608 would the 3.5mhz z80 be enough for that sound chip
But the YM2612 was already enough from the start. Lazy and/or inexpert people will always produce shit results even with the most up to date hardware.
@@marcelopires711 the 2608 is still better, though. But as Sega retained the original SMS hardware and threw in a parallel 68000 and DMA system as well they probably thought it unnecessary to retain that and the PSG parts of it.
Bit of a shame really, even though it did make the machine cheaper. Six PSG channels and two squares (plus the envelope generator and wider frequency range for half of that) instead of a bare 3+1 wouldn't have gone amiss alongside the FM section, nor having a more automated and natively ADPCM capable sample engine... More channels but less CPU load (and the potential of upto six scratchy PCMs alongside the main 8-bit one), what's not to like?
Anyway to answer Jg's original question... What if, indeed. The Z80 should have been entirely capable of feeding instrument and note data to the FM and PSG parts, and PCM would no longer have been as much of a pain and would have sounded much cleaner and more consistent, as to the copro it would have seemed just like another such channel but with a different set of data (all of about seven or eight bytes per instance, or just one or two if repeatedly playing the same thing) going into the registers to initiate the DMA process. After which the sound chip would have been able to bus master during DMA cycles and fetch the much bulkier sample data for itself without any timing jitter.
Which is why it sounded so good in the PC98 et al, and why it's part of a fantasy spec of mine for a better attempt at the Atari STe. You get a lot of capability for minimal CPU load, and it can just drop in place of an existing PSG from the POV of the computer bus and software (and fairly minimal board rework and addition of a DAC on the other side of the hardware bridge). It was actually meant to be used in conjunction with relatively low powered CPUs originally, after all, which wouldn't have had the ability to brute force the samples into a simpler MD style DAC whilst still being able to do something else.
The only problem would likely have been the cost. Yamaha were probably a bit ambitious thinking it would get paired with noddy CPUs, and IRL it was mainly standalone synths/keyboards, arcade machines and higher end home computers that made use of it or anything particularly similar. It was even too pricey to make it into the MD, so it would never have been a practical option for the SMS even if it had been available a little earlier. That's why the SMS FM option is a much simpler and cheaper OPLL instead of an OPNA...
its called soud bitrate. for mono and stereo itself bitrates are different
the only thing that suck is probably the polyphony with the sampler, only one sample single shot at a time, but in game like Skitchin' i wonder how they do that crazy guitar plus drum sound.
I think the guitar and the drums are in one big sample
Actually, 6 bits each.
Probably adding the sample values together then blasting the resulting samples to the Digital Audio Converter.
@@Mizu2023 can be easy trick using an auto chop software like recycle from propellerheads software, back then you can also try with an akai hardware sampler but all sample must converted lofi with the sega sdk.
it really says something when after burner 2, using samples on the psg, has some better sounding samples than super mario bros 3, the nes one, from 1988
I disagree. Mario 3 has low quality samples too, but at least they're clean.
That's because the NES samples are only 1-bit delta compressed, but the PSG can manage at least 4-bit even when used very simply.
(well OK the NES *could* do 8-bit, but that needed both more bus and CPU load, and a lot more storage space in what were generally very cramped cartridges, especially vs the more prestigious of the Megadrive ones)
@@markpenrice6253 The NES can only do up to 7 bits :)
How did you record the audio in separate channels; is that an emulator feature?
You don't have to use periods inside parenthesis.
I need a soundboard of the Sonic 1 or 2 drums... :(
The PSG chip is not capable of playing samples. It has to be rendered by the Master System's CPU.
The MegaDrive/Genesis has a Zilog Z80 CPU (the SMS main CPU)
The CPU has no sound output capability. All it can do is feed data and commands to the sound chip, which has a very rudimentary PCM ability based on setting a channel's note value to zero then rapidly altering its volume to shape the waveform... It's about the same concept as how samples are fed to the 2612, just with lower resolution and some reassignment of register roles.
What is the music in the beginning of this video?
Either Conana Battle of the Mounds or Alternate Reality main/title theme. They are both based on the same track.
Has anyone attempted to fix the audio for the Contra Hardcorps & rerelease the game w/the samples sounding less scratchy?
Does anybody know how NBA Live 95 and Skitchin’ are using multiple samples simultaneously? I have to think they’re using some sort of sound driver to allow for the use of simultaneous samples. That or using both the ym2612 and the sn76489 to play multiple samples, but idk enough about this stuff to know
6:10 - WTF IS GOING ON
I wonder what the intro music is from? Sounds amazing.
+littlevince104 "Battle of the Mounds"
And the remix? :/