removed ROM banking kludge

This commit is contained in:
Nicola Salmoria 2008-11-23 16:05:14 +00:00
parent f778678e3d
commit 12e44c67c4
2 changed files with 14 additions and 10 deletions

View File

@ -1268,17 +1268,23 @@ ROM_START( bub68705 )
ROM_LOAD( "a71-25.41", 0x0000, 0x0100, CRC(2d0f8545) SHA1(089c31e2f614145ef2743164f7b52ae35bc06808) ) /* video timing */
ROM_END
static DRIVER_INIT( bublbobl )
static void configure_banks(running_machine* machine)
{
UINT8 *ROM = memory_region(machine, "main");
memory_configure_bank(machine, 1, 0, 8, &ROM[0x10000], 0x4000);
}
/* in Bubble Bobble, bank 0 has code falling from 7fff to 8000, */
/* so I have to copy it there because bank switching wouldn't catch it */
memcpy(ROM + 0x08000, ROM + 0x10000, 0x4000);
static DRIVER_INIT( bublbobl )
{
configure_banks(machine);
}
static DRIVER_INIT( tokio )
{
configure_banks(machine);
/* preemptively enable video, the bit is not mapped for this game and */
/* I don't know if it even has it. */
bublbobl_video_enable = 1;
@ -1286,6 +1292,8 @@ static DRIVER_INIT( tokio )
static DRIVER_INIT( tokiob )
{
configure_banks(machine);
memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xfe00, 0xfe00, 0, 0, tokiob_mcu_r );
DRIVER_INIT_CALL(tokio);

View File

@ -18,10 +18,8 @@ UINT8 *bublbobl_mcu_sharedram;
WRITE8_HANDLER( bublbobl_bankswitch_w )
{
UINT8 *ROM = memory_region(space->machine, "main");
/* bits 0-2 select ROM bank */
memory_set_bankptr(space->machine, 1,&ROM[0x10000 + 0x4000 * ((data ^ 4) & 7)]);
memory_set_bank(space->machine, 1, (data ^ 4) & 7);
/* bit 3 n.c. */
@ -41,10 +39,8 @@ WRITE8_HANDLER( bublbobl_bankswitch_w )
WRITE8_HANDLER( tokio_bankswitch_w )
{
UINT8 *ROM = memory_region(space->machine, "main");
/* bits 0-2 select ROM bank */
memory_set_bankptr(space->machine, 1,&ROM[0x10000 + 0x4000 * (data & 7)]);
memory_set_bank(space->machine, 1, data & 7);
/* bits 3-7 unknown */
}