From d099ba2be022f5b39e40322d04dac0a9f6eb3b67 Mon Sep 17 00:00:00 2001 From: Nicola Salmoria Date: Mon, 11 Aug 2008 15:10:08 +0000 Subject: [PATCH] 02101: wboy, wboysys2: Access Violation --- src/mame/drivers/angelkds.c | 2 +- src/mame/drivers/appoooh.c | 2 +- src/mame/drivers/calorie.c | 2 +- src/mame/drivers/cclimber.c | 4 +- src/mame/drivers/jongkyo.c | 2 +- src/mame/drivers/pbaction.c | 2 +- src/mame/drivers/pengo.c | 2 +- src/mame/drivers/segae.c | 2 +- src/mame/drivers/segag80r.c | 4 +- src/mame/drivers/senjyo.c | 4 +- src/mame/drivers/sg1000a.c | 2 +- src/mame/drivers/suprloco.c | 2 +- src/mame/drivers/system1.c | 40 +++++------ src/mame/drivers/turbo.c | 2 +- src/mame/drivers/zaxxon.c | 16 ++--- src/mame/machine/segacrpt.c | 140 ++++++++++++++++++------------------ src/mame/machine/segacrpt.h | 66 ++++++++--------- 17 files changed, 147 insertions(+), 147 deletions(-) diff --git a/src/mame/drivers/angelkds.c b/src/mame/drivers/angelkds.c index 26675600213..5c896d1e55d 100644 --- a/src/mame/drivers/angelkds.c +++ b/src/mame/drivers/angelkds.c @@ -737,7 +737,7 @@ ROM_START( spcpostn ) ROM_END -static DRIVER_INIT( spcpostn ) { spcpostn_decode(machine); } +static DRIVER_INIT( spcpostn ) { spcpostn_decode(machine, "main"); } GAME( 1988, angelkds, 0, angelkds, angelkds, 0, ROT90, "Sega / Nasco?", "Angel Kids (Japan)" , 0) /* Nasco not displayed but 'Exa Planning' is */ diff --git a/src/mame/drivers/appoooh.c b/src/mame/drivers/appoooh.c index 087d31bd814..5e0ab7ce384 100644 --- a/src/mame/drivers/appoooh.c +++ b/src/mame/drivers/appoooh.c @@ -550,7 +550,7 @@ ROM_END static DRIVER_INIT(robowres){ - robowres_decode(machine); + robowres_decode(machine, "main"); } static DRIVER_INIT(robowrb){ diff --git a/src/mame/drivers/calorie.c b/src/mame/drivers/calorie.c index 75fa1591280..125b31af7dd 100644 --- a/src/mame/drivers/calorie.c +++ b/src/mame/drivers/calorie.c @@ -458,7 +458,7 @@ ROM_END static DRIVER_INIT( calorie ) { - calorie_decode(machine); + calorie_decode(machine, "main"); } static DRIVER_INIT( calorieb ) diff --git a/src/mame/drivers/cclimber.c b/src/mame/drivers/cclimber.c index c14a52258b1..c2d7699c0a4 100644 --- a/src/mame/drivers/cclimber.c +++ b/src/mame/drivers/cclimber.c @@ -1904,13 +1904,13 @@ ROM_END static DRIVER_INIT( yamato ) { - yamato_decode(machine); + yamato_decode(machine,"main"); } static DRIVER_INIT( toprollr ) { - toprollr_decode(machine); + toprollr_decode(machine,"user1"); } diff --git a/src/mame/drivers/jongkyo.c b/src/mame/drivers/jongkyo.c index 3d499dfbb61..068a0aa4786 100644 --- a/src/mame/drivers/jongkyo.c +++ b/src/mame/drivers/jongkyo.c @@ -648,7 +648,7 @@ static DRIVER_INIT( jongkyo ) } /* then do the standard Sega decryption */ - jongkyo_decode(machine); + jongkyo_decode(machine, "main"); videoram2 = auto_malloc(0x4000); state_save_register_global_pointer(videoram2, 0x4000); diff --git a/src/mame/drivers/pbaction.c b/src/mame/drivers/pbaction.c index 5e0efb12205..5ff7fe797e2 100644 --- a/src/mame/drivers/pbaction.c +++ b/src/mame/drivers/pbaction.c @@ -414,7 +414,7 @@ static DRIVER_INIT( pbactio3 ) } /* then do the standard Sega decryption */ - pbaction_decode(machine); + pbaction_decode(machine, "main"); /* install a protection (?) workaround */ memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc000, 0xc000, 0, 0, pbactio3_prot_kludge_r ); diff --git a/src/mame/drivers/pengo.c b/src/mame/drivers/pengo.c index 0837dee09fa..ac8746b6734 100644 --- a/src/mame/drivers/pengo.c +++ b/src/mame/drivers/pengo.c @@ -613,7 +613,7 @@ ROM_END static DRIVER_INIT( pengo ) { - pengo_decode(machine); + pengo_decode(machine, "main"); } diff --git a/src/mame/drivers/segae.c b/src/mame/drivers/segae.c index d858f8c5f94..389df49e9d3 100644 --- a/src/mame/drivers/segae.c +++ b/src/mame/drivers/segae.c @@ -2359,7 +2359,7 @@ static DRIVER_INIT( astrofl ) { DRIVER_INIT_CALL(segasyse); - astrofl_decode(machine); + astrofl_decode(machine, "z80"); } GAME( 1985, hangonjr, 0, systeme, hangonjr, hangonjr, ROT0, "Sega", "Hang-On Jr.", 0 ) diff --git a/src/mame/drivers/segag80r.c b/src/mame/drivers/segag80r.c index cb60b6abbb7..3f917142c3a 100644 --- a/src/mame/drivers/segag80r.c +++ b/src/mame/drivers/segag80r.c @@ -1499,7 +1499,7 @@ static DRIVER_INIT( monsterb ) static DRIVER_INIT( monster2 ) { /* configure the 315-5006 security chip */ - spatter_decode(machine); + spatter_decode(machine, "main"); sega_security(0); /* configure video */ @@ -1536,7 +1536,7 @@ static DRIVER_INIT( pignewt ) static DRIVER_INIT( sindbadm ) { /* configure the encrypted Z80 */ - sindbadm_decode(machine); + sindbadm_decode(machine, "main"); sega_security(0); /* configure video */ diff --git a/src/mame/drivers/senjyo.c b/src/mame/drivers/senjyo.c index 795e4c07870..0ed66e16b98 100644 --- a/src/mame/drivers/senjyo.c +++ b/src/mame/drivers/senjyo.c @@ -994,7 +994,7 @@ DRIVER_INIT( starforc ) DRIVER_INIT( starfore ) { /* encrypted CPU */ - suprloco_decode(machine); + suprloco_decode(machine, "main"); is_senjyo = 0; senjyo_scrollhack = 0; @@ -1003,7 +1003,7 @@ DRIVER_INIT( starfore ) DRIVER_INIT( starfora ) { /* encrypted CPU */ - yamato_decode(machine); + yamato_decode(machine, "main"); is_senjyo = 0; senjyo_scrollhack = 1; diff --git a/src/mame/drivers/sg1000a.c b/src/mame/drivers/sg1000a.c index 67e7951c309..7e7e241c084 100644 --- a/src/mame/drivers/sg1000a.c +++ b/src/mame/drivers/sg1000a.c @@ -325,7 +325,7 @@ static DRIVER_INIT( sg1000a ) static DRIVER_INIT(chwrestl) { DRIVER_INIT_CALL(sg1000a); - regulus_decode(machine); + regulus_decode(machine, "main"); } /************************************* diff --git a/src/mame/drivers/suprloco.c b/src/mame/drivers/suprloco.c index e6a3a89edd4..97a1bbae487 100644 --- a/src/mame/drivers/suprloco.c +++ b/src/mame/drivers/suprloco.c @@ -274,7 +274,7 @@ static DRIVER_INIT( suprloco ) /* decrypt program ROMs */ - suprloco_decode(machine); + suprloco_decode(machine, "main"); } diff --git a/src/mame/drivers/system1.c b/src/mame/drivers/system1.c index ceb9a7b11a6..8d347741021 100644 --- a/src/mame/drivers/system1.c +++ b/src/mame/drivers/system1.c @@ -4766,25 +4766,25 @@ ROM_START( noboranb ) ROM_LOAD( "nobo_pr.13a", 0x0300, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* timing? (not used) */ ROM_END -static DRIVER_INIT( regulus ) { regulus_decode(machine); } -static DRIVER_INIT( mrviking ) { mrviking_decode(machine); } -static DRIVER_INIT( swat ) { swat_decode(machine); } -static DRIVER_INIT( flicky ) { flicky_decode(machine); } -static DRIVER_INIT( wmatch ) { wmatch_decode(machine); } -static DRIVER_INIT( bullfgtj ) { bullfgtj_decode(machine); } -static DRIVER_INIT( spatter ) { spatter_decode(machine); } -static DRIVER_INIT( pitfall2 ) { pitfall2_decode(machine); } -static DRIVER_INIT( nprinces ) { nprinces_decode(machine); } -static DRIVER_INIT( seganinj ) { seganinj_decode(machine); } -static DRIVER_INIT( imsorry ) { imsorry_decode(machine); } -static DRIVER_INIT( teddybb ) { teddybb_decode(machine); } -static DRIVER_INIT( hvymetal ) { hvymetal_decode(machine); } -static DRIVER_INIT( myheroj ) { myheroj_decode(machine); } -static DRIVER_INIT( 4dwarrio ) { fdwarrio_decode(machine); } -static DRIVER_INIT( wboy ) { astrofl_decode(machine); } -static DRIVER_INIT( wboy2 ) { wboy2_decode(machine); } -static DRIVER_INIT( gardia ) { gardia_decode(machine); } -static DRIVER_INIT( gardiab ) { gardiab_decode(machine); } +static DRIVER_INIT( regulus ) { regulus_decode(machine, "main"); } +static DRIVER_INIT( mrviking ) { mrviking_decode(machine, "main"); } +static DRIVER_INIT( swat ) { swat_decode(machine, "main"); } +static DRIVER_INIT( flicky ) { flicky_decode(machine, "main"); } +static DRIVER_INIT( wmatch ) { wmatch_decode(machine, "main"); } +static DRIVER_INIT( bullfgtj ) { bullfgtj_decode(machine, "main"); } +static DRIVER_INIT( spatter ) { spatter_decode(machine, "main"); } +static DRIVER_INIT( pitfall2 ) { pitfall2_decode(machine, "main"); } +static DRIVER_INIT( nprinces ) { nprinces_decode(machine, "main"); } +static DRIVER_INIT( seganinj ) { seganinj_decode(machine, "main"); } +static DRIVER_INIT( imsorry ) { imsorry_decode(machine, "main"); } +static DRIVER_INIT( teddybb ) { teddybb_decode(machine, "main"); } +static DRIVER_INIT( hvymetal ) { hvymetal_decode(machine, "main"); } +static DRIVER_INIT( myheroj ) { myheroj_decode(machine, "main"); } +static DRIVER_INIT( 4dwarrio ) { fdwarrio_decode(machine, "main"); } +static DRIVER_INIT( wboy ) { astrofl_decode(machine, "main"); } +static DRIVER_INIT( wboy2 ) { wboy2_decode(machine, "main"); } +static DRIVER_INIT( gardia ) { gardia_decode(machine, "main"); } +static DRIVER_INIT( gardiab ) { gardiab_decode(machine, "main"); } @@ -4869,7 +4869,7 @@ static DRIVER_INIT( myherok ) } } - myheroj_decode(machine); + myheroj_decode(machine, "main"); } static DRIVER_INIT( noboranb ) diff --git a/src/mame/drivers/turbo.c b/src/mame/drivers/turbo.c index a40505ef40f..b0ecf4de97f 100644 --- a/src/mame/drivers/turbo.c +++ b/src/mame/drivers/turbo.c @@ -1767,7 +1767,7 @@ static DRIVER_INIT( turbo_enc ) static DRIVER_INIT( buckrog_enc ) { - buckrog_decode(machine); + buckrog_decode(machine, "main"); } diff --git a/src/mame/drivers/zaxxon.c b/src/mame/drivers/zaxxon.c index c45ae33097f..40e796704c4 100644 --- a/src/mame/drivers/zaxxon.c +++ b/src/mame/drivers/zaxxon.c @@ -1389,7 +1389,7 @@ ROM_END * *************************************/ -static void zaxxonb_decode(running_machine *machine) +static void zaxxonb_decode(running_machine *machine, const char *region) { /* the values vary, but the translation mask is always laid out like this: @@ -1434,8 +1434,8 @@ static void zaxxonb_decode(running_machine *machine) }; int A; - UINT8 *rom = memory_region(machine, "main"); - int size = memory_region_length(machine, "main"); + UINT8 *rom = memory_region(machine, region); + int size = memory_region_length(machine, region); UINT8 *decrypt = auto_malloc(size); memory_set_decrypted_region(0, 0x0000, size - 1, decrypt); @@ -1475,25 +1475,25 @@ static void zaxxonb_decode(running_machine *machine) static DRIVER_INIT( zaxxonb ) { - zaxxonb_decode(machine); + zaxxonb_decode(machine, "main"); } static DRIVER_INIT( szaxxon ) { - szaxxon_decode(machine); + szaxxon_decode(machine, "main"); } static DRIVER_INIT( futspy ) { - futspy_decode(machine); + futspy_decode(machine, "main"); } static DRIVER_INIT( razmataz ) { - nprinces_decode(machine); + nprinces_decode(machine, "main"); /* additional input ports are wired */ memory_install_read8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xc004, 0xc004, 0, 0x18f3, input_port_read_handler8(machine->portconfig, "SW04")); @@ -1514,7 +1514,7 @@ static DRIVER_INIT( razmataz ) static DRIVER_INIT( ixion ) { - szaxxon_decode(machine); + szaxxon_decode(machine, "main"); /* connect the universal sound board */ memory_install_readwrite8_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xe03c, 0xe03c, 0, 0x1f00, sega_usb_status_r, sega_usb_data_w); diff --git a/src/mame/machine/segacrpt.c b/src/mame/machine/segacrpt.c index f36b626fa42..fec38ba1439 100644 --- a/src/mame/machine/segacrpt.c +++ b/src/mame/machine/segacrpt.c @@ -233,13 +233,13 @@ static void look_for_known_plaintext(void) } #endif -static void sega_decode(running_machine *machine, const UINT8 convtable[32][4]) +static void sega_decode(running_machine *machine, const char *region, const UINT8 convtable[32][4]) { int A; - int length = memory_region_length(machine, "main"); + int length = memory_region_length(machine, region); int cryptlen = MIN(length, 0x8000); - UINT8 *rom = memory_region(machine, "main"); + UINT8 *rom = memory_region(machine, region); UINT8 *decrypted = auto_malloc(0xc000); memory_set_decrypted_region(0, 0x0000, cryptlen - 1, decrypted); @@ -285,7 +285,7 @@ static void sega_decode(running_machine *machine, const UINT8 convtable[32][4]) -void buckrog_decode(running_machine *machine) +void buckrog_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -310,11 +310,11 @@ void buckrog_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } -void pengo_decode(running_machine *machine) +void pengo_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -339,11 +339,11 @@ void pengo_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } -void szaxxon_decode(running_machine *machine) +void szaxxon_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -368,11 +368,11 @@ void szaxxon_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } -void suprloco_decode(running_machine *machine) +void suprloco_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -397,11 +397,11 @@ void suprloco_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } -void yamato_decode(running_machine *machine) +void yamato_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -426,10 +426,10 @@ void yamato_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } -void toprollr_decode(running_machine *machine) +void toprollr_decode(running_machine *machine, const char *region) { /* same tables as in Yamato, but encrypted ROM is banked */ UINT8 *decrypted; @@ -458,7 +458,7 @@ void toprollr_decode(running_machine *machine) int A; - UINT8 *rom = memory_region(machine, "user1"); + UINT8 *rom = memory_region(machine, region); int bankstart; decrypted = auto_malloc(0x6000*3); @@ -489,14 +489,14 @@ void toprollr_decode(running_machine *machine) rom[A+bankstart] = (src & ~0xa8) | (convtable[2*row+1][col] ^ xor); } - memory_configure_bank(1,0,3, memory_region(machine, "user1"),0x6000); + memory_configure_bank(1,0,3, memory_region(machine, region),0x6000); memory_configure_bank_decrypted(1,0,3,decrypted,0x6000); memory_set_decrypted_region(0, 0x0000, 0x5fff, decrypted); memory_set_bank(1, 0); } -void sindbadm_decode(running_machine *machine) +void sindbadm_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -521,11 +521,11 @@ void sindbadm_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } -void regulus_decode(running_machine *machine) +void regulus_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -550,11 +550,11 @@ void regulus_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } -void mrviking_decode(running_machine *machine) +void mrviking_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -579,11 +579,11 @@ void mrviking_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } -void swat_decode(running_machine *machine) +void swat_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -608,11 +608,11 @@ void swat_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } -void flicky_decode(running_machine *machine) +void flicky_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -637,11 +637,11 @@ void flicky_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } -void futspy_decode(running_machine *machine) +void futspy_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -666,11 +666,11 @@ void futspy_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } -void wmatch_decode(running_machine *machine) +void wmatch_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -695,11 +695,11 @@ void wmatch_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } -void bullfgtj_decode(running_machine *machine) +void bullfgtj_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -724,11 +724,11 @@ void bullfgtj_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } -void pbaction_decode(running_machine *machine) +void pbaction_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -753,11 +753,11 @@ void pbaction_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } -void spatter_decode(running_machine *machine) +void spatter_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -782,11 +782,11 @@ void spatter_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } -void jongkyo_decode(running_machine *machine) +void jongkyo_decode(running_machine *machine, const char *region) { /* encrypted ROM is banked */ UINT8 *decrypted; @@ -815,7 +815,7 @@ void jongkyo_decode(running_machine *machine) int A; - UINT8 *rom = memory_region(machine, "main"); + UINT8 *rom = memory_region(machine, region); decrypted = auto_malloc(0x9000); for (A = 0x0000;A < 0x9000;A++) @@ -847,14 +847,14 @@ void jongkyo_decode(running_machine *machine) rom[A] = (src & ~0xa8) | (convtable[2*row+1][col] ^ xor); } - memory_configure_bank(1,0,8, memory_region(machine, "main")+0x7000,0x0400); + memory_configure_bank(1,0,8, memory_region(machine, region)+0x7000,0x0400); memory_configure_bank_decrypted(1,0,8,decrypted+0x7000,0x0400); memory_set_decrypted_region(0, 0x0000, 0x6bff, decrypted); memory_set_bank(1, 0); } -void pitfall2_decode(running_machine *machine) +void pitfall2_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -879,11 +879,11 @@ void pitfall2_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } -void nprinces_decode(running_machine *machine) +void nprinces_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -908,11 +908,11 @@ void nprinces_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } -void seganinj_decode(running_machine *machine) +void seganinj_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -937,11 +937,11 @@ void seganinj_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } -void imsorry_decode(running_machine *machine) +void imsorry_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -966,11 +966,11 @@ void imsorry_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } -void teddybb_decode(running_machine *machine) +void teddybb_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -995,11 +995,11 @@ void teddybb_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } -void myheroj_decode(running_machine *machine) +void myheroj_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -1024,11 +1024,11 @@ void myheroj_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } -void hvymetal_decode(running_machine *machine) +void hvymetal_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -1053,11 +1053,11 @@ void hvymetal_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } -void lvcards_decode(running_machine *machine) +void lvcards_decode(running_machine *machine, const char *region) { static const UINT8 convtable[32][4] = { @@ -1082,7 +1082,7 @@ void lvcards_decode(running_machine *machine) }; - sega_decode(machine, convtable); + sega_decode(machine, region, convtable); } @@ -1145,7 +1145,7 @@ static void sega_decode_2(running_machine *machine,const char *region, -void fdwarrio_decode(running_machine *machine) +void fdwarrio_decode(running_machine *machine, const char *region) { static const UINT8 opcode_xor[64] = { @@ -1189,11 +1189,11 @@ void fdwarrio_decode(running_machine *machine) }; - sega_decode_2(machine,"main",opcode_xor,opcode_swap_select,data_xor,data_swap_select); + sega_decode_2(machine,region,opcode_xor,opcode_swap_select,data_xor,data_swap_select); } -void astrofl_decode(running_machine *machine) +void astrofl_decode(running_machine *machine, const char *region) { static const UINT8 opcode_xor[64] = { @@ -1234,11 +1234,11 @@ void astrofl_decode(running_machine *machine) }; - sega_decode_2(machine,"z80",opcode_xor,opcode_swap_select,data_xor,data_swap_select); + sega_decode_2(machine,region,opcode_xor,opcode_swap_select,data_xor,data_swap_select); } -void wboy2_decode(running_machine *machine) +void wboy2_decode(running_machine *machine, const char *region) { static const UINT8 opcode_xor[64] = { @@ -1299,11 +1299,11 @@ void wboy2_decode(running_machine *machine) }; - sega_decode_2(machine,"main",opcode_xor,opcode_swap_select,data_xor,data_swap_select); + sega_decode_2(machine,region,opcode_xor,opcode_swap_select,data_xor,data_swap_select); } -void robowres_decode(running_machine *machine) +void robowres_decode(running_machine *machine, const char *region) { static const UINT8 opcode_xor[64] = { @@ -1352,7 +1352,7 @@ void robowres_decode(running_machine *machine) }; - sega_decode_2(machine,"main",opcode_xor,opcode_swap_select,data_xor,data_swap_select); + sega_decode_2(machine,region,opcode_xor,opcode_swap_select,data_xor,data_swap_select); } @@ -1363,7 +1363,7 @@ void robowres_decode(running_machine *machine) ******************************************************************************/ -static void sega_decode_317(running_machine *machine,int order, int opcode_shift, int data_shift) +static void sega_decode_317(running_machine *machine, const char *region, int order, int opcode_shift, int data_shift) { static const UINT8 xor1_317[1+64] = { @@ -1412,12 +1412,12 @@ static void sega_decode_317(running_machine *machine,int order, int opcode_shift }; if (order) - sega_decode_2( machine, "main", xor2_317+opcode_shift, swap2_317+opcode_shift, xor1_317+data_shift, swap1_317+data_shift ); + sega_decode_2( machine, region, xor2_317+opcode_shift, swap2_317+opcode_shift, xor1_317+data_shift, swap1_317+data_shift ); else - sega_decode_2( machine, "main", xor1_317+opcode_shift, swap1_317+opcode_shift, xor2_317+data_shift, swap2_317+data_shift ); + sega_decode_2( machine, region, xor1_317+opcode_shift, swap1_317+opcode_shift, xor2_317+data_shift, swap2_317+data_shift ); } -void spcpostn_decode(running_machine *machine) { sega_decode_317( machine, 0, 0, 1 ); } -void calorie_decode(running_machine *machine) { sega_decode_317( machine, 1, 0, 0 ); } -void gardia_decode(running_machine *machine) { sega_decode_317( machine, 1, 1, 1 ); } -void gardiab_decode(running_machine *machine) { sega_decode_317( machine, 0, 1, 2 ); } +void spcpostn_decode(running_machine *machine, const char *region) { sega_decode_317( machine, region, 0, 0, 1 ); } +void calorie_decode(running_machine *machine, const char *region) { sega_decode_317( machine, region, 1, 0, 0 ); } +void gardia_decode(running_machine *machine, const char *region) { sega_decode_317( machine, region, 1, 1, 1 ); } +void gardiab_decode(running_machine *machine, const char *region) { sega_decode_317( machine, region, 0, 1, 2 ); } diff --git a/src/mame/machine/segacrpt.h b/src/mame/machine/segacrpt.h index 3662c68c468..952850a8c91 100644 --- a/src/mame/machine/segacrpt.h +++ b/src/mame/machine/segacrpt.h @@ -1,35 +1,35 @@ -void buckrog_decode(running_machine *machine); -void pengo_decode(running_machine *machine); -void szaxxon_decode(running_machine *machine); -void suprloco_decode(running_machine *machine); -void yamato_decode(running_machine *machine); -void toprollr_decode(running_machine *machine); -void sindbadm_decode(running_machine *machine); -void regulus_decode(running_machine *machine); -void mrviking_decode(running_machine *machine); -void swat_decode(running_machine *machine); -void flicky_decode(running_machine *machine); -void futspy_decode(running_machine *machine); -void wmatch_decode(running_machine *machine); -void bullfgtj_decode(running_machine *machine); -void pbaction_decode(running_machine *machine); -void spatter_decode(running_machine *machine); -void jongkyo_decode(running_machine *machine); -void pitfall2_decode(running_machine *machine); -void nprinces_decode(running_machine *machine); -void seganinj_decode(running_machine *machine); -void imsorry_decode(running_machine *machine); -void teddybb_decode(running_machine *machine); -void myheroj_decode(running_machine *machine); -void hvymetal_decode(running_machine *machine); -void lvcards_decode(running_machine *machine); +void buckrog_decode(running_machine *machine, const char *region); +void pengo_decode(running_machine *machine, const char *region); +void szaxxon_decode(running_machine *machine, const char *region); +void suprloco_decode(running_machine *machine, const char *region); +void yamato_decode(running_machine *machine, const char *region); +void toprollr_decode(running_machine *machine, const char *region); +void sindbadm_decode(running_machine *machine, const char *region); +void regulus_decode(running_machine *machine, const char *region); +void mrviking_decode(running_machine *machine, const char *region); +void swat_decode(running_machine *machine, const char *region); +void flicky_decode(running_machine *machine, const char *region); +void futspy_decode(running_machine *machine, const char *region); +void wmatch_decode(running_machine *machine, const char *region); +void bullfgtj_decode(running_machine *machine, const char *region); +void pbaction_decode(running_machine *machine, const char *region); +void spatter_decode(running_machine *machine, const char *region); +void jongkyo_decode(running_machine *machine, const char *region); +void pitfall2_decode(running_machine *machine, const char *region); +void nprinces_decode(running_machine *machine, const char *region); +void seganinj_decode(running_machine *machine, const char *region); +void imsorry_decode(running_machine *machine, const char *region); +void teddybb_decode(running_machine *machine, const char *region); +void myheroj_decode(running_machine *machine, const char *region); +void hvymetal_decode(running_machine *machine, const char *region); +void lvcards_decode(running_machine *machine, const char *region); -void fdwarrio_decode(running_machine *machine); -void astrofl_decode(running_machine *machine); -void wboy2_decode(running_machine *machine); -void robowres_decode(running_machine *machine); -void calorie_decode(running_machine *machine); -void spcpostn_decode(running_machine *machine); -void gardia_decode(running_machine *machine); -void gardiab_decode(running_machine *machine); +void fdwarrio_decode(running_machine *machine, const char *region); +void astrofl_decode(running_machine *machine, const char *region); +void wboy2_decode(running_machine *machine, const char *region); +void robowres_decode(running_machine *machine, const char *region); +void calorie_decode(running_machine *machine, const char *region); +void spcpostn_decode(running_machine *machine, const char *region); +void gardia_decode(running_machine *machine, const char *region); +void gardiab_decode(running_machine *machine, const char *region);