Simplified banking in 1943.c (no whatsnew)

This commit is contained in:
Alex W. Jackson 2011-09-11 22:39:21 +00:00
parent 7ba1c143b8
commit d57eb095b5
2 changed files with 3 additions and 14 deletions

View File

@ -52,10 +52,7 @@ static READ8_HANDLER( c1943_protection_r )
static ADDRESS_MAP_START( c1943_map, AS_PROGRAM, 8 )
AM_RANGE(0x0000, 0x7fff) AM_ROM
AM_RANGE(0x8000, 0x8fff) AM_ROMBANK("bank1")
AM_RANGE(0x9000, 0x9fff) AM_ROMBANK("bank2")
AM_RANGE(0xa000, 0xafff) AM_ROMBANK("bank3")
AM_RANGE(0xb000, 0xbfff) AM_ROMBANK("bank4")
AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1")
AM_RANGE(0xc000, 0xc000) AM_READ_PORT("SYSTEM")
AM_RANGE(0xc001, 0xc001) AM_READ_PORT("P1")
AM_RANGE(0xc002, 0xc002) AM_READ_PORT("P2")
@ -648,10 +645,7 @@ ROM_END
static DRIVER_INIT( 1943 )
{
UINT8 *ROM = machine.region("maincpu")->base();
memory_configure_bank(machine, "bank1", 0, 29, &ROM[0x10000], 0x1000);
memory_configure_bank(machine, "bank2", 0, 29, &ROM[0x11000], 0x1000);
memory_configure_bank(machine, "bank3", 0, 29, &ROM[0x12000], 0x1000);
memory_configure_bank(machine, "bank4", 0, 29, &ROM[0x13000], 0x1000);
memory_configure_bank(machine, "bank1", 0, 8, &ROM[0x10000], 0x4000);
}
static READ8_HANDLER( _1943b_c007_r ) { return 0; }

View File

@ -137,18 +137,13 @@ WRITE8_HANDLER( c1943_colorram_w )
WRITE8_HANDLER( c1943_c804_w )
{
_1943_state *state = space->machine().driver_data<_1943_state>();
int bank;
/* bits 0 and 1 are coin counters */
coin_counter_w(space->machine(), 0, data & 0x01);
coin_counter_w(space->machine(), 1, data & 0x02);
/* bits 2, 3 and 4 select the ROM bank */
bank = data & 0x1c;
memory_set_bank(space->machine(), "bank1", bank);
memory_set_bank(space->machine(), "bank2", bank);
memory_set_bank(space->machine(), "bank3", bank);
memory_set_bank(space->machine(), "bank4", bank);
memory_set_bank(space->machine(), "bank1", (data & 0x1c) >> 2);
/* bit 5 resets the sound CPU - we ignore it */