mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03:00
(MESS) gb.c: Reduce tagmap lookups (nw)
This commit is contained in:
parent
80dbbd9bfd
commit
9f170f27f0
@ -485,7 +485,7 @@ READ8_MEMBER(gb_state::gb_cart_r)
|
||||
{
|
||||
if (offset < 0x100)
|
||||
{
|
||||
UINT8 *ROM = space.machine().root_device().memregion("maincpu")->base();
|
||||
UINT8 *ROM = m_region_maincpu->base();
|
||||
return ROM[offset];
|
||||
}
|
||||
else if (m_cartslot->m_cart)
|
||||
@ -505,12 +505,12 @@ READ8_MEMBER(gb_state::gbc_cart_r)
|
||||
{
|
||||
if (offset < 0x100)
|
||||
{
|
||||
UINT8 *ROM = space.machine().root_device().memregion("maincpu")->base();
|
||||
UINT8 *ROM = m_region_maincpu->base();
|
||||
return ROM[offset];
|
||||
}
|
||||
else if (offset >= 0x200 && offset < 0x900)
|
||||
{
|
||||
UINT8 *ROM = space.machine().root_device().memregion("maincpu")->base();
|
||||
UINT8 *ROM = m_region_maincpu->base();
|
||||
return ROM[offset - 0x100];
|
||||
}
|
||||
else if (m_cartslot->m_cart)
|
||||
|
@ -113,6 +113,7 @@ public:
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_cartslot(*this, "gbslot")
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_region_maincpu(*this, "maincpu")
|
||||
, m_rambank(*this, "cgb_ram")
|
||||
, m_inputs(*this, "INPUTS")
|
||||
{ }
|
||||
@ -207,6 +208,7 @@ public:
|
||||
|
||||
protected:
|
||||
required_device<lr35902_cpu_device> m_maincpu;
|
||||
required_memory_region m_region_maincpu;
|
||||
optional_memory_bank m_rambank; // cgb
|
||||
required_ioport m_inputs;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user