Converted gottlieb speech driver to use polling for SP0250 DRQ line.

This commit is contained in:
Aaron Giles 2008-12-31 02:26:22 +00:00
parent c5915ad2e5
commit a08644c8ff

View File

@ -6,6 +6,7 @@
***************************************************************************/ ***************************************************************************/
#include "driver.h" #include "driver.h"
#include "debugger.h"
#include "cpu/m6502/m6502.h" #include "cpu/m6502/m6502.h"
#include "machine/6532riot.h" #include "machine/6532riot.h"
#include "sound/samples.h" #include "sound/samples.h"
@ -30,7 +31,6 @@ static UINT8 nmi_rate;
static UINT8 nmi_state; static UINT8 nmi_state;
static UINT8 speech_control; static UINT8 speech_control;
static UINT8 sp0250_drq;
static UINT8 last_command; static UINT8 last_command;
static UINT8 *dac_data; static UINT8 *dac_data;
@ -470,16 +470,9 @@ static WRITE8_HANDLER( nmi_rate_w )
* *
*************************************/ *************************************/
static void sp0250_drq_callback(int level)
{
sp0250_drq = (level == ASSERT_LINE) ? 1 : 0;
}
static CUSTOM_INPUT( speech_drq_custom_r ) static CUSTOM_INPUT( speech_drq_custom_r )
{ {
/* this is reflected by a bit in the input port */ return sp0250_drq_r();
return sp0250_drq;
} }
@ -554,7 +547,6 @@ static SOUND_START( gottlieb2 )
state_save_register_global(machine, nmi_rate); state_save_register_global(machine, nmi_rate);
state_save_register_global(machine, nmi_state); state_save_register_global(machine, nmi_state);
state_save_register_global(machine, speech_control); state_save_register_global(machine, speech_control);
state_save_register_global(machine, sp0250_drq);
state_save_register_global(machine, last_command); state_save_register_global(machine, last_command);
} }
@ -588,19 +580,6 @@ ADDRESS_MAP_END
/*************************************
*
* Rev. 2 sound interfaces
*
*************************************/
static const struct sp0250_interface sp0250_interface =
{
sp0250_drq_callback
};
/************************************* /*************************************
* *
* Rev. 2 machine driver * Rev. 2 machine driver
@ -614,7 +593,7 @@ MACHINE_DRIVER_START( gottlieb_soundrev2 )
MDRV_CPU_ADD("speech", M6502, SOUND2_CLOCK/4) MDRV_CPU_ADD("speech", M6502, SOUND2_CLOCK/4)
MDRV_CPU_PROGRAM_MAP(gottlieb_speech2_map,0) MDRV_CPU_PROGRAM_MAP(gottlieb_speech2_map,0)
/* sound hardware */ /* sound hardware */
MDRV_SOUND_START( gottlieb2 ) MDRV_SOUND_START( gottlieb2 )
@ -631,7 +610,6 @@ MACHINE_DRIVER_START( gottlieb_soundrev2 )
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15) MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15)
MDRV_SOUND_ADD("sp", SP0250, SOUND2_SPEECH_CLOCK) MDRV_SOUND_ADD("sp", SP0250, SOUND2_SPEECH_CLOCK)
MDRV_SOUND_CONFIG(sp0250_interface)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_DRIVER_END MACHINE_DRIVER_END