mirror of
https://github.com/holub/mame
synced 2025-07-01 16:19:38 +03:00
fixed a bunch of crashes reported by Tafoid. no whatsnew.
This commit is contained in:
parent
3d3951e066
commit
63ef11c990
@ -3843,8 +3843,9 @@ static DRIVER_INIT( m1 )
|
||||
// if there is no OKI region disable writes here, the rom might be missing, so alert user
|
||||
|
||||
UINT8 *okirom = machine.region( "oki" )->base();
|
||||
UINT8 *msm6376rom = machine.region( "msm6376" )->base();
|
||||
|
||||
if (!okirom)
|
||||
if (!okirom && !msm6376rom)
|
||||
machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x2420, 0x2421, FUNC(m1ab_no_oki_w));
|
||||
|
||||
// print out the rom id / header info to give us some hints
|
||||
|
@ -468,7 +468,7 @@ static MACHINE_RESET( mpu4 )
|
||||
|
||||
memory_configure_bank(machine, "bank1", 0, 8, &rom[0x01000], 0x10000);
|
||||
|
||||
memory_set_bank(machine, "bank1",0);
|
||||
memory_set_bank(machine, "bank1", 0);
|
||||
machine.device("maincpu")->reset();
|
||||
}
|
||||
}
|
||||
@ -522,8 +522,8 @@ static WRITE8_HANDLER( bankswitch_w )
|
||||
mpu4_state *state = space->machine().driver_data<mpu4_state>();
|
||||
// printf("bank %02x\n", data);
|
||||
|
||||
state->m_pageval=(data&0x03);
|
||||
memory_set_bank(space->machine(), "bank1",state->m_pageval + (state->m_pageset?4:0));
|
||||
state->m_pageval = (data & 0x03);
|
||||
memory_set_bank(space->machine(), "bank1", (state->m_pageval + (state->m_pageset ? 4 : 0)) & 0x07);
|
||||
}
|
||||
|
||||
|
||||
@ -536,8 +536,8 @@ static READ8_HANDLER( bankswitch_r )
|
||||
static WRITE8_HANDLER( bankset_w )
|
||||
{
|
||||
mpu4_state *state = space->machine().driver_data<mpu4_state>();
|
||||
state->m_pageval=(data - 2);//writes 2 and 3, to represent 0 and 1 - a hangover from the half page design?
|
||||
memory_set_bank(space->machine(), "bank1",state->m_pageval + (state->m_pageset?4:0));
|
||||
state->m_pageval = (data - 2);//writes 2 and 3, to represent 0 and 1 - a hangover from the half page design?
|
||||
memory_set_bank(space->machine(), "bank1", (state->m_pageval + (state->m_pageset ? 4 : 0)) & 0x07);
|
||||
}
|
||||
|
||||
|
||||
@ -1561,9 +1561,8 @@ static WRITE_LINE_DEVICE_HANDLER( pia_gb_cb2_w )
|
||||
//Some BWB games use this to drive the bankswitching
|
||||
if (mstate->m_bwb_bank)
|
||||
{
|
||||
mstate->m_pageval=state;
|
||||
|
||||
memory_set_bank(device->machine(), "bank1",mstate->m_pageval + (mstate->m_pageset?4:0));
|
||||
mstate->m_pageval = state;
|
||||
memory_set_bank(device->machine(), "bank1", (state->m_pageval + (state->m_pageset ? 4 : 0)) & 0x07);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user