summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author smf- <smf-@users.noreply.github.com>2012-04-18 14:01:44 +0000
committer smf- <smf-@users.noreply.github.com>2012-04-18 14:01:44 +0000
commit33cddd265e06d3996a825b4b0d44376cd15f3759 (patch)
treeb686aee8589640e3e811c9956880f5ac8d6897c9 /src
parentbcbfc417dea30654280d319e7ce21d856c6694d5 (diff)
apply bitswap/xor to all mem(n) roms except the header
Diffstat (limited to 'src')
-rw-r--r--src/mame/drivers/namcos10.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/mame/drivers/namcos10.c b/src/mame/drivers/namcos10.c
index b65c082eb2e..bd0e52ce737 100644
--- a/src/mame/drivers/namcos10.c
+++ b/src/mame/drivers/namcos10.c
@@ -500,11 +500,12 @@ static void memn_driver_init( running_machine &machine )
psx_driver_init(machine);
}
-static void decrypt_bios( running_machine &machine, int start, int end, int b15, int b14, int b13, int b12, int b11, int b10, int b9, int b8,
+static void decrypt_bios( running_machine &machine, const char *regionName, int start, int b15, int b14, int b13, int b12, int b11, int b10, int b9, int b8,
int b7, int b6, int b5, int b4, int b3, int b2, int b1, int b0 )
{
- UINT16 *BIOS = (UINT16 *)(machine.region( "user1" )->base() + start);
- int len = (end - start)/2;
+ const memory_region *region = machine.region( regionName );
+ UINT16 *BIOS = (UINT16 *)( region->base() + start );
+ int len = (region->bytes()-start)/2;
for( int i = 0; i < len; i++ )
{
@@ -515,66 +516,65 @@ static void decrypt_bios( running_machine &machine, int start, int end, int b15,
static DRIVER_INIT( mrdrilr2 )
{
+ decrypt_bios( machine, "user1", 0, 0xc, 0xd, 0xf, 0xe, 0xb, 0xa, 0x9, 0x8, 0x7, 0x6, 0x4, 0x1, 0x2, 0x5, 0x0, 0x3 );
memm_driver_init(machine);
- decrypt_bios( machine, 0x000000, 0x041000, 0xc, 0xd, 0xf, 0xe, 0xb, 0xa, 0x9, 0x8, 0x7, 0x6, 0x4, 0x1, 0x2, 0x5, 0x0, 0x3 );
- decrypt_bios( machine, 0x060000, 0x062000, 0xc, 0xd, 0xf, 0xe, 0xb, 0xa, 0x9, 0x8, 0x7, 0x6, 0x4, 0x1, 0x2, 0x5, 0x0, 0x3 );
}
static DRIVER_INIT( gjspace )
{
+ decrypt_bios( machine, "user2", 0x8400, 0x0, 0x2, 0xe, 0xd, 0xf, 0x6, 0xc, 0x7, 0x5, 0x1, 0x9, 0x8, 0xa, 0x3, 0x4, 0xb );
memn_driver_init(machine);
- decrypt_bios( machine, 0x000000, 0x400000, 0x0, 0x2, 0xe, 0xd, 0xf, 0x6, 0xc, 0x7, 0x5, 0x1, 0x9, 0x8, 0xa, 0x3, 0x4, 0xb );
}
static DRIVER_INIT( mrdrilrg )
{
+ decrypt_bios( machine, "user2", 0x8400, 0x6, 0x4, 0x7, 0x5, 0x2, 0x1, 0x0, 0x3, 0xc, 0xd, 0xe, 0xf, 0x8, 0x9, 0xb, 0xa );
memn_driver_init(machine);
- decrypt_bios( machine, 0x000000, 0x400000, 0x6, 0x4, 0x7, 0x5, 0x2, 0x1, 0x0, 0x3, 0xc, 0xd, 0xe, 0xf, 0x8, 0x9, 0xb, 0xa );
}
static DRIVER_INIT( knpuzzle )
{
+ decrypt_bios( machine, "user2", 0x8400, 0x6, 0x7, 0x4, 0x5, 0x2, 0x0, 0x3, 0x1, 0xc, 0xd, 0xe, 0xf, 0x9, 0xb, 0x8, 0xa );
memn_driver_init(machine);
- decrypt_bios( machine, 0x000000, 0x400000, 0x6, 0x7, 0x4, 0x5, 0x2, 0x0, 0x3, 0x1, 0xc, 0xd, 0xe, 0xf, 0x9, 0xb, 0x8, 0xa );
}
static DRIVER_INIT( startrgn )
{
+ decrypt_bios( machine, "user2", 0x8400, 0x6, 0x5, 0x4, 0x7, 0x1, 0x3, 0x0, 0x2, 0xc, 0xd, 0xe, 0xf, 0x8, 0xb, 0xa, 0x9 );
memn_driver_init(machine);
- decrypt_bios( machine, 0x000000, 0x400000, 0x6, 0x5, 0x4, 0x7, 0x1, 0x3, 0x0, 0x2, 0xc, 0xd, 0xe, 0xf, 0x8, 0xb, 0xa, 0x9 );
}
static DRIVER_INIT( gamshara )
{
+ decrypt_bios( machine, "user2", 0x8400, 0x5, 0x4, 0x7, 0x6, 0x0, 0x1, 0x3, 0x2, 0xd, 0xf, 0xc, 0xe, 0x8, 0x9, 0xa, 0xb );
memn_driver_init(machine);
- decrypt_bios( machine, 0x000000, 0x400000, 0x5, 0x4, 0x7, 0x6, 0x0, 0x1, 0x3, 0x2, 0xd, 0xf, 0xc, 0xe, 0x8, 0x9, 0xa, 0xb );
}
static DRIVER_INIT( gunbalna )
{
+ decrypt_bios( machine, "user2", 0x8400, 0x5, 0x4, 0x7, 0x6, 0x0, 0x1, 0x3, 0x2, 0xd, 0xf, 0xc, 0xe, 0x9, 0x8, 0xa, 0xb );
memn_driver_init(machine);
- decrypt_bios( machine, 0x000000, 0x400000, 0x5, 0x4, 0x7, 0x6, 0x0, 0x1, 0x3, 0x2, 0xd, 0xf, 0xc, 0xe, 0x9, 0x8, 0xa, 0xb );
}
static DRIVER_INIT( chocovdr )
{
- memn_driver_init(machine);
// NOTE: none of the possible permutations show the Sony Computer Entertainment string at BIOS[0x84], very likely a bad dump
// BAD? 0 or 9 1 or 8 0 or 9
// ok! ok! ok! ok! ok! ok! ok! ok! ok! ok! ok! ok!
- decrypt_bios( machine, 0x000000, 0x400000, 0x5, 0x4, 0x6, 0x7, 0x1, 0x0, 0x2, 0x3, 0xc, 0xf, 0xe, 0xd, 0x8, 0xb, 0xa, 0x9 );
+ decrypt_bios( machine, "user2", 0x8400, 0x5, 0x4, 0x6, 0x7, 0x1, 0x0, 0x2, 0x3, 0xc, 0xf, 0xe, 0xd, 0x8, 0xb, 0xa, 0x9 );
+ memn_driver_init(machine);
}
static DRIVER_INIT( panikuru )
{
+ decrypt_bios( machine, "user2", 0x8400, 0x6, 0x4, 0x7, 0x5, 0x0, 0x1, 0x2, 0x3, 0xc, 0xf, 0xe, 0xd, 0x9, 0x8, 0xb, 0xa );
memn_driver_init(machine);
- decrypt_bios( machine, 0x000000, 0x400000, 0x6, 0x4, 0x7, 0x5, 0x0, 0x1, 0x2, 0x3, 0xc, 0xf, 0xe, 0xd, 0x9, 0x8, 0xb, 0xa );
}
static DRIVER_INIT( nflclsfb )
{
+ decrypt_bios( machine, "user2", 0x8400, 0x6, 0x5, 0x4, 0x7, 0x1, 0x3, 0x0, 0x2, 0xc, 0xd, 0xe, 0xf, 0x8, 0xb, 0xa, 0x9 );
memn_driver_init(machine);
- decrypt_bios( machine, 0x000000, 0x400000, 0x6, 0x5, 0x4, 0x7, 0x1, 0x3, 0x0, 0x2, 0xc, 0xd, 0xe, 0xf, 0x8, 0xb, 0xa, 0x9 );
}