summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/tankbust.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/tankbust.c')
-rw-r--r--src/mame/drivers/tankbust.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mame/drivers/tankbust.c b/src/mame/drivers/tankbust.c
index 96f20cfd1f4..f34957d7cd9 100644
--- a/src/mame/drivers/tankbust.c
+++ b/src/mame/drivers/tankbust.c
@@ -22,6 +22,12 @@ To do:
#include "includes/tankbust.h"
+void tankbust_state::machine_start()
+{
+ membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base() + 0x10000, 0x4000);
+ membank("bank2")->configure_entries(0, 2, memregion("maincpu")->base() + 0x18000, 0x2000);
+}
+
//port A of ay8910#0
TIMER_CALLBACK_MEMBER(tankbust_state::soundlatch_callback)
@@ -95,9 +101,10 @@ WRITE8_MEMBER(tankbust_state::tankbust_e0xx_w)
case 7: /* 0xe007 bankswitch */
/* bank 1 at 0x6000-9fff = from 0x10000 when bit0=0 else from 0x14000 */
+ membank("bank1")->set_entry(data & 1);
+
/* bank 2 at 0xa000-bfff = from 0x18000 when bit0=0 else from 0x1a000 */
- membank("bank1")->set_base(memregion("maincpu")->base() + 0x10000 + ((data&1) * 0x4000) );
- membank("bank2")->set_base(memregion("maincpu")->base() + 0x18000 + ((data&1) * 0x2000) ); /* verified (the game will reset after the "game over" otherwise) */
+ membank("bank2")->set_entry(data & 1); /* verified (the game will reset after the "game over" otherwise) */
break;
}
}