diff options
Diffstat (limited to 'src/mame/drivers/leapster.cpp')
-rw-r--r-- | src/mame/drivers/leapster.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/mame/drivers/leapster.cpp b/src/mame/drivers/leapster.cpp index 3024ab0a205..1f143791dd8 100644 --- a/src/mame/drivers/leapster.cpp +++ b/src/mame/drivers/leapster.cpp @@ -292,17 +292,19 @@ void leapster_state::machine_reset() { } -ADDRESS_MAP_START(leapster_state::leapster_map) - AM_RANGE(0x00000000, 0x007fffff) AM_ROM AM_MIRROR(0x40000000) // pointers in the bios region seem to be to the 40xxxxxx region, either we mirror there or something (real bios?) is acutally missing - AM_RANGE(0x0180D800, 0x0180D803) AM_READ(leapster_random_r) - AM_RANGE(0x03000000, 0x030007ff) AM_RAM // puts stack here, writes a pointer @ 0x03000000 on startup - AM_RANGE(0x3c000000, 0x3c1fffff) AM_RAM // really ram, or has our code execution gone wrong? +void leapster_state::leapster_map(address_map &map) +{ + map(0x00000000, 0x007fffff).rom().mirror(0x40000000); // pointers in the bios region seem to be to the 40xxxxxx region, either we mirror there or something (real bios?) is acutally missing + map(0x0180D800, 0x0180D803).r(this, FUNC(leapster_state::leapster_random_r)); + map(0x03000000, 0x030007ff).ram(); // puts stack here, writes a pointer @ 0x03000000 on startup + map(0x3c000000, 0x3c1fffff).ram(); // really ram, or has our code execution gone wrong? // AM_RANGE(0x80000000, 0x807fffff) AM_ROMBANK("cartrom") // game ROM pointers are all to the 80xxxxxx region, so I assume it maps here - installed if a cart is present -ADDRESS_MAP_END +} -ADDRESS_MAP_START(leapster_state::leapster_aux) - AM_RANGE(0x00000004b, 0x00000004b) AM_WRITE(leapster_aux004b_w) // this address isn't used by ARC internal stuff afaik, so probably leapster specific -ADDRESS_MAP_END +void leapster_state::leapster_aux(address_map &map) +{ + map(0x00000004b, 0x00000004b).w(this, FUNC(leapster_state::leapster_aux004b_w)); // this address isn't used by ARC internal stuff afaik, so probably leapster specific +} MACHINE_CONFIG_START(leapster_state::leapster) /* basic machine hardware */ |