mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
firebeat cleanup (no whatsnew)
This commit is contained in:
parent
7e4c4a50f2
commit
1ef4d3a626
@ -186,6 +186,38 @@ public:
|
||||
UINT32 screen_update_firebeat_0(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_firebeat_1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
INTERRUPT_GEN_MEMBER(firebeat_interrupt);
|
||||
DECLARE_READ32_MEMBER(gcu0_r);
|
||||
DECLARE_WRITE32_MEMBER(gcu0_w);
|
||||
DECLARE_READ32_MEMBER(gcu1_r);
|
||||
DECLARE_WRITE32_MEMBER(gcu1_w);
|
||||
DECLARE_READ32_MEMBER(input_r);
|
||||
DECLARE_READ32_MEMBER(sensor_r );
|
||||
DECLARE_READ32_MEMBER(flashram_r);
|
||||
DECLARE_WRITE32_MEMBER(flashram_w);
|
||||
DECLARE_READ32_MEMBER(soundflash_r);
|
||||
DECLARE_WRITE32_MEMBER(soundflash_w);
|
||||
DECLARE_READ32_MEMBER(atapi_command_r);
|
||||
DECLARE_WRITE32_MEMBER(atapi_command_w);
|
||||
DECLARE_READ32_MEMBER(atapi_control_r);
|
||||
DECLARE_WRITE32_MEMBER(atapi_control_w);
|
||||
DECLARE_READ32_MEMBER(comm_uart_r);
|
||||
DECLARE_WRITE32_MEMBER(comm_uart_w);
|
||||
DECLARE_READ32_MEMBER(cabinet_r);
|
||||
DECLARE_READ32_MEMBER(keyboard_wheel_r);
|
||||
DECLARE_READ32_MEMBER(midi_uart_r);
|
||||
DECLARE_WRITE32_MEMBER(midi_uart_w);
|
||||
DECLARE_READ32_MEMBER(extend_board_irq_r);
|
||||
DECLARE_WRITE32_MEMBER(extend_board_irq_w);
|
||||
DECLARE_WRITE32_MEMBER(lamp_output_w);
|
||||
DECLARE_WRITE32_MEMBER(lamp_output_kbm_w);
|
||||
DECLARE_WRITE32_MEMBER(lamp_output_ppp_w);
|
||||
DECLARE_WRITE32_MEMBER(lamp_output2_w);
|
||||
DECLARE_WRITE32_MEMBER(lamp_output2_ppp_w);
|
||||
DECLARE_WRITE32_MEMBER(lamp_output3_w);
|
||||
DECLARE_WRITE32_MEMBER(lamp_output3_ppp_w);
|
||||
DECLARE_READ32_MEMBER(ppc_spu_share_r);
|
||||
DECLARE_WRITE32_MEMBER(ppc_spu_share_w);
|
||||
DECLARE_READ16_MEMBER(spu_unk_r);
|
||||
};
|
||||
|
||||
|
||||
@ -708,29 +740,29 @@ static void GCU_w(running_machine &machine, int chip, UINT32 offset, UINT32 data
|
||||
}
|
||||
}
|
||||
|
||||
static READ32_HANDLER(gcu0_r)
|
||||
READ32_MEMBER(firebeat_state::gcu0_r)
|
||||
{
|
||||
return GCU_r(space.machine(), 0, offset, mem_mask);
|
||||
}
|
||||
|
||||
static WRITE32_HANDLER(gcu0_w)
|
||||
WRITE32_MEMBER(firebeat_state::gcu0_w)
|
||||
{
|
||||
GCU_w(space.machine(), 0, offset, data, mem_mask);
|
||||
}
|
||||
|
||||
static READ32_HANDLER(gcu1_r)
|
||||
READ32_MEMBER(firebeat_state::gcu1_r)
|
||||
{
|
||||
return GCU_r(space.machine(), 1, offset, mem_mask);
|
||||
}
|
||||
|
||||
static WRITE32_HANDLER(gcu1_w)
|
||||
WRITE32_MEMBER(firebeat_state::gcu1_w)
|
||||
{
|
||||
GCU_w(space.machine(), 1, offset, data, mem_mask);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static READ32_HANDLER(input_r)
|
||||
READ32_MEMBER(firebeat_state::input_r)
|
||||
{
|
||||
UINT32 r = 0;
|
||||
|
||||
@ -750,7 +782,7 @@ static READ32_HANDLER(input_r)
|
||||
return r;
|
||||
}
|
||||
|
||||
static READ32_HANDLER( sensor_r )
|
||||
READ32_MEMBER(firebeat_state::sensor_r )
|
||||
{
|
||||
if (offset == 0)
|
||||
{
|
||||
@ -762,62 +794,59 @@ static READ32_HANDLER( sensor_r )
|
||||
}
|
||||
}
|
||||
|
||||
static READ32_HANDLER(flashram_r)
|
||||
READ32_MEMBER(firebeat_state::flashram_r)
|
||||
{
|
||||
firebeat_state *state = space.machine().driver_data<firebeat_state>();
|
||||
UINT32 r = 0;
|
||||
if (ACCESSING_BITS_24_31)
|
||||
{
|
||||
r |= (state->m_flash[0]->read((offset*4)+0) & 0xff) << 24;
|
||||
r |= (m_flash[0]->read((offset*4)+0) & 0xff) << 24;
|
||||
}
|
||||
if (ACCESSING_BITS_16_23)
|
||||
{
|
||||
r |= (state->m_flash[0]->read((offset*4)+1) & 0xff) << 16;
|
||||
r |= (m_flash[0]->read((offset*4)+1) & 0xff) << 16;
|
||||
}
|
||||
if (ACCESSING_BITS_8_15)
|
||||
{
|
||||
r |= (state->m_flash[0]->read((offset*4)+2) & 0xff) << 8;
|
||||
r |= (m_flash[0]->read((offset*4)+2) & 0xff) << 8;
|
||||
}
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
r |= (state->m_flash[0]->read((offset*4)+3) & 0xff) << 0;
|
||||
r |= (m_flash[0]->read((offset*4)+3) & 0xff) << 0;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
static WRITE32_HANDLER(flashram_w)
|
||||
WRITE32_MEMBER(firebeat_state::flashram_w)
|
||||
{
|
||||
firebeat_state *state = space.machine().driver_data<firebeat_state>();
|
||||
if (ACCESSING_BITS_24_31)
|
||||
{
|
||||
state->m_flash[0]->write((offset*4)+0, (data >> 24) & 0xff);
|
||||
m_flash[0]->write((offset*4)+0, (data >> 24) & 0xff);
|
||||
}
|
||||
if (ACCESSING_BITS_16_23)
|
||||
{
|
||||
state->m_flash[0]->write((offset*4)+1, (data >> 16) & 0xff);
|
||||
m_flash[0]->write((offset*4)+1, (data >> 16) & 0xff);
|
||||
}
|
||||
if (ACCESSING_BITS_8_15)
|
||||
{
|
||||
state->m_flash[0]->write((offset*4)+2, (data >> 8) & 0xff);
|
||||
m_flash[0]->write((offset*4)+2, (data >> 8) & 0xff);
|
||||
}
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
state->m_flash[0]->write((offset*4)+3, (data >> 0) & 0xff);
|
||||
m_flash[0]->write((offset*4)+3, (data >> 0) & 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
static READ32_HANDLER(soundflash_r)
|
||||
READ32_MEMBER(firebeat_state::soundflash_r)
|
||||
{
|
||||
firebeat_state *state = space.machine().driver_data<firebeat_state>();
|
||||
UINT32 r = 0;
|
||||
fujitsu_29f016a_device *chip;
|
||||
if (offset >= 0 && offset < 0x200000/4)
|
||||
{
|
||||
chip = state->m_flash[1];
|
||||
chip = m_flash[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
chip = state->m_flash[2];
|
||||
chip = m_flash[2];
|
||||
}
|
||||
|
||||
offset &= 0x7ffff;
|
||||
@ -841,17 +870,16 @@ static READ32_HANDLER(soundflash_r)
|
||||
return r;
|
||||
}
|
||||
|
||||
static WRITE32_HANDLER(soundflash_w)
|
||||
WRITE32_MEMBER(firebeat_state::soundflash_w)
|
||||
{
|
||||
firebeat_state *state = space.machine().driver_data<firebeat_state>();
|
||||
fujitsu_29f016a_device *chip;
|
||||
if (offset >= 0 && offset < 0x200000/4)
|
||||
{
|
||||
chip = state->m_flash[1];
|
||||
chip = m_flash[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
chip = state->m_flash[2];
|
||||
chip = m_flash[2];
|
||||
}
|
||||
|
||||
offset &= 0x7ffff;
|
||||
@ -1217,7 +1245,7 @@ static void atapi_control_reg_w(running_machine &machine, int reg, UINT16 data)
|
||||
|
||||
|
||||
|
||||
static READ32_HANDLER( atapi_command_r )
|
||||
READ32_MEMBER(firebeat_state::atapi_command_r )
|
||||
{
|
||||
UINT16 r;
|
||||
// printf("atapi_command_r: %08X, %08X\n", offset, mem_mask);
|
||||
@ -1233,7 +1261,7 @@ static READ32_HANDLER( atapi_command_r )
|
||||
}
|
||||
}
|
||||
|
||||
static WRITE32_HANDLER( atapi_command_w )
|
||||
WRITE32_MEMBER(firebeat_state::atapi_command_w )
|
||||
{
|
||||
// printf("atapi_command_w: %08X, %08X, %08X\n", data, offset, mem_mask);
|
||||
|
||||
@ -1248,7 +1276,7 @@ static WRITE32_HANDLER( atapi_command_w )
|
||||
}
|
||||
|
||||
|
||||
static READ32_HANDLER( atapi_control_r )
|
||||
READ32_MEMBER(firebeat_state::atapi_control_r )
|
||||
{
|
||||
UINT16 r;
|
||||
// printf("atapi_control_r: %08X, %08X\n", offset, mem_mask);
|
||||
@ -1265,7 +1293,7 @@ static READ32_HANDLER( atapi_control_r )
|
||||
}
|
||||
}
|
||||
|
||||
static WRITE32_HANDLER( atapi_control_w )
|
||||
WRITE32_MEMBER(firebeat_state::atapi_control_w )
|
||||
{
|
||||
if (ACCESSING_BITS_16_31)
|
||||
{
|
||||
@ -1280,7 +1308,7 @@ static WRITE32_HANDLER( atapi_control_w )
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static READ32_HANDLER( comm_uart_r )
|
||||
READ32_MEMBER(firebeat_state::comm_uart_r )
|
||||
{
|
||||
UINT32 r = 0;
|
||||
|
||||
@ -1304,7 +1332,7 @@ static READ32_HANDLER( comm_uart_r )
|
||||
return r;
|
||||
}
|
||||
|
||||
static WRITE32_HANDLER( comm_uart_w )
|
||||
WRITE32_MEMBER(firebeat_state::comm_uart_w )
|
||||
{
|
||||
if (ACCESSING_BITS_24_31)
|
||||
{
|
||||
@ -1336,9 +1364,8 @@ static const int cab_data[2] = { 0x0, 0x8 };
|
||||
static const int kbm_cab_data[2] = { 0x2, 0x8 };
|
||||
static const int ppd_cab_data[2] = { 0x1, 0x9 };
|
||||
|
||||
static READ32_HANDLER( cabinet_r )
|
||||
READ32_MEMBER(firebeat_state::cabinet_r )
|
||||
{
|
||||
firebeat_state *state = space.machine().driver_data<firebeat_state>();
|
||||
UINT32 r = 0;
|
||||
|
||||
// printf("cabinet_r: %08X, %08X\n", offset, mem_mask);
|
||||
@ -1347,8 +1374,8 @@ static READ32_HANDLER( cabinet_r )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
r = state->m_cur_cab_data[state->m_cab_data_ptr & 1] << 28;
|
||||
state->m_cab_data_ptr++;
|
||||
r = m_cur_cab_data[m_cab_data_ptr & 1] << 28;
|
||||
m_cab_data_ptr++;
|
||||
return r;
|
||||
}
|
||||
case 2: return 0x00000000;
|
||||
@ -1360,7 +1387,7 @@ static READ32_HANDLER( cabinet_r )
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static READ32_HANDLER( keyboard_wheel_r )
|
||||
READ32_MEMBER(firebeat_state::keyboard_wheel_r )
|
||||
{
|
||||
if (offset == 0) // Keyboard Wheel (P1)
|
||||
{
|
||||
@ -1374,7 +1401,7 @@ static READ32_HANDLER( keyboard_wheel_r )
|
||||
return 0;
|
||||
}
|
||||
|
||||
static READ32_HANDLER( midi_uart_r )
|
||||
READ32_MEMBER(firebeat_state::midi_uart_r )
|
||||
{
|
||||
UINT32 r = 0;
|
||||
|
||||
@ -1386,7 +1413,7 @@ static READ32_HANDLER( midi_uart_r )
|
||||
return r;
|
||||
}
|
||||
|
||||
static WRITE32_HANDLER( midi_uart_w )
|
||||
WRITE32_MEMBER(firebeat_state::midi_uart_w )
|
||||
{
|
||||
if (ACCESSING_BITS_24_31)
|
||||
{
|
||||
@ -1501,35 +1528,33 @@ static TIMER_CALLBACK( keyboard_timer_callback )
|
||||
// 0x10: ?
|
||||
// 0x20: ?
|
||||
|
||||
static READ32_HANDLER( extend_board_irq_r)
|
||||
READ32_MEMBER(firebeat_state::extend_board_irq_r)
|
||||
{
|
||||
firebeat_state *state = space.machine().driver_data<firebeat_state>();
|
||||
UINT32 r = 0;
|
||||
|
||||
if (ACCESSING_BITS_24_31)
|
||||
{
|
||||
r |= (~state->m_extend_board_irq_active) << 24;
|
||||
r |= (~m_extend_board_irq_active) << 24;
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
static WRITE32_HANDLER( extend_board_irq_w )
|
||||
WRITE32_MEMBER(firebeat_state::extend_board_irq_w )
|
||||
{
|
||||
firebeat_state *state = space.machine().driver_data<firebeat_state>();
|
||||
// printf("extend_board_irq_w: %08X, %08X, %08X\n", data, offset, mem_mask);
|
||||
|
||||
if (ACCESSING_BITS_24_31)
|
||||
{
|
||||
state->m_extend_board_irq_active &= ~((data >> 24) & 0xff);
|
||||
m_extend_board_irq_active &= ~((data >> 24) & 0xff);
|
||||
|
||||
state->m_extend_board_irq_enable = (data >> 24) & 0xff;
|
||||
m_extend_board_irq_enable = (data >> 24) & 0xff;
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static WRITE32_HANDLER( lamp_output_w )
|
||||
WRITE32_MEMBER(firebeat_state::lamp_output_w )
|
||||
{
|
||||
// -------- -------- -------- xxxxxxxx Status LEDs (active low)
|
||||
if (ACCESSING_BITS_0_7)
|
||||
@ -1547,7 +1572,7 @@ static WRITE32_HANDLER( lamp_output_w )
|
||||
// printf("lamp_output_w: %08X, %08X, %08X\n", data, offset, mem_mask);
|
||||
}
|
||||
|
||||
static WRITE32_HANDLER( lamp_output_kbm_w )
|
||||
WRITE32_MEMBER(firebeat_state::lamp_output_kbm_w )
|
||||
{
|
||||
lamp_output_w(space, offset, data, mem_mask);
|
||||
|
||||
@ -1566,7 +1591,7 @@ static WRITE32_HANDLER( lamp_output_kbm_w )
|
||||
}
|
||||
}
|
||||
|
||||
static WRITE32_HANDLER( lamp_output_ppp_w )
|
||||
WRITE32_MEMBER(firebeat_state::lamp_output_ppp_w )
|
||||
{
|
||||
lamp_output_w(space, offset, data, mem_mask);
|
||||
|
||||
@ -1608,12 +1633,12 @@ static WRITE32_HANDLER( lamp_output_ppp_w )
|
||||
}
|
||||
}
|
||||
|
||||
static WRITE32_HANDLER( lamp_output2_w )
|
||||
WRITE32_MEMBER(firebeat_state::lamp_output2_w )
|
||||
{
|
||||
// printf("lamp_output2_w: %08X, %08X, %08X\n", data, offset, mem_mask);
|
||||
}
|
||||
|
||||
static WRITE32_HANDLER( lamp_output2_ppp_w )
|
||||
WRITE32_MEMBER(firebeat_state::lamp_output2_ppp_w )
|
||||
{
|
||||
lamp_output2_w(space, offset, data, mem_mask);
|
||||
|
||||
@ -1642,12 +1667,12 @@ static WRITE32_HANDLER( lamp_output2_ppp_w )
|
||||
}
|
||||
}
|
||||
|
||||
static WRITE32_HANDLER( lamp_output3_w )
|
||||
WRITE32_MEMBER(firebeat_state::lamp_output3_w )
|
||||
{
|
||||
// printf("lamp_output3_w: %08X, %08X, %08X\n", data, offset, mem_mask);
|
||||
}
|
||||
|
||||
static WRITE32_HANDLER( lamp_output3_ppp_w )
|
||||
WRITE32_MEMBER(firebeat_state::lamp_output3_ppp_w )
|
||||
{
|
||||
lamp_output3_w(space, offset, data, mem_mask);
|
||||
|
||||
@ -1668,67 +1693,63 @@ static WRITE32_HANDLER( lamp_output3_ppp_w )
|
||||
/*****************************************************************************/
|
||||
|
||||
|
||||
static READ32_HANDLER(ppc_spu_share_r)
|
||||
READ32_MEMBER(firebeat_state::ppc_spu_share_r)
|
||||
{
|
||||
firebeat_state *state = space.machine().driver_data<firebeat_state>();
|
||||
UINT32 r = 0;
|
||||
|
||||
if (ACCESSING_BITS_24_31)
|
||||
{
|
||||
r |= state->m_spu_shared_ram[(offset * 4) + 0] << 24;
|
||||
r |= m_spu_shared_ram[(offset * 4) + 0] << 24;
|
||||
}
|
||||
if (ACCESSING_BITS_16_23)
|
||||
{
|
||||
r |= state->m_spu_shared_ram[(offset * 4) + 1] << 16;
|
||||
r |= m_spu_shared_ram[(offset * 4) + 1] << 16;
|
||||
}
|
||||
if (ACCESSING_BITS_8_15)
|
||||
{
|
||||
r |= state->m_spu_shared_ram[(offset * 4) + 2] << 8;
|
||||
r |= m_spu_shared_ram[(offset * 4) + 2] << 8;
|
||||
}
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
r |= state->m_spu_shared_ram[(offset * 4) + 3] << 0;
|
||||
r |= m_spu_shared_ram[(offset * 4) + 3] << 0;
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
static WRITE32_HANDLER(ppc_spu_share_w)
|
||||
WRITE32_MEMBER(firebeat_state::ppc_spu_share_w)
|
||||
{
|
||||
firebeat_state *state = space.machine().driver_data<firebeat_state>();
|
||||
if (ACCESSING_BITS_24_31)
|
||||
{
|
||||
state->m_spu_shared_ram[(offset * 4) + 0] = (data >> 24) & 0xff;
|
||||
m_spu_shared_ram[(offset * 4) + 0] = (data >> 24) & 0xff;
|
||||
}
|
||||
if (ACCESSING_BITS_16_23)
|
||||
{
|
||||
state->m_spu_shared_ram[(offset * 4) + 1] = (data >> 16) & 0xff;
|
||||
m_spu_shared_ram[(offset * 4) + 1] = (data >> 16) & 0xff;
|
||||
}
|
||||
if (ACCESSING_BITS_8_15)
|
||||
{
|
||||
state->m_spu_shared_ram[(offset * 4) + 2] = (data >> 8) & 0xff;
|
||||
m_spu_shared_ram[(offset * 4) + 2] = (data >> 8) & 0xff;
|
||||
}
|
||||
if (ACCESSING_BITS_0_7)
|
||||
{
|
||||
state->m_spu_shared_ram[(offset * 4) + 3] = (data >> 0) & 0xff;
|
||||
m_spu_shared_ram[(offset * 4) + 3] = (data >> 0) & 0xff;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef UNUSED_FUNCTION
|
||||
static READ16_HANDLER(m68k_spu_share_r)
|
||||
READ16_MEMBER(firebeat_state::m68k_spu_share_r)
|
||||
{
|
||||
firebeat_state *state = space.machine().driver_data<firebeat_state>();
|
||||
return state->m_spu_shared_ram[offset] << 8;
|
||||
return m_spu_shared_ram[offset] << 8;
|
||||
}
|
||||
|
||||
static WRITE16_HANDLER(m68k_spu_share_w)
|
||||
WRITE16_MEMBER(firebeat_state::m68k_spu_share_w)
|
||||
{
|
||||
firebeat_state *state = space.machine().driver_data<firebeat_state>();
|
||||
state->m_spu_shared_ram[offset] = (data >> 8) & 0xff;
|
||||
m_spu_shared_ram[offset] = (data >> 8) & 0xff;
|
||||
}
|
||||
#endif
|
||||
|
||||
static READ16_HANDLER(spu_unk_r)
|
||||
READ16_MEMBER(firebeat_state::spu_unk_r)
|
||||
{
|
||||
return 0xffff;
|
||||
}
|
||||
@ -1750,31 +1771,31 @@ MACHINE_START_MEMBER(firebeat_state,firebeat)
|
||||
|
||||
static ADDRESS_MAP_START( firebeat_map, AS_PROGRAM, 32, firebeat_state )
|
||||
AM_RANGE(0x00000000, 0x01ffffff) AM_RAM AM_SHARE("work_ram")
|
||||
AM_RANGE(0x70000000, 0x70000fff) AM_READWRITE_LEGACY(midi_uart_r, midi_uart_w)
|
||||
AM_RANGE(0x70006000, 0x70006003) AM_WRITE_LEGACY(extend_board_irq_w)
|
||||
AM_RANGE(0x70008000, 0x7000800f) AM_READ_LEGACY(keyboard_wheel_r)
|
||||
AM_RANGE(0x7000a000, 0x7000a003) AM_READ_LEGACY(extend_board_irq_r)
|
||||
AM_RANGE(0x74000000, 0x740003ff) AM_READWRITE_LEGACY(ppc_spu_share_r, ppc_spu_share_w) // SPU shared RAM
|
||||
AM_RANGE(0x7d000200, 0x7d00021f) AM_READ_LEGACY(cabinet_r)
|
||||
AM_RANGE(0x7d000340, 0x7d000347) AM_READ_LEGACY(sensor_r)
|
||||
AM_RANGE(0x70000000, 0x70000fff) AM_READWRITE(midi_uart_r, midi_uart_w)
|
||||
AM_RANGE(0x70006000, 0x70006003) AM_WRITE(extend_board_irq_w)
|
||||
AM_RANGE(0x70008000, 0x7000800f) AM_READ(keyboard_wheel_r)
|
||||
AM_RANGE(0x7000a000, 0x7000a003) AM_READ(extend_board_irq_r)
|
||||
AM_RANGE(0x74000000, 0x740003ff) AM_READWRITE(ppc_spu_share_r, ppc_spu_share_w) // SPU shared RAM
|
||||
AM_RANGE(0x7d000200, 0x7d00021f) AM_READ(cabinet_r)
|
||||
AM_RANGE(0x7d000340, 0x7d000347) AM_READ(sensor_r)
|
||||
AM_RANGE(0x7d000400, 0x7d000403) AM_DEVREADWRITE8_LEGACY("ymz", ymz280b_r, ymz280b_w, 0xffff0000)
|
||||
AM_RANGE(0x7d000800, 0x7d000803) AM_READ_LEGACY(input_r)
|
||||
AM_RANGE(0x7d400000, 0x7d5fffff) AM_READWRITE_LEGACY(flashram_r, flashram_w)
|
||||
AM_RANGE(0x7d800000, 0x7dbfffff) AM_READWRITE_LEGACY(soundflash_r, soundflash_w)
|
||||
AM_RANGE(0x7dc00000, 0x7dc0000f) AM_READWRITE_LEGACY(comm_uart_r, comm_uart_w)
|
||||
AM_RANGE(0x7d000800, 0x7d000803) AM_READ(input_r)
|
||||
AM_RANGE(0x7d400000, 0x7d5fffff) AM_READWRITE(flashram_r, flashram_w)
|
||||
AM_RANGE(0x7d800000, 0x7dbfffff) AM_READWRITE(soundflash_r, soundflash_w)
|
||||
AM_RANGE(0x7dc00000, 0x7dc0000f) AM_READWRITE(comm_uart_r, comm_uart_w)
|
||||
AM_RANGE(0x7e000000, 0x7e00003f) AM_DEVREADWRITE8("rtc", rtc65271_device, rtc_r, rtc_w, 0xffffffff)
|
||||
AM_RANGE(0x7e000100, 0x7e00013f) AM_DEVREADWRITE8("rtc", rtc65271_device, xram_r, xram_w, 0xffffffff)
|
||||
AM_RANGE(0x7e800000, 0x7e8000ff) AM_READWRITE_LEGACY(gcu0_r, gcu0_w)
|
||||
AM_RANGE(0x7e800100, 0x7e8001ff) AM_READWRITE_LEGACY(gcu1_r, gcu1_w)
|
||||
AM_RANGE(0x7fe00000, 0x7fe0000f) AM_READWRITE_LEGACY(atapi_command_r, atapi_command_w)
|
||||
AM_RANGE(0x7fe80000, 0x7fe8000f) AM_READWRITE_LEGACY(atapi_control_r, atapi_control_w)
|
||||
AM_RANGE(0x7e800000, 0x7e8000ff) AM_READWRITE(gcu0_r, gcu0_w)
|
||||
AM_RANGE(0x7e800100, 0x7e8001ff) AM_READWRITE(gcu1_r, gcu1_w)
|
||||
AM_RANGE(0x7fe00000, 0x7fe0000f) AM_READWRITE(atapi_command_r, atapi_command_w)
|
||||
AM_RANGE(0x7fe80000, 0x7fe8000f) AM_READWRITE(atapi_control_r, atapi_control_w)
|
||||
AM_RANGE(0x7ff80000, 0x7fffffff) AM_ROM AM_REGION("user1", 0) /* System BIOS */
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( spu_map, AS_PROGRAM, 16, firebeat_state )
|
||||
AM_RANGE(0x000000, 0x07ffff) AM_ROM
|
||||
AM_RANGE(0x100000, 0x13ffff) AM_RAM
|
||||
AM_RANGE(0x340000, 0x34000f) AM_READ_LEGACY(spu_unk_r)
|
||||
AM_RANGE(0x340000, 0x34000f) AM_READ(spu_unk_r)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
/*****************************************************************************/
|
||||
@ -2214,15 +2235,16 @@ static void security_w(device_t *device, UINT8 data)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static void init_lights(running_machine &machine, write32_space_func out1, const char *out1name, write32_space_func out2, const char *out2name, write32_space_func out3, const char *out3name)
|
||||
static void init_lights(running_machine &machine, write32_delegate out1, write32_delegate out2, write32_delegate out3)
|
||||
{
|
||||
if(!out1) out1 = lamp_output_w, out1name = "lamp_output_w";
|
||||
if(!out2) out2 = lamp_output2_w, out2name = "lamp_output2_w";
|
||||
if(!out3) out3 = lamp_output3_w, out3name = "lamp_output3_w";
|
||||
firebeat_state *state = machine.driver_data<firebeat_state>();
|
||||
if(out1.isnull()) out1 = write32_delegate(FUNC(firebeat_state::lamp_output_w),state);
|
||||
if(out2.isnull()) out2 = write32_delegate(FUNC(firebeat_state::lamp_output2_w),state);
|
||||
if(out3.isnull()) out3 = write32_delegate(FUNC(firebeat_state::lamp_output3_w),state);
|
||||
|
||||
machine.device("maincpu")->memory().space(AS_PROGRAM).install_legacy_write_handler(0x7d000804, 0x7d000807, out1, out1name);
|
||||
machine.device("maincpu")->memory().space(AS_PROGRAM).install_legacy_write_handler(0x7d000320, 0x7d000323, out2, out2name);
|
||||
machine.device("maincpu")->memory().space(AS_PROGRAM).install_legacy_write_handler(0x7d000324, 0x7d000327, out3, out3name);
|
||||
machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x7d000804, 0x7d000807, out1);
|
||||
machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x7d000320, 0x7d000323, out2);
|
||||
machine.device("maincpu")->memory().space(AS_PROGRAM).install_write_handler(0x7d000324, 0x7d000327, out3);
|
||||
}
|
||||
|
||||
static void init_firebeat(running_machine &machine)
|
||||
@ -2244,19 +2266,19 @@ static void init_firebeat(running_machine &machine)
|
||||
|
||||
set_ibutton(state, rom);
|
||||
|
||||
init_lights(machine, FUNC_NULL, FUNC_NULL, FUNC_NULL);
|
||||
init_lights(machine, write32_delegate(), write32_delegate(), write32_delegate());
|
||||
}
|
||||
|
||||
DRIVER_INIT_MEMBER(firebeat_state,ppp)
|
||||
{
|
||||
init_firebeat(machine());
|
||||
init_lights(machine(), FUNC(lamp_output_ppp_w), FUNC(lamp_output2_ppp_w), FUNC(lamp_output3_ppp_w));
|
||||
init_lights(machine(), write32_delegate(FUNC(firebeat_state::lamp_output_ppp_w),this), write32_delegate(FUNC(firebeat_state::lamp_output2_ppp_w),this), write32_delegate(FUNC(firebeat_state::lamp_output3_ppp_w),this));
|
||||
}
|
||||
|
||||
DRIVER_INIT_MEMBER(firebeat_state,ppd)
|
||||
{
|
||||
init_firebeat(machine());
|
||||
init_lights(machine(), FUNC(lamp_output_ppp_w), FUNC(lamp_output2_ppp_w), FUNC(lamp_output3_ppp_w));
|
||||
init_lights(machine(), write32_delegate(FUNC(firebeat_state::lamp_output_ppp_w),this), write32_delegate(FUNC(firebeat_state::lamp_output2_ppp_w),this), write32_delegate(FUNC(firebeat_state::lamp_output3_ppp_w),this));
|
||||
|
||||
m_cur_cab_data = ppd_cab_data;
|
||||
}
|
||||
@ -2272,7 +2294,7 @@ static void init_keyboard(running_machine &machine)
|
||||
DRIVER_INIT_MEMBER(firebeat_state,kbm)
|
||||
{
|
||||
init_firebeat(machine());
|
||||
init_lights(machine(), FUNC(lamp_output_kbm_w), FUNC_NULL, FUNC_NULL);
|
||||
init_lights(machine(), write32_delegate(FUNC(firebeat_state::lamp_output_kbm_w),this), write32_delegate(), write32_delegate());
|
||||
|
||||
init_keyboard(machine());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user