Steel Talons: Fixed controls and removed the MSP speedup hack which was causing the game to reset at certain points.

This commit is contained in:
Phil Bennett 2012-02-13 18:48:41 +00:00
parent f91cdc62dc
commit 02e2d91b85
3 changed files with 2 additions and 97 deletions

View File

@ -968,10 +968,10 @@ static INPUT_PORTS_START( steeltal )
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) /* up/down */
PORT_START("12BADC2") /* b80000 - 12 bit ADC 2 */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_NAME("Collective") PORT_REVERSE /* collective */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Z ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_NAME("Collective") PORT_REVERSE /* collective */
PORT_START("12BADC3") /* b80000 - 12 bit ADC 3 */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_NAME("Rudder") /* rudder */
PORT_BIT( 0xff, 0x80, IPT_AD_STICK_X ) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_NAME("Rudder") PORT_PLAYER(2) /* rudder */
PORT_INCLUDE( atarijsa_iii ) /* audio board port */
/* steeltal has its own coins */
@ -4180,20 +4180,9 @@ static void steeltal_init_common(running_machine &machine, offs_t ds3_transfer_p
else
state->m_m68k_slapstic_base = state->m_maincpu->memory().space(AS_PROGRAM)->install_legacy_readwrite_handler(0xe0000, 0xfffff, FUNC(st68k_protosloop_r), FUNC(st68k_protosloop_w));
/* synchronization */
state->m_stmsp_sync[0] = &state->m_msp_ram[TOWORD(0x80010)];
state->m_msp->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x80010, 0x8007f, FUNC(stmsp_sync0_w));
state->m_stmsp_sync[1] = &state->m_msp_ram[TOWORD(0x99680)];
state->m_msp->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x99680, 0x9968f, FUNC(stmsp_sync1_w));
state->m_stmsp_sync[2] = &state->m_msp_ram[TOWORD(0x99d30)];
state->m_msp->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x99d30, 0x99d4f, FUNC(stmsp_sync2_w));
/* set up protection hacks */
state->m_gsp_protection = state->m_gsp->memory().space(AS_PROGRAM)->install_legacy_write_handler(0xfff965d0, 0xfff965df, FUNC(hdgsp_protection_w));
/* set up msp speedup handlers */
state->m_msp->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x80020, 0x8002f, FUNC(stmsp_speedup_r));
/* set up adsp speedup handlers */
state->m_adsp->memory().space(AS_DATA)->install_legacy_read_handler(0x1fff, 0x1fff, FUNC(hdadsp_speedup_r));
state->m_adsp->memory().space(AS_DATA)->install_legacy_read_handler(0x1f99, 0x1f99, FUNC(hdds3_speedup_r));

View File

@ -53,7 +53,6 @@ public:
UINT32 * m_adsp_pgm_memory;
UINT16 * m_gsp_protection;
UINT16 * m_stmsp_sync[3];
UINT16 * m_gsp_speedup_addr[2];
offs_t m_gsp_speedup_pc;
@ -215,9 +214,6 @@ WRITE16_HANDLER( hdgsp_io_w );
WRITE16_HANDLER( hdgsp_protection_w );
WRITE16_HANDLER( stmsp_sync0_w );
WRITE16_HANDLER( stmsp_sync1_w );
WRITE16_HANDLER( stmsp_sync2_w );
/* ADSP board */
READ16_HANDLER( hd68k_adsp_program_r );
@ -290,7 +286,6 @@ WRITE16_HANDLER( rdgsp_speedup1_w );
/* MSP optimizations */
READ16_HANDLER( hdmsp_speedup_r );
WRITE16_HANDLER( hdmsp_speedup_w );
READ16_HANDLER( stmsp_speedup_r );
/* ADSP optimizations */
READ16_HANDLER( hdadsp_speedup_r );

View File

@ -671,59 +671,6 @@ WRITE16_HANDLER( hdgsp_protection_w )
}
/*************************************
*
* MSP synchronization helpers
*
*************************************/
static TIMER_CALLBACK( stmsp_sync_update )
{
harddriv_state *state = machine.driver_data<harddriv_state>();
int which = param >> 28;
offs_t offset = (param >> 16) & 0xfff;
UINT16 data = param;
state->m_stmsp_sync[which][offset] = data;
device_triggerint(state->m_msp);
}
INLINE void stmsp_sync_w(address_space *space, offs_t offset, UINT16 data, UINT16 mem_mask, int which)
{
harddriv_state *state = space->machine().driver_data<harddriv_state>();
UINT16 newdata = state->m_stmsp_sync[which][offset];
COMBINE_DATA(&newdata);
/* if being written from the 68000, synchronize on it */
if (state->m_hd34010_host_access)
space->machine().scheduler().synchronize(FUNC(stmsp_sync_update), newdata | (offset << 16) | (which << 28));
/* otherwise, just update */
else
state->m_stmsp_sync[which][offset] = newdata;
}
WRITE16_HANDLER( stmsp_sync0_w )
{
stmsp_sync_w(space, offset, data, mem_mask, 0);
}
WRITE16_HANDLER( stmsp_sync1_w )
{
stmsp_sync_w(space, offset, data, mem_mask, 1);
}
WRITE16_HANDLER( stmsp_sync2_w )
{
stmsp_sync_w(space, offset, data, mem_mask, 2);
}
#if 0
#pragma mark -
#pragma mark * ADSP BOARD
@ -1843,32 +1790,6 @@ WRITE16_HANDLER( hdmsp_speedup_w )
}
READ16_HANDLER( stmsp_speedup_r )
{
harddriv_state *state = space->machine().driver_data<harddriv_state>();
/* assumes: stmsp_sync[0] -> $80010, stmsp_sync[1] -> $99680, stmsp_sync[2] -> $99d30 */
if (state->m_stmsp_sync[0][0] == 0 && /* 80010 */
state->m_stmsp_sync[0][1] == 0 && /* 80020 */
state->m_stmsp_sync[0][2] == 0 && /* 80030 */
state->m_stmsp_sync[0][3] == 0 && /* 80040 */
state->m_stmsp_sync[0][4] == 0 && /* 80050 */
state->m_stmsp_sync[0][5] == 0 && /* 80060 */
state->m_stmsp_sync[0][6] == 0 && /* 80070 */
state->m_stmsp_sync[1][0] == 0 && /* 99680 */
state->m_stmsp_sync[2][0] == 0xffff && /* 99d30 */
state->m_stmsp_sync[2][1] == 0xffff && /* 99d40 */
state->m_stmsp_sync[2][2] == 0 && /* 99d50 */
cpu_get_pc(&space->device()) == 0x3c0)
{
state->m_msp_speedup_count[0]++;
device_spin_until_interrupt(&space->device());
}
return state->m_stmsp_sync[0][1];
}
#if 0
#pragma mark -
#pragma mark * ADSP OPTIMIZATIONS