mirror of
https://github.com/holub/mame
synced 2025-07-01 16:19:38 +03:00
fix separate compile (nw)
This commit is contained in:
parent
c5c718beb8
commit
946156afbb
@ -3848,9 +3848,25 @@ ROM_START( sp_cpal )
|
|||||||
SP_CPAL_SOUND
|
SP_CPAL_SOUND
|
||||||
ROM_END
|
ROM_END
|
||||||
|
|
||||||
// mpu4.c
|
static void descramble_crystal( UINT8* region, int start, int end, UINT8 extra_xor)
|
||||||
extern void descramble_crystal( UINT8* region, int start, int end, UINT8 extra_xor);
|
{
|
||||||
|
for (int i=start;i<end;i++)
|
||||||
|
{
|
||||||
|
UINT8 x = region[i];
|
||||||
|
switch (i & 0x58)
|
||||||
|
{
|
||||||
|
case 0x00: // same as 0x08
|
||||||
|
case 0x08: x = BITSWAP8( x^0xca , 3,2,1,0,7,4,6,5 ); break;
|
||||||
|
case 0x10: x = BITSWAP8( x^0x30 , 3,0,4,6,1,5,7,2 ); break;
|
||||||
|
case 0x18: x = BITSWAP8( x^0x89 , 4,1,2,5,7,0,6,3 ); break;
|
||||||
|
case 0x40: x = BITSWAP8( x^0x14 , 6,1,4,3,2,5,0,7 ); break;
|
||||||
|
case 0x48: x = BITSWAP8( x^0x40 , 1,0,3,2,5,4,7,6 ); break;
|
||||||
|
case 0x50: x = BITSWAP8( x^0xcb , 3,2,1,0,7,6,5,4 ); break;
|
||||||
|
case 0x58: x = BITSWAP8( x^0xc0 , 2,3,6,0,5,1,7,4 ); break;
|
||||||
|
}
|
||||||
|
region[i] = x ^ extra_xor;
|
||||||
|
}
|
||||||
|
}
|
||||||
DRIVER_INIT_MEMBER(ace_sp_state,ace_cr)
|
DRIVER_INIT_MEMBER(ace_sp_state,ace_cr)
|
||||||
{
|
{
|
||||||
descramble_crystal(memregion( "maincpu" )->base(), 0x0000, 0x10000, 0x00);
|
descramble_crystal(memregion( "maincpu" )->base(), 0x0000, 0x10000, 0x00);
|
||||||
|
@ -2394,7 +2394,7 @@ DRIVER_INIT_MEMBER(mpu4_state,m_frkstn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// thanks to Project Amber for descramble information
|
// thanks to Project Amber for descramble information
|
||||||
void descramble_crystal( UINT8* region, int start, int end, UINT8 extra_xor)
|
static void descramble_crystal( UINT8* region, int start, int end, UINT8 extra_xor)
|
||||||
{
|
{
|
||||||
for (int i=start;i<end;i++)
|
for (int i=start;i<end;i++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user