mirror of
https://github.com/holub/mame
synced 2025-07-03 17:08:39 +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
|
||||
|
@ -523,7 +523,7 @@ static WRITE8_HANDLER( bankswitch_w )
|
||||
// printf("bank %02x\n", data);
|
||||
|
||||
state->m_pageval = (data & 0x03);
|
||||
memory_set_bank(space->machine(), "bank1",state->m_pageval + (state->m_pageset?4:0));
|
||||
memory_set_bank(space->machine(), "bank1", (state->m_pageval + (state->m_pageset ? 4 : 0)) & 0x07);
|
||||
}
|
||||
|
||||
|
||||
@ -537,7 +537,7 @@ 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));
|
||||
memory_set_bank(space->machine(), "bank1", (state->m_pageval + (state->m_pageset ? 4 : 0)) & 0x07);
|
||||
}
|
||||
|
||||
|
||||
@ -1562,8 +1562,7 @@ static WRITE_LINE_DEVICE_HANDLER( pia_gb_cb2_w )
|
||||
if (mstate->m_bwb_bank)
|
||||
{
|
||||
mstate->m_pageval = state;
|
||||
|
||||
memory_set_bank(device->machine(), "bank1",mstate->m_pageval + (mstate->m_pageset?4:0));
|
||||
memory_set_bank(device->machine(), "bank1", (state->m_pageval + (state->m_pageset ? 4 : 0)) & 0x07);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user