-
MOD soundtrack using Z80
I recently saw a C64 Demo during which the machine plays a standard 4 channel Amiga module and still has enough raster time left to draw a simple text scroll. Given that the Z80 is considerably faster than the 6502 derivative inside the C64, would it be possible to create a sound driver with a mod player+FM+PSG that uses only the Z80, fully freeing the 68K to do the non sound related stuff? I know Toy Story has a mod player for its title screen and credits, but it sounds like crap.
Demo (Mod player starts at 2:05):
http://youtu.be/ZMioAPZcays?t=2m5s
-
It might be possible but it takes a lot of effort. Tiido should know. Just remember that the genesis usually struggled to play 1 PCM channel (any Technosoft game has abysmal PCM playback), and you're asking it to do 4 with pitch shifting ;).
-
Depends if you're asking for something reasonable, for a playback rate. The bank switching mechanism supposedly hinders fast access across the larger rom space. I think Tiido does 2 channels at ~28khz and 4 channels at half that. Neither are frequency scaled. And I'm not sure if he's doing software volume on each channel or not. He also noted that there's jitter that's more noticeable in some samples (voice?), because there's no interrupt to guide the pcm playback. Well, that and he's doing FM handling as well. It's probably reasonable that you could get the z80 in the Genesis to do 7-8khz 4 channel resampling with soft volume, mixed to the 8bit DAC (and no FM control, that would be on the 68k side). Probably still have some jitter, but at that low rate you probably wouldn't notice it against the aliasing and such.
-
The better option is probably 2 resampled channels + a fixed one or two for drums/sfx. FM can handle the rest. Not a general purpose MOD player but should be great for games.
-
What is Skitchin's sound driver capable of? It sounds like it's doing 3 samples at once at certain points, 2 melodic and 1 percussion.
-
Skitchin can play 4 pcm channels, but only from a single 32KB bank and it doesn't do any pitch shifting. Every guitar note is a different sample (which is why all songs sound so similar, all sounds are crammed into a tiny little space).
-
The problem is indeed the bank switching - SEGA requires you to write the upper 9 bits for the bank address to a serial register ONE BIT AT A TIME. It takes upwards of 100 cycles to switch banks when a single parallel register could have chopped it down to 13 (or less).
I worte a MOD player for the SCD that resamples the instruments to fit into the 64 KB sample ram, so I was thinking about altering that for the MD - have the 68000 handle the music score processing while the Z80 acts as a PCM mixer with a 32 KB sample rom. Many MODs sound fine with their sample resampled down... and many don't. It partly depends on the MOD instruments - a MOD with 3 MB of instruments WILL sound like crap when they're resampled to 64 KB, but a MOD with like 80 to 100 KB of samples sounds great at 64 KB.
-
I'm assuming that playing back PCM sound effects with such a mod player would be impossible (unless they were also stuffed into the same bank).
-
Either way, this basically means this:
http://www.youtube.com/watch?v=xaFnJxlFpVE
Is not only perfectly possible, but with the 68000 backing it, there would be +5 FM and +4 PSG channels helping.
Sounds pretty good to me.
-
That sounds pretty sweet. With the FM and PSG, it would probably be mindblowing.