mirror of
https://github.com/holub/mame
synced 2025-04-22 16:31:49 +03:00
- pgm.c: Fix level 6 crash on kov . [IQ_132]
- megadrvb.c: simplify decode function for srmdb. [IQ_132]
This commit is contained in:
parent
792c2a4bed
commit
47aa42ac0f
@ -738,27 +738,14 @@ DRIVER_INIT_MEMBER(md_boot_state,srmdb)
|
||||
{
|
||||
UINT8* rom = machine().root_device().memregion("maincpu")->base();
|
||||
|
||||
/* todo, reduce bitswaps to single swap */
|
||||
for (int x = 0x00001; x < 0x40000; x += 2)
|
||||
{
|
||||
rom[x] = rom[x] ^ 0xff;
|
||||
rom[x] = BITSWAP8(rom[x], 7,6,5,4,3,2,1,0);
|
||||
rom[x] = BITSWAP8(rom[x], 1,6,5,4,3,2,7,0);
|
||||
rom[x] = BITSWAP8(rom[x], 7,6,5,3,4,2,1,0);
|
||||
rom[x] = BITSWAP8(rom[x], 7,6,5,2,3,4,1,0);
|
||||
rom[x] = BITSWAP8(rom[x], 5,6,7,4,3,2,1,0);
|
||||
rom[x] = BITSWAP8(rom[x], 7,5,6,4,3,2,1,0);
|
||||
rom[x] = BITSWAP8(rom[x] ^ 0xff, 5,1,6,2,4,3,7,0);
|
||||
}
|
||||
|
||||
for (int x = 0x40001; x < 0x80000; x += 2)
|
||||
{
|
||||
rom[x] = BITSWAP8(rom[x], 7,6,5,4,3,2,1,0);
|
||||
rom[x] = BITSWAP8(rom[x], 7,6,1,4,3,2,5,0);
|
||||
rom[x] = BITSWAP8(rom[x], 7,6,5,4,0,2,1,3);
|
||||
rom[x] = BITSWAP8(rom[x], 2,6,5,4,3,7,1,0);
|
||||
rom[x] = BITSWAP8(rom[x], 7,6,5,0,3,2,1,4);
|
||||
rom[x] = BITSWAP8(rom[x], 7,6,5,1,3,2,4,0);
|
||||
|
||||
rom[x] = BITSWAP8(rom[x] ^ 0x00, 2,6,1,5,0,7,3,4);
|
||||
}
|
||||
|
||||
// boot vectors don't seem to be valid, so they are patched...
|
||||
|
@ -952,8 +952,11 @@ void command_handler_kov(pgm_arm_type1_state *state, int pc)
|
||||
break;
|
||||
|
||||
case 0xcc: // Background layer offset
|
||||
if (state->m_value0 & 0x400) state->m_value0 = -(0x400 - (state->m_value0 & 0x3ff));
|
||||
state->m_valueresponse = 0x900000 + ((state->m_kov_cb_value + (state->m_value0 * 0x40)) * 4);
|
||||
{
|
||||
int y = state->m_value0;
|
||||
if (y & 0x400) y = -(0x400 - (y & 0x3ff));
|
||||
state->m_valueresponse = 0x900000 + ((state->m_kov_cb_value + (y * 0x40)) * 4);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0xd0: // Text palette offset
|
||||
@ -1015,7 +1018,7 @@ void command_handler_kov(pgm_arm_type1_state *state, int pc)
|
||||
|
||||
default:
|
||||
state->m_valueresponse = 0x880000;
|
||||
// bprintf (PRINT_NORMAL, _T("Unknown ASIC27 command: %2.2x data: %4.4x\n"), (data ^ state->m_valuekey) & 0xff, state->m_value0);
|
||||
// logerror("Unknown ASIC27 command: %2.2x data: %4.4x\n", (data ^ state->m_valuekey) & 0xff, state->m_value0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user