Previous 15994 Revisions Next

r3446 Monday 13th October, 2008 at 11:15:04 UTC by Nathan Woods
Updated to MAME 0.127u8 core
[docs]messnew.txt
[src/emu]rendlay.c
[src/emu/cpu/sh2]sh2.c sh2drc.c
[src/emu/machine]ldpr8210.c z80pio.c z80pio.h
[src/emu/video]resnet.c
[src/mame]mamedriv.c
[src/mame/drivers]backfire.c bwidow.c cps1.c cubeqst.c ddealer.c exidy.c exidy440.c expro02.c f-32.c firefox.c galpanic.c higemaru.c hornet.c jalmah.c konamigx.c m90.c mcr3.c mediagx.c megadriv.c namcos22.c neodrvr.c plygonet.c pmpoker.c psikyosh.c segac2.c shisen.c smstrv.c snookr10.c stv.c stvinit.c taito_f2.c videopkr.c vigilant.c xexex.c
[src/mame/includes]neogeo.h
[src/mame/layout]goldnpkr.lay pmpoker.lay pottnpkr.lay
[src/mame/machine]neoboot.c neocrypt.c neoprot.c
[src/mame/video]naughtyb.c

src/mame/machine/neoboot.c
r3445r3446
1818
1919/* General Bootleg Functions - used by more than 1 game */
2020
21
2122void neogeo_bootleg_cx_decrypt( running_machine *machine )
2223{
2324   int i;
r3445r3446
3435   free( buf );
3536}
3637
38
3739void neogeo_bootleg_sx_decrypt( running_machine *machine, int value )
3840{
3941   int sx_size = memory_region_length( machine, "fixed" );
r3445r3446
6264
6365/* The King of Gladiator (The King of Fighters '97 bootleg) */
6466
65/* the protection patching here may be incomplete */
6667
67// Thanks to Razoola for the info
68/* The protection patching here may be incomplete
69   Thanks to Razoola for the info */
6870
6971void kog_px_decrypt( running_machine *machine )
7072{
r3445r3446
127129
128130}
129131
130/* Kof 10th Anniversary (bootleg of King of Fighters 2002 */
131132
133/* The King of Fighters 10th Anniversary (The King of Fighters 2002 bootleg) */
134
135
132136/* this uses RAM based tiles for the text layer, however the implementation
133137  is incomplete, at the moment the S data is copied from the program rom on
134138  start-up instead */
r3445r3446
204208   ((UINT16*)src)[0x8bf8/2] = 0xf980;
205209}
206210
211
212/* The King of Fighters 10th Anniversary Extra Plus (The King of Fighters 2002 bootleg) */
213
214
207215void decrypt_kf10thep(running_machine *machine)
208216{
209217   int i;
r3445r3446
241249   free(sbuf);
242250}
243251
252
253/* The King of Fighters 10th Anniversary 2005 Unique (The King of Fighters 2002 bootleg) */
254
255
244256static void kf2k5uni_px_decrypt( running_machine *machine )
245257{
246258   int i, j, ofst;
r3445r3446
286298   kf2k5uni_mx_decrypt(machine);
287299}
288300
289/* Kof2002 Magic Plus */
290301
302/* The King of Fighters 2002 Magic Plus (bootleg) */
303
304
291305void kf2k2mp_decrypt( running_machine *machine )
292306{
293307   int i,j;
r3445r3446
309323   free(dst);
310324}
311325
312/* Kof2002 Magic Plus 2 */
313326
327/* The King of Fighters 2002 Magic Plus II (bootleg) */
314328
329
315330void kof2km2_px_decrypt( running_machine *machine )
316331{
317332   UINT8 *src = memory_region(machine, "main");
r3445r3446
328343
329344/* Crouching Tiger Hidden Dragon 2003 (bootleg of King of Fighters 2001) */
330345
346
331347/* descrambling information from razoola */
332348static void cthd2003_neogeo_gfx_address_fix_do(running_machine *machine, int start, int end, int bit3shift, int bit2shift, int bit1shift, int bit0shift)
333349{
r3445r3446
466482    mem16[0x9943e/2] = 0xdd03;
467483}
468484
485
469486/* Crouching Tiger Hidden Dragon 2003 Super Plus (bootleg of King of Fighters 2001) */
470487
488
471489static void ct2k3sp_sx_decrypt( running_machine *machine )
472490{
473491   int rom_size = memory_region_length( machine, "fixed" );
r3445r3446
514532   cthd2003_c(machine, 0);
515533}
516534
535
517536/* Crouching Tiger Hidden Dragon 2003 Super Plus alternate (bootleg of King of Fighters 2001) */
518537
538
519539void decrypt_ct2k3sa( running_machine *machine )
520540{
521541   UINT8 *romdata = memory_region(machine, "audio")+0x10000;
r3445r3446
570590    mem16[0x9943e/2] = 0xdd03;
571591}
572592
593
573594/* King of Fighters Special Edition 2004 (bootleg of King of Fighters 2002) */
574595
596
575597void decrypt_kof2k4se_68k( running_machine *machine )
576598{
577599   UINT8 *src = memory_region(machine, "main")+0x100000;
r3445r3446
636658   rom[0xBBE42/2] = 0x6002;
637659}
638660
661
662/* Metal Slug 5 Plus (bootleg) */
663
664
639665static READ16_HANDLER( mslug5_prot_r )
640666{
641667   logerror("PC %06x: access protected\n",activecpu_get_pc());
r3445r3446
669695}
670696
671697
698/* SNK vs. CAPCOM SVC CHAOS (bootleg) */
672699
700
673701void svcboot_px_decrypt( running_machine *machine )
674702{
675703   static const UINT8 sec[] = {
r3445r3446
691719   free( dst );
692720}
693721
694
695
696722void svcboot_cx_decrypt( running_machine *machine )
697723{
698724   static const UINT8 idx_tbl[ 0x10 ] = {
r3445r3446
726752}
727753
728754
755/* SNK vs. CAPCOM SVC CHAOS Plus (bootleg set 1) */
729756
757
730758void svcplus_px_decrypt( running_machine *machine )
731759{
732760   static const int sec[] = {
r3445r3446
753781   free( dst );
754782}
755783
756
757
758784void svcplus_px_hack( running_machine *machine )
759785{
760786   /* patched by the protection chip? */
r3445r3446
769795   src[ 0x0f802c ] = 0x16;
770796}
771797
798
799/* SNK vs. CAPCOM SVC CHAOS Plus (bootleg set 2) */
800
801
772802void svcplusa_px_decrypt( running_machine *machine )
773803{
774804   int i;
r3445r3446
786816}
787817
788818
819/* SNK vs. CAPCOM SVC CHAOS Super Plus (bootleg) */
789820
821
790822void svcsplus_px_decrypt( running_machine *machine )
791823{
792824   static const int sec[] = {
r3445r3446
809841   free( dst );
810842}
811843
812
813
814844void svcsplus_px_hack( running_machine *machine )
815845{
816846   /* patched by the protection chip? */
r3445r3446
838868}
839869#endif
840870
841/* I think the code for the kof2003 bootlegs is wrong, they don't work */
842871
843/***************************************************************************
844 kof2003b
845****************************************************************************/
872/* The King of Fighters 2003 (bootleg set 1) */
846873
847/* kof2003 bootleg init info */
874
848875static UINT16 kof2003_tbl[4096];
849876
850877static READ16_HANDLER( kof2003_r)
r3445r3446
887914   }
888915}
889916
890void kof2003b_px_decrypt( running_machine *machine )
917void kf2k3bl_px_decrypt( running_machine *machine )
891918{
892919   int i;
893920   static const UINT8 sec[] = {
r3445r3446
905932    free( buf );
906933}
907934
908void kof2003b_install_protection(running_machine *machine)
935void kf2k3bl_install_protection(running_machine *machine)
909936{
910937    memory_install_readwrite16_handler(machine,  0, ADDRESS_SPACE_PROGRAM, 0x2fe000, 0x2fffff, 0, 0, kof2003_r, kof2003_w );
911938}
912939
913940
914/***************************************************************************
915 kof2k3pl
916***************************************************************************/
941/* The King of Fighters 2004 Plus / Hero (The King of Fighters 2003 bootleg) */
917942
918void kof2k3pl_px_decrypt( running_machine *machine )
943
944void kf2k3pl_px_decrypt( running_machine *machine )
919945{
920946   UINT16*tmp = malloc_or_die(0x100000);
921947   UINT16*rom = (UINT16*)memory_region( machine, "main" );
r3445r3446
940966}
941967
942968
943/***************************************************************************
944 kof2k3up
945***************************************************************************/
969/* The King of Fighters 2004 Ultra Plus (The King of Fighters 2003 bootleg) */
946970
947971
948void kof2k3up_px_decrypt( running_machine *machine )
972void kf2k3upl_px_decrypt( running_machine *machine )
949973{
950974   {
951975      UINT8 *src = memory_region(machine, "main");
r3445r3446
967991   }
968992}
969993
970void kof2k3up_install_protection(running_machine *machine)
994void kf2k3upl_install_protection(running_machine *machine)
971995{
972996    memory_install_readwrite16_handler(machine,  0, ADDRESS_SPACE_PROGRAM, 0x2fe000, 0x2fffff, 0, 0, kof2003_r, kof2003_w );
973997}
r3445r3446
10131037      rom[ i ] = BITSWAP8( rom[ i ], 0, 1, 5, 4, 3, 2, 6, 7 );
10141038}
10151039
1040
1041/* Matrimelee / Shin Gouketsuji Ichizoku Toukon (bootleg) */
1042
1043
1044#define MATRIMBLZ80( i ) ( i^(BITSWAP8(i&0x3,4,3,1,2,0,7,6,5)<<8) )
1045
1046void matrimbl_decrypt( running_machine *machine )
1047{
1048   /* decrypt Z80 */
1049   UINT8 *rom = memory_region( machine, "audio" )+0x10000;
1050   UINT8 *buf = malloc_or_die( 0x20000 );
1051   int i, j=0;
1052   memcpy( buf, rom, 0x20000 );
1053   for( i=0x00000; i<0x20000; i++ )
1054   {
1055      if ( i&0x10000 )
1056      {
1057         if ( i&0x800 )
1058         {
1059            j=MATRIMBLZ80( i );
1060            j=j^0x10000;
1061         }
1062         else
1063         {
1064            j=MATRIMBLZ80(( i^0x01 ));
1065         }
1066      }
1067      else
1068      {
1069         if ( i&0x800 )
1070         {
1071            j=MATRIMBLZ80(( i^0x01 ));
1072            j=j^0x10000;
1073         }
1074         else
1075         {
1076            j=MATRIMBLZ80( i );
1077         }
1078      }
1079      rom[ j ]=buf[ i ];
1080   }
1081   free( buf );
1082   memcpy( rom-0x10000, rom, 0x10000 );
1083
1084   /* decrypt gfx */
1085   cthd2003_c( machine, 0);
1086}
1087
src/mame/machine/neoprot.c
r3445r3446
110110}
111111
112112
113
114113/************************ King of Fighters 98*******************
115114  The encrypted set has a rom overlay feature, checked at
116  various points in the game
115  various points in the game.
116  Special board is used: NEO-MVS PROGSF1 (1998.6.17)
117  The board has a ALTERA (EPM7128SQC100-15) chip which is tied to 242-P1
117118***************************************************************/
118119
119120static WRITE16_HANDLER ( kof98_prot_w )
r3445r3446
149150}
150151
151152
152
153153/************************ Metal Slug X *************************
154154  todo: emulate, not patch!
155  Special board is used: NEO-MVS PROGEOP (1999.2.2)
156  The board has a ALTERA (EPM7128SQC100-15) chip which is tied to 250-P1
157  Also found on this special board is a QFP144 labeled with 0103
155158***************************************************************/
156159
157160void mslugx_install_protection(running_machine *machine)
src/mame/machine/neocrypt.c
r3445r3446
590590
591591
592592/* the S data comes from the end of the C data */
593static void neogeo_sfix_decrypt(running_machine *machine)
593void neogeo_sfix_decrypt(running_machine *machine)
594594{
595595   int i;
596596   int rom_size = memory_region_length(machine, "sprites");
src/mame/mamedriv.c
r3445r3446
57975797   DRIVER( kf10thep )   /* bootleg of kof2002 */
57985798   DRIVER( kof2k4se )   /* bootleg of kof2002 */
57995799   DRIVER( matrim )   /* 0266 (c) 2002 Atlus */
5800   DRIVER( matrimbl )   /* bootleg */
58005801   DRIVER( pnyaa )      /* 0267 (c) 2003 Aiky / Taito */
58015802   DRIVER( ms5pcb )   /* 0268 (c) 2003 Playmore */
58025803   DRIVER( mslug5 )   /* 0268 (c) 2003 Playmore */
r3445r3446
81338134   DRIVER( sb2003a )   /* (c) 2003 Limenko */
81348135   DRIVER( spotty )   /* (c) 2001 Prince Co. */
81358136   DRIVER( carrera )   /* (c) 19?? BS Electronics */
8137
8138   /* Golden Poker / Potten's Poker hardware */
81368139   DRIVER( pmpoker )   /* (c) 1981 PlayMan */
81378140   DRIVER( goldnpkr )   /* (c) 1981 Bonanza */
8138    DRIVER( goldnpkb )   /* (c) 1981 Bonanza */
8139    DRIVER( goldnpkc )   /* Bootleg */
8140   DRIVER( jokerpkr )   /* Bootleg in Coinmaster hardware */
8141   DRIVER( goldnpkb )   /* (c) 1981 Bonanza */
81418142   DRIVER( pottnpkr )   /* Bootleg */
8142   DRIVER( pottnpkb )   /* Bootleg */
8143   DRIVER( potnpkra )   /* Bootleg in Coinmaster H/W */
8144   DRIVER( potnpkrb )   /* Bootleg */
8145   DRIVER( potnpkrc )   /* Bootleg */
8146   DRIVER( potnpkrd )   /* Bootleg */
8147   DRIVER( potnpkre )   /* Bootleg */
8148   DRIVER( goodluck )   /* Unknown */
8149   DRIVER( bsuerte )   /* Unknown */
8150   DRIVER( bsuertea )   /* Unknown */
8151   DRIVER( royale )   /* Unknown */
8152   DRIVER( witchcrd )   /* 1991, Unknown */
8153   DRIVER( witchcda )   /* 1991, Unknown */
8154   DRIVER( witchcdb )   /* 1991, Unknown */
8155   DRIVER( sloco93 )   /* 1993, Unknown */
8156   DRIVER( sloco93a )   /* 1993, Unknown */
81438157
81448158   /* Cal Omega */
81458159   DRIVER( comg076 )   /* (c) 1981 Cal Omega Inc. */
src/mame/includes/neogeo.h
r3445r3446
4242
4343void kof99_neogeo_gfx_decrypt(running_machine *machine, int extra_xor);
4444void kof2000_neogeo_gfx_decrypt(running_machine *machine, int extra_xor);
45void cmc42_neogeo_gfx_decrypt(running_machine *machine, int extra_xor);
4546void cmc50_neogeo_gfx_decrypt(running_machine *machine, int extra_xor);
46void cmc42_neogeo_gfx_decrypt(running_machine *machine, int extra_xor);
47void neogeo_cmc50_m1_decrypt(running_machine *machine);
48void neo_pcm2_snk_1999(running_machine *machine, int value);
49void neo_pcm2_swap(running_machine *machine, int value);
50void neogeo_sfix_decrypt(running_machine *machine);
4751void kof99_decrypt_68k(running_machine *machine);
4852void garou_decrypt_68k(running_machine *machine);
4953void garouo_decrypt_68k(running_machine *machine);
r3445r3446
6569void kof2003biosdecode(running_machine *machine);
6670void samsh5sp_decrypt_68k(running_machine *machine);
6771
68void neo_pcm2_snk_1999(running_machine *machine, int value);
69void neo_pcm2_swap(running_machine *machine, int value);
7072
71void neogeo_cmc50_m1_decrypt(running_machine *machine);
72
7373/*----------- defined in machine/neoprot.c -----------*/
7474
7575void neogeo_reset_rng(void);
r3445r3446
111111void svcplusa_px_decrypt(running_machine *machine);
112112void svcsplus_px_decrypt(running_machine *machine);
113113void svcsplus_px_hack(running_machine *machine);
114void kof2003b_px_decrypt(running_machine *machine);
115void kof2003b_install_protection(running_machine *machine);
116void kof2k3pl_px_decrypt(running_machine *machine);
117void kof2k3up_px_decrypt(running_machine *machine);
118void kof2k3up_install_protection(running_machine *machine);
114void kf2k3bl_px_decrypt(running_machine *machine);
115void kf2k3bl_install_protection(running_machine *machine);
116void kf2k3pl_px_decrypt(running_machine *machine);
117void kf2k3upl_px_decrypt(running_machine *machine);
118void kf2k3upl_install_protection(running_machine *machine);
119119void kf2k3pl_install_protection(running_machine *machine);
120120void samsho5b_px_decrypt(running_machine *machine);
121121void samsho5b_vx_decrypt(running_machine *machine);
122void matrimbl_decrypt(running_machine *machine);
122123
123124
124125/*----------- defined in video/neogeo.c -----------*/
src/mame/video/naughtyb.c
r3445r3446
9292   int i;
9393
9494   rgb = compute_res_net_all(color_prom, &naughtyb_decode_info, &naughtyb_net_info);
95
9695   for (i = 0; i < 0x100; i++)
9796      palette_set_color(machine, BITSWAP8(i,5,7,6,2,1,0,4,3), rgb[i]);
97   free(rgb);
9898
9999   palette_normalize_range(machine->palette, 0, 255, 0, 255);
100100}
src/mame/layout/goldnpkr.lay
r3445r3446
11<?xml version="1.0"?>
22<mamelayout version="2">
33   <element name="BET" defstate="1">
4      <rect>
4      <rect state="1">
55         <color red="1.0" green="0.0" blue="0.0" />
66      </rect>
7      <text string="BET" state="1">
7      <rect state="0">
8         <color red="0.3" green="0.0" blue="0.0" />
9      </rect>
10      <text string="BET">
811         <color red="0.0" green="0.0" blue="0.0" />
912         <bounds x="0" y="0.1" width="1" height="0.8" />
1013      </text>
1114   </element>
1215
1316   <element name="DEAL" defstate="1">
14      <rect>
17      <rect state="1">
1518         <color red="1.0" green="0.0" blue="0.0" />
1619      </rect>
17      <text string="DEAL" state="1">
20      <rect state="0">
21         <color red="0.3" green="0.0" blue="0.0" />
22      </rect>
23      <text string="DEAL">
1824         <color red="0.0" green="0.0" blue="0.0" />
1925         <bounds x="0" y="0.1" width="1" height="0.8" />
2026      </text>
2127   </element>
2228
2329   <element name="HOLD" defstate="1">
24      <rect>
30      <rect state="1">
2531         <color red="1.0" green="0.5" blue="0.0" />
2632      </rect>
27      <text string="HOLD" state="1">
33      <rect state="0">
34         <color red="0.3" green="0.1" blue="0.0" />
35      </rect>
36      <text string="HOLD">
2837         <color red="0.0" green="0.0" blue="0.0" />
2938         <bounds x="0" y="0.1" width="1" height="0.8" />
3039      </text>
3140   </element>
3241
3342   <element name="D-UP" defstate="1">
34      <rect>
43      <rect state="1">
3544         <color red="1.0" green="1.0" blue="1.0" />
3645      </rect>
37      <text string="D-UP" state="1">
46      <rect state="0">
47         <color red="0.2" green="0.2" blue="0.2" />
48      </rect>
49      <text string="D-UP">
3850         <color red="0.0" green="0.0" blue="0.0" />
3951         <bounds x="0" y="0.1" width="1" height="0.8" />
4052      </text>
4153   </element>
4254
4355   <element name="TAKE" defstate="1">
44      <rect>
56      <rect state="1">
4557         <color red="1.0" green="1.0" blue="1.0" />
4658      </rect>
47      <text string="TAKE" state="1">
59      <rect state="0">
60         <color red="0.2" green="0.2" blue="0.2" />
61      </rect>
62      <text string="TAKE">
4863         <color red="0.0" green="0.0" blue="0.0" />
4964         <bounds x="0" y="0.1" width="1" height="0.8" />
5065      </text>
5166   </element>
5267
5368   <element name="BIG" defstate="1">
54      <rect>
69      <rect state="1">
5570         <color red="1.0" green="1.0" blue="1.0" />
5671      </rect>
57      <text string="BIG" state="1">
72      <rect state="0">
73         <color red="0.2" green="0.2" blue="0.2" />
74      </rect>
75      <text string="BIG">
5876         <color red="0.0" green="0.0" blue="0.0" />
5977         <bounds x="0" y="0.1" width="1" height="0.8" />
6078      </text>
6179   </element>
6280
6381   <element name="SMALL" defstate="1">
64      <rect>
82      <rect state="1">
6583         <color red="1.0" green="1.0" blue="1.0" />
6684      </rect>
67      <text string="SMALL" state="1">
85      <rect state="0">
86         <color red="0.2" green="0.2" blue="0.2" />
87      </rect>
88      <text string="SMALL">
6889         <color red="0.0" green="0.0" blue="0.0" />
6990         <bounds x="0" y="0.1" width="1" height="0.8" />
7091      </text>
7192   </element>
7293
7394   <element name="CANCEL" defstate="1">
74      <rect>
95      <rect state="1">
7596         <color red="1.0" green="0.0" blue="0.0" />
7697      </rect>
77      <text string="CANCEL" state="1">
98      <rect state="0">
99         <color red="0.3" green="0.0" blue="0.0" />
100      </rect>
101      <text string="CANCEL">
78102         <color red="0.0" green="0.0" blue="0.0" />
79103         <bounds x="0" y="0.1" width="1" height="0.8" />
80104      </text>
src/mame/layout/pottnpkr.lay
r3445r3446
11<?xml version="1.0"?>
22<mamelayout version="2">
33   <element name="BET" defstate="1">
4      <rect>
4      <rect state="1">
55         <color red="1.0" green="1.0" blue="1.0" />
66      </rect>
7      <text string="BET" state="1">
7      <rect state="0">
8         <color red="0.2" green="0.2" blue="0.2" />
9      </rect>
10      <text string="BET">
811         <color red="0.0" green="0.0" blue="0.0" />
912         <bounds x="0" y="0.1" width="1" height="0.8" />
1013      </text>
1114   </element>
1215
1316   <element name="DEAL" defstate="1">
14      <rect>
17      <rect state="1">
1518         <color red="1.0" green="1.0" blue="1.0" />
1619      </rect>
17      <text string="DEAL" state="1">
20      <rect state="0">
21         <color red="0.2" green="0.2" blue="0.2" />
22      </rect>
23      <text string="DEAL">
1824         <color red="0.0" green="0.0" blue="0.0" />
1925         <bounds x="0" y="0.1" width="1" height="0.8" />
2026      </text>
2127   </element>
2228
2329   <element name="HOLD" defstate="1">
24      <rect>
30      <rect state="1">
2531         <color red="1.0" green="0.5" blue="0.0" />
2632      </rect>
27      <text string="HOLD" state="1">
33      <rect state="0">
34         <color red="0.3" green="0.1" blue="0.0" />
35      </rect>
36      <text string="HOLD">
2837         <color red="0.0" green="0.0" blue="0.0" />
2938         <bounds x="0" y="0.1" width="1" height="0.8" />
3039      </text>
3140   </element>
3241
3342   <element name="CANCEL" defstate="1">
34      <rect>
43      <rect state="1">
3544         <color red="1.0" green="0.0" blue="0.0" />
3645      </rect>
37      <text string="CANCEL" state="1">
46      <rect state="0">
47         <color red="0.3" green="0.0" blue="0.0" />
48      </rect>
49      <text string="CANCEL">
3850         <color red="0.0" green="0.0" blue="0.0" />
3951         <bounds x="0" y="0.1" width="1" height="0.8" />
4052      </text>
src/mame/layout/pmpoker.lay
r3445r3446
11<?xml version="1.0"?>
22<mamelayout version="2">
33   <element name="DEAL" defstate="1">
4      <rect>
4      <rect state="1">
55         <color red="1.0" green="1.0" blue="1.0" />
66      </rect>
7      <text string="DEAL" state="1">
7      <rect state="0">
8         <color red="0.2" green="0.2" blue="0.2" />
9      </rect>
10      <text string="DEAL">
811         <color red="0.0" green="0.0" blue="0.0" />
912         <bounds x="0" y="0.1" width="1" height="0.8" />
1013      </text>
1114   </element>
1215
1316   <element name="HOLD1" defstate="1">
14      <rect>
17      <rect state="1">
1518         <color red="1.0" green="0.0" blue="0.0" />
1619      </rect>
17      <text string="HOLD1/TAKE" state="1">
20      <rect state="0">
21         <color red="0.3" green="0.0" blue="0.0" />
22      </rect>
23      <text string="HOLD1/TAKE">
1824         <color red="0.0" green="0.0" blue="0.0" />
1925         <bounds x="0" y="0.1" width="1" height="0.8" />
2026      </text>
2127   </element>
2228
2329   <element name="HOLD2" defstate="1">
24      <rect>
30      <rect state="1">
2531         <color red="1.0" green="0.0" blue="0.0" />
2632      </rect>
27      <text string="HOLD2/SMALL" state="1">
33      <rect state="0">
34         <color red="0.3" green="0.0" blue="0.0" />
35      </rect>
36      <text string="HOLD2/SMALL">
2837         <color red="0.0" green="0.0" blue="0.0" />
2938         <bounds x="0" y="0.1" width="1" height="0.8" />
3039      </text>
3140   </element>
3241
3342   <element name="HOLD3" defstate="1">
34      <rect>
43      <rect state="1">
3544         <color red="1.0" green="0.0" blue="0.0" />
3645      </rect>
37      <text string="HOLD3/BET" state="1">
46      <rect state="0">
47         <color red="0.3" green="0.0" blue="0.0" />
48      </rect>
49      <text string="HOLD3/BET">
3850         <color red="0.0" green="0.0" blue="0.0" />
3951         <bounds x="0" y="0.1" width="1" height="0.8" />
4052      </text>
4153   </element>
4254
4355   <element name="HOLD4" defstate="1">
44      <rect>
56      <rect state="1">
4557         <color red="1.0" green="0.0" blue="0.0" />
4658      </rect>
47      <text string="HOLD4/BIG" state="1">
59      <rect state="0">
60         <color red="0.3" green="0.0" blue="0.0" />
61      </rect>
62      <text string="HOLD4/BIG">
4863         <color red="0.0" green="0.0" blue="0.0" />
4964         <bounds x="0" y="0.1" width="1" height="0.8" />
5065      </text>
5166   </element>
5267
5368   <element name="HOLD5" defstate="1">
54      <rect>
69      <rect state="1">
5570         <color red="1.0" green="0.0" blue="0.0" />
5671      </rect>
57      <text string="HOLD5/D-UP" state="1">
72      <rect state="0">
73         <color red="0.3" green="0.0" blue="0.0" />
74      </rect>
75      <text string="HOLD5/D-UP">
5876         <color red="0.0" green="0.0" blue="0.0" />
5977         <bounds x="0" y="0.1" width="1" height="0.8" />
6078      </text>
src/mame/drivers/expro02.c
r3445r3446
130130GP-U60 (16V8)
131131U77 (22CV10)
132132U78 (22CV10)
133
134------------- Comad games ------------------
135
136The Comad games are clearly derived from this version of the game, not
137the one in galspanic.c.  Fantasia even still has the encrypted tile
138roms and makes use of the extra layer.  The other games write to the
139RAM for this layer, but don't have any roms.
140
141the layer is misplaced however, different scroll regs?
142
143
144
133145*/
134146
135147#include "driver.h"
r3445r3446
359371   }
360372}
361373
362static ADDRESS_MAP_START( galsnew, ADDRESS_SPACE_PROGRAM, 16 )
374static ADDRESS_MAP_START( galsnew_map, ADDRESS_SPACE_PROGRAM, 16 )
363375   AM_RANGE(0x000000, 0x03ffff) AM_ROM // main program
364376   AM_RANGE(0x080000, 0x0fffff) AM_ROM AM_REGION("user2",0) // other data
365377   AM_RANGE(0x100000, 0x3fffff) AM_ROM AM_REGION("user1",0) // main data
r3445r3446
400412ADDRESS_MAP_END
401413
402414
415// bigger rom space, OKI commands moved
416//  no CALC mcu
417static ADDRESS_MAP_START( fantasia_map, ADDRESS_SPACE_PROGRAM, 16 )
418   AM_RANGE(0x000000, 0x4fffff) AM_ROM
419   AM_RANGE(0x500000, 0x51ffff) AM_RAM AM_BASE(&galsnew_bg_pixram)
420   AM_RANGE(0x520000, 0x53ffff) AM_RAM AM_BASE(&galsnew_fg_pixram)
421   AM_RANGE(0x580000, 0x580fff) AM_READWRITE(SMH_RAM,kaneko16_vram_1_w) AM_BASE(&kaneko16_vram_1)   // Layers 0
422   AM_RANGE(0x581000, 0x581fff) AM_READWRITE(SMH_RAM,kaneko16_vram_0_w) AM_BASE(&kaneko16_vram_0)   //
423   AM_RANGE(0x582000, 0x582fff) AM_RAM AM_BASE(&kaneko16_vscroll_1)                           //
424   AM_RANGE(0x583000, 0x583fff) AM_RAM AM_BASE(&kaneko16_vscroll_0)                           //
425   AM_RANGE(0x600000, 0x600fff) AM_READWRITE(SMH_RAM,galsnew_paletteram_w) AM_BASE(&paletteram16) // palette?
426   AM_RANGE(0x680000, 0x68001f) AM_READWRITE(SMH_RAM,kaneko16_layers_0_regs_w) AM_BASE(&kaneko16_layers_0_regs) // sprite regs? tileregs?
427   AM_RANGE(0x700000, 0x700fff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size)    // sprites? 0x72f words tested
428   AM_RANGE(0x780000, 0x78001f) AM_READWRITE(SMH_RAM,kaneko16_sprites_regs_w) AM_BASE(&kaneko16_sprites_regs) // sprite regs? tileregs?
429   AM_RANGE(0x800000, 0x800001) AM_READ_PORT("DSW1")
430   AM_RANGE(0x800002, 0x800003) AM_READ_PORT("DSW2")
431   AM_RANGE(0x800004, 0x800005) AM_READ_PORT("DSW3")
432   AM_RANGE(0x800006, 0x800007) AM_NOP // ? used ?
433   AM_RANGE(0x900000, 0x900001) AM_WRITE(galsnew_6295_bankswitch_w)
434   AM_RANGE(0xa00000, 0xa00001) AM_WRITENOP   /* ??? */
435   AM_RANGE(0xc80000, 0xc8ffff) AM_RAM
436   AM_RANGE(0xd80000, 0xd80001) AM_WRITE(galsnew_vram_1_bank_w)   /* ??? */
437   //AM_RANGE(0xe00000, 0xe00015) AM_READWRITE(galpanib_calc_r,galpanib_calc_w) /* CALC1 MCU interaction (simulated) */
438   AM_RANGE(0xe80000, 0xe80001) AM_WRITE(galsnew_vram_0_bank_w)   /* ??? */
439   AM_RANGE(0xf00000, 0xf00001) AM_READWRITE(okim6295_status_0_msb_r,okim6295_data_0_msb_w)
440ADDRESS_MAP_END
441
403442static INTERRUPT_GEN( galsnew_interrupt )
404443{
405444   cpunum_set_input_line(machine, 0, cpu_getiloops() + 3, HOLD_LINE);   /* IRQs 5, 4, and 3 */
r3445r3446
440479
441480   /* basic machine hardware */
442481   MDRV_CPU_ADD("main", M68000, 12000000)
443   MDRV_CPU_PROGRAM_MAP(galsnew,0)
482   MDRV_CPU_PROGRAM_MAP(galsnew_map,0)
444483   MDRV_CPU_VBLANK_INT_HACK(galsnew_interrupt,3)
445484
446485   /* CALC01 MCU @ 16Mhz (unknown type, simulated) */
r3445r3446
472511   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
473512MACHINE_DRIVER_END
474513
475/* the tile roms seem lineswapped.. but I don't know how to descramble them yet */
476DRIVER_INIT(galsnew)
477{
478   UINT32 *src = (UINT32 *)memory_region(machine, "gfx3" );
479   UINT32 *dst = (UINT32 *)memory_region(machine, "gfx2" );
480   int x, source, offset,inv;
514static MACHINE_DRIVER_START( fantasia )
481515
482   for (x=0; x<0x80000;x++)
483   {
484      inv = ~x;
485      offset = x ^ (0xC30 | (inv >> 1 & 0x10200));
486      offset = (offset & ~0x07) | ((0x02 - (offset & 0x07)) & 0x07);
487      if(x&0x0010)
488         offset = (offset & ~0x60) | (((offset & 0x60) + 0x20) & 0x60);
489      if((x&((inv >> 1 & 0x10000) | 0x2000)) == 0x02000)
490         offset ^= 0x1000;
491      if(!(x&(0x1000 | (x >> 4 & 0x2000))))
492      {
493         offset ^= 0x100;
494         if(!(x&0x20000) && (x&0x12000) == 0x02000)
495         {
496            offset = (offset & ~0x180) | (((offset & 0x180) + 0x180) & 0x180);
497            if((x&0x180) == 0x100)
498            {
499               offset ^= 0x400;
500               if((x&0x480) == 0x400)
501                  offset ^= 0x200;
502            }
503         }
504      }
505      else
506      {
507         offset = (offset & ~0x180) | (((offset & 0x180) + 0x80) & 0x180);
508         if((x&0x180) == 0x100)
509         {
510            offset ^= 0x400;
511            if((x&0x480) == 0x400)
512               offset ^= 0x200;
513         }
514      }
515      if((x&0x7) < 0x03)
516      {
517         if(!(x&0x800))
518         {
519            offset ^= 0x4000;
520            if(x&0x4000)
521            {
522               offset ^= 0x08;
523               if(x&0x08)
524                  offset = (offset & ~0x70) | (((offset & 0x70) + 0x10) & 0x70);
525            }
526         }
527         offset ^= 0x800;
528      }
529      if((x & 0x30000) == 0x10000)
530         source = x;
531      else
532         source = x ^ 0x2000;
516   /* basic machine hardware */
517   MDRV_CPU_ADD("main", M68000, 12000000)
518   MDRV_CPU_PROGRAM_MAP(fantasia_map,0)
519   MDRV_CPU_VBLANK_INT_HACK(galsnew_interrupt,3)
533520
534      dst[source] = (src[offset] << 4 & 0xF0F0F0F0) | (src[offset] >> 4 & 0x0F0F0F0F);
535   }
536}
521   /* video hardware */
522   MDRV_SCREEN_ADD("main", RASTER)
523   MDRV_SCREEN_REFRESH_RATE(60)
524   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
525   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
526   MDRV_SCREEN_SIZE(256, 256)
527   MDRV_SCREEN_VISIBLE_AREA(0, 256-1, 0, 256-32-1)
537528
529   MDRV_GFXDECODE(1x4bit_1x4bit)
530   MDRV_PALETTE_LENGTH(2048 + 32768)
531   MDRV_MACHINE_RESET( galsnew )
532
533   MDRV_VIDEO_START(galsnew)
534   MDRV_VIDEO_UPDATE(galsnew)
535   MDRV_PALETTE_INIT(berlwall)
536
537   /* arm watchdog */
538   //MDRV_WATCHDOG_TIME_INIT(UINT64_ATTOTIME_IN_SEC(3))    /* a guess, and certainly wrong */
539
540   /* sound hardware */
541   MDRV_SPEAKER_STANDARD_MONO("mono")
542
543   MDRV_SOUND_ADD("oki", OKIM6295, 12000000/6)
544   MDRV_SOUND_CONFIG(okim6295_interface_pin7low)
545   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
546MACHINE_DRIVER_END
547
538548ROM_START( galsnew ) /* EXPRO-02 PCB */
539549   ROM_REGION( 0x40000, "main", 0 )   /* 68000 code */
540550   ROM_LOAD16_BYTE( "pm110u_u87-01.u87", 0x000000, 0x20000, CRC(b793a57d) SHA1(12d57b2b4add532f0d0453c25b30d34b3449d717) ) /* US region */
r3445r3446
653663ROM_END
654664
655665
666ROM_START( fantasia )
667   ROM_REGION( 0x500000, "main", 0 )   /* 68000 code */
668   ROM_LOAD16_BYTE( "prog2_16.rom", 0x000000, 0x80000, CRC(e27c6c57) SHA1(420b66928c46e76fa2496f221691dd6c34542287) )
669   ROM_LOAD16_BYTE( "prog1_13.rom", 0x000001, 0x80000, CRC(68d27413) SHA1(84cb7d6523325496469d621f6f4da1b719162147) )
670   ROM_LOAD16_BYTE( "iscr6_09.rom", 0x100000, 0x80000, CRC(2a588393) SHA1(ef66ed94dd40a95a9b0fb5c3b075c1f654f60927) )
671   ROM_LOAD16_BYTE( "iscr5_05.rom", 0x100001, 0x80000, CRC(6160e0f0) SHA1(faec9d082c9039885afa4560aa87c05e9ecb5217) )
672   ROM_LOAD16_BYTE( "iscr4_08.rom", 0x200000, 0x80000, CRC(f776b743) SHA1(bd4d666ede454a56181e109745ac4b3203b2a87c) )
673   ROM_LOAD16_BYTE( "iscr3_04.rom", 0x200001, 0x80000, CRC(5df0dff2) SHA1(62ebd3c79f2e8ab30d6862cc4bf80f1b56f1f572) )
674   ROM_LOAD16_BYTE( "iscr2_07.rom", 0x300000, 0x80000, CRC(5707d861) SHA1(33f1cff693dfcb04edbf8738d3ea2a1884e6ff0c) )
675   ROM_LOAD16_BYTE( "iscr1_03.rom", 0x300001, 0x80000, CRC(36cb811a) SHA1(403cef012990b0e01b481b8afc6b5811e7137833) )
676   ROM_LOAD16_BYTE( "imag2_10.rom", 0x400000, 0x80000, CRC(1f14a395) SHA1(12ca5a5a30963ecf90f5a006029aa1098b9ee1df) )
677   ROM_LOAD16_BYTE( "imag1_06.rom", 0x400001, 0x80000, CRC(faf870e4) SHA1(163a9aa3e5c550d3760d32e31048a7aa1f93db7f) )
678
679   ROM_REGION( 0x80000, "gfx1", ROMREGION_DISPOSE )   /* sprites */
680   ROM_LOAD( "obj1_17.rom",  0x00000, 0x80000, CRC(aadb6eb7) SHA1(6eaa994ad7b4e8341360eaf5ddb46240316b7274) )
681
682   ROM_REGION( 0x140000, "oki", 0 )   /* OKIM6295 samples */
683   /* 00000-2ffff is fixed, 30000-3ffff is bank switched from all the ROMs */
684   ROM_LOAD( "mus-1_01.rom", 0x00000, 0x80000, CRC(22955efb) SHA1(791c18d1aa0c10810da05c199108f51f99fe1d49) )
685   ROM_RELOAD(               0x40000, 0x80000 )
686   ROM_LOAD( "mus-2_02.rom", 0xc0000, 0x80000, CRC(4cd4d6c3) SHA1(a617472a810aef6d82f5fe75ef2980c03c21c2fa) )
687
688   ROM_REGION( 0x200000, "gfx2", ROMREGION_DISPOSE )   /* sprites */
689
690   ROM_REGION( 0x200000, "gfx3", ROMREGION_DISPOSE )   /* tiles - encrypted */
691   ROM_LOAD16_BYTE( "gscr2_15.rom", 0x000001, 0x80000, CRC(46666768) SHA1(7281c4b45f6f9f6ad89fa2bb3f67f30433c0c513) )
692   ROM_LOAD16_BYTE( "gscr1_12.rom", 0x000000, 0x80000, CRC(4bd25be6) SHA1(9834f081c0390ccaa1234efd2393b6495e946c64) )
693   ROM_LOAD16_BYTE( "gscr4_14.rom", 0x100001, 0x80000, CRC(4e7e6ed4) SHA1(3e9e942e3de398edc8ac9f82769c3f41708d3741) )
694   ROM_LOAD16_BYTE( "gscr3_11.rom", 0x100000, 0x80000, CRC(6d00a4c5) SHA1(8fc0d78200b82ab87658d364ebe2f2e7239722e7) )
695ROM_END
696
697
698DRIVER_INIT(galsnew)
699{
700   UINT32 *src = (UINT32 *)memory_region(machine, "gfx3" );
701   UINT32 *dst = (UINT32 *)memory_region(machine, "gfx2" );
702   int x, offset;
703
704
705   for (x = 0; x < 0x80000; x++)
706   {
707      offset = x;
708
709      // swap bits around to simplify further processing
710      offset = BITSWAP24(offset, 23,22,21,20,19, 18,15, 9,10,8,7,12,13,16,17, 6,5,4,3,14,11,2,1,0);
711
712      // invert 8 bits
713      offset ^= 0x0528f;
714
715      // addition affecting 9 bits
716      offset = (offset & ~0x001ff) | ((offset + 0x00043) & 0x001ff);
717
718      // subtraction affecting 8 bits
719      offset = (offset & ~0x1fe00) | ((offset - 0x09600) & 0x1fe00);
720
721      // reverse the initial bitswap
722      offset = BITSWAP24(offset, 23,22,21,20,19, 18,9,10,17,4,11,12,3,15,16,14,13,8,7,6,5,2,1,0);
723
724      // swap nibbles to use the same gfxdecode
725      dst[x] = (src[offset] << 4 & 0xF0F0F0F0) | (src[offset] >> 4 & 0x0F0F0F0F);
726   }
727}
728
729
730
656731GAME( 1990, galsnew,  0,       galsnew, galsnew,  galsnew, ROT90, "Kaneko", "Gals Panic (US, EXPRO-02 PCB)", 0 )
657732GAME( 1990, galsnewa, galsnew, galsnew, galsnewa, galsnew, ROT90, "Kaneko", "Gals Panic (Export, EXPRO-02 PCB)", 0 )
658733GAME( 1990, galsnewj, galsnew, galsnew, galsnewa, galsnew, ROT90, "Kaneko (Taito license)", "Gals Panic (Japan, EXPRO-02 PCB)", 0 )
734
735GAME( 1994, fantasia, 0,       fantasia,    galsnew, galsnew, ROT90, "Comad & New Japan System", "Fantasia", GAME_NO_COCKTAIL )
src/mame/drivers/hornet.c
r3445r3446
13041304/*****************************************************************************/
13051305
13061306
1307static TIMER_CALLBACK( irq_off )
1308{
1309   cpunum_set_input_line(machine, 1, param, CLEAR_LINE);
1310}
1311
13071312static void sound_irq_callback(running_machine *machine, int irq)
13081313{
1309   if (irq == 0)
1310      cpunum_set_input_line(machine, 1, INPUT_LINE_IRQ1, PULSE_LINE);
1311   else
1312      cpunum_set_input_line(machine, 1, INPUT_LINE_IRQ2, PULSE_LINE);
1314   int line = (irq == 0) ? INPUT_LINE_IRQ1 : INPUT_LINE_IRQ2;
1315   cpunum_set_input_line(machine, 1, line, ASSERT_LINE);
1316   timer_set(ATTOTIME_IN_USEC(1), NULL, line, irq_off);
13131317}
13141318
13151319static DRIVER_INIT(hornet)
src/mame/drivers/mediagx.c
r3445r3446
460460   mediagx_config_regs[mediagx_config_reg_sel] = data;
461461}
462462
463static READ32_HANDLER( io20_r )
463static READ8_DEVICE_HANDLER( io20_r )
464464{
465   UINT32 r = 0;
466   // 0x20 - 0x21, PIC
467   if (ACCESSING_BITS_0_15)
468   {
469      r |= read32le_with_read8_device_handler( pic8259_r, mediagx_devices.pic8259_1, offset, mem_mask);
470   }
465   UINT8 r = 0;
471466
472467   // 0x22, 0x23, Cyrix configuration registers
473   if (ACCESSING_BITS_16_23)
468   if (offset == 0x02)
474469   {
475
476470   }
477   if (ACCESSING_BITS_24_31)
471   else if (offset == 0x03)
478472   {
479      r |= mediagx_config_reg_r() << 24;
473      r = mediagx_config_reg_r();
480474   }
475   else
476   {
477      r = pic8259_r(device, offset);
478   }
481479   return r;
482480}
483481
484static WRITE32_HANDLER( io20_w )
482static WRITE8_DEVICE_HANDLER( io20_w )
485483{
486   // 0x20 - 0x21, PIC
487   if (ACCESSING_BITS_0_15)
484   // 0x22, 0x23, Cyrix configuration registers
485   if (offset == 0x02)
488486   {
489      write32le_with_write8_device_handler( pic8259_w, mediagx_devices.pic8259_1, offset, data, mem_mask);
487      mediagx_config_reg_sel = data;
490488   }
491
492   // 0x22, 0x23, Cyrix configuration registers
493   if (ACCESSING_BITS_16_23)
489   else if (offset == 0x03)
494490   {
495      mediagx_config_reg_sel = (data >> 16) & 0xff;
491      mediagx_config_reg_w(data);
496492   }
497   if (ACCESSING_BITS_24_31)
493   else
498494   {
499      mediagx_config_reg_w((data >> 24) & 0xff);
495      pic8259_w(device, offset, data);
500496   }
501497}
502498
r3445r3446
839835   AM_RANGE(0x40008300, 0x400083ff) AM_READWRITE(disp_ctrl_r, disp_ctrl_w)
840836   AM_RANGE(0x40008400, 0x400084ff) AM_READWRITE(memory_ctrl_r, memory_ctrl_w)
841837   AM_RANGE(0x40800000, 0x40bfffff) AM_RAM AM_BASE(&vram)
842   AM_RANGE(0xfffc0000, 0xffffffff) AM_ROM AM_REGION("user1", 0)   /* System BIOS */
838   AM_RANGE(0xfffc0000, 0xffffffff) AM_ROM AM_REGION("bios", 0)   /* System BIOS */
843839ADDRESS_MAP_END
844840
845841static ADDRESS_MAP_START(mediagx_io, ADDRESS_SPACE_IO, 32)
846842   AM_RANGE(0x0000, 0x001f) AM_DEVREADWRITE8(DMA8237, "dma8237_1", dma8237_r, dma8237_w, 0xffffffff)
847   AM_RANGE(0x0020, 0x0023) AM_READWRITE(io20_r, io20_w)
843   AM_RANGE(0x0020, 0x003f) AM_DEVREADWRITE8(PIC8259, "pic8259_master", io20_r, io20_w, 0xffffffff)
848844   AM_RANGE(0x0040, 0x005f) AM_DEVREADWRITE8(PIT8254, "pit8254", pit8253_r, pit8253_w, 0xffffffff)
849845   AM_RANGE(0x0060, 0x006f) AM_READWRITE(kbdc8042_32le_r,         kbdc8042_32le_w)
850846   AM_RANGE(0x0070, 0x007f) AM_READWRITE(mc146818_port32le_r,      mc146818_port32le_w)
851847   AM_RANGE(0x0080, 0x009f) AM_READWRITE8(at_page8_r,            at_page8_w, 0xffffffff)
852   AM_RANGE(0x00a0, 0x00af) AM_DEVREADWRITE8(PIC8259, "pic8259_2", pic8259_r, pic8259_w, 0xffffffff)
853   AM_RANGE(0x00c0, 0x00cf) AM_DEVREADWRITE8(DMA8237, "dma8237_2", at_dma8237_2_r, at_dma8237_2_w, 0xffffffff)
848   AM_RANGE(0x00a0, 0x00bf) AM_DEVREADWRITE8(PIC8259, "pic8259_slave", pic8259_r, pic8259_w, 0xffffffff)
849   AM_RANGE(0x00c0, 0x00df) AM_DEVREADWRITE8(DMA8237, "dma8237_2", at_dma8237_2_r, at_dma8237_2_w, 0xffffffff)
854850   AM_RANGE(0x00e8, 0x00eb) AM_NOP      // I/O delay port
855851   AM_RANGE(0x01f0, 0x01f7) AM_DEVREADWRITE(IDE_CONTROLLER, "ide", ide_r, ide_w)
856852   AM_RANGE(0x0378, 0x037b) AM_READWRITE(parallel_port_r, parallel_port_w)
r3445r3446
953949static MACHINE_START(mediagx)
954950{
955951   mediagx_devices.pit8254 = device_list_find_by_tag( machine->config->devicelist, PIT8254, "pit8254" );
956   mediagx_devices.pic8259_1 = device_list_find_by_tag( machine->config->devicelist, PIC8259, "pic8259_1" );
957   mediagx_devices.pic8259_2 = device_list_find_by_tag( machine->config->devicelist, PIC8259, "pic8259_2" );
952   mediagx_devices.pic8259_1 = device_list_find_by_tag( machine->config->devicelist, PIC8259, "pic8259_master" );
953   mediagx_devices.pic8259_2 = device_list_find_by_tag( machine->config->devicelist, PIC8259, "pic8259_slave" );
958954   mediagx_devices.dma8237_1 = device_list_find_by_tag( machine->config->devicelist, DMA8237, "dma8237_1" );
959955   mediagx_devices.dma8237_2 = device_list_find_by_tag( machine->config->devicelist, DMA8237, "dma8237_2" );
960956}
961957
962958static MACHINE_RESET(mediagx)
963959{
964   UINT8 *rom = memory_region(machine, "user1");
960   UINT8 *rom = memory_region(machine, "bios");
965961
966962   cpunum_set_irq_callback(0, irq_callback);
967963
r3445r3446
10511047   MDRV_DEVICE_ADD( "dma8237_2", DMA8237 )
10521048   MDRV_DEVICE_CONFIG( dma8237_2_config )
10531049
1054   MDRV_DEVICE_ADD( "pic8259_1", PIC8259 )
1050   MDRV_DEVICE_ADD( "pic8259_master", PIC8259 )
10551051   MDRV_DEVICE_CONFIG( mediagx_pic8259_1_config )
10561052
1057   MDRV_DEVICE_ADD( "pic8259_2", PIC8259 )
1053   MDRV_DEVICE_ADD( "pic8259_slave", PIC8259 )
10581054   MDRV_DEVICE_CONFIG( mediagx_pic8259_2_config )
10591055
10601056   MDRV_IDE_CONTROLLER_ADD("ide", ide_interrupt)
r3445r3446
12291225/*****************************************************************************/
12301226
12311227ROM_START(a51site4)
1232   ROM_REGION32_LE(0x40000, "user1", 0)
1228   ROM_REGION32_LE(0x40000, "bios", 0)
12331229   ROM_LOAD("tinybios.rom", 0x00000, 0x40000, CRC(5ee189cc) SHA1(0b0d9321a4c59b1deea6854923e655a4d8c4fcfe))
12341230
12351231   ROM_REGION(0x08100, "gfx1", 0)
src/mame/drivers/megadriv.c
r3445r3446
4141Known Non-Issues (confirmed on Real Genesis)
4242    Castlevania - Bloodlines (U) [!] - Pause text is missing on upside down level
4343    Blood Shot (E) (M4) [!] - corrupt texture in level 1 is correct...
44
45Cleanup / Rewrite notes:
46
47On SegaC2 the VDP never turns on the IRQ6 enable register
48  This is because on the real PCB that line of the VDP isn't
49  connected.  Instead the IRQ6 interrupt is triggered by the
50  line that is used to generate the Z80 interrupt on a standard
51  genesis.  (Once, every frame, on screenline 224)
52
53  I should provide interrupt callback functions for each
54  vdp line state change, which can be configured in the init
55  rather than hardcoding them.
56
4457*/
4558
4659
r3445r3446
5366#include "cpu/m68000/m68000.h"
5467#include "megadriv.h"
5568
69
5670#define MEGADRIV_VDP_VRAM(address) megadrive_vdp_vram[(address)&0x7fff]
5771
5872/* the same on all systems? */
r3445r3446
7185static int megadrive_irq6_pending = 0;
7286static int megadrive_irq4_pending = 0;
7387
88int segac2_bg_pal_lookup[4] = { 0x00, 0x10, 0x20, 0x30 };
89int segac2_sp_pal_lookup[4] = { 0x00, 0x10, 0x20, 0x30 };
90
91// hacks for C2
92int genvdp_use_cram = 1; // c2 uses it's own palette ram
93int genesis_has_z80 = 1; // c2 doesn't have a z80..
94int genesis_always_irq6 = 0; // c2 never enables the irq6, different source??
95int genesis_other_hacks = 1; // misc hacks
96
7497INLINE UINT16 get_hposition(void);
7598
7699static UINT8* sprite_renderline;
77100static UINT8* highpri_renderline;
78static UINT16* video_renderline;
79static UINT16* megadrive_vdp_palette_lookup;
80static UINT16* megadrive_vdp_palette_lookup_shadow;
81static UINT16* megadrive_vdp_palette_lookup_highlight;
101static UINT32* video_renderline;
102UINT16* megadrive_vdp_palette_lookup;
103UINT16* megadrive_vdp_palette_lookup_sprite; // for C2
104UINT16* megadrive_vdp_palette_lookup_shadow;
105UINT16* megadrive_vdp_palette_lookup_highlight;
82106UINT16* megadrive_ram;
83107static UINT8 megadrive_vram_fill_pending = 0;
84108static UINT16 megadrive_vram_fill_length = 0;
r3445r3446
376400   megadrive_vdp_cram[offset] = data;
377401
378402   //logerror("Wrote to CRAM addr %04x data %04x\n",megadrive_vdp_address&0xfffe,megadrive_vdp_cram[megadrive_vdp_address>>1]);
379
403   if (genvdp_use_cram)
380404   {
381405      int r,g,b;
382406        r = ((data >> 1)&0x07);
r3445r3446
384408      b = ((data >> 9)&0x07);
385409      palette_set_color_rgb(machine,offset,pal3bit(r),pal3bit(g),pal3bit(b));
386410      megadrive_vdp_palette_lookup[offset] = (b<<2) | (g<<7) | (r<<12);
411      megadrive_vdp_palette_lookup_sprite[offset] = (b<<2) | (g<<7) | (r<<12);
387412      megadrive_vdp_palette_lookup_shadow[offset] = (b<<1) | (g<<6) | (r<<11);
388413      megadrive_vdp_palette_lookup_highlight[offset] = ((b|0x08)<<1) | ((g|0x08)<<6) | ((r|0x08)<<11);
389
390414   }
391415}
392416
r3445r3446
530554   {
531555      if (megadrive_irq6_pending)
532556      {
533         if (MEGADRIVE_REG01_IRQ6_ENABLE)
557         if (MEGADRIVE_REG01_IRQ6_ENABLE )
534558            cpunum_set_input_line(machine, 0,6,HOLD_LINE);
535559         else
536560            cpunum_set_input_line(machine, 0,6,CLEAR_LINE);
r3445r3446
29943018
29953019   sprite_renderline = auto_malloc(1024);
29963020   highpri_renderline = auto_malloc(320);
2997   video_renderline = auto_malloc(320*2);
3021   video_renderline = auto_malloc(320*4);
29983022
29993023   megadrive_vdp_palette_lookup = auto_malloc(0x40*2);
3024   megadrive_vdp_palette_lookup_sprite = auto_malloc(0x40*2);
3025
30003026   megadrive_vdp_palette_lookup_shadow = auto_malloc(0x40*2);
30013027   megadrive_vdp_palette_lookup_highlight = auto_malloc(0x40*2);
30023028
30033029   memset(megadrive_vdp_palette_lookup,0x00,0x40*2);
3030   memset(megadrive_vdp_palette_lookup_sprite,0x00,0x40*2);
3031
30043032   memset(megadrive_vdp_palette_lookup_shadow,0x00,0x40*2);
30053033   memset(megadrive_vdp_palette_lookup_highlight,0x00,0x40*2);
3034
3035   /* no special lookups */
3036   segac2_bg_pal_lookup[0] = 0x00;
3037   segac2_bg_pal_lookup[1] = 0x10;
3038   segac2_bg_pal_lookup[2] = 0x20;
3039   segac2_bg_pal_lookup[3] = 0x30;
3040
3041   segac2_sp_pal_lookup[0] = 0x00;
3042   segac2_sp_pal_lookup[1] = 0x10;
3043   segac2_sp_pal_lookup[2] = 0x20;
3044   segac2_sp_pal_lookup[3] = 0x30;
30063045}
30073046
30083047VIDEO_UPDATE(megadriv)
r3445r3446
41724211      {
41734212         if (!MEGADRIVE_REG0C_SHADOW_HIGLIGHT)
41744213         {
4175            if (sprite_renderline[x+128] & 0x40) video_renderline[x] = sprite_renderline[x+128]&0x3f;
4214            if (sprite_renderline[x+128] & 0x40)
4215            {
4216               video_renderline[x] = sprite_renderline[x+128]&0x3f;
4217               video_renderline[x] |= 0x10000; // mark as sprite pixel
4218            }
41764219         }
41774220         else
41784221         {   /* Special Shadow / Highlight processing */
r3445r3446
41864229               {
41874230                  /* BUG in sprite chip, these colours are always normal intensity */
41884231                  video_renderline[x] = spritedata | 0x4000;
4232                  video_renderline[x] |= 0x10000; // mark as sprite pixel
41894233               }
41904234               else if (spritedata==0x3e)
41914235               {
r3445r3446
42014245               else
42024246               {
42034247                  video_renderline[x] = spritedata;
4248                  video_renderline[x] |= 0x10000; // mark as sprite pixel
42044249               }
42054250
42064251            }
r3445r3446
42404285         if (!MEGADRIVE_REG0C_SHADOW_HIGLIGHT)
42414286         {
42424287            /* Normal */
4243            if (sprite_renderline[x+128] & 0x80) video_renderline[x] = sprite_renderline[x+128]&0x3f;
4288            if (sprite_renderline[x+128] & 0x80)
4289            {
4290               video_renderline[x] = sprite_renderline[x+128]&0x3f;
4291               video_renderline[x] |= 0x10000; // mark as sprite pixel
4292            }
42444293         }
42454294         else
42464295         {
r3445r3446
42624311               else
42634312               {
42644313                  video_renderline[x] = spritedata | 0x4000;
4314                  video_renderline[x] |= 0x10000; // mark as sprite pixel
42654315               }
42664316            }
42674317         }
4268
42694318      }
42704319}
42714320
r3445r3446
42814330
42824331      for (x=0;x<320;x++)
42834332      {
4284         UINT16 dat;
4333         UINT32 dat;
42854334         dat = video_renderline[x];
4286         lineptr[x] = megadrive_vdp_palette_lookup[dat&0x3f];
4335         if (dat&0x10000)
4336            lineptr[x] = megadrive_vdp_palette_lookup_sprite[(dat&0x0f) | segac2_sp_pal_lookup[(dat&0x30)>>4]];
4337         else
4338            lineptr[x] = megadrive_vdp_palette_lookup[(dat&0x0f) | segac2_bg_pal_lookup[(dat&0x30)>>4]];
42874339      }
42884340   }
42894341   else
42904342   {
42914343      for (x=0;x<320;x++)
42924344      {
4293         UINT16 dat;
4345         UINT32 dat;
42944346         dat = video_renderline[x];
42954347
42964348         /* Verify my handling.. I'm not sure all cases are correct */
42974349
4298         switch (dat&0xe000)
4350         switch (dat&0x1e000)
42994351         {
4300            case 0x0000: // low priority, no shadow sprite, no highlight = shadow
4301            case 0x2000: // low priority, shadow sprite, no highlight = shadow
4302            case 0x6000: // normal pri,   shadow sprite, no highlight = shadow?
4303               lineptr[x] = megadrive_vdp_palette_lookup_shadow[dat&0x3f];
4352            case 0x00000: // low priority, no shadow sprite, no highlight = shadow
4353            case 0x02000: // low priority, shadow sprite, no highlight = shadow
4354            case 0x06000: // normal pri,   shadow sprite, no highlight = shadow?
4355            case 0x10000: // (sprite) low priority, no shadow sprite, no highlight = shadow
4356            case 0x12000: // (sprite) low priority, shadow sprite, no highlight = shadow
4357            case 0x16000: // (sprite) normal pri,   shadow sprite, no highlight = shadow?
4358               lineptr[x] = megadrive_vdp_palette_lookup_shadow[(dat&0x0f)  | segac2_bg_pal_lookup[(dat&0x30)>>4]];
43044359               break;
43054360
43064361            case 0x4000: // normal pri, no shadow sprite, no highlight = normal;
43074362            case 0x8000: // low pri, highlight sprite = normal;
4308               lineptr[x] = megadrive_vdp_palette_lookup[dat&0x3f];
4363               lineptr[x] = megadrive_vdp_palette_lookup[(dat&0x0f)  | segac2_bg_pal_lookup[(dat&0x30)>>4]];
43094364               break;
43104365
4311            case 0xc000: // normal pri, highlight set = highlight?
4312               lineptr[x] = megadrive_vdp_palette_lookup_highlight[dat&0x3f];
4366            case 0x14000: // (sprite) normal pri, no shadow sprite, no highlight = normal;
4367            case 0x18000: // (sprite) low pri, highlight sprite = normal;
4368               lineptr[x] = megadrive_vdp_palette_lookup_sprite[(dat&0x0f)  | segac2_sp_pal_lookup[(dat&0x30)>>4]];
43134369               break;
43144370
4315            case 0xa000: // shadow set, highlight set - not possible
4316            case 0xe000: // shadow set, highlight set, normal set, not possible
4317               lineptr[x] = megadrive_vdp_palette_lookup_highlight[mame_rand(machine)&0x3f];
4371
4372            case 0x0c000: // normal pri, highlight set = highlight?
4373            case 0x1c000: // (sprite) normal pri, highlight set = highlight?
4374               lineptr[x] = megadrive_vdp_palette_lookup_highlight[(dat&0x0f) | segac2_bg_pal_lookup[(dat&0x30)>>4]];
43184375               break;
43194376
4377            case 0x0a000: // shadow set, highlight set - not possible
4378            case 0x0e000: // shadow set, highlight set, normal set, not possible
4379            case 0x1a000: // (sprite)shadow set, highlight set - not possible
4380            case 0x1e000: // (sprite)shadow set, highlight set, normal set, not possible
4381            default:
4382               lineptr[x] = mame_rand(Machine)&0x3f;
4383            break;
43204384
4385
43214386         }
43224387      }
43234388
r3445r3446
47074772
47084773
47094774
4710
4775if (genesis_has_z80)
4776{
47114777      if (genesis_scanline_counter==megadrive_z80irq_scanline)
47124778      {
47134779         if ((genz80.z80_has_bus==1) && (genz80.z80_is_reset==0)) cpunum_set_input_line(machine, 1,0,HOLD_LINE);
r3445r3446
47164782      {
47174783         cpunum_set_input_line(machine, 1,0,CLEAR_LINE);
47184784      }
4785}
47194786
4720
47214787   }
47224788   else /* pretend we're still on the same scanline to compensate for rounding errors */
47234789   {
r3445r3446
47324798
47334799   {
47344800//      megadrive_irq6_pending = 1;
4735      if (MEGADRIVE_REG01_IRQ6_ENABLE) cpunum_set_input_line(machine, 0,6,HOLD_LINE);
4801      if (MEGADRIVE_REG01_IRQ6_ENABLE || genesis_always_irq6) cpunum_set_input_line(machine, 0,6,HOLD_LINE);
47364802   }
47374803}
47384804
r3445r3446
47854851      break;
47864852   }
47874853
4788
4854if (genesis_has_z80)
4855{
47894856   genz80.z80_is_reset = 1;
47904857   cpunum_set_input_line(machine, genz80.z80_cpunum, INPUT_LINE_RESET, ASSERT_LINE);
47914858   genz80.z80_has_bus = 1;
r3445r3446
47934860   genz80.z80_bank_pos = 0;
47944861   genz80.z80_bank_addr = 0;
47954862   genesis_scanline_counter = -1;
4863}
47964864
47974865   megadrive_imode = 0;
47984866
r3445r3446
48084876   timer_adjust_oneshot(frame_timer, attotime_zero, 0);
48094877   timer_adjust_oneshot(scanline_timer,  attotime_zero, 0);
48104878
4879if (genesis_other_hacks)
4880{
48114881//  set_refresh_rate(megadriv_framerate);
48124882   cpunum_set_clockscale(machine, 0, 0.9950f); /* Fatal Rewind is very fussy... */
48134883//  cpunum_set_clockscale(machine, 0, 0.3800f); /* Fatal Rewind is very fussy... */
48144884
48154885   memset(megadrive_ram,0x00,0x10000);
4886}
48164887
4817
48184888   irq4counter = -1;
48194889   megadrive_total_scanlines = 262;
48204890   megadrive_visible_scanlines = 224;
48214891   megadrive_irq6_scanline = 224;
48224892   megadrive_z80irq_scanline = 226;
4893
4894
4895
48234896}
48244897
48254898void megadriv_stop_scanline_timer(void)
r3445r3446
51155188
51165189static void megadriv_init_common(running_machine *machine)
51175190{
5191
5192
5193
5194if (genesis_has_z80)
5195{
51185196   genz80.z80_cpunum = 1;
51195197   genz80.z80_prgram = auto_malloc(0x2000);
51205198   memory_set_bankptr( 1, genz80.z80_prgram );
5199}
51215200
51225201   cpunum_set_irq_callback(0, genesis_int_callback);
51235202   megadriv_backupram = NULL;
r3445r3446
51615240
51625241}
51635242
5243DRIVER_INIT( megadriv_c2 )
5244{
5245   genvdp_use_cram = 0;
5246   genesis_has_z80 = 0;
5247   genesis_always_irq6 = 1;
5248   genesis_other_hacks = 0;
51645249
5250   megadriv_init_common(machine);
5251   hazemdchoice_megadrive_region_export = 1;
5252   hazemdchoice_megadrive_region_pal = 0;
5253   hazemdchoice_megadriv_framerate = 60;
5254}
5255
5256
5257
51655258DRIVER_INIT( megadriv )
51665259{
5260   genvdp_use_cram = 1;
5261   genesis_has_z80 = 1;
5262   genesis_always_irq6 = 0;
5263   genesis_other_hacks = 1;
5264
51675265   megadriv_init_common(machine);
51685266   hazemdchoice_megadrive_region_export = 1;
51695267   hazemdchoice_megadrive_region_pal = 0;
r3445r3446
51725270
51735271DRIVER_INIT( megadrij )
51745272{
5273   genvdp_use_cram = 1;
5274   genesis_has_z80 = 1;
5275   genesis_always_irq6 = 0;
5276   genesis_other_hacks = 1;
5277
51755278   megadriv_init_common(machine);
51765279   hazemdchoice_megadrive_region_export = 0;
51775280   hazemdchoice_megadrive_region_pal = 0;
r3445r3446
51805283
51815284DRIVER_INIT( megadrie )
51825285{
5286   genvdp_use_cram = 1;
5287   genesis_has_z80 = 1;
5288   genesis_always_irq6 = 0;
5289   genesis_other_hacks = 1;
5290
51835291   megadriv_init_common(machine);
51845292   hazemdchoice_megadrive_region_export = 1;
51855293   hazemdchoice_megadrive_region_pal = 1;
r3445r3446
51885296
51895297DRIVER_INIT( megadsvp )
51905298{
5299   genvdp_use_cram = 1;
5300   genesis_has_z80 = 1;
5301   genesis_always_irq6 = 0;
5302   genesis_other_hacks = 1;
5303
51915304   megadriv_init_common(machine);
51925305   svp_init(machine);
51935306   hazemdchoice_megadrive_region_export = 1;
src/mame/drivers/galpanic.c
r3445r3446
11231123scr*   - gfx
11241124*/
11251125
1126ROM_START( fantasia )
1127   ROM_REGION( 0x500000, "main", 0 )   /* 68000 code */
1128   ROM_LOAD16_BYTE( "prog2_16.rom", 0x000000, 0x80000, CRC(e27c6c57) SHA1(420b66928c46e76fa2496f221691dd6c34542287) )
1129   ROM_LOAD16_BYTE( "prog1_13.rom", 0x000001, 0x80000, CRC(68d27413) SHA1(84cb7d6523325496469d621f6f4da1b719162147) )
1130   ROM_LOAD16_BYTE( "iscr6_09.rom", 0x100000, 0x80000, CRC(2a588393) SHA1(ef66ed94dd40a95a9b0fb5c3b075c1f654f60927) )
1131   ROM_LOAD16_BYTE( "iscr5_05.rom", 0x100001, 0x80000, CRC(6160e0f0) SHA1(faec9d082c9039885afa4560aa87c05e9ecb5217) )
1132   ROM_LOAD16_BYTE( "iscr4_08.rom", 0x200000, 0x80000, CRC(f776b743) SHA1(bd4d666ede454a56181e109745ac4b3203b2a87c) )
1133   ROM_LOAD16_BYTE( "iscr3_04.rom", 0x200001, 0x80000, CRC(5df0dff2) SHA1(62ebd3c79f2e8ab30d6862cc4bf80f1b56f1f572) )
1134   ROM_LOAD16_BYTE( "iscr2_07.rom", 0x300000, 0x80000, CRC(5707d861) SHA1(33f1cff693dfcb04edbf8738d3ea2a1884e6ff0c) )
1135   ROM_LOAD16_BYTE( "iscr1_03.rom", 0x300001, 0x80000, CRC(36cb811a) SHA1(403cef012990b0e01b481b8afc6b5811e7137833) )
1136   ROM_LOAD16_BYTE( "imag2_10.rom", 0x400000, 0x80000, CRC(1f14a395) SHA1(12ca5a5a30963ecf90f5a006029aa1098b9ee1df) )
1137   ROM_LOAD16_BYTE( "imag1_06.rom", 0x400001, 0x80000, CRC(faf870e4) SHA1(163a9aa3e5c550d3760d32e31048a7aa1f93db7f) )
11381126
1139   ROM_REGION( 0x80000, "gfx1", ROMREGION_DISPOSE )   /* sprites */
1140   ROM_LOAD( "obj1_17.rom",  0x00000, 0x80000, CRC(aadb6eb7) SHA1(6eaa994ad7b4e8341360eaf5ddb46240316b7274) )
11411127
1142   ROM_REGION( 0x140000, "oki", 0 )   /* OKIM6295 samples */
1143   /* 00000-2ffff is fixed, 30000-3ffff is bank switched from all the ROMs */
1144   ROM_LOAD( "mus-1_01.rom", 0x00000, 0x80000, CRC(22955efb) SHA1(791c18d1aa0c10810da05c199108f51f99fe1d49) )
1145   ROM_RELOAD(               0x40000, 0x80000 )
1146   ROM_LOAD( "mus-2_02.rom", 0xc0000, 0x80000, CRC(4cd4d6c3) SHA1(a617472a810aef6d82f5fe75ef2980c03c21c2fa) )
1147
1148   ROM_REGION16_BE( 0x200000, "user1", 0 )   /* unknown */
1149   ROM_LOAD16_BYTE( "gscr2_15.rom", 0x000000, 0x80000, CRC(46666768) SHA1(7281c4b45f6f9f6ad89fa2bb3f67f30433c0c513) )
1150   ROM_LOAD16_BYTE( "gscr1_12.rom", 0x000001, 0x80000, CRC(4bd25be6) SHA1(9834f081c0390ccaa1234efd2393b6495e946c64) )
1151   ROM_LOAD16_BYTE( "gscr4_14.rom", 0x100000, 0x80000, CRC(4e7e6ed4) SHA1(3e9e942e3de398edc8ac9f82769c3f41708d3741) )
1152   ROM_LOAD16_BYTE( "gscr3_11.rom", 0x100001, 0x80000, CRC(6d00a4c5) SHA1(8fc0d78200b82ab87658d364ebe2f2e7239722e7) )
1153ROM_END
1154
1128// fantasy 95 - derived from new fantasia?
11551129ROM_START( fantsy95 )
11561130   ROM_REGION( 0x500000, "main", 0 )   /* 68000 code */
11571131   ROM_LOAD16_BYTE( "prog2.12",  0x000000, 0x80000, CRC(1e684da7) SHA1(2104a6fb5f019011009f4faa769afcada90cff97) )
r3445r3446
13711345
13721346GAME( 1990, galpanic, 0,        galpanic, galpanic, 0, ROT90, "Kaneko", "Gals Panic (Unprotected)", GAME_NO_COCKTAIL )
13731347GAME( 1990, galpania, galpanic, galpania, galpania, 0, ROT90, "Kaneko", "Gals Panic (MCU Protected)", GAME_NO_COCKTAIL )
1374GAME( 1994, fantasia, 0,        comad,    fantasia, 0, ROT90, "Comad & New Japan System", "Fantasia", GAME_NO_COCKTAIL )
13751348GAME( 1994, supmodel, 0,        supmodel, fantasia, 0, ROT90, "Comad & New Japan System", "Super Model",GAME_NO_COCKTAIL ) // 'official' or hack of fantasia?
13761349GAME( 1995, newfant,  0,        comad,    fantasia, 0, ROT90, "Comad & New Japan System", "New Fantasia", GAME_NO_COCKTAIL )
13771350GAME( 1995, fantsy95, 0,        comad,    fantasia, 0, ROT90, "Hi-max Technology Inc.", "Fantasy '95", GAME_NO_COCKTAIL )
src/mame/drivers/videopkr.c
r3445r3446
498498         {
499499            valor = 0x0f;
500500         }
501         
501
502502         valor += co;
503503         break;
504504      }
r3445r3446
832832   output_set_value("TOP_1", (lmp_ports >> 0) & 1);
833833   output_set_value("TOP_2", (lmp_ports >> 1) & 1);
834834   output_set_value("TOP_3", (lmp_ports >> 2) & 1);
835   
835
836836   if (!(sbp3 & 0x10))
837837   {
838838      ay8910_reset_ym(sndti_token(SOUND_AY8910, 0));
src/mame/drivers/mcr3.c
r3445r3446
320320
321321static READ8_HANDLER( stargrds_ip0_r )
322322{
323   UINT8 result = input_port_read(machine, input_mux ? "MONO.IP0.ALT" : "MONO.IP0");
324   return result | ((soundsgood_status_r(machine, 0) << 4) & 0x10);
323   UINT8 result = input_port_read(machine, "MONO.IP0");
324   if (input_mux)
325      result = (result & ~0x0a) | (input_port_read(machine, "MONO.IP0.ALT") & 0x0a);
326   return (result & ~0x10) | ((soundsgood_status_r(machine, 0) << 4) & 0x10);
325327}
326328
327329
r3445r3446
848850   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_PLAYER(3)
849851
850852   PORT_START("MONO.IP0.ALT")   /* IN0 (muxed) */
851   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
853   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )      /* same as MONO.IN0 */
852854   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN3 )
853   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
855   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )      /* same as MONO.IN0 */
854856   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START3 )
855   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL )   /* status from Sounds Good board */
856   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT )
857   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE )
858   PORT_SERVICE( 0x80, IP_ACTIVE_LOW )
857   PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )      /* same as MONO.IN0 */
859858INPUT_PORTS_END
860859
861860
src/mame/drivers/cps1.c
r3445r3446
28152815   /* basic machine hardware */
28162816   MDRV_IMPORT_FROM(cps1_12MHz)
28172817
2818   MDRV_CPU_REPLACE("main", M68000, 12000000)
2818   MDRV_CPU_REPLACE("main", M68000, 12000000)   // 12MHz verified
28192819   MDRV_CPU_PROGRAM_MAP(qsound_main_map,0)
28202820   MDRV_CPU_VBLANK_INT("main", cps1_qsound_interrupt)  /* ??? interrupts per frame */
28212821
r3445r3446
47104710   ROM_LOAD( "prg1",         0x0000, 0x0117, CRC(f1129744) SHA1(a5300f301c1a08a7da768f0773fa0fe3f683b237) )
47114711   ROM_LOAD( "rom1",         0x0000, 0x0117, CRC(41dc73b9) SHA1(7d4c9f1693c821fbf84e32dd6ef62ddf14967845) )
47124712   ROM_LOAD( "sou1",         0x0000, 0x0117, CRC(84f4b2fe) SHA1(dcc9e86cc36316fe42eace02d6df75d08bc8bb6d) )
4713
4714   ROM_REGION( 0x0200, "bboardplds", ROMREGION_DISPOSE )
4715   ROM_LOAD( "ca24b.1a",     0x0000, 0x0117, CRC(76ec0b1c) SHA1(71a7e22613981182fd5b1156f4e495337ab8a172) )
4716   ROM_LOAD( "iob1.11e",     0x0000, 0x0117, CRC(3abc0700) SHA1(973043aa46ec6d5d1db20dc9d5937005a0f9f6ae) )
47134717ROM_END
47144718
47154719/* B-Board 89624B */
r3445r3446
47414745   ROM_LOAD( "prg1",         0x0000, 0x0117, CRC(f1129744) SHA1(a5300f301c1a08a7da768f0773fa0fe3f683b237) )
47424746   ROM_LOAD( "rom1",         0x0000, 0x0117, CRC(41dc73b9) SHA1(7d4c9f1693c821fbf84e32dd6ef62ddf14967845) )
47434747   ROM_LOAD( "sou1",         0x0000, 0x0117, CRC(84f4b2fe) SHA1(dcc9e86cc36316fe42eace02d6df75d08bc8bb6d) )
4748
4749   ROM_REGION( 0x0200, "bboardplds", ROMREGION_DISPOSE )
4750   ROM_LOAD( "ca24b.1a",     0x0000, 0x0117, CRC(76ec0b1c) SHA1(71a7e22613981182fd5b1156f4e495337ab8a172) )
4751   ROM_LOAD( "iob1.11e",     0x0000, 0x0117, CRC(3abc0700) SHA1(973043aa46ec6d5d1db20dc9d5937005a0f9f6ae) )
47444752ROM_END
47454753
47464754/* B-Board 89624B */
r3445r3446
47724780   ROM_LOAD( "prg1",         0x0000, 0x0117, CRC(f1129744) SHA1(a5300f301c1a08a7da768f0773fa0fe3f683b237) )
47734781   ROM_LOAD( "rom1",         0x0000, 0x0117, CRC(41dc73b9) SHA1(7d4c9f1693c821fbf84e32dd6ef62ddf14967845) )
47744782   ROM_LOAD( "sou1",         0x0000, 0x0117, CRC(84f4b2fe) SHA1(dcc9e86cc36316fe42eace02d6df75d08bc8bb6d) )
4783
4784   ROM_REGION( 0x0200, "bboardplds", ROMREGION_DISPOSE )
4785   ROM_LOAD( "ca24b.1a",     0x0000, 0x0117, CRC(76ec0b1c) SHA1(71a7e22613981182fd5b1156f4e495337ab8a172) )
4786   ROM_LOAD( "iob1.11e",     0x0000, 0x0117, CRC(3abc0700) SHA1(973043aa46ec6d5d1db20dc9d5937005a0f9f6ae) )
47754787ROM_END
47764788
47774789/* B-Board 89625B */
r3445r3446
48184830   ROM_LOAD( "prg1",         0x0000, 0x0117, CRC(f1129744) SHA1(a5300f301c1a08a7da768f0773fa0fe3f683b237) )
48194831   ROM_LOAD( "rom1",         0x0000, 0x0117, CRC(41dc73b9) SHA1(7d4c9f1693c821fbf84e32dd6ef62ddf14967845) )
48204832   ROM_LOAD( "sou1",         0x0000, 0x0117, CRC(84f4b2fe) SHA1(dcc9e86cc36316fe42eace02d6df75d08bc8bb6d) )
4833
4834   ROM_REGION( 0x0200, "bboardplds", ROMREGION_DISPOSE )
4835   ROM_LOAD( "ca22b.1a",     0x0000, 0x0117, NO_DUMP )
4836   ROM_LOAD( "iob1.12e",     0x0000, 0x0117, CRC(3abc0700) SHA1(973043aa46ec6d5d1db20dc9d5937005a0f9f6ae) )
48214837ROM_END
48224838
48234839/* B-Board 89624B */
r3445r3446
84218437GAME( 1992, sf2yyc,   sf2ce,    cps1_12MHz, sf2hack,  sf2hack,  ROT0,   "bootleg","Street Fighter II' - Champion Edition (YYC, bootleg)", 0 )
84228438GAME( 1992, sf2koryu, sf2ce,    cps1_12MHz, sf2hack,  sf2hack,  ROT0,   "bootleg","Street Fighter II' - Champion Edition (Xiang Long, Chinese bootleg)", 0 )
84238439GAME( 1992, sf2mdt,   sf2ce,    sf2mdt,     sf2hack,  sf2mdt,   ROT0,   "bootleg","Street Fighter II' - Champion Edition (Magic Delta Turbo, bootleg)", GAME_NOT_WORKING|GAME_NO_SOUND ); // heavily modified, different sound & gfx hardware
8424GAME( 1992, varth,    0,        cps1_12MHz, varth,    cps1,     ROT270, "Capcom", "Varth - Operation Thunderstorm (World 920714)" , 0)      // "ETC"    12MHz not verified but game slows down at 10MHz
8440GAME( 1992, varth,    0,        cps1_12MHz, varth,    cps1,     ROT270, "Capcom", "Varth - Operation Thunderstorm (World 920714)" , 0)      // "ETC"    12MHz verified
84258441GAME( 1992, varthr1,  varth,    cps1_12MHz, varth,    cps1,     ROT270, "Capcom", "Varth - Operation Thunderstorm (World 920612)" , 0)      // "ETC"
84268442GAME( 1992, varthu,   varth,    cps1_12MHz, varth,    cps1,     ROT270, "Capcom (Romstar license)", "Varth - Operation Thunderstorm (US 920612)", 0 )
84278443GAME( 1992, varthj,   varth,    cps1_12MHz, varth,    cps1,     ROT270, "Capcom", "Varth - Operation Thunderstorm (Japan 920714)", 0 )
src/mame/drivers/f-32.c
r3445r3446
186186
187187Mosaic (c) 1999 F2 System
188188
189CPU: Hyperstone E1-32XN
189   CPU: Hyperstone E1-32XN
190190 Video: QuickLogic QL2003-XPL84C
191191 Sound: OKI 6295, BS901 (YM2151) & BS902 (YM3012)
192192   OSC: 20MHz & 14.31818MHz
src/mame/drivers/ddealer.c
r3445r3446
33
44Based on jalmah.c and nmk.c drivers
55Skeleton driver by Tomasz Slanina
6Protection vectors provided by Angelo Salese
67
8TODO:
9-check Video Registers memory at 0x8c1e0-0x8c1ef.They appear to control cards movements,game should be in a playable state;
10-finish the vector protection;
11-implement coin simulation;
12-merge this with the nmk16 driver.Appears to be similar to Hacha Mecha Fighter
13
14
715--
816
917pcb marked  GD91071
r3445r3446
103111
104112
105113#include "driver.h"
114#include "cpu/m68000/m68000.h"
106115
107static UINT16 *shared_ram;
116static UINT16 *mcu_shared_ram;
117static UINT16 *sc3_vram,*sc0_vram;
118static UINT16 *ddealer_vregs;
119static tilemap *sc3_tilemap,*sc0_tilemap;
108120
109static int prot=0;
110121static int respcount;
111122
123static TILEMAP_MAPPER( bg_scan )
124{
125   /* logical (col,row) -> memory offset */
126   return (row & 0x0f) + ((col & 0xff) << 4) + ((row & 0x70) << 8);
127}
112128
129static TILE_GET_INFO( get_sc0_tile_info )
130{
131   int code = sc0_vram[tile_index];
132   SET_TILE_INFO(
133         1,
134         code & 0xfff,
135         code >> 12,
136         0);
137}
138
139static TILE_GET_INFO( get_sc3_tile_info )
140{
141   int code = sc3_vram[tile_index];
142   SET_TILE_INFO(
143         0,
144         code & 0xfff,
145         code >> 12,
146         0);
147}
148
113149static VIDEO_START( ddealer )
114150{
151   sc3_tilemap = tilemap_create(get_sc3_tile_info,tilemap_scan_cols,8,8,64,32);
152   sc0_tilemap = tilemap_create(get_sc0_tile_info,bg_scan,16,16,256,32);
153
154   tilemap_set_transparent_pen(sc0_tilemap,15);
115155}
116156
157#if 0
117158static void ddealer_protection(running_machine *machine)
118159{
119160
r3445r3446
121162   {
122163      shared_ram[0xe000/2]=0x4ef9;
123164      shared_ram[0xe002/2]=0x0000;
124      shared_ram[0xe004/2]=0x0604;
165      shared_ram[0xe004/2]=0x0796;
125166   }
126167
127168   shared_ram[0xe008/2]=0x0001;
r3445r3446
135176   shared_ram[0xe016/2]=mame_rand(machine) & 0xffff;
136177
137178}
179#endif
138180
139181static VIDEO_UPDATE( ddealer )
140182{
141   ddealer_protection(screen->machine);
183   tilemap_set_scrollx( sc3_tilemap, 0, -64);
184
185   tilemap_draw(bitmap,cliprect,sc3_tilemap,0,0);
186   tilemap_draw(bitmap,cliprect,sc0_tilemap,0,0);
187
188   /*temporary*/
189   if(input_code_pressed_once(KEYCODE_Z))
190      mcu_shared_ram[0x000/2]++;
142191   return 0;
143192}
144193
194WRITE16_HANDLER( sc3_vram_w )
195{
196   int oldword = sc3_vram[offset];
197   int newword = oldword;
198   COMBINE_DATA(&newword);
199
200   if (oldword != newword)
201   {
202      sc3_vram[offset] = newword;
203      tilemap_mark_tile_dirty(sc3_tilemap,offset);
204   }
205}
206
207
208WRITE16_HANDLER( sc0_vram_w )
209{
210   int oldword = sc0_vram[offset];
211   int newword = oldword;
212   COMBINE_DATA(&newword);
213
214   if (oldword != newword)
215   {
216      sc0_vram[offset] = newword;
217      tilemap_mark_tile_dirty(sc0_tilemap,offset);
218   }
219}
220
221WRITE16_HANDLER( ddealer_vregs_w )
222{
223   COMBINE_DATA(&ddealer_vregs[offset]);
224}
225
226#define PROT_JSR(_offs_,_protvalue_,_pc_) \
227   if(mcu_shared_ram[(_offs_)/2] == _protvalue_) \
228   { \
229      mcu_shared_ram[(_offs_)/2] = 0xffff;  /*(MCU job done)*/ \
230      mcu_shared_ram[(_offs_+2-0x10)/2] = 0x4ef9;/*JMP*/\
231      mcu_shared_ram[(_offs_+4-0x10)/2] = 0x0000;/*HI-DWORD*/\
232      mcu_shared_ram[(_offs_+6-0x10)/2] = _pc_;  /*LO-DWORD*/\
233   } \
234
235#define PROT_INPUT(_offs_,_protvalue_,_protinput_,_input_) \
236   if(mcu_shared_ram[_offs_] == _protvalue_) \
237   {\
238      mcu_shared_ram[_protinput_] = ((_input_ & 0xffff0000)>>16);\
239      mcu_shared_ram[_protinput_+1] = (_input_ & 0x0000ffff);\
240   }
241
242static WRITE16_HANDLER( ddealer_mcu_shared_w )
243{
244   COMBINE_DATA(&mcu_shared_ram[offset]);
245
246   switch(offset)
247   {
248      /*
249            shared_ram[0xe490/2]=0x4ef9;
250            shared_ram[0xe492/2]=0x0000;
251            shared_ram[0xe494/2]=0x9696;// write to tx tilemap
252            shared_ram[0xe4a0/2]=0x4ef9;
253            shared_ram[0xe4a2/2]=0x0000;
254            shared_ram[0xe4a4/2]=0x95fe;// write to bg tilemap,might be 0x9634
255            shared_ram[0xe4c0/2]=0x4ef9;
256            shared_ram[0xe4c2/2]=0x0000;
257            shared_ram[0xe4c4/2]=0x9634;// unsure about this,tx tilemap
258            shared_ram[0xe4e0/2]=0x4ef9;
259            shared_ram[0xe4e2/2]=0x0000;
260            shared_ram[0xe4e4/2]=0x5ac6;//palette ram buffer
261        */
262      case 0x086/2: PROT_INPUT(0x086/2,0x1234,0x100/2,0x80000); break;
263      case 0x164/2: PROT_INPUT(0x164/2,0x5678,0x104/2,0x80002); break;
264      case 0x62e/2: PROT_INPUT(0x62e/2,0x9ca3,0x108/2,0x80008); break;
265      case 0x734/2: PROT_INPUT(0x734/2,0xaba2,0x10c/2,0x8000a); break;
266 //00054C: 33FC B891 000F E828        move.w  #$b891, $fe828.l
267 //000554: 33FC C760 000F E950        move.w  #$c760, $fe950.l
268 //00055C: 33FC D45F 000F EA7C        move.w  #$d45f, $fea7c.l
269 //000564: 33FC E32E 000F ED4A        move.w  #$e32e, $fed4a.l
270//006992-7348-7518
271/*
272fe400->score sub-routine
273fe410-><unused>
274fe420->called before you enter into the gameplay,cards initialize? a39a will break lots of things
275fe430->called in some circumstances after 420 (ASM-wise)
276fe440->called during attract
277
278fe470->called when it should update the graphics
279A0 = f3072
280A2 = 9cf4c
281A3 = 9ce9c
282
2836176 is the player 2
284
285work ram addresses
286f031e->
287f3010->mirror for inputs player 1
288f5010->mirror for inputs player 2
289*/
290
291      case 0x40e/2: PROT_JSR(0x40e,0x8011,0x6992);//0x89e); break;//0x6992); break;
292      case 0x41e/2: break;//unused
293      case 0x42e/2: PROT_JSR(0x42e,0x8007,0x6004); break;//0x89e); break;//0xa39a); break;
294      case 0x43e/2: PROT_JSR(0x43e,0x801d,0x89e);  break;//0x62f2); break;//0x6176); break;//0x6ebe); break;//0x9b6);  break;//801d
295      case 0x44e/2: PROT_JSR(0x44e,0x8028,0x68f6); break;
296      case 0x45e/2: PROT_JSR(0x45e,0x803e,0x6f90); break;
297      case 0x46e/2: PROT_JSR(0x46e,0x8033,0x93c2); break;
298      case 0x47e/2: PROT_JSR(0x47e,0x8026,0x89e);  break;//0x6786); break; //wrong,just to let pass the check
299      case 0x48e/2: PROT_JSR(0x48e,0x8012,0x6176); break;
300/**/   case 0x49e/2: PROT_JSR(0x49e,0x8004,0x9696); break;
301      case 0x4ae/2: PROT_JSR(0x4ae,0x8035,0x95fe); break;
302      case 0x4be/2: PROT_JSR(0x4be,0x8009,0x89e);  break;//0xa74);  break; //wrong
303/**/   case 0x4ce/2: PROT_JSR(0x4ce,0x802a,0x9656); break;//z
304      case 0x4de/2: PROT_JSR(0x4de,0x803b,0x96c2); break;
305/**/   case 0x4ee/2: PROT_JSR(0x4ee,0x800c,0x5ca4); break;//correct
306      case 0x4fe/2: PROT_JSR(0x4fe,0x8018,0x6004); break;//0x9818); break;//6004?
307      case 0x000/2:
308         if(mcu_shared_ram[0x000/2] == 0x60fe)
309         {
310            mcu_shared_ram[0x000/2] = 0x0000;
311            mcu_shared_ram[0x002/2] = 0x0000;
312            mcu_shared_ram[0x004/2] = 0x4ef9;
313//              mcu_shared_ram[0x006/2] = 0x0000;
314//              mcu_shared_ram[0x008/2] = 0x0000;
315//              mcu_shared_ram[0x00a/2] = 0x0000;
316//              mcu_shared_ram[0x00c/2] = 0x0000;
317//              mcu_shared_ram[0x00e/2] = 0x0000;
318         }
319         break;
320      case 0x002/2:
321      case 0x004/2:
322         if(mcu_shared_ram[0x002/2] == 0x0000 && mcu_shared_ram[0x004/2] == 0x0214) //<- he believes to be astute...
323            mcu_shared_ram[0x004/2] = 0x4ef9;//0604
324         break;
325      case 0x008/2:
326         if(mcu_shared_ram[0x008/2] == 0x000f)
327            mcu_shared_ram[0x008/2] = 0x0604;
328         break;
329      case 0x00c/2:
330         if(mcu_shared_ram[0x00c/2] == 0x000f)
331            mcu_shared_ram[0x00c/2] = 0x0000;
332   }
333}
334
145335static ADDRESS_MAP_START( ddealer, ADDRESS_SPACE_PROGRAM, 16 )
146336   AM_RANGE(0x000000, 0x03ffff) AM_ROM
147   AM_RANGE(0x080000, 0x080001) AM_RAM
148   AM_RANGE(0x080006, 0x080007) AM_RAM // read: low byte = dsw 1
337   AM_RANGE(0x080000, 0x080001) AM_READ_PORT("IN0")
338   AM_RANGE(0x080002, 0x080003) AM_READ_PORT("IN1")
339   AM_RANGE(0x080008, 0x080009) AM_READ_PORT("DSW1")
340   AM_RANGE(0x08000a, 0x08000b) AM_READ_PORT("UNK")
149341   AM_RANGE(0x084000, 0x084003) AM_RAM // ym ?
150   AM_RANGE(0x088000, 0x0887ff) AM_RAM // palette ram
151   AM_RANGE(0x08c000, 0x08cfff) AM_RAM // palette ram
152   AM_RANGE(0x090000, 0x093fff) AM_RAM // bg tilemap
153   AM_RANGE(0x09c000, 0x09ffff) AM_RAM // fg tilemap
154   AM_RANGE(0x0f0000, 0x0fffff) AM_RAM AM_BASE(&shared_ram)// at least fe000-ffff shared with mcu
342   AM_RANGE(0x088000, 0x0887ff) AM_RAM_WRITE(paletteram16_RRRRGGGGBBBBRGBx_word_w) AM_BASE(&paletteram16) // palette ram
343   AM_RANGE(0x08c000, 0x08cfff) AM_RAM_WRITE(ddealer_vregs_w) AM_BASE(&ddealer_vregs) // palette ram
344   AM_RANGE(0x090000, 0x093fff) AM_RAM_WRITE(sc0_vram_w) AM_BASE(&sc0_vram) // bg tilemap
345   AM_RANGE(0x09c000, 0x09ffff) AM_RAM_WRITE(sc3_vram_w) AM_BASE(&sc3_vram) // fg tilemap
346   AM_RANGE(0x0f0000, 0x0fdfff) AM_RAM
347   AM_RANGE(0x0fe000, 0x0fefff) AM_RAM_WRITE(ddealer_mcu_shared_w) AM_BASE(&mcu_shared_ram)
348   AM_RANGE(0x0ff000, 0x0fffff) AM_RAM
155349ADDRESS_MAP_END
156350
351/*copied from hachamf*/
157352static INPUT_PORTS_START( ddealer )
353   PORT_START("IN0")
354   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
355   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
356   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
357   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
358   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
359   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
360   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
361   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) //bryan:  test mode in some games?
362
363   PORT_START("IN1")
364   PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
365   PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
366   PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
367   PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
368   PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
369   PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1)
370   PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_UNKNOWN )
371   PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_UNKNOWN )
372   PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
373   PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
374   PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
375   PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
376   PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
377   PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2)
378   PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
379   PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
380
381   PORT_START("DSW1")
382   PORT_DIPNAME( 0x0700, 0x0700, DEF_STR( Coin_A ) )
383   PORT_DIPSETTING(    0x0100, DEF_STR( 4C_1C ) )
384   PORT_DIPSETTING(    0x0200, DEF_STR( 3C_1C ) )
385   PORT_DIPSETTING(    0x0300, DEF_STR( 2C_1C ) )
386   PORT_DIPSETTING(    0x0700, DEF_STR( 1C_1C ) )
387   PORT_DIPSETTING(    0x0600, DEF_STR( 1C_2C ) )
388   PORT_DIPSETTING(    0x0500, DEF_STR( 1C_3C ) )
389   PORT_DIPSETTING(    0x0400, DEF_STR( 1C_4C ) )
390   PORT_DIPSETTING(    0x0000, DEF_STR( Free_Play ) )
391   PORT_DIPNAME( 0x3800, 0x3800, DEF_STR( Coin_B ) )
392   PORT_DIPSETTING(    0x0800, DEF_STR( 4C_1C ) )
393   PORT_DIPSETTING(    0x1000, DEF_STR( 3C_1C ) )
394   PORT_DIPSETTING(    0x1800, DEF_STR( 2C_1C ) )
395   PORT_DIPSETTING(    0x3800, DEF_STR( 1C_1C ) )
396   PORT_DIPSETTING(    0x3000, DEF_STR( 1C_2C ) )
397   PORT_DIPSETTING(    0x2800, DEF_STR( 1C_3C ) )
398   PORT_DIPSETTING(    0x2000, DEF_STR( 1C_4C ) )
399   PORT_DIPSETTING(    0x0000, DEF_STR( Free_Play ) )
400   PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
401   PORT_DIPSETTING(    0x4000, DEF_STR( Off ) )
402   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
403   PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
404   PORT_DIPSETTING(    0x8000, DEF_STR( Off ) )
405   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
406
407   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
408   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
409   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
410   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Language ) )
411   PORT_DIPSETTING(    0x00, DEF_STR( English ) )
412   PORT_DIPSETTING(    0x02, DEF_STR( Japanese ) )
413   PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) )
414   PORT_DIPSETTING(    0x04, DEF_STR( Easy ) )
415   PORT_DIPSETTING(    0x0c, DEF_STR( Normal ) )
416   PORT_DIPSETTING(    0x08, DEF_STR( Hard ) )
417   PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
418   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
419   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
420   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
421   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
422   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
423   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
424   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) )
425   PORT_DIPSETTING(    0x00, "1" )
426   PORT_DIPSETTING(    0x40, "2" )
427   PORT_DIPSETTING(    0xc0, "3" )
428   PORT_DIPSETTING(    0x80, "4" )
429
430   PORT_START("UNK")
158431INPUT_PORTS_END
159432
160433static const gfx_layout charlayout =
r3445r3446
168441   32*8
169442};
170443
171static GFXDECODE_START( jalmah )
444static const gfx_layout tilelayout =
445{
446   16,16,
447   RGN_FRAC(1,1),
448   4,
449   { 0, 1, 2, 3 },
450   { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4,
451         16*32+0*4, 16*32+1*4, 16*32+2*4, 16*32+3*4, 16*32+4*4, 16*32+5*4, 16*32+6*4, 16*32+7*4 },
452   { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
453         8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },
454   32*32
455};
456
457static GFXDECODE_START( ddealer )
172458   GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 16 )
459   GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0x100, 16 )
173460GFXDECODE_END
174461
175462static MACHINE_RESET (ddealer)
176463{
177464   respcount = 0;
178   prot = 0;
179465}
180466
181467static INTERRUPT_GEN( ddealer_interrupt )
182468{
183469   cpunum_set_input_line(machine, 0, 4, HOLD_LINE);
184
185
186470}
187471
188472static MACHINE_DRIVER_START( ddealer )
r3445r3446
191475   MDRV_CPU_VBLANK_INT("main", ddealer_interrupt)
192476   MDRV_CPU_PERIODIC_INT(irq1_line_hold, 112)
193477
194   MDRV_GFXDECODE(jalmah)
478   MDRV_GFXDECODE(ddealer)
195479
196480
197481   MDRV_SCREEN_ADD("main", RASTER)
198482   MDRV_SCREEN_REFRESH_RATE(60)
199483   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
200484   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
201   MDRV_SCREEN_SIZE(32*8, 32*8)
202   MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
485   MDRV_SCREEN_SIZE(512, 256)
486   MDRV_SCREEN_VISIBLE_AREA(0*8, 48*8-1, 2*8, 30*8-1)
203487
204488   MDRV_PALETTE_LENGTH(0x400)
205489   MDRV_MACHINE_RESET(ddealer)
r3445r3446
229513   if (resp[respcount]<0)
230514   {
231515       respcount = 0;
232      ddealer_protection(machine);
516      // ddealer_protection(machine);
233517
234518   }
235519   return res;
236520}
237521
238static WRITE16_HANDLER( ddealer_mcu_w )
522/*static WRITE16_HANDLER( ddealer_mcu_w )
239523{
240   if(data==1)
241   {
242      prot=1;
243      shared_ram[0xe000/2]=0;
244      shared_ram[0xe002/2]=0;
245      shared_ram[0xe004/2]=0;
246      shared_ram[0xe006/2]=0;
247   }
524    if(data==1)
525    {
526        prot=1;
527        shared_ram[0xe000/2]=0;
528        shared_ram[0xe002/2]=0;
529        shared_ram[0xe004/2]=0;
530        shared_ram[0xe006/2]=0;
531    }
248532}
249
533*/
250534static DRIVER_INIT( ddealer )
251535{
252536   memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xfe01c, 0xfe01d, 0, 0, ddealer_mcu_r );
253   memory_install_write16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xfe01e, 0xfe01f, 0, 0, ddealer_mcu_w );
537//  memory_install_write16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xfe01e, 0xfe01f, 0, 0, ddealer_mcu_w );
254538}
255539
256540ROM_START( ddealer )
r3445r3446
261545   ROM_REGION( 0x20000, "gfx1", 0 ) /* BG0 */
262546   ROM_LOAD( "4.ic65", 0x00000, 0x20000, CRC(4939ff1b) SHA1(af2f2feeef5520d775731a58cbfc8fcc913b7348) )
263547
548   ROM_REGION( 0x80000, "gfx2", 0 ) /* BG1 */
549   ROM_LOAD( "3.ic64", 0x00000, 0x80000, CRC(660e367c) SHA1(54827a8998c58c578c594126d5efc18a92363eaa))
550
264551   ROM_REGION( 0x200, "user1", 0 ) /* Proms */
265552   ROM_LOAD( "5.ic67", 0x000, 0x100, NO_DUMP )
266553   ROM_LOAD( "6.ic86", 0x100, 0x100, NO_DUMP )
src/mame/drivers/smstrv.c
r3445r3446
11/*
2SMS Manufacturing PCB Driver
3By Reip
4
5
6smstrv (Reip):
27Triva looking board
38Silk screened on front...
49    P/N 1001
r3445r3446
1722    P8255A-5
1823    P8254
1924    D8255AC-5
20    D780C-1
25    D780C-1 (Z80A)
2126
222716 Mhz crystal by D780C (U21)
232824 Mhz crystal by P8088 (u53)
r3445r3446
8388    COPYRIGHT 1984 SMS MFG CORP
8489    TRIVIA HANGUP
8590    SMART ALECS
91
92
93
94
95smssshot (Lord Nightmare)
96SMS Sure Shot (poker?)
97* Same exact board as sms trivia, but "COMPONENT SIDE REV 01"
98  instead of rev 02.
99* 3 chips were removed from the board; two are shown as removed
100  in the schematic, one was removed later (an apparently
101  unnecessary data buffer on one of the z80 external latches)
102* Does NOT have a daughterboard with additional roms; in fact,
103  connector J1 for the ribbon cable to the daughterboard isn't
104  populated with pins at all
105* Serial Number A-108 etched in board, on back.
106
107
108smsbingo (Lord Nightmare)
109SMS Bingo
110Someone on the MW forums has this iirc, but it isn't dumped yet - LN
111
112
113
114**** Notes from schematics (applies to all drivers):
115Framebuffer is six tms4416 16384*4 chips; chips are arranged as three
116planes of 16384*8 bits per plane, one plane per color channel.
117Screen resolution is probably either 212x256 (two bits per plane, per
118pixel) or 424x256 (one bit per plane per pixel), depending on the pals
119installed. See schematics on page 6. The counters at U137 and U139
120compare against binary 0b110101 (53) in comparitor at U138, and as soon
121as it hits that, HDONE is pulled high on the next MCLR clock.
122This means there will be 53 (0-52) counts in the X counter before HDONE;
123as each count refers to one 8 bit address, and the addressed 4416 rams
124have between all of them 24 bits of output (8 per plane), the minimum
125horizontal displayed resolution is 53x256 (8 bits per color per pixel),
126and maximum is 8 times that. With proper pals (and proper mixing
127resistors or other PWM fun) it should be possible to get:
12853x256 8,8,8 RGB
129106x256 4,4,4 RGB
130212x256 2,2,2 RGB <- this seems the most likely to me (LN)
131424x256 1,1,1 RGB
132
133
134* The socket at U50 and the 3 pin connector J3 is for an
135  undumped intel 8050 MCU used for rs232 serial communication,
136  for either linking together machines, or more likely for factory
137  testing. The function of this internal rom is probably simple
138  enough to HLE or to even rewrite from scratch, but I doubt the code
139  on any of the dumped games even touches it, it was probably for use
140  with a specific game or for a set of hardware test roms to report
141  errors.
142  (schematic page 4)
143  The pinout of J3 is:
144     pin 1 (toward bottom of pcb): rs232 input to pcb
145     (pre-level shifted to 5v i.e. with a max232 or mc1489)
146     pin 2 : ground
147     pin 3 : rs232 output to elsewhere (to be sent to a max232 or
148     mc1488 to shift to rs232 voltage levels)
149
150* The 8255 PPI at U13 (connected to the 8088) is connected to 75451
151  drivers on all pins EXCEPT pins PC3 thru PC0.
152  (schematic page 3)
153  PA7 - Display Light 1
154  PA6 - Display Light 2
155  PA5 - Display Light 3
156  PA4 - Display Light 4
157  PA3 - Display Light 5
158  PA2 - Bet Light
159  PA1 - Deal Light
160  PA0 - Draw Light
161  PB7 - Stand Light
162  PB6 - Cancel Light
163  PB5 - Coin Lock out A
164  PB4 - Coin Lock out B
165  PB3 - Setup Light
166  PB2 - Hopper Motor
167  PB1 - Coin in Counter (mechanical counter inside the machine)
168  PB0 - Knock off Counter (tilt? probably also a mechanical counter)
169  PC7 - unused
170  PC6 - unused
171  PC5 - unused
172  PC4 - Battery Charge control (for 8088 ram backup 3.6v Nicad)
173  PC3 - (pulled high externally, input) - unused? possibly for an ABC hopper
174  PC2 - (pulled high externally, input) - unused? possibly for an ABC hopper
175  PC1 - (pulled high externally, input) - "Hopper Count",
176      probably a beam to check the hopper coin out
177  PC0 - "Video BZ" (Video Blanking Zone, is an input)
178
179* The 8255 PPI at U2 (connected to the z80) is unused and not populated.
180  (All 3 ports have +5V pullups on all pins)
181
182* The 8255 PPI at U1 (connected to the z80) is used as follows:
183  (All 3 ports have +5V pullups on all pins)
184  PA7 - Lighted Button 1 (input)
185  PA6 - Lighted Button 2 (input)
186  PA5 - Lighted Button 3 (input)
187  PA4 - Lighted Button 4 (input)
188  PA3 - Lighted Button 5 (input)
189  PA2 - Bet Button (input)
190  PA1 - Deal Button (input)
191  PA0 - Draw Button (input)
192  PB7 - Stand Button (input)
193  PB6 - Cancel Button (input)
194  PB5 - Alt Coin (input)
195  PB4 - Remote Knockoff (tilt? input)
196  PB3 - Operator Mode (input)
197  PB2 - Coin Error reset (input)
198  PB1 - unused
199  PB0 - unused
200  PC7 - unused
201  PC6 - unused
202  PC5 - unused
203  PC4 - unused
204  PC3 - unused
205  PC2 - unused
206  PC1 - unused
207  PC0 - Coin (input)
208
209
210* The function of the pals is:
211LOCATION    DOTS        TYPE        PURPOSE
212U32         1Green      DMPAL10L8NC Decodes the gated by U33/U34)
213   high address lines of the 8088, for mainboard ROM mapping. A
214   different pal is probably used depending on whether the
215   mainboard has 2764 or 27128 roms installed.
216   SMS Sure Shot: dumped ok as truth table, mainboard has 4 2764s
217   SMS Trivia: bad (chip shorted internally), mainboard has 2 27128s
218   SMS Bingo: not dumped
219   (schematic page 2)
220U38         3Blue           PAL10L8CN   Decodes the (gated by U36)
221   high address lines of the z80 address bus, for mapping of the z80
222   ROM, RAM, Counter control, 4 z80-to-8088 ports (2 one direction,
223   2 the other), the ay-3-8910, and the two 8255 PPIs.
224   (schematic page 10)
225U39         3Green          PAL10L8CN   Accessory decoder to U38, helps
226   with the 4 z80-to-8088 ports.
227   (schematic page 10)
228U40         1Red              PAL10L8CN   Connects to the low bits of the
229   8088 address bus for decoding writing to/reading from the 8088 side of
230   the 4 z80-to-8088 ports.
231   (schematic page 10, note this chip is mismarked as U9 on the page,
232    it is the chip in the lower left)
233U52         1Blue           PAL10L8CN   Decodes the (gated by U33/U34)
234   high address lines of the 8088, for main memory mapping of ram,
235   z80 communication, video, serial I/O (to U50), and the output-only
236   8255 at U13 (which controls button lights and the coin hopper)
237   SMS Sure Shot: dumped ok as truth table
238   SMS Trivia: checksum 0, probably bad
239   SMS Bingo: not dumped
240   (schematic page 1)
241U58         3Brown          DMPAL10H8NC Controls BDIR and BC1 on the
242   ay-3-8910 given the low two address bits of the z80 bits, the
243   ay-3-8910 enable line, and the buffered z80 RD and WR lines.
244   (schematic page 12)
245U80         2Blue           PAL10H8CN   State machine which controls StartH,
246   StartV, and the related functions involving the shifters for framebuffer
247   address and framebuffer output. Also lets framebuffer know when in hblank
248   or vblank. Is separate from the other "Video BZ" thing.
249   (schematic page 6)
250U94         2Green          PAL14H4CN   State machine controls the
251   read-modify-write logic for accessing the frame buffer (while outside
252   of vblank and hblank?), may allow writing red green and blue plane bytes
253   all to one address, one after the other
254   (schematic page 7)
255U109        2Brown          PAL14H4CN   Determines next state of the
256   'Pixel control' hardware, i.e. H and V current line counters
257   Also determines VBLANK/"Video BZ"
258   (schematic page 5)
259U110        2Red            PAL10L8CN   Translates output of U109
260   before being sent to counters/color reg latch/etc.
261   (schematic page 5)
262U128        Blue-Brown-Blue PAL10H8CN   One of three 'sync' pals which
263   control the memory and other timing subsystem, fed by a 4 bit counter.
264   this particular pal has one external feedback bit.
265   (schematic page 6)
266U129        Red-Green-Red   DMPAL10H8NC Second of three 'sync' pals
267   This one has 2 external feedback bits.
268   (schematic page 6)
269U130        3Red            PAL10H8CN   Third of three 'sync' pals'
270   This one has 3 external feedback bits plus three extra inputs from elsewhere
271   which are not readable on the schematic. Will trace them later.
272   (schematic page 6)
273U140        1Brown          PAL14H4CN   This and the next 5 pals are used
274   to shift the framebuffer data, 4 bits at a time. This is done in parallel
275   (8 bits per channel) for output. all 6 pals are the same.
276   (schematic page 7)
277U141        1Brown          PAL14H4CN
278U142        1Brown          PAL14H4CN
279U143        1Brown          PAL14H4CN
280U144        1Brown          PAL14H4CN
281U145        1Brown          PAL14H4CN
282
283
284
86285*/
87286
88287#include "driver.h"
src/mame/drivers/xexex.c
r3445r3446
602602static MACHINE_RESET( xexex )
603603{
604604   cur_control2 = 0;
605   init_eeprom_count = 0;
606605   cur_sound_region = 0;
607606   suspension_active = 0;
608607   resume_trigger = 0;
r3445r3446
623622   state_save_register_postload(machine, xexex_postload, NULL);
624623
625624   resume_trigger = 1000;
625   init_eeprom_count = 0;
626626
627627   dmadelay_timer = timer_alloc(dmaend_callback, NULL);
628628}
src/mame/drivers/namcos22.c
r3445r3446
25762576{
25772577   static UINT16 ddx, ddy;
25782578
2579   ddx = ((input_port_read(machine, "STICKX")^0xff) - 1)<<2;
2580   ddy = (input_port_read(machine, "STICKY") - 1)<<2;
2579   ddx = input_port_read(machine, "STICKX")^0xff;
2580   if (ddx > 0) ddx -= 1;
2581   ddy = input_port_read(machine, "STICKY");
2582   if (ddy > 0) ddy -= 1;
25812583
2584   ddx <<= 2;
2585   ddy <<= 2;
2586
25822587   switch (offset)
25832588   {
25842589      case 0:
src/mame/drivers/pmpoker.c
r3445r3446
88
99    Games running on this hardware:
1010
11    * PlayMan Poker (Germany).            1981, PlayMan.
11    * PlayMan Poker (german).             1981, PlayMan.
1212    * Golden Poker Double Up (Big Boy).   1981, Bonanza Enterprises, Ltd.
1313    * Golden Poker Double Up (Mini Boy).  1981, Bonanza Enterprises, Ltd.
14    * Golden Poker (no double up).        198?, Bootleg.
15    * Joker-Poker.                        198?, Bootleg in Coinmaster hardware.
16    * Jack Potten's Poker (bootleg).      198?, Bootleg.
17    * Jack Potten's Poker (bootleg2).     198?, Bootleg.
14    * Jack Potten's Poker (set 1).        198?, Bootleg.
15    * Jack Potten's Poker (set 2).        198?, Bootleg in Coinmaster H/W.
16    * Jack Potten's Poker (set 3).        198?, Bootleg.
17    * Jack Potten's Poker (set 4).        198?, Bootleg.
18    * Jack Potten's Poker (set 5).        198?, Bootleg.
19    * Jack Potten's Poker (set 6).        198?, Bootleg.
20    * Good Luck.                          198?, Unknown.
21    * Buena Suerte (spanish, set 1).      198?, Unknown.
22    * Buena Suerte (spanish, set 2).      198?, Unknown.
23    * Royale.                             198?, Unknown.
24    * Witch Card.                         1991, Unknown.
25    * Witch Card (spanish, set 1).        1991, Unknown.
26    * Witch Card (spanish, set 2).        1991, Unknown.
27    * Super Loco 93 (spanish, set 1).     1993, Unknown.
28    * Super Loco 93 (spanish, set 2).     1993, Unknown.
1829
1930
2031*******************************************************************************
r3445r3446
3546    - All this driver was made using reverse engineering in the program roms.
3647
3748
38    Game Notes (goldnpkr & goldnpkb):
49    Game Notes:
50    ==========
3951
40    **** "How to play"... (from "Golden Poker Double Up" instruction card) ****
52    * goldnpkr & goldnpkb:
4153
54    "How to play"... (from "Golden Poker Double Up" instruction card)
55
4256    1st GAME
4357    - Insert coin / bank note.
4458    - Push BET button, 1-10 credits multiple play.
r3445r3446
96110    entering into a video grid test. Press HOLD5 to exit.
97111
98112
113    * Good Luck
114
115    This hybrid runs on Witch Card hardware.
116    Even when is shown on screen "Bet 1 to 10", you can bet up to 50.
117    There are extra graphics for a couple of jokers, but they never are shown.
118    Maybe some settings can enable the use of them...
119
120
121    * Witch Card
122
123    This game is derivated from Golden Poker.
124
125    The hardware has a feature called BLUE KILLER.
126    Using the original intensity line, the PCB has a bridge
127    that allow (as default) turn the background black.
128
129    Except goodluck, all other games running in this hardware
130    were designed to wear black background.
131
132    Settings:
133
134    There are 12 parameters to program. All of them are unknown.
135    To program them, use the HOLD keys, CANCEL key, DEAL + HOLD keys,
136    and DEAL + CANCEL.
137
138
139    * Super Loco 93
140
141    I like this game!... This one has nothing to do with poker games.
142    The objective is to get the higher sum with 2 or 3 cards. Is clearly
143    based on a passage (Envido) of the famous argentine's game called "Truco".
144
145    How to play?...
146
147    Like in Truco's envido, You must add 20 to the sum of your cards.
148    If you have 7 and 5 of the same kind, you have 7 + 5 + 20 = 32 points.
149
150    "Flor", is 3 cards of the same kind.
151    "Simple", is 2 cards of the same kind.
152
153    HAND             WIN    DESCRIPTION
154    ----------------------------------------------
155    38  Corazones   1000    7, 6 and 5 of hearts.
156    777 Loco Loco    200    3x sevens.
157    38  Flor          80    7, 6 and 5 of the same kind (except hearts).
158    37  Flor          20    7, 6 and 4 of the same kind.
159    36  Flor          14    7, 5 and 4 of the same kind.
160    35  Flor          10    6, 5 and 4 of the same kind.
161    32-33-34 Flor      6    3 of the same kind that sum 32, 33 or 34.
162    33  Simple         4    7 and 6 of the same kind.
163    32  Simple         2    7 and 5 of the same kind.
164
165    After bet (apuesta) some credits, Press deal (reparte) button.
166    The game will deals 3 cards. You can discard up to all your 3 cards.
167    Pressing the deal button again, new cards will appear in the place
168    of the previously selected cards.
169
170    Settings:
171
172    There are 12 parameters to program.
173    To program them, use the HOLD keys, CANCEL key, DEAL + HOLD keys,
174    and DEAL + CANCEL.
175
176
177
99178*******************************************************************************
100179
101180
r3445r3446
209288*******************************************************************************
210289
211290
212    --------------------
213    ***  Memory Map  ***
214    --------------------
291    -----------------------------------------------
292    ***  Memory Map (pmpoker/goldnpkr hardware) ***
293    -----------------------------------------------
215294
216295    $0000 - $00FF   RAM     ; Zero Page (pointers and registers)
217296
r3445r3446
230309    $0800 - $0801   MC6845  ; MC6845 use $0800 for register addressing and $0801 for register values.
231310
232311                            *** pmpoker mc6845 init at $65B9 ***
312                            *** goldnpkr mc6845 init at $5E75 ***
313                            *** sloco93 mc6845 init at $D765 ***
233314                            register:   00    01    02    03    04    05    06    07    08    09    10    11    12    13    14    15    16    17
234315                            value:     0x27  0x20  0x22  0x02  0x1F  0x04  0x1D  0x1E  0x00  0x07  0x00  0x00  0x00  0x00  0x00  0x00  0x00  0x00.
235316
236                            *** goldnpkr mc6845 init at $5E75 ***
317                            *** goodluck mc6845 init at $527B ***
237318                            register:   00    01    02    03    04    05    06    07    08    09    10    11    12    13    14    15    16    17
238                            value:     0x27  0x20  0x23  0x03  0x1F  0x04  0x1D  0x1F  0x00  0x07  0x00  0x00  0x00  0x00  0x00  0x00  0x00  0x00.
319                            value:     0x27  0x20  0x23  0x03  0x1F  0x04  0x1D  0x1F  0x00  0x00  0x26  0x00  0x20  0x22  0x58  0xA5  0x4F  0xC9.
239320
321                            *** royale mc6845 init at $6581 ***
322                            register:   00    01    02    03    04    05    06    07    08    09    10    11    12    13    14    15    16    17
323                            value:     0x27  0x20  0x23  0x03  0x1F  0x04  0x1D  0x1E  0x00  0x07  0x00  0x00  0x00  0x00  0x00  0x00  0x00  0x00.
324
240325    $0844 - $0847   PIA0    ; Muxed inputs and lamps. Initialized at $5000.
241    $0848 - $084b   PIA1    ; Sound writes and muxed inputs selector. Initialized at $5000.
326    $0848 - $084B   PIA1    ; Sound writes and muxed inputs selector. Initialized at $5000.
242327
243328    $1000 - $13FF   Video RAM   ; Initialized in subroutine starting at $5042.
244329    $1800 - $1BFF   Color RAM   ; Initialized in subroutine starting at $5042.
245330
246331    $4000 - $7FFF   ROM
247    $F000 - $FFFF   ROM     ; Mirrored from $7000 - $7FFF for vectors/pointers purposes.
248332
333    $8000 - $FFFF           ; Mirrored from $0000 - $7FFF due to lack of A15 line connection.
249334
335
336
337    ---------------------------------------
338    ***  Memory Map (pottnpkr hardware) ***
339    ---------------------------------------
340
341    $0000 - $00FF   RAM     ; Zero Page (pointers and registers)
342    $0100 - $01FF   RAM     ; 6502 Stack Pointer.
343    $0200 - $02FF   RAM     ; R/W. (settings)
344    $0300 - $03FF   RAM     ; R/W (mainly to $0383). $0340 - $035f (settings).
345
346    $0800 - $0801   MC6845  ; MC6845 use $0800 for register addressing and $0801 for register values.
347
348    $0844 - $0847   PIA0    ; Muxed inputs and lamps.
349    $0848 - $084B   PIA1    ; Sound writes and muxed inputs selector.
350
351    $1000 - $13FF   Video RAM
352    $1800 - $1BFF   Color RAM
353
354    $2000 - $3FFF   ROM space
355
356    $4000 - $7FFF           ; Mirrored from $0000 - $3FFF due to lack of A14 & A15 lines connection.
357    $8000 - $BFFF           ; Mirrored from $0000 - $3FFF due to lack of A14 & A15 lines connection.
358    $C000 - $FFFF           ; Mirrored from $0000 - $3FFF due to lack of A14 & A15 lines connection.
359
360
361
250362*******************************************************************************
251363
252364
253    Buttons/Inputs   goldnpkr    goldnpkb    goldnpkc    pmpoker  jokerpkr    pottnpkr    pottnpkc
365    Buttons/Inputs   goldnpkr goldnpkb  pmpoker  bsuerte goodluck pottnpkr potnpkra potnpkrc potnpkrb
254366    -------------------------------------------------------------------------------------------------
255367
256    HOLD (5 buttons)  mapped      mapped      mapped      mapped      mapped      mapped      mapped
257    CANCEL            mapped      mapped      mapped      mapped      mapped      mapped      mapped
258    BIG               mapped      mapped       ----       mapped       ----        ----        ----
259    SMALL             mapped      mapped       ----       mapped       ----        ----        ----
260    DOUBLE UP         mapped      mapped       ----       mapped       ----        ----        ----
261    TAKE SCORE        mapped      mapped       ----       mapped       ----        ----        ----
262    DEAL/DRAW         mapped      mapped      mapped      mapped      mapped      mapped      mapped
263    BET               mapped      mapped      mapped      mapped      mapped      mapped      mapped
368    HOLD (5 buttons)  mapped   mapped   mapped   mapped   mapped   mapped   mapped   mapped   mapped
369    CANCEL            mapped   mapped   mapped   mapped   mapped   mapped   mapped   mapped   mapped
370    BIG               mapped   mapped   mapped   mapped    ----     ----     ----     ----     ----
371    SMALL             mapped   mapped   mapped   mapped    ----     ----     ----     ----     ----
372    DOUBLE UP         mapped   mapped   mapped   mapped    ----     ----     ----     ----     ----
373    TAKE SCORE        mapped   mapped   mapped   mapped    ----     ----     ----     ----     ----
374    DEAL/DRAW         mapped   mapped   mapped   mapped   mapped   mapped   mapped   mapped   mapped
375    BET               mapped   mapped   mapped   mapped   mapped   mapped   mapped   mapped   mapped
264376
265    Coin 1 (coins)    mapped      mapped      mapped      mapped      mapped      mapped      mapped
266    Coin 2 (notes)    mapped      mapped      mapped      mapped      mapped      mapped      fixed 1c-1c
267    Coin 3 (coupons)  mapped      mapped       ----       mapped       ----        ----        ----
268    Payout            mapped      mapped      mapped      mapped      mapped      mapped      mapped
269    Manual Collect    mapped      mapped      mapped      mapped      mapped      mapped      mapped
377    Coin 1 (coins)    mapped   mapped   mapped   mapped   mapped   mapped   mapped   mapped   mapped
378    Coin 2 (notes)    mapped   mapped   mapped   mapped   mapped   mapped   mapped   mapped   fixed 1c-1c
379    Coin 3 (coupons)  mapped   mapped   mapped   mapped    ----     ----     ----     ----     ----
380    Payout            mapped   mapped   mapped   mapped   mapped   mapped   mapped   mapped   mapped
381    Manual Collect    mapped   mapped   mapped    ----    mapped   mapped   mapped   mapped   mapped
270382
271    LEARN/SETTINGS    mapped      mapped      mapped      mapped      mapped      mapped      mapped
272    METERS            mapped      mapped      mapped      mapped      mapped      mapped      mapped
383    LEARN/SETTINGS    mapped   mapped   mapped   mapped   mapped   mapped   mapped   mapped   mapped
384    METERS            mapped   mapped   mapped   mapped   mapped   mapped   mapped   mapped   mapped
273385
274386
275387    Inputs are different for some games. Normally each button has only one function.
r3445r3446
355467    - Updated technical notes.
356468
357469
470    [2008-10-12] *** REWRITE ***
471
472    - Added discrete sound support to Golden Poker hardware games based on schematics.
473    - Added discrete sound support to Potten's Poker hardware games based on PCB analysis.
474    - Added discrete circuitry diagrams for both hardware types.
475    - Adjusted the CPU adressing to 15 bits for pmpoker/goldenpkr hardware.
476    - Adjusted the CPU adressing to 14 bits for pottnpkr hardware.
477    - Rewrote all the ROM loads based on these changes.
478    - Defined MASTER Xtal & CPU clock.
479    - Fixed the visible area based on M6845 registers.
480    - Improved the lamps layouts to be more realistic.
481    - Added Good Luck (potten's poker hybrid running in goldnpkr hardware).
482    - Added Buena Suerte (spanish) x 2 sets.
483    - Added set Royale.
484    - Added Witch Card and spanish variants.
485    - Added Super Loco 93 (spanish) x 2 sets.
486    - Renamed set goldnpkc to pottnpkr (parent Jack Potten's Poker set).
487    - Renamed set jokerpkr to potnpkra, since is another Jack Potten's Poker set.
488    - Added other 2 clones of Jack Potten's Poker.
489    - Renamed/cleaned all sets based on code/hardware analysis.
490    - Added intensity bit to the color system.
491    - Implemented the blue killer bit for Witch Card hardware.
492    - Implemented the extended graphics addressing bit for Witch Card hardware.
493    - Added proper visible area to sloco93.
494    - Rewrote the graphics & color decode system based on schematics. No more patched codes.
495    - Changed the char gfx bank structure and rom load according to the new routines.
496    - Adjusted the amount of color codes and PROM region size accordingly.
497    - Updated all notes.
498
499
358500    TODO:
359501
360    - Figure out the discrete sound.
502    - Analyze the code of other upcoming clones to see if worth the inclusion.
503    - Inputs & lamps for Royale.
361504    - Final cleanup and split the driver.
362505
363506
364507*******************************************************************************/
365508
366509
367#define MASTER_CLOCK   10000000   /* 10MHz */
510#define MASTER_CLOCK   XTAL_10MHz
511#define CPU_CLOCK      (MASTER_CLOCK/16)
368512
369513#include "driver.h"
370514#include "video/mc6845.h"
r3445r3446
400544    7654 3210
401545    --xx xx--   tiles color.
402546    ---- --x-   tiles bank.
403    xx-- ---x   seems unused. */
547    ---- ---x   tiles extended address (MSB).
548    xx-- ----   unused.
549*/
404550
405551   int attr = colorram[tile_index];
406   int code = videoram[tile_index];
552   int code = ((attr & 1) << 8) | videoram[tile_index];
407553   int bank = (attr & 0x02) >> 1;   /* bit 1 switch the gfx banks */
408   int color = (attr & 0x3c);   /* bits 2-3-4-5 for color */
554    int color = (attr & 0x3c) >> 2;   /* bits 2-3-4-5 for color */
409555
410   if (attr == 0x3a)   /* Is the palette wrong? */
411      color = 0x3b;   /* 0x3b is the best match */
412
413556   SET_TILE_INFO(bank, code, color, 0);
414557}
415558
r3445r3446
424567   return 0;
425568}
426569
427static PALETTE_INIT( pottnpkr )
570static PALETTE_INIT( goldnpkr )
428571{
429572/*  prom bits
430573    7654 3210
431574    ---- ---x   red component.
432575    ---- --x-   green component.
433576    ---- -x--   blue component.
434    ---- x---   unknown, aparently unused.
577    ---- x---   intensity.
435578    xxxx ----   unused.
436579*/
437580   int i;
438581
439   /* 00000BGR */
582   /* 0000IBGR */
440583   if (color_prom == 0) return;
441584
442585   for (i = 0;i < machine->config->total_colors;i++)
443586   {
444      int bit0, bit1, bit2, r, g, b;
587      int bit0, bit1, bit2, r, g, b, inten, intenmin, intenmax;
445588
589      intenmin = 0xe0;
590//      intenmin = 0xc2;    /* 2.5 Volts (75.757575% of the whole range) */
591      intenmax = 0xff;   /* 3.3 Volts (the whole range) */
592
593      /* intensity component */
594      inten = (color_prom[i] >> 3) & 0x01;
595
446596      /* red component */
447597      bit0 = (color_prom[i] >> 0) & 0x01;
448      r = bit0 * 0xff;
598      r = (bit0 * intenmin) + (inten * (bit0 * (intenmax - intenmin)));
449599
450600      /* green component */
451601      bit1 = (color_prom[i] >> 1) & 0x01;
452      g = bit1 * 0xff;
602      g = (bit1 * intenmin) + (inten * (bit1 * (intenmax - intenmin)));
453603
454604      /* blue component */
455605      bit2 = (color_prom[i] >> 2) & 0x01;
456      b = bit2 * 0xff;
606      b = (bit2 * intenmin) + (inten * (bit2 * (intenmax - intenmin)));
457607
458608
459609      palette_set_color(machine, i, MAKE_RGB(r, g, b));
460610   }
461611}
462612
613static PALETTE_INIT( witchcrd )
614{
615/*
616    This hardware has a feature called BLUE KILLER.
617    Using the original intensity line, the PCB has a bridge
618    that allow (as default) turn the background black.
463619
620    Except goodluck, all other games running in this hardware
621    were designed to wear black background.
622
623    7654 3210
624    ---- ---x   red component.
625    ---- --x-   green component.
626    ---- -x--   blue component.
627    ---- x---   blue killer.
628    xxxx ----   unused.
629*/
630   int i;
631
632   /* 0000KBGR */
633
634   if (color_prom == 0) return;
635
636   for (i = 0;i < machine->config->total_colors;i++)
637   {
638      int bit0, bit1, bit2, bit3, r, g, b, bk;
639
640      /* blue killer (from schematics) */
641        bit3 = (color_prom[i] >> 3) & 0x01;
642        bk = bit3;
643
644      /* red component */
645      bit0 = (color_prom[i] >> 0) & 0x01;
646      r = (bit0 * 0xff);
647
648      /* green component */
649      bit1 = (color_prom[i] >> 1) & 0x01;
650      g = (bit1 * 0xff);
651
652      /* blue component */
653      bit2 = (color_prom[i] >> 2) & 0x01;
654      b = bk * (bit2 * 0xff);
655
656      palette_set_color(machine, i, MAKE_RGB(r, g, b));
657   }
658}
659
660
661/***********************
662*     R/W Handlers     *
663***********************/
664
665static int input_selector = 0;
666
667/* Inputs (buttons) are multiplexed.
668   There are 4 sets of 5 bits each and are connected to PIA0, portA.
669   The selector bits are located in PIA1, portB (bits 4-7).
670*/
671static READ8_HANDLER( mux_port_r )
672{
673   switch( input_selector )
674   {
675      case 0x10: return input_port_read(machine, "IN0-0");
676      case 0x20: return input_port_read(machine, "IN0-1");
677      case 0x40: return input_port_read(machine, "IN0-2");
678      case 0x80: return input_port_read(machine, "IN0-3");
679   }
680   return 0xff;
681}
682
683static WRITE8_HANDLER( mux_port_w )
684{
685//  popmessage("written : %02X", data);
686   input_selector = (data ^ 0xff) & 0xf0;   /* bits 4-7, inverted */
687}
688
689/***** Lamps wiring *****
690
691    -------------------
692    pmpoker
693    -------------------
694    L0 = Deal
695    L1 = Hold3
696    L2 = Hold1
697    L3 = Hold5
698    L4 = Hold2 & Hold4
699
700    -----------------------
701    goldnpkr sets & bsuerte
702    -----------------------
703    L0 = Bet
704    L1 = Deal
705    L2 = Holds (all)
706    L3 = Double Up & Take
707    L4 = Big & Small
708
709    ----------------------------------
710    pottnpkr sets, jokerpkr & goodluck
711    ----------------------------------
712    L0 = Bet
713    L1 = Deal
714    L2 = Holds (all)
715
716    ------------------
717    witchcrd & sloco93
718    ------------------
719    NONE. Just lack of lamps...
720
721*/
722
723static WRITE8_HANDLER( lamps_a_w )
724{
725   output_set_lamp_value(0, 1 - ((data) & 1));         /* Lamp 0 */
726   output_set_lamp_value(1, 1 - ((data >> 1) & 1));   /* Lamp 1 */
727   output_set_lamp_value(2, 1 - ((data >> 2) & 1));   /* Lamp 2 */
728   output_set_lamp_value(3, 1 - ((data >> 3) & 1));   /* Lamp 3 */
729   output_set_lamp_value(4, 1 - ((data >> 4) & 1));   /* Lamp 4 */
730
731   coin_counter_w(0, data & 0x40);   /* Coin1 */
732   coin_counter_w(1, data & 0x80);   /* Note */
733
734/*  Counters:
735
736    bit 5 = Coin out
737    bit 6 = Coin counter
738    bit 7 = Note counter (only goldnpkr use it)
739
740    ONLY for witchcrd and sloco93 sets:
741
742    bit3 = Coin counter (inverted).
743    bit5 = Coin out (inverted).
744*/
745}
746
747static WRITE8_HANDLER( sound_w )
748{
749   /* 555 voltage controlled */
750   logerror("Sound Data: %2x\n",data & 0x0f);
751
752   /* discrete sound is connected to PIA1, portA: bits 0-3 */
753   discrete_sound_w(machine,NODE_01, data >> 3 & 0x01);
754   discrete_sound_w(machine,NODE_10, data & 0x07);
755}
756
757
464758/*************************
465759* Memory Map Information *
466760*************************/
467761
468762static ADDRESS_MAP_START( pmpoker_map, ADDRESS_SPACE_PROGRAM, 8 )
763   ADDRESS_MAP_GLOBAL_MASK(0x7fff)
469764   AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)   /* battery backed RAM */
470765   AM_RANGE(0x0800, 0x0800) AM_DEVWRITE(MC6845, "crtc", mc6845_address_w)
471766   AM_RANGE(0x0801, 0x0801) AM_DEVREADWRITE(MC6845, "crtc", mc6845_register_r, mc6845_register_w)
r3445r3446
474769   AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(pmpoker_videoram_w) AM_BASE(&videoram)
475770   AM_RANGE(0x1800, 0x1bff) AM_RAM_WRITE(pmpoker_colorram_w) AM_BASE(&colorram)
476771   AM_RANGE(0x4000, 0x7fff) AM_ROM
477   AM_RANGE(0xf000, 0xffff) AM_ROM
478772ADDRESS_MAP_END
479773
480static ADDRESS_MAP_START( jokerpkr_map, ADDRESS_SPACE_PROGRAM, 8 )
774static ADDRESS_MAP_START( pottnpkr_map, ADDRESS_SPACE_PROGRAM, 8 )
775   ADDRESS_MAP_GLOBAL_MASK(0x3fff)
481776   AM_RANGE(0x0000, 0x07ff) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)   /* battery backed RAM */
482777   AM_RANGE(0x0800, 0x0800) AM_DEVWRITE(MC6845, "crtc", mc6845_address_w)
483778   AM_RANGE(0x0801, 0x0801) AM_DEVREADWRITE(MC6845, "crtc", mc6845_register_r, mc6845_register_w)
r3445r3446
486781   AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(pmpoker_videoram_w) AM_BASE(&videoram)
487782   AM_RANGE(0x1800, 0x1bff) AM_RAM_WRITE(pmpoker_colorram_w) AM_BASE(&colorram)
488783   AM_RANGE(0x2000, 0x3fff) AM_ROM
489   AM_RANGE(0xf000, 0xffff) AM_ROM
490784ADDRESS_MAP_END
491785
492786
r3445r3446
625919   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
626920INPUT_PORTS_END
627921
628static INPUT_PORTS_START( goldnpkc )
922static INPUT_PORTS_START( bsuerte )
629923   /* Multiplexed - 4x5bits */
630924   PORT_START("IN0-0")
925   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Apostar (Bet)") PORT_CODE(KEYCODE_1)
926   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Contabilidad (Meters)") PORT_CODE(KEYCODE_9)
927   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME("Doblar (Double Up)") PORT_CODE(KEYCODE_3)
928   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("Dar/Virar (Deal/Draw)") PORT_CODE(KEYCODE_2)
929   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("Cancelar (Cancel)") PORT_CODE(KEYCODE_N)
930   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
931   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
932   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
933
934   PORT_START("IN0-1")
935   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON13 ) PORT_IMPULSE(3) PORT_NAME("Out (Manual Collect)") PORT_CODE(KEYCODE_Q)
936   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON14 ) PORT_NAME("Pagar (Payout)") PORT_CODE(KEYCODE_W)
937   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("Cobrar (Take)") PORT_CODE(KEYCODE_4)
938   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON11 ) PORT_NAME("Mayor (Big)") PORT_CODE(KEYCODE_A)
939   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON12 ) PORT_NAME("Menor (Small)") PORT_CODE(KEYCODE_S)
940   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
941   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
942   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
943
944   PORT_START("IN0-2")
945   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Hold1") PORT_CODE(KEYCODE_Z)
946   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Hold2") PORT_CODE(KEYCODE_X)
947   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Hold3") PORT_CODE(KEYCODE_C)
948   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Hold4") PORT_CODE(KEYCODE_V)
949   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Hold5") PORT_CODE(KEYCODE_B)
950   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
951   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
952   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
953
954   PORT_START("IN0-3")
955   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Configuracion (settings)") PORT_CODE(KEYCODE_F2)
956   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
957   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )   PORT_NAME("Billetes (Note In)")
958   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )   PORT_IMPULSE(3) PORT_NAME("Fichas (Coin In)")
959   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 )   PORT_NAME("Cupones (Coupon In)")
960   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
961   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
962   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
963
964   PORT_START("SW1")
965   /* only bits 4-7 are connected here and were routed to SW1 1-4 */
966   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
967   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
968   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
969   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
970   PORT_DIPNAME( 0x10, 0x00, "Jotas o Mejores" )   PORT_DIPLOCATION("SW1:1")
971   PORT_DIPSETTING(    0x10, DEF_STR( No ) )
972   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
973   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )   PORT_DIPLOCATION("SW1:2")
974   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
975   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
976   PORT_DIPNAME( 0x40, 0x00, "Modo de Pago" )      PORT_DIPLOCATION("SW1:3")   /* left as 'auto' */
977   PORT_DIPSETTING(    0x40, "Manual" )
978   PORT_DIPSETTING(    0x00, "Auto" )
979   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )   PORT_DIPLOCATION("SW1:4")
980   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
981   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
982INPUT_PORTS_END
983
984static INPUT_PORTS_START( goodluck )
985   /* Multiplexed - 4x5bits */
986   PORT_START("IN0-0")
631987   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Bet") PORT_CODE(KEYCODE_1)
632988   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Meters") PORT_CODE(KEYCODE_9)
633989   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
r3445r3446
638994   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
639995
640996   PORT_START("IN0-1")
997   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON9 )  PORT_IMPULSE(3) PORT_NAME("Manual Collect") PORT_CODE(KEYCODE_Q)
998   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("Payout") PORT_CODE(KEYCODE_W)
999   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
1000   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
1001   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
1002   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
1003   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1004   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1005
1006   PORT_START("IN0-2")
1007   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Hold1") PORT_CODE(KEYCODE_Z)
1008   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Hold2") PORT_CODE(KEYCODE_X)
1009   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Hold3") PORT_CODE(KEYCODE_C)
1010   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Hold4") PORT_CODE(KEYCODE_V)
1011   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Hold5") PORT_CODE(KEYCODE_B)
1012   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
1013   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1014   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1015
1016   PORT_START("IN0-3")
1017   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Settings") PORT_CODE(KEYCODE_F2)
1018   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
1019   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )   PORT_NAME("Note In")
1020   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )   PORT_IMPULSE(3) PORT_NAME("Coin In")
1021   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
1022   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
1023   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1024   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1025
1026   PORT_START("SW1")
1027   /* only bits 4-7 are connected here and were routed to SW1 1-4 */
1028   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
1029   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
1030   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
1031   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
1032   PORT_DIPNAME( 0x10, 0x00, "Jacks or Better" )   PORT_DIPLOCATION("SW1:1")
1033   PORT_DIPSETTING(    0x10, DEF_STR( No ) )
1034   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
1035   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )   PORT_DIPLOCATION("SW1:2")
1036   PORT_DIPSETTING(    0x20, DEF_STR( No ) )
1037   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
1038   PORT_DIPNAME( 0x40, 0x00, "Payout Mode" )      PORT_DIPLOCATION("SW1:3")
1039   PORT_DIPSETTING(    0x40, "Manual" )
1040   PORT_DIPSETTING(    0x00, "Auto" )
1041   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )   PORT_DIPLOCATION("SW1:4")
1042   PORT_DIPSETTING(    0x80, DEF_STR( No ) )
1043   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
1044INPUT_PORTS_END
1045
1046static INPUT_PORTS_START( pottnpkr )
1047   /* Multiplexed - 4x5bits */
1048   PORT_START("IN0-0")
1049   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Bet") PORT_CODE(KEYCODE_1)
1050   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Meters") PORT_CODE(KEYCODE_9)
1051   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
1052   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("Deal/Draw") PORT_CODE(KEYCODE_2)
1053   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("Cancel") PORT_CODE(KEYCODE_N)
1054   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
1055   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1056   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1057
1058   PORT_START("IN0-1")
6411059   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_IMPULSE(3) PORT_NAME("Out (Manual Collect)") PORT_CODE(KEYCODE_Q)
6421060   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("Off (Payout)") PORT_CODE(KEYCODE_W)
6431061   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
r3445r3446
6871105   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )   PORT_DIPLOCATION("SW1:2")
6881106   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
6891107   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
690   PORT_DIPNAME( 0x40, 0x00, "Payout Mode" )      PORT_DIPLOCATION("SW1:3")   /* listed in the manual as "Play Mode" */
1108   /* listed in the manual as "Play Mode" */
1109   PORT_DIPNAME( 0x40, 0x00, "Payout Mode" )      PORT_DIPLOCATION("SW1:3")
6911110   PORT_DIPSETTING(    0x40, "Manual" )         /*  listed in the manual as "Out Play" */
6921111   PORT_DIPSETTING(    0x00, "Auto" )            /*  listed in the manual as "Credit Play" */
6931112   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )   PORT_DIPLOCATION("SW1:4")
r3445r3446
6951114   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
6961115INPUT_PORTS_END
6971116
698static INPUT_PORTS_START( jokerpkr )
1117static INPUT_PORTS_START( potnpkra )
6991118   /* Multiplexed - 4x5bits */
7001119   PORT_START("IN0-0")
7011120   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )   PORT_IMPULSE(3) PORT_NAME("Coin 1")
r3445r3446
7501169   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
7511170   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
7521171   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
753   PORT_DIPNAME( 0x10, 0x00, "Jacks or Better" )
1172   PORT_DIPNAME( 0x10, 0x00, "Jacks or Better" )   PORT_DIPLOCATION("SW1:1")
7541173   PORT_DIPSETTING(    0x10, DEF_STR( No ) )
7551174   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
756   PORT_DIPNAME( 0x20, 0x20, "Royal Flush Value" )
1175   PORT_DIPNAME( 0x20, 0x20, "Royal Flush Value" )   PORT_DIPLOCATION("SW1:2")
7571176   PORT_DIPSETTING(    0x20, "250 by bet" )
7581177   PORT_DIPSETTING(    0x00, "500 by bet" )
759   PORT_DIPNAME( 0x40, 0x00, "Payout Mode" )
1178   PORT_DIPNAME( 0x40, 0x00, "Payout Mode" )      PORT_DIPLOCATION("SW1:3")
7601179   PORT_DIPSETTING(    0x40, "Manual" )
7611180   PORT_DIPSETTING(    0x00, "Auto" )
762   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
1181   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )   PORT_DIPLOCATION("SW1:4")
7631182   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
7641183   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
7651184INPUT_PORTS_END
7661185
767static INPUT_PORTS_START( pottnpkr )
1186static INPUT_PORTS_START( potnpkrc )
7681187   /* Multiplexed - 4x5bits */
7691188   PORT_START("IN0-0")
7701189   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )   PORT_IMPULSE(3) PORT_NAME("Coin 1")
r3445r3446
8191238   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
8201239   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
8211240   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
822   PORT_DIPNAME( 0x10, 0x00, "Ace or Better" )
1241   PORT_DIPNAME( 0x10, 0x00, "Ace or Better" )      PORT_DIPLOCATION("SW1:1")
8231242   PORT_DIPSETTING(    0x10, DEF_STR( No ) )
8241243   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
825   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
1244   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )   PORT_DIPLOCATION("SW1:2")
8261245   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
8271246   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
828   PORT_DIPNAME( 0x40, 0x00, "Payout Mode" )
1247   PORT_DIPNAME( 0x40, 0x00, "Payout Mode" )      PORT_DIPLOCATION("SW1:3")
8291248   PORT_DIPSETTING(    0x40, "Manual" )
8301249   PORT_DIPSETTING(    0x00, "Auto" )
1250   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )   PORT_DIPLOCATION("SW1:4")
1251   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
1252   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1253INPUT_PORTS_END
1254
1255static INPUT_PORTS_START( witchcrd )
1256   /* Multiplexed - 4x5bits */
1257   PORT_START("IN0-0")
1258   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Bet") PORT_CODE(KEYCODE_1)
1259   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Meters") PORT_CODE(KEYCODE_9)
1260   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME("Double Up") PORT_CODE(KEYCODE_3)
1261   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("Deal/Draw") PORT_CODE(KEYCODE_2)
1262   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("Cancel") PORT_CODE(KEYCODE_N)
1263   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
1264   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1265   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1266
1267   PORT_START("IN0-1")
1268   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON13 ) PORT_IMPULSE(3) PORT_NAME("Out (Manual Collect)") PORT_CODE(KEYCODE_Q)
1269   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON14 ) PORT_NAME("Off (Payout)") PORT_CODE(KEYCODE_W)
1270   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("Take") PORT_CODE(KEYCODE_4)
1271   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON11 ) PORT_NAME("Big") PORT_CODE(KEYCODE_A)
1272   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON12 ) PORT_NAME("Small") PORT_CODE(KEYCODE_S)
1273   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
1274   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1275   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1276
1277   PORT_START("IN0-2")
1278   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Hold1") PORT_CODE(KEYCODE_Z)
1279   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Hold2") PORT_CODE(KEYCODE_X)
1280   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Hold3") PORT_CODE(KEYCODE_C)
1281   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Hold4") PORT_CODE(KEYCODE_V)
1282   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Hold5") PORT_CODE(KEYCODE_B)
1283   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
1284   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1285   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1286
1287   PORT_START("IN0-3")
1288   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Learn Mode") PORT_CODE(KEYCODE_F2)
1289   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("D-31") PORT_CODE(KEYCODE_E)
1290   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )   PORT_NAME("Note In")
1291   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )   PORT_IMPULSE(3) PORT_NAME("Coin In")
1292   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
1293   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
1294   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1295   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1296
1297   PORT_START("SW1")
1298   /* only bits 4-7 are connected here and were routed to SW1 1-4 */
1299   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
1300   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
1301   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
1302   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
1303   PORT_DIPNAME( 0x10, 0x00, "Jacks or Better" )      PORT_DIPLOCATION("SW1:1")
1304   PORT_DIPSETTING(    0x10, DEF_STR( No ) )
1305   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
1306   PORT_DIPNAME( 0x20, 0x00, "Won Credits Counter" )   PORT_DIPLOCATION("SW1:2")
1307   PORT_DIPSETTING(    0x20, "Show" )
1308   PORT_DIPSETTING(    0x00, "Hide" )
1309   PORT_DIPNAME( 0x40, 0x00, "Payout Mode" )         PORT_DIPLOCATION("SW1:3")
1310   PORT_DIPSETTING(    0x40, "Manual" )
1311   PORT_DIPSETTING(    0x00, "Auto" )
1312   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Coinage ) )      PORT_DIPLOCATION("SW1:4")
1313   /* Note In is always 1 Note - 10 Credits */
1314   PORT_DIPSETTING(    0x00, "1 Coin - 1 Credit / 1 Note - 10 Credits" )
1315   PORT_DIPSETTING(    0x80, "1 Coin - 5 Credits / 1 Note - 10 Credits" )
1316INPUT_PORTS_END
1317
1318static INPUT_PORTS_START( sloco93 )
1319   /* Multiplexed - 4x5bits */
1320   PORT_START("IN0-0")
1321   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Apuesta/Bet") PORT_CODE(KEYCODE_1)
1322   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Bookkeeping") PORT_CODE(KEYCODE_9)
1323   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME("Double Up") PORT_CODE(KEYCODE_3)
1324   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("Reparte/Deal") PORT_CODE(KEYCODE_2)
1325   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("Cancela/Cancel") PORT_CODE(KEYCODE_N)
1326   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
1327   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1328   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1329
1330   PORT_START("IN0-1")
1331   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON13 ) PORT_IMPULSE(3) PORT_NAME("Out (Manual Collect)") PORT_CODE(KEYCODE_Q)
1332   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON14 ) PORT_NAME("Off (Payout)") PORT_CODE(KEYCODE_W)
1333   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("Take") PORT_CODE(KEYCODE_4)
1334   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON11 ) PORT_NAME("Big") PORT_CODE(KEYCODE_A)
1335   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON12 ) PORT_NAME("Small") PORT_CODE(KEYCODE_S)
1336   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
1337   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1338   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1339
1340   PORT_START("IN0-2")
1341   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Hold1") PORT_CODE(KEYCODE_Z)
1342   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Hold2") PORT_CODE(KEYCODE_X)
1343   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Hold3") PORT_CODE(KEYCODE_C)
1344   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Hold4") PORT_CODE(KEYCODE_V)
1345   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Hold5") PORT_CODE(KEYCODE_B)
1346   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
1347   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1348   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1349
1350   PORT_START("IN0-3")
1351   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Learn Mode") PORT_CODE(KEYCODE_F2)
1352   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("D-31") PORT_CODE(KEYCODE_E)
1353   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )   PORT_NAME("Note In")
1354   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )   PORT_IMPULSE(3) PORT_NAME("Coin In")
1355   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
1356   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
1357   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
1358   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1359
1360   PORT_START("SW1")
1361   /* only bits 4-7 are connected here and were routed to SW1 1-4 */
1362   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
1363   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
1364   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
1365   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
1366   PORT_DIPNAME( 0x10, 0x00, "32 Simple" )            PORT_DIPLOCATION("SW1:1")
1367   PORT_DIPSETTING(    0x10, DEF_STR( No ) )
1368   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
1369   PORT_DIPNAME( 0x20, 0x00, "Won Credits Counter" )   PORT_DIPLOCATION("SW1:2")
1370   PORT_DIPSETTING(    0x20, "Show" )
1371   PORT_DIPSETTING(    0x00, "Hide" )
1372   PORT_DIPNAME( 0x40, 0x00, "Payout Mode" )         PORT_DIPLOCATION("SW1:3")
1373   PORT_DIPSETTING(    0x40, "Manual" )
1374   PORT_DIPSETTING(    0x00, "Auto" )
1375   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Coinage ) )      PORT_DIPLOCATION("SW1:4")
1376   PORT_DIPSETTING(    0x80, "1 Coin - 10 Credit / 1 Note - 120 Credits" )
1377   PORT_DIPSETTING(    0x00, "1 Coin - 100 Credits / 1 Note - 100 Credits" )
1378INPUT_PORTS_END
1379
1380static INPUT_PORTS_START( royale )
1381   PORT_START("IN0-0")
1382   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-1") PORT_CODE(KEYCODE_1)
1383   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-2") PORT_CODE(KEYCODE_2)
1384   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-3") PORT_CODE(KEYCODE_3)
1385   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-4") PORT_CODE(KEYCODE_4)
1386   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-5") PORT_CODE(KEYCODE_5)
1387   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-6") PORT_CODE(KEYCODE_6)
1388   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-7") PORT_CODE(KEYCODE_7)
1389   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-8") PORT_CODE(KEYCODE_8)
1390
1391   PORT_START("IN0-1")
1392   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-1") PORT_CODE(KEYCODE_Q)
1393   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-2") PORT_CODE(KEYCODE_W)
1394   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-3") PORT_CODE(KEYCODE_E)
1395   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-4") PORT_CODE(KEYCODE_R)
1396   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-5") PORT_CODE(KEYCODE_T)
1397   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-6") PORT_CODE(KEYCODE_Y)
1398   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-7") PORT_CODE(KEYCODE_U)
1399   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-8") PORT_CODE(KEYCODE_I)
1400
1401   PORT_START("IN0-2")
1402   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-1") PORT_CODE(KEYCODE_A)
1403   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-2") PORT_CODE(KEYCODE_S)
1404   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-3") PORT_CODE(KEYCODE_D)
1405   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-4") PORT_CODE(KEYCODE_F)
1406   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-5") PORT_CODE(KEYCODE_G)
1407   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-6") PORT_CODE(KEYCODE_H)
1408   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-7") PORT_CODE(KEYCODE_J)
1409   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2-8") PORT_CODE(KEYCODE_K)
1410
1411   PORT_START("IN0-3")
1412   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("3-1") PORT_CODE(KEYCODE_Z)
1413   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("3-2") PORT_CODE(KEYCODE_X)
1414   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("3-3") PORT_CODE(KEYCODE_C)
1415   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("3-4") PORT_CODE(KEYCODE_V)
1416   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("3-5") PORT_CODE(KEYCODE_B)
1417   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("3-6") PORT_CODE(KEYCODE_N)
1418   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("3-7") PORT_CODE(KEYCODE_M)
1419   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("3-8") PORT_CODE(KEYCODE_L)
1420
1421   PORT_START("SW1")
1422   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
1423   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
1424   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1425   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
1426   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
1427   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1428   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
1429   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
1430   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1431   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
1432   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
1433   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1434   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
1435   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
1436   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1437   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
1438   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
1439   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1440   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
1441   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
1442   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
8311443   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
8321444   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
8331445   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
r3445r3446
8381450*    Graphics Layouts    *
8391451*************************/
8401452
841static const gfx_layout charlayout =
842{
843   8, 8,
844   RGN_FRAC(1,1),
845   1,
846   { 0 },
847   { 0, 1, 2, 3, 4, 5, 6, 7 },
848   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
849   8*8
850};
851
8521453static const gfx_layout tilelayout =
8531454{
8541455   8, 8,
8551456   RGN_FRAC(1,3),
8561457   3,
857   { 0, RGN_FRAC(1,3), RGN_FRAC(2,3) },    /* bitplanes are separated */
1458   { 0, RGN_FRAC(1,3), RGN_FRAC(2,3) },
8581459   { 0, 1, 2, 3, 4, 5, 6, 7 },
8591460   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
8601461   8*8
r3445r3446
8661467******************************/
8671468
8681469static GFXDECODE_START( pmpoker )
869   GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 16 )
870   GFXDECODE_ENTRY( "gfx2", 0, tilelayout, (8 * 3) + 128, 16 )
1470   GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0, 16 )
1471   GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0, 16 )
8711472GFXDECODE_END
8721473
8731474
8741475/***********************
875*     R/W Handlers     *
876**********************/
1476*    PIA Interfaces    *
1477***********************/
8771478
878static int mux_data = 0;
879
880/* Inputs (buttons) are multiplexed.
881   There are 4 sets of 5 bits each and are connected to PIA0, portA.
882   The selector bits are located in PIA1, portB (bits 4-7).
883*/
884static READ8_HANDLER( mux_port_r )
1479static const pia6821_interface pia0_intf =
8851480{
886   switch( mux_data&0xf0 )   /* bits 4-7 */
887   {
888      case 0x10: return input_port_read(machine, "IN0-0");
889      case 0x20: return input_port_read(machine, "IN0-1");
890      case 0x40: return input_port_read(machine, "IN0-2");
891      case 0x80: return input_port_read(machine, "IN0-3");
892   }
893   return 0xff;
894}
1481   /* PIA inputs: A, B, CA1, CB1, CA2, CB2 */
1482   mux_port_r, 0, 0, 0, 0, 0,
8951483
896static WRITE8_HANDLER( mux_w )
1484   /* PIA outputs: A, B, CA2, CB2 */
1485   0, lamps_a_w, 0, 0,
1486
1487   /* PIA IRQs: A, B */
1488   0, 0
1489};
1490
1491static const pia6821_interface pia1_intf =
8971492{
898   mux_data = data ^ 0xff;   /* inverted */
899}
1493   /* PIA inputs: A, B, CA1, CB1, CA2, CB2 */
1494   input_port_4_r, 0, 0, 0, 0, 0,
9001495
901/***** Lamps wiring *****
1496   /* PIA outputs: A, B, CA2, CB2 */
9021497
903    -------------------
904    pmpoker
905    -------------------
906    L0 = Deal
907    L1 = Hold3
908    L2 = Hold1
909    L3 = Hold5
910    L4 = Hold2 & Hold4
1498   sound_w, mux_port_w, 0, 0,
9111499
912    -------------------
913    goldnpkr & goldnpkb
914    -------------------
915    L0 = Bet
916    L1 = Deal
917    L2 = Holds (all)
918    L3 = Double Up & Take
919    L4 = Big & Small
1500   /* PIA IRQs: A, B */
1501   0, 0
1502};
9201503
921    -------------------
922    pottnpkr & jokerpkr
923    -------------------
924    L0 = Bet
925    L1 = Deal
926    L2 = Holds (all)
1504
1505/**************************************
1506*       Discrete Sound Routines       *
1507***************************************
1508
1509    Golden Poker Double-Up discrete sound circuitry.
1510    ------------------------------------------------
1511
1512           +12V                            .--------+---------------.  +5V
1513            |                              |        |               |   |
1514         .--+                              |        Z             +-------+
1515         |  |                             8|        Z 1K          | PC617 |
1516         Z  Z                         +----+----+   Z             +-------+
1517    330K Z  Z 47K                     |   VCC   |3  |   20K   1uF  |     |
1518         Z  Z             1.7uF       |        Q|---|--ZZZZZ--||---+     Z   1uF         6|\
1519         |  |            .-||-- GND   |         |7  |              |  1K Z<--||--+--------| \
1520         |  |   30K      |           4|      DIS|---+              Z     Z       |   LM380|  \  220uF
1521  PA0 ---|--|--ZZZZZ--.  |      .-----|R        |   |         2.2K Z     |       Z        |  8>--||----> Audio Out.
1522         |  |         |  |      |     |   555   |   Z              Z    -+-  10K Z     7+-|  /
1523         |  |   15K   |  |      |    5|         |   Z 10K          |    GND      Z     3+-| /-.1   .---> Audio Out.
1524  PA1 ---+--|--ZZZZZ--+--+------|-----|CV       |   Z              |             |     2+-|/  |    |
1525            |         |         |    2|         |6  |              |             |      |     |    |
1526            |  7.5K   |         |  .--|TR    THR|---+---||---------+-------------+      +-||--'    |
1527  PA2 ------+--ZZZZZ--'  |\     |  |  |   GND   |   |                            |      |          |
1528                         | \    |  |  +----+----+   |  .1uF                      |      | 10uF     |
1529                        9|  \   |  |      1|        |                           -+-     |          |
1530  PA3 -------------------|  8>--'  |      -+-       |                           GND     +----------'
1531                    4069 |  /      |      GND       |                                   |
1532                         | /       |                |                                  -+-
1533                         |/        '----------------'                                  GND
9271534*/
9281535
929static WRITE8_HANDLER( lamps_a_w )
1536static const discrete_555_desc goldnpkr_555_vco_desc =
1537   {DISC_555_OUT_DC | DISC_555_OUT_ENERGY, 5, DEFAULT_555_VALUES};
1538
1539static const discrete_dac_r1_ladder dac_goldnpkr_ladder =
9301540{
931   output_set_lamp_value(0, 1-((data) & 1));      /* Lamp 0 */
932   output_set_lamp_value(1, 1-((data >> 1) & 1));   /* Lamp 1 */
933   output_set_lamp_value(2, 1-((data >> 2) & 1));   /* Lamp 2 */
934   output_set_lamp_value(3, 1-((data >> 3) & 1));   /* Lamp 3 */
935   output_set_lamp_value(4, 1-((data >> 4) & 1));   /* Lamp 4 */
1541   3,                           /* size of ladder */
1542   {RES_K(30), RES_K(15), RES_K(7.5)},   /* elements */
9361543
937/*  bit 5 = Coin out
938    bit 6 = Coin counter
939    bit 7 = Note counter (only goldnpkr use it) */
940}
1544/*  external vBias doesn't seems to be accurate.
1545    using the 555 internal values sound better.
1546*/
1547   5,                           /* voltage Bias resistor is tied to */
1548   RES_K(5),                     /* additional resistor tied to vBias */
1549   RES_K(10),                     /* resistor tied to ground */
9411550
942static WRITE8_HANDLER( sound_w )
943{
1551   CAP_U(1.7)                     /* filtering cap tied to ground */
9441552
945/* discrete sound is connected to PIA1, portA: bits 0-3 */
1553//  12,                                 /* voltage Bias resistor is tied to */
1554//  RES_K(330),                         /* additional resistor tied to vBias */
1555//  0,                                  /* resistor tied to ground */
1556};
9461557
947}
1558static DISCRETE_SOUND_START( goldnpkr )
1559/*
1560    - bits -
1561    76543210
1562    --------
1563    .....xxx --> sound data.
1564    ....x... --> enable/disable.
9481565
1566*/
1567   DISCRETE_INPUT_NOT   (NODE_01)      /* bit 3 - enable/disable */
1568   DISCRETE_INPUT_DATA  (NODE_10)      /* bits 0-2  - sound data */
9491569
950/***********************
951*    PIA Interfaces    *
952**********************/
1570   DISCRETE_DAC_R1(NODE_20, NODE_01, NODE_10, 5, &dac_goldnpkr_ladder)
9531571
954static const pia6821_interface pia0_intf =
1572   DISCRETE_555_ASTABLE_CV(NODE_30, NODE_01, RES_K(1), RES_K(10), CAP_U(.1), NODE_20, &goldnpkr_555_vco_desc)
1573   DISCRETE_OUTPUT(NODE_30, 3000)
1574
1575DISCRETE_SOUND_END
1576
1577/*
1578    Jack Potten's Poker discrete sound circuitry.
1579    ---------------------------------------------
1580
1581                                           +5V
1582           +12V                             |
1583            |                               +--------.
1584         .--+                               |        Z
1585         |  |                              8|        Z 1K                                 +12V
1586         Z  Z                          .----+----.   Z                                     |
1587     47K Z  Z 220K                     |   VCC   |3  |    10K    1uF                     |\|
1588         Z  Z                          |        Q|---|---ZZZZZ---||--.             1K   7| \
1589         |  |                          |         |7  |               |         .--ZZZZZ--|+ \  470uF
1590         |  |   33K                   4|      DIS|---+               Z   10uF  |        6|  8>--||----> Audio Out.
1591  PA0 ---|--|--ZZZZZ--.         .------|R        |   |               Z<---||---+---------|- /
1592         |  |         |         |      |   555   |   Z               Z              LM380| /   .------> Audio Out.
1593         |  |   18K   |         |     5|         |   Z 1K            |                   |/|   |
1594  PA1 ---+--|--ZZZZZ--+---------|------|CV       |   Z               |                2,3,4|   |
1595            |         |         |     2|         |6  |  +            |                5,10 +---'
1596            |   10K   |         |  .---|TR    THR|---+---|(----------+                11,12|
1597  PA2 ------+--ZZZZZ--'  |\     |  |   |   GND   |   |               |                     |
1598                         | \    |  |   '----+----'   |   1uF        -+-                   -+-
1599                        9|  \ 8 |  |       1|        |              GND                   GND
1600  PA3 -------------------|   >--'  |       -+-       |
1601                  74LS04 |  /      |       GND       |
1602                         | /       |                 |
1603                         |/        '-----------------'
1604*/
1605
1606static const discrete_dac_r1_ladder dac_pottnpkr_ladder =
9551607{
956   /* PIA inputs: A, B, CA1, CB1, CA2, CB2 */
957   mux_port_r, 0, 0, 0, 0, 0,
1608   3,                           /* size of ladder */
1609   {RES_K(33), RES_K(18), RES_K(10)},   /* elements */
9581610
959   /* PIA outputs: A, B, CA2, CB2 */
960   0, lamps_a_w, 0, 0,
1611/*  external vBias doesn't seems to be accurate.
1612    using the 555 internal values sound better.
1613*/
1614   5,                           /* voltage Bias resistor is tied to */
1615   RES_K(5),                     /* additional resistor tied to vBias */
1616   RES_K(10),                     /* resistor tied to ground */
9611617
962   /* PIA IRQs: A, B */
963   0, 0
1618   0                           /* no filtering cap tied to ground */
9641619};
9651620
966static const pia6821_interface pia1_intf =
967{
968   /* PIA inputs: A, B, CA1, CB1, CA2, CB2 */
969   input_port_4_r, 0, 0, 0, 0, 0,
1621static DISCRETE_SOUND_START( pottnpkr )
1622/*
1623    - bits -
1624    76543210
1625    --------
1626    .....xxx --> sound data.
1627    ....x... --> enable/disable.
9701628
971   /* PIA outputs: A, B, CA2, CB2 */
1629*/
1630   DISCRETE_INPUT_NOT   (NODE_01)      /* bit 3 - enable/disable */
1631   DISCRETE_INPUT_DATA  (NODE_10)      /* bits 0-2  - sound data */
9721632
973   sound_w, mux_w, 0, 0,
1633   DISCRETE_DAC_R1(NODE_20, NODE_01, NODE_10, 5, &dac_pottnpkr_ladder)
9741634
975   /* PIA IRQs: A, B */
976   0, 0
977};
1635   DISCRETE_555_ASTABLE_CV(NODE_30, NODE_01, RES_K(1), RES_K(1), CAP_U(1), NODE_20, &goldnpkr_555_vco_desc)
1636   DISCRETE_OUTPUT(NODE_30, 3000)
9781637
1638DISCRETE_SOUND_END
9791639
1640
9801641/*************************
9811642*    Machine Drivers     *
9821643*************************/
9831644
984static MACHINE_DRIVER_START( pmpoker )
1645static MACHINE_DRIVER_START( pmpoker_base )
9851646
9861647   /* basic machine hardware */
987   MDRV_CPU_ADD("main", M6502, MASTER_CLOCK/16)   /* guess */
1648   MDRV_CPU_ADD("main", M6502, CPU_CLOCK)
9881649   MDRV_CPU_PROGRAM_MAP(pmpoker_map, 0)
9891650   MDRV_CPU_VBLANK_INT("main", nmi_line_pulse)
9901651
r3445r3446
9951656   MDRV_SCREEN_REFRESH_RATE(60)
9961657   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
9971658   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
998   MDRV_SCREEN_SIZE((39+1)*8, (31+1)*8)                  /* Taken from MC6845 init, registers 00 & 04. Normally programmed with (value-1) */
999   MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 29*8-1)    /* Taken from MC6845 init, registers 01 & 06 */
1659   MDRV_SCREEN_SIZE((39+1)*8, (31+1)*8)                  /* From MC6845 init, registers 00 & 04 (programmed with value-1). */
1660   MDRV_SCREEN_VISIBLE_AREA(1*8, 32*8-1, 0*8, 29*8-1)    /* From MC6845 init, registers 01 & 06. */
10001661
1662   MDRV_DEVICE_ADD("crtc", MC6845)
1663
10011664   MDRV_GFXDECODE(pmpoker)
1002
1003   MDRV_PALETTE_INIT(pottnpkr)
1004   MDRV_PALETTE_LENGTH(1024)
1005
1665   MDRV_PALETTE_INIT(goldnpkr)
1666   MDRV_PALETTE_LENGTH(256)
10061667   MDRV_VIDEO_START(pmpoker)
10071668   MDRV_VIDEO_UPDATE(pmpoker)
1669MACHINE_DRIVER_END
10081670
1009   MDRV_DEVICE_ADD("crtc", MC6845)
1671
1672static MACHINE_DRIVER_START( pmpoker )
1673
1674   MDRV_IMPORT_FROM(pmpoker_base)
1675
1676   /* sound hardware */
1677   MDRV_SPEAKER_STANDARD_MONO("mono")
1678   MDRV_SOUND_ADD("discrete", DISCRETE, 0)
1679   MDRV_SOUND_CONFIG_DISCRETE(goldnpkr)
1680   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
10101681MACHINE_DRIVER_END
10111682
1012static MACHINE_DRIVER_START( jokerpkr )
1013   MDRV_IMPORT_FROM(pmpoker)
1683
1684static MACHINE_DRIVER_START( pottnpkr )
1685
1686   MDRV_IMPORT_FROM(pmpoker_base)
1687
1688   /* basic machine hardware */
10141689   MDRV_CPU_MODIFY("main")
1015   MDRV_CPU_PROGRAM_MAP(jokerpkr_map, 0)
1690   MDRV_CPU_PROGRAM_MAP(pottnpkr_map, 0)
1691
1692   /* sound hardware */
1693   MDRV_SPEAKER_STANDARD_MONO("mono")
1694   MDRV_SOUND_ADD("discrete", DISCRETE, 0)
1695   MDRV_SOUND_CONFIG_DISCRETE(pottnpkr)
1696   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
10161697MACHINE_DRIVER_END
10171698
1699static MACHINE_DRIVER_START( witchcrd )
10181700
1701   MDRV_IMPORT_FROM(pmpoker_base)
1702
1703   /* video hardware */
1704   MDRV_PALETTE_INIT(witchcrd)
1705
1706   /* sound hardware */
1707   MDRV_SPEAKER_STANDARD_MONO("mono")
1708   MDRV_SOUND_ADD("discrete", DISCRETE, 0)
1709   MDRV_SOUND_CONFIG_DISCRETE(goldnpkr)
1710   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
1711MACHINE_DRIVER_END
1712
1713static MACHINE_DRIVER_START( sloco93 )
1714
1715   MDRV_IMPORT_FROM(pmpoker_base)
1716
1717   /* video hardware */
1718   MDRV_SCREEN_MODIFY("main")
1719   MDRV_SCREEN_SIZE((39+1)*8, (31+1)*8)
1720   MDRV_SCREEN_VISIBLE_AREA(2*8, 32*8-1, 1*8, 29*8-1)
1721
1722   MDRV_PALETTE_INIT(witchcrd)
1723
1724   /* sound hardware */
1725   MDRV_SPEAKER_STANDARD_MONO("mono")
1726   MDRV_SOUND_ADD("discrete", DISCRETE, 0)
1727   MDRV_SOUND_CONFIG_DISCRETE(goldnpkr)
1728   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
1729MACHINE_DRIVER_END
1730
1731
10191732/*************************
10201733*        Rom Load        *
10211734*************************/
r3445r3446
10251738   ROM_LOAD( "2-5.bin",   0x5000, 0x1000, CRC(3446a643) SHA1(e67854e3322e238c17fed4e05282922028b5b5ea) )
10261739   ROM_LOAD( "2-6.bin",   0x6000, 0x1000, CRC(50d2d026) SHA1(7f58ab176de0f0f7666d87271af69a845faec090) )
10271740   ROM_LOAD( "2-7.bin",   0x7000, 0x1000, CRC(a9ab972e) SHA1(477441b7ff3acae3a5d5a3e4c2a428e0b3121534) )
1028   ROM_RELOAD(            0xf000, 0x1000 )    /* for vectors/pointers */
10291741
1030   ROM_REGION( 0x0800, "gfx1", ROMREGION_DISPOSE )
1031   ROM_LOAD( "1-4.bin",   0x0000, 0x0800, CRC(62b9f90d) SHA1(39c61a01225027572fdb75543bb6a78ed74bb2fb) )    /* text layer */
1742   ROM_REGION( 0x1800, "gfx1", ROMREGION_DISPOSE )
1743   ROM_FILL(            0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
1744   ROM_LOAD( "1-4.bin",   0x1000, 0x0800, CRC(62b9f90d) SHA1(39c61a01225027572fdb75543bb6a78ed74bb2fb) )    /* text layer */
10321745
10331746   ROM_REGION( 0x1800, "gfx2", ROMREGION_DISPOSE )
10341747   ROM_LOAD( "1-1.bin",   0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) )    /* cards deck gfx, bitplane1 */
10351748   ROM_LOAD( "1-2.bin",   0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
10361749   ROM_LOAD( "1-3.bin",   0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) )    /* cards deck gfx, bitplane3 */
10371750
1038   ROM_REGION( 0x0400, "proms", 0 )
1751   ROM_REGION( 0x0100, "proms", 0 )
10391752   ROM_LOAD( "tbp24sa10n.7d",      0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
1040   ROM_RELOAD(                   0x0100, 0x0100 )
1041   ROM_RELOAD(                   0x0200, 0x0100 )
1042   ROM_RELOAD(                   0x0300, 0x0100 )
10431753ROM_END
10441754
10451755/*  the original goldnpkr u40_4a.bin rom is bit corrupted.
r3445r3446
10501760ROM_START( goldnpkr )
10511761   ROM_REGION( 0x10000, "main", 0 )
10521762   ROM_LOAD( "ups39_12a.bin",   0x0000, 0x8000, CRC(216b45fb) SHA1(fbfcd98cc39b2e791cceb845b166ff697f584add) )
1053   ROM_RELOAD(               0x8000, 0x8000 )    /* for vectors/pointers */
10541763
1055   ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
1056   ROM_LOAD( "u38_5a.bin",   0x0000, 0x2000, CRC(32705e1d) SHA1(84f9305af38179985e0224ae2ea54c01dfef6e12) )    /* text layer */
1764   ROM_REGION( 0x6000, "gfx1", ROMREGION_DISPOSE )
1765   ROM_FILL(            0x0000, 0x4000, 0 ) /* filling the R-G bitplanes */
1766   ROM_LOAD( "u38_5a.bin",   0x4000, 0x2000, CRC(32705e1d) SHA1(84f9305af38179985e0224ae2ea54c01dfef6e12) )    /* text layer */
10571767
10581768   ROM_REGION( 0x6000, "gfx2", ROMREGION_DISPOSE )
10591769   ROM_LOAD( "u43_2a.bin",   0x0000, 0x2000, CRC(10b34856) SHA1(52e4cc81b36b4c807b1d4471c0f7bea66108d3fd) )    /* cards deck gfx, bitplane1 */
10601770   ROM_LOAD( "u40_4a.bin",   0x2000, 0x2000, CRC(5fc965ef) SHA1(d9ecd7e9b4915750400e76ca604bec8152df1fe4) )    /* cards deck gfx, bitplane2 */
1061   ROM_COPY( "gfx1",   0x0800, 0x4000, 0x0800 )    /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */
1771   ROM_COPY( "gfx1",   0x4800, 0x4000, 0x0800 )    /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */
10621772
1063   ROM_REGION( 0x0400, "proms", 0 )
1064   ROM_LOAD( "tbp24s10n.7d",      0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
1065   ROM_RELOAD(                   0x0100, 0x0100 )
1066   ROM_RELOAD(                   0x0200, 0x0100 )
1067   ROM_RELOAD(                   0x0300, 0x0100 )
1773   ROM_REGION( 0x0100, "proms", 0 )
1774   ROM_LOAD( "tbp24s10n.7d",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
10681775
10691776/*  pmpoker                 goldnpkr
10701777    1-4.bin                 u38_5a (1st quarter)    96.582031%  \ 1st and 2nd halves are identical.
r3445r3446
10761783ROM_START( goldnpkb )
10771784   ROM_REGION( 0x10000, "main", 0 )
10781785   ROM_LOAD( "ups31h.12a",   0x0000, 0x8000, CRC(bee5b07a) SHA1(5da60292ecbbedd963c273eac2a1fb88ad66ada8) )
1079   ROM_RELOAD(               0x8000, 0x8000 )    /* for vectors/pointers */
10801786
1081   ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
1082   ROM_LOAD( "u38.5a.bin",   0x0000, 0x2000, CRC(32705e1d) SHA1(84f9305af38179985e0224ae2ea54c01dfef6e12) )    /* text layer */
1787   ROM_REGION( 0x6000, "gfx1", ROMREGION_DISPOSE )
1788   ROM_FILL(            0x0000, 0x4000, 0 ) /* filling the R-G bitplanes */
1789   ROM_LOAD( "u38_5a.bin",   0x4000, 0x2000, CRC(32705e1d) SHA1(84f9305af38179985e0224ae2ea54c01dfef6e12) )    /* text layer */
10831790
10841791   ROM_REGION( 0x6000, "gfx2", ROMREGION_DISPOSE )
1085   ROM_LOAD( "u43.2a.bin",   0x0000, 0x2000, CRC(10b34856) SHA1(52e4cc81b36b4c807b1d4471c0f7bea66108d3fd) )    /* cards deck gfx, bitplane1 */
1086   ROM_LOAD( "u40.4a.bin",   0x2000, 0x2000, CRC(5fc965ef) SHA1(d9ecd7e9b4915750400e76ca604bec8152df1fe4) )    /* cards deck gfx, bitplane2 */
1087   ROM_COPY( "gfx1",   0x0800, 0x4000, 0x0800 )    /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */
1792   ROM_LOAD( "u43_2a.bin",   0x0000, 0x2000, CRC(10b34856) SHA1(52e4cc81b36b4c807b1d4471c0f7bea66108d3fd) )    /* cards deck gfx, bitplane1 */
1793   ROM_LOAD( "u40_4a.bin",   0x2000, 0x2000, CRC(5fc965ef) SHA1(d9ecd7e9b4915750400e76ca604bec8152df1fe4) )    /* cards deck gfx, bitplane2 */
1794   ROM_COPY( "gfx1",   0x4800, 0x4000, 0x0800 )    /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */
10881795
1089   ROM_REGION( 0x0400, "proms", 0 )
1796   ROM_REGION( 0x0100, "proms", 0 )
10901797   ROM_LOAD( "tbp24s10n.7d",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
1091   ROM_RELOAD(                   0x0100, 0x0100 )
1092   ROM_RELOAD(                   0x0200, 0x0100 )
1093   ROM_RELOAD(                   0x0300, 0x0100 )
10941798
10951799/*  pmpoker                 goldnpkb
10961800    1-4.bin                 u38.5a (1st quarter)    96.582031%  \ 1st and 2nd halves are identical.
r3445r3446
10991803*/
11001804ROM_END
11011805
1102ROM_START( goldnpkc )   /* Golden Poker without the double up feature */
1806ROM_START( pottnpkr )   /* Golden Poker game without the double up feature. Code is intended to start at $6000 */
11031807   ROM_REGION( 0x10000, "main", 0 )
1104   ROM_LOAD( "ic13_3.bin",   0x6000, 0x1000, CRC(23c975cd) SHA1(1d32a9ba3aa996287a823558b9d610ab879a29e8) )
1105   ROM_LOAD( "ic14_4.bin",   0x7000, 0x1000, CRC(86a03aab) SHA1(0c4e8699b9fc9943de1fa0a364e043b3878636dc) )
1106   ROM_RELOAD(            0xf000, 0x1000 )    /* for vectors/pointers */
1808   ROM_LOAD( "ic13_3.bin",   0x2000, 0x1000, CRC(23c975cd) SHA1(1d32a9ba3aa996287a823558b9d610ab879a29e8) )
1809   ROM_LOAD( "ic14_4.bin",   0x3000, 0x1000, CRC(86a03aab) SHA1(0c4e8699b9fc9943de1fa0a364e043b3878636dc) )
11071810
1108   ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
1109   ROM_LOAD( "ic7_0.bin",   0x0000, 0x1000, CRC(1090e7f0) SHA1(26a7fc8853debb9a759811d7fee39410614c3895) )    /* text layer */
1811   ROM_REGION( 0x3000, "gfx1", ROMREGION_DISPOSE )
1812   ROM_FILL(            0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
1813   ROM_LOAD( "ic7_0.bin",   0x2000, 0x1000, CRC(1090e7f0) SHA1(26a7fc8853debb9a759811d7fee39410614c3895) )    /* text layer */
11101814
11111815   ROM_REGION( 0x3000, "gfx2", ROMREGION_DISPOSE )
11121816   ROM_LOAD( "ic2_7.bin",   0x0000, 0x1000, CRC(b5a1f5a3) SHA1(a34aaaab5443c6962177a5dd35002bd09d0d2772) )    /* cards deck gfx, bitplane1 */
11131817   ROM_LOAD( "ic3_8.bin",   0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) )    /* cards deck gfx, bitplane2 */
11141818   ROM_LOAD( "ic5_9.bin",   0x2000, 0x1000, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) )    /* cards deck gfx, bitplane3 */
11151819
1116   ROM_REGION( 0x0400, "proms", 0 )
1117   ROM_LOAD( "tbp24s10n.7d",      0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
1118   ROM_RELOAD(                   0x0100, 0x0100 )
1119   ROM_RELOAD(                   0x0200, 0x0100 )
1120   ROM_RELOAD(                   0x0300, 0x0100 )
1820   ROM_REGION( 0x0100, "proms", 0 )
1821   ROM_LOAD( "tbp24s10n.7d",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
11211822
11221823/*  ic2_7.bin    1ST AND 2ND HALF IDENTICAL
11231824    ic3_8.bin    1ST AND 2ND HALF IDENTICAL
r3445r3446
11281829*/
11291830ROM_END
11301831
1131ROM_START( jokerpkr )    /* a Coinmaster game?... seems to be a hack */
1832ROM_START( potnpkra )    /* a Coinmaster game?... seems to be a hack */
11321833   ROM_REGION( 0x10000, "main", 0 )
11331834   ROM_LOAD( "vp-5.bin",   0x2000, 0x1000, CRC(1443d0ff) SHA1(36625d24d9a871cc8c03bdeda983982ba301b385) )
11341835   ROM_LOAD( "vp-6.bin",   0x3000, 0x1000, CRC(94f82fc1) SHA1(ce95fc429f5389eea45fec877bac992fa7ba2b3c) )
1135   ROM_RELOAD(            0xf000, 0x1000 )    /* for vectors/pointers */
11361836
1137   ROM_REGION( 0x0800, "gfx1", ROMREGION_DISPOSE )
1138   ROM_LOAD( "vp-4.bin",   0x0000, 0x0800, CRC(2c53493f) SHA1(9e71db51499294bb4b16e7d8013e5daf6f1f9d18) )    /* text layer */
1837   ROM_REGION( 0x1800, "gfx1", ROMREGION_DISPOSE )
1838   ROM_FILL(            0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
1839   ROM_LOAD( "vp-4.bin",   0x1000, 0x0800, CRC(2c53493f) SHA1(9e71db51499294bb4b16e7d8013e5daf6f1f9d18) )    /* text layer */
11391840
11401841   ROM_REGION( 0x1800, "gfx2", ROMREGION_DISPOSE )
11411842   ROM_LOAD( "vp-1.bin",   0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) )    /* cards deck gfx, bitplane1 */
11421843   ROM_LOAD( "vp-2.bin",   0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
11431844   ROM_LOAD( "vp-3.bin",   0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) )    /* cards deck gfx, bitplane3 */
11441845
1145   ROM_REGION( 0x0400, "proms", 0 )
1146   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
1147   ROM_RELOAD(                0x0100, 0x0100 )
1148   ROM_RELOAD(                0x0200, 0x0100 )
1149   ROM_RELOAD(                0x0300, 0x0100 )
1846   ROM_REGION( 0x0100, "proms", 0 )
1847   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
11501848ROM_END
11511849
1850/*
1851pottpok4.bin                                                 0xxxxxxxxxx = 0x00
1852                        517.4a                               0xxxxxxxxxx = 0x00
1853pottpok1.bin            517.8a                  IDENTICAL
1854pottpok2.bin            517.7a                  IDENTICAL
1855pottpok3.bin            517.6a                  IDENTICAL
1856pottpok4.bin            517.4a                  IDENTICAL
1857pottpok5.bin            517.16a                 69.335938%
1858pottpok6.bin            517.17a                 2.685547%
1859*/
1860
1861ROM_START( potnpkrb )
1862   ROM_REGION( 0x10000, "main", 0 )
1863   ROM_LOAD( "517.16a",   0x2000, 0x1000, CRC(8892fbd4) SHA1(22a27c0c3709ca4808a9afb8848233bc4124559f) )
1864   ROM_LOAD( "517.17a",   0x3000, 0x1000, CRC(75a72877) SHA1(9df8fd2c98526d20aa0fa056a7b71b5c5fb5206b) )
1865
1866   ROM_REGION( 0x1800, "gfx1", ROMREGION_DISPOSE )
1867   ROM_FILL(            0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
1868   ROM_LOAD( "517.8a",      0x1000, 0x0800, CRC(2c53493f) SHA1(9e71db51499294bb4b16e7d8013e5daf6f1f9d18) )    /* text layer */
1869
1870   ROM_REGION( 0x1800, "gfx2", ROMREGION_DISPOSE )
1871   ROM_LOAD( "517.4a",      0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) )    /* cards deck gfx, bitplane1 */
1872   ROM_LOAD( "517.6a",      0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
1873   ROM_LOAD( "517.7a",      0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) )    /* cards deck gfx, bitplane3 */
1874
1875   ROM_REGION( 0x0100, "proms", 0 )
1876   ROM_LOAD( "517_mb7052.9c",   0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
1877ROM_END
1878
11521879/* the alternative Jack Potten set is identical, but with different sized roms.
11531880
11541881                pot1.bin                1ST AND 2ND HALF IDENTICAL
r3445r3446
11611888pottpok6.bin    pot6.bin                IDENTICAL
11621889*/
11631890
1164ROM_START( pottnpkr )
1891ROM_START( potnpkrc )
11651892   ROM_REGION( 0x10000, "main", 0 )
11661893   ROM_LOAD( "pottpok5.bin",   0x2000, 0x1000, CRC(d74e50f4) SHA1(c3a8a6322a3f1622898c6759e695b4e702b79b28) )
11671894   ROM_LOAD( "pottpok6.bin",   0x3000, 0x1000, CRC(53237873) SHA1(b640cb3db2513784c8d2d8983a17352276c11e07) )
1168   ROM_RELOAD(               0xf000, 0x1000 )    /* for vectors/pointers */
11691895
1170   ROM_REGION( 0x0800, "gfx1", ROMREGION_DISPOSE )
1171   ROM_LOAD( "pottpok1.bin",   0x0000, 0x0800, CRC(2c53493f) SHA1(9e71db51499294bb4b16e7d8013e5daf6f1f9d18) )    /* text layer */
1896   ROM_REGION( 0x1800, "gfx1", ROMREGION_DISPOSE )
1897   ROM_FILL(               0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
1898   ROM_LOAD( "pottpok1.bin",   0x1000, 0x0800, CRC(2c53493f) SHA1(9e71db51499294bb4b16e7d8013e5daf6f1f9d18) )    /* text layer */
11721899
11731900   ROM_REGION( 0x1800, "gfx2", ROMREGION_DISPOSE )
11741901   ROM_LOAD( "pottpok4.bin",   0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) )    /* cards deck gfx, bitplane1 */
11751902   ROM_LOAD( "pottpok3.bin",   0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
11761903   ROM_LOAD( "pottpok2.bin",   0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) )    /* cards deck gfx, bitplane3 */
11771904
1178   ROM_REGION( 0x0400, "proms", 0 )
1905   ROM_REGION( 0x0100, "proms", 0 )
11791906   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
1180   ROM_RELOAD(                0x0100, 0x0100 )
1181   ROM_RELOAD(                0x0200, 0x0100 )
1182   ROM_RELOAD(                0x0300, 0x0100 )
11831907ROM_END
11841908
1185/*pottpok4.bin                                                 0xxxxxxxxxx = 0x00
1186                        517.4a                               0xxxxxxxxxx = 0x00
1187pottpok1.bin            517.8a                  IDENTICAL
1188pottpok2.bin            517.7a                  IDENTICAL
1189pottpok3.bin            517.6a                  IDENTICAL
1190pottpok4.bin            517.4a                  IDENTICAL
1191pottpok5.bin            517.16a                 69.335938%
1192pottpok6.bin            517.17a                 2.685547%
1193*/
11941909
1195ROM_START( pottnpkb )
1910/***************** NEW SETS **************************/
1911
1912
1913ROM_START( potnpkrd )
11961914   ROM_REGION( 0x10000, "main", 0 )
1197   ROM_LOAD( "517.16a",   0x2000, 0x1000, CRC(8892fbd4) SHA1(22a27c0c3709ca4808a9afb8848233bc4124559f) )
1198   ROM_LOAD( "517.17a",   0x3000, 0x1000, CRC(75a72877) SHA1(9df8fd2c98526d20aa0fa056a7b71b5c5fb5206b) )
1199   ROM_RELOAD(               0xf000, 0x1000 )    /* for vectors/pointers */
1915   ROM_LOAD( "pot5.bin",   0x2000, 0x1000, CRC(d74e50f4) SHA1(c3a8a6322a3f1622898c6759e695b4e702b79b28) )
1916   ROM_LOAD( "pot6.bin",   0x3000, 0x1000, CRC(53237873) SHA1(b640cb3db2513784c8d2d8983a17352276c11e07) )
12001917
1201   ROM_REGION( 0x0800, "gfx1", ROMREGION_DISPOSE )
1202   ROM_LOAD( "517.8a",   0x0000, 0x0800, CRC(2c53493f) SHA1(9e71db51499294bb4b16e7d8013e5daf6f1f9d18) )    /* text layer */
1918   ROM_REGION( 0x3000, "gfx1", ROMREGION_DISPOSE )
1919   ROM_FILL(            0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
1920   ROM_LOAD( "pot34.bin",   0x2000, 0x1000, CRC(52fd35d2) SHA1(ad8bf8c222ceb2e9b3b6d9033866867f1977c65f) )    /* text layer */
12031921
1922   ROM_REGION( 0x3000, "gfx2", ROMREGION_DISPOSE )
1923   ROM_LOAD( "pot1.bin",   0x0000, 0x1000, CRC(b5a1f5a3) SHA1(a34aaaab5443c6962177a5dd35002bd09d0d2772) )    /* cards deck gfx, bitplane1 */
1924   ROM_LOAD( "pot2.bin",   0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) )    /* cards deck gfx, bitplane2 */
1925   ROM_COPY( "gfx1",      0x2800, 0x2000, 0x0800 )    /* cards deck gfx, bitplane3. found in the 2nd quarter of the text layer rom */
1926
1927   ROM_REGION( 0x0100, "proms", 0 )
1928   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
1929ROM_END
1930
1931ROM_START( potnpkre )
1932   ROM_REGION( 0x10000, "main", 0 )
1933   ROM_LOAD( "g_luck_a.bin",   0x2000, 0x1000, CRC(21d3b5e9) SHA1(32f06eb26c5232738ad7e86f1a81eb9717f9c7e0) )
1934   ROM_LOAD( "g_luck_b.bin",   0x3000, 0x1000, CRC(7e848e5e) SHA1(45461cfcce06f6240562761d26ba7fdb7ef4986b) )
1935
1936   ROM_REGION( 0x3000, "gfx1", ROMREGION_DISPOSE )
1937   ROM_FILL(            0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
1938   ROM_LOAD( "ic7_0.bin",   0x2000, 0x1000, CRC(1090e7f0) SHA1(26a7fc8853debb9a759811d7fee39410614c3895) )    /* text layer */
1939
1940   ROM_REGION( 0x3000, "gfx2", ROMREGION_DISPOSE )
1941   ROM_LOAD( "ic2_7.bin",   0x0000, 0x1000, CRC(b5a1f5a3) SHA1(a34aaaab5443c6962177a5dd35002bd09d0d2772) )    /* cards deck gfx, bitplane1 */
1942   ROM_LOAD( "ic3_8.bin",   0x1000, 0x1000, CRC(40e426af) SHA1(7e7cb30dafc96bcb87a05d3e0ef5c2d426ed6a74) )    /* cards deck gfx, bitplane2 */
1943   ROM_LOAD( "ic5_9.bin",   0x2000, 0x1000, CRC(232374f3) SHA1(b75907edbf769b8c46fb1ebdb301c325c556e6c2) )    /* cards deck gfx, bitplane3 */
1944
1945   ROM_REGION( 0x0100, "proms", 0 )
1946   ROM_LOAD( "tbp24s10n.7d",      0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
1947ROM_END
1948
1949ROM_START( goodluck )
1950   ROM_REGION( 0x10000, "main", 0 )
1951   ROM_LOAD( "goodluck_glh6b.bin",   0x0000, 0x8000, CRC(2cfa4a2c) SHA1(720e2900f3a0ef2632aa201a63b5eba0570e6aa3) )
1952
1953   ROM_REGION( 0x3000, "gfx1", ROMREGION_DISPOSE )
1954   ROM_FILL(         0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
1955   ROM_LOAD( "4.bin",   0x2000, 0x1000, CRC(41924d13) SHA1(8ab69b6efdc20858960fa5df669470ba90b5f8d7) )    /* text layer */
1956
1957   ROM_REGION( 0x3000, "gfx2", ROMREGION_DISPOSE )
1958   ROM_LOAD( "7.bin",   0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
1959   ROM_LOAD( "6.bin",   0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
1960   ROM_LOAD( "5.bin",   0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
1961
1962   ROM_REGION( 0x0100, "proms", 0 )
1963   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
1964ROM_END
1965
1966ROM_START( bsuerte )
1967   ROM_REGION( 0x10000, "main", 0 )
1968   ROM_LOAD( "ups39_12a.bin",   0x0000, 0x8000, CRC(e6b661b7) SHA1(b265f6814a168034d24bc1c25f67ece131281bc2) )
1969
1970   ROM_REGION( 0x3000, "gfx1", ROMREGION_DISPOSE )
1971   ROM_FILL(            0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
1972   ROM_LOAD( "u38.bin",   0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) )    /* text layer */
1973
1974   ROM_REGION( 0x3000, "gfx2", ROMREGION_DISPOSE )
1975   ROM_LOAD( "7.bin",   0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
1976   ROM_LOAD( "6.bin",   0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
1977   ROM_LOAD( "5.bin",   0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
1978
1979   ROM_REGION( 0x0100, "proms", 0 )
1980   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
1981ROM_END
1982
1983ROM_START( bsuertea )
1984   ROM_REGION( 0x10000, "main", 0 )
1985   ROM_LOAD( "x10d4esp.16c",   0x0000, 0x8000, CRC(0606bab4) SHA1(624b0cef1a23a4e7ba2d2d256f30f73b1e455fa7) )
1986
1987   ROM_REGION( 0x3000, "gfx1", ROMREGION_DISPOSE )
1988   ROM_FILL(            0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
1989   ROM_LOAD( "u38.bin",   0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) )    /* text layer */
1990
1991   ROM_REGION( 0x3000, "gfx2", ROMREGION_DISPOSE )
1992   ROM_LOAD( "7.bin",   0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
1993   ROM_LOAD( "6.bin",   0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
1994   ROM_LOAD( "5.bin",   0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
1995
1996   ROM_REGION( 0x0100, "proms", 0 )
1997   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
1998ROM_END
1999
2000ROM_START( royale )
2001   ROM_REGION( 0x10000, "main", 0 )
2002   ROM_LOAD( "royalex.bin",   0x4000, 0x4000, CRC(ef370617) SHA1(0fc5679e9787aeea3bc592b36efcaa20e859f912) )
2003
2004   ROM_REGION( 0x3000, "gfx1", ROMREGION_DISPOSE )
2005   ROM_FILL(               0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
2006   ROM_LOAD( "royalechr.bin",   0x2000, 0x1000, CRC(b1f2cbb8) SHA1(8f4930038f2e21ca90b213c35b45ed14d8fad6fb) )    /* text layer */
2007
12042008   ROM_REGION( 0x1800, "gfx2", ROMREGION_DISPOSE )
1205   ROM_LOAD( "517.4a",   0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) )    /* cards deck gfx, bitplane1 */
1206   ROM_LOAD( "517.6a",   0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
1207   ROM_LOAD( "517.7a",   0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) )    /* cards deck gfx, bitplane3 */
2009   ROM_LOAD( "royale3.bin",   0x0000, 0x0800, CRC(1f41c541) SHA1(00df5079193f78db0617a6b8a613d8a0616fc8e9) )    /* cards deck gfx, bitplane1 */
2010   ROM_LOAD( "royale2.bin",   0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) )    /* cards deck gfx, bitplane2 */
2011   ROM_LOAD( "royale1.bin",   0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) )    /* cards deck gfx, bitplane3 */
12082012
1209   ROM_REGION( 0x0400, "proms", 0 )
1210   ROM_LOAD( "517_mb7052.9c",   0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
1211   ROM_RELOAD(                0x0100, 0x0100 )
1212   ROM_RELOAD(                0x0200, 0x0100 )
1213   ROM_RELOAD(                0x0300, 0x0100 )
2013   ROM_REGION( 0x0100, "proms", 0 )
2014   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
12142015ROM_END
12152016
2017ROM_START( witchcrd )
2018   ROM_REGION( 0x10000, "main", 0 )
2019   ROM_LOAD( "wc_sbruj.256",   0x0000, 0x8000, CRC(5689ae41) SHA1(c7a624ec881204137489b147ce66cc9a9900650a) )
12162020
2021   ROM_REGION( 0x3000, "gfx1", ROMREGION_DISPOSE )
2022   ROM_FILL(               0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
2023   ROM_LOAD( "bs_4_wc.032",   0x2000, 0x1000, CRC(41924d13) SHA1(8ab69b6efdc20858960fa5df669470ba90b5f8d7) )    /* text layer */
2024
2025   ROM_REGION( 0x3000, "gfx2", ROMREGION_DISPOSE )
2026   ROM_LOAD( "7.bin",   0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
2027   ROM_LOAD( "6.bin",   0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
2028   ROM_LOAD( "5.bin",   0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
2029
2030   ROM_REGION( 0x0100, "proms", 0 )
2031   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
2032ROM_END
2033
2034ROM_START( witchcda )
2035   ROM_REGION( 0x10000, "main", 0 )
2036   ROM_LOAD( "w_card.256",   0x0000, 0x8000, CRC(104218a4) SHA1(191e198f5443afc80a0e1bba3ccaad4e744b15e0) )
2037
2038   ROM_REGION( 0x3000, "gfx1", ROMREGION_DISPOSE )
2039   ROM_FILL(               0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
2040   ROM_LOAD( "bs_4_wc.032",   0x2000, 0x1000, CRC(41924d13) SHA1(8ab69b6efdc20858960fa5df669470ba90b5f8d7) )    /* text layer */
2041
2042   ROM_REGION( 0x3000, "gfx2", ROMREGION_DISPOSE )
2043   ROM_LOAD( "7.bin",   0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
2044   ROM_LOAD( "6.bin",   0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
2045   ROM_LOAD( "5.bin",   0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
2046
2047   ROM_REGION( 0x0100, "proms", 0 )
2048   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
2049ROM_END
2050
2051ROM_START( witchcdb )
2052   ROM_REGION( 0x10000, "main", 0 )
2053   ROM_LOAD( "w_card.128",   0x4000, 0x4000, CRC(620ac5ca) SHA1(69275683780c65a83ee6dcef3bd14ac02f4929a0) )
2054
2055   ROM_REGION( 0x3000, "gfx1", ROMREGION_DISPOSE )
2056   ROM_FILL(               0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
2057   ROM_LOAD( "bs_4_wc.032",   0x2000, 0x1000, CRC(41924d13) SHA1(8ab69b6efdc20858960fa5df669470ba90b5f8d7) )    /* text layer */
2058
2059   ROM_REGION( 0x3000, "gfx2", ROMREGION_DISPOSE )
2060   ROM_LOAD( "7.bin",   0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
2061   ROM_LOAD( "6.bin",   0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
2062   ROM_LOAD( "5.bin",   0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
2063
2064   ROM_REGION( 0x0100, "proms", 0 )
2065   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
2066ROM_END
2067
2068ROM_START( sloco93 )
2069   ROM_REGION( 0x10000, "main", 0 )
2070   ROM_LOAD( "locoloco.128",   0x4000, 0x4000, CRC(f626a770) SHA1(afbd33b3f65b8a781c716a3d6e5447aa817d856c) )
2071
2072   ROM_REGION( 0x3000, "gfx1", ROMREGION_DISPOSE )
2073   ROM_FILL(               0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
2074   ROM_LOAD( "confloco.032",   0x2000, 0x1000, CRC(b86f219c) SHA1(3f655a96bcf597a271a4eaaa0acbf8dd70fcdae9) )    /* text layer */
2075
2076   ROM_REGION( 0x3000, "gfx2", ROMREGION_DISPOSE )
2077   ROM_LOAD( "7.bin",   0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
2078   ROM_LOAD( "6.bin",   0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
2079   ROM_LOAD( "5.bin",   0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
2080
2081   ROM_REGION( 0x0100, "proms", 0 )
2082   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
2083ROM_END
2084
2085ROM_START( sloco93a )
2086   ROM_REGION( 0x10000, "main", 0 )
2087   ROM_LOAD( "locoloco.256",   0x0000, 0x8000, CRC(ab037b0b) SHA1(16f811daaed5bf7b72549db85755c5274dfee310) )
2088
2089   ROM_REGION( 0x3000, "gfx1", ROMREGION_DISPOSE )
2090   ROM_FILL(               0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
2091   ROM_LOAD( "confloco.032",   0x2000, 0x1000, CRC(b86f219c) SHA1(3f655a96bcf597a271a4eaaa0acbf8dd70fcdae9) )    /* text layer */
2092
2093   ROM_REGION( 0x3000, "gfx2", ROMREGION_DISPOSE )
2094   ROM_LOAD( "7.bin",   0x0000, 0x1000, CRC(28ecfaea) SHA1(19d73ed0fdb5a873447b46e250ad6e71abe257cd) )    /* cards deck gfx, bitplane1 */
2095   ROM_LOAD( "6.bin",   0x1000, 0x1000, CRC(eeec8862) SHA1(ae03aba1bd43c3ffd140f76770fc1c8cf89ea115) )    /* cards deck gfx, bitplane2 */
2096   ROM_LOAD( "5.bin",   0x2000, 0x1000, CRC(2712f297) SHA1(d3cc1469d07c3febbbe4a645cd6bdb57e09cf504) )    /* cards deck gfx, bitplane3 */
2097
2098   ROM_REGION( 0x0100, "proms", 0 )
2099   ROM_LOAD( "82s129.9c",      0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) /* PROM dump needed */
2100ROM_END
2101
2102
12172103/*************************
12182104*      Driver Init       *
12192105*************************/
r3445r3446
12232109   pia_config(0, &pia0_intf);
12242110   pia_config(1, &pia1_intf);
12252111}
2112/*
2113    Golden Poker H/W sets:
12262114
2115    newname    oldname    gameplay  music      settings    testmode
2116    ===================================================================
2117    pmpoker    pmpoker    fast      minimal    hack        matrix/grill
2118    goldnpkr   goldnpkr   fast      y.doodle   excellent   matrix/grill
2119    goldnpkb   goldnpkb   normal    minimal    normal      matrix/grill
12272120
2121
2122    Potten's Poker H/W sets:
2123
2124    newname    oldname    gameplay  music      settings    testmode
2125    ===================================================================
2126    pottnpkr   goldnpkc   fast      y.doodle   normal      only grid
2127    potnpkra   jokerpkr   normal    normal     normal      only skill
2128    potnpkrb   pottnpkb   slow      y.doodle   normal      only grid
2129    potnpkrc   pottnpkr   normal    minimal    hack        only skill
2130    potnpkrd   --------   normal    minimal    hack        only skill
2131    potnpkre   --------   slow      y.doodle   normal      matrix/grill
2132
2133
2134    Witch Card H/W sets:
2135
2136    newname    oldname    gameplay  music      settings    testmode
2137    ===================================================================
2138    bsuerte    --------   normal    minimal    only 1-10   matrix/grill
2139    bsuertea   --------   normal    minimal    only 1-10   matrix/grill
2140    goodluck   --------   fast      y.doodle   normal      matrix/grill
2141    royale     --------
2142    witchcrd   --------   normal    y.doodle   12-param    only grid
2143    witchcda   --------   fast      y.doodle   12-param    only grid
2144    witchcdb   --------   normal    y.doodle   12-param    only grid
2145    sloco93    --------   fast      custom     complete    only grid
2146    sloco93a   --------   fast      custom     complete    only grid
2147
2148*/
2149static DRIVER_INIT( royale )
2150{
2151    /* $60bb, NOPing the ORA #$F0 (after read the PIA1 port B */
2152
2153//  UINT8 *ROM = memory_region(machine, "main");
2154
2155//  ROM[0x60bb] = 0xea;
2156//  ROM[0x60bc] = 0xea;
2157
2158   pia_config(0, &pia0_intf);
2159   pia_config(1, &pia1_intf);
2160}
2161
12282162/*************************
12292163*      Game Drivers      *
12302164*************************/
12312165
1232/*     YEAR  NAME      PARENT    MACHINE   INPUT     INIT      ROT      COMPANY                           FULLNAME                            FLAGS          LAYOUT         */
1233GAMEL( 1981, pmpoker,  0,        pmpoker,  pmpoker,  pmpoker,  ROT0,   "PlayMan",                        "PlayMan Poker (Germany)",           GAME_NO_SOUND ,layout_pmpoker )
1234GAMEL( 1981, goldnpkr, pmpoker,  pmpoker,  goldnpkr, pmpoker,  ROT0,   "Bonanza Enterprises, Ltd",       "Golden Poker Double Up (Big Boy)",  GAME_NO_SOUND ,layout_goldnpkr )
1235GAMEL( 1981, goldnpkb, pmpoker,  pmpoker,  goldnpkr, pmpoker,  ROT0,   "Bonanza Enterprises, Ltd",       "Golden Poker Double Up (Mini Boy)", GAME_NO_SOUND ,layout_goldnpkr )
1236GAMEL( 1981, goldnpkc, pmpoker,  pmpoker,  goldnpkc, pmpoker,  ROT0,   "Bootleg",                        "Golden Poker (no double up)",       GAME_NO_SOUND ,layout_goldnpkr )
1237GAMEL( 198?, jokerpkr, pmpoker,  jokerpkr, jokerpkr, pmpoker,  ROT0,   "Bootleg on Coinmaster hardware", "Joker-Poker",                       GAME_NO_SOUND ,layout_pottnpkr )
1238GAMEL( 198?, pottnpkr, pmpoker,  jokerpkr, pottnpkr, pmpoker,  ROT0,   "Bootleg",                        "Jack Potten's Poker (bootleg)",     GAME_NO_SOUND ,layout_pottnpkr )
1239GAMEL( 198?, pottnpkb, pmpoker,  jokerpkr, goldnpkc, pmpoker,  ROT0,   "Bootleg",                        "Jack Potten's Poker (bootleg2)",    GAME_NO_SOUND ,layout_pottnpkr )
2166/*     YEAR  NAME      PARENT    MACHINE   INPUT     INIT      ROT      COMPANY                      FULLNAME                            FLAGS                    LAYOUT  */
2167GAMEL( 1981, pmpoker,  0,        pmpoker,  pmpoker,  pmpoker,  ROT0,   "PlayMan",                   "PlayMan Poker (german)",            0,                       layout_pmpoker  )
2168GAMEL( 1981, goldnpkr, 0,        pmpoker,  goldnpkr, pmpoker,  ROT0,   "Bonanza Enterprises, Ltd",  "Golden Poker Double Up (Big Boy)",  0,                       layout_goldnpkr )
2169GAMEL( 1981, goldnpkb, goldnpkr, pmpoker,  goldnpkr, pmpoker,  ROT0,   "Bonanza Enterprises, Ltd",  "Golden Poker Double Up (Mini Boy)", 0,                       layout_goldnpkr )
2170GAMEL( 198?, pottnpkr, 0,        pottnpkr, pottnpkr, pmpoker,  ROT0,   "Bootleg",                   "Jack Potten's Poker (set 1)",       0,                       layout_pottnpkr )
2171GAMEL( 198?, potnpkra, pottnpkr, pottnpkr, potnpkra, pmpoker,  ROT0,   "Bootleg on Coinmaster H/W", "Jack Potten's Poker (set 2)",       0,                       layout_pottnpkr )
2172GAMEL( 198?, potnpkrb, pottnpkr, pottnpkr, pottnpkr, pmpoker,  ROT0,   "Bootleg",                   "Jack Potten's Poker (set 3)",       0,                       layout_pottnpkr )
2173GAMEL( 198?, potnpkrc, pottnpkr, pottnpkr, potnpkrc, pmpoker,  ROT0,   "Bootleg",                   "Jack Potten's Poker (set 4)",       0,                       layout_pottnpkr )
12402174
2175GAMEL( 198?, potnpkrd, pottnpkr, pottnpkr, potnpkrc, pmpoker,  ROT0,   "Bootleg",                   "Jack Potten's Poker (set 5)",       0,                       layout_pottnpkr )
2176GAMEL( 198?, potnpkre, pottnpkr, pottnpkr, pottnpkr, pmpoker,  ROT0,   "Bootleg",                   "Jack Potten's Poker (set 6)",       0,                       layout_pottnpkr )
2177GAMEL( 198?, goodluck, 0,        witchcrd, goodluck, pmpoker,  ROT0,   "Unknown",                   "Good Luck",                         0,                       layout_pottnpkr )
2178GAMEL( 198?, bsuerte,  0,        witchcrd, bsuerte,  pmpoker,  ROT0,   "Unknown",                   "Buena Suerte (spanish, set 1)",     0,                       layout_goldnpkr )
2179GAMEL( 198?, bsuertea, bsuerte,  witchcrd, bsuerte,  pmpoker,  ROT0,   "Unknown",                   "Buena Suerte (spanish, set 2)",     0,                       layout_goldnpkr )
2180GAMEL( 198?, royale,   0,        pmpoker,  royale,   royale,   ROT0,   "Unknown",                   "Royale (ver.X)",                    GAME_NOT_WORKING,        layout_goldnpkr )
2181GAME(  1991, witchcrd, 0,        witchcrd, witchcrd, pmpoker,  ROT0,   "Unknown",                   "Witch Card (english)",              0 )
2182GAME(  1991, witchcda, witchcrd, witchcrd, witchcrd, pmpoker,  ROT0,   "Unknown",                   "Witch Card (spanish, set 1)",       0 )
2183GAME(  1991, witchcdb, witchcrd, witchcrd, witchcrd, pmpoker,  ROT0,   "Unknown",                   "Witch Card (spanish, set 2)",       0 )
2184GAME(  1993, sloco93,  0,        sloco93,  sloco93,  pmpoker,  ROT0,   "Unknown",                   "Super Loco 93 (spanish, set 1)",    0 )
2185GAME(  1993, sloco93a, sloco93,  sloco93,  sloco93,  pmpoker,  ROT0,   "Unknown",                   "Super Loco 93 (spanish, set 2)",    0 )
src/mame/drivers/higemaru.c
r3445r3446
173173static MACHINE_DRIVER_START( higemaru )
174174
175175   /* basic machine hardware */
176   MDRV_CPU_ADD("main", Z80, 4000000)   /* 4 MHz ? Main xtal is 12MHz */
176   MDRV_CPU_ADD("main", Z80, XTAL_12MHz/3)   /* 4 MHz? Sharp LH0080A Z80A-CPU-D */
177177   MDRV_CPU_PROGRAM_MAP(readmem,writemem)
178178   MDRV_CPU_VBLANK_INT_HACK(higemaru_interrupt,2)
179179
r3445r3446
195195   /* sound hardware */
196196   MDRV_SPEAKER_STANDARD_MONO("mono")
197197
198   MDRV_SOUND_ADD("ay1", AY8910, 12000000/8)
198   MDRV_SOUND_ADD("ay1", AY8910, XTAL_12MHz/8)
199199   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
200200
201   MDRV_SOUND_ADD("ay2", AY8910, 12000000/8)
201   MDRV_SOUND_ADD("ay2", AY8910, XTAL_12MHz/8)
202202   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
203203MACHINE_DRIVER_END
204204
r3445r3446
210210
211211ROM_START( higemaru )
212212   ROM_REGION( 0x10000, "main", 0 )
213   ROM_LOAD( "hg4",          0x0000, 0x2000, CRC(dc67a7f9) SHA1(701875e2e85efbe84bf66515117861563f3883c0) )
214   ROM_LOAD( "hg5",          0x2000, 0x2000, CRC(f65a4b68) SHA1(687d46406de389c8bad6cc052a2516135db93d4a) )
215   ROM_LOAD( "hg6",          0x4000, 0x2000, CRC(5f5296aa) SHA1(410ee1df63492e488b3578b9c4cfbfbd2f41c888) )
216   ROM_LOAD( "hg7",          0x6000, 0x2000, CRC(dc5d455d) SHA1(7d253d6680d35943792746da11d91d7be57367cc) )
213   ROM_LOAD( "hg4.p12", 0x0000, 0x2000, CRC(dc67a7f9) SHA1(701875e2e85efbe84bf66515117861563f3883c0) )
214   ROM_LOAD( "hg5.m12", 0x2000, 0x2000, CRC(f65a4b68) SHA1(687d46406de389c8bad6cc052a2516135db93d4a) )
215   ROM_LOAD( "hg6.p11", 0x4000, 0x2000, CRC(5f5296aa) SHA1(410ee1df63492e488b3578b9c4cfbfbd2f41c888) )
216   ROM_LOAD( "hg7.m11", 0x6000, 0x2000, CRC(dc5d455d) SHA1(7d253d6680d35943792746da11d91d7be57367cc) )
217217
218218   ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
219   ROM_LOAD( "hg3",          0x0000, 0x2000, CRC(b37b88c8) SHA1(7933270969806154f0774d31fda75a5352cf26ad) )   /* characters */
219   ROM_LOAD( "hg3.m1", 0x0000, 0x2000, CRC(b37b88c8) SHA1(7933270969806154f0774d31fda75a5352cf26ad) )   /* characters */
220220
221221   ROM_REGION( 0x4000, "gfx2", ROMREGION_DISPOSE )
222   ROM_LOAD( "hg1",          0x0000, 0x2000, CRC(ef4c2f5d) SHA1(247ce819cdc4ed4ec99c25c9006bac1911354bc8) )   /* tiles */
223   ROM_LOAD( "hg2",          0x2000, 0x2000, CRC(9133f804) SHA1(93661c028709a7134537321e52da85e3c0f917ba) )
222   ROM_LOAD( "hg1.c14", 0x0000, 0x2000, CRC(ef4c2f5d) SHA1(247ce819cdc4ed4ec99c25c9006bac1911354bc8) )   /* tiles */
223   ROM_LOAD( "hg2.e14", 0x2000, 0x2000, CRC(9133f804) SHA1(93661c028709a7134537321e52da85e3c0f917ba) )
224224
225225   ROM_REGION( 0x0420, "proms", 0 )
226   ROM_LOAD( "hgb3",         0x0000, 0x0020, CRC(629cebd8) SHA1(c28cd0f341f4f1c7be97f4d8c289860db8ac0857) )   /* palette */
227   ROM_LOAD( "hgb5",         0x0020, 0x0100, CRC(dbaa4443) SHA1(cca2f9b187abd735f2309b38570edcd745042b3e) )   /* char lookup table */
228   ROM_LOAD( "hgb1",         0x0120, 0x0100, CRC(07c607ce) SHA1(c048602d62f47129152bbc7ccd38627d78a4392f) )   /* sprite lookup table */
229   ROM_LOAD( "hgb4",         0x0220, 0x0100, CRC(712ac508) SHA1(5349d722ab6733afdda65f6e0a98322f0d515e86) )   /* interrupt timing (not used) */
230   ROM_LOAD( "hgb2",         0x0320, 0x0100, CRC(4921635c) SHA1(aee37d6cdc36acf0f11ff5f93e7b16e4b12f6c39) )   /* video timing? (not used) */
226   ROM_LOAD( "hgb3.l6", 0x0000, 0x0020, CRC(629cebd8) SHA1(c28cd0f341f4f1c7be97f4d8c289860db8ac0857) )   /* palette */
227   ROM_LOAD( "hgb5.m4", 0x0020, 0x0100, CRC(dbaa4443) SHA1(cca2f9b187abd735f2309b38570edcd745042b3e) )   /* char lookup table */
228   ROM_LOAD( "hgb1.h7", 0x0120, 0x0100, CRC(07c607ce) SHA1(c048602d62f47129152bbc7ccd38627d78a4392f) )   /* sprite lookup table */
229   ROM_LOAD( "hgb4.l9", 0x0220, 0x0100, CRC(712ac508) SHA1(5349d722ab6733afdda65f6e0a98322f0d515e86) )   /* interrupt timing (not used) */
230   ROM_LOAD( "hgb2.k7", 0x0320, 0x0100, CRC(4921635c) SHA1(aee37d6cdc36acf0f11ff5f93e7b16e4b12f6c39) )   /* video timing? (not used) */
231231ROM_END
232232
233233
src/mame/drivers/plygonet.c
r3445r3446
513513
514514static INPUT_PORTS_START( polygonet )
515515   PORT_START("IN0")
516   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1)
516   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN)
517517   PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
518   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2)
519   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN3)
520   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1)
521   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2)
522   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START3)
523   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START4)
524
525   PORT_START("IN1")
526   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
527   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
528   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
529   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
530   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
531   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 )
532   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
533   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
534
535   PORT_START("IN2")
536   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL )   /* EEPROM data */
537   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL )   /* EEPROM ready (always 1) */
538   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
539   PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW )
540   PORT_DIPNAME( 0x10, 0x00, "Monitors" )
541   PORT_DIPSETTING( 0x00, "1 Monitor" )
542   PORT_DIPSETTING( 0x10, "2 Monitors" )
543   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
544   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
545   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
546
547   PORT_START("P1")
548   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
549   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
550   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1)
551   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
552   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
553   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
554   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
555   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
556
557   PORT_START("P2")
558   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
559   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
560   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
561   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
562   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
563   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
564   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
565   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
518   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN)
519   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN)
520   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN)
521   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN)
522   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN)
523   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN)
566524INPUT_PORTS_END
567525
568526static DRIVER_INIT(polygonet)
src/mame/drivers/stv.c
r3445r3446
28052805   STV_BIOS
28062806
28072807   ROM_REGION32_BE( 0x3000000, "user1", 0 ) /* SH2 code */
2808   ROM_LOAD( "epr18967.a",               0x0000000, 0x0100000, CRC(c0446674) SHA1(4917089d95613c9d2a936ed9fe3ebd22f461aa4f) )
2808   ROM_LOAD( "epr18967.a",               0x0000000, 0x0100000, CRC(ac59c186) SHA1(7d4924d1e4c1b9257b58a690de988b3f6486e86f) )
28092809   ROM_RELOAD ( 0x0100000, 0x0100000 )
28102810   ROM_RELOAD ( 0x0200000, 0x0100000 )
28112811   ROM_RELOAD ( 0x0300000, 0x0100000 )
src/mame/drivers/firefox.c
r3445r3446
134134static unsigned char *sprite_palette;
135135static const device_config *nvram_1c;
136136static const device_config *nvram_1d;
137static tilemap *bgtiles;
137138
138139static int control_num;
139140static UINT8 sound_to_main_flag;
r3445r3446
146147 *
147148 *************************************/
148149
150static TILE_GET_INFO( bgtile_get_info )
151{
152   SET_TILE_INFO(0, tileram[tile_index], 0, 0);
153}
154
155
156static WRITE8_HANDLER( tileram_w )
157{
158   tileram[offset] = data;
159   tilemap_mark_tile_dirty(bgtiles, offset);
160}
161
162
163static VIDEO_START( firefox )
164{
165   bgtiles = tilemap_create(bgtile_get_info, tilemap_scan_rows, 8,8, 64,64);
166   tilemap_set_transparent_pen(bgtiles, 0);
167   tilemap_set_scrolldy(bgtiles, video_screen_get_visible_area(machine->primary_screen)->min_y, 0);
168}
169
170
149171static VIDEO_UPDATE( firefox )
150172{
151   int x;
152   int y;
153173   int sprite;
154174   int gfxtop = video_screen_get_visible_area(screen)->min_y;
155175
156176   fillbitmap( bitmap, palette_get_color(screen->machine, 256), cliprect );
157177
158   for( y = 0; y < 64; y++ )
159   {
160      for( x = 0; x < 64; x++ )
161      {
162         drawgfx( bitmap, screen->machine->gfx[ 0 ], tileram[ x + ( y * 64 ) ], 0, 0, 0, x * 8, gfxtop + y * 8, cliprect, TRANSPARENCY_PEN, 0 );
163      }
164   }
165
166178   for( sprite = 0; sprite < 32; sprite++ )
167179   {
168180      UINT8 *sprite_data = spriteram + ( 0x200 * sprite_bank ) + ( sprite * 16 );
r3445r3446
176188
177189         for( row = 0; row < 8; row++ )
178190         {
179            int color = 2 * ( ( flags >> 2 ) & 0x03 );
191            int color = ( flags >> 2 ) & 0x03;
180192            int flipy = flags & 0x10;
181193            int flipx = flags & 0x20;
182194            int code = sprite_data[ 15 - row ] + ( 256 * ( ( flags >> 6 ) & 3 ) );
183195
184            drawgfx( bitmap, screen->machine->gfx[ 1 ], code, color, flipx, flipy, x + 16, gfxtop + 500 - y - ( row * 16 ), cliprect, TRANSPARENCY_PEN, 0 );
196            drawgfx( bitmap, screen->machine->gfx[ 1 ], code, color, flipx, flipy, x + 8, gfxtop + 500 - y - ( row * 16 ), cliprect, TRANSPARENCY_PEN, 0 );
185197         }
186198      }
187199   }
188200
201   tilemap_draw( bitmap, cliprect, bgtiles, 0, 0 );
202
189203   return 0;
190204}
191205
r3445r3446
425439static MACHINE_START( firefox )
426440{
427441   memory_configure_bank(1, 0, 32, memory_region(machine, "main") + 0x10000, 0x1000);
428   nvram_1c = device_list_find_by_tag(machine->config->devicelist, X2212, "nvram_1c");
429   nvram_1d = device_list_find_by_tag(machine->config->devicelist, X2212, "nvram_1d");
442   nvram_1c = devtag_get_device(machine, X2212, "nvram_1c");
443   nvram_1d = devtag_get_device(machine, X2212, "nvram_1d");
430444
431   laserdisc = device_list_find_by_tag(machine->config->devicelist, LASERDISC, "laserdisc");
445   laserdisc = devtag_get_device(machine, LASERDISC, "laserdisc");
432446   vp931_set_data_ready_callback(laserdisc, firq_gen);
433447
434448   control_num = 0;
r3445r3446
444458
445459static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 8)
446460   AM_RANGE(0x0000, 0x0fff) AM_RAM
447   AM_RANGE(0x1000, 0x1fff) AM_RAM AM_BASE(&tileram)
461   AM_RANGE(0x1000, 0x1fff) AM_RAM_WRITE(tileram_w) AM_BASE(&tileram)
448462   AM_RANGE(0x2000, 0x27ff) AM_RAM AM_BASE(&spriteram)
449463   AM_RANGE(0x2800, 0x2aff) AM_READWRITE(SMH_RAM, sprite_palette_w) AM_BASE(&sprite_palette)
450464   AM_RANGE(0x2b00, 0x2b00) AM_MIRROR(0x04ff) AM_WRITE(firefox_objram_bank_w)
r3445r3446
605619static const gfx_layout spritelayout =
606620{
607621   16,16,
608   RGN_FRAC(1,5),
609   5,
610   { RGN_FRAC(0,5), RGN_FRAC(1,5), RGN_FRAC(2,5), RGN_FRAC(3,5), RGN_FRAC(4,5) },
622   RGN_FRAC(1,6),
623   6,
624   { RGN_FRAC(0,6), RGN_FRAC(1,6), RGN_FRAC(2,6), RGN_FRAC(3,6), RGN_FRAC(4,6), RGN_FRAC(5,6) },
611625   { STEP16(0,1) },
612626   { STEP16(0,16) },
613627   32*8
614628};
615629
616630static GFXDECODE_START( firefox )
617   GFXDECODE_ENTRY("tiles",   0, tilelayout,   0,   16)
618   GFXDECODE_ENTRY("sprites", 0, spritelayout, 256, 32)
631   GFXDECODE_ENTRY("tiles",   0, tilelayout,   0,   1)
632   GFXDECODE_ENTRY("sprites", 0, spritelayout, 256, 4)
619633GFXDECODE_END
620634
621635
r3445r3446
658672   MDRV_GFXDECODE(firefox)
659673   MDRV_PALETTE_LENGTH(512)
660674
675   MDRV_VIDEO_START(firefox)
676
661677   MDRV_LASERDISC_ADD("laserdisc", PHILLIPS_22VP931, "main", "ldsound")
662678   MDRV_LASERDISC_OVERLAY(firefox, 64*8, 525, BITMAP_FORMAT_RGB32)
663679   MDRV_LASERDISC_OVERLAY_CLIP(7*8, 53*8-1, 44, 480+44)
r3445r3446
727743   ROM_REGION( 0x2000, "tiles", ROMREGION_DISPOSE )
728744   ROM_LOAD( "136026.125",     0x0000,  0x2000, CRC(8a32f9f1) SHA1(f899174f55cd4a24a3be4a0f4bb44d3e8e938586) ) /* 6p */
729745
730   ROM_REGION( 0x28000, "sprites", ROMREGION_DISPOSE )
746   ROM_REGION( 0x30000, "sprites", ROMREGION_DISPOSE | ROMREGION_ERASE00 )
731747   /* empty 6c */
732748   /* empty 6a */
733   ROM_LOAD( "136026.124",     0x00000,  0x4000, CRC(5efe0f6c) SHA1(df35fd9267d966ab379c2f78ed418f4606741b28)) /* 5c */
734   ROM_LOAD( "136026.123",     0x04000,  0x4000, CRC(dffe48b3) SHA1(559907651bb425e26a834b467959b15092d23d27)) /* 5a */
735   ROM_LOAD( "136026.118",     0x08000,  0x4000, CRC(0ed4df15) SHA1(7aa599f428112fff4bfedf63fafc22f19fa66546)) /* 4c */
736   ROM_LOAD( "136026.122",     0x0c000,  0x4000, CRC(8e2c6616) SHA1(59cbd585028bb634034a9dfd552275bd41f01989)) /* 4a */
737   ROM_LOAD( "136026.117",     0x10000,  0x4000, CRC(79129084) SHA1(4219ff7cd444ad11e4cb9f1c30ac15fe0cfc5a17)) /* 3c */
738   ROM_LOAD( "136026.121",     0x14000,  0x4000, CRC(494972d4) SHA1(fa0e24e911b233e9644d7794ba03f76bfd39aa8c)) /* 3a */
739   ROM_LOAD( "136026.116",     0x18000,  0x4000, CRC(d5282d4e) SHA1(de5fdf82a615625aa77b39e035b4206216faaf9c)) /* 2c */
740   ROM_LOAD( "136026.120",     0x1c000,  0x4000, CRC(e1b95923) SHA1(b6d0c0af0a8f55e728cd0f4c3222745eefd57f50)) /* 2a */
741   ROM_LOAD( "136026.115",     0x20000,  0x4000, CRC(861abc82) SHA1(1845888d07162ae915364a2a91294731f1c5b3bd)) /* 1c */
742   ROM_LOAD( "136026.119",     0x24000,  0x4000, CRC(959471b1) SHA1(a032209a209f51d34360d5c7ad32ec62150158d2)) /* 1a */
749   ROM_LOAD( "136026.124",     0x08000,  0x4000, CRC(5efe0f6c) SHA1(df35fd9267d966ab379c2f78ed418f4606741b28)) /* 5c */
750   ROM_LOAD( "136026.123",     0x0c000,  0x4000, CRC(dffe48b3) SHA1(559907651bb425e26a834b467959b15092d23d27)) /* 5a */
751   ROM_LOAD( "136026.118",     0x10000,  0x4000, CRC(0ed4df15) SHA1(7aa599f428112fff4bfedf63fafc22f19fa66546)) /* 4c */
752   ROM_LOAD( "136026.122",     0x14000,  0x4000, CRC(8e2c6616) SHA1(59cbd585028bb634034a9dfd552275bd41f01989)) /* 4a */
753   ROM_LOAD( "136026.117",     0x18000,  0x4000, CRC(79129084) SHA1(4219ff7cd444ad11e4cb9f1c30ac15fe0cfc5a17)) /* 3c */
754   ROM_LOAD( "136026.121",     0x1c000,  0x4000, CRC(494972d4) SHA1(fa0e24e911b233e9644d7794ba03f76bfd39aa8c)) /* 3a */
755   ROM_LOAD( "136026.116",     0x20000,  0x4000, CRC(d5282d4e) SHA1(de5fdf82a615625aa77b39e035b4206216faaf9c)) /* 2c */
756   ROM_LOAD( "136026.120",     0x24000,  0x4000, CRC(e1b95923) SHA1(b6d0c0af0a8f55e728cd0f4c3222745eefd57f50)) /* 2a */
757   ROM_LOAD( "136026.115",     0x28000,  0x4000, CRC(861abc82) SHA1(1845888d07162ae915364a2a91294731f1c5b3bd)) /* 1c */
758   ROM_LOAD( "136026.119",     0x2c000,  0x4000, CRC(959471b1) SHA1(a032209a209f51d34360d5c7ad32ec62150158d2)) /* 1a */
743759
744760   DISK_REGION( "laserdisc" )
745761   DISK_IMAGE_READONLY( "firefox", 0, NO_DUMP )
r3445r3446
767783   ROM_REGION( 0x2000, "tiles", ROMREGION_DISPOSE )
768784   ROM_LOAD( "136026.125",     0x0000,  0x2000, CRC(8a32f9f1) SHA1(f899174f55cd4a24a3be4a0f4bb44d3e8e938586) ) /* 6p */
769785
770   ROM_REGION( 0x28000, "sprites", ROMREGION_DISPOSE )
786   ROM_REGION( 0x30000, "sprites", ROMREGION_DISPOSE | ROMREGION_ERASE00 )
771787   /* empty 6c */
772788   /* empty 6a */
773   ROM_LOAD( "136026.124",     0x00000,  0x4000, CRC(5efe0f6c) SHA1(df35fd9267d966ab379c2f78ed418f4606741b28)) /* 5c */
774   ROM_LOAD( "136026.123",     0x04000,  0x4000, CRC(dffe48b3) SHA1(559907651bb425e26a834b467959b15092d23d27)) /* 5a */
775   ROM_LOAD( "136026.118",     0x08000,  0x4000, CRC(0ed4df15) SHA1(7aa599f428112fff4bfedf63fafc22f19fa66546)) /* 4c */
776   ROM_LOAD( "136026.122",     0x0c000,  0x4000, CRC(8e2c6616) SHA1(59cbd585028bb634034a9dfd552275bd41f01989)) /* 4a */
777   ROM_LOAD( "136026.117",     0x10000,  0x4000, CRC(79129084) SHA1(4219ff7cd444ad11e4cb9f1c30ac15fe0cfc5a17)) /* 3c */
778   ROM_LOAD( "136026.121",     0x14000,  0x4000, CRC(494972d4) SHA1(fa0e24e911b233e9644d7794ba03f76bfd39aa8c)) /* 3a */
779   ROM_LOAD( "136026.116",     0x18000,  0x4000, CRC(d5282d4e) SHA1(de5fdf82a615625aa77b39e035b4206216faaf9c)) /* 2c */
780   ROM_LOAD( "136026.120",     0x1c000,  0x4000, CRC(e1b95923) SHA1(b6d0c0af0a8f55e728cd0f4c3222745eefd57f50)) /* 2a */
781   ROM_LOAD( "136026.115",     0x20000,  0x4000, CRC(861abc82) SHA1(1845888d07162ae915364a2a91294731f1c5b3bd)) /* 1c */
782   ROM_LOAD( "136026.119",     0x24000,  0x4000, CRC(959471b1) SHA1(a032209a209f51d34360d5c7ad32ec62150158d2)) /* 1a */
789   ROM_LOAD( "136026.124",     0x08000,  0x4000, CRC(5efe0f6c) SHA1(df35fd9267d966ab379c2f78ed418f4606741b28)) /* 5c */
790   ROM_LOAD( "136026.123",     0x0c000,  0x4000, CRC(dffe48b3) SHA1(559907651bb425e26a834b467959b15092d23d27)) /* 5a */
791   ROM_LOAD( "136026.118",     0x10000,  0x4000, CRC(0ed4df15) SHA1(7aa599f428112fff4bfedf63fafc22f19fa66546)) /* 4c */
792   ROM_LOAD( "136026.122",     0x14000,  0x4000, CRC(8e2c6616) SHA1(59cbd585028bb634034a9dfd552275bd41f01989)) /* 4a */
793   ROM_LOAD( "136026.117",     0x18000,  0x4000, CRC(79129084) SHA1(4219ff7cd444ad11e4cb9f1c30ac15fe0cfc5a17)) /* 3c */
794   ROM_LOAD( "136026.121",     0x1c000,  0x4000, CRC(494972d4) SHA1(fa0e24e911b233e9644d7794ba03f76bfd39aa8c)) /* 3a */
795   ROM_LOAD( "136026.116",     0x20000,  0x4000, CRC(d5282d4e) SHA1(de5fdf82a615625aa77b39e035b4206216faaf9c)) /* 2c */
796   ROM_LOAD( "136026.120",     0x24000,  0x4000, CRC(e1b95923) SHA1(b6d0c0af0a8f55e728cd0f4c3222745eefd57f50)) /* 2a */
797   ROM_LOAD( "136026.115",     0x28000,  0x4000, CRC(861abc82) SHA1(1845888d07162ae915364a2a91294731f1c5b3bd)) /* 1c */
798   ROM_LOAD( "136026.119",     0x2c000,  0x4000, CRC(959471b1) SHA1(a032209a209f51d34360d5c7ad32ec62150158d2)) /* 1a */
783799
784800   DISK_REGION( "laserdisc" )
785801   DISK_IMAGE_READONLY( "firefox", 0, NO_DUMP )
src/mame/drivers/vigilant.c
r3445r3446
534534   MDRV_CPU_IO_MAP(vigilant_io_map,0)
535535   MDRV_CPU_VBLANK_INT("main", irq0_line_hold)
536536
537   MDRV_CPU_ADD("audio", Z80, 3579645)         /* 3.579645 MHz */
537   MDRV_CPU_ADD("sound", Z80, 3579645)         /* 3.579645 MHz */
538538   MDRV_CPU_PROGRAM_MAP(sound_map,0)
539539   MDRV_CPU_IO_MAP(sound_io_map,0)
540540   MDRV_CPU_VBLANK_INT_HACK(nmi_line_pulse,128)   /* clocked by V1 */
r3445r3446
577577   MDRV_CPU_IO_MAP(vigilant_io_map,0)
578578   MDRV_CPU_VBLANK_INT("main", irq0_line_hold)
579579
580   MDRV_CPU_ADD("audio", Z80, 18432000/6)         /* 3.072000 MHz */
580   MDRV_CPU_ADD("sound", Z80, 18432000/6)         /* 3.072000 MHz */
581581   MDRV_CPU_PROGRAM_MAP(sound_map,0)
582582   MDRV_CPU_IO_MAP(buccanrs_sound_io_map,0)
583583   MDRV_CPU_VBLANK_INT_HACK(nmi_line_pulse,128)   /* clocked by V1 */
r3445r3446
636636   MDRV_CPU_IO_MAP(kikcubic_io_map,0)
637637   MDRV_CPU_VBLANK_INT("main", irq0_line_hold)
638638
639   MDRV_CPU_ADD("audio", Z80, 3579645)         /* 3.579645 MHz */
639   MDRV_CPU_ADD("sound", Z80, 3579645)         /* 3.579645 MHz */
640640   MDRV_CPU_PROGRAM_MAP(sound_map,0)
641641   MDRV_CPU_IO_MAP(sound_io_map,0)
642642   MDRV_CPU_VBLANK_INT_HACK(nmi_line_pulse,128)   /* clocked by V1 */
r3445r3446
685685   ROM_LOAD( "j07_c04.bin",  0x10000, 0x10000, CRC(e0159105) SHA1(da6d74ec075863c67c0ce21b07a54029d138f688) )
686686   /* 0x20000-0x2ffff empty */
687687
688   ROM_REGION( 0x10000, "audio", 0 ) /* 64k for sound */
688   ROM_REGION( 0x10000, "sound", 0 ) /* 64k for sound */
689689   ROM_LOAD( "g05_c02.bin",  0x00000, 0x10000, CRC(10582b2d) SHA1(6e7e5f07c49b347b427572efeb180c89f49bf2c7) )
690690
691691   ROM_REGION( 0x20000, "gfx1", ROMREGION_DISPOSE )
r3445r3446
722722   ROM_LOAD( "a-8l",  0x10000, 0x10000, CRC(7f95799b) SHA1(a371671c3c26976314aaac4e410bff0f13a8a085) )
723723   /* 0x20000-0x2ffff empty */
724724
725   ROM_REGION( 0x10000, "audio", 0 ) /* 64k for sound */
725   ROM_REGION( 0x10000, "sound", 0 ) /* 64k for sound */
726726   ROM_LOAD( "g05_c02.bin",  0x00000, 0x10000, CRC(10582b2d) SHA1(6e7e5f07c49b347b427572efeb180c89f49bf2c7) )
727727
728728   ROM_REGION( 0x20000, "gfx1", ROMREGION_DISPOSE )
r3445r3446
759759   ROM_LOAD( "vg_a-8l.rom",  0x10000, 0x10000, CRC(3b12b1d8) SHA1(2f9207f8d8ec41ea1b8f5bf3c69a97d1d09f6c3f) )
760760   /* 0x20000-0x2ffff empty */
761761
762   ROM_REGION( 0x10000, "audio", 0 ) /* 64k for sound */
762   ROM_REGION( 0x10000, "sound", 0 ) /* 64k for sound */
763763   ROM_LOAD( "g05_c02.bin",  0x00000, 0x10000, CRC(10582b2d) SHA1(6e7e5f07c49b347b427572efeb180c89f49bf2c7) )
764764
765765   ROM_REGION( 0x20000, "gfx1", ROMREGION_DISPOSE )
r3445r3446
796796   ROM_LOAD( "mqj-b0",       0x10000, 0x10000, CRC(d9bcf4cd) SHA1(f1f1cb8609343dae8637f115e5c96fd88a00f5eb) )
797797   ROM_LOAD( "mqj-b1",       0x20000, 0x10000, CRC(54a0abe1) SHA1(0fb1d050c1e299394609214c903bcf4cf11329ff) )
798798
799   ROM_REGION( 0x10000, "audio", 0 ) /* 64k for sound */
799   ROM_REGION( 0x10000, "sound", 0 ) /* 64k for sound */
800800   ROM_LOAD( "mqj-sp",       0x00000, 0x10000, CRC(bbcf3582) SHA1(4a5b9d4161b26e3ca400573fa78268893e42d5db) )
801801
802802   ROM_REGION( 0x20000, "gfx1", ROMREGION_DISPOSE )
r3445r3446
823823   ROM_LOAD( "5.bin",        0x20000, 0x08000, CRC(a5a6bffd) SHA1(372452c8c9b2c65307434af19eddcb60e7cd0fa3) )
824824   ROM_RELOAD(              0x28000, 0x08000 )
825825
826   ROM_REGION( 0x10000, "audio", 0 ) /* 64k for sound */
826   ROM_REGION( 0x10000, "sound", 0 ) /* 64k for sound */
827827   ROM_LOAD( "mqj-sp",       0x00000, 0x10000, CRC(bbcf3582) SHA1(4a5b9d4161b26e3ca400573fa78268893e42d5db) ) /* 2.bin */
828828
829829   ROM_REGION( 0x20000, "gfx1", ROMREGION_DISPOSE )
r3445r3446
854854   ROM_LOAD( "11.u58",  0x00000, 0x10000, CRC(bf1d7e6f) SHA1(55dcf993515b57c3eb1fab98097a2171df3e38ed) ) // both halves are identical (correct for rom type on this board tho)
855855   ROM_LOAD( "12.u25",  0x10000, 0x10000, CRC(87303ba8) SHA1(49a25393e853b9adf7df00a6f9c38a526a02ea4e) )
856856
857   ROM_REGION( 0x10000, "audio", 0 ) /* 64k for sound */
857   ROM_REGION( 0x10000, "sound", 0 ) /* 64k for sound */
858858   ROM_LOAD( "1.u128",  0x00000, 0x10000, CRC(eb65f8c3) SHA1(82566becb630ce92303905dc0c5bef9e80e9caad) )
859859
860860   ROM_REGION( 0x20000, "gfx1", ROMREGION_DISPOSE )
r3445r3446
893893   ROM_LOAD( "bc-011",  0x00000, 0x08000, CRC(6b657ef1) SHA1(a3356654d4b04177af23b39e924cc5ad64930bb6) )
894894   ROM_LOAD( "12.u25",  0x10000, 0x10000, CRC(87303ba8) SHA1(49a25393e853b9adf7df00a6f9c38a526a02ea4e) ) // not from this set, hopefully its only a data rom
895895
896   ROM_REGION( 0x10000, "audio", 0 ) /* 64k for sound */
896   ROM_REGION( 0x10000, "sound", 0 ) /* 64k for sound */
897897   ROM_LOAD( "1.u128",  0x00000, 0x10000, CRC(eb65f8c3) SHA1(82566becb630ce92303905dc0c5bef9e80e9caad) )
898898
899899   ROM_REGION( 0x20000, "gfx1", ROMREGION_DISPOSE )
src/mame/drivers/jalmah.c
r3445r3446
11/*******************************************************************************************
22
3MJ-8956 HW games (c) 1989 Jaleco / NMK
3MJ-8956 HW games (c) 1989 Jaleco / NMK / UPL
44
55driver by Angelo Salese, based on early work by David Haywood
66
7Similar to the NMK16 board,but without sprites.
7Similar to the NMK16 board but without sprites.
88
99Notes(general):
1010-I think that the 0xf0000-0xfffff area is shared with the MCU because:
1111\-The first version of the MCU programs (daireika/mjzoomin) jump in that area.
1212  Then the MCU upload a 68k code;the programs are likely to be the same for all the games,
1313  for example if the program jumps to $f0020 it means a sample request.
14\-input ports located there.Program doesn't check these locations at P.O.S.T. and doesn't
14\-Input ports located there.Program doesn't check these locations at P.O.S.T. and doesn't
1515  give any work ram error.
1616\-Additionally all the games have a MCU protection which involves various RAM areas,
1717  that controls mahjong panel inputs.Protection is simulated by
1818  adding a value to these RAM areas according to what button is pressed.
1919
20TODO:
2021-Understand what are RANGE registers for.They seems to be related to the scroll
21 registers.
22-In all the games there are square gaps during gameplay.
22 registers;
23-In all the games there are square gaps during gameplay,maybe we can call a simple fillbitmap and
24 remove the jalmah_tilemap_draw custom code;
2325-Fix kakumei2 GFX3 rom region,maybe bad dump (half length)?
24-Fully understand priorities...
25-Fix daireika/urashima GFX rom loading.
26-Fix the dip-switches in the first version of this board.
27-There could be timing issues caused by MCU simulation at $80004.
28-daireika/kakumei2 have problems with the tx layer vertical scrolling during the attract
29 mode, likely to be a paging issue...
26-Fully understand priorities,chances are that it just uses a mix between the priority
27 number and 1+ prom(s);
28-Fix daireika GFX rom loading and check if urashima has a "mode 3" for the layer 0
29 tilemap;
30-Complete the dip-switches in the first version of this board;
31-There could be timing issues caused by MCU simulation at $80004;
32-daireika/kakumei2/urashima have problems with the tx layer vertical scrolling during the attract
33 mode, likely to be a paging issue;
34-Fix the sound banking in the first version of the MCU.A bank issue?
35-urashima might use three layers instead of two or it's all mirrored.It can be checked when you win
36 a match in particular circumstances because there's a write in a unmapped region;
37-Massive clean-ups needed for the MCU snippet programs;
3038
3139Notes (1st MCU ver.):
3240-$f000e is bogus,maybe the program snippets can modify this value,or the MCU itself can
3341 do that,returning the contents of D0 register seems enough for now...
3442 Update: Improved it for the new mcu simulation,now it pulls all the values from 0x00 to
35 0x0f,it seems
43 0x0f,it seems to be a MCU call snippet for the $f0000 work ram;
3644-$f030e is a mirror for $f000e in urashima.
37-Why urashima A0/7 registers parameters seems to have wrong source/destination addresses
38 during MCU operations?Different HW?
3945-I need more space for MCU code...that's why I've used an extra jmp when entering
4046 into mcu code,so we can debug the first version freely without being teased about
41 memory space...
47 memory space.
4248 BTW,the real HW is using a sort of bankswitch or I'm missing something?
4349-$f0020 is for the sound program,same for all games,for example mjzoomin hasn't any clear
4450 write to $80040 area and the program jumps to $f0020 when there should be a sample.
45-urashima scroll registers aren't used at all.Investigate on it...
46-mjzoomin controls during the gameplay don't react as expected,something to do
47 with the protection(it probably reads a button pressed).
4851
4952============================================================================================
5053Debug cheats:
r3445r3446
194197   tilemap_set_transparent_pen(sc3_tilemap,15);
195198}
196199
200/*two tilemaps instead of four*/
201static VIDEO_START( urashima )
202{
203   sc0_tilemap = tilemap_create(get_sc0_tile_info,bg_scan,16,16,256,32);
204//  sc1_tilemap = tilemap_create(get_sc1_tile_info,bg_scan,TILEMAP_TRANSPARENT,16,16,256,32);
205//  sc2_tilemap = tilemap_create(get_sc2_tile_info,bg_scan,TILEMAP_TRANSPARENT,16,16,256,32);
206   sc3_tilemap = tilemap_create(get_sc3_tile_info,tilemap_scan_cols,8,8,256,32);
207
208   jm_scrollram = auto_malloc(0x80);
209   jm_vregs = auto_malloc(0x40);
210
211   tilemap_set_transparent_pen(sc0_tilemap,15);
212//  tilemap_set_transparent_pen(sc1_tilemap,15);
213//  tilemap_set_transparent_pen(sc2_tilemap,15);
214   tilemap_set_transparent_pen(sc3_tilemap,15);
215}
216
197217#define MCU_READ(tag, _bit_, _offset_, _retval_) \
198218if((0xffff - input_port_read(machine, tag)) & _bit_) { jm_regs[_offset_] = _retval_; }
199219
r3445r3446
236256      MCU_READ("KEY1", 0x0002, 0x000/2, 0x13);      /*CHI   (trusted)*/
237257      MCU_READ("KEY0", 0x0004, 0x000/2, 0x14);      /*START1*/
238258   }
239   jm_regs[0x00c/2] = mame_rand(machine) & 0xffff;
259   if(MJZOOMIN_MCU)
260      jm_regs[0x00c/2] = mame_rand(machine) & 0xffff;
240261   prg_prot++;
241262   if(prg_prot > 0x10) { prg_prot = 0; }
242263   jm_regs[0x00e/2] = prg_prot;
r3445r3446
337358   static UINT8 sc_db;
338359   #endif
339360
340   switch(mcu_prg)
341   {
342      /*
343        #define DAIREIKA_MCU (0x11)
344        #define URASHIMA_MCU (0x12)
345        #define MJZOOMIN_MCU (0x13)
346        #define KAKUMEI_MCU  (0x21)
347        #define KAKUMEI2_MCU (0x22)
348        #define SUCHIPI_MCU  (0x23)
349        */
350      case MJZOOMIN_MCU:
351      case DAIREIKA_MCU: daireika_mcu_run(screen->machine); break;
352      case URASHIMA_MCU: urashima_mcu_run(screen->machine); break;
353      case KAKUMEI_MCU:
354      case KAKUMEI2_MCU:
355      case SUCHIPI_MCU:  second_mcu_run(screen->machine); break;
356   }
357361   tilemap_set_scrollx( sc0_tilemap, 0, jm_scrollram[0] + ((jm_vregs[0] & 3) ? ((jm_scrollram[4] & 0x200) * 4) : 0));
358362   tilemap_set_scrollx( sc1_tilemap, 0, jm_scrollram[1] + ((jm_vregs[1] & 3) ? ((jm_scrollram[5] & 0x200) * 4) : 0));
359363   tilemap_set_scrollx( sc2_tilemap, 0, jm_scrollram[2] + ((jm_vregs[2] & 3) ? ((jm_scrollram[6] & 0x200) * 4) : 0));
r3445r3446
409413   return 0;
410414}
411415
416VIDEO_UPDATE( urashima )
417{
418   int opaque = 0;
412419
420   /*this game doesn't use the RANGE register at all.*/
421   tilemap_set_scrollx( sc0_tilemap, 0, jm_scrollram[0]);
422   tilemap_set_scrollx( sc3_tilemap, 0, jm_scrollram[3]);
423   tilemap_set_scrolly( sc0_tilemap, 0, jm_scrollram[4] & 0x1ff);
424   tilemap_set_scrolly( sc3_tilemap, 0, jm_scrollram[7] & 0x1ff);
425
426   fillbitmap(bitmap, Machine->pens[0], cliprect);
427   if(jm_vregs[0] & 1) { jalmah_tilemap_draw(sc0_tilemap); }
428    if(jm_vregs[3] & 1) { jalmah_tilemap_draw(sc3_tilemap); }
429   return 0;
430}
431
432static VIDEO_EOF( jalmah )
433{
434   switch(mcu_prg)
435   {
436      /*
437            #define DAIREIKA_MCU (0x11)
438            #define URASHIMA_MCU (0x12)
439            #define MJZOOMIN_MCU (0x13)
440            #define KAKUMEI_MCU  (0x21)
441            #define KAKUMEI2_MCU (0x22)
442            #define SUCHIPI_MCU  (0x23)
443        */
444         case MJZOOMIN_MCU:
445         case DAIREIKA_MCU: daireika_mcu_run(machine); break;
446         case URASHIMA_MCU: urashima_mcu_run(machine); break;
447         case KAKUMEI_MCU:
448         case KAKUMEI2_MCU:
449         case SUCHIPI_MCU:  second_mcu_run(machine); break;
450   }
451}
452
413453static WRITE16_HANDLER( sc0_vram_w )
414454{
415455   COMBINE_DATA(&sc0_vram[offset]);
r3445r3446
487527   }
488528}
489529
530/*Urashima Mahjong uses a bigger (and mostly unused/wasted) video register ram.*/
531static WRITE16_HANDLER( urashima_sc0vregs_w )
532{
533   //logerror("[%04x]<-%04x\n",(offset+0x10)*2,data);
534   switch(offset)
535   {
536      //case 0: break;
537      /*---- ---x plane enable*/
538      case 1: jm_vregs[0] = data; break; /*plane enable*/
539      case 2: jm_scrollram[0] = data; break;
540      case 3: break;
541   }
542}
543
544static WRITE16_HANDLER( urashima_sc3vregs_w )
545{
546   //logerror("[%04x]<-%04x\n",(offset+0x10)*2,data);
547   switch(offset)
548   {
549      /*---- ---x plane enable*/
550      //case 0:
551      case 1: jm_vregs[3] = data; break;
552      case 2: jm_scrollram[7] = data; break;
553      case 3: jm_scrollram[3] = data; break;
554   }
555}
556
490557static UINT8 oki_rom,oki_bank;
491558
492559static WRITE16_HANDLER( jalmah_okirom_w )
r3445r3446
498565      memcpy(&oki[0x20000], &oki[(oki_rom * 0x80000) + (oki_bank * 0x20000) + 0x40000], 0x20000);
499566   }
500567
501   /*No game can use this,and btw what "ZA" stands for?*/
568   /*what "ZA" stands for? Used by Kakumei 2.*/
502569   if(data & 2)
503570      mame_printf_debug("ZA = 2\n");
504571}
r3445r3446
521588//  popmessage("%04x",data);
522589}
523590
591/*Funky "DMA" / protection thing*/
592/*---- -x-- "DMA" execute.*/
593/*---- ---x used too very often,I don't have any clue of what it is,it might just be the source or the destination address.*/
594WRITE16_HANDLER( urashima_dma_w )
595{
596   if(data & 4)
597   {
598      UINT32 i;
599      for(i=0;i<0x200;i+=2)
600         program_write_word(0x88200+i,program_read_word(0x88400+i));
601   }
602}
603
604WRITE16_HANDLER( urashima_bank_w )
605{
606   if (ACCESSING_BITS_0_7)
607   {
608      if (sc0bank != (data & 0x0f))
609      {
610         sc0bank = (data & 0x0f);
611         tilemap_mark_all_tiles_dirty(sc0_tilemap);
612      }
613   }
614}
615
524616static ADDRESS_MAP_START( jalmah, ADDRESS_SPACE_PROGRAM, 16 )
525617   AM_RANGE(0x000000, 0x07ffff) AM_ROM
526618   AM_RANGE(0x080000, 0x080001) AM_READ_PORT("SYSTEM")
r3445r3446
532624/**/AM_RANGE(0x080016, 0x080017) AM_READ(SMH_RAM) AM_WRITE(jalmah_tilebank_w)
533625   AM_RANGE(0x080018, 0x080019) AM_WRITE(jalmah_okibank_w)
534626   AM_RANGE(0x08001a, 0x08001b) AM_WRITE(jalmah_okirom_w)
535   //       0x08001c, 0x08001d  write 1 by urashima (?)
536627/**/AM_RANGE(0x080020, 0x08003f) AM_READ(SMH_RAM) AM_WRITE(jalmah_scroll_w)
537628   AM_RANGE(0x080040, 0x080041) AM_READWRITE(okim6295_status_0_lsb_r, okim6295_data_0_lsb_w)
538629   //       0x084000, 0x084001  ?
r3445r3446
541632   AM_RANGE(0x094000, 0x097fff) AM_RAM_WRITE(sc1_vram_w) AM_BASE(&sc1_vram)
542633   AM_RANGE(0x098000, 0x09bfff) AM_RAM_WRITE(sc2_vram_w) AM_BASE(&sc2_vram)
543634   AM_RANGE(0x09c000, 0x09ffff) AM_RAM_WRITE(sc3_vram_w) AM_BASE(&sc3_vram)
544   AM_RANGE(0x0a0000, 0x0a3fff) AM_RAM_WRITE(sc3_vram_w) /*urashima mirror*/
545635   AM_RANGE(0x0f0000, 0x0f0fff) AM_RAM AM_BASE(&jm_regs)/*shared with MCU*/
546636   AM_RANGE(0x0f1000, 0x0fffff) AM_RAM AM_BASE(&jm_ram)
547637   AM_RANGE(0x100000, 0x10ffff) AM_RAM AM_BASE(&jm_mcu_code)/*extra RAM for MCU code prg (NOT ON REAL HW!!!)*/
548638ADDRESS_MAP_END
549639
640static ADDRESS_MAP_START( urashima, ADDRESS_SPACE_PROGRAM, 16 )
641   AM_RANGE(0x000000, 0x07ffff) AM_ROM
642   AM_RANGE(0x080000, 0x080001) AM_READ(input_port_0_word_r)
643   AM_RANGE(0x080002, 0x080003) AM_READ(input_port_1_word_r)
644   //       0x080004, 0x080005  MCU read,different for each game
645   AM_RANGE(0x080010, 0x080011) AM_WRITE(jalmah_flip_screen_w)
646   //       0x080012, 0x080013  MCU write related,same for each game
647   //       0x080014, 0x080015  MCU write related,same for each game
648/**/AM_RANGE(0x080016, 0x080017) AM_READ(SMH_RAM) AM_WRITE(urashima_dma_w)
649   AM_RANGE(0x080018, 0x080019) AM_WRITE(jalmah_okibank_w)
650   AM_RANGE(0x08001a, 0x08001b) AM_WRITE(jalmah_okirom_w)
651/**/AM_RANGE(0x08001c, 0x08001d) AM_READ(SMH_RAM) AM_WRITE(urashima_bank_w)
652   AM_RANGE(0x080040, 0x080041) AM_READWRITE(okim6295_status_0_lsb_r, okim6295_data_0_lsb_w)
653   //       0x084000, 0x084001  ?
654   AM_RANGE(0x088000, 0x0887ff) AM_RAM_WRITE(paletteram16_RRRRGGGGBBBBRGBx_word_w) AM_BASE(&paletteram16) /* Palette RAM */
655   AM_RANGE(0x090000, 0x09bfff) AM_RAM_WRITE(sc0_vram_w) AM_BASE(&sc0_vram)
656//  AM_RANGE(0x094000, 0x097fff) AM_RAM_WRITE(sc0_vram_w)
657//  AM_RANGE(0x098000, 0x09bfff) AM_RAM_WRITE(sc0_vram_w)
658//  AM_RANGE(0x094000, 0x097fff) AM_RAM_WRITE(sc1_vram_w) AM_BASE(&sc1_vram)/*unused*/
659//  AM_RANGE(0x098000, 0x09bfff) AM_RAM_WRITE(sc2_vram_w) AM_BASE(&sc2_vram)/*unused*/
660   /*$9c000-$9cfff Video Registers*/
661/**/AM_RANGE(0x09c080, 0x09c09f) AM_READ(SMH_RAM) AM_WRITE(urashima_sc0vregs_w)
662/**///AM_RANGE(0x09c480, 0x09c49f) AM_READ(SMH_RAM) AM_WRITE(urashima_sc2vregs_w)
663/**/AM_RANGE(0x09c880, 0x09c89f) AM_READ(SMH_RAM) AM_WRITE(urashima_sc3vregs_w)
664   AM_RANGE(0x09e000, 0x0a1fff) AM_RAM_WRITE(sc3_vram_w) AM_BASE(&sc3_vram)
665   AM_RANGE(0x0f0000, 0x0f0fff) AM_RAM AM_BASE(&jm_regs)/*shared with MCU*/
666   AM_RANGE(0x0f1000, 0x0fffff) AM_RAM AM_BASE(&jm_ram)
667   AM_RANGE(0x100000, 0x10ffff) AM_RAM AM_BASE(&jm_mcu_code)/*extra RAM for MCU code prg (NOT ON REAL HW!!!)*/
668ADDRESS_MAP_END
550669
551670static INPUT_PORTS_START( common )
552671   PORT_START("SYSTEM")
r3445r3446
806925   GFXDECODE_ENTRY( "gfx4", 0, tilelayout, 0x000, 16 )
807926GFXDECODE_END
808927
809static MACHINE_RESET (daireika)
928/*different color offsets*/
929static GFXDECODE_START( urashima )
930   GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0x000, 16 )
931   GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 0x300, 16 )
932   GFXDECODE_ENTRY( "gfx3", 0, tilelayout, 0x200, 16 )
933   GFXDECODE_ENTRY( "gfx4", 0, tilelayout, 0x100, 16 )
934GFXDECODE_END
935
936static MACHINE_RESET ( jalmah )
810937{
811938   respcount = 0;
812939}
r3445r3446
816943   MDRV_CPU_PROGRAM_MAP(jalmah,0)
817944   MDRV_CPU_VBLANK_INT("main", irq2_line_hold)
818945
946   //M50747 MCU
947
819948   MDRV_GFXDECODE(jalmah)
820949
821
822950   MDRV_SCREEN_ADD("main", RASTER)
823951   MDRV_SCREEN_REFRESH_RATE(60)
824952   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
r3445r3446
827955   MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
828956
829957   MDRV_PALETTE_LENGTH(0x400)
830   MDRV_MACHINE_RESET(daireika)
958   MDRV_MACHINE_RESET(jalmah)
831959
832960   MDRV_VIDEO_START(jalmah)
833961   MDRV_VIDEO_UPDATE(jalmah)
962   MDRV_VIDEO_EOF(jalmah)
834963
835964   MDRV_SPEAKER_STANDARD_MONO("mono")
836965
r3445r3446
839968   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
840969MACHINE_DRIVER_END
841970
971static MACHINE_DRIVER_START( urashima )
972   MDRV_IMPORT_FROM(jalmah)
973
974   MDRV_CPU_MODIFY("main")
975   MDRV_CPU_PROGRAM_MAP(urashima,0)
976
977   MDRV_GFXDECODE(urashima)
978
979   MDRV_VIDEO_START(urashima)
980   MDRV_VIDEO_UPDATE(urashima)
981MACHINE_DRIVER_END
982
842983/*
843984
844985Urashima Mahjong
r3445r3446
8611002   ROM_LOAD( "um-5.22j",      0x000000, 0x020000, CRC(991776a2) SHA1(56740553d7d26aaeb9bec8557727030950bb01f7) )   /* 8x8 tiles */
8621003
8631004   ROM_REGION( 0x080000, "gfx2", ROMREGION_DISPOSE ) /* 16x16 Tiles */
1005   ROM_LOAD( "um-6.2l",   0x000000, 0x080000, CRC(076be5b5) SHA1(77444025f149a960137d3c79abecf9b30defa341) )
8641006
8651007   ROM_REGION( 0x080000, "gfx3", ROMREGION_DISPOSE )
1008   ROM_LOAD( "um-7.4l",    0x000000, 0x080000, CRC(d2a68cfb) SHA1(eb6cb1fad306b697b2035a31ad48e8996722a032) )
8661009
867   ROM_REGION( 0x100000, "gfx4", ROMREGION_DISPOSE ) /* BG3 */
868   ROM_LOAD( "um-6.2l",   0x000000, 0x080000, CRC(076be5b5) SHA1(77444025f149a960137d3c79abecf9b30defa341) )
869   ROM_LOAD( "um-7.4l",    0x080000, 0x080000, CRC(d2a68cfb) SHA1(eb6cb1fad306b697b2035a31ad48e8996722a032) )
1010   ROM_REGION( 0x200000, "gfx4", ROMREGION_DISPOSE ) /* BG3 */
1011   /*0*/
1012   ROM_COPY( "gfx2" , 0x000000, 0x000000, 0x40000 )
1013   ROM_COPY( "gfx2",  0x040000, 0x040000, 0x40000 )
1014   /*1*/
1015   ROM_COPY( "gfx2",  0x000000, 0x080000, 0x40000 )
1016   ROM_COPY( "gfx3",  0x000000, 0x0c0000, 0x40000 )
1017   /*2*/
1018   ROM_COPY( "gfx2",  0x000000, 0x100000, 0x40000 )
1019   ROM_COPY( "gfx3",  0x040000, 0x140000, 0x40000 )
8701020
8711021   ROM_REGION( 0x0240, "user1", 0 )
8721022   ROM_LOAD( "um-10.2b",      0x0000, 0x0100, CRC(cfdbb86c) SHA1(588822f6308a860937349c9106c2b4b1a75823ec) )   /* unknown */
r3445r3446
11721322      jm_regs[0x03d0/2] = 0x4ef9;
11731323      jm_regs[0x03d2/2] = 0x0010;
11741324      jm_regs[0x03d4/2] = 0x0000;//jmp $100000
1175      jm_mcu_code[0x0000/2] = 0x33fc;
1176      jm_mcu_code[0x0002/2] = 0x0400;
1177      jm_mcu_code[0x0004/2] = 0x0008;
1178      jm_mcu_code[0x0006/2] = 0x0038;
1325      jm_mcu_code[0x0000/2] = 0x4E71;//0x33fc;//CAREFUL!!!
1326      jm_mcu_code[0x0002/2] = 0x4E71;//0x0400;
1327      jm_mcu_code[0x0004/2] = 0x4E71;//0x0008;
1328      jm_mcu_code[0x0006/2] = 0x4E71;//0x0038;
11791329      /*priority = 5(Something that shows the text layer,to be checked after that the priority works )*/
11801330      jm_mcu_code[0x0008/2] = 0x33fc;
11811331      jm_mcu_code[0x000a/2] = 0x0005;
r3445r3446
12061356      jm_regs[0x03c0/2] = 0x4ef9;
12071357      jm_regs[0x03c2/2] = 0x0010;
12081358      jm_regs[0x03c4/2] = 0x1000;//jmp $101000
1209      /*
1210        palette additional protection:
1211        A1:88200 = x:88000
1212        A1:88000 = x:88600
1213        TODO: optimize this...
1214        */
1215      jm_mcu_code[0x1000/2] = 0x92fc;
1216      jm_mcu_code[0x1002/2] = 0x0200;//suba.w $200,A1
1359
1360
1361      jm_mcu_code[0x1000/2] = 0x4e71;//0x92fc;
1362      jm_mcu_code[0x1002/2] = 0x4e71;//0x0200;//suba.w $200,A1
12171363      jm_mcu_code[0x1004/2] = 0xb3fc;
12181364      jm_mcu_code[0x1006/2] = 0x0008;
1219      jm_mcu_code[0x1008/2] = 0x8000;
1220      jm_mcu_code[0x100a/2] = 0x6d00;
1221      jm_mcu_code[0x100c/2] = 0x003c;
1222      jm_mcu_code[0x100e/2] = 0x33c2;
1223      jm_mcu_code[0x1010/2] = 0x0010;
1224      jm_mcu_code[0x1012/2] = 0x17fe; //move.w D2,$1017fe
1225      jm_mcu_code[0x1014/2] = 0x33c1;
1226      jm_mcu_code[0x1016/2] = 0x0010;
1227      jm_mcu_code[0x1018/2] = 0x17fc; //move.w D1,$1017fc
1365      jm_mcu_code[0x1008/2] = 0x8200;
1366      jm_mcu_code[0x100a/2] = 0x673c;//beq :x//0x6d00;
1367      jm_mcu_code[0x100c/2] = 0x4e71;//nop//0x003c;
1368      jm_mcu_code[0x100e/2] = 0x33c2;      jm_mcu_code[0x1010/2] = 0x0010;      jm_mcu_code[0x1012/2] = 0x17fe; //move.w D2,$1017fe
1369      jm_mcu_code[0x1014/2] = 0x33c1;      jm_mcu_code[0x1016/2] = 0x0010;      jm_mcu_code[0x1018/2] = 0x17fc; //move.w D1,$1017fc
12281370      jm_mcu_code[0x101a/2] = 0x720f;
12291371      jm_mcu_code[0x101c/2] = 0x740f; //moveq $07,D2
12301372      jm_mcu_code[0x101e/2] = 0x23c8;
r3445r3446
12481390      jm_mcu_code[0x1042/2] = 0x0010;
12491391      jm_mcu_code[0x1044/2] = 0x17fc;
12501392      jm_mcu_code[0x1046/2] = 0x4e75;
1251      jm_mcu_code[0x1048/2] = 0xd2fc;
1252      jm_mcu_code[0x104a/2] = 0x0800;
1253      jm_mcu_code[0x104c/2] = 0x6000;
1254      jm_mcu_code[0x104e/2] = 0xffc0;
1393
1394      jm_mcu_code[0x1048/2] = 0x23CD;
1395      jm_mcu_code[0x104a/2] = 0x0010;
1396      jm_mcu_code[0x104c/2] = 0x17C0;
1397      jm_mcu_code[0x104e/2] = 0x2A7C;
1398      jm_mcu_code[0x1050/2] = 0x0010;
1399      jm_mcu_code[0x1052/2] = 0x17E0;
1400      jm_mcu_code[0x1054/2] = 0x33C6;
1401      jm_mcu_code[0x1056/2] = 0x0010;
1402       jm_mcu_code[0x1058/2] = 0x17B0;
1403       jm_mcu_code[0x105a/2] = 0x3C39;
1404       jm_mcu_code[0x105c/2] = 0x000F;
1405       jm_mcu_code[0x105e/2] = 0x201A;
1406       jm_mcu_code[0x1060/2] = 0x3A86;
1407       jm_mcu_code[0x1062/2] = 0x6700;
1408       jm_mcu_code[0x1064/2] = 0x0074;
1409       jm_mcu_code[0x1066/2] = 0x33C2;
1410       jm_mcu_code[0x1068/2] = 0x0010;
1411       jm_mcu_code[0x106a/2] = 0x17FE;
1412       jm_mcu_code[0x106c/2] = 0x33C1;
1413       jm_mcu_code[0x106e/2] = 0x0010;
1414       jm_mcu_code[0x1070/2] = 0x17FC;
1415       jm_mcu_code[0x1072/2] = 0x23C8;
1416       jm_mcu_code[0x1074/2] = 0x0010;
1417       jm_mcu_code[0x1076/2] = 0x17F0;
1418       jm_mcu_code[0x1078/2] = 0x23C9;
1419       jm_mcu_code[0x107a/2] = 0x0010;
1420       jm_mcu_code[0x107c/2] = 0x17D0;
1421       jm_mcu_code[0x107e/2] = 0x41F9;
1422       jm_mcu_code[0x1080/2] = 0x0002;
1423       jm_mcu_code[0x1082/2] = 0xA2C0;
1424       jm_mcu_code[0x1084/2] = 0x3c15;
1425       jm_mcu_code[0x1086/2] = 0xd1fc;
1426       jm_mcu_code[0x1088/2] = 0x0000;
1427       jm_mcu_code[0x108a/2] = 0x0040;
1428       jm_mcu_code[0x108c/2] = 0x5346;
1429       jm_mcu_code[0x108e/2] = 0x6704;
1430       jm_mcu_code[0x1090/2] = 0x4e71;
1431       jm_mcu_code[0x1092/2] = 0x60F2;
1432       jm_mcu_code[0x1094/2] = 0x23c8;
1433       jm_mcu_code[0x1096/2] = 0x0010;
1434       jm_mcu_code[0x1098/2] = 0x17a0;//store here the A0 reg,1017a0
1435       jm_mcu_code[0x109a/2] = 0xd3fc;
1436       jm_mcu_code[0x109c/2] = 0x0000;
1437       jm_mcu_code[0x109e/2] = 0x0200;
1438       jm_mcu_code[0x10a0/2] = 0x720F;
1439       jm_mcu_code[0x10a2/2] = 0x740F;
1440       jm_mcu_code[0x10a4/2] = 0x2050;
1441       jm_mcu_code[0x10a6/2] = 0x32D8;
1442       jm_mcu_code[0x10a8/2] = 0x51CA;
1443       jm_mcu_code[0x10aa/2] = 0xFFFC;
1444       jm_mcu_code[0x10ac/2] = 0x2079;//1017a0,not 1017f0
1445       jm_mcu_code[0x10ae/2] = 0x0010;
1446       jm_mcu_code[0x10b0/2] = 0x17a0;
1447       jm_mcu_code[0x10b2/2] = 0xD0FC;
1448       jm_mcu_code[0x10b4/2] = 0x0004;
1449       jm_mcu_code[0x10b6/2] = 0x23c8;
1450       jm_mcu_code[0x10b8/2] = 0x0010;
1451       jm_mcu_code[0x10ba/2] = 0x17a0;
1452       jm_mcu_code[0x10bc/2] = 0x51C9;
1453       jm_mcu_code[0x10be/2] = 0xffe4;
1454       jm_mcu_code[0x10c0/2] = 0x3439;
1455       jm_mcu_code[0x10c2/2] = 0x0010;
1456       jm_mcu_code[0x10c4/2] = 0x17FE;
1457       jm_mcu_code[0x10c6/2] = 0x3239;
1458       jm_mcu_code[0x10c8/2] = 0x0010;
1459       jm_mcu_code[0x10ca/2] = 0x17FC;
1460       jm_mcu_code[0x10cc/2] = 0x2079;
1461       jm_mcu_code[0x10ce/2] = 0x0010;
1462       jm_mcu_code[0x10d0/2] = 0x17F0;
1463       jm_mcu_code[0x10d2/2] = 0x2279;
1464       jm_mcu_code[0x10d4/2] = 0x0010;
1465       jm_mcu_code[0x10d6/2] = 0x17D0;
1466       jm_mcu_code[0x10d8/2] = 0x2A79;
1467       jm_mcu_code[0x10da/2] = 0x0010;
1468       jm_mcu_code[0x10dc/2] = 0x17c0;
1469       jm_mcu_code[0x10de/2] = 0x3C39;
1470       jm_mcu_code[0x10e0/2] = 0x0010;
1471       jm_mcu_code[0x10e2/2] = 0x17B0;
1472       jm_mcu_code[0x10e4/2] = 0x6000;
1473       jm_mcu_code[0x10e6/2] = 0xFF26;
12551474   }
12561475}
12571476
r3445r3446
12801499/*
12811500data value is REQ under mjzoomin video test menu.It is related to the MCU?
12821501*/
1502static const UINT16 dai_mcu_code[0x11] = { 0x33c5, 0x0010, 0x07fe, 0x3a39,0x000f,0x000c,0xda86,0x0245,
1503                                    0x003f, 0x33c5, 0x000f, 0x000c,0x3a39,0x0010,0x07fe,0x4e75    };
1504
12831505static WRITE16_HANDLER( daireika_mcu_w )
12841506{
1507   static UINT16 i;
12851508   if(ACCESSING_BITS_0_7 && data)
12861509   {
12871510      /*MCU program upload complete/upload kind*/
r3445r3446
12891512
12901513      /*******************************************************
12911514        1st M68k code uploaded by the MCU.
1515        random number generator (guess)
12921516        *******************************************************/
1293      jm_regs[0x0140/2] = 0x4e75;    //rts
1517      jm_regs[0x0140/2] = 0x4ef9;
1518      jm_regs[0x0142/2] = 0x0010;
1519      jm_regs[0x0144/2] = 0x0800;
12941520
12951521      /*
1296        jm_regs[0x0140/2] = 0x4ef9;
1297        jm_regs[0x0142/2] = 0x0010;
1298        jm_regs[0x0144/2] = 0x1000;//jmp $101000
1299        //jm_regs[0x00c6/2] = 0x4e75;//rts
1300        jm_mcu_code[0x1000/2] = 0x33c2;
1301        jm_mcu_code[0x1002/2] = 0x0010;
1302        jm_mcu_code[0x1004/2] = 0x17fe; //move.w D2,$1017fe
1303        jm_mcu_code[0x1006/2] = 0x23c8;
1304        jm_mcu_code[0x1008/2] = 0x0010;
1305        jm_mcu_code[0x100a/2] = 0x17f0;
1306        jm_mcu_code[0x100c/2] = 0x2050; //movea (A0),A0
1307        jm_mcu_code[0x100e/2] = 0x22d8;
1308        jm_mcu_code[0x1010/2] = 0x51ca;
1309        jm_mcu_code[0x1012/2] = 0xfffc;
1310        jm_mcu_code[0x1014/2] = 0x3439;
1311        jm_mcu_code[0x1016/2] = 0x0010;
1312        jm_mcu_code[0x1018/2] = 0x17fe;
1313        jm_mcu_code[0x101a/2] = 0x2079;
1314        jm_mcu_code[0x101c/2] = 0x0010;
1315        jm_mcu_code[0x101e/2] = 0x17f0;
1316        jm_mcu_code[0x1020/2] = 0xd0fc;
1317        jm_mcu_code[0x1022/2] = 0x0004;//adda.w $4,A0
1318        jm_mcu_code[0x1024/2] = 0x4e75;*/
1522        33c5 0010 07fe move.w  D5, $1007fe.l
1523        3A39 000F 000C move.w  $f000c, D5
1524        da86             add.w   D6,D5
1525        0245 003f        and.w   $3f,D5
1526        33C5 000F 000C move.w  D5, $f000c.l
1527        3a39 0010 07fe move.w  $1007fe, D5
1528        4e75             rts
1529        */
1530      for(i=0;i<0x11;i++)
1531         jm_mcu_code[(0x0800/2)+i] = dai_mcu_code[i];
1532
13191533      /*******************************************************
13201534        2nd M68k code uploaded by the MCU.
13211535        *******************************************************/
r3445r3446
14831697        jm_mcu_code[0x1022/2] = 0x0004;//adda.w $4,A0
14841698        jm_mcu_code[0x1024/2] = 0x4e75;*/
14851699      /*******************************************************
1486        5th M68k code uploaded by the MCU
1700        5th M68k code uploaded by the MCU (palette upload)
14871701        *******************************************************/
14881702      jm_regs[0x00c0/2] = 0x4ef9;
14891703      jm_regs[0x00c2/2] = 0x0010;
r3445r3446
14961710      jm_mcu_code[0x1008/2] = 0x0010;
14971711      jm_mcu_code[0x100a/2] = 0x17fc; //move.w D1,$1017fc
14981712      jm_mcu_code[0x100c/2] = 0x720f;
1499      jm_mcu_code[0x100e/2] = 0x740f; //moveq $07,D2
1713      jm_mcu_code[0x100e/2] = 0x740f; //moveq $0f,D2
15001714      jm_mcu_code[0x1010/2] = 0x23c8;
15011715      jm_mcu_code[0x1012/2] = 0x0010;
15021716      jm_mcu_code[0x1014/2] = 0x17f0;
r3445r3446
15881802      jm_mcu_code[0x0008/2] = 0x4e75;//rts
15891803      /*******************************************************
15901804        2nd M68k code uploaded by the MCU (Sound read/write)
1591        (Note:copied from suchipi,sound makes the game slower
1592        so I think I'm missing something here)
1805        (Note:copied from suchipi,check here the sound banking)
15931806        *******************************************************/
15941807      jm_regs[0x0020/2] = 0x4ef9;
15951808      jm_regs[0x0022/2] = 0x0010;
r3445r3446
16991912{
17001913   memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x80004, 0x80005, 0, 0, urashima_mcu_r );
17011914   memory_install_write16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x80012, 0x80013, 0, 0, urashima_mcu_w );
1702   memory_install_readwrite16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xf0320, 0xf0321, 0, 0, SMH_BANK1, SMH_BANK1 );
1703   memory_set_bankptr(1, auto_malloc(0xf0322 - 0xf0320));
1704   memory_install_readwrite16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xf03c0, 0xf03c5, 0, 0, SMH_BANK2, SMH_BANK2 );
1705   memory_set_bankptr(2, auto_malloc(0xf03c6 - 0xf03c0));
1706   memory_install_readwrite16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xf03c6, 0xf03e5, 0, 0, SMH_BANK3, SMH_BANK3 );
1707   memory_set_bankptr(3, auto_malloc(0xf03e6 - 0xf03c6));
1915
17081916   mcu_prg = 0x12;
17091917}
17101918
r3445r3446
17121920{
17131921   memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x80004, 0x80005, 0, 0, daireika_mcu_r );
17141922   memory_install_write16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x80012, 0x80013, 0, 0, daireika_mcu_w );
1715   memory_install_readwrite16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xf0140, 0xf0141, 0, 0, SMH_BANK1, SMH_BANK1 );
1716   memory_set_bankptr(1, auto_malloc(0xf0142 - 0xf0140));
1717   memory_install_readwrite16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xf0020, 0xf0025, 0, 0, SMH_BANK2, SMH_BANK2 );
1718   memory_set_bankptr(2, auto_malloc(0xf0026 - 0xf0020));
1719   memory_install_readwrite16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xf00c0, 0xf00d5, 0, 0, SMH_BANK3, SMH_BANK3 );
1720   memory_set_bankptr(3, auto_malloc(0xf00d6 - 0xf00c0));
1721   memory_install_readwrite16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xf0100, 0xf0131, 0, 0, SMH_BANK4, SMH_BANK4 );
1722   memory_set_bankptr(4, auto_malloc(0xf0132 - 0xf0100));
1923
17231924   mcu_prg = 0x11;
17241925}
17251926
r3445r3446
17271928{
17281929   memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x80004, 0x80005, 0, 0, mjzoomin_mcu_r );
17291930   memory_install_write16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x80012, 0x80013, 0, 0, mjzoomin_mcu_w );
1730   memory_install_readwrite16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xf00c0, 0xf00c5, 0, 0, SMH_BANK1, SMH_BANK1 );
1731   memory_set_bankptr(1, auto_malloc(0xf00c6 - 0xf00c0));
1732   memory_install_readwrite16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xf00c6, 0xf00d1, 0, 0, SMH_BANK2, SMH_BANK2 );
1733   memory_set_bankptr(2, auto_malloc(0xf00d2 - 0xf00c6));
1734   memory_install_readwrite16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xf0020, 0xf002f, 0, 0, SMH_BANK3, SMH_BANK3 );
1735   memory_set_bankptr(3, auto_malloc(0xf0030 - 0xf0020));
1931
17361932   mcu_prg = 0x13;
17371933}
17381934
17391935static DRIVER_INIT( kakumei )
17401936{
17411937   memory_install_read16_handler(machine, 0,  ADDRESS_SPACE_PROGRAM, 0x80004, 0x80005, 0, 0, kakumei_mcu_r );
1938
17421939   mcu_prg = 0x21;
17431940}
17441941
17451942static DRIVER_INIT( kakumei2 )
17461943{
17471944   memory_install_read16_handler(machine, 0,  ADDRESS_SPACE_PROGRAM, 0x80004, 0x80005, 0, 0, kakumei_mcu_r );
1945
17481946   mcu_prg = 0x22;
17491947}
17501948
r3445r3446
17551953}
17561954
17571955/*First version of the MCU*/
1758/*Pseudo-random stuff is not 100% working*/
1759GAME( 1989, daireika, 0, jalmah, jalmah, daireika, ROT0, "Jaleco / NMK", "Mahjong Daireikai",                 GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
1760/*Protection controls tilemap scrolling on this,you can't see anything unless you use fake scroll register values...*/
1761GAME( 1989, urashima, 0, jalmah, jalmah, urashima, ROT0, "UPL",         "Urashima Mahjong",                GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
1762
1763/*No known gameplay bugs for the following games:*/
1764GAME( 1990, mjzoomin, 0, jalmah, jalmah, mjzoomin, ROT0, "Jaleco",       "Mahjong Channel Zoom In",            GAME_IMPERFECT_GRAPHICS )
1956GAME( 1989, urashima, 0, urashima, jalmah,  urashima, ROT0, "UPL",         "Otogizoushi Urashima Mahjong",         GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
1957GAME( 1989, daireika, 0, jalmah,   jalmah,  daireika, ROT0, "Jaleco / NMK", "Mahjong Daireikai",               GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
1958GAME( 1990, mjzoomin, 0, jalmah,   jalmah,  mjzoomin, ROT0, "Jaleco",       "Mahjong Channel Zoom In",            GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
17651959/*Second version of the MCU*/
17661960GAME( 1990, kakumei,  0, jalmah, jalmah2, kakumei,  ROT0, "Jaleco",       "Mahjong Kakumei",                      GAME_IMPERFECT_GRAPHICS )
1767GAME( 1992, kakumei2, 0, jalmah, jalmah2a, kakumei2, ROT0, "Jaleco",       "Mahjong Kakumei 2 - Princess League",  GAME_IMPERFECT_GRAPHICS )
1768GAME( 1993, suchipi,  0, jalmah, jalmah2a, suchipi,  ROT0, "Jaleco",       "Idol Janshi Su-Chi-Pie Special",       GAME_IMPERFECT_GRAPHICS )
1961GAME( 1992, kakumei2, 0, jalmah, jalmah2a,kakumei2, ROT0, "Jaleco",       "Mahjong Kakumei 2 - Princess League",  GAME_IMPERFECT_GRAPHICS )
1962GAME( 1993, suchipi,  0, jalmah, jalmah2a,suchipi,  ROT0, "Jaleco",       "Idol Janshi Su-Chi-Pie Special",       GAME_IMPERFECT_GRAPHICS )
src/mame/drivers/exidy440.c
r3445r3446
670670   PORT_START("IN3")      /* coin counters */
671671   PORT_BIT( 0x01, IP_ACTIVE_LOW,  IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
672672   PORT_BIT( 0x02, IP_ACTIVE_LOW,  IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
673   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
674   PORT_BIT( 0xf8, IP_ACTIVE_LOW,  IPT_UNKNOWN )
673   PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNKNOWN )
674   /* PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) */
675   /* PORT_BIT( 0xf8, IP_ACTIVE_LOW,  IPT_UNKNOWN ) */
675676
676677   PORT_START("AN0")      /* fake analog X */
677678   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10)
src/mame/drivers/bwidow.c
r3445r3446
260260
261261   res1 = input_port_read(machine, "IN3");
262262   res2 = input_port_read(machine, "IN4");
263   res3 = input_port_read(machine, "DSW2");
263   res3 = input_port_read_safe(machine, "DSW2", 0);
264264   res = 0x00;
265265
266266   switch (offset & 0x07)
src/mame/drivers/m90.c
r3445r3446
714714   MDRV_CPU_IO_MAP(main_cpu_io_map,0)
715715   MDRV_CPU_VBLANK_INT("main", m90_interrupt)
716716
717   MDRV_CPU_ADD("audio", Z80, XTAL_3_579545MHz) /* verified on pcb */
717   MDRV_CPU_ADD("sound", Z80, XTAL_3_579545MHz) /* verified on pcb */
718718   MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem)
719719   MDRV_CPU_IO_MAP(sound_io_map,0)
720720   MDRV_CPU_VBLANK_INT_HACK(nmi_line_pulse,128)   /* clocked by V1? (Vigilante) */
r3445r3446
796796   MDRV_CPU_IO_MAP(main_cpu_io_map,0)
797797   MDRV_CPU_VBLANK_INT("main", m90_interrupt)
798798
799   MDRV_CPU_ADD("audio", Z80, XTAL_3_579545MHz) /* verified on pcb */
799   MDRV_CPU_ADD("sound", Z80, XTAL_3_579545MHz) /* verified on pcb */
800800   MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem)
801801   MDRV_CPU_IO_MAP(sound_io_map,0)
802802   MDRV_CPU_VBLANK_INT_HACK(nmi_line_pulse,128)   /* clocked by V1? (Vigilante) */
r3445r3446
841841   MDRV_CPU_IO_MAP(main_cpu_io_map,0)
842842   MDRV_CPU_VBLANK_INT("main", m90_interrupt)
843843
844   MDRV_CPU_ADD("audio", Z80, XTAL_3_579545MHz) /* verified on pcb */
844   MDRV_CPU_ADD("sound", Z80, XTAL_3_579545MHz) /* verified on pcb */
845845   MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem)
846846   MDRV_CPU_IO_MAP(bbmanw_sound_io_map,0)
847847   MDRV_CPU_VBLANK_INT_HACK(nmi_line_pulse,128)   /* clocked by V1? (Vigilante) */
r3445r3446
902902   MDRV_CPU_IO_MAP(dynablsb_cpu_io,0)
903903   MDRV_CPU_VBLANK_INT("main", m90_interrupt)
904904
905   MDRV_CPU_ADD("audio", Z80, XTAL_3_579545MHz)   /* 3.579545 MHz */
905   MDRV_CPU_ADD("sound", Z80, XTAL_3_579545MHz)   /* 3.579545 MHz */
906906   MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem)
907907   MDRV_CPU_IO_MAP(sound_io_map,0)
908908   MDRV_CPU_VBLANK_INT_HACK(nmi_line_pulse,128)   /* clocked by V1? (Vigilante) */
r3445r3446
945945   ROM_LOAD16_BYTE( "hasc-p0.bin",  0x00000, 0x20000, CRC(dff0ba6e) SHA1(83e20b3ae10b57c1e58d3d44bfca2ffd5f142056) )
946946   ROM_COPY( "main", 0x3fff0,  0xffff0, 0x10 )   /* start vector */
947947
948   ROM_REGION( 0x10000, "audio", 0 )
948   ROM_REGION( 0x10000, "sound", 0 )
949949   ROM_LOAD( "hasc-sp.bin",    0x0000, 0x10000, CRC(259b1687) SHA1(39c3a89b1d0f5fec2a94a3048cc4639fe96820e2) )
950950
951951   ROM_REGION( 0x80000, "gfx1", ROMREGION_DISPOSE )
r3445r3446
964964   ROM_LOAD16_BYTE( "bbm-cp0e.65",   0x00000, 0x20000, CRC(95db7a67) SHA1(1a224d73615a60530cbcc54fdbb526e8d5a6c555) )
965965   ROM_COPY( "main", 0x3fff0,  0xffff0, 0x10 )   /* start vector */
966966
967   ROM_REGION( 0x10000, "audio", 0 )
967   ROM_REGION( 0x10000, "sound", 0 )
968968   ROM_LOAD( "bbm-sp.23",    0x0000, 0x10000, CRC(251090cd) SHA1(9245072c1afbfa3e4a1d1549942765d58bd78ed3) )
969969
970970   ROM_REGION( 0x100000, "gfx1", ROMREGION_DISPOSE )
r3445r3446
983983   ROM_LOAD16_BYTE( "bbm-p0.65",   0x00000, 0x20000, CRC(0a20afcc) SHA1(a42b7458938300b0c84c820c1ea627aed9080f1b) )
984984   ROM_COPY( "main", 0x3fff0,  0xffff0, 0x10 )   /* start vector */
985985
986   ROM_REGION( 0x10000, "audio", 0 )
986   ROM_REGION( 0x10000, "sound", 0 )
987987   ROM_LOAD( "bbm-sp.23",    0x0000, 0x10000, CRC(251090cd) SHA1(9245072c1afbfa3e4a1d1549942765d58bd78ed3) )
988988
989989   ROM_REGION( 0x100000, "gfx1", ROMREGION_DISPOSE )
r3445r3446
10021002   ROM_LOAD16_BYTE( "bbm-cp1d.62",   0x00000, 0x20000, CRC(be57bf74) SHA1(cd3f887f7ec8a5721551477ec2d4a7336f422c6f) )
10031003   ROM_COPY( "main", 0x3fff0,  0xffff0, 0x10 )   /* start vector */
10041004
1005   ROM_REGION( 0x10000, "audio", 0 )
1005   ROM_REGION( 0x10000, "sound", 0 )
10061006   ROM_LOAD( "bbm-sp.23",    0x0000, 0x10000, CRC(251090cd) SHA1(9245072c1afbfa3e4a1d1549942765d58bd78ed3) )
10071007
10081008   ROM_REGION( 0x100000, "gfx1", ROMREGION_DISPOSE )
r3445r3446
10211021   ROM_LOAD16_BYTE( "db3-25.bin",   0x00000, 0x20000, CRC(bf3137c3) SHA1(64bbca4b3a509b552ee8a19b3b50fe6638fd90e2) )
10221022   ROM_COPY( "main", 0x3fff0,  0xffff0, 0x10 )   /* start vector */
10231023
1024   ROM_REGION( 0x10000, "audio", 0 )
1024   ROM_REGION( 0x10000, "sound", 0 )
10251025   ROM_LOAD( "db1-17.bin",    0x0000, 0x10000, CRC(e693c32f) SHA1(b6f228d26318718eedae765de9479706a3e4c38d) )
10261026
10271027   ROM_REGION( 0x100000, "gfx1", ROMREGION_DISPOSE )
r3445r3446
10801080   ROM_LOAD16_BYTE( "bbm2-l0-b.79",  0x00000, 0x40000, CRC(e762c22b) SHA1(b389a65adf1348e6529a992d9b68178d7503238e) )
10811081   ROM_COPY( "main", 0x7fff0,  0xffff0, 0x10 )   /* start vector */
10821082
1083   ROM_REGION( 0x10000, "audio", 0 )
1083   ROM_REGION( 0x10000, "sound", 0 )
10841084   ROM_LOAD( "bbm2-sp.33",    0x0000, 0x10000, CRC(6bc1689e) SHA1(099c275632965e19eb6131863f69d2afa9916e90) )
10851085
10861086   ROM_REGION( 0x200000, "gfx1", ROMREGION_DISPOSE )
r3445r3446
10991099   ROM_LOAD16_BYTE( "bbm2-l0.79",  0x00000, 0x40000, CRC(20873b49) SHA1(30ae595f7961cd56f2506608ae76973b2d0e73ca) )
11001100   ROM_COPY( "main", 0x7fff0,  0xffff0, 0x10 )   /* start vector */
11011101
1102   ROM_REGION( 0x10000, "audio", 0 )
1102   ROM_REGION( 0x10000, "sound", 0 )
11031103   ROM_LOAD( "bbm2-sp-b.bin", 0x0000, 0x10000, CRC(b8d8108c) SHA1(ef4fb46d843819c273db2083754eb312f5abd44e) )
11041104
11051105   ROM_REGION( 0x200000, "gfx1", ROMREGION_DISPOSE )
r3445r3446
11181118   ROM_LOAD16_BYTE( "bbm2-l0-a.79",  0x00000, 0x40000, CRC(c7568031) SHA1(ff4d0809260a088f530098a0173eec16fa6396f1) )
11191119   ROM_COPY( "main", 0x7fff0,  0xffff0, 0x10 )   /* start vector */
11201120
1121   ROM_REGION( 0x10000, "audio", 0 )
1121   ROM_REGION( 0x10000, "sound", 0 )
11221122   ROM_LOAD( "bbm2-sp.33",    0x0000, 0x10000, CRC(6bc1689e) SHA1(099c275632965e19eb6131863f69d2afa9916e90) )
11231123
11241124   ROM_REGION( 0x200000, "gfx1", ROMREGION_DISPOSE )
r3445r3446
11371137   ROM_LOAD16_BYTE( "bomblord.4",  0x00000, 0x40000, CRC(cfe65f81) SHA1(8dae94abc67bc53f1c8dbe13243dc08a62fd5d22) )
11381138   ROM_COPY( "main", 0x7fff0,  0xffff0, 0x10 )   /* start vector */
11391139
1140   ROM_REGION( 0x10000, "audio", 0 )
1140   ROM_REGION( 0x10000, "sound", 0 )
11411141   ROM_LOAD( "bbm2-sp.33",    0x0000, 0x10000, CRC(6bc1689e) SHA1(099c275632965e19eb6131863f69d2afa9916e90) ) // bomblord.1
11421142
11431143   ROM_REGION( 0x200000, "gfx1", ROMREGION_DISPOSE )
r3445r3446
11601160   ROM_LOAD16_BYTE( "qf1-h1-.78",   0x000001, 0x80000, CRC(c6c2eb2b) SHA1(83de08b0c72da8c3e4786063802d83cb1015032a) )   /* banked at 80000-8FFFF */
11611161   ROM_LOAD16_BYTE( "qf1-l1-.80",   0x000000, 0x80000, CRC(3132c144) SHA1(de3ae35cdfbb1231cab343142ac700df00f9b77a) )
11621162
1163   ROM_REGION( 0x10000, "audio", 0 )
1163   ROM_REGION( 0x10000, "sound", 0 )
11641164   ROM_LOAD( "qf1-sp-.33",   0x0000, 0x10000, CRC(0664fa9f) SHA1(db003beb4f8461bf4411efa8df9f700770fb153b) )
11651165
11661166   ROM_REGION( 0x200000, "gfx1", ROMREGION_DISPOSE )
r3445r3446
11791179   ROM_LOAD16_BYTE( "rc_l0.rom",    0x00000, 0x40000, CRC(0455895a) SHA1(1072b8d280f7ccc48cd8fbd81323e1f8c8d0db95) )
11801180   ROM_COPY( "main", 0x7fff0,  0xffff0, 0x10 )   /* start vector */
11811181
1182   ROM_REGION( 0x10000, "audio", 0 )
1182   ROM_REGION( 0x10000, "sound", 0 )
11831183   ROM_LOAD( "rc_sp.rom",    0x0000, 0x10000, CRC(bb80094e) SHA1(1c62e702c395b7ebb666a79af1912b270d5f95aa) )
11841184
11851185   ROM_REGION( 0x200000, "gfx1", ROMREGION_DISPOSE )
r3445r3446
11981198   ROM_LOAD16_BYTE( "l4_l0.rom",    0x00000, 0x40000, CRC(c7b4c519) SHA1(44887ccf54f5e507d2db4f09a7c2b7b9ea217058) )
11991199   ROM_COPY( "main", 0x7fff0,  0xffff0, 0x10 )   /* start vector */
12001200
1201   ROM_REGION( 0x10000, "audio", 0 )
1201   ROM_REGION( 0x10000, "sound", 0 )
12021202   ROM_LOAD( "rc_sp.rom",    0x0000, 0x10000, CRC(bb80094e) SHA1(1c62e702c395b7ebb666a79af1912b270d5f95aa) )
12031203
12041204   ROM_REGION( 0x200000, "gfx1", ROMREGION_DISPOSE )
r3445r3446
12171217   ROM_LOAD16_BYTE( "sis2-l0b.bin", 0x00000, 0x40000, CRC(d35d948a) SHA1(e4f119fa00fd8ede2533323e14d94ad4d5fabbc5) ) /* Actually labeled as "SIS2-L0-B" */
12181218   ROM_COPY( "main", 0x7fff0,  0xffff0, 0x10 )   /* start vector */
12191219
1220   ROM_REGION( 0x10000, "audio", 0 )
1220   ROM_REGION( 0x10000, "sound", 0 )
12211221   ROM_LOAD( "sis2-sp-.rom", 0x0000, 0x10000, CRC(6fc0ff3a) SHA1(2b8c648c1fb5d516552fc260b8f18ffd56bbe062) )
12221222
12231223   ROM_REGION( 0x200000, "gfx1", ROMREGION_DISPOSE )
r3445r3446
12361236   ROM_LOAD16_BYTE( "sis2-l0-.rom", 0x00000, 0x40000, CRC(2af25182) SHA1(ec6dcc3913e1b7e7a3958b78610e83f51c404e07) )
12371237   ROM_COPY( "main", 0x7fff0,  0xffff0, 0x10 )   /* start vector */
12381238
1239   ROM_REGION( 0x10000, "audio", 0 )
1239   ROM_REGION( 0x10000, "sound", 0 )
12401240   ROM_LOAD( "sis2-sp-.rom", 0x0000, 0x10000, CRC(6fc0ff3a) SHA1(2b8c648c1fb5d516552fc260b8f18ffd56bbe062) )
12411241
12421242   ROM_REGION( 0x200000, "gfx1", ROMREGION_DISPOSE )
src/mame/drivers/psikyosh.c
r3445r3446
4848
4949  - see notes in video file -
5050
51  Sol Divid's music is not correct, related to sh-2 timers.
51  Daraku is missing some screen blend effects
5252
5353
5454*-----------------------------------*
r3445r3446
413413
414414static INTERRUPT_GEN(psikyosh_interrupt)
415415{
416   cpunum_set_input_line(machine, 0, 4, HOLD_LINE);
416   cpunum_set_input_line(machine, 0, 4, ASSERT_LINE);
417417}
418418
419// VBL handler writes 0x00 on entry, 0xc0 on exit
420// bit 0 controls game speed on readback, mechanism is a little weird
421static WRITE32_HANDLER( psikyosh_irqctrl_w )
422{
423   if (!(data & 0x00c00000))
424   {
425      cpunum_set_input_line(machine, 0, 4, CLEAR_LINE);
426   }
427}
428
419429static WRITE32_HANDLER( paletteram32_RRRRRRRRGGGGGGGGBBBBBBBBxxxxxxxx_dword_w )
420430{
421431   int r,g,b;
r3445r3446
531541   AM_RANGE(0x03004000, 0x0300ffff) AM_WRITE(SMH_RAM) AM_BASE(&psikyosh_bgram) // backgrounds
532542   AM_RANGE(0x03040000, 0x03044fff) AM_WRITE(paletteram32_RRRRRRRRGGGGGGGGBBBBBBBBxxxxxxxx_dword_w) AM_BASE(&paletteram32) // palette..
533543   AM_RANGE(0x03050000, 0x030501ff) AM_WRITE(SMH_RAM) AM_BASE(&psikyosh_zoomram) // a gradient sometimes ...
534   AM_RANGE(0x0305ffdc, 0x0305ffdf) AM_WRITE(SMH_RAM) // also reads from this address
544   AM_RANGE(0x0305ffdc, 0x0305ffdf) AM_WRITE(psikyosh_irqctrl_w)
535545   AM_RANGE(0x0305ffe0, 0x0305ffff) AM_WRITE(psikyosh_vidregs_w) AM_BASE(&psikyosh_vidregs) //  video registers
536546   AM_RANGE(0x05000000, 0x05000003) AM_WRITE(psh_ymf_fm_w) // first 2 OPL4 register banks
537547   AM_RANGE(0x05000004, 0x05000007) AM_WRITE(psh_ymf_pcm_w) // third OPL4 register bank
r3445r3446
568578   AM_RANGE(0x04004000, 0x0400ffff) AM_WRITE(SMH_RAM) AM_BASE(&psikyosh_bgram) // backgrounds
569579   AM_RANGE(0x04040000, 0x04044fff) AM_WRITE(paletteram32_RRRRRRRRGGGGGGGGBBBBBBBBxxxxxxxx_dword_w) AM_BASE(&paletteram32)
570580   AM_RANGE(0x04050000, 0x040501ff) AM_WRITE(SMH_RAM) AM_BASE(&psikyosh_zoomram)
571   AM_RANGE(0x0405ffdc, 0x0405ffdf) AM_WRITE(SMH_RAM) // also reads from this address
581   AM_RANGE(0x0405ffdc, 0x0405ffdf) AM_WRITE(psikyosh_irqctrl_w)
572582   AM_RANGE(0x0405ffe0, 0x0405ffff) AM_WRITE(psikyosh_vidregs_w) AM_BASE(&psikyosh_vidregs) // video registers
573583   AM_RANGE(0x05000000, 0x0507ffff) AM_WRITE(SMH_ROM) // data ROM
574584   AM_RANGE(0x06000000, 0x060fffff) AM_WRITE(SMH_RAM) AM_BASE(&psh_ram)
r3445r3446
10481058   ROM_LOAD( "snd0.u52", 0x000000, 0x400000, CRC(0179f018) SHA1(16ae63e021230356777342ed902e02407a1a1b82) )
10491059ROM_END
10501060
1061
1062/*
1063
1064// the following (currently unsupported) roms are known to exist on the PS5v2 PCB
1065ROM_START( tgm2 )
1066    ROM_REGION( 0x100000, "main", 0)
1067    ROM_LOAD32_WORD_SWAP( "2.u21",   0x000000, 0x080000, CRC(b19f6c31) SHA1(c58346c575db71262aebc3993743cb031c41e4af) )
1068    ROM_LOAD32_WORD_SWAP( "1.u22",   0x000002, 0x080000, CRC(c521bf24) SHA1(0ee5b9f74b6b8bcc01b2270c53f30d99e877ed64) )
1069
1070    ROM_REGION( 0x3000000, "gfx1", ROMTEST_GFX )
1071    // Lower positions not populated
1072    ROM_LOAD32_WORD( "81ts_3l.u6",   0x0c00000, 0x200000, CRC(d77cff9c) SHA1(93ee48c350110ebf9a80cca95c599c90a523147d) )
1073    ROM_LOAD32_WORD( "82ts_3h.u14",  0x0c00002, 0x200000, CRC(f012b583) SHA1(907e1c93cbfa6a0285f96c53f5ccb63e313053d7) )
1074    ROM_LOAD32_WORD( "83ts_4l.u7",   0x1000000, 0x200000, CRC(078cafc3) SHA1(26e47c8f0aaa461e69e9f40ee61ce4b4cc480776) )
1075    ROM_LOAD32_WORD( "84ts_4h.u15",  0x1000002, 0x200000, CRC(1f91446b) SHA1(81b43156c6a0f4e63dcc9e7c1e9dd54bcba38240) )
1076    ROM_LOAD32_WORD( "85ts_5l.u8",   0x1400000, 0x200000, CRC(40fbd259) SHA1(6b8cbfc6232e04785fd232158b3f4d56fadb0c7d) )
1077    ROM_LOAD32_WORD( "86ts_5h.u16",  0x1400002, 0x200000, CRC(186c935f) SHA1(0cab30c2ec4df3dc35b4c9de63d29bd0bc99afdb) )
1078    ROM_LOAD32_WORD( "87ts_6l.u1",   0x1800000, 0x200000, CRC(c17dc48a) SHA1(4399bfc253fb1cd4ef1081d7350c73df3a0f7441) )
1079    ROM_LOAD32_WORD( "88ts_6h.u2",   0x1800002, 0x200000, CRC(e4dba5da) SHA1(24db1e19f4df94ba3a22fba59e4fd065921db1c5) )
1080    ROM_LOAD32_WORD( "89ts_7l.u19",  0x1c00000, 0x200000, CRC(dab1b2c5) SHA1(114fd7717b97cdfd605ab7e2a354190c41ba4a82) )
1081    ROM_LOAD32_WORD( "90ts_7h.u20",  0x1c00002, 0x200000, CRC(aae696b3) SHA1(9ac27365719c1700f647911dc324a0e2aacea172) )
1082    ROM_LOAD32_WORD( "91ts_8l.u28",  0x2000000, 0x200000, CRC(e953ace1) SHA1(c6cdfd807a7a84b86378c3585aeb7c0cb066f8a1) )
1083    ROM_LOAD32_WORD( "92ts_8h.u29",  0x2000002, 0x200000, CRC(9da3b976) SHA1(ce1e4eb93760749200ede45703412868ca29a5e7) )
1084    ROM_LOAD32_WORD( "93ts_9l.u41",  0x2400000, 0x200000, CRC(233087fe) SHA1(c4adb307ce11ef558fd23b299ce7f458de581446) )
1085    ROM_LOAD32_WORD( "94ts_9h.u42",  0x2400002, 0x200000, CRC(9da831c7) SHA1(42698697aa85df088745b2d37ec89b01adce700f) )
1086    ROM_LOAD32_WORD( "95ts_10l.u58", 0x2800000, 0x200000, CRC(303a5240) SHA1(5816d1922e85bc27a2a13cdd183d9e67c7ddb2e1) )
1087    ROM_LOAD32_WORD( "96ts_10h.u59", 0x2800002, 0x200000, CRC(2240ebf6) SHA1(b61f93a18dd9d94fb57d95745d4df2e41a0371ff) )
1088
1089    ROM_REGION( 0x800000, "ymf", 0 ) // Samples
1090    ROM_LOAD( "97ts_snd.u52", 0x000000, 0x400000, CRC(9155eca6) SHA1(f0b4f68462d8a465c39815d3b7fd9818788132ae) )
1091
1092    ROM_REGION( 0x100, "user1", 0 ) // Default Eeprom (contains scores etc.)
1093    // might need byteswapping to reprogram actual chip
1094    ROM_LOAD( "tgm2.default.nv", 0x000, 0x100, CRC(50e2348c) SHA1(d17d2739c97a1d93a95dcc9f11feb1f6f228729e) )
1095ROM_END
1096
1097ROM_START( tgm2p )
1098    ROM_REGION( 0x100000, "main", 0)
1099    ROM_LOAD32_WORD_SWAP( "2b.u21",   0x000000, 0x080000, CRC(38bc626c) SHA1(783e8413b11f1fa08d331b09ef4ed63f62b87ead) )
1100    ROM_LOAD32_WORD_SWAP( "1b.u22",   0x000002, 0x080000, CRC(7599fb19) SHA1(3f7e81756470c173cc17a7e7dee91437571fd0c3) )
1101
1102    ROM_REGION( 0x3000000, "gfx1", ROMTEST_GFX )
1103    // Lower positions not populated
1104    ROM_LOAD32_WORD( "81ts_3l.u6",   0x0c00000, 0x200000, CRC(d77cff9c) SHA1(93ee48c350110ebf9a80cca95c599c90a523147d) )
1105    ROM_LOAD32_WORD( "82ts_3h.u14",  0x0c00002, 0x200000, CRC(f012b583) SHA1(907e1c93cbfa6a0285f96c53f5ccb63e313053d7) )
1106    ROM_LOAD32_WORD( "83ts_4l.u7",   0x1000000, 0x200000, CRC(078cafc3) SHA1(26e47c8f0aaa461e69e9f40ee61ce4b4cc480776) )
1107    ROM_LOAD32_WORD( "84ts_4h.u15",  0x1000002, 0x200000, CRC(1f91446b) SHA1(81b43156c6a0f4e63dcc9e7c1e9dd54bcba38240) )
1108    ROM_LOAD32_WORD( "85ts_5l.u8",   0x1400000, 0x200000, CRC(40fbd259) SHA1(6b8cbfc6232e04785fd232158b3f4d56fadb0c7d) )
1109    ROM_LOAD32_WORD( "86ts_5h.u16",  0x1400002, 0x200000, CRC(186c935f) SHA1(0cab30c2ec4df3dc35b4c9de63d29bd0bc99afdb) )
1110    ROM_LOAD32_WORD( "87ts_6l.u1",   0x1800000, 0x200000, CRC(c17dc48a) SHA1(4399bfc253fb1cd4ef1081d7350c73df3a0f7441) )
1111    ROM_LOAD32_WORD( "88ts_6h.u2",   0x1800002, 0x200000, CRC(e4dba5da) SHA1(24db1e19f4df94ba3a22fba59e4fd065921db1c5) )
1112    ROM_LOAD32_WORD( "89ts_7l.u19",  0x1c00000, 0x200000, CRC(dab1b2c5) SHA1(114fd7717b97cdfd605ab7e2a354190c41ba4a82) )
1113    ROM_LOAD32_WORD( "90ts_7h.u20",  0x1c00002, 0x200000, CRC(aae696b3) SHA1(9ac27365719c1700f647911dc324a0e2aacea172) )
1114    ROM_LOAD32_WORD( "91ts_8l.u28",  0x2000000, 0x200000, CRC(e953ace1) SHA1(c6cdfd807a7a84b86378c3585aeb7c0cb066f8a1) )
1115    ROM_LOAD32_WORD( "92ts_8h.u29",  0x2000002, 0x200000, CRC(9da3b976) SHA1(ce1e4eb93760749200ede45703412868ca29a5e7) )
1116    ROM_LOAD32_WORD( "93ts_9l.u41",  0x2400000, 0x200000, CRC(233087fe) SHA1(c4adb307ce11ef558fd23b299ce7f458de581446) )
1117    ROM_LOAD32_WORD( "94ts_9h.u42",  0x2400002, 0x200000, CRC(9da831c7) SHA1(42698697aa85df088745b2d37ec89b01adce700f) )
1118    ROM_LOAD32_WORD( "95ts_10l.u58", 0x2800000, 0x200000, CRC(303a5240) SHA1(5816d1922e85bc27a2a13cdd183d9e67c7ddb2e1) )
1119    ROM_LOAD32_WORD( "96ts_10h.u59", 0x2800002, 0x200000, CRC(2240ebf6) SHA1(b61f93a18dd9d94fb57d95745d4df2e41a0371ff) )
1120
1121    ROM_REGION( 0x800000, "ymf", 0 ) // Samples
1122    ROM_LOAD( "97ts_snd.u52", 0x000000, 0x400000, CRC(9155eca6) SHA1(f0b4f68462d8a465c39815d3b7fd9818788132ae) )
1123
1124    ROM_REGION( 0x100, "user1", 0 ) // Default Eeprom (contains scores etc.)
1125    // might need byteswapping to reprogram actual chip/
1126    ROM_LOAD( "tgm2p.default.nv", 0x000, 0x100, CRC(b2328b40) SHA1(e6cda4d6f4e91b9f78d2ca84a5eee6c3bd03fe02) )
1127ROM_END
1128*/
1129
10511130/* are these right? should i fake the counter return?
10521131   'speedups / idle skipping isn't needed for 'hotgmck, hgkairak'
10531132   as the core catches and skips the idle loops automatically'
r3445r3446
13221401/*     YEAR  NAME      PARENT    MACHINE    INPUT     INIT      MONITOR COMPANY   FULLNAME FLAGS */
13231402
13241403/* ps3-v1 */
1325GAME( 1997, soldivid, 0,        psikyo3v1,   soldivid, soldivid, ROT0,   "Psikyo", "Sol Divide - The Sword Of Darkness", GAME_IMPERFECT_SOUND ) // Music Tempo
1404GAME( 1997, soldivid, 0,        psikyo3v1,   soldivid, soldivid, ROT0,   "Psikyo", "Sol Divide - The Sword Of Darkness", GAME_IMPERFECT_SOUND ) // Music missing since SH2 DRC added
13261405GAME( 1997, s1945ii,  0,        psikyo3v1,   s1945ii,  s1945ii,  ROT270, "Psikyo", "Strikers 1945 II", GAME_IMPERFECT_GRAPHICS ) // linescroll/zoom
13271406GAME( 1998, daraku,   0,        psikyo3v1,   daraku,   daraku,   ROT0,   "Psikyo", "Daraku Tenshi - The Fallen Angels", 0 )
13281407GAME( 1998, sbomberb, 0,        psikyo3v1,   sbomberb, sbomberb, ROT270, "Psikyo", "Space Bomber (ver. B)", 0 )
src/mame/drivers/neodrvr.c
r3445r3446
652652
653653    All rom labels need to be reverified
654654
655    SMA protected sets:
656    On some SMA protected sets there is a small sub pcb found, LBA-SUB (2000.2.24), which replaces the
657    regular used 2x32mbit or 4x16mbit proms. LBA-SUB (2000.2.24) contains 4x16mbit mask proms.
658    MVS sets confirmed are garou, mslug3, mslug3a and kof2000.
655659*/
656660
657661ROM_START( nam1975 ) /* MVS AND AES VERSION */
r3445r3446
18711875   ROM_LOAD16_BYTE( "046-c8.bin", 0x600001, 0x100000, CRC(c944e03d) SHA1(be23999b8ce09ee15ba500ce4d5e2a82a4f58d9b) ) /* Plane 2,3 */
18721876ROM_END
18731877
1874
18751878ROM_START( fatfury2 ) /* MVS AND AES VERSION */
18761879   ROM_REGION( 0x100000, "main", 0 )
18771880   ROM_LOAD16_WORD_SWAP( "047-p1.bin", 0x000000, 0x080000, CRC(be40ea92) SHA1(958b891bb8beb6af122d5467257ab20cbc6cf574) )
r3445r3446
21272130
21282131ROM_START( aof2a ) /* make parent? */
21292132   ROM_REGION( 0x200000, "main", 0 )
2130   ROM_LOAD16_WORD_SWAP( "056-p1.bin", 0x000000, 0x100000, CRC(a3b1d021) SHA1(ee42f3ca4516226b0088d0303ed28e3ecdabcd71) )
2131   ROM_LOAD16_WORD_SWAP( "056-ep1.bin", 0x000000, 0x80000, CRC(75d6301c) SHA1(e72d15fba55f96be7b4fa29e705a7b78f56edf7d) ) /* updated revision, loads over the first 512kb */
2133   ROM_LOAD16_WORD_SWAP( "056-p1.bin",  0x000000, 0x100000, CRC(a3b1d021) SHA1(ee42f3ca4516226b0088d0303ed28e3ecdabcd71) )
2134   /* the rom below acts as a patch to the program rom in the cart, replacing the first 512kb */
2135   ROM_LOAD16_WORD_SWAP( "056-ep1.bin", 0x000000, 0x80000, CRC(75d6301c) SHA1(e72d15fba55f96be7b4fa29e705a7b78f56edf7d) )
21322136
21332137   NEO_SFIX_128K( "056-s1.bin", CRC(8b02638e) SHA1(aa4d28804ca602da776948b5f223ea89e427906b) )
21342138
r3445r3446
25432547
25442548   /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
25452549   ROM_REGION( 0x20000, "fixed", 0 )
2546   ROM_FILL(                 0x000000, 0x20000, 0 )
2550   ROM_FILL( 0x000000, 0x20000, 0 )
25472551   ROM_REGION( 0x20000, "fixedbios", 0 )
25482552   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
25492553
r3445r3446
29542958   ROM_LOAD16_BYTE( "087-c8.bin", 0x1800001, 0x100000, CRC(a9e82717) SHA1(e39ee15d5140dbe7f06eea945cce9984a5e8b06a) ) /* Plane 2,3 */
29552959ROM_END
29562960
2957ROM_START( fswords )
2961ROM_START( fswords ) /* KOREAN VERSION */
29582962   ROM_REGION( 0x300000, "main", 0 )
29592963   ROM_LOAD16_WORD_SWAP( "187-p1k.bin", 0x000000, 0x100000, CRC(c8e7c075) SHA1(7b74f2917114460d79d8f46ee24829a4c08cbf2a) )
29602964   ROM_LOAD16_WORD_SWAP( "087-p2.bin",  0x100000, 0x200000, CRC(9bbe27e0) SHA1(b18117102159903c8e8f4e4226e1cc91a400e816) )
r3445r3446
31633167
31643168   ROM_LOAD16_WORD_SWAP( "095-p1.bin",  0x000000, 0x100000, CRC(63b4d8ae) SHA1(03aa9f6bab6aee685d1b57a52823797704eea845) )
31653169   ROM_LOAD16_WORD_SWAP( "095-p2.bin",  0x100000, 0x200000, CRC(cc15826e) SHA1(44d6ac6c0ca697a6f367dcfd809b1e1771cb0635) )
3170   /* the rom below acts as a patch to the program rom in the cart, replacing the first 512kb */
31663171   ROM_LOAD16_WORD_SWAP( "095-ep1.bin", 0x000000, 0x080000, CRC(be0060a3) SHA1(fa741d34898ad5004a23e280139d1446f1a082c7) )
31673172
31683173   NEO_SFIX_128K( "095-s1.bin", CRC(b6bf5e08) SHA1(b527355c35ea097f3448676f2ffa65b8e56ae30c) )
r3445r3446
32143219   ROM_LOAD16_BYTE( "096-c8.bin", 0x1800001, 0x200000, CRC(9a34f99c) SHA1(fca72d95ec42790a7f1e771a1e25dbc5bec5fc19) ) /* Plane 2,3 */
32153220ROM_END
32163221
3217ROM_START( aof3k )
3222ROM_START( aof3k ) /* KOREAN VERSION */
32183223   ROM_REGION( 0x300000, "main", 0 )
32193224   ROM_LOAD16_WORD_SWAP( "196-p1k.bin", 0x000000, 0x100000, CRC(a0780789) SHA1(83657922a9a3502653ef8cda45b15d9f935aa96a) )
3220   ROM_LOAD16_WORD_SWAP( "096-p2.bin", 0x100000, 0x200000, CRC(4d5a2602) SHA1(4c26d6135d2877d9c38169662033e9d0cc24d943) )
3225   ROM_LOAD16_WORD_SWAP( "096-p2.bin", 0x100000, 0x200000, CRC(4d5a2602) SHA1(4c26d6135d2877d9c38169662033e9d0cc24d943) )
32213226
32223227   NEO_SFIX_128K( "096-s1.bin", CRC(cc7fd344) SHA1(2c6846cf8ea61fb192ba181dbccb63594d572c0e) )
32233228
r3445r3446
32653270
32663271ROM_START( turfmast )
32673272   ROM_REGION( 0x200000, "main", 0 )
3268   ROM_LOAD16_WORD_SWAP( "200-p1.bin", 0x100000, 0x100000, CRC(28c83048) SHA1(e7ef87e1de21d2bb17ef17bb08657e92363f0e9a) )
3273   ROM_LOAD16_WORD_SWAP( "200-p1.bin", 0x100000, 0x100000, CRC(28c83048) SHA1(e7ef87e1de21d2bb17ef17bb08657e92363f0e9a) )
32693274   ROM_CONTINUE( 0x000000, 0x100000)
32703275
32713276   NEO_SFIX_128K( "200-s1.bin", CRC(9a5402b2) SHA1(ae1a0b5450869d61b2bb23671c744d3dda8769c4) )
r3445r3446
34253430   ROM_LOAD16_BYTE( "209-c4.bin", 0x800001, 0x100000, CRC(1e9f76f2) SHA1(b57fdc226bfe328b8848127fb4292295f1287bf6) ) /* Plane 2,3 */
34263431ROM_END
34273432
3428/* this Zintrick set appears to be a bootleg made from the CD version, not a genuine
3429   prototype the code is based on that of the NeoCD version with some minor patches,
3430   for example the ADK SAMPLE TEST text that appears on the screen is actually a hacked
3431   PROG LOAD ERROR message.  the set is supported in order to distinguish the hacks from
3432   a real prototype should one turn up. */
3433
3434ROM_START( zintrckb )
3435   ROM_REGION( 0x100000, "main", 0 )
3436   ROM_LOAD16_WORD_SWAP( "zin_p1.rom", 0x000000, 0x100000, CRC(06c8fca7) SHA1(b7bf38965c3d0db4d7a9684d14cac94a45b4a45b))
3437
3438   NEO_SFIX_128K( "zin_s1.rom", CRC(a7ab0e81) SHA1(f0649819b96cea79b05411e0b15c8edc677d79ba) )
3439
3440   NEO_BIOS_AUDIO_128K( "zin_m1.rom", CRC(fd9627ca) SHA1(b640c1f1ff466f734bb1cb5d7b589cb7e8a55346) )
3441
3442   ROM_REGION( 0x200000, "ym", 0 )
3443   ROM_LOAD( "zin_v1.rom", 0x000000, 0x200000, CRC(c09f74f1) SHA1(d0b56a780a6eba85ff092240b1f1cc6718f17c21) )
3444
3445   NO_DELTAT_REGION
3446
3447   ROM_REGION( 0x400000, "sprites", ROMREGION_DISPOSE )
3448   ROM_LOAD16_BYTE( "zin_c1.rom", 0x000000, 0x200000, CRC(76aee189) SHA1(ad6929804c5b9a59aa609e6baebc6aa37e858a47) ) /* Plane 0,1 */
3449   ROM_LOAD16_BYTE( "zin_c2.rom", 0x000001, 0x200000, CRC(844ed4b3) SHA1(fb7cd057bdc6cbe8b78097dd124118bae7402256) ) /* Plane 2,3 */
3450ROM_END
3451
34523433ROM_START( overtop )
34533434   ROM_REGION( 0x200000, "main", 0 )
34543435   ROM_LOAD16_WORD_SWAP( "212-p1.bin", 0x100000, 0x100000, CRC(16c063a9) SHA1(5432869f830eed816ee5ed71c7fd39f749d15619) )
r3445r3446
39993980   ROM_LOAD16_BYTE( "234-c6.bin", 0x2000001, 0x400000, CRC(beafd091) SHA1(55df9cc128eb0f00856de3996c946e3efe8f09a5) ) /* Plane 2,3 */
40003981ROM_END
40013982
4002ROM_START( lastsold )
3983ROM_START( lastsold ) /* KOREAN VERSION */
40033984   ROM_REGION( 0x500000, "main", 0 )
40043985   ROM_LOAD16_WORD_SWAP( "134-p1k.bin", 0x000000, 0x100000, CRC(906f3065) SHA1(25167665f1b8e82e13f7fcf4d0e3c54a925c2a58) )
40053986   ROM_LOAD16_WORD_SWAP( "234-p2.bin",  0x100000, 0x400000, CRC(0fdc289e) SHA1(1ff31c0b0f4f9ddbedaf4bcf927faaae81892ec7) )
r3445r3446
40574038   ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) )
40584039
40594040   ROM_REGION( 0x50000, "audio", 0 )
4060   ROM_LOAD( "236-m1.bin", 0x00000, 0x20000, CRC(880a1abd) SHA1(905afa157aba700e798243b842792e50729b19a0) )  /* so overwrite it with the real thing */
4061   ROM_RELOAD(             0x10000, 0x20000 )
4041   ROM_LOAD( "236-m1.bin", 0x00000, 0x20000, CRC(880a1abd) SHA1(905afa157aba700e798243b842792e50729b19a0) ) /* so overwrite it with the real thing */
4042   ROM_RELOAD( 0x10000, 0x20000 )
40624043
40634044   ROM_REGION( 0x200000, "ym", 0 )
40644045   ROM_LOAD( "236-v1.bin", 0x000000, 0x200000, CRC(5f89c3b4) SHA1(dc8fd561cf8dfdd41696dcf14ea8d2d0ac4eec4b) )
r3445r3446
43024283   ROM_LOAD16_BYTE( "242-c8.bin", 0x3000001, 0x800000, CRC(c823e045) SHA1(886fbf64bcb58bc4eabb1fc9262f6ac9901a0f28) ) /* Plane 2,3 */
43034284ROM_END
43044285
4305ROM_START( kof98k ) /* encrypted code + protection, only z80 rom is different to kof98 */
4286ROM_START( kof98k ) /* encrypted code + protection, only z80 rom is different to kof98 */ /* KOREAN VERSION */
43064287   ROM_REGION( 0x600000, "main", 0 )
43074288   ROM_LOAD16_WORD_SWAP( "242-p1.bin", 0x000000, 0x200000, CRC(8893df89) SHA1(0452828785110601c65f667209fc2d2926cd3751) )
43084289   ROM_LOAD16_WORD_SWAP( "242-p2.bin", 0x200000, 0x400000, CRC(980aba4c) SHA1(5e735929ec6c3ca5b2efae3c7de47bcbb8ade2c5) )
r3445r3446
45494530
45504531   /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
45514532   ROM_REGION( 0x20000, "fixed", 0 )
4552   ROM_FILL(                 0x000000, 0x20000, 0 )
4533   ROM_FILL( 0x000000, 0x20000, 0 )
45534534   ROM_REGION( 0x20000, "fixedbios", 0 )
45544535   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
45554536
r3445r3446
45854566
45864567   /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
45874568   ROM_REGION( 0x20000, "fixed", 0 )
4588   ROM_FILL(                 0x000000, 0x20000, 0 )
4569   ROM_FILL( 0x000000, 0x20000, 0 )
45894570   ROM_REGION( 0x20000, "fixedbios", 0 )
45904571   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
45914572
r3445r3446
46234604
46244605   /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
46254606   ROM_REGION( 0x20000, "fixed", 0 )
4626   ROM_FILL(                 0x000000, 0x20000, 0 )
4607   ROM_FILL( 0x000000, 0x20000, 0 )
46274608   ROM_REGION( 0x20000, "fixedbios", 0 )
46284609   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
46294610
r3445r3446
46594640
46604641   /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
46614642   ROM_REGION( 0x20000, "fixed", 0 )
4662   ROM_FILL(                 0x000000, 0x20000, 0 )
4643   ROM_FILL( 0x000000, 0x20000, 0 )
46634644   ROM_REGION( 0x20000, "fixedbios", 0 )
46644645   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
46654646
r3445r3446
47424723   ROM_LOAD16_BYTE( "252-c2.bin", 0x0000001, 0x800000, CRC(62585474) SHA1(b35461598087aa82886af0030c61b26cc064af5f) ) /* Plane 2,3 */
47434724ROM_END
47444725
4745ROM_START( garou )
4726ROM_START( garou ) /* Original Version - Encrypted GFX */ /* later revision */
47464727   ROM_REGION( 0x900000, "main", 0 )
4747   ROM_LOAD16_WORD_SWAP( "253-sma.bin", 0x0c0000, 0x040000, CRC(98bc93dc) SHA1(01fe3d18b50f770e131e8d8eeff4c630ba8c9551) )   /* stored in the custom chip */
4748   ROM_LOAD16_WORD_SWAP( "253-ep1.p1",  0x100000, 0x200000, CRC(ea3171a4) SHA1(bbda40f652baa0dc5fc6a006c001a1bdb0df43f6) )
4749   ROM_LOAD16_WORD_SWAP( "253-ep2.p2",  0x300000, 0x200000, CRC(382f704b) SHA1(0ace9c84a8b8a0524fd9a503e7d872de1bf1bd52) )
4750   ROM_LOAD16_WORD_SWAP( "253-ep3.p3",  0x500000, 0x200000, CRC(e395bfdd) SHA1(6b50f5ac15bf66b7e4e9bff57594fd3d7530c831) )
4751   ROM_LOAD16_WORD_SWAP( "253-ep4.p4",  0x700000, 0x200000, CRC(da92c08e) SHA1(5556f983ebcebc33160e90a6a6cf589d54c8cedc) )
4728   ROM_LOAD16_WORD_SWAP( "253-sma.kf", 0x0c0000, 0x040000, CRC(98bc93dc) SHA1(01fe3d18b50f770e131e8d8eeff4c630ba8c9551) )   /* stored in the custom chip */
4729   ROM_LOAD16_WORD_SWAP( "253-ep1.p1", 0x100000, 0x200000, CRC(ea3171a4) SHA1(bbda40f652baa0dc5fc6a006c001a1bdb0df43f6) )
4730   ROM_LOAD16_WORD_SWAP( "253-ep2.p2", 0x300000, 0x200000, CRC(382f704b) SHA1(0ace9c84a8b8a0524fd9a503e7d872de1bf1bd52) )
4731   ROM_LOAD16_WORD_SWAP( "253-ep3.p3", 0x500000, 0x200000, CRC(e395bfdd) SHA1(6b50f5ac15bf66b7e4e9bff57594fd3d7530c831) )
4732   ROM_LOAD16_WORD_SWAP( "253-ep4.p4", 0x700000, 0x200000, CRC(da92c08e) SHA1(5556f983ebcebc33160e90a6a6cf589d54c8cedc) )
47524733
47534734   ROM_Y_ZOOM
47544735
r3445r3446
47804761   ROM_LOAD16_BYTE( "253-c8.bin", 0x3000001, 0x800000, CRC(21a11303) SHA1(fd61221ad257c185ef5c1f9694bd6b840b591af3) ) /* Plane 2,3 */
47814762ROM_END
47824763
4783ROM_START( garouo )
4764ROM_START( garouo ) /* Original Version - Encrypted GFX */ /* earlier revision */
47844765   ROM_REGION( 0x900000, "main", 0 )
4785   ROM_LOAD16_WORD_SWAP( "253-smao.bin", 0x0c0000, 0x040000, CRC(96c72233) SHA1(29e19effd40fdf7e5144332396857f4ad0eff13e) )   /* stored in the custom chip */
4786   ROM_LOAD16_WORD_SWAP( "253-p1.bin",   0x100000, 0x400000, CRC(18ae5d7e) SHA1(bdb58ec9137d8653979b47132f2d10e1cc6aaa24) )
4787   ROM_LOAD16_WORD_SWAP( "253-p2.bin",   0x500000, 0x400000, CRC(afffa779) SHA1(ac017986f02277fbcd656b8c02492a3f4216a90e) )
4766   ROM_LOAD16_WORD_SWAP( "253-sma.ke", 0x0c0000, 0x040000, CRC(96c72233) SHA1(29e19effd40fdf7e5144332396857f4ad0eff13e) )   /* stored in the custom chip */
4767   ROM_LOAD16_WORD_SWAP( "253-p1.bin", 0x100000, 0x400000, CRC(18ae5d7e) SHA1(bdb58ec9137d8653979b47132f2d10e1cc6aaa24) )
4768   ROM_LOAD16_WORD_SWAP( "253-p2.bin", 0x500000, 0x400000, CRC(afffa779) SHA1(ac017986f02277fbcd656b8c02492a3f4216a90e) )
47884769
47894770   ROM_Y_ZOOM
47904771
r3445r3446
49094890   ROM_LOAD16_BYTE( "255-c6.bin", 0x2000001, 0x800000, CRC(b001bdd3) SHA1(394ba8004644844ee97a120cfda48aeac685af8a) ) /* Plane 2,3 */
49104891ROM_END
49114892
4912ROM_START( mslug3 ) /* Original Version - Encrypted Code & GFX */
4893ROM_START( mslug3 ) /* Original Version - Encrypted Code & GFX */ /* revision 2000.4.1 */
49134894   ROM_REGION( 0x900000, "main", 0 )
49144895   ROM_LOAD16_WORD_SWAP( "256-sma.bin", 0x0c0000, 0x040000, CRC(9cd55736) SHA1(d6efb2b313127c2911d47d9324626b3f1e7c6ccb) )   /* stored in the custom chip */
49154896   ROM_LOAD16_WORD_SWAP( "256-p1.bin",  0x100000, 0x400000, CRC(b07edfd5) SHA1(dcbd9e500bfae98d754e55cdbbbbf9401013f8ee) )
r3445r3446
51135094
51145095   /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
51155096   ROM_REGION( 0x20000, "fixed", 0 )
5116   ROM_FILL(                 0x000000, 0x20000, 0 )
5097   ROM_FILL( 0x000000, 0x20000, 0 )
51175098   ROM_REGION( 0x20000, "fixedbios", 0 )
51185099   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
51195100
r3445r3446
51325113
51335114ROM_START( sengoku3 ) /* Original Version - Encrypted GFX */
51345115   ROM_REGION( 0x200000, "main", 0 )
5135//  ROM_LOAD16_WORD_SWAP( "261-p1.bin", 0x100000, 0x100000, CRC(5b557201) SHA1(d01421d1dc80fe7d2a46b9f79c0f344b3c81c1e7) ) this one is almost certainly bad
5116   //ROM_LOAD16_WORD_SWAP( "261-p1.bin", 0x100000, 0x100000, CRC(5b557201) SHA1(d01421d1dc80fe7d2a46b9f79c0f344b3c81c1e7) ) this one is almost certainly bad
51365117   ROM_LOAD16_WORD_SWAP( "261-p1.bin", 0x100000, 0x100000, CRC(e0d4bc0a) SHA1(8df366097f224771ca6d1aa5c1691cd46776cd12) )
51375118   ROM_CONTINUE( 0x000000, 0x100000 )
51385119
r3445r3446
51705151
51715152   /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
51725153   ROM_REGION( 0x20000, "fixed", 0 )
5173   ROM_FILL(                 0x000000, 0x20000, 0 )
5154   ROM_FILL( 0x000000, 0x20000, 0 )
51745155   ROM_REGION( 0x20000, "fixedbios", 0 )
51755156   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
51765157
r3445r3446
52065187
52075188   /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
52085189   ROM_REGION( 0x20000, "fixed", 0 )
5209   ROM_FILL(                 0x000000, 0x20000, 0 )
5190   ROM_FILL( 0x000000, 0x20000, 0 )
52105191   ROM_REGION( 0x20000, "fixedbios", 0 )
52115192   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
52125193
r3445r3446
52355216
52365217ROM_START( mslug4 ) /* Original Version - Encrypted GFX */ /* MVS VERSION */
52375218   ROM_REGION( 0x500000, "main", 0 )
5238   ROM_LOAD16_WORD_SWAP( "263-pg1.bin", 0x000000, 0x100000, CRC(27e4def3) SHA1(a08785e8145981bb6b5332a3b2df7eb321253cca) )
5219   ROM_LOAD16_WORD_SWAP( "263-pg1.bin", 0x000000, 0x100000, CRC(27e4def3) SHA1(a08785e8145981bb6b5332a3b2df7eb321253cca) )
52395220   ROM_LOAD16_WORD_SWAP( "263-p2.bin",  0x100000, 0x400000, CRC(fdb7aed8) SHA1(dbeaec38f44e58ffedba99e70fa1439c2bf0dfa3) )
52405221
52415222   ROM_Y_ZOOM
52425223
52435224   /* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
52445225   ROM_REGION( 0x80000, "fixed", 0 )   /* larger char set */
5245   ROM_FILL(                 0x000000, 0x20000, 0 )
5226   ROM_FILL( 0x000000, 0x20000, 0 )
52465227   ROM_REGION( 0x20000, "fixedbios", 0 )
52475228   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
52485229
r3445r3446
52505231   NEO_BIOS_AUDIO_ENCRYPTED_128K( "263-m1.bin", CRC(46ac8228) SHA1(5aeea221050c98e4bb0f16489ce772bf1c80f787) )
52515232
52525233   ROM_REGION( 0x1000000, "ym", 0 )
5234   /* Encrypted */
52535235   ROM_LOAD( "263-v1.bin", 0x000000, 0x800000, CRC(01e9b9cd) SHA1(0b045c2999449f7dab5ae8a42e957d5b6650431e) )
52545236   ROM_LOAD( "263-v2.bin", 0x800000, 0x800000, CRC(4ab2bf81) SHA1(77ccfa48f7e3daddef5fe5229a0093eb2f803742) )
52555237
r3445r3446
52575239
52585240   ROM_REGION( 0x3000000, "sprites", ROMREGION_DISPOSE )
52595241   /* Encrypted */
5260   ROM_LOAD16_BYTE( "263-c1.bin",   0x0000000, 0x800000, CRC(84865f8a) SHA1(34467ada896eb7c7ca58658bf2a932936d8b632c) ) /* Plane 0,1 */
5261   ROM_LOAD16_BYTE( "263-c2.bin",   0x0000001, 0x800000, CRC(81df97f2) SHA1(2b74493b8ec8fd49216a627aeb3db493f76124e3) ) /* Plane 2,3 */
5262   ROM_LOAD16_BYTE( "263-c3.bin",   0x1000000, 0x800000, CRC(1a343323) SHA1(bbbb5232bba538c277ce2ee02e2956ca2243b787) ) /* Plane 0,1 */
5263   ROM_LOAD16_BYTE( "263-c4.bin",   0x1000001, 0x800000, CRC(942cfb44) SHA1(d9b46c71726383c4581fb042e63897e5a3c92d1b) ) /* Plane 2,3 */
5264   ROM_LOAD16_BYTE( "263-c5.bin",   0x2000000, 0x800000, CRC(a748854f) SHA1(2611bbedf9b5d8e82c6b2c99b88f842c46434d41) ) /* Plane 0,1 */
5265   ROM_LOAD16_BYTE( "263-c6.bin",   0x2000001, 0x800000, CRC(5c8ba116) SHA1(6034db09c8706d4ddbcefc053efbc47a0953eb92) ) /* Plane 2,3 */
5242   ROM_LOAD16_BYTE( "263-c1.bin", 0x0000000, 0x800000, CRC(84865f8a) SHA1(34467ada896eb7c7ca58658bf2a932936d8b632c) ) /* Plane 0,1 */
5243   ROM_LOAD16_BYTE( "263-c2.bin", 0x0000001, 0x800000, CRC(81df97f2) SHA1(2b74493b8ec8fd49216a627aeb3db493f76124e3) ) /* Plane 2,3 */
5244   ROM_LOAD16_BYTE( "263-c3.bin", 0x1000000, 0x800000, CRC(1a343323) SHA1(bbbb5232bba538c277ce2ee02e2956ca2243b787) ) /* Plane 0,1 */
5245   ROM_LOAD16_BYTE( "263-c4.bin", 0x1000001, 0x800000, CRC(942cfb44) SHA1(d9b46c71726383c4581fb042e63897e5a3c92d1b) ) /* Plane 2,3 */
5246   ROM_LOAD16_BYTE( "263-c5.bin", 0x2000000, 0x800000, CRC(a748854f) SHA1(2611bbedf9b5d8e82c6b2c99b88f842c46434d41) ) /* Plane 0,1 */
5247   ROM_LOAD16_BYTE( "263-c6.bin", 0x2000001, 0x800000, CRC(5c8ba116) SHA1(6034db09c8706d4ddbcefc053efbc47a0953eb92) ) /* Plane 2,3 */
52665248ROM_END
52675249
5268ROM_START( ms4plus )
5269   ROM_REGION( 0x500000, "main", 0 )
5270   ROM_LOAD16_WORD_SWAP( "263-p1p.bin", 0x000000, 0x100000, CRC(806a6e04) SHA1(df503772d607271ea51285154c9fd68e18b143ce) )
5271   ROM_LOAD16_WORD_SWAP( "263-p2.bin",  0x100000, 0x400000, CRC(fdb7aed8) SHA1(dbeaec38f44e58ffedba99e70fa1439c2bf0dfa3) )
5272
5273   /* bootleg: regular s1 rom */
5274   NEO_SFIX_128K( "263-s1p.bin",  CRC(07ff87ce) SHA1(96ddb439de2a26bf9869015d7fb19129d40f3fd9) )
5275
5276   /* bootleg: non-encrypted m1 */
5277   NEO_BIOS_AUDIO_128K( "263-m1_bootleg.bin", CRC(ef5db532) SHA1(4aeba9e206b8f309610eb7e1891644f39aa61830) )
5278
5279   ROM_REGION( 0x1000000, "ym", 0 )
5280   /* bootleg: non-encrypted samples */
5281   ROM_LOAD( "263-v1bl.bin", 0x000000, 0x800000, CRC(fd6b982e) SHA1(100313166c9ec57f1c540de05625c506b30ad13c) )
5282   ROM_LOAD( "263-v2bl.bin", 0x800000, 0x800000, CRC(20125227) SHA1(2e350c0c580e87445bf103c01fc62b14f0c19216) )
5283
5284   NO_DELTAT_REGION
5285
5286   ROM_REGION( 0x3000000, "sprites", ROMREGION_DISPOSE )
5287   /* bootleg: non-encrypted gfx */
5288   ROM_LOAD16_BYTE( "263-c1bl.bin",   0x0000000, 0x800000, CRC(a75ffcde) SHA1(97f405a95a56615ae49f79e1a69f98cc2f2434ef) ) /* Plane 0,1 */
5289   ROM_LOAD16_BYTE( "263-c2bl.bin",   0x0000001, 0x800000, CRC(5ab0d12b) SHA1(8a3d95dd2e9cc1b6dcf6a957fed43ee390248307) ) /* Plane 2,3 */
5290   ROM_LOAD16_BYTE( "263-c3bl.bin",   0x1000000, 0x800000, CRC(61af560c) SHA1(aa7bc45e03a6bbd18eb56d118d4932102ccb196a) ) /* Plane 0,1 */
5291   ROM_LOAD16_BYTE( "263-c4bl.bin",   0x1000001, 0x800000, CRC(f2c544fd) SHA1(179b064f81b49f5808d7a7a5bce28e95b09e5abe) ) /* Plane 2,3 */
5292   ROM_LOAD16_BYTE( "263-c5bl.bin",   0x2000000, 0x800000, CRC(84c66c44) SHA1(9273f44bf11891aa04ddd2cbb6442d084c2a2e04) ) /* Plane 0,1 */
5293   ROM_LOAD16_BYTE( "263-c6bl.bin",   0x2000001, 0x800000, CRC(5ed018ab) SHA1(e78501fa8a80960093a4d54ce952681a98300148) ) /* Plane 2,3 */
5294ROM_END
5295
52965250ROM_START( rotd ) /* Encrypted Set */ /* MVS VERSION */
52975251   ROM_REGION( 0x800000, "main", 0 )
52985252   ROM_LOAD16_WORD_SWAP( "264-p1.bin", 0x000000, 0x800000, CRC(b8cc969d) SHA1(4f2205b4bdd32dd1522106ef4df10ac0eb1b852d) )
r3445r3446
53275281   ROM_LOAD16_BYTE( "264-c8.bin", 0x3000001, 0x800000, CRC(c5edb5c4) SHA1(253378c8739daa5da4edb15eff7050820b2b3755) ) /* Plane 2,3 */
53285282ROM_END
53295283
5330ROM_START( kof2002 ) /* Encrypted Set */
5284ROM_START( kof2002 ) /* Encrypted Set */ /* MVS AND AES VERSION */
53315285   ROM_REGION( 0x500000, "main", 0 )
53325286   ROM_LOAD16_WORD_SWAP( "265-p1.bin", 0x000000, 0x100000, CRC(9ede7323) SHA1(ad9d45498777fda9fa58e75781f48e09aee705a6) )
53335287   ROM_LOAD16_WORD_SWAP( "265-p2.bin", 0x100000, 0x400000, CRC(327266b8) SHA1(98f445cc0a94f8744d74bca71cb420277622b034) )
r3445r3446
53625316   ROM_LOAD16_BYTE( "265-c8.bin", 0x3000001, 0x800000, CRC(ab0bb549) SHA1(d23afb60b7f831f7d4a98ad3c4a00ee19877a1ce) ) /* Plane 2,3 */
53635317ROM_END
53645318
5365ROM_START( kf2k2pls ) /* bootleg */
5366   ROM_REGION( 0x500000, "main", 0 )
5367   ROM_LOAD16_WORD_SWAP( "265-p1p.bin", 0x000000, 0x100000, CRC(3ab03781) SHA1(86946c19f1c4d9ab5cde86688d698bf63118a39d) )
5368   ROM_LOAD16_WORD_SWAP( "265-p2.bin", 0x100000, 0x400000, CRC(327266b8) SHA1(98f445cc0a94f8744d74bca71cb420277622b034) )
5369
5370   NEO_SFIX_128K( "265-s1p.bin", CRC(595e0006) SHA1(ff086bdaa6f40e9ad963e1100a27f44618d684ed) )
5371
5372   /* Correct To Use Decrypted? */
5373   NEO_BIOS_AUDIO_128K( "265-m1_bootleg.bin", CRC(1c661a4b) SHA1(4e5aa862a0a182a806d538996ddc68d9f2dffaf7) )
5374
5375   ROM_REGION( 0x1000000, "ym", 0 )
5376   /* Encrypted */
5377   ROM_LOAD( "265-v1.bin", 0x000000, 0x800000, CRC(15e8f3f5) SHA1(7c9e6426b9fa6db0158baa17a6485ffce057d889) )
5378   ROM_LOAD( "265-v2.bin", 0x800000, 0x800000, CRC(da41d6f9) SHA1(a43021f1e58947dcbe3c8ca5283b20b649f0409d) )
5379
5380   NO_DELTAT_REGION
5381
5382   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
5383   /* Encrypted */
5384   ROM_LOAD16_BYTE( "265-c1.bin", 0x0000000, 0x800000, CRC(2b65a656) SHA1(9c46d8cf5b1ef322db442ac6a9b9406ab49206c5) ) /* Plane 0,1 */
5385   ROM_LOAD16_BYTE( "265-c2.bin", 0x0000001, 0x800000, CRC(adf18983) SHA1(150cd4a5e51e9df88688469d2ea7675c2cf3658a) ) /* Plane 2,3 */
5386   ROM_LOAD16_BYTE( "265-c3.bin", 0x1000000, 0x800000, CRC(875e9fd7) SHA1(28f52d56192d48bbc5dc3c97abf456bd34a58cbd) ) /* Plane 0,1 */
5387   ROM_LOAD16_BYTE( "265-c4.bin", 0x1000001, 0x800000, CRC(2da13947) SHA1(f8d79ec2c236aa3d3648a4f715676899602122c1) ) /* Plane 2,3 */
5388   ROM_LOAD16_BYTE( "265-c5.bin", 0x2000000, 0x800000, CRC(61bd165d) SHA1(b3424db84bc683d858fb635bc42728f9cdd89caf) ) /* Plane 0,1 */
5389   ROM_LOAD16_BYTE( "265-c6.bin", 0x2000001, 0x800000, CRC(03fdd1eb) SHA1(6155c7e802062f4eafa27e414c4e73ee59b868bf) ) /* Plane 2,3 */
5390   ROM_LOAD16_BYTE( "265-c7.bin", 0x3000000, 0x800000, CRC(1a2749d8) SHA1(af7d9ec1d576209826fa568f676bbff92f6d6ddd) ) /* Plane 0,1 */
5391   ROM_LOAD16_BYTE( "265-c8.bin", 0x3000001, 0x800000, CRC(ab0bb549) SHA1(d23afb60b7f831f7d4a98ad3c4a00ee19877a1ce) ) /* Plane 2,3 */
5392ROM_END
5393
5394ROM_START( kf2k2pla ) /* bootleg */
5395   ROM_REGION( 0x500000, "main", 0 )
5396   ROM_LOAD16_WORD_SWAP( "265-p1pa.bin", 0x000000, 0x100000, CRC(6a3a02f3) SHA1(c9973b64e9a87fa38dde233ee3e9a73ba085b013) )
5397   ROM_LOAD16_WORD_SWAP( "265-p2.bin", 0x100000, 0x400000, CRC(327266b8) SHA1(98f445cc0a94f8744d74bca71cb420277622b034) )
5398
5399   NEO_SFIX_128K( "265-s1pa.bin",  CRC(1a3ed064) SHA1(9749bb55c750e6b65d651998c2649c5fb68db68e))
5400
5401   /* Correct To Use Decrypted? */
5402   NEO_BIOS_AUDIO_128K( "265-m1_bootleg.bin", CRC(1c661a4b) SHA1(4e5aa862a0a182a806d538996ddc68d9f2dffaf7) )
5403
5404   ROM_REGION( 0x1000000, "ym", 0 )
5405   /* Encrypted */
5406   ROM_LOAD( "265-v1.bin", 0x000000, 0x800000, CRC(15e8f3f5) SHA1(7c9e6426b9fa6db0158baa17a6485ffce057d889) )
5407   ROM_LOAD( "265-v2.bin", 0x800000, 0x800000, CRC(da41d6f9) SHA1(a43021f1e58947dcbe3c8ca5283b20b649f0409d) )
5408
5409   NO_DELTAT_REGION
5410
5411   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
5412   /* Encrypted */
5413   ROM_LOAD16_BYTE( "265-c1.bin", 0x0000000, 0x800000, CRC(2b65a656) SHA1(9c46d8cf5b1ef322db442ac6a9b9406ab49206c5) ) /* Plane 0,1 */
5414   ROM_LOAD16_BYTE( "265-c2.bin", 0x0000001, 0x800000, CRC(adf18983) SHA1(150cd4a5e51e9df88688469d2ea7675c2cf3658a) ) /* Plane 2,3 */
5415   ROM_LOAD16_BYTE( "265-c3.bin", 0x1000000, 0x800000, CRC(875e9fd7) SHA1(28f52d56192d48bbc5dc3c97abf456bd34a58cbd) ) /* Plane 0,1 */
5416   ROM_LOAD16_BYTE( "265-c4.bin", 0x1000001, 0x800000, CRC(2da13947) SHA1(f8d79ec2c236aa3d3648a4f715676899602122c1) ) /* Plane 2,3 */
5417   ROM_LOAD16_BYTE( "265-c5.bin", 0x2000000, 0x800000, CRC(61bd165d) SHA1(b3424db84bc683d858fb635bc42728f9cdd89caf) ) /* Plane 0,1 */
5418   ROM_LOAD16_BYTE( "265-c6.bin", 0x2000001, 0x800000, CRC(03fdd1eb) SHA1(6155c7e802062f4eafa27e414c4e73ee59b868bf) ) /* Plane 2,3 */
5419   ROM_LOAD16_BYTE( "265-c7.bin", 0x3000000, 0x800000, CRC(1a2749d8) SHA1(af7d9ec1d576209826fa568f676bbff92f6d6ddd) ) /* Plane 0,1 */
5420   ROM_LOAD16_BYTE( "265-c8.bin", 0x3000001, 0x800000, CRC(ab0bb549) SHA1(d23afb60b7f831f7d4a98ad3c4a00ee19877a1ce) ) /* Plane 2,3 */
5421ROM_END
5422
5423ROM_START( kf2k2mp ) /* bootleg */
5424   ROM_REGION( 0x800000, "main", 0 )
5425   ROM_LOAD16_WORD_SWAP( "kf02m-p1.bin", 0x000000, 0x400000, CRC(ff7c6ec0) SHA1(704c14d671dcb4cfed44d9f978a289cb7dd9d065) )
5426   ROM_LOAD16_WORD_SWAP( "kf02m-p2.bin", 0x400000, 0x400000, CRC(91584716) SHA1(90da863037cf775957fa154cd42536e221df5740) )
5427
5428   NEO_SFIX_128K( "kf02m-s1.bin", CRC(348d6f2c) SHA1(586da8a936ebbb71af324339a4b60ec91dfa0990) )
5429
5430   /* Decrypted */
5431   NEO_BIOS_AUDIO_128K( "265-m1_bootleg.bin", CRC(1c661a4b) SHA1(4e5aa862a0a182a806d538996ddc68d9f2dffaf7) )
5432
5433   ROM_REGION( 0x1000000, "ym", 0 )
5434   /* Encrypted */
5435   ROM_LOAD( "265-v1.bin", 0x000000, 0x800000, CRC(15e8f3f5) SHA1(7c9e6426b9fa6db0158baa17a6485ffce057d889) )
5436   ROM_LOAD( "265-v2.bin", 0x800000, 0x800000, CRC(da41d6f9) SHA1(a43021f1e58947dcbe3c8ca5283b20b649f0409d) )
5437
5438   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
5439   /* Encrypted */
5440   ROM_LOAD16_BYTE( "265-c1.bin", 0x0000000, 0x800000, CRC(2b65a656) SHA1(9c46d8cf5b1ef322db442ac6a9b9406ab49206c5) ) /* Plane 0,1 */
5441   ROM_LOAD16_BYTE( "265-c2.bin", 0x0000001, 0x800000, CRC(adf18983) SHA1(150cd4a5e51e9df88688469d2ea7675c2cf3658a) ) /* Plane 2,3 */
5442   ROM_LOAD16_BYTE( "265-c3.bin", 0x1000000, 0x800000, CRC(875e9fd7) SHA1(28f52d56192d48bbc5dc3c97abf456bd34a58cbd) ) /* Plane 0,1 */
5443   ROM_LOAD16_BYTE( "265-c4.bin", 0x1000001, 0x800000, CRC(2da13947) SHA1(f8d79ec2c236aa3d3648a4f715676899602122c1) ) /* Plane 2,3 */
5444   ROM_LOAD16_BYTE( "265-c5.bin", 0x2000000, 0x800000, CRC(61bd165d) SHA1(b3424db84bc683d858fb635bc42728f9cdd89caf) ) /* Plane 0,1 */
5445   ROM_LOAD16_BYTE( "265-c6.bin", 0x2000001, 0x800000, CRC(03fdd1eb) SHA1(6155c7e802062f4eafa27e414c4e73ee59b868bf) ) /* Plane 2,3 */
5446   ROM_LOAD16_BYTE( "265-c7.bin", 0x3000000, 0x800000, CRC(1a2749d8) SHA1(af7d9ec1d576209826fa568f676bbff92f6d6ddd) ) /* Plane 0,1 */
5447   ROM_LOAD16_BYTE( "265-c8.bin", 0x3000001, 0x800000, CRC(ab0bb549) SHA1(d23afb60b7f831f7d4a98ad3c4a00ee19877a1ce) ) /* Plane 2,3 */
5448ROM_END
5449
5450ROM_START( kf2k2mp2 ) /* bootleg */
5451   ROM_REGION( 0x600000, "main", 0 )
5452   ROM_LOAD16_WORD_SWAP( "k2k2m2p1.bin", 0x000000, 0x200000, CRC(1016806c) SHA1(a583b45e9c0d6f67b95c52e44444aabe88f68d97) )
5453   ROM_LOAD16_WORD_SWAP( "k2k2m2p2.bin", 0x200000, 0x400000, CRC(432fdf53) SHA1(d7e542cd84d948162c60768e40ee4ed33d8e7913) )
5454
5455   NEO_SFIX_128K( "k2k2m2s1.bin",  CRC(446e74c5) SHA1(efc2afb26578bad9eb21659c70eb0f827d6d1ef6) )
5456
5457   /* Decrypted */
5458   NEO_BIOS_AUDIO_128K( "265-m1_bootleg.bin", CRC(1c661a4b) SHA1(4e5aa862a0a182a806d538996ddc68d9f2dffaf7) )
5459
5460   ROM_REGION( 0x1000000, "ym", 0 )
5461   /* Encrypted */
5462   ROM_LOAD( "265-v1.bin", 0x000000, 0x800000, CRC(15e8f3f5) SHA1(7c9e6426b9fa6db0158baa17a6485ffce057d889) )
5463   ROM_LOAD( "265-v2.bin", 0x800000, 0x800000, CRC(da41d6f9) SHA1(a43021f1e58947dcbe3c8ca5283b20b649f0409d) )
5464
5465   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
5466   /* Encrypted */
5467   ROM_LOAD16_BYTE( "265-c1.bin", 0x0000000, 0x800000, CRC(2b65a656) SHA1(9c46d8cf5b1ef322db442ac6a9b9406ab49206c5) ) /* Plane 0,1 */
5468   ROM_LOAD16_BYTE( "265-c2.bin", 0x0000001, 0x800000, CRC(adf18983) SHA1(150cd4a5e51e9df88688469d2ea7675c2cf3658a) ) /* Plane 2,3 */
5469   ROM_LOAD16_BYTE( "265-c3.bin", 0x1000000, 0x800000, CRC(875e9fd7) SHA1(28f52d56192d48bbc5dc3c97abf456bd34a58cbd) ) /* Plane 0,1 */
5470   ROM_LOAD16_BYTE( "265-c4.bin", 0x1000001, 0x800000, CRC(2da13947) SHA1(f8d79ec2c236aa3d3648a4f715676899602122c1) ) /* Plane 2,3 */
5471   ROM_LOAD16_BYTE( "265-c5.bin", 0x2000000, 0x800000, CRC(61bd165d) SHA1(b3424db84bc683d858fb635bc42728f9cdd89caf) ) /* Plane 0,1 */
5472   ROM_LOAD16_BYTE( "265-c6.bin", 0x2000001, 0x800000, CRC(03fdd1eb) SHA1(6155c7e802062f4eafa27e414c4e73ee59b868bf) ) /* Plane 2,3 */
5473   ROM_LOAD16_BYTE( "265-c7.bin", 0x3000000, 0x800000, CRC(1a2749d8) SHA1(af7d9ec1d576209826fa568f676bbff92f6d6ddd) ) /* Plane 0,1 */
5474   ROM_LOAD16_BYTE( "265-c8.bin", 0x3000001, 0x800000, CRC(ab0bb549) SHA1(d23afb60b7f831f7d4a98ad3c4a00ee19877a1ce) ) /* Plane 2,3 */
5475ROM_END
5476
54775319ROM_START( matrim ) /* Encrypted Set */ /* MVS AND AES VERSION */
54785320   ROM_REGION( 0x500000, "main", 0 )
54795321   ROM_LOAD16_WORD_SWAP( "266-p1.bin", 0x000000, 0x100000, CRC(5d4c2dc7) SHA1(8d723b0d28ec344eef26009b361a2b97d300dd51) )
r3445r3446
56065448   ROM_LOAD16_BYTE( "268-c8c.bin", 0x3000001, 0x800000, CRC(551d720e) SHA1(ebf69e334fcaba0fda6fd432fd0970283a365d12) ) /* Plane 2,3 */
56075449ROM_END
56085450
5609ROM_START( ms5plus )
5610   ROM_REGION( 0x500000, "main", 0 )
5611   ROM_LOAD16_WORD_SWAP( "268-p1p.bin", 0x000000, 0x100000, CRC(106b276f) SHA1(0e840df95f3813145e5043573483c7610d2d3e68) )
5612   ROM_LOAD16_WORD_SWAP( "268-p2p.bin", 0x100000, 0x200000, CRC(d6a458e8) SHA1(c0a8bdae06d62859fb6734766ccc190eb2a809a4) )
5613   ROM_LOAD16_WORD_SWAP( "268-p3p.bin", 0x300000, 0x200000, CRC(439ec031) SHA1(f0ad8f9be7d26bc504593c1321bd23c286a221f0) )
5614
5615   ROM_Y_ZOOM
5616
5617   ROM_REGION( 0x20000, "fixed", 0 )
5618   ROM_LOAD("268-s1p.bin", 0x000000, 0x20000, CRC(21e04432) SHA1(10057a2aa487087f7143d1d69fdad978a6bef0f7) )
5619   ROM_REGION( 0x20000, "fixedbios", 0 )
5620   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
5621
5622   /* Correct to use Decrypted Rom? */
5623   NEO_BIOS_AUDIO_64K( "268-m1_bootleg.bin",  CRC(3c0655a7) SHA1(ae839d4c2b87a7aa3dd8e5caddc43eb75ee9b732) ) /* not a 100% match for encrypted version */
5624
5625   ROM_REGION( 0x1000000, "ym", 0 )
5626   /* Encrypted */
5627   ROM_LOAD( "268-v1c.bin", 0x000000, 0x800000, CRC(ae31d60c) SHA1(c42285cf4e52fea74247860813e826df5aa7600a) )
5628   ROM_LOAD( "268-v2c.bin", 0x800000, 0x800000, CRC(c40613ed) SHA1(af889570304e2867d7dfea1e94e388c06249fb67) )
5629
5630   NO_DELTAT_REGION
5631
5632   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
5633   /* Encrypted */
5634   ROM_LOAD16_BYTE( "268-c1c.bin", 0x0000000, 0x800000, CRC(ab7c389a) SHA1(025a188de589500bf7637fa8e7a37ab24bf4312e) ) /* Plane 0,1 */
5635   ROM_LOAD16_BYTE( "268-c2c.bin", 0x0000001, 0x800000, CRC(3560881b) SHA1(493d218c92290b4770024d6ee2917c4022753b07) ) /* Plane 2,3 */
5636   ROM_LOAD16_BYTE( "268-c3c.bin", 0x1000000, 0x800000, CRC(3af955ea) SHA1(cf36b6ae9b0d12744b17cb7a928399214de894be) ) /* Plane 0,1 */
5637   ROM_LOAD16_BYTE( "268-c4c.bin", 0x1000001, 0x800000, CRC(c329c373) SHA1(5073d4079958a0ef5426885af2c9e3178f37d5e0) ) /* Plane 2,3 */
5638   ROM_LOAD16_BYTE( "268-c5c.bin", 0x2000000, 0x800000, CRC(959c8177) SHA1(889bda7c65d71172e7d89194d1269561888fe789) ) /* Plane 0,1 */
5639   ROM_LOAD16_BYTE( "268-c6c.bin", 0x2000001, 0x800000, CRC(010a831b) SHA1(aec140661e3ae35d264df416478ba15188544d91) ) /* Plane 2,3 */
5640   ROM_LOAD16_BYTE( "268-c7c.bin", 0x3000000, 0x800000, CRC(6d72a969) SHA1(968dd9a4d1209b770b9b85ea6532fa24d262a262) ) /* Plane 0,1 */
5641   ROM_LOAD16_BYTE( "268-c8c.bin", 0x3000001, 0x800000, CRC(551d720e) SHA1(ebf69e334fcaba0fda6fd432fd0970283a365d12) ) /* Plane 2,3 */
5642ROM_END
5643
56445451ROM_START( svc ) /* Encrypted Set */ /* MVS AND AES VERSION */
56455452   ROM_REGION( 0x800000, "main", 0 )
56465453   ROM_LOAD32_WORD_SWAP( "269-p1.bin", 0x000000, 0x400000, CRC(38e2005e) SHA1(1b902905916a30969282f1399a756e32ff069097) )
r3445r3446
56745481   ROM_LOAD16_BYTE( "269-c8r.bin", 0x3000001, 0x800000, CRC(2570b71b) SHA1(99266e1c2ffcf324793fb5c55325fbc7e6265ac0) ) /* Plane 2,3 */
56755482ROM_END
56765483
5677ROM_START( svcboot ) /* bootleg */
5678   ROM_REGION( 0x800000, "main", 0 )
5679   ROM_LOAD16_WORD_SWAP( "svc-p1.bin", 0x000000, 0x800000, CRC(0348f162) SHA1(c313351d68effd92aeb80ed320e4f8c26a3bb53e) )
5680
5681   ROM_REGION( 0x20000, "fixed", 0 )
5682   ROM_LOAD( "svc-s1.bin", 0x10000, 0x10000, CRC(70b44df1) SHA1(52ae3f264d7b33e94e770e6b2d0cf35a64e7dda4) )
5683   ROM_CONTINUE(         0x00000, 0x10000 )
5684   ROM_REGION( 0x20000, "fixedbios", 0 )
5685   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
5686
5687   NEOGEO_BIOS
5688
5689   ROM_REGION( 0x20000, "audiobios", 0 )
5690   ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) )
5691
5692   ROM_REGION( 0x50000, "audio", 0 )
5693   ROM_LOAD( "svc-m1.bin", 0x20000, 0x10000, CRC(804328c3) SHA1(f931636c563b0789d4812033a77b47bf663db43f) )
5694   ROM_CONTINUE(           0x00000, 0x10000 )
5695   ROM_COPY( "audio",  0x00000, 0x10000, 0x10000 )
5696
5697   ROM_Y_ZOOM
5698
5699   ROM_REGION( 0x1000000, "ym", 0 )
5700   ROM_LOAD16_WORD_SWAP( "svc-v2.bin", 0x000000, 0x400000, CRC(b5097287) SHA1(3ba3a9b5624879616382ed40337a3d9c50a0f314) )
5701   ROM_LOAD16_WORD_SWAP( "svc-v1.bin", 0x400000, 0x400000, CRC(bd3a391f) SHA1(972bf09b75e99a683ee965bec93b0da8f15d72d9) )
5702   ROM_LOAD16_WORD_SWAP( "svc-v4.bin", 0x800000, 0x400000, CRC(33fc0b37) SHA1(d61017d829f44c7df8795ba10c55c727d9972662) )
5703   ROM_LOAD16_WORD_SWAP( "svc-v3.bin", 0xc00000, 0x400000, CRC(aa9849a0) SHA1(9539b3356a070a066a89f27c287f316e7367ce2a) )
5704
5705   NO_DELTAT_REGION
5706
5707   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
5708   ROM_LOAD16_BYTE( "svc-c1.bin", 0x0000000, 0x800000, CRC(a7826b89) SHA1(3bbe348ce54b80b56ef032ea532a18ef3cafeb11) ) /* Plane 0,1 */
5709   ROM_LOAD16_BYTE( "svc-c2.bin", 0x0000001, 0x800000, CRC(ed3c2089) SHA1(b5d17692f15f5a678c273589fab2e3918711135e) ) /* Plane 2,3 */
5710   ROM_LOAD16_BYTE( "svc-c3.bin", 0x1000000, 0x800000, CRC(71ed8063) SHA1(ea1df9e2e382a8560a06d447421844cc588f43dd) ) /* Plane 0,1 */
5711   ROM_LOAD16_BYTE( "svc-c4.bin", 0x1000001, 0x800000, CRC(250bde2d) SHA1(8c72dcfceef6d022ab4b73ab37cf3ac0c3940c17) ) /* Plane 2,3 */
5712   ROM_LOAD16_BYTE( "svc-c5.bin", 0x2000000, 0x800000, CRC(9817c082) SHA1(1bea9c7220c2b1524896c86841d6d8fd55f5d366) ) /* Plane 0,1 */
5713   ROM_LOAD16_BYTE( "svc-c6.bin", 0x2000001, 0x800000, CRC(2bc0307f) SHA1(8090fa82c46eb503832359093c8cc3cee3141c90) ) /* Plane 2,3 */
5714   ROM_LOAD16_BYTE( "svc-c7.bin", 0x3000000, 0x800000, CRC(4358d7b9) SHA1(9270b58c2abc072a046bedda72f1395df26d0714) ) /* Plane 0,1 */
5715   ROM_LOAD16_BYTE( "svc-c8.bin", 0x3000001, 0x800000, CRC(366deee5) SHA1(d477ad7a5987fd6c7ef2c1680fbb7c884654590e) ) /* Plane 2,3 */
5716ROM_END
5717
5718ROM_START( svcplus ) /* bootleg */
5719   ROM_REGION( 0x600000, "main", 0 )
5720   ROM_LOAD16_WORD_SWAP( "svc-p1p.bin", 0x000000, 0x200000, CRC(a194d842) SHA1(72b7bfa34a97632b1aa003488e074d766a6c2f08) )
5721   ROM_LOAD16_WORD_SWAP( "svc-p2p.bin", 0x200000, 0x200000, CRC(50c0e2b7) SHA1(97b396415ab0e692e43ddf371091e5a456712f0a) )
5722   ROM_LOAD16_WORD_SWAP( "svc-p3p.bin", 0x400000, 0x200000, CRC(58cdc293) SHA1(3c4f2418ec513bcc13ed33a727de11dfb98f7525) )
5723
5724   NEO_SFIX_128K( "svc-s1p.bin", CRC(73344711) SHA1(04d84c4fe241b9135cd210f8ed8c725f595d11d2) )
5725
5726   NEOGEO_BIOS
5727
5728   ROM_REGION( 0x20000, "audiobios", 0 )
5729   ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) )
5730
5731   ROM_REGION( 0x50000, "audio", 0 )
5732   ROM_LOAD( "svc-m1.bin", 0x20000, 0x10000, CRC(804328c3) SHA1(f931636c563b0789d4812033a77b47bf663db43f) )
5733   ROM_CONTINUE(           0x00000, 0x10000 )
5734   ROM_COPY( "audio",  0x00000, 0x10000, 0x10000 )
5735
5736   ROM_REGION( 0x1000000, "ym", 0 )
5737   ROM_LOAD16_WORD_SWAP( "svc-v2.bin", 0x000000, 0x400000, CRC(b5097287) SHA1(3ba3a9b5624879616382ed40337a3d9c50a0f314) )
5738   ROM_LOAD16_WORD_SWAP( "svc-v1.bin", 0x400000, 0x400000, CRC(bd3a391f) SHA1(972bf09b75e99a683ee965bec93b0da8f15d72d9) )
5739   ROM_LOAD16_WORD_SWAP( "svc-v4.bin", 0x800000, 0x400000, CRC(33fc0b37) SHA1(d61017d829f44c7df8795ba10c55c727d9972662) )
5740   ROM_LOAD16_WORD_SWAP( "svc-v3.bin", 0xc00000, 0x400000, CRC(aa9849a0) SHA1(9539b3356a070a066a89f27c287f316e7367ce2a) )
5741
5742   NO_DELTAT_REGION
5743
5744   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
5745   ROM_LOAD16_BYTE( "svc-c1.bin", 0x0000000, 0x800000, CRC(a7826b89) SHA1(3bbe348ce54b80b56ef032ea532a18ef3cafeb11) ) /* Plane 0,1 */
5746   ROM_LOAD16_BYTE( "svc-c2.bin", 0x0000001, 0x800000, CRC(ed3c2089) SHA1(b5d17692f15f5a678c273589fab2e3918711135e) ) /* Plane 2,3 */
5747   ROM_LOAD16_BYTE( "svc-c3.bin", 0x1000000, 0x800000, CRC(71ed8063) SHA1(ea1df9e2e382a8560a06d447421844cc588f43dd) ) /* Plane 0,1 */
5748   ROM_LOAD16_BYTE( "svc-c4.bin", 0x1000001, 0x800000, CRC(250bde2d) SHA1(8c72dcfceef6d022ab4b73ab37cf3ac0c3940c17) ) /* Plane 2,3 */
5749   ROM_LOAD16_BYTE( "svc-c5.bin", 0x2000000, 0x800000, CRC(9817c082) SHA1(1bea9c7220c2b1524896c86841d6d8fd55f5d366) ) /* Plane 0,1 */
5750   ROM_LOAD16_BYTE( "svc-c6.bin", 0x2000001, 0x800000, CRC(2bc0307f) SHA1(8090fa82c46eb503832359093c8cc3cee3141c90) ) /* Plane 2,3 */
5751   ROM_LOAD16_BYTE( "svc-c7.bin", 0x3000000, 0x800000, CRC(4358d7b9) SHA1(9270b58c2abc072a046bedda72f1395df26d0714) ) /* Plane 0,1 */
5752   ROM_LOAD16_BYTE( "svc-c8.bin", 0x3000001, 0x800000, CRC(366deee5) SHA1(d477ad7a5987fd6c7ef2c1680fbb7c884654590e) ) /* Plane 2,3 */
5753ROM_END
5754
5755ROM_START( svcplusa ) /* bootleg */
5756   ROM_REGION( 0x600000, "main", 0 )
5757   ROM_LOAD16_WORD_SWAP( "svc-p1pl.bin", 0x000000, 0x200000, CRC(16b44144) SHA1(5eab530274b1b6f480a39a86c199da524cddfccc) )
5758   ROM_LOAD16_WORD_SWAP( "svc-p2pl.bin", 0x200000, 0x400000, CRC(7231ace2) SHA1(d2f13ddd5d3ee29b4b9824e8663f7ee0241f30cf) )
5759
5760   ROM_REGION( 0x20000, "fixed", 0 )
5761   ROM_LOAD( "svc-s1pl.bin", 0x10000, 0x10000, CRC(ca3c735e) SHA1(aebd15253c90432a2e0a4c40f37110c1e2176ee4) )
5762   ROM_CONTINUE(         0x00000, 0x10000 )
5763   ROM_REGION( 0x20000, "fixedbios", 0 )
5764   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
5765
5766   NEOGEO_BIOS
5767
5768   ROM_REGION( 0x20000, "audiobios", 0 )
5769   ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) )
5770
5771   ROM_REGION( 0x50000, "audio", 0 )
5772   ROM_LOAD( "svc-m1.bin", 0x20000, 0x10000, CRC(804328c3) SHA1(f931636c563b0789d4812033a77b47bf663db43f) )
5773   ROM_CONTINUE(           0x00000, 0x10000 )
5774   ROM_COPY( "audio",  0x00000, 0x10000, 0x10000 )
5775
5776   ROM_Y_ZOOM
5777
5778   ROM_REGION( 0x1000000, "ym", 0 )
5779   ROM_LOAD16_WORD_SWAP( "svc-v2.bin", 0x000000, 0x400000, CRC(b5097287) SHA1(3ba3a9b5624879616382ed40337a3d9c50a0f314) )
5780   ROM_LOAD16_WORD_SWAP( "svc-v1.bin", 0x400000, 0x400000, CRC(bd3a391f) SHA1(972bf09b75e99a683ee965bec93b0da8f15d72d9) )
5781   ROM_LOAD16_WORD_SWAP( "svc-v4.bin", 0x800000, 0x400000, CRC(33fc0b37) SHA1(d61017d829f44c7df8795ba10c55c727d9972662) )
5782   ROM_LOAD16_WORD_SWAP( "svc-v3.bin", 0xc00000, 0x400000, CRC(aa9849a0) SHA1(9539b3356a070a066a89f27c287f316e7367ce2a) )
5783
5784   NO_DELTAT_REGION
5785
5786   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
5787   ROM_LOAD16_BYTE( "svc-c1.bin", 0x0000000, 0x800000, CRC(a7826b89) SHA1(3bbe348ce54b80b56ef032ea532a18ef3cafeb11) ) /* Plane 0,1 */
5788   ROM_LOAD16_BYTE( "svc-c2.bin", 0x0000001, 0x800000, CRC(ed3c2089) SHA1(b5d17692f15f5a678c273589fab2e3918711135e) ) /* Plane 2,3 */
5789   ROM_LOAD16_BYTE( "svc-c3.bin", 0x1000000, 0x800000, CRC(71ed8063) SHA1(ea1df9e2e382a8560a06d447421844cc588f43dd) ) /* Plane 0,1 */
5790   ROM_LOAD16_BYTE( "svc-c4.bin", 0x1000001, 0x800000, CRC(250bde2d) SHA1(8c72dcfceef6d022ab4b73ab37cf3ac0c3940c17) ) /* Plane 2,3 */
5791   ROM_LOAD16_BYTE( "svc-c5.bin", 0x2000000, 0x800000, CRC(9817c082) SHA1(1bea9c7220c2b1524896c86841d6d8fd55f5d366) ) /* Plane 0,1 */
5792   ROM_LOAD16_BYTE( "svc-c6.bin", 0x2000001, 0x800000, CRC(2bc0307f) SHA1(8090fa82c46eb503832359093c8cc3cee3141c90) ) /* Plane 2,3 */
5793   ROM_LOAD16_BYTE( "svc-c7.bin", 0x3000000, 0x800000, CRC(4358d7b9) SHA1(9270b58c2abc072a046bedda72f1395df26d0714) ) /* Plane 0,1 */
5794   ROM_LOAD16_BYTE( "svc-c8.bin", 0x3000001, 0x800000, CRC(366deee5) SHA1(d477ad7a5987fd6c7ef2c1680fbb7c884654590e) ) /* Plane 2,3 */
5795ROM_END
5796
5797ROM_START( svcsplus ) /* bootleg */
5798   ROM_REGION( 0x800000, "main", 0 )
5799   ROM_LOAD16_WORD_SWAP( "svc-p1sp.bin", 0x000000, 0x400000, CRC(2601902f) SHA1(202348a13c6480f7de37a3ee983823838822fc98) )
5800   ROM_LOAD16_WORD_SWAP( "svc-p2sp.bin", 0x400000, 0x400000, CRC(0ca13305) SHA1(ac8fbca71b754acbcdd11802161a62ae1cf32d88) )
5801
5802   NEO_SFIX_128K( "svc-s1sp.bin", CRC(233d6439) SHA1(369024c7a2405c3144c14ac016c07c3dc0f44187) )
5803
5804   NEOGEO_BIOS
5805
5806   ROM_REGION( 0x20000, "audiobios", 0 )
5807   ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) )
5808
5809   ROM_REGION( 0x50000, "audio", 0 )
5810   ROM_LOAD( "svc-m1.bin", 0x20000, 0x10000, CRC(804328c3) SHA1(f931636c563b0789d4812033a77b47bf663db43f) )
5811   ROM_CONTINUE(           0x00000, 0x10000 )
5812   ROM_COPY( "audio",  0x00000, 0x10000, 0x10000 )
5813
5814   ROM_REGION( 0x1000000, "ym", 0 )
5815   ROM_LOAD16_WORD_SWAP( "svc-v2.bin", 0x000000, 0x400000, CRC(b5097287) SHA1(3ba3a9b5624879616382ed40337a3d9c50a0f314) )
5816   ROM_LOAD16_WORD_SWAP( "svc-v1.bin", 0x400000, 0x400000, CRC(bd3a391f) SHA1(972bf09b75e99a683ee965bec93b0da8f15d72d9) )
5817   ROM_LOAD16_WORD_SWAP( "svc-v4.bin", 0x800000, 0x400000, CRC(33fc0b37) SHA1(d61017d829f44c7df8795ba10c55c727d9972662) )
5818   ROM_LOAD16_WORD_SWAP( "svc-v3.bin", 0xc00000, 0x400000, CRC(aa9849a0) SHA1(9539b3356a070a066a89f27c287f316e7367ce2a) )
5819
5820   NO_DELTAT_REGION
5821
5822   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
5823   ROM_LOAD16_BYTE( "svc-c1.bin", 0x0000000, 0x800000, CRC(a7826b89) SHA1(3bbe348ce54b80b56ef032ea532a18ef3cafeb11) ) /* Plane 0,1 */
5824   ROM_LOAD16_BYTE( "svc-c2.bin", 0x0000001, 0x800000, CRC(ed3c2089) SHA1(b5d17692f15f5a678c273589fab2e3918711135e) ) /* Plane 2,3 */
5825   ROM_LOAD16_BYTE( "svc-c3.bin", 0x1000000, 0x800000, CRC(71ed8063) SHA1(ea1df9e2e382a8560a06d447421844cc588f43dd) ) /* Plane 0,1 */
5826   ROM_LOAD16_BYTE( "svc-c4.bin", 0x1000001, 0x800000, CRC(250bde2d) SHA1(8c72dcfceef6d022ab4b73ab37cf3ac0c3940c17) ) /* Plane 2,3 */
5827   ROM_LOAD16_BYTE( "svc-c5.bin", 0x2000000, 0x800000, CRC(9817c082) SHA1(1bea9c7220c2b1524896c86841d6d8fd55f5d366) ) /* Plane 0,1 */
5828   ROM_LOAD16_BYTE( "svc-c6.bin", 0x2000001, 0x800000, CRC(2bc0307f) SHA1(8090fa82c46eb503832359093c8cc3cee3141c90) ) /* Plane 2,3 */
5829   ROM_LOAD16_BYTE( "svc-c7.bin", 0x3000000, 0x800000, CRC(4358d7b9) SHA1(9270b58c2abc072a046bedda72f1395df26d0714) ) /* Plane 0,1 */
5830   ROM_LOAD16_BYTE( "svc-c8.bin", 0x3000001, 0x800000, CRC(366deee5) SHA1(d477ad7a5987fd6c7ef2c1680fbb7c884654590e) ) /* Plane 2,3 */
5831ROM_END
5832
58335484ROM_START( samsho5 ) /* Encrypted Set */ /* MVS VERSION */
58345485   ROM_REGION( 0x800000, "main", 0 )
58355486   ROM_LOAD16_WORD_SWAP( "270-p1.bin", 0x000000, 0x400000, CRC(4a2a09e6) SHA1(2644de02cdab8ccc605488a7c76b8c9cd1d5bcb9) )
r3445r3446
59005551   ROM_LOAD16_BYTE( "270-c8.bin", 0x3000001, 0x800000, CRC(02c530a6) SHA1(7a3fafa6075506c6ef78cc4ec2cb72118ec83cb9) ) /* Plane 2,3 */
59015552ROM_END
59025553
5903ROM_START( samsho5b ) /* bootleg */
5904   ROM_REGION( 0x800000, "main", 0 )
5905   ROM_LOAD16_WORD_SWAP( "ssv-p2.bin", 0x000000, 0x400000, CRC(5023067f) SHA1(b1d682fa7d158f19664356a919da6572e8cfeee0) )
5906   ROM_LOAD16_WORD_SWAP( "ssv-p1.bin", 0x400000, 0x400000, CRC(b6cbe386) SHA1(99c2407361116c2b2c5fe72df53e05c5f99163c1) )
5907
5908   NEO_SFIX_128K( "ssv-s1.bin", CRC(70f667d0) SHA1(6d7ce62bb77eb215cc22d6c3c677accfd740aa83) )
5909
5910   NEO_BIOS_AUDIO_128K( "ssv-m1.bin", CRC(18114fb1) SHA1(016dc2f328340f3637a9bff373a20973df29f6b8) )
5911
5912   ROM_REGION( 0x1000000, "ym", 0 )
5913   ROM_LOAD( "ssv-v1.bin", 0x000000, 0x400000, CRC(a3609761) SHA1(6dce1dbfd228c739b3716ae1cf08fd7f925d8650) )
5914   ROM_LOAD( "ssv-v2.bin", 0x400000, 0x400000, CRC(cbd6ebd5) SHA1(00211be3fa32035b0947ac65920ea8acae7bfae2) )
5915   ROM_LOAD( "ssv-v3.bin", 0x800000, 0x400000, CRC(6f1c2703) SHA1(8015df3d788cb7926ebbcda64a96964fe102ba27) )
5916   ROM_LOAD( "ssv-v4.bin", 0xc00000, 0x400000, CRC(5020c055) SHA1(bd1e68d1b0a47b0e2b365159e210048f8b22823a) )
5917
5918   NO_DELTAT_REGION
5919
5920   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
5921   ROM_LOAD16_BYTE( "ssv-c1.bin", 0x0000000, 0x1000000, CRC(9c564a01) SHA1(99dc8900fd8f56ae04fff72b34ddcaa8abe4c1be) ) /* Plane 0,1 */
5922   ROM_LOAD16_BYTE( "ssv-c2.bin", 0x0000001, 0x1000000, CRC(4b73b8da) SHA1(a8b626de74cf57bbd8c222e8e24c953c9e8680f4) ) /* Plane 2,3 */
5923   ROM_LOAD16_BYTE( "ssv-c3.bin", 0x2000000, 0x1000000, CRC(029f9bb5) SHA1(6296c879aa0bbd22383ceeeac0326805cbc8b4ec) ) /* Plane 0,1 */
5924   ROM_LOAD16_BYTE( "ssv-c4.bin", 0x2000001, 0x1000000, CRC(75722430) SHA1(30594c30a167e75463670249df7744755e39e75b) ) /* Plane 2,3 */
5925ROM_END
5926
59275554ROM_START( kof2003 ) /* Encrypted Code + Sound + GFX Roms */ /* MVS VERSION */
59285555   ROM_REGION( 0x900000, "main", 0 )
59295556   ROM_LOAD32_WORD_SWAP( "271-p1c.bin", 0x000000, 0x400000, CRC(530ecc14) SHA1(812cf7e9902af3f5e9e330b7c05c2171b139ad2b) )
r3445r3446
59965623   ROM_LOAD16_BYTE( "271-c8k.bin", 0x3000001, 0x800000, CRC(312f528c) SHA1(b4ad75f54f730ada6cb00112b74022250f055725) ) /* Plane 2,3 */
59975624ROM_END
59985625
5999ROM_START( kf2k3bl ) /* bootleg */
6000   ROM_REGION( 0x800000, "main", 0 )
6001    ROM_LOAD16_WORD_SWAP( "271-p1bl.bin" , 0x100000, 0x400000, CRC(92ed6ee3) SHA1(5e7e21eb40dfcc453ba73808760d5ddedd49c58a) )
6002   ROM_LOAD16_WORD_SWAP( "271-p2bl.bin" , 0x500000, 0x200000, CRC(5d3d8bb3) SHA1(7f2341f14ca12ff5721eb038b3496228a1f34b60) )
6003   ROM_CONTINUE( 0x000000, 0x100000 )
6004   ROM_CONTINUE( 0x000000, 0x100000 )
6005
6006   NEO_SFIX_128K( "271-s1bl.bin",  CRC(482c48a5) SHA1(27e2f5295a9a838e112be28dafc111893a388a16) )
6007
6008   NEO_BIOS_AUDIO_128K( "271-m1bl.bin", CRC(3a4969ff) SHA1(2fc107a023a82053a8df63025829bcf12cee9610) )
6009
6010   ROM_REGION( 0x1000000, "ym", 0 )
6011   ROM_LOAD( "2k3-v1.bin", 0x000000, 0x400000, CRC(d2b8aa5e) SHA1(498f0556c1de56822141f8043f1ce20444f4ed0a) )
6012   ROM_LOAD( "2k3-v2.bin", 0x400000, 0x400000, CRC(71956ee2) SHA1(a890941e60db358cf45b58909f4719f4826f3bb1) )
6013   ROM_LOAD( "2k3-v3.bin", 0x800000, 0x400000, CRC(ddbbb199) SHA1(0eea4b064bdb8daa03c354fe0a0aa27c4c665bda) )
6014   ROM_LOAD( "2k3-v4.bin", 0xc00000, 0x400000, CRC(01b90c4f) SHA1(387164aa1995d8c11ed939b3afbc294d86d2e27f) )
6015
6016   NO_DELTAT_REGION
6017
6018   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
6019   ROM_LOAD16_BYTE( "2k3-c1.bin", 0x0000000, 0x800000, CRC(e42fc226) SHA1(1cd9364993e141facdcdd53ec2277df7b275d8a7) ) /* Plane 0,1 */
6020   ROM_LOAD16_BYTE( "2k3-c2.bin", 0x0000001, 0x800000, CRC(1b5e3b58) SHA1(0eb254477a9479541291e43e415310852a0f0bed) ) /* Plane 2,3 */
6021   ROM_LOAD16_BYTE( "2k3-c3.bin", 0x1000000, 0x800000, CRC(d334fdd9) SHA1(1efe30b4f56a55e25ab518cf6999de797b5e407c) ) /* Plane 0,1 */
6022   ROM_LOAD16_BYTE( "2k3-c4.bin", 0x1000001, 0x800000, CRC(0d457699) SHA1(ec73d0c9fc7094d0ac6c0986a6e07cde25893e57) ) /* Plane 2,3 */
6023   ROM_LOAD16_BYTE( "2k3-c5.bin", 0x2000000, 0x800000, CRC(8a91aae4) SHA1(802f4baacf801646be1ef686e105b2e867a6a5df) ) /* Plane 0,1 */
6024   ROM_LOAD16_BYTE( "2k3-c6.bin", 0x2000001, 0x800000, CRC(9f8674b8) SHA1(65964f40b2227d020023fb436579927e65807dcd) ) /* Plane 2,3 */
6025   ROM_LOAD16_BYTE( "2k3-c7.bin", 0x3000000, 0x800000, CRC(374ea523) SHA1(613827d72c6181f3e08353750c9af0c4dbad020b) ) /* Plane 0,1 */
6026   ROM_LOAD16_BYTE( "2k3-c8.bin", 0x3000001, 0x800000, CRC(75211f4d) SHA1(d82f044e816ee539ff131d9c931200c818d34cd0) ) /* Plane 2,3 */
6027ROM_END
6028
6029
6030ROM_START( kf2k3bla ) /* bootleg */
6031   ROM_REGION( 0x700000, "main", 0 )
6032   ROM_LOAD16_WORD_SWAP( "271-p1bl.rom", 0x000000, 0x100000, CRC(4ea414dd) SHA1(c242c9709c20a8cde3ad562adbe640a5dd5abcf1) )
6033   ROM_LOAD16_WORD_SWAP( "271-p3bl.rom", 0x100000, 0x400000, CRC(370acbff) SHA1(e72544de1c5e2e4f7478fc003caba9e33a306c19) )
6034   ROM_LOAD16_WORD_SWAP( "271-p2bl.rom", 0x500000, 0x200000, CRC(9c04fc52) SHA1(f41b53c79e4209373ec68276fa5941c91424bb15) )
6035
6036   NEO_SFIX_128K( "271-s1bl.bin",  CRC(482c48a5) SHA1(27e2f5295a9a838e112be28dafc111893a388a16) )
6037
6038   NEO_BIOS_AUDIO_128K( "271-m1bl.bin", CRC(3a4969ff) SHA1(2fc107a023a82053a8df63025829bcf12cee9610) )
6039
6040   ROM_REGION( 0x1000000, "ym", 0 )
6041   ROM_LOAD( "2k3-v1.bin", 0x000000, 0x400000, CRC(d2b8aa5e) SHA1(498f0556c1de56822141f8043f1ce20444f4ed0a) )
6042   ROM_LOAD( "2k3-v2.bin", 0x400000, 0x400000, CRC(71956ee2) SHA1(a890941e60db358cf45b58909f4719f4826f3bb1) )
6043   ROM_LOAD( "2k3-v3.bin", 0x800000, 0x400000, CRC(ddbbb199) SHA1(0eea4b064bdb8daa03c354fe0a0aa27c4c665bda) )
6044   ROM_LOAD( "2k3-v4.bin", 0xc00000, 0x400000, CRC(01b90c4f) SHA1(387164aa1995d8c11ed939b3afbc294d86d2e27f) )
6045
6046   NO_DELTAT_REGION
6047
6048   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
6049   ROM_LOAD16_BYTE( "2k3-c1.bin", 0x0000000, 0x800000, CRC(e42fc226) SHA1(1cd9364993e141facdcdd53ec2277df7b275d8a7) ) /* Plane 0,1 */
6050   ROM_LOAD16_BYTE( "2k3-c2.bin", 0x0000001, 0x800000, CRC(1b5e3b58) SHA1(0eb254477a9479541291e43e415310852a0f0bed) ) /* Plane 2,3 */
6051   ROM_LOAD16_BYTE( "2k3-c3.bin", 0x1000000, 0x800000, CRC(d334fdd9) SHA1(1efe30b4f56a55e25ab518cf6999de797b5e407c) ) /* Plane 0,1 */
6052   ROM_LOAD16_BYTE( "2k3-c4.bin", 0x1000001, 0x800000, CRC(0d457699) SHA1(ec73d0c9fc7094d0ac6c0986a6e07cde25893e57) ) /* Plane 2,3 */
6053   ROM_LOAD16_BYTE( "2k3-c5.bin", 0x2000000, 0x800000, CRC(8a91aae4) SHA1(802f4baacf801646be1ef686e105b2e867a6a5df) ) /* Plane 0,1 */
6054   ROM_LOAD16_BYTE( "2k3-c6.bin", 0x2000001, 0x800000, CRC(9f8674b8) SHA1(65964f40b2227d020023fb436579927e65807dcd) ) /* Plane 2,3 */
6055   ROM_LOAD16_BYTE( "2k3-c7.bin", 0x3000000, 0x800000, CRC(374ea523) SHA1(613827d72c6181f3e08353750c9af0c4dbad020b) ) /* Plane 0,1 */
6056   ROM_LOAD16_BYTE( "2k3-c8.bin", 0x3000001, 0x800000, CRC(75211f4d) SHA1(d82f044e816ee539ff131d9c931200c818d34cd0) ) /* Plane 2,3 */
6057ROM_END
6058
6059ROM_START( kf2k3pl ) /* bootleg */
6060   ROM_REGION( 0x700000, "main", 0 )
6061   ROM_LOAD16_WORD_SWAP( "271-p1pl.bin", 0x000000, 0x100000, CRC(07b84112) SHA1(0b085a928a39ff9c0745a58bfa4ce6106b5f474a) )
6062   ROM_LOAD16_WORD_SWAP( "271-p3bl.rom", 0x100000, 0x400000, CRC(370acbff) SHA1(e72544de1c5e2e4f7478fc003caba9e33a306c19) )
6063   ROM_LOAD16_WORD_SWAP( "271-p2bl.rom", 0x500000, 0x200000, CRC(9c04fc52) SHA1(f41b53c79e4209373ec68276fa5941c91424bb15) )
6064
6065   NEO_SFIX_128K( "271-s1pl.bin",  CRC(ad548a36) SHA1(7483dbe2d74a1bd1b4dc501e99e48a683416d08e) )
6066
6067   NEO_BIOS_AUDIO_128K( "271-m1bl.bin", CRC(3a4969ff) SHA1(2fc107a023a82053a8df63025829bcf12cee9610) )
6068
6069   ROM_REGION( 0x1000000, "ym", 0 )
6070   ROM_LOAD( "2k3-v1.bin", 0x000000, 0x400000, CRC(d2b8aa5e) SHA1(498f0556c1de56822141f8043f1ce20444f4ed0a) )
6071   ROM_LOAD( "2k3-v2.bin", 0x400000, 0x400000, CRC(71956ee2) SHA1(a890941e60db358cf45b58909f4719f4826f3bb1) )
6072   ROM_LOAD( "2k3-v3.bin", 0x800000, 0x400000, CRC(ddbbb199) SHA1(0eea4b064bdb8daa03c354fe0a0aa27c4c665bda) )
6073   ROM_LOAD( "2k3-v4.bin", 0xc00000, 0x400000, CRC(01b90c4f) SHA1(387164aa1995d8c11ed939b3afbc294d86d2e27f) )
6074
6075   NO_DELTAT_REGION
6076
6077   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
6078   ROM_LOAD16_BYTE( "2k3-c1.bin", 0x0000000, 0x800000, CRC(e42fc226) SHA1(1cd9364993e141facdcdd53ec2277df7b275d8a7) ) /* Plane 0,1 */
6079   ROM_LOAD16_BYTE( "2k3-c2.bin", 0x0000001, 0x800000, CRC(1b5e3b58) SHA1(0eb254477a9479541291e43e415310852a0f0bed) ) /* Plane 2,3 */
6080   ROM_LOAD16_BYTE( "2k3-c3.bin", 0x1000000, 0x800000, CRC(d334fdd9) SHA1(1efe30b4f56a55e25ab518cf6999de797b5e407c) ) /* Plane 0,1 */
6081   ROM_LOAD16_BYTE( "2k3-c4.bin", 0x1000001, 0x800000, CRC(0d457699) SHA1(ec73d0c9fc7094d0ac6c0986a6e07cde25893e57) ) /* Plane 2,3 */
6082   ROM_LOAD16_BYTE( "2k3-c5.bin", 0x2000000, 0x800000, CRC(8a91aae4) SHA1(802f4baacf801646be1ef686e105b2e867a6a5df) ) /* Plane 0,1 */
6083   ROM_LOAD16_BYTE( "2k3-c6.bin", 0x2000001, 0x800000, CRC(9f8674b8) SHA1(65964f40b2227d020023fb436579927e65807dcd) ) /* Plane 2,3 */
6084   ROM_LOAD16_BYTE( "2k3-c7.bin", 0x3000000, 0x800000, CRC(374ea523) SHA1(613827d72c6181f3e08353750c9af0c4dbad020b) ) /* Plane 0,1 */
6085   ROM_LOAD16_BYTE( "2k3-c8.bin", 0x3000001, 0x800000, CRC(75211f4d) SHA1(d82f044e816ee539ff131d9c931200c818d34cd0) ) /* Plane 2,3 */
6086ROM_END
6087
6088ROM_START( kf2k3upl ) /* bootleg */
6089   ROM_REGION( 0x800000, "main", 0 )
6090   ROM_LOAD16_WORD_SWAP( "2k3-p1up.bin", 0x000000, 0x800000, CRC(87294c01) SHA1(21420415a6b2ba1b43ecc1934270dc085d6bd7d9) )
6091
6092   NEO_SFIX_128K( "2k3-s1up.bin", CRC(e5708c0c) SHA1(5649446d3b0b1bd138b5a8b40b96a6d0f892f4d8) )
6093
6094   NEO_BIOS_AUDIO_128K( "271-m1bl.bin", CRC(3a4969ff) SHA1(2fc107a023a82053a8df63025829bcf12cee9610) )
6095
6096   ROM_REGION( 0x1000000, "ym", 0 )
6097   ROM_LOAD( "2k3-v1.bin", 0x000000, 0x400000, CRC(d2b8aa5e) SHA1(498f0556c1de56822141f8043f1ce20444f4ed0a) )
6098   ROM_LOAD( "2k3-v2.bin", 0x400000, 0x400000, CRC(71956ee2) SHA1(a890941e60db358cf45b58909f4719f4826f3bb1) )
6099   ROM_LOAD( "2k3-v3.bin", 0x800000, 0x400000, CRC(ddbbb199) SHA1(0eea4b064bdb8daa03c354fe0a0aa27c4c665bda) )
6100   ROM_LOAD( "2k3-v4.bin", 0xc00000, 0x400000, CRC(01b90c4f) SHA1(387164aa1995d8c11ed939b3afbc294d86d2e27f) )
6101
6102   NO_DELTAT_REGION
6103
6104   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
6105   ROM_LOAD16_BYTE( "2k3-c1.bin", 0x0000000, 0x800000, CRC(e42fc226) SHA1(1cd9364993e141facdcdd53ec2277df7b275d8a7) ) /* Plane 0,1 */
6106   ROM_LOAD16_BYTE( "2k3-c2.bin", 0x0000001, 0x800000, CRC(1b5e3b58) SHA1(0eb254477a9479541291e43e415310852a0f0bed) ) /* Plane 2,3 */
6107   ROM_LOAD16_BYTE( "2k3-c3.bin", 0x1000000, 0x800000, CRC(d334fdd9) SHA1(1efe30b4f56a55e25ab518cf6999de797b5e407c) ) /* Plane 0,1 */
6108   ROM_LOAD16_BYTE( "2k3-c4.bin", 0x1000001, 0x800000, CRC(0d457699) SHA1(ec73d0c9fc7094d0ac6c0986a6e07cde25893e57) ) /* Plane 2,3 */
6109   ROM_LOAD16_BYTE( "2k3-c5.bin", 0x2000000, 0x800000, CRC(8a91aae4) SHA1(802f4baacf801646be1ef686e105b2e867a6a5df) ) /* Plane 0,1 */
6110   ROM_LOAD16_BYTE( "2k3-c6.bin", 0x2000001, 0x800000, CRC(9f8674b8) SHA1(65964f40b2227d020023fb436579927e65807dcd) ) /* Plane 2,3 */
6111   ROM_LOAD16_BYTE( "2k3-c7.bin", 0x3000000, 0x800000, CRC(374ea523) SHA1(613827d72c6181f3e08353750c9af0c4dbad020b) ) /* Plane 0,1 */
6112   ROM_LOAD16_BYTE( "2k3-c8.bin", 0x3000001, 0x800000, CRC(75211f4d) SHA1(d82f044e816ee539ff131d9c931200c818d34cd0) ) /* Plane 2,3 */
6113ROM_END
6114
6115
61165626ROM_START( samsh5sp ) /* Encrypted Set */
61175627   ROM_REGION( 0x800000, "main", 0 )
61185628   ROM_LOAD16_WORD_SWAP( "272-p1.bin", 0x000000, 0x400000, CRC(fb7a6bba) SHA1(f68c527208d8a55ca44b0caaa8ab66b3a0ffdfe5) )
r3445r3446
64505960
64515961*/
64525962
5963
5964/* Zintrick bootleg */
5965
5966/* This Zintrick set appears to be a bootleg made from the CD version, not a genuine
5967   prototype the code is based on that of the NeoCD version with some minor patches,
5968   for example the ADK SAMPLE TEST text that appears on the screen is actually a hacked
5969   PROG LOAD ERROR message. The set is supported in order to distinguish the hacks from
5970   a real prototype should one turn up. */
5971
5972ROM_START( zintrckb )
5973   ROM_REGION( 0x100000, "main", 0 )
5974   ROM_LOAD16_WORD_SWAP( "zin-p1.bin", 0x000000, 0x100000, CRC(06c8fca7) SHA1(b7bf38965c3d0db4d7a9684d14cac94a45b4a45b))
5975
5976   NEO_SFIX_128K( "zin-s1.bin", CRC(a7ab0e81) SHA1(f0649819b96cea79b05411e0b15c8edc677d79ba) )
5977
5978   NEO_BIOS_AUDIO_128K( "zin-m1.bin", CRC(fd9627ca) SHA1(b640c1f1ff466f734bb1cb5d7b589cb7e8a55346) )
5979
5980   ROM_REGION( 0x200000, "ym", 0 )
5981   ROM_LOAD( "zin-v1.bin", 0x000000, 0x200000, CRC(c09f74f1) SHA1(d0b56a780a6eba85ff092240b1f1cc6718f17c21) )
5982
5983   NO_DELTAT_REGION
5984
5985   ROM_REGION( 0x400000, "sprites", ROMREGION_DISPOSE )
5986   ROM_LOAD16_BYTE( "zin-c1.bin", 0x000000, 0x200000, CRC(76aee189) SHA1(ad6929804c5b9a59aa609e6baebc6aa37e858a47) ) /* Plane 0,1 */
5987   ROM_LOAD16_BYTE( "zin-c2.bin", 0x000001, 0x200000, CRC(844ed4b3) SHA1(fb7cd057bdc6cbe8b78097dd124118bae7402256) ) /* Plane 2,3 */
5988ROM_END
5989
64535990/* The King of Fighters '97 bootlegs */
64545991
64555992ROM_START( kof97pls )
r3445r3446
65876124
65886125/* Nightmare in the Dark bootleg */
65896126
6590ROM_START( nitdbl ) /* Bootleg of nitd */
6127ROM_START( nitdbl )
65916128   ROM_REGION( 0x100000, "main", 0 )
65926129   ROM_LOAD16_WORD_SWAP( "nitd-p1.bin", 0x000000, 0x080000, CRC(1a05bd1b) SHA1(7bbddef842d50b0778711063af695b168a76ff61) )
65936130
r3445r3446
66096146   ROM_LOAD16_BYTE( "nitd-c4.bin", 0x400001, 0x200000, CRC(4c3926e6) SHA1(7fc54a9886dbef911f7b226e3cd20081c535e989) ) /* Plane 2,3 */
66106147ROM_END
66116148
6149/* The King of Fighters 2001 bootlegs */
66126150
66136151ROM_START( cthd2003 ) /* Protected hack/bootleg of kof2001 Phenixsoft */
66146152   ROM_REGION( 0x500000, "main", 0 )
r3445r3446
66406178   ROM_LOAD16_BYTE( "5003-c8.bin", 0x3000001, 0x800000, CRC(917a1439) SHA1(6f28d1d7c6edee1283f25e632c69204dbebe40af) ) /* Plane 2,3 */
66416179ROM_END
66426180
6643ROM_START( ct2k3sp ) /* Protected hack/bootleg of kof2001 Phenixsoft */
6181ROM_START( ct2k3sp ) /* Protected hack/bootleg of kof2001 Phenixsoft */
66446182   ROM_REGION( 0x500000, "main", 0 )
66456183   ROM_LOAD16_WORD_SWAP( "5003-p1sp.bin", 0x000000, 0x100000, CRC(ab5c4de0) SHA1(ca9a6bfd4c32d791ecabb34ccbf2cbf0e84f97d5) )
6646   ROM_LOAD16_WORD_SWAP( "5003-p2.bin", 0x100000, 0x400000, CRC(adc1c22b) SHA1(271e0629989257a0d21d280c05df53df259414b1) )
6184   ROM_LOAD16_WORD_SWAP( "5003-p2.bin",   0x100000, 0x400000, CRC(adc1c22b) SHA1(271e0629989257a0d21d280c05df53df259414b1) )
66476185
66486186   ROM_Y_ZOOM
66496187
r3445r3446
66756213   ROM_LOAD16_BYTE( "5003-c8.bin", 0x3000001, 0x800000, CRC(917a1439) SHA1(6f28d1d7c6edee1283f25e632c69204dbebe40af) ) /* Plane 2,3 */
66766214ROM_END
66776215
6678ROM_START( ct2k3sa ) /* Hack/bootleg of kof2001 Phenixsoft, alternate version */ /* MVS VERSION */
6216ROM_START( ct2k3sa ) /* Protected hack/bootleg of kof2001 Phenixsoft, alternate version */
66796217   ROM_REGION( 0x500000, "main", 0 )
66806218   ROM_LOAD16_WORD_SWAP( "5003-p1sa.bin", 0x000000, 0x100000, CRC(013a509d) SHA1(c61c9b777e6e062b5f4ad87cdb78e9ca05e9bfb9) )
6681   ROM_LOAD16_WORD_SWAP( "5003-p2.bin", 0x100000, 0x400000, CRC(adc1c22b) SHA1(271e0629989257a0d21d280c05df53df259414b1) )
6219   ROM_LOAD16_WORD_SWAP( "5003-p2.bin",   0x100000, 0x400000, CRC(adc1c22b) SHA1(271e0629989257a0d21d280c05df53df259414b1) )
66826220
66836221   ROM_Y_ZOOM
66846222
r3445r3446
67116249   ROM_LOAD16_BYTE( "5003-c8.bin", 0x3000001, 0x800000, CRC(917a1439) SHA1(6f28d1d7c6edee1283f25e632c69204dbebe40af) ) /* Plane 2,3 */
67126250ROM_END
67136251
6714ROM_START( kof2k4se )
6252/* Metal Slug 4 bootleg */
6253
6254ROM_START( ms4plus )
67156255   ROM_REGION( 0x500000, "main", 0 )
6716   ROM_LOAD16_WORD_SWAP( "k2k4s-p2.bin", 0x000000, 0x080000, CRC(21a84084) SHA1(973e8a0bffa0e1f055803f663f81a8e03701802d) )
6717   ROM_LOAD16_WORD_SWAP( "k2k4s-p3.bin", 0x080000, 0x080000, CRC(febb484e) SHA1(4b1838795b84f22d578ad043641df0a7bf7d9774) )
6718   ROM_LOAD16_WORD_SWAP( "k2k4s-p1.bin", 0x100000, 0x400000, CRC(e6c50566) SHA1(cc6a3489a3bfeb4dcc65b6ddae0030f7e66fbabe) )
6256   ROM_LOAD16_WORD_SWAP( "ms4-p1p.bin", 0x000000, 0x100000, CRC(806a6e04) SHA1(df503772d607271ea51285154c9fd68e18b143ce) )
6257   ROM_LOAD16_WORD_SWAP( "263-p2.bin",  0x100000, 0x400000, CRC(fdb7aed8) SHA1(dbeaec38f44e58ffedba99e70fa1439c2bf0dfa3) )
67196258
6720   NEO_SFIX_128K( "k2k4s-s1.bin", CRC(a3c9b2d8) SHA1(1472d2cbd7bb73e84824ecf773924007e6117e77) )
6259   NEO_SFIX_128K( "ms4-s1p.bin", CRC(07ff87ce) SHA1(96ddb439de2a26bf9869015d7fb19129d40f3fd9) )
67216260
6722   NEO_BIOS_AUDIO_128K( "k2k4s-m1.bin", CRC(5a47d9ad) SHA1(0197737934653acc6c97221660d789e9914f3578) )
6261   /* Encrypted */
6262   NEO_BIOS_AUDIO_ENCRYPTED_128K( "263-m1.bin", CRC(46ac8228) SHA1(5aeea221050c98e4bb0f16489ce772bf1c80f787) )
67236263
67246264   ROM_REGION( 0x1000000, "ym", 0 )
6725   ROM_LOAD( "k2k4s-v2.bin", 0x000000, 0x800000, CRC(e4ddfb3f) SHA1(eb8220ab01c16cf9244b7f3f9912bec0db561b85) )
6726   ROM_LOAD( "k2k4s-v1.bin", 0x800000, 0x800000, CRC(b887d287) SHA1(f593a5722df6f6fac023d189a739a117e976bb2f) )
6265   /* Encrypted */
6266   ROM_LOAD( "263-v1.bin", 0x000000, 0x800000, CRC(01e9b9cd) SHA1(0b045c2999449f7dab5ae8a42e957d5b6650431e) )
6267   ROM_LOAD( "263-v2.bin", 0x800000, 0x800000, CRC(4ab2bf81) SHA1(77ccfa48f7e3daddef5fe5229a0093eb2f803742) )
67276268
67286269   NO_DELTAT_REGION
67296270
6271   ROM_REGION( 0x3000000, "sprites", ROMREGION_DISPOSE )
6272   /* Encrypted */
6273   ROM_LOAD16_BYTE( "263-c1.bin", 0x0000000, 0x800000, CRC(84865f8a) SHA1(34467ada896eb7c7ca58658bf2a932936d8b632c) ) /* Plane 0,1 */
6274   ROM_LOAD16_BYTE( "263-c2.bin", 0x0000001, 0x800000, CRC(81df97f2) SHA1(2b74493b8ec8fd49216a627aeb3db493f76124e3) ) /* Plane 2,3 */
6275   ROM_LOAD16_BYTE( "263-c3.bin", 0x1000000, 0x800000, CRC(1a343323) SHA1(bbbb5232bba538c277ce2ee02e2956ca2243b787) ) /* Plane 0,1 */
6276   ROM_LOAD16_BYTE( "263-c4.bin", 0x1000001, 0x800000, CRC(942cfb44) SHA1(d9b46c71726383c4581fb042e63897e5a3c92d1b) ) /* Plane 2,3 */
6277   ROM_LOAD16_BYTE( "263-c5.bin", 0x2000000, 0x800000, CRC(a748854f) SHA1(2611bbedf9b5d8e82c6b2c99b88f842c46434d41) ) /* Plane 0,1 */
6278   ROM_LOAD16_BYTE( "263-c6.bin", 0x2000001, 0x800000, CRC(5c8ba116) SHA1(6034db09c8706d4ddbcefc053efbc47a0953eb92) ) /* Plane 2,3 */
6279ROM_END
6280
6281/* The King of Fighters 2002 bootlegs */
6282
6283ROM_START( kf2k2pls )
6284   ROM_REGION( 0x500000, "main", 0 )
6285   ROM_LOAD16_WORD_SWAP( "2k2-p1p.bin", 0x000000, 0x100000, CRC(3ab03781) SHA1(86946c19f1c4d9ab5cde86688d698bf63118a39d) )
6286   ROM_LOAD16_WORD_SWAP( "265-p2.bin",  0x100000, 0x400000, CRC(327266b8) SHA1(98f445cc0a94f8744d74bca71cb420277622b034) )
6287
6288   NEO_SFIX_128K( "2k2-s1p.bin", CRC(595e0006) SHA1(ff086bdaa6f40e9ad963e1100a27f44618d684ed) )
6289
6290   /* Encrypted */
6291   NEO_BIOS_AUDIO_ENCRYPTED_128K( "265-m1.bin", CRC(85aaa632) SHA1(744fba4ca3bc3a5873838af886efb97a8a316104) )
6292
6293   ROM_REGION( 0x1000000, "ym", 0 )
6294   /* Encrypted */
6295   ROM_LOAD( "265-v1.bin", 0x000000, 0x800000, CRC(15e8f3f5) SHA1(7c9e6426b9fa6db0158baa17a6485ffce057d889) )
6296   ROM_LOAD( "265-v2.bin", 0x800000, 0x800000, CRC(da41d6f9) SHA1(a43021f1e58947dcbe3c8ca5283b20b649f0409d) )
6297
6298   NO_DELTAT_REGION
6299
67306300   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
6731   ROM_LOAD16_BYTE( "k2k4s-c4.bin", 0x0000000, 0x800000, CRC(7a050288) SHA1(55a20c5b01e11a859f096af3f8e09986025d288f) ) /* Plane 0,1 */
6732   ROM_LOAD16_BYTE( "k2k4s-c8.bin", 0x0000001, 0x800000, CRC(e924afcf) SHA1(651e974f7339d2cdcfa58c5398013197a0525b77) ) /* Plane 2,3 */
6733   ROM_LOAD16_BYTE( "k2k4s-c3.bin", 0x1000000, 0x800000, CRC(959fad0b) SHA1(63ab83ddc5f688dc8165a7ff8d262df3fcd942a2) ) /* Plane 0,1 */
6734   ROM_LOAD16_BYTE( "k2k4s-c7.bin", 0x1000001, 0x800000, CRC(efe6a468) SHA1(2a414285e48aa948b5b0d4a9333bab083b5fb853) ) /* Plane 2,3 */
6735   ROM_LOAD16_BYTE( "k2k4s-c2.bin", 0x2000000, 0x800000, CRC(74bba7c6) SHA1(e01adc7a4633bc0951b9b4f09abc07d728e9a2d9) ) /* Plane 0,1 */
6736   ROM_LOAD16_BYTE( "k2k4s-c6.bin", 0x2000001, 0x800000, CRC(e20d2216) SHA1(5d28eea7b581e780b78f391a8179f1678ee0d9a5) ) /* Plane 2,3 */
6737   ROM_LOAD16_BYTE( "k2k4s-c1.bin", 0x3000000, 0x800000, CRC(fa705b2b) SHA1(f314c66876589601806352484dd8e45bc41be692) ) /* Plane 0,1 */
6738   ROM_LOAD16_BYTE( "k2k4s-c5.bin", 0x3000001, 0x800000, CRC(2c912ff9) SHA1(b624a625ea3e221808b7ea43fb0b1a51d8c1853e) ) /* Plane 2,3 */
6301   /* Encrypted */
6302   ROM_LOAD16_BYTE( "265-c1.bin", 0x0000000, 0x800000, CRC(2b65a656) SHA1(9c46d8cf5b1ef322db442ac6a9b9406ab49206c5) ) /* Plane 0,1 */
6303   ROM_LOAD16_BYTE( "265-c2.bin", 0x0000001, 0x800000, CRC(adf18983) SHA1(150cd4a5e51e9df88688469d2ea7675c2cf3658a) ) /* Plane 2,3 */
6304   ROM_LOAD16_BYTE( "265-c3.bin", 0x1000000, 0x800000, CRC(875e9fd7) SHA1(28f52d56192d48bbc5dc3c97abf456bd34a58cbd) ) /* Plane 0,1 */
6305   ROM_LOAD16_BYTE( "265-c4.bin", 0x1000001, 0x800000, CRC(2da13947) SHA1(f8d79ec2c236aa3d3648a4f715676899602122c1) ) /* Plane 2,3 */
6306   ROM_LOAD16_BYTE( "265-c5.bin", 0x2000000, 0x800000, CRC(61bd165d) SHA1(b3424db84bc683d858fb635bc42728f9cdd89caf) ) /* Plane 0,1 */
6307   ROM_LOAD16_BYTE( "265-c6.bin", 0x2000001, 0x800000, CRC(03fdd1eb) SHA1(6155c7e802062f4eafa27e414c4e73ee59b868bf) ) /* Plane 2,3 */
6308   ROM_LOAD16_BYTE( "265-c7.bin", 0x3000000, 0x800000, CRC(1a2749d8) SHA1(af7d9ec1d576209826fa568f676bbff92f6d6ddd) ) /* Plane 0,1 */
6309   ROM_LOAD16_BYTE( "265-c8.bin", 0x3000001, 0x800000, CRC(ab0bb549) SHA1(d23afb60b7f831f7d4a98ad3c4a00ee19877a1ce) ) /* Plane 2,3 */
67396310ROM_END
67406311
6312ROM_START( kf2k2pla )
6313   ROM_REGION( 0x500000, "main", 0 )
6314   ROM_LOAD16_WORD_SWAP( "2k2-p1pa.bin", 0x000000, 0x100000, CRC(6a3a02f3) SHA1(c9973b64e9a87fa38dde233ee3e9a73ba085b013) )
6315   ROM_LOAD16_WORD_SWAP( "265-p2.bin",   0x100000, 0x400000, CRC(327266b8) SHA1(98f445cc0a94f8744d74bca71cb420277622b034) )
6316
6317   NEO_SFIX_128K( "2k2-s1pa.bin", CRC(1a3ed064) SHA1(9749bb55c750e6b65d651998c2649c5fb68db68e))
6318
6319   /* Encrypted */
6320   NEO_BIOS_AUDIO_ENCRYPTED_128K( "265-m1.bin", CRC(85aaa632) SHA1(744fba4ca3bc3a5873838af886efb97a8a316104) )
6321
6322   ROM_REGION( 0x1000000, "ym", 0 )
6323   /* Encrypted */
6324   ROM_LOAD( "265-v1.bin", 0x000000, 0x800000, CRC(15e8f3f5) SHA1(7c9e6426b9fa6db0158baa17a6485ffce057d889) )
6325   ROM_LOAD( "265-v2.bin", 0x800000, 0x800000, CRC(da41d6f9) SHA1(a43021f1e58947dcbe3c8ca5283b20b649f0409d) )
6326
6327   NO_DELTAT_REGION
6328
6329   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
6330   /* Encrypted */
6331   ROM_LOAD16_BYTE( "265-c1.bin", 0x0000000, 0x800000, CRC(2b65a656) SHA1(9c46d8cf5b1ef322db442ac6a9b9406ab49206c5) ) /* Plane 0,1 */
6332   ROM_LOAD16_BYTE( "265-c2.bin", 0x0000001, 0x800000, CRC(adf18983) SHA1(150cd4a5e51e9df88688469d2ea7675c2cf3658a) ) /* Plane 2,3 */
6333   ROM_LOAD16_BYTE( "265-c3.bin", 0x1000000, 0x800000, CRC(875e9fd7) SHA1(28f52d56192d48bbc5dc3c97abf456bd34a58cbd) ) /* Plane 0,1 */
6334   ROM_LOAD16_BYTE( "265-c4.bin", 0x1000001, 0x800000, CRC(2da13947) SHA1(f8d79ec2c236aa3d3648a4f715676899602122c1) ) /* Plane 2,3 */
6335   ROM_LOAD16_BYTE( "265-c5.bin", 0x2000000, 0x800000, CRC(61bd165d) SHA1(b3424db84bc683d858fb635bc42728f9cdd89caf) ) /* Plane 0,1 */
6336   ROM_LOAD16_BYTE( "265-c6.bin", 0x2000001, 0x800000, CRC(03fdd1eb) SHA1(6155c7e802062f4eafa27e414c4e73ee59b868bf) ) /* Plane 2,3 */
6337   ROM_LOAD16_BYTE( "265-c7.bin", 0x3000000, 0x800000, CRC(1a2749d8) SHA1(af7d9ec1d576209826fa568f676bbff92f6d6ddd) ) /* Plane 0,1 */
6338   ROM_LOAD16_BYTE( "265-c8.bin", 0x3000001, 0x800000, CRC(ab0bb549) SHA1(d23afb60b7f831f7d4a98ad3c4a00ee19877a1ce) ) /* Plane 2,3 */
6339ROM_END
6340
6341ROM_START( kf2k2mp )
6342   ROM_REGION( 0x800000, "main", 0 )
6343   ROM_LOAD16_WORD_SWAP( "kf02m-p1.bin", 0x000000, 0x400000, CRC(ff7c6ec0) SHA1(704c14d671dcb4cfed44d9f978a289cb7dd9d065) )
6344   ROM_LOAD16_WORD_SWAP( "kf02m-p2.bin", 0x400000, 0x400000, CRC(91584716) SHA1(90da863037cf775957fa154cd42536e221df5740) )
6345
6346   NEO_SFIX_128K( "kf02m-s1.bin", CRC(348d6f2c) SHA1(586da8a936ebbb71af324339a4b60ec91dfa0990) )
6347
6348   /* Encrypted */
6349   NEO_BIOS_AUDIO_ENCRYPTED_128K( "265-m1.bin", CRC(85aaa632) SHA1(744fba4ca3bc3a5873838af886efb97a8a316104) )
6350
6351   ROM_REGION( 0x1000000, "ym", 0 )
6352   /* Encrypted */
6353   ROM_LOAD( "265-v1.bin", 0x000000, 0x800000, CRC(15e8f3f5) SHA1(7c9e6426b9fa6db0158baa17a6485ffce057d889) )
6354   ROM_LOAD( "265-v2.bin", 0x800000, 0x800000, CRC(da41d6f9) SHA1(a43021f1e58947dcbe3c8ca5283b20b649f0409d) )
6355
6356   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
6357   /* Encrypted */
6358   ROM_LOAD16_BYTE( "265-c1.bin", 0x0000000, 0x800000, CRC(2b65a656) SHA1(9c46d8cf5b1ef322db442ac6a9b9406ab49206c5) ) /* Plane 0,1 */
6359   ROM_LOAD16_BYTE( "265-c2.bin", 0x0000001, 0x800000, CRC(adf18983) SHA1(150cd4a5e51e9df88688469d2ea7675c2cf3658a) ) /* Plane 2,3 */
6360   ROM_LOAD16_BYTE( "265-c3.bin", 0x1000000, 0x800000, CRC(875e9fd7) SHA1(28f52d56192d48bbc5dc3c97abf456bd34a58cbd) ) /* Plane 0,1 */
6361   ROM_LOAD16_BYTE( "265-c4.bin", 0x1000001, 0x800000, CRC(2da13947) SHA1(f8d79ec2c236aa3d3648a4f715676899602122c1) ) /* Plane 2,3 */
6362   ROM_LOAD16_BYTE( "265-c5.bin", 0x2000000, 0x800000, CRC(61bd165d) SHA1(b3424db84bc683d858fb635bc42728f9cdd89caf) ) /* Plane 0,1 */
6363   ROM_LOAD16_BYTE( "265-c6.bin", 0x2000001, 0x800000, CRC(03fdd1eb) SHA1(6155c7e802062f4eafa27e414c4e73ee59b868bf) ) /* Plane 2,3 */
6364   ROM_LOAD16_BYTE( "265-c7.bin", 0x3000000, 0x800000, CRC(1a2749d8) SHA1(af7d9ec1d576209826fa568f676bbff92f6d6ddd) ) /* Plane 0,1 */
6365   ROM_LOAD16_BYTE( "265-c8.bin", 0x3000001, 0x800000, CRC(ab0bb549) SHA1(d23afb60b7f831f7d4a98ad3c4a00ee19877a1ce) ) /* Plane 2,3 */
6366ROM_END
6367
6368ROM_START( kf2k2mp2 )
6369   ROM_REGION( 0x600000, "main", 0 )
6370   ROM_LOAD16_WORD_SWAP( "k2k2m2p1.bin", 0x000000, 0x200000, CRC(1016806c) SHA1(a583b45e9c0d6f67b95c52e44444aabe88f68d97) )
6371   ROM_LOAD16_WORD_SWAP( "k2k2m2p2.bin", 0x200000, 0x400000, CRC(432fdf53) SHA1(d7e542cd84d948162c60768e40ee4ed33d8e7913) )
6372
6373   NEO_SFIX_128K( "k2k2m2s1.bin", CRC(446e74c5) SHA1(efc2afb26578bad9eb21659c70eb0f827d6d1ef6) )
6374
6375   /* Encrypted */
6376   NEO_BIOS_AUDIO_ENCRYPTED_128K( "265-m1.bin", CRC(85aaa632) SHA1(744fba4ca3bc3a5873838af886efb97a8a316104) )
6377
6378   ROM_REGION( 0x1000000, "ym", 0 )
6379   /* Encrypted */
6380   ROM_LOAD( "265-v1.bin", 0x000000, 0x800000, CRC(15e8f3f5) SHA1(7c9e6426b9fa6db0158baa17a6485ffce057d889) )
6381   ROM_LOAD( "265-v2.bin", 0x800000, 0x800000, CRC(da41d6f9) SHA1(a43021f1e58947dcbe3c8ca5283b20b649f0409d) )
6382
6383   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
6384   /* Encrypted */
6385   ROM_LOAD16_BYTE( "265-c1.bin", 0x0000000, 0x800000, CRC(2b65a656) SHA1(9c46d8cf5b1ef322db442ac6a9b9406ab49206c5) ) /* Plane 0,1 */
6386   ROM_LOAD16_BYTE( "265-c2.bin", 0x0000001, 0x800000, CRC(adf18983) SHA1(150cd4a5e51e9df88688469d2ea7675c2cf3658a) ) /* Plane 2,3 */
6387   ROM_LOAD16_BYTE( "265-c3.bin", 0x1000000, 0x800000, CRC(875e9fd7) SHA1(28f52d56192d48bbc5dc3c97abf456bd34a58cbd) ) /* Plane 0,1 */
6388   ROM_LOAD16_BYTE( "265-c4.bin", 0x1000001, 0x800000, CRC(2da13947) SHA1(f8d79ec2c236aa3d3648a4f715676899602122c1) ) /* Plane 2,3 */
6389   ROM_LOAD16_BYTE( "265-c5.bin", 0x2000000, 0x800000, CRC(61bd165d) SHA1(b3424db84bc683d858fb635bc42728f9cdd89caf) ) /* Plane 0,1 */
6390   ROM_LOAD16_BYTE( "265-c6.bin", 0x2000001, 0x800000, CRC(03fdd1eb) SHA1(6155c7e802062f4eafa27e414c4e73ee59b868bf) ) /* Plane 2,3 */
6391   ROM_LOAD16_BYTE( "265-c7.bin", 0x3000000, 0x800000, CRC(1a2749d8) SHA1(af7d9ec1d576209826fa568f676bbff92f6d6ddd) ) /* Plane 0,1 */
6392   ROM_LOAD16_BYTE( "265-c8.bin", 0x3000001, 0x800000, CRC(ab0bb549) SHA1(d23afb60b7f831f7d4a98ad3c4a00ee19877a1ce) ) /* Plane 2,3 */
6393ROM_END
6394
67416395ROM_START( kof10th )
67426396   ROM_REGION( 0x900000, "main", 0 ) // Modified
67436397   ROM_LOAD16_WORD_SWAP( "kf10-p1.bin", 0x000000, 0x800000, CRC(b1fd0c43) SHA1(5f842a8a27be2d957fd4140d6431ae47154997bb) )
r3445r3446
67456399   ROM_Y_ZOOM
67466400
67476401   ROM_REGION( 0x40000, "fixed", 0 ) // modified
6748   ROM_FILL(              0x000000, 0x40000, 0 ) // modified
6402   ROM_FILL( 0x000000, 0x40000, 0 ) // modified
67496403   ROM_REGION( 0x20000, "fixedbios", 0 )
67506404   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
67516405
r3445r3446
67766430   ROM_LOAD16_BYTE( "kf10-c8b.bin", 0x3800001, 0x400000, CRC(661b7a52) SHA1(0ae2ad2389134892f156337332b77adade3ddad1) ) /* Plane 2,3 */
67776431ROM_END
67786432
6779ROM_START( kf2k5uni )
6780     ROM_REGION( 0x800000, "main", 0 )
6781   ROM_LOAD16_WORD_SWAP( "5006-p2a.bin", 0x000000, 0x400000, CRC(ced883a2) SHA1(f93db4d74ce0a73a3e9631966fee37be22470c89) )
6782   ROM_LOAD16_WORD_SWAP( "5006-p1.bin", 0x400000, 0x400000, CRC(72c39c46) SHA1(4ba0657de20319c0bc30c7c3bba7d7331d0ce9a7) )
6433ROM_START( kf10thep ) /* this is a hack of kof2002 much like the various korean hacks / bootlegs of games */
6434   ROM_REGION( 0x800000, "main", 0 )
6435   ROM_LOAD16_WORD_SWAP( "5008-p2.bin", 0x100000, 0x400000, CRC(a649ec38) SHA1(5c63ed5e5c848940f587c966da4908d04cf1293c) )
6436   ROM_LOAD16_WORD_SWAP( "5008-p3.bin", 0x500000, 0x200000, CRC(e629e13c) SHA1(6ebe080ce01c51064cb2f4d89315ba98a45ae727) )
67836437
6784   NEO_SFIX_128K( "5006-s1.bin", CRC(91f8c544) SHA1(9d16cafb9ca4bc54f31f7fd82b1be06ec8b11c79) )
6438   ROM_REGION( 0x200000, "audiocrypt", 0 )
6439   ROM_LOAD( "5008-p1.bin", 0x000000, 0x200000, CRC(bf5469ba) SHA1(f05236d8fffab5836c0d27becdeeb80def32ee49) )
67856440
6786   NEO_BIOS_AUDIO_128K( "5006-m1.bin", CRC(9050bfe7) SHA1(765bf3d954f775231b7ef2504bb844cd0b29e3f7) )
6441   NEO_SFIX_128K( "5008-s1.bin", CRC(92410064) SHA1(1fb800b46341858207d3b6961a760289fbec7faa) )
67876442
6443   NEO_BIOS_AUDIO_128K( "5008-m1.bin", CRC(5a47d9ad) SHA1(0197737934653acc6c97221660d789e9914f3578) )
6444   //NEO_BIOS_AUDIO_128K( "5004-m1.bin", CRC(f6fab859) SHA1(0184aa1394b9f9946d610278b53b846020dd88dc) )
6445
67886446   ROM_REGION( 0x1000000, "ym", 0 )
67896447   ROM_LOAD( "kf10-v1.bin", 0x000000, 0x800000, CRC(0fc9a58d) SHA1(9d79ef00e2c2abd9f29af5521c2fbe5798bf336f) )
67906448   ROM_LOAD( "kf10-v2.bin", 0x800000, 0x800000, CRC(b8c475a4) SHA1(10caf9c69927a223445d2c4b147864c02ce520a8) )
67916449
6450   NO_DELTAT_REGION
6451
67926452   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
67936453   ROM_LOAD16_BYTE( "kf10-c1a.bin", 0x0000000, 0x400000, CRC(3bbc0364) SHA1(e8aa7ff82f151ce1db56f259377b64cceef85af0) ) /* Plane 0,1 */
67946454   ROM_LOAD16_BYTE( "kf10-c2a.bin", 0x0000001, 0x400000, CRC(91230075) SHA1(d9098e05a7ba6008661147b6bf8bc2f494b8b72b) ) /* Plane 2,3 */
r3445r3446
68046464   ROM_LOAD16_BYTE( "kf10-c6b.bin", 0x2800001, 0x400000, CRC(f2ccfc9e) SHA1(69db7fac7023785ab94ea711a72dbc2826cfe1a3) ) /* Plane 2,3 */
68056465   ROM_LOAD16_BYTE( "kf10-c7a.bin", 0x3000000, 0x400000, CRC(be79c5a8) SHA1(ded3c5eb3571647f50533eb682c2675372ace3fb) ) /* Plane 0,1 */
68066466   ROM_LOAD16_BYTE( "kf10-c8a.bin", 0x3000001, 0x400000, CRC(a5952ca4) SHA1(76dbb3cb45ce5a4beffa1ed29491204fc6617e42) ) /* Plane 2,3 */
6807   ROM_LOAD16_BYTE( "kf10-c7b.bin", 0x3800000, 0x400000, CRC(3fdb3542) SHA1(7d2050752a2064cd6729f483a0da93808e2c6033) ) /* Plane 0,1 */
6808   ROM_LOAD16_BYTE( "kf10-c8b.bin", 0x3800001, 0x400000, CRC(661b7a52) SHA1(0ae2ad2389134892f156337332b77adade3ddad1) ) /* Plane 2,3 */
6467   ROM_LOAD16_BYTE( "5008-c7b.bin", 0x3800000, 0x400000, CRC(33604ef0) SHA1(57deec23c81d5d673ce5992cef1f2567f1a2148e) ) /* Plane 0,1 */
6468   ROM_LOAD16_BYTE( "5008-c8b.bin", 0x3800001, 0x400000, CRC(51f6a8f8) SHA1(9ef1cdbdd125a2b430346c22b59f36902312905f) ) /* Plane 2,3 */
68096469ROM_END
68106470
6811ROM_START( kf10thep ) /* this is a hack of kof2002 much like the various korean hacks / bootlegs of games */
6471ROM_START( kf2k5uni )
68126472   ROM_REGION( 0x800000, "main", 0 )
6813   ROM_LOAD16_WORD_SWAP( "5008-p2.rom", 0x100000, 0x400000, CRC(a649ec38) SHA1(5c63ed5e5c848940f587c966da4908d04cf1293c) )
6814   ROM_LOAD16_WORD_SWAP( "5008-p3.rom", 0x500000, 0x200000, CRC(e629e13c) SHA1(6ebe080ce01c51064cb2f4d89315ba98a45ae727) )
6473   ROM_LOAD16_WORD_SWAP( "5006-p2a.bin", 0x000000, 0x400000, CRC(ced883a2) SHA1(f93db4d74ce0a73a3e9631966fee37be22470c89) )
6474   ROM_LOAD16_WORD_SWAP( "5006-p1.bin",  0x400000, 0x400000, CRC(72c39c46) SHA1(4ba0657de20319c0bc30c7c3bba7d7331d0ce9a7) )
68156475
6816   ROM_REGION( 0x200000, "audiocrypt", 0 )
6817   ROM_LOAD( "5008-p1.rom", 0x000000, 0x200000, CRC(bf5469ba) SHA1(f05236d8fffab5836c0d27becdeeb80def32ee49) )
6476   NEO_SFIX_128K( "5006-s1.bin", CRC(91f8c544) SHA1(9d16cafb9ca4bc54f31f7fd82b1be06ec8b11c79) )
68186477
6819   NEO_SFIX_128K( "5008-s1.rom", CRC(92410064) SHA1(1fb800b46341858207d3b6961a760289fbec7faa) )
6478   NEO_BIOS_AUDIO_128K( "5006-m1.bin", CRC(9050bfe7) SHA1(765bf3d954f775231b7ef2504bb844cd0b29e3f7) )
68206479
6821   NEO_BIOS_AUDIO_128K( "5008-m1.rom", CRC(5a47d9ad) SHA1(0197737934653acc6c97221660d789e9914f3578) )
6822   //NEO_BIOS_AUDIO_128K( "5004-m1.bin", CRC(f6fab859) SHA1(0184aa1394b9f9946d610278b53b846020dd88dc) )
6823
68246480   ROM_REGION( 0x1000000, "ym", 0 )
68256481   ROM_LOAD( "kf10-v1.bin", 0x000000, 0x800000, CRC(0fc9a58d) SHA1(9d79ef00e2c2abd9f29af5521c2fbe5798bf336f) )
68266482   ROM_LOAD( "kf10-v2.bin", 0x800000, 0x800000, CRC(b8c475a4) SHA1(10caf9c69927a223445d2c4b147864c02ce520a8) )
68276483
6828   NO_DELTAT_REGION
6829
68306484   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
68316485   ROM_LOAD16_BYTE( "kf10-c1a.bin", 0x0000000, 0x400000, CRC(3bbc0364) SHA1(e8aa7ff82f151ce1db56f259377b64cceef85af0) ) /* Plane 0,1 */
68326486   ROM_LOAD16_BYTE( "kf10-c2a.bin", 0x0000001, 0x400000, CRC(91230075) SHA1(d9098e05a7ba6008661147b6bf8bc2f494b8b72b) ) /* Plane 2,3 */
r3445r3446
68426496   ROM_LOAD16_BYTE( "kf10-c6b.bin", 0x2800001, 0x400000, CRC(f2ccfc9e) SHA1(69db7fac7023785ab94ea711a72dbc2826cfe1a3) ) /* Plane 2,3 */
68436497   ROM_LOAD16_BYTE( "kf10-c7a.bin", 0x3000000, 0x400000, CRC(be79c5a8) SHA1(ded3c5eb3571647f50533eb682c2675372ace3fb) ) /* Plane 0,1 */
68446498   ROM_LOAD16_BYTE( "kf10-c8a.bin", 0x3000001, 0x400000, CRC(a5952ca4) SHA1(76dbb3cb45ce5a4beffa1ed29491204fc6617e42) ) /* Plane 2,3 */
6845   ROM_LOAD16_BYTE( "5008-c7b.rom", 0x3800000, 0x400000, CRC(33604ef0) SHA1(57deec23c81d5d673ce5992cef1f2567f1a2148e) ) /* Plane 0,1 */
6846   ROM_LOAD16_BYTE( "5008-c8b.rom", 0x3800001, 0x400000, CRC(51f6a8f8) SHA1(9ef1cdbdd125a2b430346c22b59f36902312905f) ) /* Plane 2,3 */
6499   ROM_LOAD16_BYTE( "kf10-c7b.bin", 0x3800000, 0x400000, CRC(3fdb3542) SHA1(7d2050752a2064cd6729f483a0da93808e2c6033) ) /* Plane 0,1 */
6500   ROM_LOAD16_BYTE( "kf10-c8b.bin", 0x3800001, 0x400000, CRC(661b7a52) SHA1(0ae2ad2389134892f156337332b77adade3ddad1) ) /* Plane 2,3 */
68476501ROM_END
68486502
6503ROM_START( kof2k4se )
6504   ROM_REGION( 0x500000, "main", 0 )
6505   ROM_LOAD16_WORD_SWAP( "k2k4s-p2.bin", 0x000000, 0x080000, CRC(21a84084) SHA1(973e8a0bffa0e1f055803f663f81a8e03701802d) )
6506   ROM_LOAD16_WORD_SWAP( "k2k4s-p3.bin", 0x080000, 0x080000, CRC(febb484e) SHA1(4b1838795b84f22d578ad043641df0a7bf7d9774) )
6507   ROM_LOAD16_WORD_SWAP( "k2k4s-p1.bin", 0x100000, 0x400000, CRC(e6c50566) SHA1(cc6a3489a3bfeb4dcc65b6ddae0030f7e66fbabe) )
68496508
6509   NEO_SFIX_128K( "k2k4s-s1.bin", CRC(a3c9b2d8) SHA1(1472d2cbd7bb73e84824ecf773924007e6117e77) )
6510
6511   NEO_BIOS_AUDIO_128K( "k2k4s-m1.bin", CRC(5a47d9ad) SHA1(0197737934653acc6c97221660d789e9914f3578) )
6512
6513   ROM_REGION( 0x1000000, "ym", 0 )
6514   ROM_LOAD( "k2k4s-v2.bin", 0x000000, 0x800000, CRC(e4ddfb3f) SHA1(eb8220ab01c16cf9244b7f3f9912bec0db561b85) )
6515   ROM_LOAD( "k2k4s-v1.bin", 0x800000, 0x800000, CRC(b887d287) SHA1(f593a5722df6f6fac023d189a739a117e976bb2f) )
6516
6517   NO_DELTAT_REGION
6518
6519   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
6520   ROM_LOAD16_BYTE( "k2k4s-c4.bin", 0x0000000, 0x800000, CRC(7a050288) SHA1(55a20c5b01e11a859f096af3f8e09986025d288f) ) /* Plane 0,1 */
6521   ROM_LOAD16_BYTE( "k2k4s-c8.bin", 0x0000001, 0x800000, CRC(e924afcf) SHA1(651e974f7339d2cdcfa58c5398013197a0525b77) ) /* Plane 2,3 */
6522   ROM_LOAD16_BYTE( "k2k4s-c3.bin", 0x1000000, 0x800000, CRC(959fad0b) SHA1(63ab83ddc5f688dc8165a7ff8d262df3fcd942a2) ) /* Plane 0,1 */
6523   ROM_LOAD16_BYTE( "k2k4s-c7.bin", 0x1000001, 0x800000, CRC(efe6a468) SHA1(2a414285e48aa948b5b0d4a9333bab083b5fb853) ) /* Plane 2,3 */
6524   ROM_LOAD16_BYTE( "k2k4s-c2.bin", 0x2000000, 0x800000, CRC(74bba7c6) SHA1(e01adc7a4633bc0951b9b4f09abc07d728e9a2d9) ) /* Plane 0,1 */
6525   ROM_LOAD16_BYTE( "k2k4s-c6.bin", 0x2000001, 0x800000, CRC(e20d2216) SHA1(5d28eea7b581e780b78f391a8179f1678ee0d9a5) ) /* Plane 2,3 */
6526   ROM_LOAD16_BYTE( "k2k4s-c1.bin", 0x3000000, 0x800000, CRC(fa705b2b) SHA1(f314c66876589601806352484dd8e45bc41be692) ) /* Plane 0,1 */
6527   ROM_LOAD16_BYTE( "k2k4s-c5.bin", 0x3000001, 0x800000, CRC(2c912ff9) SHA1(b624a625ea3e221808b7ea43fb0b1a51d8c1853e) ) /* Plane 2,3 */
6528ROM_END
6529
6530/* Matrimelee bootleg */
6531
6532ROM_START( matrimbl )
6533   ROM_REGION( 0x500000, "main", 0 )
6534   ROM_LOAD16_WORD_SWAP( "266-p1.bin", 0x000000, 0x100000, CRC(5d4c2dc7) SHA1(8d723b0d28ec344eef26009b361a2b97d300dd51) )
6535   ROM_LOAD16_WORD_SWAP( "266-p2.bin", 0x100000, 0x400000, CRC(a14b1906) SHA1(1daa14d73512f760ef569b06f9facb279437d1db) )
6536
6537   ROM_Y_ZOOM
6538
6539   ROM_REGION( 0x80000, "fixed", 0 )
6540   ROM_FILL( 0x000000, 0x80000, 0 )
6541   ROM_REGION( 0x20000, "fixedbios", 0 )
6542   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
6543
6544   NEO_BIOS_AUDIO_128K( "mart-m1.bin", CRC(3ea96ab1) SHA1(e5053c4312f658faed2a34e38325a22ef792d384) )
6545
6546   ROM_REGION( 0x1000000, "ym", 0 )
6547   ROM_LOAD( "mart-v1.bin", 0x000000, 0x400000, CRC(352b0a07) SHA1(19f7cc12f3f6d0fda9c7449816c4c32367447897) )
6548   ROM_LOAD16_WORD_SWAP( "mart-v2.bin", 0x400000, 0x400000, CRC(1e9bd59e) SHA1(0f754e780d0ebb815a92a45ad55f85f6d0181b70) )
6549   ROM_LOAD( "mart-v3.bin", 0x800000, 0x400000, CRC(e8362fcc) SHA1(42d558fd80cabe22a1c09a1fa75741afbcf46b7c) )
6550   ROM_LOAD16_WORD_SWAP( "mart-v4.bin", 0xc00000, 0x400000, CRC(c8c79b19) SHA1(9c7a5e694d68f37a27209e1400b60b6241a04cc7) )
6551
6552   NO_DELTAT_REGION
6553
6554   ROM_REGION( 0x4000000, "sprites", 0 )
6555   ROM_LOAD16_BYTE( "mart-c1.bin", 0x0000000, 0x800000, CRC(a5595656) SHA1(d86281607f22e4f2001047eaeeda99cd673c508c) ) /* Plane 0,1 */
6556   ROM_LOAD16_BYTE( "mart-c2.bin", 0x0000001, 0x800000, CRC(c5f7c300) SHA1(9ff5ffb750bd2e925667d84389192f92183e8677) ) /* Plane 2,3 */
6557   ROM_LOAD16_BYTE( "mart-c3.bin", 0x1000000, 0x800000, CRC(574efd7d) SHA1(6cac303db705fe2800701ee51de9e9fca04e6e66) ) /* Plane 0,1 */
6558   ROM_LOAD16_BYTE( "mart-c4.bin", 0x1000001, 0x800000, CRC(109d54d9) SHA1(22cb748b3b14317b90d9d9951297ada2bfc3a3f1) ) /* Plane 2,3 */
6559   ROM_LOAD16_BYTE( "mart-c5.bin", 0x2000000, 0x800000, CRC(15c9e882) SHA1(1c9f1ccaed4fdd9d8f5cc9b6fcaca3c4e328e59e) ) /* Plane 0,1 */
6560   ROM_LOAD16_BYTE( "mart-c6.bin", 0x2000001, 0x800000, CRC(77497b97) SHA1(c6481bea5a36f8210971fdcb4bfbe7ed93c769de) ) /* Plane 2,3 */
6561   ROM_LOAD16_BYTE( "mart-c7.bin", 0x3000000, 0x800000, CRC(ab481bb6) SHA1(6b2d97c5505eeb28e300b075f37f0d69ef44463a) ) /* Plane 0,1 */
6562   ROM_LOAD16_BYTE( "mart-c8.bin", 0x3000001, 0x800000, CRC(906cf267) SHA1(b0f2cf8887794d715f208751ddd1ed26b2c3ffdf) ) /* Plane 2,3 */
6563ROM_END
6564
6565/* Metal Slug 5 bootleg */
6566
6567ROM_START( ms5plus )
6568   ROM_REGION( 0x500000, "main", 0 )
6569   ROM_LOAD16_WORD_SWAP( "ms5-p1p.bin", 0x000000, 0x100000, CRC(106b276f) SHA1(0e840df95f3813145e5043573483c7610d2d3e68) )
6570   ROM_LOAD16_WORD_SWAP( "ms5-p2p.bin", 0x100000, 0x200000, CRC(d6a458e8) SHA1(c0a8bdae06d62859fb6734766ccc190eb2a809a4) )
6571   ROM_LOAD16_WORD_SWAP( "ms5-p3p.bin", 0x300000, 0x200000, CRC(439ec031) SHA1(f0ad8f9be7d26bc504593c1321bd23c286a221f0) )
6572
6573   ROM_Y_ZOOM
6574
6575   ROM_REGION( 0x20000, "fixed", 0 )
6576   ROM_LOAD("ms5-s1p.bin", 0x000000, 0x20000, CRC(21e04432) SHA1(10057a2aa487087f7143d1d69fdad978a6bef0f7) )
6577   ROM_REGION( 0x20000, "fixedbios", 0 )
6578   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
6579
6580   /* Encrypted */
6581   NEO_BIOS_AUDIO_ENCRYPTED_512K( "268-m1.bin", CRC(4a5a6e0e) SHA1(df0f660f2465e1db7be5adfcaf5e88ad61a74a42) )
6582
6583   ROM_REGION( 0x1000000, "ym", 0 )
6584   /* Encrypted */
6585   ROM_LOAD( "268-v1c.bin", 0x000000, 0x800000, CRC(ae31d60c) SHA1(c42285cf4e52fea74247860813e826df5aa7600a) )
6586   ROM_LOAD( "268-v2c.bin", 0x800000, 0x800000, CRC(c40613ed) SHA1(af889570304e2867d7dfea1e94e388c06249fb67) )
6587
6588   NO_DELTAT_REGION
6589
6590   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
6591   /* Encrypted */
6592   ROM_LOAD16_BYTE( "268-c1c.bin", 0x0000000, 0x800000, CRC(ab7c389a) SHA1(025a188de589500bf7637fa8e7a37ab24bf4312e) ) /* Plane 0,1 */
6593   ROM_LOAD16_BYTE( "268-c2c.bin", 0x0000001, 0x800000, CRC(3560881b) SHA1(493d218c92290b4770024d6ee2917c4022753b07) ) /* Plane 2,3 */
6594   ROM_LOAD16_BYTE( "268-c3c.bin", 0x1000000, 0x800000, CRC(3af955ea) SHA1(cf36b6ae9b0d12744b17cb7a928399214de894be) ) /* Plane 0,1 */
6595   ROM_LOAD16_BYTE( "268-c4c.bin", 0x1000001, 0x800000, CRC(c329c373) SHA1(5073d4079958a0ef5426885af2c9e3178f37d5e0) ) /* Plane 2,3 */
6596   ROM_LOAD16_BYTE( "268-c5c.bin", 0x2000000, 0x800000, CRC(959c8177) SHA1(889bda7c65d71172e7d89194d1269561888fe789) ) /* Plane 0,1 */
6597   ROM_LOAD16_BYTE( "268-c6c.bin", 0x2000001, 0x800000, CRC(010a831b) SHA1(aec140661e3ae35d264df416478ba15188544d91) ) /* Plane 2,3 */
6598   ROM_LOAD16_BYTE( "268-c7c.bin", 0x3000000, 0x800000, CRC(6d72a969) SHA1(968dd9a4d1209b770b9b85ea6532fa24d262a262) ) /* Plane 0,1 */
6599   ROM_LOAD16_BYTE( "268-c8c.bin", 0x3000001, 0x800000, CRC(551d720e) SHA1(ebf69e334fcaba0fda6fd432fd0970283a365d12) ) /* Plane 2,3 */
6600ROM_END
6601
6602/* SNK vs. CAPCOM SVC CHAOS bootlegs */
6603
6604ROM_START( svcboot )
6605   ROM_REGION( 0x800000, "main", 0 )
6606   ROM_LOAD16_WORD_SWAP( "svc-p1.bin", 0x000000, 0x800000, CRC(0348f162) SHA1(c313351d68effd92aeb80ed320e4f8c26a3bb53e) )
6607
6608   ROM_REGION( 0x20000, "fixed", 0 )
6609   ROM_LOAD( "svc-s1.bin", 0x10000, 0x10000, CRC(70b44df1) SHA1(52ae3f264d7b33e94e770e6b2d0cf35a64e7dda4) )
6610   ROM_CONTINUE( 0x00000, 0x10000 )
6611   ROM_REGION( 0x20000, "fixedbios", 0 )
6612   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
6613
6614   NEOGEO_BIOS
6615
6616   ROM_REGION( 0x20000, "audiobios", 0 )
6617   ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) )
6618
6619   ROM_REGION( 0x50000, "audio", 0 )
6620   ROM_LOAD( "svc-m1.bin", 0x20000, 0x10000, CRC(804328c3) SHA1(f931636c563b0789d4812033a77b47bf663db43f) )
6621   ROM_CONTINUE( 0x00000, 0x10000 )
6622   ROM_COPY( "audio", 0x00000, 0x10000, 0x10000 )
6623
6624   ROM_Y_ZOOM
6625
6626   ROM_REGION( 0x1000000, "ym", 0 )
6627   ROM_LOAD16_WORD_SWAP( "svc-v2.bin", 0x000000, 0x400000, CRC(b5097287) SHA1(3ba3a9b5624879616382ed40337a3d9c50a0f314) )
6628   ROM_LOAD16_WORD_SWAP( "svc-v1.bin", 0x400000, 0x400000, CRC(bd3a391f) SHA1(972bf09b75e99a683ee965bec93b0da8f15d72d9) )
6629   ROM_LOAD16_WORD_SWAP( "svc-v4.bin", 0x800000, 0x400000, CRC(33fc0b37) SHA1(d61017d829f44c7df8795ba10c55c727d9972662) )
6630   ROM_LOAD16_WORD_SWAP( "svc-v3.bin", 0xc00000, 0x400000, CRC(aa9849a0) SHA1(9539b3356a070a066a89f27c287f316e7367ce2a) )
6631
6632   NO_DELTAT_REGION
6633
6634   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
6635   ROM_LOAD16_BYTE( "svc-c1.bin", 0x0000000, 0x800000, CRC(a7826b89) SHA1(3bbe348ce54b80b56ef032ea532a18ef3cafeb11) ) /* Plane 0,1 */
6636   ROM_LOAD16_BYTE( "svc-c2.bin", 0x0000001, 0x800000, CRC(ed3c2089) SHA1(b5d17692f15f5a678c273589fab2e3918711135e) ) /* Plane 2,3 */
6637   ROM_LOAD16_BYTE( "svc-c3.bin", 0x1000000, 0x800000, CRC(71ed8063) SHA1(ea1df9e2e382a8560a06d447421844cc588f43dd) ) /* Plane 0,1 */
6638   ROM_LOAD16_BYTE( "svc-c4.bin", 0x1000001, 0x800000, CRC(250bde2d) SHA1(8c72dcfceef6d022ab4b73ab37cf3ac0c3940c17) ) /* Plane 2,3 */
6639   ROM_LOAD16_BYTE( "svc-c5.bin", 0x2000000, 0x800000, CRC(9817c082) SHA1(1bea9c7220c2b1524896c86841d6d8fd55f5d366) ) /* Plane 0,1 */
6640   ROM_LOAD16_BYTE( "svc-c6.bin", 0x2000001, 0x800000, CRC(2bc0307f) SHA1(8090fa82c46eb503832359093c8cc3cee3141c90) ) /* Plane 2,3 */
6641   ROM_LOAD16_BYTE( "svc-c7.bin", 0x3000000, 0x800000, CRC(4358d7b9) SHA1(9270b58c2abc072a046bedda72f1395df26d0714) ) /* Plane 0,1 */
6642   ROM_LOAD16_BYTE( "svc-c8.bin", 0x3000001, 0x800000, CRC(366deee5) SHA1(d477ad7a5987fd6c7ef2c1680fbb7c884654590e) ) /* Plane 2,3 */
6643ROM_END
6644
6645ROM_START( svcplus )
6646   ROM_REGION( 0x600000, "main", 0 )
6647   ROM_LOAD16_WORD_SWAP( "svc-p1p.bin", 0x000000, 0x200000, CRC(a194d842) SHA1(72b7bfa34a97632b1aa003488e074d766a6c2f08) )
6648   ROM_LOAD16_WORD_SWAP( "svc-p2p.bin", 0x200000, 0x200000, CRC(50c0e2b7) SHA1(97b396415ab0e692e43ddf371091e5a456712f0a) )
6649   ROM_LOAD16_WORD_SWAP( "svc-p3p.bin", 0x400000, 0x200000, CRC(58cdc293) SHA1(3c4f2418ec513bcc13ed33a727de11dfb98f7525) )
6650
6651   NEO_SFIX_128K( "svc-s1p.bin", CRC(73344711) SHA1(04d84c4fe241b9135cd210f8ed8c725f595d11d2) )
6652
6653   NEOGEO_BIOS
6654
6655   ROM_REGION( 0x20000, "audiobios", 0 )
6656   ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) )
6657
6658   ROM_REGION( 0x50000, "audio", 0 )
6659   ROM_LOAD( "svc-m1.bin", 0x20000, 0x10000, CRC(804328c3) SHA1(f931636c563b0789d4812033a77b47bf663db43f) )
6660   ROM_CONTINUE( 0x00000, 0x10000 )
6661   ROM_COPY( "audio", 0x00000, 0x10000, 0x10000 )
6662
6663   ROM_REGION( 0x1000000, "ym", 0 )
6664   ROM_LOAD16_WORD_SWAP( "svc-v2.bin", 0x000000, 0x400000, CRC(b5097287) SHA1(3ba3a9b5624879616382ed40337a3d9c50a0f314) )
6665   ROM_LOAD16_WORD_SWAP( "svc-v1.bin", 0x400000, 0x400000, CRC(bd3a391f) SHA1(972bf09b75e99a683ee965bec93b0da8f15d72d9) )
6666   ROM_LOAD16_WORD_SWAP( "svc-v4.bin", 0x800000, 0x400000, CRC(33fc0b37) SHA1(d61017d829f44c7df8795ba10c55c727d9972662) )
6667   ROM_LOAD16_WORD_SWAP( "svc-v3.bin", 0xc00000, 0x400000, CRC(aa9849a0) SHA1(9539b3356a070a066a89f27c287f316e7367ce2a) )
6668
6669   NO_DELTAT_REGION
6670
6671   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
6672   ROM_LOAD16_BYTE( "svc-c1.bin", 0x0000000, 0x800000, CRC(a7826b89) SHA1(3bbe348ce54b80b56ef032ea532a18ef3cafeb11) ) /* Plane 0,1 */
6673   ROM_LOAD16_BYTE( "svc-c2.bin", 0x0000001, 0x800000, CRC(ed3c2089) SHA1(b5d17692f15f5a678c273589fab2e3918711135e) ) /* Plane 2,3 */
6674   ROM_LOAD16_BYTE( "svc-c3.bin", 0x1000000, 0x800000, CRC(71ed8063) SHA1(ea1df9e2e382a8560a06d447421844cc588f43dd) ) /* Plane 0,1 */
6675   ROM_LOAD16_BYTE( "svc-c4.bin", 0x1000001, 0x800000, CRC(250bde2d) SHA1(8c72dcfceef6d022ab4b73ab37cf3ac0c3940c17) ) /* Plane 2,3 */
6676   ROM_LOAD16_BYTE( "svc-c5.bin", 0x2000000, 0x800000, CRC(9817c082) SHA1(1bea9c7220c2b1524896c86841d6d8fd55f5d366) ) /* Plane 0,1 */
6677   ROM_LOAD16_BYTE( "svc-c6.bin", 0x2000001, 0x800000, CRC(2bc0307f) SHA1(8090fa82c46eb503832359093c8cc3cee3141c90) ) /* Plane 2,3 */
6678   ROM_LOAD16_BYTE( "svc-c7.bin", 0x3000000, 0x800000, CRC(4358d7b9) SHA1(9270b58c2abc072a046bedda72f1395df26d0714) ) /* Plane 0,1 */
6679   ROM_LOAD16_BYTE( "svc-c8.bin", 0x3000001, 0x800000, CRC(366deee5) SHA1(d477ad7a5987fd6c7ef2c1680fbb7c884654590e) ) /* Plane 2,3 */
6680ROM_END
6681
6682ROM_START( svcplusa )
6683   ROM_REGION( 0x600000, "main", 0 )
6684   ROM_LOAD16_WORD_SWAP( "svc-p1pl.bin", 0x000000, 0x200000, CRC(16b44144) SHA1(5eab530274b1b6f480a39a86c199da524cddfccc) )
6685   ROM_LOAD16_WORD_SWAP( "svc-p2pl.bin", 0x200000, 0x400000, CRC(7231ace2) SHA1(d2f13ddd5d3ee29b4b9824e8663f7ee0241f30cf) )
6686
6687   ROM_REGION( 0x20000, "fixed", 0 )
6688   ROM_LOAD( "svc-s1pl.bin", 0x10000, 0x10000, CRC(ca3c735e) SHA1(aebd15253c90432a2e0a4c40f37110c1e2176ee4) )
6689   ROM_CONTINUE( 0x00000, 0x10000 )
6690   ROM_REGION( 0x20000, "fixedbios", 0 )
6691   ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
6692
6693   NEOGEO_BIOS
6694
6695   ROM_REGION( 0x20000, "audiobios", 0 )
6696   ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) )
6697
6698   ROM_REGION( 0x50000, "audio", 0 )
6699   ROM_LOAD( "svc-m1.bin", 0x20000, 0x10000, CRC(804328c3) SHA1(f931636c563b0789d4812033a77b47bf663db43f) )
6700   ROM_CONTINUE( 0x00000, 0x10000 )
6701   ROM_COPY( "audio", 0x00000, 0x10000, 0x10000 )
6702
6703   ROM_Y_ZOOM
6704
6705   ROM_REGION( 0x1000000, "ym", 0 )
6706   ROM_LOAD16_WORD_SWAP( "svc-v2.bin", 0x000000, 0x400000, CRC(b5097287) SHA1(3ba3a9b5624879616382ed40337a3d9c50a0f314) )
6707   ROM_LOAD16_WORD_SWAP( "svc-v1.bin", 0x400000, 0x400000, CRC(bd3a391f) SHA1(972bf09b75e99a683ee965bec93b0da8f15d72d9) )
6708   ROM_LOAD16_WORD_SWAP( "svc-v4.bin", 0x800000, 0x400000, CRC(33fc0b37) SHA1(d61017d829f44c7df8795ba10c55c727d9972662) )
6709   ROM_LOAD16_WORD_SWAP( "svc-v3.bin", 0xc00000, 0x400000, CRC(aa9849a0) SHA1(9539b3356a070a066a89f27c287f316e7367ce2a) )
6710
6711   NO_DELTAT_REGION
6712
6713   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
6714   ROM_LOAD16_BYTE( "svc-c1.bin", 0x0000000, 0x800000, CRC(a7826b89) SHA1(3bbe348ce54b80b56ef032ea532a18ef3cafeb11) ) /* Plane 0,1 */
6715   ROM_LOAD16_BYTE( "svc-c2.bin", 0x0000001, 0x800000, CRC(ed3c2089) SHA1(b5d17692f15f5a678c273589fab2e3918711135e) ) /* Plane 2,3 */
6716   ROM_LOAD16_BYTE( "svc-c3.bin", 0x1000000, 0x800000, CRC(71ed8063) SHA1(ea1df9e2e382a8560a06d447421844cc588f43dd) ) /* Plane 0,1 */
6717   ROM_LOAD16_BYTE( "svc-c4.bin", 0x1000001, 0x800000, CRC(250bde2d) SHA1(8c72dcfceef6d022ab4b73ab37cf3ac0c3940c17) ) /* Plane 2,3 */
6718   ROM_LOAD16_BYTE( "svc-c5.bin", 0x2000000, 0x800000, CRC(9817c082) SHA1(1bea9c7220c2b1524896c86841d6d8fd55f5d366) ) /* Plane 0,1 */
6719   ROM_LOAD16_BYTE( "svc-c6.bin", 0x2000001, 0x800000, CRC(2bc0307f) SHA1(8090fa82c46eb503832359093c8cc3cee3141c90) ) /* Plane 2,3 */
6720   ROM_LOAD16_BYTE( "svc-c7.bin", 0x3000000, 0x800000, CRC(4358d7b9) SHA1(9270b58c2abc072a046bedda72f1395df26d0714) ) /* Plane 0,1 */
6721   ROM_LOAD16_BYTE( "svc-c8.bin", 0x3000001, 0x800000, CRC(366deee5) SHA1(d477ad7a5987fd6c7ef2c1680fbb7c884654590e) ) /* Plane 2,3 */
6722ROM_END
6723
6724ROM_START( svcsplus )
6725   ROM_REGION( 0x800000, "main", 0 )
6726   ROM_LOAD16_WORD_SWAP( "svc-p1sp.bin", 0x000000, 0x400000, CRC(2601902f) SHA1(202348a13c6480f7de37a3ee983823838822fc98) )
6727   ROM_LOAD16_WORD_SWAP( "svc-p2sp.bin", 0x400000, 0x400000, CRC(0ca13305) SHA1(ac8fbca71b754acbcdd11802161a62ae1cf32d88) )
6728
6729   NEO_SFIX_128K( "svc-s1sp.bin", CRC(233d6439) SHA1(369024c7a2405c3144c14ac016c07c3dc0f44187) )
6730
6731   NEOGEO_BIOS
6732
6733   ROM_REGION( 0x20000, "audiobios", 0 )
6734   ROM_LOAD( "sm1.sm1", 0x00000, 0x20000, CRC(94416d67) SHA1(42f9d7ddd6c0931fd64226a60dc73602b2819dcf) )
6735
6736   ROM_REGION( 0x50000, "audio", 0 )
6737   ROM_LOAD( "svc-m1.bin", 0x20000, 0x10000, CRC(804328c3) SHA1(f931636c563b0789d4812033a77b47bf663db43f) )
6738   ROM_CONTINUE( 0x00000, 0x10000 )
6739   ROM_COPY( "audio", 0x00000, 0x10000, 0x10000 )
6740
6741   ROM_REGION( 0x1000000, "ym", 0 )
6742   ROM_LOAD16_WORD_SWAP( "svc-v2.bin", 0x000000, 0x400000, CRC(b5097287) SHA1(3ba3a9b5624879616382ed40337a3d9c50a0f314) )
6743   ROM_LOAD16_WORD_SWAP( "svc-v1.bin", 0x400000, 0x400000, CRC(bd3a391f) SHA1(972bf09b75e99a683ee965bec93b0da8f15d72d9) )
6744   ROM_LOAD16_WORD_SWAP( "svc-v4.bin", 0x800000, 0x400000, CRC(33fc0b37) SHA1(d61017d829f44c7df8795ba10c55c727d9972662) )
6745   ROM_LOAD16_WORD_SWAP( "svc-v3.bin", 0xc00000, 0x400000, CRC(aa9849a0) SHA1(9539b3356a070a066a89f27c287f316e7367ce2a) )
6746
6747   NO_DELTAT_REGION
6748
6749   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
6750   ROM_LOAD16_BYTE( "svc-c1.bin", 0x0000000, 0x800000, CRC(a7826b89) SHA1(3bbe348ce54b80b56ef032ea532a18ef3cafeb11) ) /* Plane 0,1 */
6751   ROM_LOAD16_BYTE( "svc-c2.bin", 0x0000001, 0x800000, CRC(ed3c2089) SHA1(b5d17692f15f5a678c273589fab2e3918711135e) ) /* Plane 2,3 */
6752   ROM_LOAD16_BYTE( "svc-c3.bin", 0x1000000, 0x800000, CRC(71ed8063) SHA1(ea1df9e2e382a8560a06d447421844cc588f43dd) ) /* Plane 0,1 */
6753   ROM_LOAD16_BYTE( "svc-c4.bin", 0x1000001, 0x800000, CRC(250bde2d) SHA1(8c72dcfceef6d022ab4b73ab37cf3ac0c3940c17) ) /* Plane 2,3 */
6754   ROM_LOAD16_BYTE( "svc-c5.bin", 0x2000000, 0x800000, CRC(9817c082) SHA1(1bea9c7220c2b1524896c86841d6d8fd55f5d366) ) /* Plane 0,1 */
6755   ROM_LOAD16_BYTE( "svc-c6.bin", 0x2000001, 0x800000, CRC(2bc0307f) SHA1(8090fa82c46eb503832359093c8cc3cee3141c90) ) /* Plane 2,3 */
6756   ROM_LOAD16_BYTE( "svc-c7.bin", 0x3000000, 0x800000, CRC(4358d7b9) SHA1(9270b58c2abc072a046bedda72f1395df26d0714) ) /* Plane 0,1 */
6757   ROM_LOAD16_BYTE( "svc-c8.bin", 0x3000001, 0x800000, CRC(366deee5) SHA1(d477ad7a5987fd6c7ef2c1680fbb7c884654590e) ) /* Plane 2,3 */
6758ROM_END
6759
6760/* Samurai Shodown 5 bootleg */
6761
6762ROM_START( samsho5b )
6763   ROM_REGION( 0x800000, "main", 0 )
6764   ROM_LOAD16_WORD_SWAP( "ssv-p2.bin", 0x000000, 0x400000, CRC(5023067f) SHA1(b1d682fa7d158f19664356a919da6572e8cfeee0) )
6765   ROM_LOAD16_WORD_SWAP( "ssv-p1.bin", 0x400000, 0x400000, CRC(b6cbe386) SHA1(99c2407361116c2b2c5fe72df53e05c5f99163c1) )
6766
6767   NEO_SFIX_128K( "ssv-s1.bin", CRC(70f667d0) SHA1(6d7ce62bb77eb215cc22d6c3c677accfd740aa83) )
6768
6769   NEO_BIOS_AUDIO_128K( "ssv-m1.bin", CRC(18114fb1) SHA1(016dc2f328340f3637a9bff373a20973df29f6b8) )
6770
6771   ROM_REGION( 0x1000000, "ym", 0 )
6772   ROM_LOAD( "ssv-v1.bin", 0x000000, 0x400000, CRC(a3609761) SHA1(6dce1dbfd228c739b3716ae1cf08fd7f925d8650) )
6773   ROM_LOAD( "ssv-v2.bin", 0x400000, 0x400000, CRC(cbd6ebd5) SHA1(00211be3fa32035b0947ac65920ea8acae7bfae2) )
6774   ROM_LOAD( "ssv-v3.bin", 0x800000, 0x400000, CRC(6f1c2703) SHA1(8015df3d788cb7926ebbcda64a96964fe102ba27) )
6775   ROM_LOAD( "ssv-v4.bin", 0xc00000, 0x400000, CRC(5020c055) SHA1(bd1e68d1b0a47b0e2b365159e210048f8b22823a) )
6776
6777   NO_DELTAT_REGION
6778
6779   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
6780   ROM_LOAD16_BYTE( "ssv-c1.bin", 0x0000000, 0x1000000, CRC(9c564a01) SHA1(99dc8900fd8f56ae04fff72b34ddcaa8abe4c1be) ) /* Plane 0,1 */
6781   ROM_LOAD16_BYTE( "ssv-c2.bin", 0x0000001, 0x1000000, CRC(4b73b8da) SHA1(a8b626de74cf57bbd8c222e8e24c953c9e8680f4) ) /* Plane 2,3 */
6782   ROM_LOAD16_BYTE( "ssv-c3.bin", 0x2000000, 0x1000000, CRC(029f9bb5) SHA1(6296c879aa0bbd22383ceeeac0326805cbc8b4ec) ) /* Plane 0,1 */
6783   ROM_LOAD16_BYTE( "ssv-c4.bin", 0x2000001, 0x1000000, CRC(75722430) SHA1(30594c30a167e75463670249df7744755e39e75b) ) /* Plane 2,3 */
6784ROM_END
6785
6786/* The King of Fighters 2003 bootlegs */
6787
6788ROM_START( kf2k3bl )
6789   ROM_REGION( 0x800000, "main", 0 )
6790    ROM_LOAD16_WORD_SWAP( "2k3-p1.bin", 0x100000, 0x400000, CRC(92ed6ee3) SHA1(5e7e21eb40dfcc453ba73808760d5ddedd49c58a) )
6791   ROM_LOAD16_WORD_SWAP( "2k3-p2.bin", 0x500000, 0x200000, CRC(5d3d8bb3) SHA1(7f2341f14ca12ff5721eb038b3496228a1f34b60) )
6792   ROM_CONTINUE( 0x000000, 0x100000 )
6793   ROM_CONTINUE( 0x000000, 0x100000 )
6794
6795   NEO_SFIX_128K( "2k3-s1.bin", CRC(482c48a5) SHA1(27e2f5295a9a838e112be28dafc111893a388a16) )
6796
6797   NEO_BIOS_AUDIO_128K( "2k3-m1.bin", CRC(3a4969ff) SHA1(2fc107a023a82053a8df63025829bcf12cee9610) )
6798
6799   ROM_REGION( 0x1000000, "ym", 0 )
6800   /* Encrypted */
6801   ROM_LOAD( "271-v1c.bin", 0x000000, 0x800000, CRC(ffa3f8c7) SHA1(7cf4a933973ca23b7f87c81151d8659e6ec4bd20) )
6802   ROM_LOAD( "271-v2c.bin", 0x800000, 0x800000, CRC(5382c7d1) SHA1(1bf999705eda80ba1e7b0d6bdd010d9bfb18bd76) )
6803
6804   NO_DELTAT_REGION
6805
6806   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
6807   /* Encrypted */
6808   ROM_LOAD16_BYTE( "271-c1c.bin", 0x0000000, 0x800000, CRC(b1dc25d0) SHA1(50adc3c60d5b4b3abd10a49db2267306c6dbd772) ) /* Plane 0,1 */
6809   ROM_LOAD16_BYTE( "271-c2c.bin", 0x0000001, 0x800000, CRC(d5362437) SHA1(66db36522dc09106388c707252df9fe1c88b4856) ) /* Plane 2,3 */
6810   ROM_LOAD16_BYTE( "271-c3c.bin", 0x1000000, 0x800000, CRC(0a1fbeab) SHA1(9fe30d36ba98d00fda010832ff2f27783dd577c1) ) /* Plane 0,1 */
6811   ROM_LOAD16_BYTE( "271-c4c.bin", 0x1000001, 0x800000, CRC(87b19a0c) SHA1(b72a8e7d9124ce859b5149bb4381ba481c161ea5) ) /* Plane 2,3 */
6812   ROM_LOAD16_BYTE( "271-c5c.bin", 0x2000000, 0x800000, CRC(704ea371) SHA1(e75b80422f0d72eac826f8ffadf79efeccaab124) ) /* Plane 0,1 */
6813   ROM_LOAD16_BYTE( "271-c6c.bin", 0x2000001, 0x800000, CRC(20a1164c) SHA1(c9843b37612a16fc95f6851793b1cfb5d49d811d) ) /* Plane 2,3 */
6814   ROM_LOAD16_BYTE( "271-c7c.bin", 0x3000000, 0x800000, CRC(189aba7f) SHA1(7152195a57ad36b28290810fe87ed8c206262ba9) ) /* Plane 0,1 */
6815   ROM_LOAD16_BYTE( "271-c8c.bin", 0x3000001, 0x800000, CRC(20ec4fdc) SHA1(deb5f7ec5a090e419b9d1a6a74877bee081198e2) ) /* Plane 2,3 */
6816ROM_END
6817
6818ROM_START( kf2k3bla )
6819   ROM_REGION( 0x700000, "main", 0 )
6820   ROM_LOAD16_WORD_SWAP( "2k3-p1bl.bin", 0x000000, 0x100000, CRC(4ea414dd) SHA1(c242c9709c20a8cde3ad562adbe640a5dd5abcf1) )
6821   ROM_LOAD16_WORD_SWAP( "2k3-p3bl.bin", 0x100000, 0x400000, CRC(370acbff) SHA1(e72544de1c5e2e4f7478fc003caba9e33a306c19) )
6822   ROM_LOAD16_WORD_SWAP( "2k3-p2bl.bin", 0x500000, 0x200000, CRC(9c04fc52) SHA1(f41b53c79e4209373ec68276fa5941c91424bb15) )
6823
6824   NEO_SFIX_128K( "2k3-s1.bin", CRC(482c48a5) SHA1(27e2f5295a9a838e112be28dafc111893a388a16) )
6825
6826   NEO_BIOS_AUDIO_128K( "2k3-m1.bin", CRC(3a4969ff) SHA1(2fc107a023a82053a8df63025829bcf12cee9610) )
6827
6828   ROM_REGION( 0x1000000, "ym", 0 )
6829   /* Encrypted */
6830   ROM_LOAD( "271-v1c.bin", 0x000000, 0x800000, CRC(ffa3f8c7) SHA1(7cf4a933973ca23b7f87c81151d8659e6ec4bd20) )
6831   ROM_LOAD( "271-v2c.bin", 0x800000, 0x800000, CRC(5382c7d1) SHA1(1bf999705eda80ba1e7b0d6bdd010d9bfb18bd76) )
6832
6833   NO_DELTAT_REGION
6834
6835   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
6836   /* Encrypted */
6837   ROM_LOAD16_BYTE( "271-c1c.bin", 0x0000000, 0x800000, CRC(b1dc25d0) SHA1(50adc3c60d5b4b3abd10a49db2267306c6dbd772) ) /* Plane 0,1 */
6838   ROM_LOAD16_BYTE( "271-c2c.bin", 0x0000001, 0x800000, CRC(d5362437) SHA1(66db36522dc09106388c707252df9fe1c88b4856) ) /* Plane 2,3 */
6839   ROM_LOAD16_BYTE( "271-c3c.bin", 0x1000000, 0x800000, CRC(0a1fbeab) SHA1(9fe30d36ba98d00fda010832ff2f27783dd577c1) ) /* Plane 0,1 */
6840   ROM_LOAD16_BYTE( "271-c4c.bin", 0x1000001, 0x800000, CRC(87b19a0c) SHA1(b72a8e7d9124ce859b5149bb4381ba481c161ea5) ) /* Plane 2,3 */
6841   ROM_LOAD16_BYTE( "271-c5c.bin", 0x2000000, 0x800000, CRC(704ea371) SHA1(e75b80422f0d72eac826f8ffadf79efeccaab124) ) /* Plane 0,1 */
6842   ROM_LOAD16_BYTE( "271-c6c.bin", 0x2000001, 0x800000, CRC(20a1164c) SHA1(c9843b37612a16fc95f6851793b1cfb5d49d811d) ) /* Plane 2,3 */
6843   ROM_LOAD16_BYTE( "271-c7c.bin", 0x3000000, 0x800000, CRC(189aba7f) SHA1(7152195a57ad36b28290810fe87ed8c206262ba9) ) /* Plane 0,1 */
6844   ROM_LOAD16_BYTE( "271-c8c.bin", 0x3000001, 0x800000, CRC(20ec4fdc) SHA1(deb5f7ec5a090e419b9d1a6a74877bee081198e2) ) /* Plane 2,3 */
6845ROM_END
6846
6847ROM_START( kf2k3pl )
6848   ROM_REGION( 0x700000, "main", 0 )
6849   ROM_LOAD16_WORD_SWAP( "2k3-p1pl.bin", 0x000000, 0x100000, CRC(07b84112) SHA1(0b085a928a39ff9c0745a58bfa4ce6106b5f474a) )
6850   ROM_LOAD16_WORD_SWAP( "2k3-p3bl.bin", 0x100000, 0x400000, CRC(370acbff) SHA1(e72544de1c5e2e4f7478fc003caba9e33a306c19) )
6851   ROM_LOAD16_WORD_SWAP( "2k3-p2bl.bin", 0x500000, 0x200000, CRC(9c04fc52) SHA1(f41b53c79e4209373ec68276fa5941c91424bb15) )
6852
6853   NEO_SFIX_128K( "2k3-s1pl.bin", CRC(ad548a36) SHA1(7483dbe2d74a1bd1b4dc501e99e48a683416d08e) )
6854
6855   NEO_BIOS_AUDIO_128K( "2k3-m1.bin", CRC(3a4969ff) SHA1(2fc107a023a82053a8df63025829bcf12cee9610) )
6856
6857   ROM_REGION( 0x1000000, "ym", 0 )
6858   /* Encrypted */
6859   ROM_LOAD( "271-v1c.bin", 0x000000, 0x800000, CRC(ffa3f8c7) SHA1(7cf4a933973ca23b7f87c81151d8659e6ec4bd20) )
6860   ROM_LOAD( "271-v2c.bin", 0x800000, 0x800000, CRC(5382c7d1) SHA1(1bf999705eda80ba1e7b0d6bdd010d9bfb18bd76) )
6861
6862   NO_DELTAT_REGION
6863
6864   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
6865   /* Encrypted */
6866   ROM_LOAD16_BYTE( "271-c1c.bin", 0x0000000, 0x800000, CRC(b1dc25d0) SHA1(50adc3c60d5b4b3abd10a49db2267306c6dbd772) ) /* Plane 0,1 */
6867   ROM_LOAD16_BYTE( "271-c2c.bin", 0x0000001, 0x800000, CRC(d5362437) SHA1(66db36522dc09106388c707252df9fe1c88b4856) ) /* Plane 2,3 */
6868   ROM_LOAD16_BYTE( "271-c3c.bin", 0x1000000, 0x800000, CRC(0a1fbeab) SHA1(9fe30d36ba98d00fda010832ff2f27783dd577c1) ) /* Plane 0,1 */
6869   ROM_LOAD16_BYTE( "271-c4c.bin", 0x1000001, 0x800000, CRC(87b19a0c) SHA1(b72a8e7d9124ce859b5149bb4381ba481c161ea5) ) /* Plane 2,3 */
6870   ROM_LOAD16_BYTE( "271-c5c.bin", 0x2000000, 0x800000, CRC(704ea371) SHA1(e75b80422f0d72eac826f8ffadf79efeccaab124) ) /* Plane 0,1 */
6871   ROM_LOAD16_BYTE( "271-c6c.bin", 0x2000001, 0x800000, CRC(20a1164c) SHA1(c9843b37612a16fc95f6851793b1cfb5d49d811d) ) /* Plane 2,3 */
6872   ROM_LOAD16_BYTE( "271-c7c.bin", 0x3000000, 0x800000, CRC(189aba7f) SHA1(7152195a57ad36b28290810fe87ed8c206262ba9) ) /* Plane 0,1 */
6873   ROM_LOAD16_BYTE( "271-c8c.bin", 0x3000001, 0x800000, CRC(20ec4fdc) SHA1(deb5f7ec5a090e419b9d1a6a74877bee081198e2) ) /* Plane 2,3 */
6874ROM_END
6875
6876ROM_START( kf2k3upl )
6877   ROM_REGION( 0x800000, "main", 0 )
6878   ROM_LOAD16_WORD_SWAP( "2k3-p1up.bin", 0x000000, 0x800000, CRC(87294c01) SHA1(21420415a6b2ba1b43ecc1934270dc085d6bd7d9) )
6879
6880   NEO_SFIX_128K( "2k3-s1up.bin", CRC(e5708c0c) SHA1(5649446d3b0b1bd138b5a8b40b96a6d0f892f4d8) )
6881
6882   NEO_BIOS_AUDIO_128K( "2k3-m1.bin", CRC(3a4969ff) SHA1(2fc107a023a82053a8df63025829bcf12cee9610) )
6883
6884   ROM_REGION( 0x1000000, "ym", 0 )
6885   /* Encrypted */
6886   ROM_LOAD( "271-v1c.bin", 0x000000, 0x800000, CRC(ffa3f8c7) SHA1(7cf4a933973ca23b7f87c81151d8659e6ec4bd20) )
6887   ROM_LOAD( "271-v2c.bin", 0x800000, 0x800000, CRC(5382c7d1) SHA1(1bf999705eda80ba1e7b0d6bdd010d9bfb18bd76) )
6888
6889   NO_DELTAT_REGION
6890
6891   ROM_REGION( 0x4000000, "sprites", ROMREGION_DISPOSE )
6892   /* Encrypted */
6893   ROM_LOAD16_BYTE( "271-c1c.bin", 0x0000000, 0x800000, CRC(b1dc25d0) SHA1(50adc3c60d5b4b3abd10a49db2267306c6dbd772) ) /* Plane 0,1 */
6894   ROM_LOAD16_BYTE( "271-c2c.bin", 0x0000001, 0x800000, CRC(d5362437) SHA1(66db36522dc09106388c707252df9fe1c88b4856) ) /* Plane 2,3 */
6895   ROM_LOAD16_BYTE( "271-c3c.bin", 0x1000000, 0x800000, CRC(0a1fbeab) SHA1(9fe30d36ba98d00fda010832ff2f27783dd577c1) ) /* Plane 0,1 */
6896   ROM_LOAD16_BYTE( "271-c4c.bin", 0x1000001, 0x800000, CRC(87b19a0c) SHA1(b72a8e7d9124ce859b5149bb4381ba481c161ea5) ) /* Plane 2,3 */
6897   ROM_LOAD16_BYTE( "271-c5c.bin", 0x2000000, 0x800000, CRC(704ea371) SHA1(e75b80422f0d72eac826f8ffadf79efeccaab124) ) /* Plane 0,1 */
6898   ROM_LOAD16_BYTE( "271-c6c.bin", 0x2000001, 0x800000, CRC(20a1164c) SHA1(c9843b37612a16fc95f6851793b1cfb5d49d811d) ) /* Plane 2,3 */
6899   ROM_LOAD16_BYTE( "271-c7c.bin", 0x3000000, 0x800000, CRC(189aba7f) SHA1(7152195a57ad36b28290810fe87ed8c206262ba9) ) /* Plane 0,1 */
6900   ROM_LOAD16_BYTE( "271-c8c.bin", 0x3000001, 0x800000, CRC(20ec4fdc) SHA1(deb5f7ec5a090e419b9d1a6a74877bee081198e2) ) /* Plane 2,3 */
6901ROM_END
6902
6903
6904   /* Unlicensed Prototype */
6905
6906
68506907ROM_START( diggerma ) /* Unlicensed Prototype, no official game ID # */
68516908   ROM_REGION( 0x100000, "main", 0 )
68526909   ROM_LOAD16_WORD_SWAP( "dig-p1.bin", 0x000000, 0x080000, CRC(eda433d7) SHA1(abb14c66777ab0fe4ac76a402e253a49df7178d8) )
r3445r3446
68986955static DRIVER_INIT( fatfury2 )
68996956{
69006957   DRIVER_INIT_CALL(neogeo);
6901
69026958   fatfury2_install_protection(machine);
69036959}
69046960
r3445r3446
70357091   neo_pcm2_snk_1999(machine, 8);
70367092}
70377093
7094static DRIVER_INIT( ms4plus )
7095{
7096   cmc50_neogeo_gfx_decrypt(machine, 0x31);
7097   neo_pcm2_snk_1999(machine, 8);
7098   neogeo_cmc50_m1_decrypt(machine);
7099   DRIVER_INIT_CALL(neogeo);
7100}
7101
70387102static DRIVER_INIT( ganryu )
70397103{
70407104   neogeo_fixed_layer_bank_type = 1;
r3445r3446
71067170{
71077171   kof2002_decrypt_68k(machine);
71087172   neo_pcm2_swap(machine, 0);
7173   neogeo_cmc50_m1_decrypt(machine);
71097174   cmc50_neogeo_gfx_decrypt(machine, 0xec);
71107175   DRIVER_INIT_CALL(neogeo);
71117176}
r3445r3446
71147179{
71157180   kf2k2mp_decrypt(machine);
71167181   neo_pcm2_swap(machine, 0);
7182   neogeo_cmc50_m1_decrypt(machine);
71177183   neogeo_bootleg_sx_decrypt(machine, 2);
71187184   cmc50_neogeo_gfx_decrypt(machine, 0xec);
71197185   DRIVER_INIT_CALL(neogeo);
71207186}
71217187
7122static DRIVER_INIT( kof2km2 )
7188static DRIVER_INIT( kf2k2mp2 )
71237189{
71247190   kof2km2_px_decrypt(machine);
71257191   neo_pcm2_swap(machine, 0);
7192   neogeo_cmc50_m1_decrypt(machine);
71267193   neogeo_bootleg_sx_decrypt(machine, 1);
71277194   cmc50_neogeo_gfx_decrypt(machine, 0xec);
71287195   DRIVER_INIT_CALL(neogeo);
r3445r3446
71637230   DRIVER_INIT_CALL(neogeo);
71647231}
71657232
7233static DRIVER_INIT( matrimbl )
7234{
7235   matrim_decrypt_68k(machine);
7236   neogeo_fixed_layer_bank_type = 2;
7237   matrimbl_decrypt(machine);
7238   neogeo_sfix_decrypt(machine); /* required for text layer */
7239   DRIVER_INIT_CALL(neogeo);
7240}
7241
71667242static DRIVER_INIT( pnyaa )
71677243{
71687244   neo_pcm2_snk_1999(machine, 4);
r3445r3446
72127288   neo_pcm2_swap(machine, 2);
72137289   neogeo_bootleg_sx_decrypt(machine, 1);
72147290   neogeo_fixed_layer_bank_type = 1;
7291   neogeo_cmc50_m1_decrypt(machine);
72157292   DRIVER_INIT_CALL(neogeo);
72167293   install_ms5plus_protection(machine);
72177294}
r3445r3446
73557432   install_pvc_protection(machine);
73567433}
73577434
7358static DRIVER_INIT( kof2003b )
7435static DRIVER_INIT( kf2k3bl )
73597436{
7360   //kof2003b_sx_decrypt(machine);
7437   cmc50_neogeo_gfx_decrypt(machine, 0x9d);
7438   neo_pcm2_swap(machine, 5);
73617439   neogeo_bootleg_sx_decrypt(machine, 1);
73627440   DRIVER_INIT_CALL(neogeo);
7363   kof2003b_install_protection(machine);
7441   kf2k3bl_install_protection(machine);
73647442}
73657443
7366static DRIVER_INIT( kof2k3pl )
7444static DRIVER_INIT( kf2k3pl )
73677445{
7368   kof2k3pl_px_decrypt(machine);
7369   //decrypt_ms5plus_s1(machine);
7446   cmc50_neogeo_gfx_decrypt(machine, 0x9d);
7447   neo_pcm2_swap(machine, 5);
7448   kf2k3pl_px_decrypt(machine);
73707449   neogeo_bootleg_sx_decrypt(machine, 1);
73717450   DRIVER_INIT_CALL(neogeo);
73727451   kf2k3pl_install_protection(machine);
73737452}
73747453
7375static DRIVER_INIT( kof2k3up )
7454static DRIVER_INIT( kf2k3upl )
73767455{
7377   kof2k3up_px_decrypt(machine);
7378   //kof2k3up_sx_decrypt(machine);
7456   cmc50_neogeo_gfx_decrypt(machine, 0x9d);
7457   neo_pcm2_swap(machine, 5);
7458   kf2k3upl_px_decrypt(machine);
73797459   neogeo_bootleg_sx_decrypt(machine, 2);
73807460   DRIVER_INIT_CALL(neogeo);
7381   kof2k3up_install_protection(machine);
7461   kf2k3upl_install_protection(machine);
73827462}
73837463
73847464static DRIVER_INIT( samsh5sp )
r3445r3446
75707650GAME( 2002, kf2k2pls, kof2002,  neogeo,   neogeo,   kf2k2pls, ROT0, "bootleg", "The King of Fighters 2002 Plus (bootleg set 1)" , 0 ) /* Encrypted GFX */
75717651GAME( 2002, kf2k2pla, kof2002,  neogeo,   neogeo,   kf2k2pls, ROT0, "bootleg", "The King of Fighters 2002 Plus (bootleg set 2)" , 0 ) /* Encrypted GFX */
75727652GAME( 2002, kf2k2mp,  kof2002,  neogeo,   neogeo,   kf2k2mp,  ROT0, "bootleg", "The King of Fighters 2002 Magic Plus (bootleg)" , 0 ) /* Encrypted GFX */
7573GAME( 2002, kf2k2mp2, kof2002,  neogeo,   neogeo,   kof2km2, ROT0, "bootleg", "The King of Fighters 2002 Magic Plus II (bootleg)" , 0 ) /* Encrypted GFX */
7653GAME( 2002, kf2k2mp2, kof2002,  neogeo,   neogeo,   kf2k2mp2, ROT0, "bootleg", "The King of Fighters 2002 Magic Plus II (bootleg)" , 0 ) /* Encrypted GFX */
75747654GAME( 2002, kof10th,  kof2002,  neogeo,   neogeo,   kof10th,  ROT0, "bootleg", "The King of Fighters 10th Anniversary (The King of Fighters 2002 bootleg)", 0 ) // fake SNK copyright
7655GAME( 2005, kf10thep, kof2002,  neogeo,   neogeo,   kf10thep, ROT0, "bootleg", "The King of Fighters 10th Anniversary Extra Plus (The King of Fighters 2002 bootleg)", 0 ) // fake SNK copyright
75757656GAME( 2004, kf2k5uni, kof2002,  neogeo,   neogeo,   kf2k5uni, ROT0, "bootleg", "The King of Fighters 10th Anniversary 2005 Unique (The King of Fighters 2002 bootleg)", 0 ) // fake SNK copyright
7576GAME( 2005, kf10thep, kof2002,  neogeo,   neogeo,   kf10thep, ROT0, "bootleg", "The King of Fighters 10th Anniversary Extra Plus (The King of Fighters 2002 bootleg)", 0 ) // fake SNK copyright
75777657GAME( 2004, kof2k4se, kof2002,  neogeo,   neogeo,   kof2k4se, ROT0, "bootleg", "The King of Fighters Special Edition 2004 (The King of Fighters 2002 bootleg)", 0 ) /* Hack / Bootleg of kof2002 */
75787658GAME( 2003, mslug5,   neogeo,   neogeo,   neogeo,   mslug5,   ROT0, "SNK Playmore", "Metal Slug 5", 0 )
75797659GAME( 2003, mslug5h,  mslug5,   neogeo,   neogeo,   mslug5,   ROT0, "SNK Playmore", "Metal Slug 5 (AES Cart)", 0 ) /* Also found in later MVS carts */
r3445r3446
75917671GAME( 2003, samsho5b, samsho5,  neogeo,   neogeo,   samsho5b, ROT0, "bootleg", "Samurai Shodown V / Samurai Spirits Zero (bootleg)", 0 ) // different program scrambling
75927672GAME( 2003, kf2k3pcb, 0,        neogeo,   neogeo,   kf2k3pcb, ROT0, "SNK Playmore", "The King of Fighters 2003 (Japan, JAMMA PCB)", 0 ) // not a clone of neogeo because it's NOT a neogeo cart.
75937673GAME( 2003, kof2003,  neogeo,   neogeo,   neogeo,   kof2003,  ROT0, "SNK Playmore", "The King of Fighters 2003 (set 1)", 0 )
7594GAME( 2003, kof2003h, kof2003,  neogeo,   neogeo,   kof2003h,  ROT0, "SNK Playmore", "The King of Fighters 2003 (set 2)", 0 )
7595GAME( 2003, kf2k3bl,  kof2003,  neogeo,   neogeo,   kof2003b, ROT0, "bootleg", "The King of Fighters 2003 (bootleg set 1)", 0 ) // zooming is wrong because its a bootleg of the pcb version on a cart (unless it was a bootleg pcb with the new bios?)
7596GAME( 2003, kf2k3bla, kof2003,  neogeo,   neogeo,   kof2k3pl, ROT0, "bootleg", "The King of Fighters 2003 (bootleg set 2)", 0 ) // zooming is wrong because its a bootleg of the pcb version on a cart
7597GAME( 2003, kf2k3pl,  kof2003,  neogeo,   neogeo,   kof2k3pl, ROT0, "bootleg", "The King of Fighters 2004 Plus / Hero (The King of Fighters 2003 bootleg)", 0 ) // zooming is wrong because its a bootleg of the pcb version on a cart
7598GAME( 2003, kf2k3upl, kof2003,  neogeo,   neogeo,   kof2k3up, ROT0, "bootleg", "The King of Fighters 2004 Ultra Plus (The King of Fighters 2003 bootleg)", 0 ) // zooming is wrong because its a bootleg of the pcb version on a cart
7674GAME( 2003, kof2003h, kof2003,  neogeo,   neogeo,   kof2003h, ROT0, "SNK Playmore", "The King of Fighters 2003 (set 2)", 0 )
7675GAME( 2003, kf2k3bl,  kof2003,  neogeo,   neogeo,   kf2k3bl , ROT0, "bootleg", "The King of Fighters 2003 (bootleg set 1)", 0 ) // zooming is wrong because its a bootleg of the pcb version on a cart (unless it was a bootleg pcb with the new bios?)
7676GAME( 2003, kf2k3bla, kof2003,  neogeo,   neogeo,   kf2k3pl,  ROT0, "bootleg", "The King of Fighters 2003 (bootleg set 2)", 0 ) // zooming is wrong because its a bootleg of the pcb version on a cart
7677GAME( 2003, kf2k3pl,  kof2003,  neogeo,   neogeo,   kf2k3pl,  ROT0, "bootleg", "The King of Fighters 2004 Plus / Hero (The King of Fighters 2003 bootleg)", 0 ) // zooming is wrong because its a bootleg of the pcb version on a cart
7678GAME( 2003, kf2k3upl, kof2003,  neogeo,   neogeo,   kf2k3upl, ROT0, "bootleg", "The King of Fighters 2004 Ultra Plus (The King of Fighters 2003 bootleg)", 0 ) // zooming is wrong because its a bootleg of the pcb version on a cart
75997679GAME( 2003, samsh5sp, neogeo,   neogeo,   neogeo,   samsh5sp, ROT0, "Yuki Enterprise / SNK Playmore", "Samurai Shodown V Special / Samurai Spirits Zero Special (set 1, uncensored)", 0 )
76007680GAME( 2003, samsh5sh, samsh5sp, neogeo,   neogeo,   samsh5sp, ROT0, "Yuki Enterprise / SNK Playmore", "Samurai Shodown V Special / Samurai Spirits Zero Special (set 2, censored)", 0 )
76017681GAME( 2003, samsh5sn, samsh5sp, neogeo,   neogeo,   samsh5sp, ROT0, "Yuki Enterprise / SNK Playmore", "Samurai Shodown V Special / Samurai Spirits Zero Special (set 3, less censored)", 0 )
76027682
7603/* there are other bootlegs kof2002b etc. kof96ep, matrimbl?, kf2k1pls -- work out which should be supported */
7683/* there are other bootlegs kof2002b etc. kof96ep, kf2k1pls? -- work out which should be supported */
76047684
76057685/* Alpha Denshi Co. / ADK (changed name in 1993) */
76067686GAME( 1990, maglord,  neogeo,   neogeo,   neogeo,   neogeo,   ROT0, "Alpha Denshi Co.", "Magician Lord (set 1)", 0 )
r3445r3446
77317811
77327812/* Mega Enterprise */
77337813GAME( 2002, mslug4,   neogeo,   neogeo,   neogeo,   mslug4,   ROT0, "Mega", "Metal Slug 4", 0 )
7734GAME( 2002, ms4plus,  mslug4,   neogeo,   neogeo,   neogeo,   ROT0, "bootleg", "Metal Slug 4 Plus (bootleg)", 0 )
7814GAME( 2002, ms4plus,  mslug4,   neogeo,   neogeo,   ms4plus,  ROT0, "bootleg", "Metal Slug 4 Plus (bootleg)", 0 )
77357815
77367816/* Evoga */
77377817GAME( 2002, rotd,     neogeo,   neogeo,   neogeo,   rotd,     ROT0, "Evoga / Playmore", "Rage of the Dragons", 0 )
77387818
77397819/* Atlus */
77407820GAME( 2002, matrim,   neogeo,   neogeo,   neogeo,   matrim,   ROT0, "Noise Factory / Atlus", "Matrimelee / Shin Gouketsuji Ichizoku Toukon", 0 )
7821GAME( 2002, matrimbl, matrim,   neogeo,   neogeo,   matrimbl, ROT0, "bootleg", "Matrimelee / Shin Gouketsuji Ichizoku Toukon (bootleg)", 0 )
77417822
77427823/* Breezasoft */
77437824GAME( 2001, jockeygp, neogeo,   neogeo,   jockeygp, jockeygp, ROT0, "Sun Amusement / BrezzaSoft", "Jockey Grand Prix", 0 )
src/mame/drivers/snookr10.c
r3445r3446
460460   coin_counter_w(1, data & 0x10);   /* Key in */
461461   coin_counter_w(2, data & 0x04);   /* Payout x10 */
462462
463//   logerror("high: %04x - low: %X \n", outporth, outportl);
464//   popmessage("written : %02X", data);
463//  logerror("high: %04x - low: %X \n", outporth, outportl);
464//  popmessage("written : %02X", data);
465465}
466466
467467static WRITE8_HANDLER( output_port_1_w )
src/mame/drivers/konamigx.c
r3445r3446
873873
874874static READ32_HANDLER( le2_gun_H_r )
875875{
876   int p1x = input_port_read(machine, "LIGHT0_X")*287/0xff+22;
877   int p2x = input_port_read(machine, "LIGHT1_X")*287/0xff+22;
876   int p1x = input_port_read(machine, "LIGHT0_X")*290/0xff+20;
877   int p2x = input_port_read(machine, "LIGHT1_X")*290/0xff+20;
878878
879879   return (p1x<<16)|p2x;
880880}
881881
882882static READ32_HANDLER( le2_gun_V_r )
883883{
884   int p1y = input_port_read(machine, "LIGHT0_Y")*223/0xff+1;
885   int p2y = input_port_read(machine, "LIGHT1_Y")*223/0xff+1;
884   int p1y = input_port_read(machine, "LIGHT0_Y")*224/0xff;
885   int p2y = input_port_read(machine, "LIGHT1_Y")*224/0xff;
886886
887   // make "off the bottom" reload too
888   if (p1y >= 0xdf) p1y = 0;
889
887890   return (p1y<<16)|p2y;
888891}
889892
r3445r3446
33533356         switch (gameDefs[i].special)
33543357   {
33553358            case 1:   // LE2 guns
3356      memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xd44000, 0xd44003, 0, 0, le2_gun_H_r );
3357      memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xd44004, 0xd44007, 0, 0, le2_gun_V_r );
3359               memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xd44000, 0xd44003, 0, 0, le2_gun_H_r );
3360               memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0xd44004, 0xd44007, 0, 0, le2_gun_V_r );
33583361               break;
33593362
33603363            case 2:   // tkmmpzdm hack
src/mame/drivers/stvinit.c
r3445r3446
13121312   DRIVER_INIT_CALL(ic13);
13131313}
13141314
1315static void sokyugrt_slave_speedup( UINT32 data )
1316{
1317   logerror( "SlaveSH2: Idle loop skip, data = %08X\n", data );
1318   if (stv_enable_slave_sh2)
1319      if ( activecpu_get_pc() == 0x0605eec0 )
1320         if ( (data & 0x00800000) == 0 )
1321            cpunum_spinuntil_trigger(1, 1000);
1322}
13231315
1324static READ32_HANDLER(sokyugrt_speedup_r)
1325{
1326   if ( activecpu_get_pc() == 0x0605d9da ) cpu_spinuntil_int();
1327   return stv_workram_h[0x000788cc / 4];
1328}
1329
13301316DRIVER_INIT(sokyugrt)
13311317{
1332   cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
1333   cpunum_set_info_int(0, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x605d9da);
1334   cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_SELECT, FIRST_SPEEDUP_SLOT);
1335   cpunum_set_info_int(1, CPUINFO_INT_SH2_PCFLUSH_ADDR, 0x605eec0);
1336
1337   cpunum_set_info_fct(1, CPUINFO_PTR_SH2_FTCSR_READ_CALLBACK, (genf*)sokyugrt_slave_speedup );
1338   memory_install_read32_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x060788cc, 0x060788cf, 0, 0, sokyugrt_speedup_r);
13391318   DRIVER_INIT_CALL(ic13);
13401319   minit_boost_timeslice = sinit_boost_timeslice = ATTOTIME_IN_USEC(50);
13411320
src/mame/drivers/segac2.c
r3445r3446
11/***********************************************************************************************
22
3    Sega System C/C2 Driver
3    Sega System C (System 14)/C2 Driver
44    driver by David Haywood and Aaron Giles
55    ---------------------------------------
66    Last Update 15 Nov 2005
r3445r3446
6363            Sega for producing some Fantastic Games...
6464            and anyone else who knows they've contributed :)
6565
66************************************************************************************************
67
68    Hiscores:
69
70    Bloxeed  @ f400-????            [key = ???]
71    Columns  @ fc00-ffff            [key = '(C) SEGA 1990.JAN BY.TAKOSUKEZOU' @ fc00,ffe0]
72    Columns2 @ fc00-ffff            [key = '(C) SEGA 1990.SEP.COLUMNS2 JAPAN' @ fc00,fd00,fe00,ffe0]
73    Borench  @ f400-f5ff            [key = 'EIJI' in last word]
74    TForceAC @ 8100-817f/8180-81ff  [key = '(c)Tehcno soft90' @ 8070 and 80f0]
75    TantR    @ fc00-fcff/fd00-fdff  [key = 0xd483 in last word]
76    PuyoPuyo @ fc00-fdff/fe00-ffff  [key = 0x28e1 in first word]
77    Ichidant @ fc00-fcff/fd00-fdff  [key = 0x85a9 in last word]
78    StkClmns @ fc00-fc7f/fc80-fcff  [key = ???]
79    PuyoPuy2
80    PotoPoto
81    ZunkYou
82
8366***********************************************************************************************/
8467
8568
8669#include "driver.h"
8770#include "cpu/m68000/m68000.h"
88#include "genesis.h"
71//#include "genesis.h"
72#include "megadriv.h"
73#include "sound/okim6295.h"
74#include "sound/sn76496.h"
75#include "sound/2612intf.h"
76#include "sound/upd7759.h"
8977
9078#define XL1_CLOCK         640000
9179#define XL2_CLOCK         53693175
r3445r3446
9684#define LOG_IOCHIP         0
9785
9886
87static void recompute_palette_tables(void);
88static int segac2_enable_display;
9989
100
10190/******************************************************************************
10291    Global variables
10392******************************************************************************/
r3445r3446
111100static UINT8      prot_read_buf;      /* remembers what was returned */
112101
113102/* palette-related variables */
114static UINT8      alt_palette_mode;
103UINT8      segac2_alt_palette_mode;
115104static UINT8      palbank;
116105static UINT8      bg_palbase;
117106static UINT8      sp_palbase;
118107
119108/* sound-related variables */
120109static UINT8      sound_banks;      /* number of sound banks */
121static UINT8      bloxeed_sound;      /* use kludge for bloxeed sound? */
122110
123111
124112
r3445r3446
137125   state_save_register_global(prot_write_buf);
138126   state_save_register_global(prot_read_buf);
139127
140   MACHINE_START_CALL(genesis);
128//  MACHINE_START_CALL(genesis);
141129}
142130
143131
144132static MACHINE_RESET( segac2 )
145133{
134   megadrive_ram = generic_nvram16;
135
146136   /* set up interrupts and such */
147   MACHINE_RESET_CALL(genesis);
137   MACHINE_RESET_CALL(megadriv);
148138
139
149140   /* determine how many sound banks */
150141   sound_banks = 0;
151142   if (memory_region(machine, "upd"))
r3445r3446
154145   /* reset the protection */
155146   prot_write_buf = 0;
156147   prot_read_buf = 0;
157   alt_palette_mode = 0;
148   segac2_alt_palette_mode = 0;
158149
159150   palbank = 0;
160151   bg_palbase = 0;
161152   sp_palbase = 0;
153
154   recompute_palette_tables();
155
162156}
163157
164158
r3445r3446
198192   {
199193      static UINT8 last_port;
200194
201      /* kludge for Bloxeed - it seems to accidentally trip timer 2  */
202      /* and has no recourse for clearing the interrupt; until we    */
203      /* find more documentation on the 2612/3438, it's unknown what */
204      /* to do here */
205      if (bloxeed_sound && last_port == 0x27 && (offset & 1))
206         data &= ~0x08;
207
208195      switch (offset)
209196      {
210197         case 0: ym3438_control_port_0_a_w(machine, 0, data & 0xff);   last_port = data;   break;
r3445r3446
255242static READ16_HANDLER( palette_r )
256243{
257244   offset &= 0x1ff;
258   if (alt_palette_mode)
245   if (segac2_alt_palette_mode)
259246      offset = ((offset << 1) & 0x100) | ((offset << 2) & 0x80) | ((~offset >> 2) & 0x40) | ((offset >> 1) & 0x20) | (offset & 0x1f);
260247   return paletteram16[offset + palbank * 0x200];
261248}
262249
250extern UINT16* megadrive_vdp_palette_lookup;
251extern UINT16* megadrive_vdp_palette_lookup_sprite; // for C2
252extern UINT16* megadrive_vdp_palette_lookup_shadow;
253extern UINT16* megadrive_vdp_palette_lookup_highlight;
263254
255
256UINT16* megadrive_vdp_palette_lookup_segac2;
257UINT16* megadrive_vdp_palette_lookup_sprite_segac2;
258UINT16* megadrive_vdp_palette_lookup_shadow_segac2;
259UINT16* megadrive_vdp_palette_lookup_highlight_segac2;
260
261
264262/* handle writes to the paletteram */
265263static WRITE16_HANDLER( palette_w )
266264{
267265   int r,g,b,newword;
266   int tmpr,tmpg,tmpb;
268267
269268   /* adjust for the palette bank */
270269   offset &= 0x1ff;
271   if (alt_palette_mode)
270   if (segac2_alt_palette_mode)
272271      offset = ((offset << 1) & 0x100) | ((offset << 2) & 0x80) | ((~offset >> 2) & 0x40) | ((offset >> 1) & 0x20) | (offset & 0x1f);
273272   offset += palbank * 0x200;
274273
r3445r3446
283282
284283   /* set the color */
285284   palette_set_color_rgb(machine, offset, pal5bit(r), pal5bit(g), pal5bit(b));
285
286   megadrive_vdp_palette_lookup_segac2[offset] = (b) | (g<<5) | (r<<10);
287   megadrive_vdp_palette_lookup_sprite_segac2[offset] = (b) | (g<<5) | (r<<10);
288
289   tmpr = r>>1;tmpg=g>>1;tmpb=b>>1;
290   megadrive_vdp_palette_lookup_shadow_segac2[offset] = (tmpb) | (tmpg<<5) | (tmpr<<10);
291
292   // how is it calculated on c2?
293   tmpr = tmpr|0x10;    tmpg = tmpg|0x10;    tmpb = tmpb|0x10;
294   megadrive_vdp_palette_lookup_highlight_segac2[offset] = (tmpb) | (tmpg<<5) | (tmpr<<10);
286295}
287296
288297
r3445r3446
317326
318327******************************************************************************/
319328
329extern int segac2_bg_pal_lookup[4];
330extern int segac2_sp_pal_lookup[4];
331
320332static void recompute_palette_tables(void)
321333{
322334   int i;
r3445r3446
326338      int bgpal = 0x000 + bg_palbase * 0x40 + i * 0x10;
327339      int sppal = 0x100 + sp_palbase * 0x40 + i * 0x10;
328340
329      if (!alt_palette_mode)
341      if (!segac2_alt_palette_mode)
330342      {
331         genesis_bg_pal_lookup[i] = palbank * 0x200 + bgpal;
332         genesis_sp_pal_lookup[i] = palbank * 0x200 + sppal;
343         segac2_bg_pal_lookup[i] = 0x200 * palbank + bgpal;
344         segac2_sp_pal_lookup[i] = 0x200 * palbank + sppal;
333345      }
334346      else
335347      {
336         genesis_bg_pal_lookup[i] = palbank * 0x200 + ((bgpal << 1) & 0x180) + ((~bgpal >> 2) & 0x40) + (bgpal & 0x30);
337         genesis_sp_pal_lookup[i] = palbank * 0x200 + ((~sppal << 2) & 0x100) + ((sppal << 2) & 0x80) + ((~sppal >> 2) & 0x40) + ((sppal >> 2) & 0x20) + (sppal & 0x10);
348         segac2_bg_pal_lookup[i] = 0x200 * palbank + ((bgpal << 1) & 0x180) + ((~bgpal >> 2) & 0x40) + (bgpal & 0x30);
349         segac2_sp_pal_lookup[i] = 0x200 * palbank + ((~sppal << 2) & 0x100) + ((sppal << 2) & 0x80) + ((~sppal >> 2) & 0x40) + ((sppal >> 2) & 0x20) + (sppal & 0x10);
338350      }
339351   }
352
340353}
341354
342355
r3445r3446
456469         newbank = data & 3;
457470         if (newbank != palbank)
458471         {
459            video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen) + 1);
472            //video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen) + 1);
460473            palbank = newbank;
461474            recompute_palette_tables();
462475         }
r3445r3446
495508   data &= 0x0f;
496509
497510   /* bit 0 controls display enable */
498   segac2_enable_display(machine, ~data & 1);
511   //segac2_enable_display(machine, ~data & 1);
512   segac2_enable_display = ~data & 1;
499513
500514   /* bit 1 resets the protection */
501515   if (!(data & 2))
502516      prot_write_buf = prot_read_buf = 0;
503517
504518   /* bit 2 controls palette shuffling; only ribbit and twinsqua use this feature */
505   alt_palette_mode = ((~data & 4) >> 2);
519   segac2_alt_palette_mode = ((~data & 4) >> 2);
506520   recompute_palette_tables();
507521}
508522
r3445r3446
554568   /* if the palette changed, force an update */
555569   if (new_sp_palbase != sp_palbase || new_bg_palbase != bg_palbase)
556570   {
557      video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen) + 1);
571      //video_screen_update_partial(machine->primary_screen, video_screen_get_vpos(machine->primary_screen) + 1);
558572      sp_palbase = new_sp_palbase;
559573      bg_palbase = new_bg_palbase;
560574      recompute_palette_tables();
r3445r3446
658672   AM_RANGE(0x880000, 0x880001) AM_MIRROR(0x13fefe) AM_WRITE(segac2_upd7759_w)
659673   AM_RANGE(0x880100, 0x880101) AM_MIRROR(0x13fefe) AM_WRITE(counter_timer_w)
660674   AM_RANGE(0x8c0000, 0x8c0fff) AM_MIRROR(0x13f000) AM_READWRITE(palette_r, palette_w) AM_BASE(&paletteram16)
661   AM_RANGE(0xc00000, 0xc0001f) AM_MIRROR(0x18ff00) AM_READWRITE(genesis_vdp_r, genesis_vdp_w)
675   AM_RANGE(0xc00000, 0xc0001f) AM_MIRROR(0x18ff00) AM_READWRITE(megadriv_vdp_r, megadriv_vdp_w)
662676   AM_RANGE(0xe00000, 0xe0ffff) AM_MIRROR(0x1f0000) AM_RAM AM_BASE(&generic_nvram16) AM_SIZE(&generic_nvram_size)
663677ADDRESS_MAP_END
664678
r3445r3446
13421356    Sound interfaces
13431357******************************************************************************/
13441358
1359void  segac2_irq2_interrupt(running_machine *machine, int state)
1360{
1361   //printf("sound irq %d\n", state);
1362   cpunum_set_input_line(machine, 0, 2, state ? ASSERT_LINE : CLEAR_LINE);
1363}
13451364static const ym3438_interface ym3438_intf =
13461365{
1347   genesis_irq2_interrupt      /* IRQ handler */
1366   segac2_irq2_interrupt,      /* IRQ handler */
13481367};
13491368
13501369
r3445r3446
13611380
13621381******************************************************************************/
13631382
1383VIDEO_START(segac2_new)
1384{
1385   VIDEO_START_CALL(megadriv);
1386
1387
1388   megadrive_vdp_palette_lookup_segac2 = auto_malloc(0x1000);
1389   megadrive_vdp_palette_lookup_sprite_segac2 = auto_malloc(0x1000);
1390   megadrive_vdp_palette_lookup_shadow_segac2 = auto_malloc(0x1000);
1391   megadrive_vdp_palette_lookup_highlight_segac2 = auto_malloc(0x1000);
1392
1393   megadrive_vdp_palette_lookup = megadrive_vdp_palette_lookup_segac2;
1394   megadrive_vdp_palette_lookup_sprite = megadrive_vdp_palette_lookup_sprite_segac2;
1395   megadrive_vdp_palette_lookup_shadow = megadrive_vdp_palette_lookup_shadow_segac2;
1396   megadrive_vdp_palette_lookup_highlight = megadrive_vdp_palette_lookup_highlight_segac2;
1397
1398}
1399
1400VIDEO_UPDATE(segac2_new)
1401{
1402   if (!segac2_enable_display)
1403   {
1404      fillbitmap(bitmap, get_black_pen(screen->machine), NULL);
1405      return 0;
1406   }
1407
1408   VIDEO_UPDATE_CALL(megadriv);
1409   return 0;
1410}
1411
1412
13641413static MACHINE_DRIVER_START( segac )
13651414
13661415   /* basic machine hardware */
13671416   MDRV_CPU_ADD("main", M68000, XL2_CLOCK/6)
13681417   MDRV_CPU_PROGRAM_MAP(main_map,0)
1369   MDRV_CPU_VBLANK_INT("main", genesis_vblank_interrupt)
13701418
1419
13711420   MDRV_MACHINE_START(segac2)
13721421   MDRV_MACHINE_RESET(segac2)
13731422   MDRV_NVRAM_HANDLER(generic_randfill)
13741423
13751424   /* video hardware */
1376   MDRV_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS)
1425   //MDRV_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS)
13771426
1378   MDRV_SCREEN_ADD("main", RASTER)
1427   MDRV_SCREEN_ADD("megadriv", RASTER)
1428   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB15)
13791429   MDRV_SCREEN_REFRESH_RATE(60)
1380   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
1381   MDRV_SCREEN_SIZE(342,262)
1382   MDRV_SCREEN_VISIBLE_AREA(0, 319, 0, 223)
1430   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) // Vblank handled manually.
1431   MDRV_SCREEN_SIZE(64*8, 64*8)
1432   MDRV_SCREEN_VISIBLE_AREA(0, 32*8-1, 0, 28*8-1)
13831433
13841434   MDRV_PALETTE_LENGTH(2048)
13851435
1386   MDRV_VIDEO_START(segac2)
1387   MDRV_VIDEO_UPDATE(segac2)
1436   MDRV_VIDEO_START(segac2_new)
1437   MDRV_VIDEO_UPDATE(segac2_new)
1438   MDRV_VIDEO_EOF( megadriv )
13881439
13891440   /* sound hardware */
13901441   MDRV_SPEAKER_STANDARD_MONO("mono")
r3445r3446
14151466    Rom Definitions
14161467*******************************************************************************
14171468
1418    All the known System C/C2 Dumps are listed here with the exception of
1419    the version of Puzzle & Action (I believe its actually Ichidant-R) which
1420    was credited to SpainDumps in the included text file.  This appears to be
1421    a bad dump (half sized roms) however the roms do not match up exactly with
1422    the good dump of the game.  English language sets are assumed to be the
1423    parent where they exist.  Hopefully some more alternate version dumps will
1424    turn up sometime soon for example English Language version of Tant-R or
1425    Japanese Language versions of Borench (if of course these games were
1426    released in other locations.
1427
14281469    Games are in Order of Date (Year) with System-C titles coming first.
14291470
14301471******************************************************************************/
r3445r3446
18271868
18281869******************************************************************************/
18291870
1830static void segac2_common_init(int (*func)(int in))
1871extern int genvdp_use_cram;
1872extern int genesis_has_z80;
1873extern int genesis_always_irq6;
1874extern int genesis_other_hacks;
1875extern DRIVER_INIT( megadriv_c2 );
1876
1877static void segac2_common_init(running_machine* machine, int (*func)(int in))
18311878{
1879   DRIVER_INIT_CALL( megadriv_c2 );
1880
18321881   prot_func = func;
1833   bloxeed_sound = 0;
1882
1883   genvdp_use_cram = 0;
1884   genesis_has_z80 = 0;
1885   genesis_always_irq6 = 1;
1886   genesis_other_hacks = 0;
18341887}
18351888
18361889
r3445r3446
20602113
20612114static DRIVER_INIT( c2boot )
20622115{
2063   segac2_common_init(NULL);
2116   segac2_common_init(machine, NULL);
20642117}
20652118
20662119static DRIVER_INIT( bloxeedc )
20672120{
2068   segac2_common_init(NULL);
2069   bloxeed_sound = 1;
2121   segac2_common_init(machine, NULL);
20702122}
20712123
20722124static DRIVER_INIT( columns )
20732125{
2074   segac2_common_init(prot_func_columns);
2126   segac2_common_init(machine, prot_func_columns);
20752127}
20762128
20772129static DRIVER_INIT( columns2 )
20782130{
2079   segac2_common_init(prot_func_columns2);
2131   segac2_common_init(machine, prot_func_columns2);
20802132}
20812133
20822134static DRIVER_INIT( tfrceac )
20832135{
2084   segac2_common_init(prot_func_tfrceac);
2136   segac2_common_init(machine, prot_func_tfrceac);
20852137}
20862138
20872139static DRIVER_INIT( tfrceacb )
20882140{
20892141   /* disable the palette bank switching from the protection chip */
2090   segac2_common_init(NULL);
2142   segac2_common_init(machine, NULL);
20912143   memory_install_write16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x800000, 0x800001, 0, 0, SMH_NOP);
20922144}
20932145
20942146static DRIVER_INIT( borench )
20952147{
2096   segac2_common_init(prot_func_borench);
2148   segac2_common_init(machine, prot_func_borench);
20972149}
20982150
20992151static DRIVER_INIT( twinsqua )
21002152{
2101   segac2_common_init(prot_func_twinsqua);
2153   segac2_common_init(machine, prot_func_twinsqua);
21022154}
21032155
21042156static DRIVER_INIT( ribbit )
21052157{
2106   segac2_common_init(prot_func_ribbit);
2158   segac2_common_init(machine, prot_func_ribbit);
21072159}
21082160
21092161static DRIVER_INIT( puyo )
21102162{
2111   segac2_common_init(prot_func_puyo);
2163   segac2_common_init(machine, prot_func_puyo);
21122164}
21132165
21142166static DRIVER_INIT( tantr )
21152167{
2116   segac2_common_init(prot_func_tantr);
2168   segac2_common_init(machine, prot_func_tantr);
21172169}
21182170
21192171static DRIVER_INIT( tantrkor )
21202172{
2121   segac2_common_init(prot_func_tantrkor);
2173   segac2_common_init(machine, prot_func_tantrkor);
21222174}
21232175
21242176static DRIVER_INIT( potopoto )
21252177{
2126   segac2_common_init(prot_func_potopoto);
2178   segac2_common_init(machine, prot_func_potopoto);
21272179}
21282180
21292181static DRIVER_INIT( stkclmns )
21302182{
2131   segac2_common_init(prot_func_stkclmns);
2183   segac2_common_init(machine, prot_func_stkclmns);
21322184}
21332185
21342186static DRIVER_INIT( stkclmnj )
21352187{
2136   segac2_common_init(prot_func_stkclmnj);
2188   segac2_common_init(machine, prot_func_stkclmnj);
21372189}
21382190
21392191static DRIVER_INIT( ichir )
21402192{
2141   segac2_common_init(prot_func_ichir);
2193   segac2_common_init(machine, prot_func_ichir);
21422194}
21432195
21442196static DRIVER_INIT( ichirk )
21452197{
2146   segac2_common_init(prot_func_ichirk);
2198   segac2_common_init(machine, prot_func_ichirk);
21472199}
21482200
21492201static DRIVER_INIT( ichirj )
21502202{
2151   segac2_common_init(prot_func_ichirj);
2203   segac2_common_init(machine, prot_func_ichirj);
21522204}
21532205
21542206static DRIVER_INIT( ichirjbl )
21552207{
2208
21562209   /* when did this actually work? - the protection is patched but the new check fails? */
21572210   UINT16 *rom = (UINT16 *)memory_region(machine, "main");
21582211   rom[0x390/2] = 0x6600;
2212
2213   segac2_common_init(machine, NULL);
21592214}
21602215
21612216static DRIVER_INIT( puyopuy2 )
21622217{
2163   segac2_common_init(prot_func_puyopuy2);
2218   segac2_common_init(machine, prot_func_puyopuy2);
21642219}
21652220
21662221static DRIVER_INIT( zunkyou )
21672222{
2168   segac2_common_init(prot_func_zunkyou);
2223   segac2_common_init(machine, prot_func_zunkyou);
21692224}
21702225
21712226
21722227static DRIVER_INIT( pclub )
21732228{
2174   segac2_common_init(prot_func_pclub);
2229   segac2_common_init(machine, prot_func_pclub);
21752230
21762231   memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880120, 0x880121, 0, 0, printer_r );/*Print Club Vol.1*/
21772232   memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880124, 0x880125, 0, 0, printer_r );/*Print Club Vol.2*/
r3445r3446
21802235
21812236static DRIVER_INIT( pclubjv2 )
21822237{
2183   segac2_common_init(prot_func_pclubjv2);
2238   segac2_common_init(machine, prot_func_pclubjv2);
21842239
21852240   memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880120, 0x880121, 0, 0, printer_r );/*Print Club Vol.1*/
21862241   memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880124, 0x880125, 0, 0, printer_r );/*Print Club Vol.2*/
r3445r3446
21892244
21902245static DRIVER_INIT( pclubjv4 )
21912246{
2192   segac2_common_init(prot_func_pclubjv4);
2247   segac2_common_init(machine, prot_func_pclubjv4);
21932248
21942249   memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880120, 0x880121, 0, 0, printer_r );/*Print Club Vol.1*/
21952250   memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880124, 0x880125, 0, 0, printer_r );/*Print Club Vol.2*/
r3445r3446
21982253
21992254static DRIVER_INIT( pclubjv5 )
22002255{
2201   segac2_common_init(prot_func_pclubjv5);
2256   segac2_common_init(machine, prot_func_pclubjv5);
22022257
22032258   memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880120, 0x880121, 0, 0, printer_r );/*Print Club Vol.1*/
22042259   memory_install_read16_handler(machine, 0, ADDRESS_SPACE_PROGRAM, 0x880124, 0x880125, 0, 0, printer_r );/*Print Club Vol.2*/
src/mame/drivers/taito_f2.c
r3445r3446
232232used in printer [printer test?] mode. It seems to be a printer status
233233input. With the value currently returned, it sounds an alarm and says
234234[Japanese trans.] "Error detected on the printer. Call machine operator."
235Update (2008.10.09) Printer shall now be correct but it's still not clear
236how the inputs are physically connected and what the are supposed to do.
235237
236238The timer stays at 00:00. Missing RTC emulation?
237239
238240[Coin lockout/ctr?]
239241
242Calendar / Time in "test mode" always reset to default settings.
240243
244
241245Quiz Crayon 2
242246-------------
243247
r3445r3446
302306
303307static INT32 banknum = 0;
304308static INT32 mjnquest_input;
305static INT32 yesnoj_dsw = 0;
306309
307310
308311/**********************************************************
r3445r3446
621624         case 0x00:
622625              return input_port_read(machine, "IN0");
623626
624/* case 0x01 only used if "printer" DSW is on, and appears to
625   be printer status byte */
627         case 0x01:
628              return input_port_read(machine, "IN1");
626629
627630         case 0x02:
628              return input_port_read(machine, "IN1");
631              return input_port_read(machine, "IN2");
629632    }
630
633#ifdef MAME_DEBUG
631634   logerror("CPU #0 PC %06x: warning - read unmapped input_r offset %06x\n", activecpu_get_pc(), offset);
635#endif
632636
633637   return 0x0;
634638}
635639
636640static READ16_HANDLER( yesnoj_dsw_r )
637641{
638#ifdef MAME_DEBUG
639   logerror("CPU #0 PC = %06x: read yesnoj DSW %01x\n", activecpu_get_pc(), yesnoj_dsw);
640#endif
641
642   yesnoj_dsw = 1 - yesnoj_dsw;   /* game reads same word twice to get DSW A then B so we toggle */
643
644   if (yesnoj_dsw)
645   {
646      return input_port_read(machine, "DSWA");
647   }
648   else
649   {
650      return input_port_read(machine, "DSWB");
651   }
642   return input_port_read(machine, "DSWA");
652643}
653644
654645/******************************************************************
r3445r3446
14621453//  AM_RANGE(0x700000, 0x70000b) AM_READ(yesnoj_unknown_r)   /* what's this? */
14631454   AM_RANGE(0x800000, 0x800003) AM_READ(taitof2_msb_sound_r)
14641455   AM_RANGE(0xa00000, 0xa0000f) AM_READ(yesnoj_input_r)
1465   AM_RANGE(0xb00000, 0xb00001) AM_READ(yesnoj_dsw_r)   /* ?? (reads this twice in init) */
1456   AM_RANGE(0xb00000, 0xb00001) AM_READ(yesnoj_dsw_r)
14661457ADDRESS_MAP_END
14671458
14681459static ADDRESS_MAP_START( yesnoj_writemem, ADDRESS_SPACE_PROGRAM, 16 )
r3445r3446
35083499   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
35093500INPUT_PORTS_END
35103501
3511static INPUT_PORTS_START( yesnoj )   // apparently no test mode, though text in rom suggests printer test
3512   PORT_START("IN0")
3513   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
3514   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
3515   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
3516   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
3517   PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
3518
3519   PORT_START("IN1")
3520   TAITO_F2_SYSTEM_INPUT
3521   PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
3522
3523   PORT_START("DSWA")   /* DSW A ??? */
3524   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
3525   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
3526   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3527   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
3528   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
3529   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3530   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
3531   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
3532   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3533   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
3534   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
3535   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3536   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
3537   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
3538   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3539   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
3540   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
3541   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3542   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
3543   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
3544   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3545   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
3546   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
3547   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3548
3549   PORT_START("DSWB")   /* DSW B ? */
3550   PORT_DIPNAME( 0x01, 0x00, "Results Printer" )
3551   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
3552   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
3502INPUT_PORTS_START( yesnoj )
3503   /* 0xb00000 -> 0x20c0e0.b ($40e0,A5) */
3504   PORT_START("DSWA")
3505   PORT_DIPNAME( 0x01, 0x00, "Print Results" )
3506   PORT_DIPSETTING(    0x00, DEF_STR( No ) )
3507   PORT_DIPSETTING(    0x01, DEF_STR( Yes ) )
35533508   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) )
35543509   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
35553510   PORT_DIPSETTING(    0x02, DEF_STR( On ) )
3556   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
3511   PORT_DIPNAME( 0x04, 0x04, "Printer" )
35573512   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
35583513   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3559   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
3560   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
3561   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3562   PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) )   // same for both slots
3563   PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
3564   PORT_DIPSETTING(    0x10, DEF_STR( 3C_1C ) )
3565   PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
3566   PORT_DIPSETTING(    0x30, DEF_STR( 1C_1C ) )
3567   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
3568   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
3569   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3570   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
3571   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
3572   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3514   PORT_DIPNAME( 0x08, 0x00, "2 Players Game" )
3515   PORT_DIPSETTING(    0x08, "1 Credit" )
3516   PORT_DIPSETTING(    0x00, "2 Credits" )
3517   TAITO_COINAGE_US_COIN_START
3518   PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW )
3519   PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW )
3520
3521   PORT_START("DSWB")                                           /* does it physically exist ? */
3522
3523   PORT_START("IN0")
3524   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME( "P1 Yes" )
3525   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME( "P1 No" )
3526   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME( "P2 Yes" )
3527   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME( "P2 No" )
3528   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
3529   PORT_SERVICE( 0x20, IP_ACTIVE_LOW )
3530   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL )                 /* printer : paper time-out ? */
3531   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
3532
3533   PORT_START("IN1")
3534   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
3535   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
3536   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
3537   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
3538   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL )                /* printer : unknown */
3539   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL )                /* printer : paper */
3540   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SPECIAL )                 /* printer : unknown */
3541   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
3542
3543   PORT_START("IN2")
3544   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_TILT )                    /* not mapped in "test mode" */
3545   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 )
3546   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
3547   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )                   /* not mapped in "test mode" */
3548   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
3549   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
3550   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
3551   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
35733552INPUT_PORTS_END
35743553
35753554
r3445r3446
58255804   }
58265805}
58275806
5828static DRIVER_INIT( yesnoj )
5829{
5830   yesnoj_dsw = 0;
5831   state_save_register_global(yesnoj_dsw);
5832}
5833
58345807static STATE_POSTLOAD( driveout_postload )
58355808{
58365809   reset_driveout_sound_region();
r3445r3446
58885861GAME( 1991, metalb,   0,        metalb,   metalb,   0,        ROT0,   "Taito Corporation Japan", "Metal Black (World)", 0 )
58895862GAME( 1991, metalbj,  metalb,   metalb,   metalbj,  0,        ROT0,   "Taito Corporation", "Metal Black (Japan)", 0 )
58905863GAME( 1991, qzchikyu, 0,        qzchikyu, qzchikyu, 0,        ROT0,   "Taito Corporation", "Quiz Chikyu Bouei Gun (Japan)", 0 )
5891GAME( 1992, yesnoj,   0,        yesnoj,   yesnoj,   yesnoj,   ROT0,   "Taito Corporation", "Yes/No Sinri Tokimeki Chart", 0 )
5864GAME( 1992, yesnoj,   0,        yesnoj,   yesnoj,   0,        ROT0,   "Taito Corporation", "Yes/No Sinri Tokimeki Chart", 0 )
58925865GAME( 1992, deadconx, 0,        deadconx, deadconx, 0,        ROT0,   "Taito Corporation Japan", "Dead Connection (World)", 0 )
58935866GAME( 1992, deadconj, deadconx, deadconj, deadconj, 0,        ROT0,   "Taito Corporation", "Dead Connection (Japan)", 0 )
58945867GAME( 1992, dinorex,  0,        dinorex,  dinorex,  0,        ROT0,   "Taito Corporation Japan", "Dino Rex (World)", 0 )
src/mame/drivers/exidy.c
r3445r3446
290290
291291static INPUT_PORTS_START( sidetrac )
292292   PORT_START("DSW")
293   PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
293   PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:1,2")
294294   PORT_DIPSETTING(    0x00, "2" )
295295   PORT_DIPSETTING(    0x01, "3" )
296296   PORT_DIPSETTING(    0x02, "4" )
297297   PORT_DIPSETTING(    0x03, "5" )
298   PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Coinage ) )
298   PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:3,4")
299299   PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
300   /* 0x0c same as 0x08 */
300301   PORT_DIPSETTING(    0x04, DEF_STR( 1C_1C ) )
301302   PORT_DIPSETTING(    0x00, DEF_STR( 1C_2C ) )
302/* 0x0c 2C_1C */
303   PORT_DIPNAME( 0x10, 0x10, "Top Score Award" )
303   PORT_DIPNAME( 0x10, 0x10, "Top Score Award" ) PORT_DIPLOCATION("SW1:5")
304304   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
305305   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
306306   PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
r3445r3446
326326static INPUT_PORTS_START( targ )
327327   PORT_START("DSW")
328328   PORT_BIT ( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) /* upright/cocktail switch? */
329   PORT_DIPNAME( 0x02, 0x00, "Pence Coinage" )
329   PORT_DIPNAME( 0x02, 0x00, "Pence Coinage" ) PORT_DIPLOCATION("SW1:2")
330330   PORT_DIPSETTING(    0x00, "10P/1P, 50P Coin/6P" )
331331   PORT_DIPSETTING(    0x02, "2x10P/1P, 50P Coin/3P" )
332   PORT_DIPNAME( 0x04, 0x00, "Top Score Award" )
332   PORT_DIPNAME( 0x04, 0x00, "Top Score Award" ) PORT_DIPLOCATION("SW1:3")
333333   PORT_DIPSETTING(    0x00, "Credit" )
334334   PORT_DIPSETTING(    0x04, "Extended Play" )
335   PORT_DIPNAME( 0x18, 0x08, "Quarter Coinage" )
335   PORT_DIPNAME( 0x18, 0x08, "Quarter Coinage" ) PORT_DIPLOCATION("SW1:4,5")
336336   PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
337337   PORT_DIPSETTING(    0x08, DEF_STR( 1C_1C ) )
338338   PORT_DIPSETTING(    0x00, "1C/1C (no display)" )
339339   PORT_DIPSETTING(    0x18, DEF_STR( 1C_2C ) )
340   PORT_DIPNAME( 0x60, 0x40, DEF_STR( Lives ) )
340   PORT_DIPNAME( 0x60, 0x40, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:6,7")
341341   PORT_DIPSETTING(    0x60, "2" )
342342   PORT_DIPSETTING(    0x40, "3" )
343343   PORT_DIPSETTING(    0x20, "4" )
344344   PORT_DIPSETTING(    0x00, "5" )
345   PORT_DIPNAME( 0x80, 0x80, "Currency" )
345   PORT_DIPNAME( 0x80, 0x80, "Currency" ) PORT_DIPLOCATION("SW1:8")
346346   PORT_DIPSETTING(    0x80, "Quarters" )
347347   PORT_DIPSETTING(    0x00, "Pence" )
348348
r3445r3446
372372   PORT_INCLUDE(targ)
373373
374374   PORT_MODIFY("INTSOURCE")
375   PORT_DIPNAME( 0x03, 0x00, DEF_STR( Language ) )
375   PORT_DIPNAME( 0x03, 0x00, DEF_STR( Language ) ) PORT_DIPLOCATION("SW1:1,2")
376376   PORT_DIPSETTING(    0x00, DEF_STR( English ) )
377377   PORT_DIPSETTING(    0x01, DEF_STR( French ) )
378378   PORT_DIPSETTING(    0x02, DEF_STR( German ) )
r3445r3446
384384   PORT_INCLUDE(spectar)
385385
386386   PORT_MODIFY("DSW")
387   PORT_DIPNAME( 0x03, 0x01, DEF_STR( Coinage ) )
387   PORT_DIPNAME( 0x03, 0x01, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2")
388388   PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )      PORT_CONDITION("DSW", 0x80, PORTCOND_EQUALS, 0x00)
389389   PORT_DIPSETTING(    0x01, DEF_STR( 1C_1C ) )      PORT_CONDITION("DSW", 0x80, PORTCOND_EQUALS, 0x00)
390390   PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )      PORT_CONDITION("DSW", 0x80, PORTCOND_EQUALS, 0x00)
r3445r3446
393393   PORT_DIPSETTING(    0x01, "1C/1P, 50P Coin/6P" )   PORT_CONDITION("DSW", 0x80, PORTCOND_NOTEQUALS, 0x00)
394394   PORT_DIPSETTING(    0x02, "1C/2P, 50P Coin/12P" )   PORT_CONDITION("DSW", 0x80, PORTCOND_NOTEQUALS, 0x00)
395395   PORT_DIPSETTING(    0x03, "1C/3P, 50P Coin/18P" )   PORT_CONDITION("DSW", 0x80, PORTCOND_NOTEQUALS, 0x00)
396   PORT_DIPNAME( 0x04, 0x00, "Top Score Award" )
396   PORT_DIPNAME( 0x04, 0x00, "Top Score Award" ) PORT_DIPLOCATION("SW1:3")
397397   PORT_DIPSETTING(    0x00, "Credit" )
398398   PORT_DIPSETTING(    0x04, "Extended Play" )
399   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
399   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4")
400400   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
401401   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
402   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
402   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:5")
403403   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
404404   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
405   PORT_DIPNAME( 0x60, 0x20, DEF_STR( Lives ) )
405   PORT_DIPNAME( 0x60, 0x20, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:6,7")
406406   PORT_DIPSETTING(    0x00, "2" )
407407   PORT_DIPSETTING(    0x20, "3" )
408408   PORT_DIPSETTING(    0x40, "4" )
409409   PORT_DIPSETTING(    0x60, "5" )
410   PORT_DIPNAME( 0x80, 0x00, "Coin Mode" )
410   PORT_DIPNAME( 0x80, 0x00, "Coin Mode" ) PORT_DIPLOCATION("SW1:8")
411411   PORT_DIPSETTING(    0x00, "Mode 1" )
412412   PORT_DIPSETTING(    0x80, "Mode 2" )
413413
r3445r3446
425425   PORT_INCLUDE(rallys)
426426
427427   PORT_MODIFY("DSW")
428   PORT_DIPNAME( 0x03, 0x01, DEF_STR( Coinage ) )
428   PORT_DIPNAME( 0x03, 0x01, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2")
429429   PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )      PORT_CONDITION("DSW", 0x80, PORTCOND_EQUALS, 0x00)
430430   PORT_DIPSETTING(    0x01, DEF_STR( 1C_1C ) )      PORT_CONDITION("DSW", 0x80, PORTCOND_EQUALS, 0x00)
431431   PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )      PORT_CONDITION("DSW", 0x80, PORTCOND_EQUALS, 0x00)
r3445r3446
440440static INPUT_PORTS_START( mtrap )
441441   PORT_START("DSW")
442442   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 )
443   PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) )
443   PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:2,3")
444444   PORT_DIPSETTING(    0x06, "30000" )
445445   PORT_DIPSETTING(    0x04, "40000" )
446446   PORT_DIPSETTING(    0x02, "50000" )
447447   PORT_DIPSETTING(    0x00, "60000" )
448   PORT_DIPNAME( 0x98, 0x98, DEF_STR( Coinage ) )
448   PORT_DIPNAME( 0x98, 0x98, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:4,5,8")
449449   PORT_DIPSETTING(    0x90, DEF_STR( 2C_1C ) )
450450   PORT_DIPSETTING(    0x00, "Coin A 2C/1C Coin B 1C/3C" )
451451   PORT_DIPSETTING(    0x98, DEF_STR( 1C_1C ) )
r3445r3446
454454   PORT_DIPSETTING(    0x88, DEF_STR( 1C_2C ) )
455455   PORT_DIPSETTING(    0x08, "Coin A 1C/3C Coin B 2C/7C" )
456456   PORT_DIPSETTING(    0x80, DEF_STR( 1C_4C ) )
457   PORT_DIPNAME( 0x60, 0x40, DEF_STR( Lives ) )
457   PORT_DIPNAME( 0x60, 0x40, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:6,7")
458458   PORT_DIPSETTING(    0x60, "2" )
459459   PORT_DIPSETTING(    0x40, "3" )
460460   PORT_DIPSETTING(    0x20, "4" )
r3445r3446
504504static INPUT_PORTS_START( venture )
505505   PORT_START("DSW")
506506   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 )
507   PORT_DIPNAME( 0x06, 0x00, DEF_STR( Bonus_Life ) )
507   PORT_DIPNAME( 0x06, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:2,3")
508508   PORT_DIPSETTING(    0x00, "20000" )
509509   PORT_DIPSETTING(    0x02, "30000" )
510510   PORT_DIPSETTING(    0x04, "40000" )
511511   PORT_DIPSETTING(    0x06, "50000" )
512   PORT_DIPNAME( 0x98, 0x80, DEF_STR( Coinage ) )
512   PORT_DIPNAME( 0x98, 0x80, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:4,5,8")
513513   PORT_DIPSETTING(    0x88, DEF_STR( 2C_1C ) )
514514   PORT_DIPSETTING(    0x80, DEF_STR( 1C_1C ) )
515   /*0x90 same as 0x80 */
515516   PORT_DIPSETTING(    0x98, DEF_STR( 1C_2C ) )
516517   PORT_DIPSETTING(    0x00, "Pence: A 2C/1C B 1C/3C" )
517518   PORT_DIPSETTING(    0x18, "Pence: A 1C/1C B 1C/6C" )
518519   /*0x10 same as 0x00 */
519   /*0x90 same as 0x80 */
520   PORT_DIPNAME( 0x60, 0x20, DEF_STR( Lives ) )
520   PORT_DIPNAME( 0x60, 0x20, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:6,7")
521521   PORT_DIPSETTING(    0x00, "2" )
522522   PORT_DIPSETTING(    0x20, "3" )
523523   PORT_DIPSETTING(    0x40, "4" )
r3445r3446
560560static INPUT_PORTS_START( teetert )
561561   PORT_START("DSW")
562562   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 )
563   PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) )
563   PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:2,3")
564564   PORT_DIPSETTING(    0x06, "20000" )
565565   PORT_DIPSETTING(    0x04, "30000" )
566566   PORT_DIPSETTING(    0x02, "40000" )
567567   PORT_DIPSETTING(    0x00, "50000" )
568   PORT_DIPNAME( 0x98, 0x98, DEF_STR( Coinage ) )
568   PORT_DIPNAME( 0x98, 0x98, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:4,5,8")
569569   PORT_DIPSETTING(    0x90, DEF_STR( 2C_1C ) )
570570   PORT_DIPSETTING(    0x00, "Pence: A 2C/1C B 1C/3C" )
571571   PORT_DIPSETTING(    0x98, DEF_STR( 1C_1C ) )
r3445r3446
574574   PORT_DIPSETTING(    0x88, DEF_STR( 1C_2C ) )
575575   PORT_DIPSETTING(    0x08, "1C/3C, 2C/7C" )
576576   PORT_DIPSETTING(    0x80, DEF_STR( 1C_4C ) )
577   PORT_DIPNAME( 0x60, 0x40, DEF_STR( Lives ) )
577   PORT_DIPNAME( 0x60, 0x40, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:6,7")
578578   PORT_DIPSETTING(    0x00, "5" )
579579   PORT_DIPSETTING(    0x20, "4" )
580580   PORT_DIPSETTING(    0x40, "3" )
r3445r3446
619619static INPUT_PORTS_START( pepper2 )
620620   PORT_START("DSW")
621621   PORT_BIT ( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 )
622   PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) )
622   PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:2,3")
623623   PORT_DIPSETTING(    0x06, "40000" )
624624   PORT_DIPSETTING(    0x04, "50000" )
625625   PORT_DIPSETTING(    0x02, "60000" )
626626   PORT_DIPSETTING(    0x00, "70000" )
627   PORT_DIPNAME( 0x60, 0x40, DEF_STR( Lives ) )
627        PORT_DIPNAME( 0x60, 0x40, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:6,7")
628628   PORT_DIPSETTING(    0x60, "2" )
629629   PORT_DIPSETTING(    0x40, "3" )
630630   PORT_DIPSETTING(    0x20, "4" )
631631   PORT_DIPSETTING(    0x00, "5" )
632   PORT_DIPNAME( 0x98, 0x98, DEF_STR( Coinage ) )
632        PORT_DIPNAME( 0x98, 0x98, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:4,5,8")
633633   PORT_DIPSETTING(    0x90, DEF_STR( 2C_1C ) )
634634   PORT_DIPSETTING(    0x00, "Coin A 2C/1C Coin B 1C/3C" )
635635   PORT_DIPSETTING(    0x98, DEF_STR( 1C_1C ) )
r3445r3446
676676static INPUT_PORTS_START( fax )
677677   PORT_START("DSW")
678678   PORT_BIT ( 0x01, IP_ACTIVE_HIGH, IPT_COIN2 )
679   PORT_DIPNAME( 0x06, 0x06, "Bonus Time" )
679   PORT_DIPNAME( 0x06, 0x06, "Bonus Time" ) PORT_DIPLOCATION("SW1:2,3")
680680   PORT_DIPSETTING(    0x06, "8000" )
681681   PORT_DIPSETTING(    0x04, "13000" )
682682   PORT_DIPSETTING(    0x02, "18000" )
683683   PORT_DIPSETTING(    0x00, "25000" )
684   PORT_DIPNAME( 0x60, 0x60, "Game/Bonus Times" )
684   PORT_DIPNAME( 0x60, 0x60, "Game/Bonus Times" ) PORT_DIPLOCATION("SW1:6,7")
685685   PORT_DIPSETTING(    0x60, ":32/:24" )
686686   PORT_DIPSETTING(    0x40, ":48/:36" )
687687   PORT_DIPSETTING(    0x20, "1:04/:48" )
688688   PORT_DIPSETTING(    0x00, "1:12/1:04" )
689   PORT_DIPNAME( 0x98, 0x98, DEF_STR( Coinage ) )
689   PORT_DIPNAME( 0x98, 0x98, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:4,5,8")
690690   PORT_DIPSETTING(    0x90, DEF_STR( 2C_1C ) )
691691   PORT_DIPSETTING(    0x00, "Coin A 2C/1C Coin B 1C/3C" )
692692   PORT_DIPSETTING(    0x98, DEF_STR( 1C_1C ) )
src/mame/drivers/backfire.c
r3445r3446
228228{
229229   /* some kind of screen indicator?  checked by backfira set before it will boot */
230230   int backfire_screen = mame_rand(machine)&1;
231   return ((eeprom_read_bit()<<24) | input_port_read(machine, "IN0") | (input_port_read(machine, "IN3")<<16)) ^  (backfire_screen << 26) ;
231   return ((eeprom_read_bit()<<24) | input_port_read(machine, "IN0")
232         | ((input_port_read(machine, "IN2") & ~0x40) <<16)
233         | ((input_port_read(machine, "IN3") &  0x40) <<16)) ^  (backfire_screen << 26) ;
232234}
233235
234236static READ32_HANDLER(backfire_control2_r)
r3445r3446
395397   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
396398
397399   PORT_START("IN3")
398   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
399   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
400   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 )
401   PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW )
402   PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_VBLANK )
403   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) /* 'soundmask' */
400   PORT_BIT( 0x003f, IP_ACTIVE_LOW, IPT_UNUSED ) /* all other bits like low IN2 */
404401   PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_VBLANK )
405402   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
406403
src/mame/drivers/cubeqst.c
r3445r3446
1919
2020#include "driver.h"
2121#include "cpu/cubeqcpu/cubeqcpu.h"
22#include "sound/dac.h"
2223#include "deprecat.h"
2324#include "sound/custom.h"
2425#include "streams.h"
r3445r3446
3536#define CUBEQST_HBLANK      320
3637#define CUBEQST_VCOUNT      280
3738
38#define ALPHA_PEN         8192
39
4039enum cpu_indices
4140{
4241   MAIN_CPU   = 0,
r3445r3446
5251 *
5352 *************************************/
5453
55static UINT16 *palette_ram;
5654static UINT8 *depth_buffer;
5755static int video_field;
5856
5957static UINT8 io_latch;
6058static UINT8 reset_latch;
6159
62static int disk_on;
6360static const device_config *laserdisc;
61static rgb_t *colormap;
6462
63
64
6565/*************************************
6666 *
6767 *  Video (move to separate file)
r3445r3446
7070
7171static const rectangle overlay_clip = { 0, 320-1, 0, 256-8 };
7272
73/* Get a pen number from a palette RAM entry */
74INLINE int get_output_color(UINT16 a)
75{
76   return ((a & 0xf000) >> 3) | ((a & 0x700) >> 2) | ((a & 0x70) >> 1) | (a & 0x7);
77}
78
79
8073static VIDEO_START( cubeqst )
8174{
8275   video_field = 0;
r3445r3446
8881{
8982   int i;
9083
91   for (i = 0; i < 8192; ++i)
84   colormap = auto_malloc(65536 * sizeof(colormap[0]));
85   for (i = 0; i < 65536; ++i)
9286   {
93      UINT8 r, g, b, y;
87      UINT8 a, r, g, b, y;
9488
95      b = i & 7;
96      g = (i >> 3) & 7;
97      r = (i >> 6) & 7;
98      y = ((i >> 9) & 0xf) * 2;
89      a = (i >> 3) & 1;
90      b = (i >> 0) & 7;
91      g = (i >> 4) & 7;
92      r = (i >> 8) & 7;
93      y = ((i >> 12) & 0xf) * 2;
9994
100      palette_set_color_rgb(machine, i, y*r, y*g, y*b);
95      colormap[i] = MAKE_ARGB(a ? 0 : 255, y*r, y*g, y*b);
10196   }
97}
10298
103   /* use pen 8192 for transparent */
104   palette_set_color(machine, 8192, MAKE_ARGB(0,0,0,0));
99static WRITE16_HANDLER( palette_w )
100{
101   video_screen_update_now(machine->primary_screen);
102   COMBINE_DATA(&paletteram16[offset]);
105103}
106104
107105/* TODO: This is a simplified version of what actually happens */
r3445r3446
109107{
110108   int y;
111109
112   int palentry = palette_ram[255];
113
114110   /*
115111     * Clear the display with palette RAM entry 0xff
116112     * This will be either transparent or an actual colour
117113    */
118114
119115   /* Bit 3 selects LD/#GRAPHICS */
120   if ((palentry & (1 << 3)) && disk_on)
121      fillbitmap(bitmap, ALPHA_PEN, cliprect);
122   else
123      fillbitmap(bitmap, screen->machine->pens[get_output_color(palentry)], cliprect);
116   fillbitmap(bitmap, colormap[255], cliprect);
124117
125118   cpuintrf_push_context(LINE_CPU);
126119
r3445r3446
130123      int i;
131124      int num_entries = get_ptr_ram_val(y);
132125      UINT32 *stk_ram = get_stack_ram();
133      UINT16 *dest = BITMAP_ADDR16(bitmap, y, 0);
126      UINT32 *dest = BITMAP_ADDR32(bitmap, y, 0);
127      UINT32 pen;
134128
135129      /* Zap the depth buffer */
136130      memset(depth_buffer, 0xff, 512);
r3445r3446
145139         int entry1 = stk_ram[(y << 7) | ((i + 0) & 0x7f)];
146140         int entry2 = stk_ram[(y << 7) | ((i + 1) & 0x7f)];
147141
148         UINT16 palram;
149         UINT16 pen;
150
151142         /* Determine which entry is the start point and which is the stop */
152143         if ( entry1 & (1 << 19) )
153144         {
r3445r3446
170161            // Shouldn't happen...
171162         }
172163
173         /* Get the 16-bit palette RAM entry */
174         palram = palette_ram[color];
175
176         if (palram & (1 << 3))
177            /* If transparent, draw using our special alpha pen */
178            pen = ALPHA_PEN;
179         else
180            /* Otherwise map the entry to a MAME pen */
181            pen = screen->machine->pens[get_output_color(palram)];
182
183164         /* Draw the span, testing for depth */
165         pen = colormap[paletteram16[color]];
184166         for (x = h1; x <= h2; ++x)
185167         {
186168            if (!(depth_buffer[x] < depth))
r3445r3446
206188{
207189   int int_level = video_field == 0 ? 5 : 6;
208190
209   cpunum_set_input_line(machine, MAIN_CPU, int_level, HOLD_LINE);
191   cputag_set_input_line(machine, "main_cpu", int_level, HOLD_LINE);
210192
211193   /* Update the laserdisc */
212194   video_field ^= 1;
r3445r3446
255237*/
256238static WRITE16_HANDLER( control_w )
257239{
258   disk_on = data & 1;
240   laserdisc_video_enable(laserdisc, data & 1);
259241}
260242
261243
r3445r3446
294276*/
295277static WRITE16_HANDLER( reset_w )
296278{
297   cpunum_set_input_line(machine, ROTATE_CPU, INPUT_LINE_RESET, data & 1 ? CLEAR_LINE : ASSERT_LINE);
298   cpunum_set_input_line(machine, LINE_CPU, INPUT_LINE_RESET, data & 1 ? CLEAR_LINE : ASSERT_LINE);
299   cpunum_set_input_line(machine, SOUND_CPU, INPUT_LINE_RESET, data & 2 ? CLEAR_LINE : ASSERT_LINE);
279   cputag_set_input_line(machine, "rotate_cpu", INPUT_LINE_RESET, data & 1 ? CLEAR_LINE : ASSERT_LINE);
280   cputag_set_input_line(machine, "line_cpu", INPUT_LINE_RESET, data & 1 ? CLEAR_LINE : ASSERT_LINE);
281   cputag_set_input_line(machine, "sound_cpu", INPUT_LINE_RESET, data & 2 ? CLEAR_LINE : ASSERT_LINE);
300282
301283   /* Swap stack and pointer RAM banks on rising edge of display reset */
302284   if (!BIT(reset_latch, 0) && BIT(data, 0))
r3445r3446
404386 *************************************/
405387
406388static ADDRESS_MAP_START( m68k_program_map, ADDRESS_SPACE_PROGRAM, 16 )
389   ADDRESS_MAP_GLOBAL_MASK(0x03ffff)
407390   AM_RANGE(0x000000, 0x01ffff) AM_ROM
408391   AM_RANGE(0x020000, 0x027fff) AM_READWRITE(read_rotram, write_rotram)
409392   AM_RANGE(0x028000, 0x028fff) AM_READWRITE(read_sndram, write_sndram)
r3445r3446
411394   AM_RANGE(0x038002, 0x038003) AM_READWRITE(chop_r, ldaud_w)
412395   AM_RANGE(0x038008, 0x038009) AM_READWRITE(line_r, reset_w)
413396   AM_RANGE(0x03800e, 0x03800f) AM_READWRITE(laserdisc_r, laserdisc_w)
414   AM_RANGE(0x03c800, 0x03c9ff) AM_RAM AM_BASE(&palette_ram)
397   AM_RANGE(0x03c800, 0x03c9ff) AM_RAM_WRITE(palette_w) AM_BASE(&paletteram16)
415398   AM_RANGE(0x03cc00, 0x03cc01) AM_WRITE(control_w)
416   AM_RANGE(0x03e000, 0x03efff) AM_RAM AM_MIRROR(0xfc0000) AM_BASE(&generic_nvram16) AM_SIZE(&generic_nvram_size)
417   AM_RANGE(0x03f000, 0x03ffff) AM_RAM AM_MIRROR(0xfc0000)
399   AM_RANGE(0x03e000, 0x03efff) AM_RAM AM_BASE(&generic_nvram16) AM_SIZE(&generic_nvram_size)
400   AM_RANGE(0x03f000, 0x03ffff) AM_RAM
418401ADDRESS_MAP_END
419402
420403
r3445r3446
444427   reset_latch = 0;
445428
446429   /* Auxillary CPUs are held in reset */
447   cpunum_set_input_line(machine, SOUND_CPU, INPUT_LINE_RESET, ASSERT_LINE);
448   cpunum_set_input_line(machine, ROTATE_CPU, INPUT_LINE_RESET, ASSERT_LINE);
449   cpunum_set_input_line(machine, LINE_CPU, INPUT_LINE_RESET, ASSERT_LINE);
430   cputag_set_input_line(machine, "sound_cpu", INPUT_LINE_RESET, ASSERT_LINE);
431   cputag_set_input_line(machine, "rotate_cpu", INPUT_LINE_RESET, ASSERT_LINE);
432   cputag_set_input_line(machine, "line_cpu", INPUT_LINE_RESET, ASSERT_LINE);
450433}
451434
452435
r3445r3446
456439 *
457440 *************************************/
458441
459static sound_stream *cquest_stream;
460
461442/*
462443 *  The sound CPU outputs to a 12-bit 7521 DAC
463444 *  The DAC output is multiplexed between
464445 *  16 channels (8 per side).
465446 */
466447
467static struct
468{
469   INT16 sample[2][8];
470} cquest_sound;
471
472448/* Called by the sound CPU emulation */
473449static void sound_dac_w(UINT16 data)
474450{
475   int side = data & 1;
476   int chan = (data >> 1) & 7;
477   int value = ((data >> 4) & 0xfff);
478
479   /* Sign extend 12-bit to 16-bit */
480   int finalvalue = (value & 0x7ff) - (value & 0x800);
481   if (cquest_sound.sample[side][chan] != finalvalue)
482   {
483      stream_update(cquest_stream);
484      cquest_sound.sample[side][chan] = finalvalue;
485   }
451   dac_signed_data_16_w(data & 15, (data & 0xfff0) ^ 0x8000);
486452}
487453
488static void cquest_stream_update(void *param, stream_sample_t **inputs, stream_sample_t **buffer, int length)
489{
490   int side;
491
492   /* Clear the buffers */
493   memset(buffer[0], 0, length * sizeof(*buffer[0]));
494   memset(buffer[1], 0, length * sizeof(*buffer[1]));
495
496   for (side = 0; side < 2; ++side)
497   {
498      int chan;
499      for (chan = 0; chan < 8; ++chan)
500      {
501         int samp;
502         for (samp = 0; samp < length; ++samp)
503            buffer[side][samp] += (cquest_sound.sample[side][chan]) * 4;
504      }
505   }
506}
507
508static void *cquest_sh_start(int clock, const custom_sound_interface *config)
509{
510   /* Allocate the stream */
511   cquest_stream = stream_create(0, 2, Machine->sample_rate, NULL, cquest_stream_update);
512
513   return auto_malloc(1);
514}
515
516static const custom_sound_interface custom_interface =
517{
518   cquest_sh_start
519};
520
521
522454static const cubeqst_snd_config snd_config =
523455{
524456   sound_dac_w,
r3445r3446
553485   MDRV_MACHINE_RESET(cubeqst)
554486   MDRV_NVRAM_HANDLER(generic_0fill)
555487
556   MDRV_LASERDISC_SCREEN_ADD_NTSC("main", BITMAP_FORMAT_INDEXED16)
488   MDRV_LASERDISC_SCREEN_ADD_NTSC("main", BITMAP_FORMAT_RGB32)
557489   MDRV_VIDEO_START(cubeqst)
558490
559   MDRV_PALETTE_LENGTH(8192 + 1)
560491   MDRV_PALETTE_INIT(cubeqst)
561492
562493   MDRV_LASERDISC_ADD("laserdisc", SIMUTREK_SPECIAL, "main", "ldsound")
563   MDRV_LASERDISC_OVERLAY(cubeqst, CUBEQST_HBLANK, CUBEQST_VCOUNT, BITMAP_FORMAT_INDEXED16)
494   MDRV_LASERDISC_OVERLAY(cubeqst, CUBEQST_HBLANK, CUBEQST_VCOUNT, BITMAP_FORMAT_RGB32)
564495   MDRV_LASERDISC_OVERLAY_CLIP(0, 320-1, 0, 256-8)
565496   MDRV_LASERDISC_OVERLAY_POSITION(0.002, -0.018)
566497   MDRV_LASERDISC_OVERLAY_SCALE(1.0, 1.030)
r3445r3446
572503   MDRV_SOUND_ROUTE(0, "left", 1.0)
573504   MDRV_SOUND_ROUTE(1, "right", 1.0)
574505
575   MDRV_SOUND_ADD("cubeqst", CUSTOM, 1)
576   MDRV_SOUND_CONFIG(custom_interface)
577   MDRV_SOUND_ROUTE(1, "left", 1.0)
578   MDRV_SOUND_ROUTE(0, "right", 1.0)
506   MDRV_SOUND_ADD("rdac0", DAC, 0)
507   MDRV_SOUND_ROUTE(0, "right", 0.125)
508   MDRV_SOUND_ADD("ldac0", DAC, 0)
509   MDRV_SOUND_ROUTE(0, "left", 0.125)
510   MDRV_SOUND_ADD("rdac1", DAC, 0)
511   MDRV_SOUND_ROUTE(0, "right", 0.125)
512   MDRV_SOUND_ADD("ldac1", DAC, 0)
513   MDRV_SOUND_ROUTE(0, "left", 0.125)
514   MDRV_SOUND_ADD("rdac2", DAC, 0)
515   MDRV_SOUND_ROUTE(0, "right", 0.125)
516   MDRV_SOUND_ADD("ldac2", DAC, 0)
517   MDRV_SOUND_ROUTE(0, "left", 0.125)
518   MDRV_SOUND_ADD("rdac3", DAC, 0)
519   MDRV_SOUND_ROUTE(0, "right", 0.125)
520   MDRV_SOUND_ADD("ldac3", DAC, 0)
521   MDRV_SOUND_ROUTE(0, "left", 0.125)
522   MDRV_SOUND_ADD("rdac4", DAC, 0)
523   MDRV_SOUND_ROUTE(0, "right", 0.125)
524   MDRV_SOUND_ADD("ldac4", DAC, 0)
525   MDRV_SOUND_ROUTE(0, "left", 0.125)
526   MDRV_SOUND_ADD("rdac5", DAC, 0)
527   MDRV_SOUND_ROUTE(0, "right", 0.125)
528   MDRV_SOUND_ADD("ldac5", DAC, 0)
529   MDRV_SOUND_ROUTE(0, "left", 0.125)
530   MDRV_SOUND_ADD("rdac6", DAC, 0)
531   MDRV_SOUND_ROUTE(0, "right", 0.125)
532   MDRV_SOUND_ADD("ldac6", DAC, 0)
533   MDRV_SOUND_ROUTE(0, "left", 0.125)
534   MDRV_SOUND_ADD("rdac7", DAC, 0)
535   MDRV_SOUND_ROUTE(0, "right", 0.125)
536   MDRV_SOUND_ADD("ldac7", DAC, 0)
537   MDRV_SOUND_ROUTE(0, "left", 0.125)
579538MACHINE_DRIVER_END
580539
581540
src/mame/drivers/shisen.c
r3445r3446
234234   MDRV_CPU_IO_MAP(io_map,0)
235235   MDRV_CPU_VBLANK_INT("main", irq0_line_hold)
236236
237   MDRV_CPU_ADD("audio", Z80, 3579645)
237   MDRV_CPU_ADD("sound", Z80, 3579645)
238238   MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem)
239239   MDRV_CPU_IO_MAP(sound_io_map,0)
240240   MDRV_CPU_VBLANK_INT_HACK(nmi_line_pulse,128)   /* clocked by V1? (Vigilante) */
r3445r3446
283283   ROM_RELOAD(               0x10000, 0x10000 )
284284   ROM_LOAD( "ic07.03",      0x20000, 0x10000, CRC(0350f6e2) SHA1(c683571969c0e4c66eb316a1bc580759db02bbfc) )
285285
286   ROM_REGION( 0x10000, "audio", 0 )
286   ROM_REGION( 0x10000, "sound", 0 )
287287   ROM_LOAD( "ic01.01",      0x00000, 0x10000, CRC(51b0a26c) SHA1(af2482cfe8d395848c8e1bf07bf1049ffc6ee69b) )
288288
289289   ROM_REGION( 0x100000, "gfx1", ROMREGION_DISPOSE )
r3445r3446
317317   ROM_RELOAD(               0x10000, 0x10000 )
318318   ROM_LOAD( "ic07.03",      0x20000, 0x10000, CRC(0350f6e2) SHA1(c683571969c0e4c66eb316a1bc580759db02bbfc) )
319319
320   ROM_REGION( 0x10000, "audio", 0 )
320   ROM_REGION( 0x10000, "sound", 0 )
321321   ROM_LOAD( "ic01.01",      0x00000, 0x10000, CRC(51b0a26c) SHA1(af2482cfe8d395848c8e1bf07bf1049ffc6ee69b) )
322322
323323   ROM_REGION( 0x100000, "gfx1", ROMREGION_DISPOSE )
r3445r3446
350350   ROM_LOAD( "a-27-a.rom",   0x00000, 0x20000, CRC(de2ecf05) SHA1(7256c5587f92db10a52c43001e3236f3be3df5df) )
351351   ROM_RELOAD(               0x10000, 0x20000 )
352352
353   ROM_REGION( 0x10000, "audio", 0 )
353   ROM_REGION( 0x10000, "sound", 0 )
354354   ROM_LOAD( "ic01.01",      0x00000, 0x10000, CRC(51b0a26c) SHA1(af2482cfe8d395848c8e1bf07bf1049ffc6ee69b) )
355355
356356   ROM_REGION( 0x100000, "gfx1", ROMREGION_DISPOSE )
r3445r3446
423423   ROM_RELOAD(               0x10000, 0x10000 )
424424   ROM_LOAD( "ic07.03",      0x20000, 0x10000, CRC(0350f6e2) SHA1(c683571969c0e4c66eb316a1bc580759db02bbfc) )
425425
426   ROM_REGION( 0x10000, "audio", 0 )
426   ROM_REGION( 0x10000, "sound", 0 )
427427   ROM_LOAD( "ic01.01",      0x00000, 0x10000, CRC(51b0a26c) SHA1(af2482cfe8d395848c8e1bf07bf1049ffc6ee69b) )
428428
429429   ROM_REGION( 0x100000, "gfx1", ROMREGION_DISPOSE )
src/emu/cpu/sh2/sh2drc.c
r3445r3446
10341034   load_fast_iregs(block);
10351035
10361036   /* check for interrupts */
1037   UML_MOV(block, MEM(&sh2->irqline), IMM(0xffffffff));      // mov irqline, #-1
10371038   UML_CMP(block, MEM(&sh2->pending_nmi), IMM(0));         // cmp pending_nmi, #0
10381039   UML_JMPc(block, IF_Z, skip+2);               // jz skip+2
10391040
r3445r3446
10441045   UML_MOV(block, MEM(&sh2->evec), IMM(0xffffffff));      // mov evec, -1
10451046   UML_MOV(block, IREG(0), IMM(0xffffffff));         // mov r0, -1 (r0 = irq)
10461047   UML_AND(block, IREG(1),  IREG(0), IMM(0xffff));              // and r1, 0xffff
1048
10471049   UML_LZCNT(block, IREG(1), MEM(&sh2->pending_irq));      // lzcnt r1, r1
10481050   UML_CMP(block, IREG(1), IMM(32));            // cmp r1, #32
1049   UML_JMPc(block, IF_Z, skip+1);               // jz skip+1
1051   UML_JMPc(block, IF_Z, skip+4);               // jz skip+4
10501052
10511053   UML_SUB(block, MEM(&sh2->irqline), IMM(31), IREG(1));         // sub irqline, #31, r1
10521054
1055   UML_LABEL(block, skip+4);               // skip+4:
10531056   UML_CMP(block, MEM(&sh2->internal_irq_level), IMM(0xffffffff));   // cmp internal_irq_level, #-1
10541057   UML_JMPc(block, IF_Z, skip+3);               // jz skip+3
10551058   UML_CMP(block, MEM(&sh2->internal_irq_level), MEM(&sh2->irqline));      // cmp internal_irq_level, irqline
1056   UML_JMPc(block, IF_BE, skip+3);               // ja skip+3
1059   UML_JMPc(block, IF_LE, skip+3);               // jle skip+3
10571060
10581061   UML_MOV(block, MEM(&sh2->irqline), MEM(&sh2->internal_irq_level));      // mov r0, internal_irq_level
10591062
r3445r3446
14141417      drcuml_codelabel skip = compiler->labelnum++;
14151418
14161419      compiler->checkints = FALSE;
1417      compiler->labelnum += 3;
1420      compiler->labelnum += 4;
14181421
14191422      /* check for interrupts */
1423      UML_MOV(block, MEM(&sh2->irqline), IMM(0xffffffff));      // mov irqline, #-1
14201424      UML_CMP(block, MEM(&sh2->pending_nmi), IMM(0));         // cmp pending_nmi, #0
14211425      UML_JMPc(block, IF_Z, skip+2);               // jz skip+2
14221426
r3445r3446
14261430      UML_LABEL(block, skip+2);               // skip+2:
14271431      UML_MOV(block, MEM(&sh2->evec), IMM(0xffffffff));      // mov evec, -1
14281432      UML_MOV(block, IREG(0), IMM(0xffffffff));         // mov r0, -1 (r0 = irq)
1429      UML_AND(block, IREG(1),  IREG(0), IMM(0xffff));              // and r1, 0xffff
1430      UML_LZCNT(block, IREG(1), MEM(&sh2->pending_irq));      // lzcnt r1, r1
1433      UML_AND(block, IREG(1),  IREG(0), IMM(0xffff));              // and r1, r0, 0xffff
1434
1435      UML_LZCNT(block, IREG(1), MEM(&sh2->pending_irq));      // lzcnt r1, pending_irq
14311436      UML_CMP(block, IREG(1), IMM(32));            // cmp r1, #32
1432      UML_JMPc(block, IF_Z, skip+1);               // jz skip+1
1437      UML_JMPc(block, IF_Z, skip+4);               // jz skip+4
14331438
14341439      UML_SUB(block, MEM(&sh2->irqline), IMM(31), IREG(1));         // sub irqline, #31, r1
14351440
1441      UML_LABEL(block, skip+4);               // skip+4:
14361442      UML_CMP(block, MEM(&sh2->internal_irq_level), IMM(0xffffffff));   // cmp internal_irq_level, #-1
14371443      UML_JMPc(block, IF_Z, skip+3);               // jz skip+3
14381444      UML_CMP(block, MEM(&sh2->internal_irq_level), MEM(&sh2->irqline));      // cmp internal_irq_level, irqline
1439      UML_JMPc(block, IF_BE, skip+3);               // ja skip+3
1445      UML_JMPc(block, IF_LE, skip+3);               // jle skip+3
14401446
14411447      UML_MOV(block, MEM(&sh2->irqline), MEM(&sh2->internal_irq_level));      // mov r0, internal_irq_level
14421448
src/emu/cpu/sh2/sh2.c
r3445r3446
21762176   sh2->internal_irq_level = -1;
21772177}
21782178
2179/*-------------------------------------------------
2180    sh1_reset - reset the processor
2181-------------------------------------------------*/
2182
2183static void sh1_reset(void)
2184{
2185   sh2_reset();
2186   sh2->cpu_type = CPU_TYPE_SH1;
2187}
2188
21792189/* Execute cycles - returns number of cycles actually run */
21802190static int sh2_execute(int cycles)
21812191{
r3445r3446
24622472   }
24632473}
24642474
2475void sh1_get_info(UINT32 state, cpuinfo *info)
2476{
2477   switch (state)
2478   {
2479      /* --- the following bits of info are returned as pointers to data or functions --- */
2480      case CPUINFO_PTR_RESET:                  info->reset = sh1_reset;            break;
2481
2482      /* --- the following bits of info are returned as NULL-terminated strings --- */
2483      case CPUINFO_STR_NAME:                      strcpy(info->s, "SH-1");            break;
2484
2485      default:                     sh2_get_info(state, info);         break;
2486   }
2487}
2488
24652489#endif
src/emu/video/resnet.c
r3445r3446
700700   int i,j,k;
701701   rgb_t *rgb;
702702
703   rgb = auto_malloc((rdi->end - rdi->start + 1)*sizeof(rgb_t));
703   rgb = malloc_or_die((rdi->end - rdi->start + 1)*sizeof(rgb_t));
704704   for (i=rdi->start; i<=rdi->end; i++)
705705   {
706706      UINT8 t[3] = {0,0,0};
src/emu/machine/ldpr8210.c
r3445r3446
9191   UINT8            data;               /* parallel data for simutrek */
9292   UINT8            data_ready;            /* ready flag for simutrek data */
9393   UINT8            port2;               /* 8748 port 2 state */
94   UINT8            jumphack;
94   UINT8            controlnext;         /* latch to control next pair of fields */
95   UINT8            controlthis;         /* latched value for our control over the current pair of fields */
9596};
9697
9798
r3445r3446
797798   if (!(data & 0x01) && (prev & 0x01))
798799   {
799800      /* special override for the Simutrek, which takes over control of this is some situations */
800      if (player->simutrek.cpunum == -1 || (player->simutrek.port2 & 0x04) != 0 || player->simutrek.jumphack)
801      if (player->simutrek.cpunum == -1 || !player->simutrek.controlthis)
801802      {
802803         if (LOG_SIMUTREK)
803804            printf("%3d:JUMP TRG\n", video_screen_get_vpos(ld->screen));
804805         ldcore_advance_slider(ld, direction);
805         player->simutrek.jumphack = 0;
806806      }
807807      else if (LOG_SIMUTREK)
808808         printf("%3d:Skipped JUMP TRG\n", video_screen_get_vpos(ld->screen));
r3445r3446
10701070{
10711071   laserdisc_state *ld = ldcore_get_safe_token(device);
10721072   ldplayer_data *player = ld->player;
1073   if (LOG_SIMUTREK && player->simutrek.audio_squelch != (state == 0))
1074      printf("--> audio squelch = %d\n", state == 0);
10731075   player->simutrek.audio_squelch = (state == 0);
10741076   update_audio_squelch(ld);
10751077}
r3445r3446
10831085static void simutrek_init(laserdisc_state *ld)
10841086{
10851087   astring *tempstring = astring_alloc();
1088   ldplayer_data *player = ld->player;
10861089
10871090   /* standard PR-8210 initialization */
10881091   pr8210_init(ld);
10891092
1093   /* initialize the Simutrek state */
1094   /* for proper synchronization of initial attract mode, this needs to be set */
1095   player->simutrek.data_ready = 1;
1096
10901097   /* find the Simutrek CPU */
1091   ld->player->simutrek.cpunum = mame_find_cpu_index(ld->device->machine, device_build_tag(tempstring, ld->device->tag, "simutrek"));
1098   player->simutrek.cpunum = mame_find_cpu_index(ld->device->machine, device_build_tag(tempstring, ld->device->tag, "simutrek"));
10921099   astring_free(tempstring);
10931100}
10941101
r3445r3446
11111118{
11121119   ldplayer_data *player = ld->player;
11131120
1121   if (fieldnum == 1)
1122   {
1123      player->simutrek.controlthis = player->simutrek.controlnext;
1124      player->simutrek.controlnext = 0;
1125   }
1126
11141127   if (LOG_SIMUTREK)
11151128      printf("%3d:VSYNC(%d)\n", video_screen_get_vpos(ld->screen), fieldnum);
11161129   pr8210_vsync(ld, vbi, fieldnum, curtime);
r3445r3446
12311244   }
12321245
12331246   /* bit $04 controls who owns the JUMP TRG command */
1234   if (!(data & 0x04) && (prev & 0x04))
1235      player->simutrek.jumphack = 1;
1247   if (LOG_SIMUTREK && ((data ^ prev) & 0x04))
1248      printf("%3d:Simutrek ownership line = %d (Simutrek PC=%03X)\n", video_screen_get_vpos(ld->screen), (data >> 2) & 1, activecpu_get_pc());
1249   player->simutrek.controlnext = (~data >> 2) & 1;
12361250
12371251   /* bits $03 control something (status?) */
12381252   if (LOG_SIMUTREK && ((data ^ prev) & 0x03))
src/emu/machine/z80pio.c
r3445r3446
458458         z80pio_port_read(device, channel);
459459
460460         data = z80pio->input[channel] & z80pio->ddr[channel];
461 
461
462462         /* keep only relevant bits */
463463         data &= ~z80pio->mask[channel];
464464
r3445r3446
517517            z80pio_port_write(device, PIO_PORT_A);
518518         }
519519         break;
520     
520
521521      case PIO_PORT_B:
522522         if (!level)
523523         {
r3445r3446
642642         return z80pio->vector[channel];
643643      }
644644   }
645   
645
646646   if (LOG) logerror("z80pio_irq_ack: failed to find an interrupt to ack!");
647647
648648   return z80pio->vector[0];
r3445r3446
668668         return;
669669      }
670670   }
671   
671
672672   if (LOG) logerror("z80pio_irq_reti: failed to find an interrupt to clear IEO on!");
673673}
674674
r3445r3446
702702
703703   assert(intf != NULL);
704704   z80pio->intf = intf;
705   
705
706706   /* get clock */
707   
707
708708   if (intf->cpu != NULL)
709709   {
710710      cpunum = mame_find_cpu_index(device->machine, intf->cpu);
r3445r3446
757757   {
758758      /* set port mask register to inhibit all port data bits */
759759      z80pio->mask[channel] = 0xff;
760     
760
761761      /* clear ready line */
762762      z80pio_set_ready_line(device, channel, 0);
763763
src/emu/machine/z80pio.h
r3445r3446
66    Visit http://mamedev.org for licensing and usage restrictions.
77
88***************************************************************************
9                     _____   _____
10               D2    1 |*    \_/     | 40  D3
11               D7    2 |          | 39  D4
12               D6    3 |          | 38  D5
13               _CE    4 |          | 37  _M1
14              C/_D    5 |          | 36  _IORQ
15              B/_A    6 |          | 35  RD
16               PA7    7 |          | 34  PB7
17               PA6    8 |          | 33  PB6
18               PA5    9 |          | 32  PB5
19               PA4   10 |   Z80-PIO    | 31  PB4
20               GND   11 |          | 30  PB3
21               PA3   12 |          | 29  PB2
22               PA2   13 |          | 28  PB1
23               PA1   14 |          | 27  PB0
24               PA0   15 |          | 26  +5V
25             _ASTB   16 |          | 25  CLK
26             _BSTB   17 |          | 24  IEI
27              ARDY   18 |          | 23  _INT
28               D0   19 |          | 22  IEO
29               D1   20 |_____________| 21  BRDY
9                            _____   _____
10                    D2   1 |*    \_/     | 40  D3
11                    D7   2 |             | 39  D4
12                    D6   3 |             | 38  D5
13                   _CE   4 |             | 37  _M1
14                  C/_D   5 |             | 36  _IORQ
15                  B/_A   6 |             | 35  RD
16                   PA7   7 |             | 34  PB7
17                   PA6   8 |             | 33  PB6
18                   PA5   9 |             | 32  PB5
19                   PA4  10 |   Z80-PIO   | 31  PB4
20                   GND  11 |             | 30  PB3
21                   PA3  12 |             | 29  PB2
22                   PA2  13 |             | 28  PB1
23                   PA1  14 |             | 27  PB0
24                   PA0  15 |             | 26  +5V
25                 _ASTB  16 |             | 25  CLK
26                 _BSTB  17 |             | 24  IEI
27                  ARDY  18 |             | 23  _INT
28                    D0  19 |             | 22  IEO
29                    D1  20 |_____________| 21  BRDY
3030
3131***************************************************************************/
3232
src/emu/rendlay.c
r3445r3446
279279               else
280280                  union_render_bounds(&view->scrbounds, &item->rawbounds);
281281               scrfirst = FALSE;
282
283               /* accumulate the screens in use while we're scanning */
284               view->screens |= 1 << item->index;
282285            }
283286         }
284287      }
r3445r3446
328331         item->bounds.x1 = target_bounds.x0 + (item->rawbounds.x1 - xoffs) * xscale;
329332         item->bounds.y0 = target_bounds.y0 + (item->rawbounds.y0 - yoffs) * yscale;
330333         item->bounds.y1 = target_bounds.y0 + (item->rawbounds.y1 - yoffs) * yscale;
331
332         /* accumulate the screens in use while we're scanning */
333         if (item->element == NULL)
334            view->screens |= 1 << item->index;
335334      }
336335   }
337336}
docs/messnew.txt
r3445r3446
232232
233233Source Changes:
234234----------------
235- The core is based on MAME 0.127u7.  This incorporates all features of the
235- The core is based on MAME 0.127u8.  This incorporates all features of the
236236  update to this core.  [MAME team]
237237
238238- Refactored ZIP path code out of src/mess/image.c, made more testable.  [Nate

Previous 15994 Revisions Next


© 1998-2018 The MESS Team