wgp.c: reduce tagmap lookups (nw)
This commit is contained in:
parent
c9d255b26f
commit
304ab3bbac
@ -516,12 +516,12 @@ WRITE16_MEMBER(wgp_state::rotate_port_w)
|
|||||||
READ16_MEMBER(wgp_state::wgp_adinput_r)
|
READ16_MEMBER(wgp_state::wgp_adinput_r)
|
||||||
{
|
{
|
||||||
int steer = 0x40;
|
int steer = 0x40;
|
||||||
int fake = ioport(FAKE_PORT_TAG)->read_safe(0x00);
|
int fake = m_fake ? m_fake->read() : 0;
|
||||||
|
|
||||||
if (!(fake & 0x10)) /* Analogue steer (the real control method) */
|
if (!(fake & 0x10)) /* Analogue steer (the real control method) */
|
||||||
{
|
{
|
||||||
/* Reduce span to 0x80 */
|
/* Reduce span to 0x80 */
|
||||||
steer = (ioport(STEER_PORT_TAG)->read_safe(0x00) * 0x80) / 0x100;
|
steer = ((m_steer ? m_steer->read() : 0) * 0x80) / 0x100;
|
||||||
}
|
}
|
||||||
else /* Digital steer */
|
else /* Digital steer */
|
||||||
{
|
{
|
||||||
@ -566,7 +566,7 @@ READ16_MEMBER(wgp_state::wgp_adinput_r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case 0x05:
|
case 0x05:
|
||||||
return ioport(UNKNOWN_PORT_TAG)->read_safe(0x00); /* unknown */
|
return m_unknown ? m_unknown->read() : 0; /* unknown */
|
||||||
}
|
}
|
||||||
|
|
||||||
logerror("CPU #0 PC %06x: warning - read unmapped a/d input offset %06x\n",space.device().safe_pc(),offset);
|
logerror("CPU #0 PC %06x: warning - read unmapped a/d input offset %06x\n",space.device().safe_pc(),offset);
|
||||||
@ -590,7 +590,7 @@ WRITE16_MEMBER(wgp_state::wgp_adinput_w)
|
|||||||
|
|
||||||
WRITE8_MEMBER(wgp_state::sound_bankswitch_w)
|
WRITE8_MEMBER(wgp_state::sound_bankswitch_w)
|
||||||
{
|
{
|
||||||
membank("z80bank")->set_entry(data & 3);
|
m_z80bank->set_entry(data & 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
WRITE16_MEMBER(wgp_state::wgp_sound_w)
|
WRITE16_MEMBER(wgp_state::wgp_sound_w)
|
||||||
@ -909,7 +909,7 @@ void wgp_state::machine_reset()
|
|||||||
|
|
||||||
void wgp_state::machine_start()
|
void wgp_state::machine_start()
|
||||||
{
|
{
|
||||||
membank("z80bank")->configure_entries(0, 4, memregion("audiocpu")->base(), 0x4000);
|
m_z80bank->configure_entries(0, 4, memregion("audiocpu")->base(), 0x4000);
|
||||||
|
|
||||||
save_item(NAME(m_cpua_ctrl));
|
save_item(NAME(m_cpua_ctrl));
|
||||||
save_item(NAME(m_port_sel));
|
save_item(NAME(m_port_sel));
|
||||||
|
@ -34,7 +34,12 @@ public:
|
|||||||
m_tc0140syt(*this, "tc0140syt"),
|
m_tc0140syt(*this, "tc0140syt"),
|
||||||
m_tc0220ioc(*this, "tc0220ioc"),
|
m_tc0220ioc(*this, "tc0220ioc"),
|
||||||
m_gfxdecode(*this, "gfxdecode"),
|
m_gfxdecode(*this, "gfxdecode"),
|
||||||
m_palette(*this, "palette") { }
|
m_palette(*this, "palette"),
|
||||||
|
m_z80bank(*this, "z80bank"),
|
||||||
|
m_steer(*this, "STEER"),
|
||||||
|
m_unknown(*this, "UNKNOWN"),
|
||||||
|
m_fake(*this, "FAKE")
|
||||||
|
{ }
|
||||||
|
|
||||||
/* memory pointers */
|
/* memory pointers */
|
||||||
required_shared_ptr<UINT16> m_spritemap;
|
required_shared_ptr<UINT16> m_spritemap;
|
||||||
@ -66,6 +71,10 @@ public:
|
|||||||
required_device<tc0220ioc_device> m_tc0220ioc;
|
required_device<tc0220ioc_device> m_tc0220ioc;
|
||||||
required_device<gfxdecode_device> m_gfxdecode;
|
required_device<gfxdecode_device> m_gfxdecode;
|
||||||
required_device<palette_device> m_palette;
|
required_device<palette_device> m_palette;
|
||||||
|
required_memory_bank m_z80bank;
|
||||||
|
optional_ioport m_steer;
|
||||||
|
optional_ioport m_unknown;
|
||||||
|
optional_ioport m_fake;
|
||||||
|
|
||||||
DECLARE_WRITE16_MEMBER(cpua_ctrl_w);
|
DECLARE_WRITE16_MEMBER(cpua_ctrl_w);
|
||||||
DECLARE_READ16_MEMBER(lan_status_r);
|
DECLARE_READ16_MEMBER(lan_status_r);
|
||||||
|
Loading…
Reference in New Issue
Block a user