Beispiel #1
0
static WRITE8_HANDLER( ddrible_vlm5030_ctrl_w )
{
	UINT8 *SPEECH_ROM = memory_region(REGION_SOUND1);
	/* b7 : vlm data bus OE   */
	/* b6 : VLM5030-RST       */
	/* b5 : VLM5030-ST        */
	/* b4 : VLM5300-VCU       */
	/* b3 : ROM bank select   */
	if (sndti_exists(SOUND_VLM5030, 0))
	{
		VLM5030_RST( data & 0x40 ? 1 : 0 );
		VLM5030_ST(  data & 0x20 ? 1 : 0 );
		VLM5030_VCU( data & 0x10 ? 1 : 0 );
		VLM5030_set_rom(&SPEECH_ROM[data & 0x08 ? 0x10000 : 0]);
	}
	/* b2 : SSG-C rc filter enable */
	/* b1 : SSG-B rc filter enable */
	/* b0 : SSG-A rc filter enable */
	if (sndti_exists(SOUND_FILTER_RC, 2))
	{
		filter_rc_set_RC(2,FLT_RC_LOWPASS, 1000,2200,1000,data & 0x04 ? CAP_N(150) : 0); /* YM2203-SSG-C */
		filter_rc_set_RC(1,FLT_RC_LOWPASS, 1000,2200,1000,data & 0x02 ? CAP_N(150) : 0); /* YM2203-SSG-B */
		filter_rc_set_RC(0,FLT_RC_LOWPASS, 1000,2200,1000,data & 0x01 ? CAP_N(150) : 0); /* YM2203-SSG-A */
	}
}
Beispiel #2
0
VLM5030* vlm5030Create(Mixer* mixer, UInt8* voiceData, int length)
{
    VLM5030* vlm5030;

    vlm5030 = (VLM5030*)calloc(1, sizeof(VLM5030));

    vlm5030->mixer = mixer;

    vlm5030->handle = mixerRegisterChannel(mixer, MIXER_CHANNEL_PCM, 0, vlm5030Sync, vlm5030);

    vlm5030_start(FREQUENCY);
    VLM5030_set_rom(voiceData, length);

    theVlm5030 = vlm5030;

    return vlm5030;
}
Beispiel #3
0
static WRITE_HANDLER( ddrible_vlm5030_ctrl_w )
{
	unsigned char *SPEECH_ROM = memory_region(REGION_SOUND1);
	/* b7 : vlm data bus OE   */
	/* b6 : VLM5030-RST       */
	/* b5 : VLM5030-ST        */
	/* b4 : VLM5300-VCU       */
	/* b3 : ROM bank select   */
	VLM5030_RST( data & 0x40 ? 1 : 0 );
	VLM5030_ST(  data & 0x20 ? 1 : 0 );
	VLM5030_VCU( data & 0x10 ? 1 : 0 );
	VLM5030_set_rom(&SPEECH_ROM[data & 0x08 ? 0x10000 : 0]);
	/* b2 : SSG-C rc filter enable */
	/* b1 : SSG-B rc filter enable */
	/* b0 : SSG-A rc filter enable */
	set_RC_filter(2,1000,2200,1000,data & 0x04 ? 150000 : 0); /* YM2203-SSG-C */
	set_RC_filter(1,1000,2200,1000,data & 0x02 ? 150000 : 0); /* YM2203-SSG-B */
	set_RC_filter(0,1000,2200,1000,data & 0x01 ? 150000 : 0); /* YM2203-SSG-A */
}