mame2003-plus bitstream audio manipulation
-
I'm updating lunar rescue's drivers to use the lastest samples properly instead of piggy backing invaders. I completed this update and it works great but in order to support the bitstream tunes in the handler I manipulated use of sample play because there is no "speaker" support to my knowledge.
This works very well. Basically it's starting a small sample when the bit is called for the bitstream tunes to start which tricks the player into playing the bitstream too as long as your sample size doesn't overwrite the memory the bitstream uses. I didn't want to add more code than I needed for this to work because this workaround does pretty good but I was wondering if there was a way to start the sample player but not pass a sample to it so there is no additional tones added to the bitstream when it plays. Or perhaps a way to turn the speaker on manually other than how I'm doing it? If there's not a way, this works good enough but I figured I'd run it by you two. Here's a link to my update. lrescue - 8080bw_sndhrdw
the code i'm referring to is: bit 0x08
static void lrescue_sh_2_w(int board, int data, unsigned char *last) { int base_channel, base_sample; base_channel = 4 * board; base_sample = 9 * board; if (data & 0x01 && ~*last & 0x01) sample_start (base_channel+1, base_sample+8, 0); /* steph.wav - foot step high */ if (data & 0x02 && ~*last & 0x02) sample_start (base_channel+1, base_sample+7, 0); /* stepl.wav - foot step low */ if (data & 0x04 && ~*last & 0x04) sample_start (base_channel+1, base_sample+4, 0); /* bonus2.wav - count men saved */ if (data & 0x08 && ~*last & 0x08) sample_start (base_channel+3, base_sample+4, 0); /* bitstream tunes - end level and bonus 1 */ if (data & 0x10 && ~*last & 0x10) sample_start (base_channel+3, base_sample+6, 0); /* shootingstar.wav */ if (~data & 0x10 && *last & 0x10) sample_stop (base_channel+3); /* This makes the rescue ship sound beep on and off */ c8080bw_flip_screen_w(data & 0x20); *last = data; }
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.