Previous 15994 Revisions Next

r4442 Sunday 29th March, 2009 at 02:44:38 UTC by Nathan Woods
Updated to MAME 0.130u2 core
[ROOT]makefile
[docs]messnew.txt
[src/emu]cheat.c
[src/emu/cpu]cpu.mak
[src/emu/cpu/alph8201]alph8201.c
[src/emu/cpu/e132xs]e132xs.c e132xs.h
[src/emu/cpu/i386]i386.c
[src/emu/cpu/i86]i86.c i86mem.c
[src/emu/cpu/m6502]6502dasm.c m6502.c m6502.h
[src/emu/cpu/m6800]6800ops.c 6800tbl.c m6800.c m6800.h
[src/emu/cpu/m6805]m6805.c m6805.h
[src/emu/cpu/mips]mips3.c mips3.h mips3drc.c psx.c
[src/emu/cpu/nec]nec.c
[src/emu/cpu/pic16c5x]pic16c5x.c pic16c5x.h
[src/emu/cpu/sh4]sh4.c sh4comn.c sh4comn.h
[src/emu/cpu/sharc]sharc.c sharc.h
[src/emu/cpu/ssp1601]ssp1601.c ssp1601.h
[src/emu/cpu/tlcs90]tlcs90.c
[src/emu/cpu/tms32025]tms32025.c tms32025.h
[src/emu/cpu/tms32051]tms32051.c tms32051.h
[src/emu/cpu/tms9900]tms9900.h
[src/emu/cpu/v60]v60.h
[src/emu/sound]ay8910.c okim6295.c
[src/lib/util]chd.h corestr.c
[src/mame]mame.mak mamedriv.c tiny.mak
[src/mame/audio]seibu.c suna8.c
[src/mame/drivers]8080bw.c atarigx2.c badlands.c bublbobl.c cubocd32.c dcon.c eolith.c eolithsp.c equites.c gaelco2.c galaxian.c galpani2.c gameplan.c glass.c hyperspt.c hyprduel.c itech32.c mazerbla.c megasys1.c midvunit.c midzeus.c model1.c model2.c munchmo.c namcos2.c naomi.c nemesis.c opwolf.c pcat_nit.c pcxt.c pengo.c peplus.c pgm.c phoenix.c royalmah.c seattle.c seibuspi.c seta.c sfbonus.c stv.c suna16.c suna8.c suprgolf.c suprnova.c system1.c taito_f3.c taitogn.c taotaido.c thoop2.c vegas.c wgp.c zn.c zodiack.c
[src/mame/includes]amiga.h bublbobl.h dc.h gameplan.h hyprduel.h* nemesis.h pgm.h seibuspi.h suna8.h
[src/mame/machine]amiga.c bublbobl.c cubocd32.c dc.c mexico86.c pgmcrypt.c pgmprot.c
[src/mame/video]amigaaga.c* dc.c hyprduel.c nemesis.c seibuspi.c
[src/mess]mess.mak

src/mame/audio/suna8.c
r4441r4442
2929   }
3030}
3131
32WRITE8_DEVICE_HANDLER( rranger_play_samples_w )
33{
34   if( data )
35   {
36      if(( sample != 0 ) && ( ~data & 0x30 ))   // don't play sample zero when the bit is active
37      {
38         sample_start_raw(device, 0, &samplebuf[0x800*sample], 0x0800, 4000, 0);
39      }
40   }
41}
42
3243WRITE8_DEVICE_HANDLER( suna8_samples_number_w )
3344{
3445   sample = data & 0xf;
src/mame/audio/seibu.c
r4441r4442
406406            main2sub[offset] = data;
407407            break;
408408         case 4:
409            if (strcmp(space->machine->gamedrv->name, "sdgndmps") == 0)
410               update_irq_lines(space->machine, RST10_ASSERT);
409411            update_irq_lines(space->machine, RST18_ASSERT);
410412            break;
411413         case 6:
src/mame/machine/cubocd32.c
r4441r4442
408408      UINT32   track = cdrom_get_track( akiko.cdrom, akiko.cdrom_lba_cur );
409409      UINT32   datasize = cdrom_get_toc( akiko.cdrom )->tracks[track].datasize;
410410      UINT32   subsize = cdrom_get_toc( akiko.cdrom )->tracks[track].subsize;
411      UINT32   secsize = datasize + subsize;
412411      int      i;
413412
414      if ( secsize <= (2352-16) )
415      {
416         UINT32   curmsf = lba_to_msf( akiko.cdrom_lba_cur );
417         memset( buf, 0, 16 );
413      UINT32   curmsf = lba_to_msf( akiko.cdrom_lba_cur );
414      memset( buf, 0, 16 );
418415
419         buf[3] = akiko.cdrom_lba_cur - akiko.cdrom_lba_start;
420         memset( &buf[4], 0xff, 8 );
416      buf[3] = akiko.cdrom_lba_cur - akiko.cdrom_lba_start;
417      memset( &buf[4], 0xff, 8 );
421418
422         buf[12] = (curmsf >> 16) & 0xff;
423         buf[13] = (curmsf >> 8) & 0xff;
424         buf[14] = curmsf & 0xff;
425         buf[15] = 0x01; /* mode1 */
419      buf[12] = (curmsf >> 16) & 0xff;
420      buf[13] = (curmsf >> 8) & 0xff;
421      buf[14] = curmsf & 0xff;
422      buf[15] = 0x01; /* mode1 */
426423
427         if ( !cdrom_read_data( akiko.cdrom, akiko.cdrom_lba_cur, &buf[16], CD_TRACK_RAW_DONTCARE ) )
428         {
429            logerror( "AKIKO: Read error trying to read sector %08x!\n", akiko.cdrom_lba_cur );
430            return;
431         }
432
433         if ( subsize )
434         {
435            if ( !cdrom_read_subcode( akiko.cdrom, akiko.cdrom_lba_cur, &buf[16+datasize] ) )
436            {
437               logerror( "AKIKO: Read error trying to read subcode for sector %08x!\n", akiko.cdrom_lba_cur );
438               return;
439            }
440         }
424      datasize = 2048;
425      if ( !cdrom_read_data( akiko.cdrom, akiko.cdrom_lba_cur, &buf[16], CD_TRACK_MODE1 ) )
426      {
427         logerror( "AKIKO: Read error trying to read sector %08x!\n", akiko.cdrom_lba_cur );
428         return;
441429      }
442      else
430
431      if ( subsize )
443432      {
444         if ( !cdrom_read_data( akiko.cdrom, akiko.cdrom_lba_cur, buf, CD_TRACK_RAW_DONTCARE) )
433         if ( !cdrom_read_subcode( akiko.cdrom, akiko.cdrom_lba_cur, &buf[16+datasize] ) )
445434         {
446            logerror( "AKIKO: Read error trying to read sector %08x!\n", akiko.cdrom_lba_cur );
435            logerror( "AKIKO: Read error trying to read subcode for sector %08x!\n", akiko.cdrom_lba_cur );
447436            return;
448437         }
449
450         if ( subsize )
451         {
452            if ( !cdrom_read_subcode( akiko.cdrom, akiko.cdrom_lba_cur, &buf[datasize] ) )
453            {
454               logerror( "AKIKO: Read error trying to read subcode for sector %08x!\n", akiko.cdrom_lba_cur );
455               return;
456            }
457         }
458438      }
459439
460440      if (LOG_AKIKO_CD) logerror( "DMA: sector %d - address %08x\n", akiko.cdrom_lba_cur, akiko.cdrom_address[0] + (index*4096) );
src/mame/machine/bublbobl.c
r4441r4442
9090
9191
9292
93static int sound_nmi_enable,pending_nmi;
93static int sound_nmi_enable,pending_nmi,sound_status;
9494
9595static TIMER_CALLBACK( nmi_callback )
9696{
r4441r4442
119119   }
120120}
121121
122WRITE8_HANDLER(soundcpu_reset_w)
123{
124   cpu_set_input_line(space->machine->cpu[2], INPUT_LINE_RESET, data ? ASSERT_LINE : CLEAR_LINE);
125}
122126
127READ8_HANDLER( sound_status_r )
128{
129   return sound_status;
130}
123131
132WRITE8_HANDLER( sound_status_w )
133{
134   sound_status = data;
135}
124136
125137
138
126139/***************************************************************************
127140
128141Bubble Bobble MCU
src/mame/machine/pgmcrypt.c
r4441r4442
321321}
322322
323323
324#ifdef UNUSED_FUNCTION
325324static const UINT8 dfront_tab[256] = {
326325  0x51, 0xc4, 0xe3, 0x10, 0x1c, 0xad, 0x8a, 0x39, 0x8c, 0xe0, 0xa5, 0x04, 0x0f, 0xe4, 0x35, 0xc3,
327326  0x2d, 0x6b, 0x32, 0xe2, 0x60, 0x54, 0x63, 0x06, 0xa3, 0xf1, 0x0b, 0x5f, 0x6c, 0x5c, 0xb3, 0xec,
r4441r4442
434433      src[i] = x;
435434   }
436435}
437#endif
438436
439437
440438static const UINT8 mm_tab[256] = {
r4441r4442
670668}
671669
672670
671static const UINT8 theglad_tab[256] = {
672   0x49, 0x47, 0x53, 0x30, 0x30, 0x30, 0x35, 0x52, 0x44, 0x31, 0x30, 0x32, 0x31, 0x32, 0x30, 0x33,
673   0xC4, 0xA3, 0x46, 0x78, 0x30, 0xB3, 0x8B, 0xD5, 0x2F, 0xC4, 0x44, 0xBF, 0xDB, 0x76, 0xDB, 0xEA,
674   0xB4, 0xEB, 0x95, 0x4D, 0x15, 0x21, 0x99, 0xA1, 0xD7, 0x8C, 0x40, 0x1D, 0x43, 0xF3, 0x9F, 0x71,
675   0x3D, 0x8C, 0x52, 0x01, 0xAF, 0x5B, 0x8B, 0x63, 0x34, 0xC8, 0x5C, 0x1B, 0x06, 0x7F, 0x41, 0x96,
676   0x2A, 0x8D, 0xF1, 0x64, 0xDA, 0xB8, 0x67, 0xBA, 0x33, 0x1F, 0x2B, 0x28, 0x20, 0x13, 0xE6, 0x96,
677   0x86, 0x34, 0x25, 0x85, 0xB0, 0xD0, 0x6D, 0x85, 0xFE, 0x78, 0x81, 0xF1, 0xCA, 0xE4, 0xEF, 0xF2,
678   0x9B, 0x09, 0xE1, 0xB4, 0x8D, 0x79, 0x22, 0xE2, 0x00, 0xFB, 0x6F, 0x68, 0x80, 0x6A, 0x00, 0x69,
679   0xF5, 0xD3, 0x57, 0x7E, 0x0C, 0xCA, 0x48, 0x31, 0xE5, 0x0D, 0x4A, 0xB9, 0xFD, 0x5C, 0xFD, 0xF8,
680   0x5F, 0x98, 0xFB, 0xB3, 0x07, 0x1A, 0xE3, 0x10, 0x96, 0x56, 0xA3, 0x56, 0x3D, 0xB1, 0x07, 0xE0,
681   0xE3, 0x9F, 0x7F, 0x62, 0x99, 0x01, 0x35, 0x60, 0x40, 0xBE, 0x4F, 0xEB, 0x79, 0xA0, 0x82, 0x9F,
682   0xCD, 0x71, 0xD8, 0xDA, 0x1E, 0x56, 0xC2, 0x3E, 0x4E, 0x6B, 0x60, 0x69, 0x2D, 0x9F, 0x10, 0xF4,
683   0xA9, 0xD3, 0x36, 0xAA, 0x31, 0x2E, 0x4C, 0x0A, 0x69, 0xC3, 0x2A, 0xFF, 0x15, 0x67, 0x96, 0xDE,
684   0x3F, 0xCC, 0x0F, 0xA1, 0xAC, 0xE2, 0xD6, 0x62, 0x7E, 0x6F, 0x3E, 0x1B, 0x2A, 0xED, 0x36, 0x9C,
685   0x9D, 0xA4, 0x14, 0xCD, 0xAA, 0x08, 0xA4, 0x26, 0xB7, 0x55, 0x70, 0x6C, 0xA9, 0x69, 0x52, 0xAE,
686   0x0C, 0xE1, 0x38, 0x7F, 0x87, 0x78, 0x38, 0x75, 0x80, 0x9C, 0xD4, 0xE2, 0x0B, 0x52, 0x8F, 0xD2,
687   0x19, 0x4C, 0xB0, 0x45, 0xDE, 0x48, 0x55, 0xAE, 0x82, 0xAB, 0xBC, 0xAB, 0x0C, 0x5E, 0xCE, 0x07,
688};
689
690void pgm_theglad_decrypt(running_machine *machine)
691{
692   int i;
693   UINT16 *src = (UINT16 *)(memory_region(machine, "user1"));
694
695   int rom_size = 0x800000;
696
697   for(i=0; i<rom_size/2; i++) {
698      UINT16 x = src[i];
699
700      if((i & 0x40080) != 0x00080)
701         x ^= 0x0001;
702
703      if((i & 0x104008) == 0x104008)
704         x ^= 0x0002;
705
706      if((i & 0x80030) == 0x80010)
707         x ^= 0x0004;
708
709      if((i & 0x000042) != 0x000042)
710         x ^= 0x0008;
711
712      if((i & 0x08100) == 0x08000)
713         x ^= 0x0010;
714
715      if((i & 0x022004) != 0x000004)
716         x ^= 0x0020;
717
718      if((i & 0x11800) != 0x10000)
719         x ^= 0x0040;
720
721      if((i & 0x00820) == 0x00820)
722         x ^= 0x0080;
723
724      x ^= theglad_tab[(i >> 1) & 0xff] << 8;
725
726      src[i] = x;
727   }
728}
729
730
731void pgm_svg_decrypt(running_machine *machine)
732{
733   int i;
734   UINT16 *src = (UINT16 *)(memory_region(machine, "user1"));
735
736   int rom_size = 0x800000;
737
738   for(i=0; i<rom_size/2; i++) {
739      UINT16 x = src[i];
740
741      if((i & 0x040080) != 0x000080)
742         x ^= 0x0001;
743
744      if((i & 0x004008) == 0x004008)
745         x ^= 0x0002;
746
747      if((i & 0x080030) == 0x080010)
748         x ^= 0x0004;
749
750      if((i & 0x000042) != 0x000042)
751         x ^= 0x0008;
752
753      if((i & 0x048100) == 0x048000)
754         x ^= 0x0010;
755
756      if((i & 0x002004) != 0x000004)
757         x ^= 0x0020;
758
759      if((i & 0x011800) != 0x010000)
760         x ^= 0x0040;
761
762      if((i & 0x000820) == 0x000820)
763         x ^= 0x0080;
764
765      src[i] = x;
766   }
767}
768
769
770static const UINT8 killbldp_tab[256] = {
771   0x49,0x47,0x53,0x30,0x30,0x32,0x34,0x52,0x44,0x31,0x30,0x35,0x30,0x39,0x30,0x38,
772   0x12,0xA0,0xD1,0x9E,0xB1,0x8A,0xFB,0x1F,0x50,0x51,0x4B,0x81,0x28,0xDA,0x5F,0x41,
773   0x78,0x6C,0x7A,0xF0,0xCD,0x6B,0x69,0x14,0x94,0x55,0xB6,0x42,0xDF,0xFE,0x10,0x79,
774   0x74,0x08,0xFA,0xC0,0x1C,0xA5,0xB4,0x03,0x2A,0x91,0x67,0x2B,0x49,0x4A,0x94,0x7D,
775   0x8B,0x92,0xBE,0x35,0xAF,0x28,0x56,0x63,0xB3,0xC2,0xE8,0x06,0x9B,0x4E,0x85,0x66,
776   0x7F,0x6B,0x70,0xB7,0xDB,0x22,0x0C,0xEB,0x13,0xE9,0x06,0xD7,0x45,0xDA,0xBE,0x8B,
777   0x54,0x30,0xFC,0xEB,0x32,0x02,0xD0,0x92,0x6D,0x44,0xCA,0xE8,0xFD,0xFB,0x5B,0x81,
778   0x4C,0xC0,0x8B,0xB9,0x87,0x78,0xDD,0x8E,0x24,0x52,0x80,0xBE,0xB4,0x01,0xB7,0x21,
779   0xEB,0x3C,0x8A,0x49,0xED,0x73,0xAE,0x58,0xDB,0xD2,0xB2,0x21,0x9E,0x7C,0x6C,0x82,
780   0xF3,0x01,0xA3,0x00,0xB7,0x21,0xFE,0xA5,0x75,0xC4,0x2D,0x17,0x2D,0x39,0x56,0xF9,
781   0x67,0xAE,0xC2,0x87,0x79,0xF1,0xC8,0x6D,0x15,0x66,0xFA,0xE8,0x16,0x48,0x8F,0x1F,
782   0x8B,0x24,0x10,0xC4,0x04,0x93,0x47,0xE6,0x1D,0x37,0x65,0x1A,0x49,0xF8,0x72,0xCB,
783   0xE1,0x80,0xFA,0xDD,0x6D,0xF5,0xF6,0x89,0x32,0xF6,0xF8,0x75,0xFC,0xD8,0x9B,0x12,
784   0x2D,0x22,0x2A,0x3B,0x06,0x46,0x90,0x0C,0x35,0xA2,0x80,0xFF,0xA0,0xB7,0xE5,0x4D,
785   0x71,0xA9,0x8C,0x84,0x62,0xF7,0x10,0x65,0x4A,0x7B,0x06,0x00,0xE8,0xA4,0x6A,0x13,
786   0xF0,0xF3,0x4A,0x9F,0x54,0xB4,0xB1,0xCC,0xD4,0xFF,0xD6,0xFF,0xC9,0xEE,0x86,0x39,
787};
788
789void pgm_killbldp_decrypt(running_machine *machine)
790{
791   int i;
792   UINT16 *src = (UINT16 *)(memory_region(machine, "user1"));
793
794   int rom_size = 0x800000;
795
796   for(i=0; i<rom_size/2; i++) {
797      UINT16 x = src[i];
798
799      if((i & 0x040480) != 0x000080)
800         x ^= 0x0001;
801
802      if((i & 0x104008) == 0x104008)
803         x ^= 0x0002;
804
805      if((i & 0x080030) == 0x080010)
806         x ^= 0x0004;
807
808      if((i & 0x000242) != 0x000042)
809         x ^= 0x0008;
810
811      if((i & 0x008100) == 0x008000)
812         x ^= 0x0010;
813
814      if((i & 0x002004) != 0x000004)
815         x ^= 0x0020;
816
817      if((i & 0x011800) != 0x010000)
818         x ^= 0x0040;
819
820      if((i & 0x000820) == 0x000820)
821         x ^= 0x0080;
822
823      x ^= killbldp_tab[(i >> 1) & 0xff] << 8;
824
825      src[i] = x;
826   }
827}
828
829
830static const UINT8 kovh_tab[256] = {
831   0x49,0x47,0x53,0x30,0x30,0x30,0x39,0x72,0x64,0x31,0x30,0x34,0x30,0x32,0x31,0x39,
832   0xF9,0x8C,0xBD,0x87,0x16,0x07,0x39,0xEB,0x29,0x9E,0x17,0xEF,0x4F,0x64,0x7C,0xE0,
833   0x5F,0x73,0x5B,0xA1,0x5E,0x95,0x0D,0xF1,0x40,0x36,0x2F,0x00,0xE2,0x8A,0xBC,0x32,
834   0x44,0xFA,0x6C,0x33,0x0B,0xD5,0x4C,0x3B,0x36,0x34,0x9E,0xA3,0x20,0x2E,0xF3,0xA9,
835   0xB7,0x3E,0x87,0x80,0xFB,0xF1,0xDD,0x9C,0xBA,0xD3,0x9B,0x3B,0x8A,0x9C,0xA8,0x37,
836   0x07,0x97,0x84,0x0C,0x4E,0x54,0xE7,0x25,0xBA,0x8E,0x9D,0x6B,0xDE,0x5F,0xA1,0x10,
837   0xC3,0xA2,0x79,0x99,0x63,0xA9,0xD1,0x2A,0x65,0x20,0x5B,0x16,0x1B,0x41,0xE6,0xA7,
838   0xBA,0x3A,0xBD,0x2A,0xD8,0xDB,0x43,0x3F,0x2B,0x85,0xCC,0x5F,0x80,0x4F,0xBE,0xAE,
839   0xFA,0x79,0xE8,0x03,0x8D,0x16,0x22,0x35,0xBB,0xF6,0x26,0xA9,0x8D,0xD2,0xAF,0x19,
840   0xD4,0xBB,0xD0,0xA6,0xA1,0xC4,0x96,0x21,0x02,0xEF,0xE1,0x96,0x00,0x56,0x80,0x1B,
841   0xD6,0x9A,0x8C,0xD7,0x73,0x91,0x07,0x55,0x32,0x2B,0xB5,0x0B,0xD8,0xA5,0x39,0x26,
842   0xCE,0xF2,0x74,0x98,0xA1,0x66,0x1A,0x64,0xB8,0xA5,0x96,0x29,0x54,0xCB,0x21,0xED,
843   0xCD,0xDD,0x1E,0x2C,0x0B,0x70,0xB8,0x22,0x43,0x98,0xBE,0x54,0xF3,0x14,0xBE,0x65,
844   0x21,0xB7,0x61,0x17,0xCF,0x19,0x07,0xA0,0xC2,0x7F,0xA3,0x30,0x75,0x08,0xD8,0xBF,
845   0x58,0x1A,0x55,0x1B,0x4E,0x0D,0x6D,0x32,0x65,0x15,0xFB,0x9E,0xD8,0x75,0x76,0x6F,
846   0x42,0xE2,0x4F,0x3C,0x25,0x35,0x93,0x6C,0x9B,0x56,0xBE,0xC1,0x5B,0x65,0xDE,0x27,
847};
848
849void pgm_kovh_decrypt(running_machine *machine)
850{
851   int i;
852   unsigned short *src = (unsigned short *)(memory_region(machine, "maincpu")+0x100000);
853
854   int rom_size = 0x400000;
855
856   for(i=0; i<rom_size/2; i++) {
857      unsigned short x = src[i];
858
859      if((i & 0x040080) != 0x000080)
860         x ^= 0x0001;
861
862      if((i & 0x004008) == 0x004008 && (i & 0x180000) != 0x000000)
863         x ^= 0x0002;
864
865      if((i & 0x000030) == 0x000010)
866         x ^= 0x0004;
867
868      if((i & 0x000042) != 0x000042)
869         x ^= 0x0008;
870
871      if((i & 0x008100) == 0x008000)
872         x ^= 0x0010;
873
874      if((i & 0x022004) != 0x000004)
875         x ^= 0x0020;
876
877      if((i & 0x011800) != 0x010000)
878         x ^= 0x0040;
879
880      if((i & 0x000820) == 0x000820)
881         x ^= 0x0080;
882
883      x ^= kovh_tab[i & 0xff] << 8;
884
885      src[i] = x;
886   }
887}
888
889
890static const UINT8 oldss_tab[256] = {
891   0x49,0x47,0x53,0x30,0x30,0x31,0x33,0x52,0x44,0x31,0x30,0x34,0x30,0x37,0x32,0x37,
892   0xF5,0x79,0x6D,0xAB,0x04,0x22,0x51,0x96,0xF2,0x72,0xE8,0x3A,0x96,0xD2,0x9A,0xCC,
893   0x3F,0x47,0x3C,0x09,0xF2,0xD9,0x72,0x41,0xE6,0x44,0x43,0xA7,0x3E,0xE2,0xFD,0xD8,
894   0x06,0xD8,0x4C,0xA9,0x70,0x80,0x95,0x35,0x50,0x17,0x99,0x27,0xD5,0xA8,0x47,0x45,
895   0x89,0x38,0xE1,0x3D,0x8C,0x33,0x53,0xB4,0x0D,0x17,0xD1,0x8D,0x09,0x5F,0xAF,0x76,
896   0x48,0xB2,0x85,0xB9,0x95,0x4C,0x83,0x42,0x3D,0xAD,0x11,0xEC,0xCA,0x82,0xAC,0x10,
897   0x01,0xD0,0xFD,0x50,0x19,0x67,0x3B,0xA0,0x3E,0x86,0xC2,0x97,0x46,0xCB,0xF4,0xF5,
898   0xB3,0x5F,0x50,0x74,0xE9,0x5F,0xD2,0xD4,0xB0,0x8D,0x8A,0x21,0xED,0x37,0x80,0x47,
899   0x9D,0x68,0xC7,0xD9,0x12,0x4E,0xDF,0x1E,0x72,0xEB,0x50,0x5E,0x6D,0x00,0x85,0x6B,
900   0x3E,0x37,0xE6,0x72,0xE5,0x8F,0x3A,0x03,0xA3,0x0D,0x3B,0x5F,0xB6,0xA1,0x7B,0x02,
901   0x56,0x56,0x77,0x71,0xEF,0xBE,0xF9,0x46,0xA1,0x9D,0xB3,0x79,0xF6,0xD5,0x19,0xF0,
902   0xE2,0x91,0x7E,0x4A,0x01,0xB6,0x73,0xE8,0x0C,0x86,0x5D,0x3E,0x9C,0x97,0x55,0x58,
903   0x23,0xF4,0x45,0xB0,0x28,0x91,0x40,0x2F,0xC2,0xF4,0x21,0x81,0x58,0x22,0x68,0x9D,
904   0x97,0xC7,0x51,0x95,0xB4,0xAA,0x36,0x9B,0xE4,0x51,0x27,0x55,0x18,0xF0,0xC7,0x62,
905   0xFE,0x98,0x6A,0x2D,0x35,0x9D,0x6C,0xF1,0xCF,0x48,0xD4,0x0D,0x0C,0xBE,0x2A,0x8A,
906   0x55,0x31,0x96,0xEA,0x78,0x45,0x3A,0x33,0x23,0xC5,0xD1,0x3C,0xA3,0x86,0x88,0x38,
907};
908
909void pgm_oldss_decrypt(running_machine *machine)
910{
911   int i;
912   unsigned short *src = (unsigned short *)(memory_region(machine, "maincpu")+0x100000);
913
914   int rom_size = 0x400000;
915
916   for(i=0; i<rom_size/2; i++) {
917      unsigned short x = src[i];
918
919      if((i & 0x040480) != 0x000080 )
920         x ^= 0x0001;
921
922      if((i & 0x004008) == 0x004008 )
923         x ^= 0x0002;
924
925      if((i & 0x000030) == 0x000010 )
926         x ^= 0x0004;
927
928      if((i & 0x000242) != 0x000042 )
929         x ^= 0x0008;
930
931      if((i & 0x048100) == 0x048000 )
932         x ^= 0x0010;
933
934      if((i & 0x002004) != 0x000004 )
935         x ^= 0x0020;
936
937      if((i & 0x011800) != 0x010000 )
938         x ^= 0x0040;
939
940      if((i & 0x000820) == 0x000820 )
941         x ^= 0x0080;
942
943      x ^= oldss_tab[i & 0xff] << 8;
944
945      src[i] = x;
946   }
947}
src/mame/machine/dc.c
r4441r4442
124124static UINT32 maple_regs[0x100/4];
125125static UINT32 dc_rtcregister[4];
126126static UINT32 g1bus_regs[0x100/4];
127static UINT8 maple0x86data1[0x80];
127UINT8 maple0x86data1[0x80];
128128static UINT8 maple0x86data2[0x400];
129129static emu_timer *dc_rtc_timer;
130130
r4441r4442
796796   int reg;
797797   UINT64 shift;
798798   UINT32 dat;
799   static UINT32 wave_dma_aica_addr,wave_dma_root_addr,wave_dma_size,wave_dma_dir,wave_dma_flag;
799800
800801   reg = decode_reg32_64(space->machine, offset, mem_mask, &shift);
801802   dat = (UINT32)(data >> shift);
802803   switch (reg)
803804   {
804   case SB_ADTSEL:
805      mame_printf_verbose("G2CTRL: initiation mode %d\n",dat);
806      break;
807   case SB_ADST:
808      mame_printf_verbose("G2CTRL: AICA:G2-DMA start\n");
809      break;
805      /*AICA Address register*/
806      case SB_ADSTAG:
807         //printf("SB_ADSTAG data %08x\n",dat);
808         wave_dma_aica_addr = dat;
809         break;
810      /*Root address (work ram)*/
811      case SB_ADSTAR:
812         //printf("SB_ADSTAR data %08x\n",dat);
813         wave_dma_root_addr = dat;
814         break;
815      /*DMA size (in dword units, bit 31 is "set dma initiation enable setting to 0"*/
816      case SB_ADLEN:
817         //printf("SB_ADLEN data %08x\n",dat);
818         wave_dma_size = dat & 0x7fffffff;
819         break;
820      /*0 = root memory to aica / 1 = aica to root memory*/
821      case SB_ADDIR:
822         //printf("SB_ADDIR data %08x\n",dat);
823         wave_dma_dir = 1 ^ (dat & 1);
824         break;
825      /*dma flag (active HIGH, bug in docs)*/
826      case SB_ADEN:
827         //printf("SB_ADEN data %08x\n",dat);
828         wave_dma_flag = (dat & 1);
829         break;
830      case SB_ADTSEL:
831         mame_printf_verbose("G2CTRL: initiation mode %d\n",dat);
832         //printf("SB_ADTSEL data %08x\n",dat);
833         break;
834      /*ready for dma'ing*/
835      case SB_ADST:
836         mame_printf_verbose("G2CTRL: AICA:G2-DMA start\n");
837         //printf("SB_ADST data %08x\n",dat);
838         if(wave_dma_flag)
839         {
840            UINT32 src,dst,size;
841            src = wave_dma_aica_addr;
842            dst = wave_dma_root_addr;
843            //size = wave_dma_size;
844            size = 0;
845            /* TODO: use the ddt function. */
846            if(wave_dma_dir == 1)
847            {
848               for(;size<wave_dma_size;size++)
849                  memory_write_dword_64le(space,wave_dma_aica_addr+size*4,memory_read_dword(space,wave_dma_root_addr+size*4));
850            }
851            else
852            {
853               for(;size<wave_dma_size;size++)
854                  memory_write_dword_64le(space,wave_dma_root_addr+size*4,memory_read_dword(space,wave_dma_aica_addr+size*4));
855            }
856         }
857         break;
810858   }
811859   mame_printf_verbose("G2CTRL: [%08x=%x] write %llx to %x, mask %llx\n", 0x5f7800+reg*4, dat, data, offset, mem_mask);
812860}
r4441r4442
894942
895943MACHINE_RESET( dc )
896944{
897   int a;
898
899945   /* halt the ARM7 */
900946   cpu_set_input_line(machine->cpu[1], INPUT_LINE_RESET, ASSERT_LINE);
901947
r4441r4442
908954   timer_adjust_periodic(dc_rtc_timer, attotime_zero, 0, ATTOTIME_IN_SEC(1));
909955
910956   dc_sysctrl_regs[SB_SBREV] = 0x0b;
911   for (a=0;a < 0x80;a++)
912      maple0x86data1[a]=0x11+a;
913
914   // checksums
915   maple0x86data1[0]=0xb9;
916   maple0x86data1[1]=0xb1;
917   maple0x86data1[18]=0xb8;
918   maple0x86data1[19]=0x8a;
919957}
920958
921959READ64_DEVICE_HANDLER( dc_aica_reg_r )
r4441r4442
951989         /* it's alive ! */
952990         cpu_set_input_line(device->machine->cpu[1], INPUT_LINE_RESET, CLEAR_LINE);
953991      }
954        }
992    }
955993
956994   aica_w(device, offset*2, dat, shift ? ((mem_mask>>32)&0xffff) : (mem_mask & 0xffff));
957995
src/mame/machine/mexico86.c
r4441r4442
132132      // The following is missing from Knight Boy
133133      // this should be equivalent to the obfuscated kiki_clogic() below
134134      {
135         static const int db[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x18,0x00,0x00,0x00,0x00};
136         int sy = mexico86_protection_ram[0xa0] + ((0x18)>>1);
137         int sx = mexico86_protection_ram[0xa1] + ((0x18)>>1);
135         static const UINT8 db[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x10,0x18,0x00,0x00,0x00,0x00};
136         UINT16 sy = mexico86_protection_ram[0xa0] + ((0x18)>>1);
137         UINT16 sx = mexico86_protection_ram[0xa1] + ((0x18)>>1);
138138
139139         for (i = 0; i < 0x38; i += 8)
140140         {
141            int hw = db[mexico86_protection_ram[0x20 + i] & 0xf];
141            UINT8 hw = db[mexico86_protection_ram[0x20 + i] & 0xf];
142142
143143            if (hw)
144144            {
145               if (abs(sx - (mexico86_protection_ram[0x20 + i+6] * 256 + mexico86_protection_ram[0x20 + i+7])) < hw &&
146                     abs(sy - (mexico86_protection_ram[0x20 + i+4] * 256 + mexico86_protection_ram[0x20 + i+5])) < hw)
147                  mexico86_protection_ram[0xa2] = 1; // we have a collision
145               UINT16 xdiff = sx - ((UINT16)mexico86_protection_ram[0x20 + i+6] << 8 | mexico86_protection_ram[0x20 + i+7]);
146               if (xdiff < hw)
147               {
148                  UINT16 ydiff = sy - ((UINT16)mexico86_protection_ram[0x20 + i+4] << 8 | mexico86_protection_ram[0x20 + i+5]);
149                  if (ydiff < hw)
150                     mexico86_protection_ram[0xa2] = 1; // we have a collision
151               }
148152            }
149153         }
150154      }
src/mame/machine/amiga.c
r4441r4442
9898   "BLTCMOD",       "BLTBMOD",       "BLTAMOD",       "BLTDMOD",
9999   "UNK068",      "UNK06A",      "UNK06C",      "UNK06E",
100100   "BLTCDAT",       "BLTBDAT",       "BLTADAT",       "UNK076",
101   "UNK078",      "UNK07A",      "UNK07C",      "DSRSYNC",
101   "SPRHDAT",      "BPLHDAT",      "LISAID",      "DSRSYNC",
102102   /* 0x080 */
103103   "COP1LCH",       "COP1LCL",       "COP2LCH",       "COP2LCL",
104104   "COPJMP1",       "COPJMP2",       "COPINS",       "DIWSTRT",
r4441r4442
118118   "BPL1PTH",       "BPL1PTL",       "BPL2PTH",       "BPL2PTL",
119119   "BPL3PTH",       "BPL3PTL",       "BPL4PTH",       "BPL4PTL",
120120   "BPL5PTH",       "BPL5PTL",       "BPL6PTH",       "BPL6PTL",
121   "UNK0F8",      "UNK0FA",      "UNK0FC",      "UNK0FE",
121   "BPL7PTH",      "BPL7PTL",      "BPL8PTH",      "BPL8PTL",
122122   /* 0x100 */
123   "BPLCON0",       "BPLCON1",       "BPLCON2",       "UNK106",
124   "BPL1MOD",       "BPL2MOD",       "UNK10C",      "UNK10E",
123   "BPLCON0",       "BPLCON1",       "BPLCON2",       "BPLCON3",
124   "BPL1MOD",       "BPL2MOD",       "BPLCON4",      "CLXCON2",
125125   "BPL1DAT",       "BPL2DAT",       "BPL3DAT",       "BPL4DAT",
126   "BPL5DAT",       "BPL6DAT",       "UNK11C",      "UNK11E",
126   "BPL5DAT",       "BPL6DAT",       "BPL7DAT",      "BPL8DAT",
127127   /* 0x120 */
128128   "SPR0PTH",       "SPR0PTL",       "SPR1PTH",       "SPR1PTL",
129129   "SPR2PTH",       "SPR2PTL",       "SPR3PTH",       "SPR3PTL",
r4441r4442
150150   "COLOR24",       "COLOR25",       "COLOR26",       "COLOR27",
151151   "COLOR28",       "COLOR29",       "COLOR30",       "COLOR31",
152152   /* 0x1C0 */
153   "UNK1C0",      "UNK1C2",      "UNK1C4",      "UNK1C6",
154   "UNK1C8",      "UNK1CA",      "UNK1CC",      "UNK1CE",
155   "UNK1D0",      "UNK1D2",      "UNK1D4",      "UNK1D6",
156   "UNK1D8",      "UNK1DA",      "UNK1DC",      "UNK1DE",
153   "HTOTAL",      "HSSTOP",      "HBSTRT",      "HBSTOP",
154   "VTOTAL",      "VSSTOP",      "VBSTRT",      "VBSTOP",
155   "SPRHSTRT",      "SPRHSTOP",      "BPLHSTRT",      "BPLHSTOP",
156   "HHPOSW",      "HHPOSR",      "BEAMCON0",      "HSSTRT",
157157   /* 0x1E0 */
158   "UNK1E0",      "UNK1E2",      "UNK1E4",      "UNK1E6",
159   "UNK1E8",      "UNK1EA",      "UNK1EC",      "UNK1EE",
158   "VSSTRT",      "HCENTER",      "DIWHIGH",      "BPLHMOD",
159   "SPRHPTH",      "SPRHPTL",      "BPLHPTH",      "BPLHPTL",
160160   "UNK1F0",      "UNK1F2",      "UNK1F4",      "UNK1F6",
161   "UNK1F8",      "UNK1FA",      "UNK1FC",      "UNK1FE"
161   "UNK1F8",      "UNK1FA",      "FMODE",      "UNK1FE"
162162};
163163
164164
r4441r4442
348348
349349   /* render up to this scanline */
350350   if (!video_screen_update_partial(machine->primary_screen, scanline))
351      amiga_render_scanline(machine, NULL, scanline);
351   {
352      if (IS_AGA(amiga_intf))
353         amiga_aga_render_scanline(machine, NULL, scanline);
354      else
355         amiga_render_scanline(machine, NULL, scanline);
356   }
352357
353358   /* force a sound update */
354359   amiga_audio_update();
r4441r4442
11621167
11631168      case REG_VPOSR:
11641169         CUSTOM_REG(REG_VPOSR) &= 0xff00;
1165         CUSTOM_REG(REG_VPOSR) |= amiga_gethvpos(space->machine->primary_screen) >> 16;
1170         if (IS_AGA(amiga_intf))
1171            CUSTOM_REG(REG_VPOSR) |= amiga_aga_gethvpos(space->machine->primary_screen) >> 16;
1172         else
1173            CUSTOM_REG(REG_VPOSR) |= amiga_gethvpos(space->machine->primary_screen) >> 16;
11661174         return CUSTOM_REG(REG_VPOSR);
11671175
11681176      case REG_VHPOSR:
1169         return amiga_gethvpos(space->machine->primary_screen) & 0xffff;
1177         if (IS_AGA(amiga_intf))
1178            return amiga_aga_gethvpos(space->machine->primary_screen) & 0xffff;
1179         else
1180            return amiga_gethvpos(space->machine->primary_screen) & 0xffff;
11701181
11711182      case REG_SERDATR:
11721183         CUSTOM_REG(REG_SERDATR) &= ~0x4000;
r4441r4442
12071218         return CUSTOM_REG(REG_INTREQ);
12081219
12091220      case REG_COPJMP1:
1210         copper_setpc(CUSTOM_REG_LONG(REG_COP1LCH));
1221         if (IS_AGA(amiga_intf))
1222            aga_copper_setpc(CUSTOM_REG_LONG(REG_COP1LCH));
1223         else
1224            copper_setpc(CUSTOM_REG_LONG(REG_COP1LCH));
12111225         break;
12121226
12131227      case REG_COPJMP2:
1214         copper_setpc(CUSTOM_REG_LONG(REG_COP2LCH));
1228         if (IS_AGA(amiga_intf))
1229            aga_copper_setpc(CUSTOM_REG_LONG(REG_COP2LCH));
1230         else
1231            copper_setpc(CUSTOM_REG_LONG(REG_COP2LCH));
12151232         break;
12161233
12171234      case REG_CLXDAT:
r4441r4442
13241341
13251342      case REG_SPR0PTL:   case REG_SPR1PTL:   case REG_SPR2PTL:   case REG_SPR3PTL:
13261343      case REG_SPR4PTL:   case REG_SPR5PTL:   case REG_SPR6PTL:   case REG_SPR7PTL:
1327         amiga_sprite_dma_reset((offset - REG_SPR0PTL) / 2);
1344         if (IS_AGA(amiga_intf))
1345            amiga_aga_sprite_dma_reset((offset - REG_SPR0PTL) / 2);
1346         else
1347            amiga_sprite_dma_reset((offset - REG_SPR0PTL) / 2);
13281348         break;
13291349
13301350      case REG_SPR0CTL:   case REG_SPR1CTL:   case REG_SPR2CTL:   case REG_SPR3CTL:
13311351      case REG_SPR4CTL:   case REG_SPR5CTL:   case REG_SPR6CTL:   case REG_SPR7CTL:
13321352         /* disable comparitor on writes here */
1333         amiga_sprite_enable_comparitor((offset - REG_SPR0CTL) / 4, FALSE);
1353         if (IS_AGA(amiga_intf))
1354            amiga_aga_sprite_enable_comparitor((offset - REG_SPR0CTL) / 4, FALSE);
1355         else
1356            amiga_sprite_enable_comparitor((offset - REG_SPR0CTL) / 4, FALSE);
13341357         break;
13351358
13361359      case REG_SPR0DATA:   case REG_SPR1DATA:   case REG_SPR2DATA:   case REG_SPR3DATA:
13371360      case REG_SPR4DATA:   case REG_SPR5DATA:   case REG_SPR6DATA:   case REG_SPR7DATA:
13381361         /* enable comparitor on writes here */
1339         amiga_sprite_enable_comparitor((offset - REG_SPR0DATA) / 4, TRUE);
1362         if (IS_AGA(amiga_intf))
1363            amiga_aga_sprite_enable_comparitor((offset - REG_SPR0DATA) / 4, TRUE);
1364         else
1365            amiga_sprite_enable_comparitor((offset - REG_SPR0DATA) / 4, TRUE);
13401366         break;
13411367
13421368      case REG_COP1LCH:   case REG_COP2LCH:
r4441r4442
13441370         break;
13451371
13461372      case REG_COPJMP1:
1347         copper_setpc(CUSTOM_REG_LONG(REG_COP1LCH));
1373         if (IS_AGA(amiga_intf))
1374            aga_copper_setpc(CUSTOM_REG_LONG(REG_COP1LCH));
1375         else
1376            copper_setpc(CUSTOM_REG_LONG(REG_COP1LCH));
13481377         break;
13491378
13501379      case REG_COPJMP2:
1351         copper_setpc(CUSTOM_REG_LONG(REG_COP2LCH));
1380         if (IS_AGA(amiga_intf))
1381            aga_copper_setpc(CUSTOM_REG_LONG(REG_COP2LCH));
1382         else
1383            copper_setpc(CUSTOM_REG_LONG(REG_COP2LCH));
13521384         break;
13531385
13541386      case REG_DDFSTRT:
r4441r4442
14471479      case REG_COLOR20:   case REG_COLOR21:   case REG_COLOR22:   case REG_COLOR23:
14481480      case REG_COLOR24:   case REG_COLOR25:   case REG_COLOR26:   case REG_COLOR27:
14491481      case REG_COLOR28:   case REG_COLOR29:   case REG_COLOR30:   case REG_COLOR31:
1450         data &= 0xfff;
1451         CUSTOM_REG(offset + 32) = (data >> 1) & 0x777;
1482         if ( IS_AGA(amiga_intf))
1483         {
1484            aga_palette_write(offset - REG_COLOR00, data);
1485         }
1486         else
1487         {
1488            data &= 0xfff;
1489            CUSTOM_REG(offset + 32) = (data >> 1) & 0x777;
1490         }
14521491         break;
14531492
14541493      default:
14551494         break;
14561495   }
14571496
1458   if (offset <= REG_COLOR31)
1497   if (IS_AGA(amiga_intf))
14591498      CUSTOM_REG(offset) = data;
1499   else
1500      if (offset <= REG_COLOR31)
1501         CUSTOM_REG(offset) = data;
14601502}
14611503
14621504
src/mame/machine/pgmprot.c
r4441r4442
11#include "driver.h"
22#include "includes/pgm.h"
33
4
5
46/*** ASIC27a (Puzzle Star) -- ARM but with no external rom? behaves a bit like KOV ***/
57
68
r4441r4442
471473   return 0x0000;
472474}
473475
474static UINT32 photoy2k_seqpos;
475static UINT32 photoy2k_trf[3], photoy2k_soff;
476
477476#define BITSWAP10(val,B9,B8,B7,B6,B5,B4,B3,B2,B1,B0) \
478477                ((BIT(val, B9) <<  9) | \
479478                 (BIT(val, B8) <<  8) | \
r4441r4442
486485                 (BIT(val, B1) <<  1) | \
487486                 (BIT(val, B0) <<  0))
488487
489static UINT32 photoy2k_spritenum(void)
490{
491   UINT32 base = photoy2k_seqpos & 0xffc00;
492   UINT32 low  = photoy2k_seqpos & 0x003ff;
493488
494   switch((photoy2k_seqpos >> 10) & 0xf) {
495   case 0x0:
496   case 0xa:
497      return base | (BITSWAP10(low, 0,8,3,1,5,9,4,2,6,7) ^ 0x124);
498   case 0x1:
499   case 0xb:
500      return base | (BITSWAP10(low, 5,1,7,4,0,8,3,6,9,2) ^ 0x088);
501   case 0x2:
502   case 0x8:
503      return base | (BITSWAP10(low, 3,5,9,7,6,4,1,8,2,0) ^ 0x011);
504   case 0x3:
505   case 0x9:
506      return base | (BITSWAP10(low, 1,8,3,6,0,4,5,2,9,7) ^ 0x154);
507   case 0x4:
508   case 0xe:
509      return base | (BITSWAP10(low, 2,1,7,4,5,8,3,6,9,0) ^ 0x0a9);
510   case 0x5:
511   case 0xf:
512      return base | (BITSWAP10(low, 9,4,6,8,2,1,7,5,3,0) ^ 0x201);
513   case 0x6:
514   case 0xd:
515      return base | (BITSWAP10(low, 4,6,0,8,9,7,3,5,1,2) ^ 0x008);
516   case 0x7:
517   case 0xc:
518      return base | (BITSWAP10(low, 8,9,3,2,0,1,6,7,5,4) ^ 0x000);
519   }
520   return 0;
521}
522
523489READ16_HANDLER (ASIC28_r16)
524490//UINT16 ASIC28_r16(UINT32 addr)
525491{
r4441r4442
529495
530496   switch(ASIC28REGS[1]&0xff)
531497   {
532
533      case 0x20: // PhotoY2k spritenum conversion 4/4
534         if(!ASIC28RCNT)
535            logerror("ASIC28: PhotoY2K spr4 %04x %06x (%06x)\n", val & 0xffff, photoy2k_trf[2], cpu_get_pc(space->cpu));
536         val = photoy2k_soff >> 16;
537         break;
538
539      case 0x21: // PhotoY2k spritenum conversion 3/4
540         if(!ASIC28RCNT) {
541            photoy2k_trf[2] = val & 0xffff;
542            logerror("ASIC28: PhotoY2K spr3 %04x %06x (%06x)\n", val & 0xffff, photoy2k_trf[1], cpu_get_pc(space->cpu));
543            if(photoy2k_trf[0] < 0x3c00)
544               photoy2k_soff = pgmy2ks[photoy2k_trf[0]];
545            else
546               photoy2k_soff = 0;
547            logerror("ASIC28: spriteval %04x, %06x -> %06x\n", photoy2k_trf[0], (photoy2k_trf[2]<<16)|photoy2k_trf[1], photoy2k_soff);
548         }
549         val = photoy2k_soff & 0xffff;
550         break;
551
552      case 0x22: // PhotoY2k spritenum conversion 2/4
553         if(!ASIC28RCNT) {
554            photoy2k_trf[1] = val & 0xffff;
555            logerror("ASIC28: PhotoY2K spr2 %04x %06x (%06x)\n", val & 0xffff, photoy2k_trf[0], cpu_get_pc(space->cpu));
556         }
557         val = photoy2k_trf[0] | 0x880000;
558         break;
559
560      case 0x23: // PhotoY2k spritenum conversion 1/4
561         if(!ASIC28RCNT) {
562            photoy2k_trf[0] = val & 0xffff;
563            logerror("ASIC28: PhotoY2K spr1 %04x (%06x)\n", val & 0xffff, cpu_get_pc(space->cpu));
564         }
565         val = 0x880000;
566         break;
567
568      case 0x30: // PhotoY2k next element
569         if(!ASIC28RCNT)
570            photoy2k_seqpos++;
571         val = photoy2k_spritenum();
572         if(!ASIC28RCNT)
573            logerror("ASIC28: PhotoY2K seq_next  %05x -> %06x (%06x)\n", photoy2k_seqpos, val, cpu_get_pc(space->cpu));
574         break;
575
576      case 0x32: // PhotoY2k start of sequence
577         if(!ASIC28RCNT)
578            photoy2k_seqpos = (val & 0xffff) << 4;
579         val = photoy2k_spritenum();
580         if(!ASIC28RCNT)
581            logerror("ASIC28: PhotoY2K seq_start %05x -> %06x (%06x)\n", photoy2k_seqpos, val, cpu_get_pc(space->cpu));
582         break;
583
584498      case 0x99:
585499         val=0x880000;
586500         break;
r4441r4442
589503         val=0xa00000+((ASIC28REGS[0]&0x1f)<<6);
590504         break;
591505
592      case 0xae:  //Photo Y2k Bonus stage
593         val=AETABLE[ASIC28REGS[0]&0xf];
594         break;
595
596506      case 0xb0:
597507         val=B0TABLE[ASIC28REGS[0]&0xf];
598508         break;
r4441r4442
886796#endif
887797
888798
889
src/mame/mamedriv.c
r4441r4442
16991699   DRIVER( fullthrl )   /* B14 (c) 1987 Taito Corporation (Japan) */
17001700   DRIVER( opwolf )   /* B20 (c) 1987 Taito Corporation Japan (World) */
17011701   DRIVER( opwolfa )   /* B20 (c) 1987 Taito Corporation Japan (World) */
1702   DRIVER( opwolfj )   /* B20 (c) 1987 Taito Corporation (Japan) */
17021703   DRIVER( opwolfu )   /* B20 (c) 1987 Taito America Corporation (US) */
17031704   DRIVER( opwolfb )   /* bootleg */
17041705   DRIVER( othunder )   /* B67 (c) 1988 Taito Corporation Japan (World) */
r4441r4442
29572958
29582959   /* Taito GNET */
29592960   DRIVER( taitogn )
2960   DRIVER( chaoshea )  /* 1998.10 Chaos Heat (V2.08J) */
2961   DRIVER( raycris )   /* 1998.12 Ray Crisis (V2.03J) */
2961   DRIVER( chaoshea )   /* 1998.10 Chaos Heat (V2.08J) */
2962   DRIVER( raycris )   /* 1998.12 Ray Crisis (V2.03J) */
29622963                  /* 1999.02 Otenami Haiken (Success) */
2963                  /* 1999.03 Super Puzzle Bobble (Japan) */
2964   DRIVER( spuzbobl )  /* 1999.?? Super Puzzle Bobble (V2.05O) */
2965   DRIVER( gobyrc )    /* 1999.?? Go By RC (V2.03O) */
2966   DRIVER( rcdego )    /* 1999.06 RC De Go (V2.03J) */
2967   DRIVER( flipmaze )  /* 1999.09 Flip Maze (V2.04J) */
2968   DRIVER( mahjngoh )  /* 1999.12 Mahjong Oh (V2.06J) */
2969   DRIVER( psyvaria )  /* 2000.03 Psyvariar -Medium Unit- (V2.04J) */
2970   DRIVER( shanghss )  /* 2000.07 Shanghai Shoryu Sairin (V2.03J) */
2971   DRIVER( psyvarrv )  /* 2000.09 Psyvariar -Revision- (V2.04J) */
2972   DRIVER( zokuoten )  /* 2000.12 Zoku Otenamihaiken (V2.03J) */
2964   DRIVER( spuzbobj )   /* 1999.03 Super Puzzle Bobble (Japan) */
2965   DRIVER( spuzbobl )   /* 1999.?? Super Puzzle Bobble (V2.05O) */
2966   DRIVER( gobyrc )   /* 1999.?? Go By RC (V2.03O) */
2967   DRIVER( rcdego )   /* 1999.06 RC De Go (V2.03J) */
2968   DRIVER( flipmaze )   /* 1999.09 Flip Maze (V2.04J) */
2969   DRIVER( mahjngoh )   /* 1999.12 Mahjong Oh (V2.06J) */
2970   DRIVER( psyvaria )   /* 2000.03 Psyvariar -Medium Unit- (V2.04J) */
2971   DRIVER( shanghss )   /* 2000.07 Shanghai Shoryu Sairin (V2.03J) */
2972   DRIVER( psyvarrv )   /* 2000.09 Psyvariar -Revision- (V2.04J) */
2973   DRIVER( zokuoten )   /* 2000.12 Zoku Otenamihaiken (V2.03J) */
29732974                  /* 2000.?? Taito Classic (Success, not released?) */
2974   DRIVER( soutenry )  /* 2001.02 Soutenryu (V2.07J) */
2975   DRIVER( nightrai )  /* 2001.05 Night Raid (V2.03J) */
2976                  /* 2001.09 Shikigami no Shiro */
2977                  /* 2001.10 Otenki Kororin */
2978   DRIVER( usagi )     /* 2001.12 Usagi (V2.02J) */
2975   DRIVER( soutenry )   /* 2001.02 Soutenryu (V2.07J) */
2976   DRIVER( nightrai )   /* 2001.05 Night Raid (V2.03J) */
2977   DRIVER( shikigam )   /* 2001.09 Shikigami no Shiro */
2978   DRIVER( otenki )   /* 2001.10 Otenki Kororin */
2979   DRIVER( usagi )      /* 2001.12 Usagi (V2.02J) */
29792980                  /* 2002.02 Shanghai Sangokuhaitougi */
2980   DRIVER( xiistag )   /* 2002.07 XII Stag (V2.01J) */
2981   DRIVER( sianniv )   /* 2003.10 Space Invaders Anniversary (V2.02J) */
2982                  /* 2003.11 Kollon */
2983                  /* 2004.05 Zooo */
2981   DRIVER( xiistag )   /* 2002.07 XII Stag (V2.01J) */
2982   DRIVER( sianniv )   /* 2003.10 Space Invaders Anniversary (V2.02J) */
2983   DRIVER( kollon )   /* 2003.11 Kollon */
2984   DRIVER( zooo )      /* 2004.05 Zooo */
29842985
29852986   /* Namco System 11 */
29862987   DRIVER( tekken )   /* 1994.?? Tekken (TE4/VER.C) */
r4441r4442
35443545other System 1 / System 2 games:
35453546
35463547WarBall
3547Sanrin Sanchan
35483548DokiDoki Penguin Land *not confirmed
35493549*/
35503550
r4441r4442
37573757   /* Outrun Hardware */
37583758                  /* 1986.09 Outrun (Japan) */
37593759                  /* 1986.11 Outrun (US) */
3760                  /* 1986.?? outrun (World) */
3760                  /* 1986.?? Outrun (World) */
37613761   DRIVER( outrun )
37623762   DRIVER( outrun2 )
37633763   DRIVER( outrun1 )
r4441r4442
43324332   DRIVER( csmasho )
43334333   DRIVER( sfz3ugd )   /* 2001.02 Street Fighter ZERO3 Upper */
43344334   DRIVER( gundmgd )   /* 2001.03 Kidou Senshi Gundam Renpou vs. Zeon */
4335   DRIVER( vstrik3c )   /* 2001.04 Virtua Striker 3 */
4336   DRIVER( vstrik3 )
43374335                  /* 2001.04 Shakatto Tambourine Motto Norinori Shinkyoku Tsuika */
43384336   DRIVER( dygolf )   /* 2001.04 Dynamic Golf */
4339                  /* 2001.05 Wild Riders */
43404337   DRIVER( monkeyba )   /* 2001.05 Monkey Ball */
4341                  /* 2001.06 Club Cart */
43424338   DRIVER( cvsgd )      /* 2001.06 Capcom vs. SNK Pro */
43434339                  /* 2001.06 Crackin' DJ Part2 */
43444340   DRIVER( wsbbgd )   /* 2001.06 Super Major League */
4345   DRIVER( beachspi )   /* 2001.07 Beach Spikers */
43464341   DRIVER( spkrbtl )   /* 2001.07 Spikers Battle */
43474342                  /* 2001.07 Dokidoki Idol Star Seeker */
4348                  /* 2001.08 Wave Runner GP */
4349   DRIVER( vf4 )      /* 2001.08 Virtua Fighter 4 (Naomi 2) */
43504343   DRIVER( cvs2gd )   /* 2001.08 Capcom vs. SNK 2 */
43514344   DRIVER( hmgeo )      /* 2001.09 Heavy Metal Geo Matrix */
43524345                  /* 2001.09 Alien Front */
r4441r4442
43544347                  /* 2001.10 Derby Owners Club 2 */
43554348                  /* 2001.10 Inu no Osanpo */
43564349   DRIVER( vtennis2 )  /* 2001.10 Power Smash 2 / Virtua Tennis 2 */
4357                  /* 2001.11 La Keyboardu */
4350   DRIVER( keyboard )   /* 2001.11 La Keyboardxyu */
43584351                  /* 2001.11 Shakatto Tambourine Cho Powerup Chu */
43594352   DRIVER( ikaruga )   /* 2001.12 Ikaruga */
4360   DRIVER( lupinsho)   /* 2001.12 Lupin the Third the Shooting */
4361                  /* 2002.02 The King of Route 66 */
4362   DRIVER( initd )      /* 2002.03 Initial D Arcade Stage (Naomi 2) */
4353   DRIVER( lupinsho )   /* 2001.12 Lupin the Third the Shooting */
43634354   DRIVER( vathlete )   /* 2002.03 Virtua Athlete */
43644355   DRIVER( luptype )   /* 2002.04 Lupin the Third the Typing */
43654356   DRIVER( ggxx )      /* 2002.05 Guilty Gear XX */
43664357                  /* 2002.05 Cleopatra Fortune + */
43674358   DRIVER( mok )      /* 2002.05 The Maze of the Kings */
4368                  /* 2002.06 World Club Champion Football */
4359   DRIVER( ngdup23a )   /* DIMM Firmware Updater */
4360   DRIVER( ngdup23c )
43694361   DRIVER( chocomk )   /* 2002.06 Musapy no Choco Marker */
43704362                  /* 2002.07 Mazan */
4371                  /* 2002.07 Soul Surfer */
4372   DRIVER( vf4evo )   /* 2002.08 Virtua Fighter 4 Evolution (Naomi 2) */
43734363                  /* 2002.09 Yonin Uchi Mahjong MJ */
4374   DRIVER( initdv2j )   /* 2002.12 Initial D Arcade Stage ver.2 */
4375                  /* 2002.12 Moeru Casinyo */
4364                  /* 2002.12 Azumanga Daiou Puzzle Bobble */
4365   DRIVER( moeru )      /* 2002.12 Moeru Casinyo */
43764366   DRIVER( quizqgd )   /* 2003.01 Quiz Keitai Q mode */
4377                  /* 2003.02 Kouchuu Ouja Mushiking */
43784367                  /* 2003.03 Yonin Uchi Mahjong MJ Network Taisen ver. */
4379                  /* 2003.03 WCCF 2001-2002 ver.2.0 */
4368   DRIVER( usagui )
43804369   DRIVER( ggxxrl )   /* 2003.03 Guilty Gear XX # Reload */
43814370   DRIVER( shikgam2 )   /* 2003.04 Shikigami no Shiro 2 */
43824371   DRIVER( bdrdown )   /* 2003.04 Border Down */
4383                  /* 2003.09 WCCF 2002-2003 */
43844372   DRIVER( psyvar2 )   /* 2003.11 Psyvariar 2 */
43854373   DRIVER( puyofev   )   /* 2003.11 Puyopuyo Fever */
4386                  /* 2004.01 Initial D Arcade Stage ver.3 */
4387                  /* 2004.06 WCCF 2002-2003 ver.2.0 */
4388   DRIVER( vf4tuned )   /* 2004.07 Virtua Fighter 4 Final Tuned (Naomi 2) */
4374   DRIVER( cfield )   /* 2004.06 Chaos Field */
4375   DRIVER( tetkiwam )   /* 2004.06 Tetris Kiwamemichi */
43894376   DRIVER( trizeal )   /* 2004.09 Trizeal */
4390                  /* 2004.10 Oshare Majo Love & Berry */
4391                  /* 2004.12 WCCF 2002-2003 ver.2.1 */
4392   DRIVER( meltybld )   /* 2005.03 Melty Blood Act Cadenza */
4393                  /* 2005.04 Menkyo no Tetsujin */
4377                  /* 2005.03 Melty Blood Act Cadenza */
43944378   DRIVER( ss2005 )   /* 2005.04 Super Shanghai 2005 */
4395   DRIVER( senko )      /* 2005.04 Senkou no Rondo */
4396   DRIVER( senkoo )   /*          ^^ */
4397                  /* 2005.07 WCCF 2004-2005 */
4398                  /* 2005.09 Kodai Ouja Kyouryuu King */
4399                  /* 2005.10 Radirgy */
4379   DRIVER( senkoo )   /* 2005.04 Senkou no Rondo */
4380   DRIVER( senko )      /* 2005.08 Senkou no Rondo NEW ver. */
4381   DRIVER( meltybld )   /* 2005.08 Melty Blood Act Cadenza ver.A */
4382   DRIVER( ggxxsla  )   /* 2005.09 Guilty Gear XX Slash */
4383   DRIVER( radirgy )   /* 2005.10 Radirgy */
44004384   DRIVER( undefeat )   /* 2005.10 Under Defeat */
4401                  /* 2006.03 Kurukuru Chameleon */
4385                  /* 2005.12 Radirgy (Rev. A) */
4386   DRIVER( kurucham )   /* 2006.03 Kurukuru Chameleon */
44024387   DRIVER( trgheart )   /* 2006.05 Trigger Heart Exelica */
44034388                  /* 2006.07 Touch de Zunou */
44044389                  /* 2006.08 Senkou no Rondo SP */
44054390   DRIVER( jingystm )   /* 2006.09 Jingi Storm */
4406                  /* 2006.11 Karous */
4391   DRIVER( karous )   /* 2006.11 Karous */
44074392                  /* 2006.12 Guilty Gear XX Accent Core */
4408                  /* 2006.12 Melty Blood Act Cadenza ver.B */
4409                  /* 2007.02 Noukone Puzzle Takoron */
4393   DRIVER( meltyb )   /* 2006.12 Melty Blood Act Cadenza ver.B */
4394   DRIVER( takoron )   /* 2006.12.16 Noukone Puzzle Takoron */
4395   DRIVER( meltyba )   /* 2007.03 Melty Blood Act Cadenza ver.B Syuuseiban(ver.B2) */
4396
4397                  /* Releases below use flash/mask ROMs like older NAOMI titles, not GD-ROM as GD-ROM Hardware (Drives and Discs) were no longer being produced */
4398
44104399                  /* 2007.07 Shooting Love */
44114400                  /* 2007.07 Dynamite Deka EX - Asian dynamite */
4401                  /* 2007.07 Pokasuka Ghost! */
44124402                  /* 2007.09 Rhythm Tengoku */
4413                  /* 2007.?? Issyo ni Wanwan */
4414                  /* 2007.?? Konchuu Dash!! */
4415                  /* 2007.?? Pokasuka Ghost! */
4416                  /* 2007.?? Magical Dance on Dream Stage */
4417                  /* 2007.?? Marine Marine */
4418                  /* 2008.?? Akatsuki Denkou Senki Ausf.Achse */
4419                  /* 2008.?? Illvelo */
4420                  /* 2008.?? Mamoru Kun wa Norowarete Shimatta! */
4421                  /* 2008.?? Melty Blood Actress Again */
4422                  /* 2009.?? Project Cerberus */
4423                  /* 2009.?? Radirgy Noah */
4424   DRIVER( ggxxsla  )   /* 200?.?? Guilty Gear XX Slash */
4403                  /* 2008.02 Akatsuki Denkou Senki Ausf.Achse */
4404                  /* 2008.06 Illvelo (Illmatic Envelope) */
4405                  /* 2008.07 Mamoru Kun wa Norowarete Shimatta! */
4406                  /* 2008.09 Melty Blood Actress Again */
4407                  /* 2009.?? Project Cerberus (planned to be released in 2009 spring) */
4408                  /* 2009.?? Radirgy Noah (planned to be released in 2009.06) */
44254409
4426   DRIVER( initdexp )   /* 200?.?? Initial D Export Version (Naomi 2) */
44274410
4411
4412   /* NAOMI based (System SP) */
4413                  /* 2003.02 Kouchuu Ouja Mushiking */
4414                  /* 2004.10 Oshare Majo Love & Berry */
4415                  /* 2005.09 Kodai Ouja Kyouryuu King */
4416                  /* 2007.06 Issyo ni Wanwan */
4417                  /* 2007.06 Konchuu Dash!! */
4418                  /* 2007.07 Marine Marine */
4419                  /* 2007.11 Magical Dance on Dream Stage */
4420                  /* 2008.02 Marine Marine ver.2 */
4421                  /* 2008.04 Issyo ni Wanwan Waiwai Puppy */
4422                  /* 2008.07 Issyo ni Turbo Drive */
4423
4424   /* NAOMI 2 */
4425   DRIVER( vstrik3c )   /* 2001.04 Virtua Striker 3 */
4426   DRIVER( vstrik3 )
4427                  /* 2001.05 Wild Riders */
4428                  /* 2001.06 Club Cart */
4429   DRIVER( beachspi )   /* 2001.07 Beach Spikers */
4430                  /* 2001.08 Wave Runner GP */
4431   DRIVER( vf4 )      /* 2001.08.02 Virtua Fighter 4 */
4432   DRIVER( vf4b )      /* 2001.08.20 Virtua Fighter 4 ver.B */
4433   DRIVER( vf4c )      /* 2002.01.31 Virtua Fighter 4 ver.C */
4434                  /* 2002.02 The King of Route 66 */
4435   DRIVER( initd )      /* 2002.03 Initial D Arcade Stage */
4436   DRIVER( initdexp )   /* 200?.?? Initial D Export Version */
4437                  /* 2002.06 World Club Champion Football */
4438                  /* 2002.07 Soul Surfer */
4439   DRIVER( vf4evo )   /* 2002.08 Virtua Fighter 4 Evolution */
4440   DRIVER( initdv2j )   /* 2002.12 Initial D Arcade Stage ver.2 */
4441                  /* 2002.12 Virtua Fighter 4 Evolution ver.B */
4442                  /* 2003.03 WCCF 2001-2002 ver.2.0 */
4443                  /* 2003.09 WCCF 2002-2003 */
4444                  /* 2004.01 Initial D Arcade Stage ver.3 */
4445                  /* 2004.06 WCCF 2002-2003 ver.2.0 */
4446   DRIVER( vf4tuned )   /* 2004.07 Virtua Fighter 4 Final Tuned */
4447                  /* 2004.12 WCCF 2002-2003 ver.2.1 */
4448                  /* 2005.01 Virtua Fighter 4 final Tuned ver.B */
4449                  /* 2005.04 Menkyo no Tetsujin */
4450                  /* 2005.07 WCCF 2004-2005 */
4451                  /* 2006.08 WCCF European Clubs 2005-2006 */
4452
4453
44284454   /* Atomiswave (Dreamcast-based) games */
44294455   DRIVER( awbios )
44304456                  /* 2002.12 Maximum Speed */
r4441r4442
44484474   DRIVER( fotns )      /* 2005.12 Hokuto no Ken */
44494475                  /* 2006.02 Metal Slug 6 */
44504476                  /* 2006.09 Extreme Hunting 2 Tournament Edition */
4451                  /* 2008.?? Sega Cray challenge */
4477                  /* 2008.?? Sega Clay Challenge */
44524478
44534479   /* Hikaru */
44544480   DRIVER( hikaru )    /* BIOS (c)2000 */
r4441r4442
44664492                  /* 2003.06 F-ZERO AX */
44674493                  /* 2003.07 Avalon no Kagi */
44684494                  /* 2003.10 Avalon no Kagi ver.1.01 */
4469                  /* 2003.10 Gekitou Pro Yakyuu Mizushima Shinji All Stars vs. Pro Yakyuu */
4495   DRIVER( gekpurya )   /* 2003.10 Gekitou Pro Yakyuu Mizushima Shinji All Stars vs. Pro Yakyuu */
44704496                  /* 2003.12 Avalon no Kagi ver.1.10 */
44714497                  /* 2004.04 Avalon no Kagi ver.1.20 Aratanaru Syoukan */
44724498                  /* 2004.07 Avalon no Kagi ver.1.30 Konton no Utage */
r4441r4442
44814507   DRIVER( vcop3 )      /* 2003.04 Virtua Cop 3 */
44824508                  /* 2003.12 Outrun 2 */
44834509                  /* 2004.03 Ollie King */
4484                  /* 2004.07 Wangan Midnight Maximum Tune */
4510   DRIVER( wangmid )   /* 2004.07 Wangan Midnight Maximum Tune */
44854511                  /* 2004.09 Quest of D */
44864512                  /* 2004.11 Sega Golf Club Network Pro Tour */
44874513                  /* 2004.12 Outrun 2 Special Tours */
r4441r4442
72187244   DRIVER( ryouran )   /* 1998.07 (c) 1998 Electro Design Co. (Japan) */
72197245   DRIVER( puzzloop )   /* 1998.?? (c) 1998 Mitchell (Europe) */
72207246   DRIVER( puzzloopj )   /* 1998.12 (c) 1998 Mitchell (Japan) */
7247   DRIVER( puzzloopa )   /* 1998.?? (c) 1998 Mitchell (Asia) */
72217248   DRIVER( puzzloopk )   /* 1998.?? (c) 1998 Mitchell (Korea) */
72227249   DRIVER( puzzloopu )   /* 1999.05 (c) 1998 Mitchell (USA) */
72237250   DRIVER( galpans2 )   /* 1999.02 (c) 1999 Kaneko (Japan) */
r4441r4442
76947721   DRIVER( mjifb2 )   /* "29" 1990 Dynax */
76957722   DRIVER( mjifb3 )   /* "29" 1990 Dynax */
76967723   DRIVER( mjvegas )   /* 1991 Dynax */
7724   DRIVER( mjvegasa )   /* 1991 Dynax */
76977725   DRIVER( cafetime )   /* 1992 Dynax */
76987726   DRIVER( cafedoll )   /* 1993 Dynax */
76997727   DRIVER( janptr96 )   /* 1996 Dynax */
r4441r4442
78767904     DRIVER( kov2p )      /* (c) 2000 */
78777905     DRIVER( kov2p205 )   /* (c) 2000 */
78787906   DRIVER( ddp2 )      /* (c) 2001 */
7907   DRIVER( ddp2a )      /* (c) 2001 */
78797908   DRIVER( puzzli2 )   /* (c) 2001 */
78807909   DRIVER( martmast )   /* (c) 2001 */
78817910   DRIVER( martmasc )   /* (c) 2001 */
78827911   DRIVER( theglad )   /* (c) 2001 */
78837912   DRIVER( dmnfrnt )   /* (c) 2002 */
78847913   DRIVER( dmnfrnta )   /* (c) 2002 */
7914   DRIVER( kovh )
7915   DRIVER( oldss )
7916   DRIVER( killbldp )
7917   DRIVER( svg )
78857918
78867919   /* RamTek games */
78877920   DRIVER( hitme )      /* (c) 1976 Ramtek */
r4441r4442
83688401   DRIVER( dquizgo2 )   /* (c) 2000 Semicom */
83698402   DRIVER( misncrft )   /* (c) 2000 Sun */
83708403   DRIVER( hidnctch )   /* (c) 1998 Eolith */
8404   DRIVER( ironfort )   /* (c) 1998 Eolith */
83718405   DRIVER( puzzlekg )   /* (c) 1998 Eolith */
83728406   DRIVER( hidctch2 )   /* (c) 1999 Eolith */
83738407   DRIVER( nhidctch )   /* (c) 1999 Eolith */
src/mame/includes/bublbobl.h
r4441r4442
1111WRITE8_HANDLER( bublbobl_sound_command_w );
1212WRITE8_HANDLER( bublbobl_sh_nmi_disable_w );
1313WRITE8_HANDLER( bublbobl_sh_nmi_enable_w );
14WRITE8_HANDLER( soundcpu_reset_w );
15WRITE8_HANDLER( sound_status_w );
16READ8_HANDLER( sound_status_r );
1417READ8_HANDLER( boblbobl_ic43_a_r );
1518WRITE8_HANDLER( boblbobl_ic43_a_w );
1619READ8_HANDLER( boblbobl_ic43_b_r );
src/mame/includes/nemesis.h
r4441r4442
1/*----------- defined in drivers/nemesis.c -----------*/
2
3extern int nemesis_irq_on;
4extern int nemesis_irq2_on;
5extern UINT16 hcrash_selected_ip;
6
17/*----------- defined in video/nemesis.c -----------*/
28
3extern UINT16 *nemesis_videoram1b;
4extern UINT16 *nemesis_videoram1f;
5extern UINT16 *nemesis_videoram2b;
6extern UINT16 *nemesis_videoram2f;
9extern UINT16 *nemesis_videoram1;
10extern UINT16 *nemesis_videoram2;
11extern UINT16 *nemesis_colorram1;
12extern UINT16 *nemesis_colorram2;
713extern UINT16 *nemesis_characterram;
8extern UINT16 *nemesis_xscroll1,*nemesis_xscroll2, *nemesis_yscroll;
914extern size_t nemesis_characterram_size;
15extern UINT16 *nemesis_xscroll1, *nemesis_xscroll2;
1016extern UINT16 *nemesis_yscroll1, *nemesis_yscroll2;
1117
12WRITE16_HANDLER( nemesis_videoram1b_word_w );
13WRITE16_HANDLER( nemesis_videoram1f_word_w );
14WRITE16_HANDLER( nemesis_videoram2b_word_w );
15WRITE16_HANDLER( nemesis_videoram2f_word_w );
18WRITE16_HANDLER( nemesis_videoram1_word_w );
19WRITE16_HANDLER( nemesis_videoram2_word_w );
20WRITE16_HANDLER( nemesis_colorram1_word_w );
21WRITE16_HANDLER( nemesis_colorram2_word_w );
1622WRITE16_HANDLER( nemesis_characterram_word_w );
23VIDEO_START( nemesis );
1724VIDEO_UPDATE( nemesis );
18VIDEO_START( nemesis );
19VIDEO_UPDATE( salamand );
2025
21WRITE16_HANDLER( nemesis_gfx_flipx_w );
22WRITE16_HANDLER( nemesis_gfx_flipy_w );
26WRITE16_HANDLER( nemesis_gfx_flipx_word_w );
27WRITE16_HANDLER( nemesis_gfx_flipy_word_w );
28WRITE16_HANDLER( salamand_control_port_word_w );
2329WRITE16_HANDLER( salamander_palette_word_w );
2430WRITE16_HANDLER( nemesis_palette_word_w );
src/mame/includes/seibuspi.h
r4441r4442
3030VIDEO_START( spi );
3131VIDEO_UPDATE( spi );
3232
33VIDEO_START( sys386f2 );
34VIDEO_UPDATE( sys386f2 );
35
3336READ32_HANDLER( spi_layer_bank_r );
3437WRITE32_HANDLER( spi_layer_bank_w );
3538WRITE32_HANDLER( spi_layer_enable_w );
src/mame/includes/amiga.h
r4441r4442
141141#define REG_BPLCON0      (0x100/2)   /* W  A D    Bit plane control register (misc. control bits) */
142142#define REG_BPLCON1      (0x102/2)   /* W    D    Bit plane control reg. (scroll value PF1, PF2) */
143143#define REG_BPLCON2      (0x104/2)   /* W    D    Bit plane control reg. (priority control) */
144#define REG_BPLCON3      (0x106/2)   /* W    D    Bit plane control reg (enhanced features) */
144145#define REG_BPL1MOD      (0x108/2)   /* W  A      Bit plane modulo (odd planes) */
145146#define REG_BPL2MOD      (0x10A/2)   /* W  A      Bit Plane modulo (even planes) */
146147#define REG_BPL1DAT      (0x110/2)   /* W    D    Bit plane 1 data (parallel-to-serial convert) */
r4441r4442
149150#define REG_BPL4DAT      (0x116/2)   /* W    D    Bit plane 4 data (parallel-to-serial convert) */
150151#define REG_BPL5DAT      (0x118/2)   /* W    D    Bit plane 5 data (parallel-to-serial convert) */
151152#define REG_BPL6DAT      (0x11A/2)   /* W    D    Bit plane 6 data (parallel-to-serial convert) */
153#define REG_BPL7DAT      (0x11C/2)   /* W    D    Bit plane 7 data (parallel-to-serial convert) */
154#define REG_BPL8DAT      (0x11E/2)   /* W    D    Bit plane 8 data (parallel-to-serial convert) */
152155#define REG_SPR0PTH      (0x120/2)   /* W  A      Sprite 0 pointer (high 3 bits) */
153156#define REG_SPR0PTL      (0x122/2)   /* W  A      Sprite 0 pointer (low 15 bits) */
154157#define REG_SPR1PTH      (0x124/2)   /* W  A      Sprite 1 pointer (high 3 bits) */
r4441r4442
229232#define REG_COLOR29      (0x1BA/2)   /* W    D    Color table 29 */
230233#define REG_COLOR30      (0x1BC/2)   /* W    D    Color table 30 */
231234#define REG_COLOR31      (0x1BE/2)   /* W    D    Color table 31 */
235#define REG_FMODE      (0x1FC/2)   /* W  A D    Fetch mode */
232236
233237/* DMACON bit layout */
234238#define DMACON_AUD0EN   0x0001
r4441r4442
253257#define BPLCON0_ERSY   0x0002
254258#define BPLCON0_LACE   0x0004
255259#define BPLCON0_LPEN   0x0008
256#define BPLCON0_RSVED2   0x0010
260#define BPLCON0_BPU3   0x0010
257261#define BPLCON0_RSVED3   0x0020
258262#define BPLCON0_RSVED4   0x0040
259263#define BPLCON0_RSVED5   0x0080
r4441r4442
409413void amiga_sprite_dma_reset(int which);
410414void amiga_sprite_enable_comparitor(int which, int enable);
411415
416/*----------- defined in video/amigaaga.c -----------*/
417
418PALETTE_INIT( amiga_aga );
419VIDEO_START( amiga_aga );
420VIDEO_UPDATE( amiga_aga );
421
422UINT32 amiga_aga_gethvpos(const device_config *screen);
423void aga_copper_setpc(UINT32 pc);
424void amiga_aga_set_genlock_color(UINT16 color);
425void amiga_aga_render_scanline(running_machine *machine, bitmap_t *bitmap, int scanline);
426void amiga_aga_sprite_dma_reset(int which);
427void amiga_aga_sprite_enable_comparitor(int which, int enable);
428void aga_palette_write(int color_reg, UINT16 data);
429
412430#endif /* __AMIGA_H__ */
src/mame/includes/suna8.h
r4441r4442
33/*----------- defined in audio/suna8.c -----------*/
44
55WRITE8_DEVICE_HANDLER( suna8_play_samples_w );
6WRITE8_DEVICE_HANDLER( rranger_play_samples_w );
67WRITE8_DEVICE_HANDLER( suna8_samples_number_w );
78SAMPLES_START( suna8_sh_start );
89
src/mame/includes/hyprduel.h
r0r4442
1#define RASTER_LINES 262
2#define FIRST_VISIBLE_LINE 0
3#define LAST_VISIBLE_LINE 223
4
5/*----------- defined in video/hyprduel.c -----------*/
6
7extern UINT16 *hyprduel_videoregs;
8extern UINT16 *hyprduel_screenctrl;
9extern UINT16 *hyprduel_tiletable;
10extern size_t hyprduel_tiletable_size;
11extern UINT16 *hyprduel_vram_0, *hyprduel_vram_1, *hyprduel_vram_2;
12extern UINT16 *hyprduel_window;
13extern UINT16 *hyprduel_scroll;
14
15WRITE16_HANDLER( hyprduel_paletteram_w );
16WRITE16_HANDLER( hyprduel_window_w );
17WRITE16_HANDLER( hyprduel_vram_0_w );
18WRITE16_HANDLER( hyprduel_vram_1_w );
19WRITE16_HANDLER( hyprduel_vram_2_w );
20WRITE16_HANDLER( hyprduel_scrollreg_w );
21WRITE16_HANDLER( hyprduel_scrollreg_init_w );
22VIDEO_START( hyprduel_14220 );
23VIDEO_UPDATE( hyprduel );
24
src/mame/includes/dc.h
r4441r4442
8989#define SB_G1CRDYC   ((0x005F74B4-0x005F7400)/4)
9090#define SB_GDAPRO   ((0x005F74B8-0x005F7400)/4)
9191
92#define SB_ADSTAG       ((0x005F7800-0x005F7800)/4)
93#define SB_ADSTAR       ((0x005F7804-0x005F7800)/4)
94#define SB_ADLEN        ((0x005F7808-0x005F7800)/4)
95#define SB_ADDIR        ((0x005F780c-0x005F7800)/4)
9296#define SB_ADTSEL   ((0x005F7810-0x005F7800)/4)
9397#define SB_ADTRG   SB_ADTSEL
9498#define SB_ADEN      ((0x005F7814-0x005F7800)/4)
9599#define SB_ADST      ((0x005F7818-0x005F7800)/4)
100#define SB_ADSUSP   ((0x005F781c-0x005F7800)/4)
96101
102
97103#define SB_PDST      ((0x005F7c18-0x005F7c00)/4)
98104
99105#define RTC1      ((0x00710000-0x00710000)/4)
src/mame/includes/pgm.h
r4441r4442
2020void pgm_killbld_decrypt(running_machine *machine);
2121void pgm_pstar_decrypt(running_machine *machine);
2222void pgm_puzzli2_decrypt(running_machine *machine);
23void pgm_theglad_decrypt(running_machine *machine);
24void pgm_ddp2_decrypt(running_machine *machine);
25void pgm_dfront_decrypt(running_machine *machine);
26void pgm_svg_decrypt(running_machine *machine);
27void pgm_killbldp_decrypt(running_machine *machine);
28void pgm_kovh_decrypt(running_machine *machine);
29void pgm_oldss_decrypt(running_machine *machine);
2330
24
2531/*----------- defined in machine/pgmprot.c -----------*/
2632
2733READ16_HANDLER (PSTARS_protram_r);
src/mame/includes/gameplan.h
r4441r4442
1515#define GAMEPLAN_AY8910_CLOCK         (GAMEPLAN_AUDIO_MASTER_CLOCK / 2)
1616#define GAMEPLAN_PIXEL_CLOCK         (XTAL_11_6688MHz / 2)
1717
18/* Used Leprechaun/Pot of Gold (and Pirate Treasure) - as stated in manual for Pot Of Gold */
1819
20#define LEPRECHAUN_MAIN_MASTER_CLOCK      (XTAL_4MHz)
21#define LEPRECHAUN_MAIN_CPU_CLOCK      (LEPRECHAUN_MAIN_MASTER_CLOCK / 4)
22
1923typedef struct _gameplan_state gameplan_state;
2024struct _gameplan_state
2125{
src/mame/mame.mak
r4441r4442
3737CPUS += Z180
3838CPUS += I8085
3939CPUS += M6502
40CPUS += M65C02
41CPUS += M65SC02
42CPUS += M65CE02
43CPUS += M6509
44CPUS += M6510
45CPUS += M6510T
46CPUS += M7501
47CPUS += M8502
48CPUS += N2A03
49CPUS += DECO16
50CPUS += M4510
5140CPUS += H6280
52CPUS += I8086
53CPUS += I8088
54CPUS += I80186
55CPUS += I80188
56CPUS += I80286
41CPUS += I86
5742CPUS += I386
58CPUS += I486
59CPUS += PENTIUM
60CPUS += MEDIAGX
61CPUS += V20
62CPUS += V25
63CPUS += V30
43CPUS += NEC
6444CPUS += V30MZ
65CPUS += V33
66CPUS += V35
6745CPUS += V60
68CPUS += V70
6946CPUS += MCS48
70CPUS += I8031
71CPUS += I8032
72CPUS += I8051
73CPUS += I8052
74CPUS += I8751
75CPUS += I8752
76CPUS += I80C31
77CPUS += I80C32
78CPUS += I80C51
79CPUS += I80C52
80CPUS += I87C51
81CPUS += I87C52
82CPUS += AT89C4051
83CPUS += DS5002FP
47CPUS += MCS51
8448CPUS += M6800
85CPUS += M6801
86CPUS += M6802
87CPUS += M6803
88CPUS += M6808
89CPUS += HD63701
90CPUS += NSC8105
9149CPUS += M6805
92CPUS += M68705
93CPUS += HD63705
9450CPUS += HD6309
9551CPUS += M6809
96CPUS += M6809E
9752CPUS += KONAMI
9853CPUS += M680X0
9954CPUS += T11
10055CPUS += S2650
10156CPUS += TMS340X0
10257CPUS += TMS9900
103CPUS += TMS9940
104CPUS += TMS9980
105CPUS += TMS9985
106CPUS += TMS9989
107CPUS += TMS9995
108CPUS += TMS99105A
109CPUS += TMS99110A
110CPUS += TMS99000
111CPUS += TMS99010
11258CPUS += Z8000
11359CPUS += TMS32010
11460CPUS += TMS32025
115CPUS += TMS32026
11661CPUS += TMS32031
117CPUS += TMS32032
11862CPUS += TMS32051
11963CPUS += TMS57002
12064CPUS += CCPU
12165CPUS += ADSP21XX
122CPUS += PSXCPU
123CPUS += CXD8661R
12466CPUS += ASAP
12567CPUS += UPD7810
126CPUS += UPD7807
127CPUS += UPD7801
12868CPUS += ARM
12969CPUS += ARM7
13070CPUS += JAGUAR
13171CPUS += CUBEQCPU
13272CPUS += ESRIP
133CPUS += R3000
134CPUS += R3041
135CPUS += VR4300
136CPUS += R4600
137CPUS += R4650
138CPUS += R4700
139CPUS += R5000
140CPUS += QED5271
141CPUS += RM7000
142CPUS += SH1
73CPUS += MIPS
14374CPUS += SH2
14475CPUS += SH4
14576CPUS += DSP32C
146CPUS += PIC16C54
147CPUS += PIC16C55
148CPUS += PIC16C56
149CPUS += PIC16C57
150CPUS += PIC16C58
77CPUS += PIC16C5X
15178CPUS += G65816
15279CPUS += SPC700
153CPUS += E116T
154CPUS += E116XT
155CPUS += E116XS
156CPUS += E116XSR
157CPUS += E132N
158CPUS += E132T
159CPUS += E132XN
160CPUS += E132XT
161CPUS += E132XS
162CPUS += E132XSR
163CPUS += GMS30C2116
164CPUS += GMS30C2132
165CPUS += GMS30C2216
166CPUS += GMS30C2232
80CPUS += E1
16781CPUS += I860
16882CPUS += I960
16983CPUS += H83002
17084CPUS += H83334
17185CPUS += V810
172CPUS += M37702
17386CPUS += M37710
17487CPUS += POWERPC
17588CPUS += SE3208
r4441r4442
17891CPUS += DSP56156
17992CPUS += RSP
18093CPUS += ALPHA8201
181CPUS += ALPHA8301
18294CPUS += CDP1802
18395CPUS += COP400
18496CPUS += TLCS90
185CPUS += MB8841
186CPUS += MB8842
187CPUS += MB8843
188CPUS += MB8844
97CPUS += MB88XX
18998CPUS += MB86233
19099CPUS += SSP1601
191100CPUS += APEXC
r4441r4442
195104CPUS += PDP1
196105CPUS += SATURN
197106CPUS += SC61860
198CPUS += TX0
199107CPUS += LR35902
200108CPUS += TMS7000
201CPUS += TMS7000_EXL
202109CPUS += SM8500
203110CPUS += MINX
204111
r4441r4442
449356
450357$(MAMEOBJ)/amiga.a: \
451358   $(DRIVERS)/alg.o \
452   $(MACHINE)/amiga.o $(AUDIO)/amiga.o $(VIDEO)/amiga.o \
359   $(MACHINE)/amiga.o $(AUDIO)/amiga.o $(VIDEO)/amiga.o $(VIDEO)/amigaaga.o\
453360   $(DRIVERS)/arcadia.o \
454361   $(DRIVERS)/cubocd32.o $(MACHINE)/cubocd32.o \
455362   $(DRIVERS)/mquake.o \
r4441r4442
780687   $(DRIVERS)/tarzan.o \
781688   $(MACHINE)/pgmcrypt.o \
782689   $(MACHINE)/pgmprot.o \
783   $(MACHINE)/pgmy2ks.o \
784690
785691$(MAMEOBJ)/irem.a: \
786692   $(DRIVERS)/m10.o $(VIDEO)/m10.o \
src/mame/video/seibuspi.c
r4441r4442
1212static UINT32 layer_enable;
1313static UINT32 video_dma_length;
1414static UINT32 video_dma_address;
15static UINT32 sprite_dma_length;
1516
1617static int rf2_layer_bank[3];
1718static UINT32 *tilemap_ram;
r4441r4442
2425
2526static UINT32 bg_fore_layer_position;
2627
27static UINT8 alpha_table[6144];
28static UINT8 alpha_table[8192];
29static UINT8 sprite_bpp;
2830
2931READ32_HANDLER( spi_layer_bank_r )
3032{
r4441r4442
218220{
219221   if (video_dma_address != 0)
220222   {
221      memcpy( sprite_ram, &spimainram[(video_dma_address / 4) - 0x200], 0x1000);
223      memcpy( sprite_ram, &spimainram[(video_dma_address / 4) - 0x200], sprite_dma_length);
222224   }
223225}
224226
r4441r4442
320322   for (j=y1; j <= y2; j++)
321323   {
322324      UINT32 *p = BITMAP_ADDR32(bitmap, j, 0);
325      UINT8 trans_pen = (1 << sprite_bpp) - 1;
323326      int dp_i = (py * width) + px;
324327      py += yd;
325328
326329      for (i=x1; i <= x2; i++)
327330      {
328331         UINT8 pen = dp[dp_i];
329         if (pen != 0x3f)
332         if (pen != trans_pen)
330333         {
331            int global_pen = pen + color*64;
334            int global_pen = pen + (color << sprite_bpp);
332335            UINT8 alpha = alpha_table[global_pen];
333336            if (alpha)
334337            {
r4441r4442
369372   if( layer_enable & 0x10 )
370373      return;
371374
372   for( a = 0x400 - 2; a >= 0; a -= 2 ) {
375   for( a = (sprite_dma_length / 4) - 2; a >= 0; a -= 2 ) {
373376      tile_num = (sprite_ram[a + 0] >> 16) & 0xffff;
374377      if( sprite_ram[a + 1] & 0x1000 )
375378         tile_num |= 0x10000;
r4441r4442
498501   memset(palette_ram, 0, 0x3000);
499502   memset(sprite_ram, 0, 0x1000);
500503
504   sprite_bpp = 6;
505   sprite_dma_length = 0x1000;
506
501507   for (i=0; i < 6144; i++) {
502508      palette_set_color(machine, i, MAKE_RGB(0, 0, 0));
503509   }
r4441r4442
652658   combine_tilemap(screen->machine, bitmap, cliprect, text_layer, 0, 0, 0, NULL);
653659   return 0;
654660}
661
662VIDEO_START( sys386f2 )
663{
664   int i;
665
666   palette_ram = auto_malloc(0x4000);
667   sprite_ram = auto_malloc(0x2000);
668   memset(palette_ram, 0, 0x4000);
669   memset(sprite_ram, 0, 0x2000);
670
671   sprite_bpp = 8;
672   sprite_dma_length = 0x2000;
673   layer_enable = 0;
674
675   for (i=0; i < 8192; i++) {
676      palette_set_color(machine, i, MAKE_RGB(0, 0, 0));
677   }
678
679   memset(alpha_table, 0, 8192 * sizeof(UINT8));
680}
681
682VIDEO_UPDATE( sys386f2 )
683{
684   bitmap_fill(bitmap, cliprect, 0);
685   draw_sprites(screen->machine, bitmap, cliprect, 0);
686   draw_sprites(screen->machine, bitmap, cliprect, 1);
687   draw_sprites(screen->machine, bitmap, cliprect, 2);
688   draw_sprites(screen->machine, bitmap, cliprect, 3);
689   return 0;
690}
src/mame/video/amigaaga.c
r0r4442
1/***************************************************************************
2
3    Amiga hardware
4
5    Driver by: Ernesto Corvi, Mariusz Wojcieszek, Aaron Giles
6
7Done:
8    - palette
9    - bitplane data fetching
10    - support for up to 8 standard bitplanes
11    - HAM8 mode
12
13To do:
14    - sprites (current implementation is incomplete - see CD32 logo)
15    - incorrect hstart/hstop values in CD32 logo, lsrquiz & lsrquiz2
16
17***************************************************************************/
18
19#include "driver.h"
20#include "includes/amiga.h"
21
22
23
24/*************************************
25 *
26 *  Debugging
27 *
28 *************************************/
29
30#define LOG_COPPER         0
31#define GUESS_COPPER_OFFSET   0
32#define LOG_SPRITE_DMA      0
33
34
35
36/*************************************
37 *
38 *  Macros
39 *
40 *************************************/
41
42#define COPPER_CYCLES_TO_PIXELS(x)      (4 * (x))
43
44
45
46/*************************************
47 *
48 *  Statics
49 *
50 *************************************/
51
52/* palette */
53static pen_t aga_palette[256];
54
55/* AGA bpldat registers */
56static UINT64 aga_bpldat[8];
57
58/* sprite states */
59static UINT8 sprite_comparitor_enable_mask;
60static UINT8 sprite_dma_reload_mask;
61static UINT8 sprite_dma_live_mask;
62static UINT32 sprite_shiftreg[8];
63static UINT8 sprite_remain[8];
64static UINT16 aga_sprdata[8][4];
65static UINT16 aga_sprdatb[8][4];
66static int aga_sprite_fetched_words;
67static int aga_sprite_dma_used_words[8];
68
69/* playfield states */
70static int last_scanline;
71static pen_t ham_color;
72
73/* copper states */
74static UINT32 copper_pc;
75static UINT8 copper_waiting;
76static UINT8 copper_waitblit;
77static UINT16 copper_waitval;
78static UINT16 copper_waitmask;
79static UINT16 copper_pending_offset;
80static UINT16 copper_pending_data;
81
82/* misc states */
83static UINT16 genlock_color;
84
85#if GUESS_COPPER_OFFSET
86static int wait_offset = 3;
87#endif
88
89
90
91/*************************************
92 *
93 *  Tables
94 *
95 *************************************/
96
97/* expand an 8-bit bit pattern into 16 bits, every other bit */
98static const UINT16 expand_byte[256] =
99{
100   0x0000, 0x0001, 0x0004, 0x0005, 0x0010, 0x0011, 0x0014, 0x0015,
101   0x0040, 0x0041, 0x0044, 0x0045, 0x0050, 0x0051, 0x0054, 0x0055,
102   0x0100, 0x0101, 0x0104, 0x0105, 0x0110, 0x0111, 0x0114, 0x0115,
103   0x0140, 0x0141, 0x0144, 0x0145, 0x0150, 0x0151, 0x0154, 0x0155,
104   0x0400, 0x0401, 0x0404, 0x0405, 0x0410, 0x0411, 0x0414, 0x0415,
105   0x0440, 0x0441, 0x0444, 0x0445, 0x0450, 0x0451, 0x0454, 0x0455,
106   0x0500, 0x0501, 0x0504, 0x0505, 0x0510, 0x0511, 0x0514, 0x0515,
107   0x0540, 0x0541, 0x0544, 0x0545, 0x0550, 0x0551, 0x0554, 0x0555,
108   0x1000, 0x1001, 0x1004, 0x1005, 0x1010, 0x1011, 0x1014, 0x1015,
109   0x1040, 0x1041, 0x1044, 0x1045, 0x1050, 0x1051, 0x1054, 0x1055,
110   0x1100, 0x1101, 0x1104, 0x1105, 0x1110, 0x1111, 0x1114, 0x1115,
111   0x1140, 0x1141, 0x1144, 0x1145, 0x1150, 0x1151, 0x1154, 0x1155,
112   0x1400, 0x1401, 0x1404, 0x1405, 0x1410, 0x1411, 0x1414, 0x1415,
113   0x1440, 0x1441, 0x1444, 0x1445, 0x1450, 0x1451, 0x1454, 0x1455,
114   0x1500, 0x1501, 0x1504, 0x1505, 0x1510, 0x1511, 0x1514, 0x1515,
115   0x1540, 0x1541, 0x1544, 0x1545, 0x1550, 0x1551, 0x1554, 0x1555,
116
117   0x4000, 0x4001, 0x4004, 0x4005, 0x4010, 0x4011, 0x4014, 0x4015,
118   0x4040, 0x4041, 0x4044, 0x4045, 0x4050, 0x4051, 0x4054, 0x4055,
119   0x4100, 0x4101, 0x4104, 0x4105, 0x4110, 0x4111, 0x4114, 0x4115,
120   0x4140, 0x4141, 0x4144, 0x4145, 0x4150, 0x4151, 0x4154, 0x4155,
121   0x4400, 0x4401, 0x4404, 0x4405, 0x4410, 0x4411, 0x4414, 0x4415,
122   0x4440, 0x4441, 0x4444, 0x4445, 0x4450, 0x4451, 0x4454, 0x4455,
123   0x4500, 0x4501, 0x4504, 0x4505, 0x4510, 0x4511, 0x4514, 0x4515,
124   0x4540, 0x4541, 0x4544, 0x4545, 0x4550, 0x4551, 0x4554, 0x4555,
125   0x5000, 0x5001, 0x5004, 0x5005, 0x5010, 0x5011, 0x5014, 0x5015,
126   0x5040, 0x5041, 0x5044, 0x5045, 0x5050, 0x5051, 0x5054, 0x5055,
127   0x5100, 0x5101, 0x5104, 0x5105, 0x5110, 0x5111, 0x5114, 0x5115,
128   0x5140, 0x5141, 0x5144, 0x5145, 0x5150, 0x5151, 0x5154, 0x5155,
129   0x5400, 0x5401, 0x5404, 0x5405, 0x5410, 0x5411, 0x5414, 0x5415,
130   0x5440, 0x5441, 0x5444, 0x5445, 0x5450, 0x5451, 0x5454, 0x5455,
131   0x5500, 0x5501, 0x5504, 0x5505, 0x5510, 0x5511, 0x5514, 0x5515,
132   0x5540, 0x5541, 0x5544, 0x5545, 0x5550, 0x5551, 0x5554, 0x5555
133};
134
135/* separate 6 in-order bitplanes into 2 x 3-bit bitplanes in two nibbles */
136static UINT8 separate_bitplanes[2][64];
137
138/*************************************
139 *
140 *  Palette
141 *
142 *************************************/
143
144void aga_palette_write(int color_reg, UINT16 data)
145{
146   int r,g,b;
147   int cr,cg,cb;
148   int color;
149
150   color = ((CUSTOM_REG(REG_BPLCON3) >> 13) & 0x07)*32 + color_reg;
151   r = (data & 0xf00) >> 8;
152   g = (data & 0x0f0) >> 4;
153   b = (data & 0x00f) >> 0;
154   cr = RGB_RED(aga_palette[color]);
155   cg = RGB_GREEN(aga_palette[color]);
156   cb = RGB_BLUE(aga_palette[color]);
157   if (BIT(CUSTOM_REG(REG_BPLCON3),9))
158   {
159      // load low nibbles
160      cr = (cr & 0xf0) | r;
161      cg = (cg & 0xf0) | g;
162      cb = (cb & 0xf0) | b;
163   }
164   else
165   {
166      cr = (r << 4) | r;
167      cg = (g << 4) | g;
168      cb = (b << 4) | b;
169   }
170   aga_palette[color] = MAKE_RGB(cr,cg,cb);
171}
172
173/*************************************
174 *
175 *  4-4-4 palette init
176 *
177 *************************************/
178
179PALETTE_INIT( amiga_aga )
180{
181   int i;
182
183   for (i = 0; i < 0x1000; i++)
184      palette_set_color_rgb(machine, i, pal4bit(i >> 8), pal4bit(i >> 4), pal4bit(i));
185}
186
187
188
189/*************************************
190 *
191 *  Video startup
192 *
193 *************************************/
194
195VIDEO_START( amiga_aga )
196{
197   int j;
198
199   /* generate tables that produce the correct playfield color for dual playfield mode */
200   for (j = 0; j < 64; j++)
201   {
202      int pf1pix = ((j >> 0) & 1) | ((j >> 1) & 2) | ((j >> 2) & 4);
203      int pf2pix = ((j >> 1) & 1) | ((j >> 2) & 2) | ((j >> 3) & 4);
204
205      separate_bitplanes[0][j] = (pf1pix || !pf2pix) ? pf1pix : (pf2pix + 8);
206      separate_bitplanes[1][j] = pf2pix ? (pf2pix + 8) : pf1pix;
207   }
208
209   /* reset the genlock color */
210   genlock_color = 0xffff;
211}
212
213
214
215/*************************************
216 *
217 *  Beam position
218 *
219 *************************************/
220
221UINT32 amiga_aga_gethvpos(const device_config *screen)
222{
223   UINT32 hvpos = (last_scanline << 8) | (video_screen_get_hpos(screen) >> 2);
224   UINT32 latchedpos = input_port_read_safe(screen->machine, "HVPOS", 0);
225
226   /* if there's no latched position, or if we are in the active display area */
227   /* but before the latching point, return the live HV position */
228   if ((CUSTOM_REG(REG_BPLCON0) & 0x0008) == 0 || latchedpos == 0 || (last_scanline >= 20 && hvpos < latchedpos))
229      return hvpos;
230
231   /* otherwise, return the latched position */
232   return latchedpos;
233}
234
235
236
237/*************************************
238 *
239 *  Genlock interaction
240 *
241 *************************************/
242
243void amiga_aga_set_genlock_color(UINT16 color)
244{
245   genlock_color = color;
246}
247
248
249
250/*************************************
251 *
252 *  Copper emulation
253 *
254 *************************************/
255
256void aga_copper_setpc(UINT32 pc)
257{
258   if (LOG_COPPER)
259      logerror("copper_setpc(%06x)\n", pc);
260
261   copper_pc = pc;
262   copper_waiting = FALSE;
263}
264
265static int copper_execute_next(running_machine *machine, int xpos)
266{
267   int word0, word1;
268
269   /* bail if not enabled */
270   if ((CUSTOM_REG(REG_DMACON) & (DMACON_COPEN | DMACON_DMAEN)) != (DMACON_COPEN | DMACON_DMAEN))
271      return 511;
272
273   /* flush any pending writes */
274   if (copper_pending_offset)
275   {
276      if (LOG_COPPER)
277         logerror("%02X.%02X: Write to %s = %04x\n", last_scanline, xpos / 2, amiga_custom_names[copper_pending_offset & 0xff], copper_pending_data);
278
279      amiga_custom_w(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), copper_pending_offset, copper_pending_data, 0xffff);
280      copper_pending_offset = 0;
281   }
282
283   /* if we're waiting, check for a breakthrough */
284   if (copper_waiting)
285   {
286      int curpos = (last_scanline << 8) | (xpos >> 1);
287
288      /* if we're past the wait time, stop it and hold up 2 cycles */
289      if ((curpos & copper_waitmask) >= (copper_waitval & copper_waitmask) &&
290         (!copper_waitblit || !(CUSTOM_REG(REG_DMACON) & DMACON_BBUSY)))
291      {
292         copper_waiting = FALSE;
293#if GUESS_COPPER_OFFSET
294         return xpos + COPPER_CYCLES_TO_PIXELS(1 + wait_offset);
295#else
296         return xpos + COPPER_CYCLES_TO_PIXELS(1 + 3);
297#endif
298      }
299
300      /* otherwise, see if this line is even a possibility; if not, punt */
301      if (((curpos | 0xff) & copper_waitmask) < (copper_waitval & copper_waitmask))
302         return 511;
303
304      /* else just advance another pixel */
305      xpos += COPPER_CYCLES_TO_PIXELS(1);
306      return xpos;
307   }
308
309   /* fetch the first data word */
310   word0 = amiga_chip_ram_r(copper_pc);
311   copper_pc += 2;
312   xpos += COPPER_CYCLES_TO_PIXELS(1);
313
314   /* fetch the second data word */
315   word1 = amiga_chip_ram_r(copper_pc);
316   copper_pc += 2;
317   xpos += COPPER_CYCLES_TO_PIXELS(1);
318
319   if (LOG_COPPER)
320      logerror("%02X.%02X: Copper inst @ %06x = %04x %04x\n", last_scanline, xpos / 2, copper_pc, word0, word1);
321
322   /* handle a move */
323   if ((word0 & 1) == 0)
324   {
325      int min = (CUSTOM_REG(REG_COPCON) & 2) ? 0x20 : 0x40;
326
327      /* do the write if we're allowed */
328      word0 = (word0 >> 1) & 0xff;
329      if (word0 >= min)
330      {
331         /* write it at the *end* of this instruction's cycles */
332         /* needed for Arcadia's Fast Break */
333         copper_pending_offset = word0;
334         copper_pending_data = word1;
335      }
336
337      /* illegal writes suspend until next frame */
338      else
339      {
340         if (LOG_COPPER)
341            logerror("%02X.%02X: Aborting copper on illegal write\n", last_scanline, xpos / 2);
342
343         copper_waitval = 0xffff;
344         copper_waitmask = 0xffff;
345         copper_waitblit = FALSE;
346         copper_waiting = TRUE;
347         return 511;
348      }
349   }
350   else
351   {
352      /* extract common wait/skip values */
353      copper_waitval = word0 & 0xfffe;
354      copper_waitmask = word1 | 0x8001;
355      copper_waitblit = (~word1 >> 15) & 1;
356
357      /* handle a wait */
358      if ((word1 & 1) == 0)
359      {
360         if (LOG_COPPER)
361            logerror("  Waiting for %04x & %04x (currently %04x)\n", copper_waitval, copper_waitmask, (last_scanline << 8) | (xpos >> 1));
362
363         copper_waiting = TRUE;
364      }
365
366      /* handle a skip */
367      else
368      {
369         int curpos = (last_scanline << 8) | (xpos >> 1);
370
371         if (LOG_COPPER)
372            logerror("  Skipping if %04x & %04x (currently %04x)\n", copper_waitval, copper_waitmask, (last_scanline << 8) | (xpos >> 1));
373
374         /* if we're past the wait time, stop it and hold up 2 cycles */
375         if ((curpos & copper_waitmask) >= (copper_waitval & copper_waitmask) &&
376            (!copper_waitblit || !(CUSTOM_REG(REG_DMACON) & DMACON_BBUSY)))
377         {
378            if (LOG_COPPER)
379               logerror("  Skipped\n");
380
381            /* count the cycles it out have taken to fetch the next instruction */
382            copper_pc += 4;
383            xpos += COPPER_CYCLES_TO_PIXELS(2);
384         }
385      }
386   }
387
388   /* advance and consume 8 cycles */
389   return xpos;
390}
391
392
393/*************************************
394 *
395 *  External sprite controls
396 *
397 *************************************/
398
399void amiga_aga_sprite_dma_reset(int which)
400{
401   sprite_dma_reload_mask |= 1 << which;
402   sprite_dma_live_mask |= 1 << which;
403}
404
405
406void amiga_aga_sprite_enable_comparitor(int which, int enable)
407{
408   if (enable)
409   {
410      sprite_comparitor_enable_mask |= 1 << which;
411      sprite_dma_live_mask &= ~(1 << which);
412   }
413   else
414      sprite_comparitor_enable_mask &= ~(1 << which);
415}
416
417
418
419/*************************************
420 *
421 *  Per-scanline sprite fetcher
422 *
423 *************************************/
424
425INLINE void fetch_sprite_data(int sprite)
426{
427   switch((CUSTOM_REG(REG_FMODE) >> 2) & 0x03)
428   {
429      case 0:
430         aga_sprdata[sprite][0] = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) + 0);
431         aga_sprdatb[sprite][0] = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) + 2);
432         CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) += 4;
433         aga_sprite_fetched_words = 1;
434         break;
435      case 1:
436      case 2:
437         aga_sprdata[sprite][0] = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) + 0);
438         aga_sprdatb[sprite][0] = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) + 2);
439         CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) += 4;
440         aga_sprdata[sprite][1] = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) + 0);
441         aga_sprdatb[sprite][1] = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) + 2);
442         CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) += 4;
443         aga_sprite_fetched_words = 2;
444         break;
445      case 3:
446         aga_sprdata[sprite][0] = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) + 0);
447         aga_sprdatb[sprite][0] = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) + 2);
448         CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) += 4;
449         aga_sprdata[sprite][1] = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) + 0);
450         aga_sprdatb[sprite][1] = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) + 2);
451         CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) += 4;
452         aga_sprdata[sprite][2] = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) + 0);
453         aga_sprdatb[sprite][2] = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) + 2);
454         CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) += 4;
455         aga_sprdata[sprite][3] = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) + 0);
456         aga_sprdatb[sprite][3] = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) + 2);
457         CUSTOM_REG_LONG(REG_SPR0PTH + 2 * sprite) += 4;
458         aga_sprite_fetched_words = 4;
459         break;
460   }
461   aga_sprite_dma_used_words[sprite] = 0;
462}
463
464static void update_sprite_dma(int scanline)
465{
466   int dmaenable = (CUSTOM_REG(REG_DMACON) & (DMACON_SPREN | DMACON_DMAEN)) == (DMACON_SPREN | DMACON_DMAEN);
467   int num, maxdma;
468
469   /* channels are limited by DDFSTART */
470   maxdma = (CUSTOM_REG(REG_DDFSTRT) - 0x14) / 4;
471   if (maxdma > 8)
472      maxdma = 8;
473
474   /* loop over sprite channels */
475   for (num = 0; num < maxdma; num++)
476   {
477      int bitmask = 1 << num;
478      int vstart, vstop;
479
480      /* if we are == VSTOP, fetch new control words */
481      if (dmaenable && (sprite_dma_live_mask & bitmask) && (sprite_dma_reload_mask & bitmask))
482      {
483         /* disable the sprite */
484         sprite_comparitor_enable_mask &= ~bitmask;
485         sprite_dma_reload_mask &= ~bitmask;
486
487         /* fetch data into the control words */
488         CUSTOM_REG(REG_SPR0POS + 4 * num) = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * num) + 0);
489         CUSTOM_REG(REG_SPR0CTL + 4 * num) = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * num) + 2);
490         CUSTOM_REG_LONG(REG_SPR0PTH + 2 * num) += 4;
491         if (LOG_SPRITE_DMA) logerror("%3d:sprite %d fetch: pos=%04X ctl=%04X\n", scanline, num, CUSTOM_REG(REG_SPR0POS + 4 * num), CUSTOM_REG(REG_SPR0CTL + 4 * num));
492      }
493
494      /* compute vstart/vstop */
495      vstart = (CUSTOM_REG(REG_SPR0POS + 4 * num) >> 8) | ((CUSTOM_REG(REG_SPR0CTL + 4 * num) << 6) & 0x100);
496      vstop = (CUSTOM_REG(REG_SPR0CTL + 4 * num) >> 8) | ((CUSTOM_REG(REG_SPR0CTL + 4 * num) << 7) & 0x100);
497
498      /* if we hit vstart, enable the comparitor */
499      if (scanline == vstart)
500      {
501         sprite_comparitor_enable_mask |= 1 << num;
502         if (LOG_SPRITE_DMA) logerror("%3d:sprite %d comparitor enable\n", scanline, num);
503      }
504
505      /* if we hit vstop, disable the comparitor and trigger a reload for the next scanline */
506      if (scanline == vstop)
507      {
508         sprite_comparitor_enable_mask &= ~bitmask;
509         sprite_dma_reload_mask |= 1 << num;
510         CUSTOM_REG(REG_SPR0DATA + 4 * num) = 0;      /* just a guess */
511         CUSTOM_REG(REG_SPR0DATB + 4 * num) = 0;
512         if (LOG_SPRITE_DMA) logerror("%3d:sprite %d comparitor disable, prepare for reload\n", scanline, num);
513      }
514
515      /* fetch data if this sprite is enabled */
516      if (dmaenable && (sprite_dma_live_mask & bitmask) && (sprite_comparitor_enable_mask & bitmask))
517      {
518         //CUSTOM_REG(REG_SPR0DATA + 4 * num) = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * num) + 0);
519         //CUSTOM_REG(REG_SPR0DATB + 4 * num) = amiga_chip_ram_r(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * num) + 2);
520         //CUSTOM_REG_LONG(REG_SPR0PTH + 2 * num) += 4;
521         fetch_sprite_data(num);
522         if (LOG_SPRITE_DMA) logerror("%3d:sprite %d fetch: data=%04X-%04X\n", scanline, num, CUSTOM_REG(REG_SPR0DATA + 4 * num), CUSTOM_REG(REG_SPR0DATB + 4 * num));
523      }
524   }
525}
526
527
528
529/*************************************
530 *
531 *  Per-pixel sprite computations
532 *
533 *************************************/
534
535INLINE UINT32 interleave_sprite_data(UINT16 lobits, UINT16 hibits)
536{
537   return (expand_byte[lobits & 0xff] << 0) | (expand_byte[lobits >> 8] << 16) |
538         (expand_byte[hibits & 0xff] << 1) | (expand_byte[hibits >> 8] << 17);
539}
540
541
542static int get_sprite_pixel(int x)
543{
544   int pixels = 0;
545   int num, pair;
546
547   /* loop over sprite channels */
548   for (num = 0; num < 8; num++)
549      if (sprite_comparitor_enable_mask & (1 << num))
550      {
551         /* if we're not currently clocking, check against hstart */
552         if (sprite_remain[num] == 0)
553         {
554            int hstart = ((CUSTOM_REG(REG_SPR0POS + 4 * num) & 0xff) << 1) | (CUSTOM_REG(REG_SPR0CTL + 4 * num) & 1);
555            if (hstart == x)
556            {
557               sprite_remain[num] = 16;
558               //sprite_shiftreg[num] = interleave_sprite_data(CUSTOM_REG(REG_SPR0DATA + 4 * num), CUSTOM_REG(REG_SPR0DATB + 4 * num));
559               sprite_shiftreg[num] = interleave_sprite_data(aga_sprdata[num][0], aga_sprdatb[num][0]);
560               aga_sprite_dma_used_words[num] = 1;
561            }
562         }
563
564         /* clock the next pixel if we're doing it */
565         if (sprite_remain[num] != 0)
566         {
567            sprite_remain[num]--;
568            pixels |= (sprite_shiftreg[num] & 0xc0000000) >> (16 + 2 * (7 - num));
569            sprite_shiftreg[num] <<= 2;
570
571            if (sprite_remain[num] == 0)
572            {
573               if (aga_sprite_dma_used_words[num] < aga_sprite_fetched_words)
574               {
575                  sprite_remain[num] = 16;
576                  sprite_shiftreg[num] = interleave_sprite_data(aga_sprdata[aga_sprite_dma_used_words[num]][0], aga_sprdatb[aga_sprite_dma_used_words[num]][0]);
577                  aga_sprite_dma_used_words[num]++;
578               }
579            }
580         }
581      }
582
583   /* if we have pixels, determine the actual color and get out */
584   if (pixels)
585   {
586      static const UINT16 ormask[16] =
587      {
588         0x0000, 0x000c, 0x00c0, 0x00cc, 0x0c00, 0x0c0c, 0x0cc0, 0x0ccc,
589         0xc000, 0xc00c, 0xc0c0, 0xc0cc, 0xcc00, 0xcc0c, 0xccc0, 0xcccc
590      };
591      static const UINT16 spritecollide[16] =
592      {
593         0x0000, 0x0000, 0x0000, 0x0200, 0x0000, 0x0400, 0x1000, 0x1600,
594         0x0000, 0x0800, 0x2000, 0x2a00, 0x4000, 0x4c00, 0x7000, 0x7e00
595      };
596      int collide;
597
598      /* OR the two sprite bits together so we only have 1 bit per sprite */
599      collide = pixels | (pixels >> 1);
600
601      /* based on the CLXCON, merge even/odd sprite results */
602      collide |= (collide & ormask[CUSTOM_REG(REG_CLXCON) >> 12]) >> 2;
603
604      /* collapse down to a 4-bit final "sprite present" mask */
605      collide = (collide & 1) | ((collide >> 3) & 2) | ((collide >> 6) & 4) | ((collide >> 9) & 8);
606
607      /* compute sprite-sprite collisions */
608      CUSTOM_REG(REG_CLXDAT) |= spritecollide[collide];
609
610      /* now determine the actual color */
611      for (pair = 0; pixels; pair++, pixels >>= 4)
612         if (pixels & 0x0f)
613         {
614            /* final result is:
615                    topmost sprite color in bits 0-5
616                    sprite present bitmask in bits 6-9
617                    topmost sprite pair index in bits 10-11
618                */
619
620            /* attached case */
621            if (CUSTOM_REG(REG_SPR1CTL + 8 * pair) & 0x0080)
622               return (pixels & 0xf) | 0x10 | (collide << 6) | (pair << 10);
623
624            /* lower-numbered sprite of pair */
625            else if (pixels & 3)
626               return (pixels & 3) | 0x10 | (pair << 2) | (collide << 6) | (pair << 10);
627
628            /* higher-numbered sprite of pair */
629            else
630               return ((pixels >> 2) & 3) | 0x10 | (pair << 2) | (collide << 6) | (pair << 10);
631         }
632   }
633
634   return 0;
635}
636
637
638
639/*************************************
640 *
641 *  Bitplane assembly
642 *
643 *************************************/
644
645INLINE UINT8 assemble_odd_bitplanes(int planes, int obitoffs)
646{
647   UINT8 pix = (aga_bpldat[0] >> obitoffs) & 1;
648   if (planes >= 3)
649   {
650      pix |= ((aga_bpldat[2] >> obitoffs) & 1) << 2;
651      if (planes >= 5)
652      {
653         pix |= ((aga_bpldat[4] >> obitoffs) & 1) << 4;
654         if (planes >= 7)
655            pix |= ((aga_bpldat[6] >> obitoffs) & 1) << 6;
656      }
657   }
658   return pix;
659}
660
661
662INLINE UINT8 assemble_even_bitplanes(int planes, int ebitoffs)
663{
664   UINT8 pix = 0;
665   if (planes >= 2)
666   {
667      pix |= ((aga_bpldat[1] >> ebitoffs) & 1) << 1;
668      if (planes >= 4)
669      {
670         pix |= ((aga_bpldat[3] >> ebitoffs) & 1) << 3;
671         if (planes >= 6)
672         {
673            pix |= ((aga_bpldat[5] >> ebitoffs) & 1) << 5;
674            if (planes >= 8)
675               pix |= ((aga_bpldat[7] >> ebitoffs) & 1) << 7;
676         }
677      }
678   }
679   return pix;
680}
681
682INLINE void fetch_bitplane_data(int plane)
683{
684   switch (CUSTOM_REG(REG_FMODE) & 0x03)
685   {
686      case 0:
687         aga_bpldat[plane] = (UINT64)amiga_chip_ram_r(CUSTOM_REG_LONG(REG_BPL1PTH + plane * 2));
688         CUSTOM_REG_LONG(REG_BPL1PTH + plane * 2) += 2;
689         break;
690      case 1:
691      case 2:
692         aga_bpldat[plane] = (UINT64)amiga_chip_ram_r(CUSTOM_REG_LONG(REG_BPL1PTH + plane * 2)) << 16;
693         CUSTOM_REG_LONG(REG_BPL1PTH + plane * 2) += 2;
694         aga_bpldat[plane] |= ((UINT64)amiga_chip_ram_r(CUSTOM_REG_LONG(REG_BPL1PTH + plane * 2)));
695         CUSTOM_REG_LONG(REG_BPL1PTH + plane * 2) += 2;
696         break;
697      case 3:
698         aga_bpldat[plane] = (UINT64)amiga_chip_ram_r(CUSTOM_REG_LONG(REG_BPL1PTH + plane * 2)) << 48;
699         CUSTOM_REG_LONG(REG_BPL1PTH + plane * 2) += 2;
700         aga_bpldat[plane] |= ((UINT64)amiga_chip_ram_r(CUSTOM_REG_LONG(REG_BPL1PTH + plane * 2))) << 32;
701         CUSTOM_REG_LONG(REG_BPL1PTH + plane * 2) += 2;
702         aga_bpldat[plane] |= ((UINT64)amiga_chip_ram_r(CUSTOM_REG_LONG(REG_BPL1PTH + plane * 2))) << 16;
703         CUSTOM_REG_LONG(REG_BPL1PTH + plane * 2) += 2;
704         aga_bpldat[plane] |= (UINT64)amiga_chip_ram_r(CUSTOM_REG_LONG(REG_BPL1PTH + plane * 2));
705         CUSTOM_REG_LONG(REG_BPL1PTH + plane * 2) += 2;
706         break;
707   }
708}
709
710/*************************************
711 *
712 *  Hold and modify pixel computations
713 *
714 *************************************/
715
716INLINE int update_ham(int newpix)
717{
718   switch (newpix & 0x03)
719   {
720      case 0:
721         ham_color = aga_palette[(newpix >> 2) & 0x3f];
722         break;
723
724      case 1:
725         ham_color = MAKE_RGB(RGB_RED(ham_color), RGB_GREEN(ham_color), (newpix & 0xfc) | (RGB_BLUE(ham_color) & 0x03));
726         break;
727
728      case 2:
729         ham_color = MAKE_RGB((newpix & 0xfc) | (RGB_RED(ham_color) & 0x03), RGB_GREEN(ham_color), RGB_BLUE(ham_color));
730         break;
731
732      case 3:
733         ham_color = MAKE_RGB(RGB_RED(ham_color), (newpix & 0xfc) | (RGB_GREEN(ham_color) & 0x03), RGB_BLUE(ham_color));
734         break;
735   }
736   return ham_color;
737}
738
739
740
741/*************************************
742 *
743 *  Single scanline rasterizer
744 *
745 *************************************/
746
747void amiga_aga_render_scanline(running_machine *machine, bitmap_t *bitmap, int scanline)
748{
749   UINT16 save_color0 = CUSTOM_REG(REG_COLOR00);
750   int ddf_start_pixel = 0, ddf_stop_pixel = 0;
751   int hires = 0, dualpf = 0, lace = 0, ham = 0;
752   int hstart = 0, hstop = 0;
753   int vstart = 0, vstop = 0;
754   int pf1pri = 0, pf2pri = 0;
755   int planes = 0;
756
757   int x;
758   UINT32 *dst = NULL;
759   int ebitoffs = 0, obitoffs = 0;
760   int ecolmask = 0, ocolmask = 0;
761   int edelay = 0, odelay = 0;
762   int next_copper_x;
763   int p;
764   int fetch_odd_cnt = 0, fetch_even_cnt = 0;
765   pen_t ham_pix;
766   int defbitoffs = 0;
767
768   last_scanline = scanline;
769
770   /* on the first scanline, reset the COPPER and HAM color */
771   if (scanline == 0)
772   {
773      aga_copper_setpc(CUSTOM_REG_LONG(REG_COP1LCH));
774      ham_color = CUSTOM_REG(REG_COLOR00);
775   }
776
777   /* update sprite data fetching */
778   update_sprite_dma(scanline);
779
780   /* start of a new line, signal we're not done with it and fill up vars */
781   if (bitmap != NULL)
782      dst = BITMAP_ADDR32(bitmap, scanline, 0);
783
784   /* all sprites off at the start of the line */
785   memset(sprite_remain, 0, sizeof(sprite_remain));
786
787   /* temporary set color 0 to the genlock color */
788   if (genlock_color != 0xffff)
789      CUSTOM_REG(REG_COLOR00) = genlock_color;
790
791   /* loop over the line */
792   next_copper_x = 2;   /* copper runs on odd timeslots */
793   for (x = 0; x < 0xe4*2; x++)
794   {
795      int sprpix;
796
797      /* time to execute the copper? */
798      if (x == next_copper_x)
799      {
800         /* execute the next batch, restoring and re-saving color 0 around it */
801         CUSTOM_REG(REG_COLOR00) = save_color0;
802         next_copper_x = copper_execute_next(machine, x);
803         save_color0 = CUSTOM_REG(REG_COLOR00);
804         if (genlock_color != 0xffff)
805            CUSTOM_REG(REG_COLOR00) = genlock_color;
806
807         /* compute update-related register values */
808         planes = (CUSTOM_REG(REG_BPLCON0) & (BPLCON0_BPU0 | BPLCON0_BPU1 | BPLCON0_BPU2)) >> 12;
809         if ( CUSTOM_REG(REG_BPLCON0) & BPLCON0_BPU3 )
810            planes |= 8;
811
812         hires = CUSTOM_REG(REG_BPLCON0) & BPLCON0_HIRES;
813         ham = CUSTOM_REG(REG_BPLCON0) & BPLCON0_HOMOD;
814         dualpf = CUSTOM_REG(REG_BPLCON0) & BPLCON0_DBLPF;
815         lace = CUSTOM_REG(REG_BPLCON0) & BPLCON0_LACE;
816
817         /* get default bitoffset */
818         switch(CUSTOM_REG(REG_FMODE) & 0x3)
819         {
820            case 0: defbitoffs = 15; break;
821            case 1:
822            case 2: defbitoffs = 31; break;
823            case 3: defbitoffs = 63; break;
824         }
825
826         /* compute the pixel fetch parameters */
827         ddf_start_pixel = ( CUSTOM_REG(REG_DDFSTRT) & 0xfc ) * 2 + (hires ? 9 : 17);
828         ddf_stop_pixel = ( CUSTOM_REG(REG_DDFSTOP) & 0xfc ) * 2 + (hires ? (9 + defbitoffs) : (17 + defbitoffs));
829
830         if ( ( CUSTOM_REG(REG_DDFSTRT) ^ CUSTOM_REG(REG_DDFSTOP) ) & 0x04 )
831            ddf_stop_pixel += 8;
832
833         /* compute the horizontal start/stop */
834         hstart = CUSTOM_REG(REG_DIWSTRT) & 0xff;
835         hstop = 0x100 + (CUSTOM_REG(REG_DIWSTOP) & 0xff);
836
837         //ddf_stop_pixel = hstop - 1;
838         //hstop *= 2;
839
840         /* compute the vertical start/stop */
841         vstart = CUSTOM_REG(REG_DIWSTRT) >> 8;
842         vstop = (CUSTOM_REG(REG_DIWSTOP) >> 8) | ((~CUSTOM_REG(REG_DIWSTOP) >> 7) & 0x100);
843
844         /* extract playfield priorities */
845         pf1pri = CUSTOM_REG(REG_BPLCON2) & 7;
846         pf2pri = (CUSTOM_REG(REG_BPLCON2) >> 3) & 7;
847
848         /* extract collision masks */
849         ocolmask = (CUSTOM_REG(REG_CLXCON) >> 6) & 0x15;
850         ecolmask = (CUSTOM_REG(REG_CLXCON) >> 6) & 0x2a;
851
852      }
853
854      /* clear the target pixels to the background color as a starting point */
855      if (dst != NULL)
856         dst[x*2+0] =
857         dst[x*2+1] = aga_palette[0]; //CUSTOM_REG(REG_COLOR00);
858
859      /* if we hit the first fetch pixel, reset the counters and latch the delays */
860      if (x == ddf_start_pixel)
861      {
862         odelay = CUSTOM_REG(REG_BPLCON1) & 0xf;
863         edelay = ( CUSTOM_REG(REG_BPLCON1) >> 4 ) & 0x0f;
864
865         if ( hires )
866         {
867            obitoffs = defbitoffs + ( odelay << 1 );
868            ebitoffs = defbitoffs + ( edelay << 1 );
869         }
870         else
871         {
872            if ( CUSTOM_REG(REG_DDFSTRT) & 0x04 )
873            {
874               odelay = ( odelay + 8 ) & 0x0f;
875               edelay = ( edelay + 8 ) & 0x0f;
876            }
877
878            obitoffs = defbitoffs + odelay;
879            ebitoffs = defbitoffs + edelay;
880         }
881
882         for (p = 0; p < 8; p++)
883            aga_bpldat[p] = 0;
884            //CUSTOM_REG(REG_BPL1DAT + p) = 0;
885      }
886
887      /* need to run the sprite engine every pixel to ensure display */
888      sprpix = get_sprite_pixel(x);
889      //sprpix = 0;
890
891      /* to render, we must have bitplane DMA enabled, at least 1 plane, and be within the */
892      /* vertical display window */
893      if ((CUSTOM_REG(REG_DMACON) & (DMACON_BPLEN | DMACON_DMAEN)) == (DMACON_BPLEN | DMACON_DMAEN) &&
894         planes > 0 && scanline >= vstart && scanline < vstop)
895      {
896         int pfpix0 = 0, pfpix1 = 0, collide;
897
898         /* fetch the odd bits if we are within the fetching region */
899         if (x >= ddf_start_pixel && x <= ddf_stop_pixel + odelay)
900         {
901            /* if we need to fetch more data, do it now */
902            if (obitoffs == defbitoffs)
903            {
904               fetch_odd_cnt++;
905               for (p = 0; p < planes; p += 2)
906               {
907                  fetch_bitplane_data(p);
908               }
909            }
910
911            /* now assemble the bits */
912            pfpix0 |= assemble_odd_bitplanes(planes, obitoffs);
913            obitoffs--;
914
915            /* for high res, assemble a second set of bits */
916            if (hires)
917            {
918               /* reset bit offsets and fetch more data if needed */
919               if (obitoffs < 0)
920               {
921                  obitoffs = defbitoffs;
922
923                  fetch_odd_cnt++;
924
925                  for (p = 0; p < planes; p += 2)
926                  {
927                     fetch_bitplane_data(p);
928                  }
929               }
930
931               pfpix1 |= assemble_odd_bitplanes(planes, obitoffs);
932               obitoffs--;
933            }
934            else
935               pfpix1 |= pfpix0 & 0x55; // 0x15
936
937            /* reset bit offsets if needed */
938            if (obitoffs < 0)
939               obitoffs = defbitoffs;
940         }
941
942         /* fetch the even bits if we are within the fetching region */
943         if (x >= ddf_start_pixel && x <= ddf_stop_pixel + edelay)
944         {
945            /* if we need to fetch more data, do it now */
946            if (ebitoffs == defbitoffs)
947            {
948               fetch_even_cnt++;
949               for (p = 1; p < planes; p += 2)
950               {
951                  fetch_bitplane_data(p);
952               }
953            }
954
955            /* now assemble the bits */
956            pfpix0 |= assemble_even_bitplanes(planes, ebitoffs);
957            ebitoffs--;
958
959            /* for high res, assemble a second set of bits */
960            if (hires)
961            {
962               /* reset bit offsets and fetch more data if needed */
963               if (ebitoffs < 0)
964               {
965                  ebitoffs = defbitoffs;
966
967                  fetch_even_cnt++;
968
969                  for (p = 1; p < planes; p += 2)
970                  {
971                     fetch_bitplane_data(p);
972                  }
973               }
974
975               pfpix1 |= assemble_even_bitplanes(planes, ebitoffs);
976               ebitoffs--;
977            }
978            else
979               pfpix1 |= pfpix0 & 0xaa;
980
981            /* reset bit offsets if needed */
982            if (ebitoffs < 0)
983               ebitoffs = defbitoffs;
984         }
985
986         /* compute playfield/sprite collisions for first pixel */
987         collide = pfpix0 ^ CUSTOM_REG(REG_CLXCON);
988         if ((collide & ocolmask) == 0)
989            CUSTOM_REG(REG_CLXDAT) |= (sprpix >> 5) & 0x01e;
990         if ((collide & ecolmask) == 0)
991            CUSTOM_REG(REG_CLXDAT) |= (sprpix >> 1) & 0x1e0;
992         if ((collide & (ecolmask | ocolmask)) == 0)
993            CUSTOM_REG(REG_CLXDAT) |= 0x001;
994
995         /* compute playfield/sprite collisions for second pixel */
996         collide = pfpix1 ^ CUSTOM_REG(REG_CLXCON);
997         if ((collide & ocolmask) == 0)
998            CUSTOM_REG(REG_CLXDAT) |= (sprpix >> 5) & 0x01e;
999         if ((collide & ecolmask) == 0)
1000            CUSTOM_REG(REG_CLXDAT) |= (sprpix >> 1) & 0x1e0;
1001         if ((collide & (ecolmask | ocolmask)) == 0)
1002            CUSTOM_REG(REG_CLXDAT) |= 0x001;
1003
1004         /* if we are within the display region, render */
1005         if (dst != NULL && x >= hstart && x < hstop)
1006         {
1007            /* hold-and-modify mode -- assume low-res (hi-res not supported by the hardware) */
1008            if (ham)
1009            {
1010               /* update the HAM color */
1011               ham_pix = update_ham(pfpix0);
1012
1013               /* sprite has priority */
1014               if (sprpix && pf1pri > (sprpix >> 10))
1015               {
1016                  dst[x*2+0] =
1017                  dst[x*2+1] = aga_palette[sprpix & 0x1f];
1018               }
1019
1020               /* playfield has priority */
1021               else
1022               {
1023                  dst[x*2+0] =
1024                  dst[x*2+1] = ham_pix;
1025               }
1026            }
1027
1028            /* dual playfield mode */
1029            else if (dualpf)
1030            {
1031               int pix;
1032
1033               /* mask out the sprite if it doesn't have priority */
1034               pix = sprpix & 0x1f;
1035               if (pix)
1036               {
1037                  if ((pfpix0 & 0x15) && pf1pri <= (sprpix >> 10))
1038                     pix = 0;
1039                  if ((pfpix0 & 0x2a) && pf2pri <= (sprpix >> 10))
1040                     pix = 0;
1041               }
1042
1043               /* write out the left pixel */
1044               if (pix)
1045                  dst[x*2+0] = aga_palette[pix];
1046               else
1047                  dst[x*2+0] = aga_palette[separate_bitplanes[(CUSTOM_REG(REG_BPLCON2) >> 6) & 1][pfpix0]];
1048
1049               /* mask out the sprite if it doesn't have priority */
1050               pix = sprpix & 0x1f;
1051               if (pix)
1052               {
1053                  if ((pfpix1 & 0x15) && pf1pri <= (sprpix >> 10))
1054                     pix = 0;
1055                  if ((pfpix1 & 0x2a) && pf2pri <= (sprpix >> 10))
1056                     pix = 0;
1057               }
1058
1059               /* write out the right pixel */
1060               if (pix)
1061                  dst[x*2+1] = aga_palette[pix];
1062               else
1063                  dst[x*2+1] = aga_palette[separate_bitplanes[(CUSTOM_REG(REG_BPLCON2) >> 6) & 1][pfpix1]];
1064            }
1065
1066            /* single playfield mode */
1067            else
1068            {
1069               /* sprite has priority */
1070               if (sprpix && pf1pri > (sprpix >> 10))
1071               {
1072                  dst[x*2+0] =
1073                  dst[x*2+1] = aga_palette[(sprpix & 0x1f)];
1074               }
1075
1076               /* playfield has priority */
1077               else
1078               {
1079                  dst[x*2+0] = aga_palette[pfpix0];
1080                  dst[x*2+1] = aga_palette[pfpix1];
1081               }
1082            }
1083         }
1084      }
1085   }
1086
1087#if 0
1088   if ( video_screen_get_frame_number(machine->primary_screen) % 16 == 0 && scanline == 100 )
1089   {
1090      const char *m_lores = "LORES";
1091      const char *m_hires = "HIRES";
1092      const char *m_ham = "HAM";
1093      const char *m_dualpf = "DUALPF";
1094      const char *m_lace = "LACE";
1095      const char *m_hilace = "HI-LACE";
1096      const char *p = m_lores;
1097
1098      if ( hires ) p = m_hires;
1099      if ( ham ) p = m_ham;
1100      if ( dualpf ) p = m_dualpf;
1101      if ( lace ) p = m_lace;
1102
1103      if ( hires && lace ) p = m_hilace;
1104
1105      popmessage("%s(%d pl od=%04x ed=%04x start=%04x stop=%04x hstart=%04x hstop=%04x)", p, planes, odelay, edelay, CUSTOM_REG(REG_DDFSTRT), CUSTOM_REG(REG_DDFSTOP), CUSTOM_REG(REG_DIWSTRT), CUSTOM_REG(REG_DIWSTOP) );
1106   }
1107#endif
1108
1109   /* end of the line: time to add the modulos */
1110   if (scanline >= vstart && scanline < vstop)
1111   {
1112      int p;
1113
1114      /* update odd planes */
1115      for (p = 0; p < planes; p += 2)
1116         CUSTOM_REG_LONG(REG_BPL1PTH + p * 2) += CUSTOM_REG_SIGNED(REG_BPL1MOD);
1117
1118      /* update even planes */
1119      for (p = 1; p < planes; p += 2)
1120         CUSTOM_REG_LONG(REG_BPL1PTH + p * 2) += CUSTOM_REG_SIGNED(REG_BPL2MOD);
1121   }
1122
1123   /* restore color00 */
1124   CUSTOM_REG(REG_COLOR00) = save_color0;
1125
1126#if GUESS_COPPER_OFFSET
1127   if (video_screen_get_frame_number(machine->primary_screen) % 64 == 0 && scanline == 0)
1128   {
1129      if (input_code_pressed(KEYCODE_Q))
1130         popmessage("%d", wait_offset -= 1);
1131      if (input_code_pressed(KEYCODE_W))
1132         popmessage("%d", wait_offset += 1);
1133   }
1134#endif
1135}
1136
1137
1138
1139/*************************************
1140 *
1141 *  Update
1142 *
1143 *************************************/
1144
1145VIDEO_UPDATE( amiga_aga )
1146{
1147   int y;
1148
1149   /* render each scanline in the visible region */
1150   for (y = cliprect->min_y; y <= cliprect->max_y; y++)
1151      amiga_aga_render_scanline(screen->machine, bitmap, y);
1152
1153   return 0;
1154}
src/mame/video/hyprduel.c
r4441r4442
11
22/* based on driver from video/metro.c by Luca Elia */
3/* modified by Eisuke Watanabe */
3/* modified by Hau */
44
55/***************************************************************************
66
r4441r4442
5555***************************************************************************/
5656
5757#include "driver.h"
58#include "includes/hyprduel.h"
5859
59#define RASTER_LINES 262
60#define FIRST_VISIBLE_LINE 0
61#define LAST_VISIBLE_LINE 223
6260
6361/* Variables that driver has access to: */
64
6562UINT16 *hyprduel_videoregs;
6663UINT16 *hyprduel_screenctrl;
6764UINT16 *hyprduel_tiletable;
6865size_t hyprduel_tiletable_size;
6966UINT16 *hyprduel_vram_0,*hyprduel_vram_1,*hyprduel_vram_2;
7067UINT16 *hyprduel_window;
68UINT16 *hyprduel_scroll;
7169
72UINT16 hyprduel_scrollx[3][RASTER_LINES+1];
73UINT16 hyprduel_scrolly[3][RASTER_LINES+1];
74
75static UINT16 *hypr_tiletable_old;
70static UINT16 *hyprduel_tiletable_old;
7671static UINT8 *dirtyindex;
7772
73static int hyprduel_sprite_xoffs;
74static int hyprduel_sprite_yoffs;
75static int hyprduel_sprite_yoffs_sub;
7876
7977/***************************************************************************
8078                            Palette GGGGGRRRRRBBBBBx
r4441r4442
8381WRITE16_HANDLER( hyprduel_paletteram_w )
8482{
8583   data = COMBINE_DATA(&paletteram16[offset]);
86   /* We need the ^0xff because we had to invert the pens in the gfx */
87   palette_set_color_rgb(space->machine,offset^0xff,pal5bit(data >> 6),pal5bit(data >> 11),pal5bit(data >> 1));
84   palette_set_color_rgb(space->machine,offset,pal5bit(data >> 6),pal5bit(data >> 11),pal5bit(data >> 1));
8885}
8986
9087
r4441r4442
126123
127124
128125/* 8x8x4 tiles only */
129#ifdef UNUSED_FUNCTION
130126INLINE void get_tile_info(running_machine *machine,tile_data *tileinfo,int tile_index,int layer,UINT16 *vram)
131127{
132128   UINT16 code;
r4441r4442
149145   {
150146      int _code = code & 0x000f;
151147      tileinfo->pen_data = empty_tiles + _code*16*16;
152      tileinfo->palette_base = ((code & 0x0ff0) ^ 0x0f0) + 0x1000;
148      tileinfo->palette_base = ((code & 0x0ff0)) + 0x1000;
153149      tileinfo->flags = 0;
150      tileinfo->group = 0;
154151   }
155152   else
153   {
154      tileinfo->group = 0;
156155      SET_TILE_INFO(
157156            0,
158157            (tile & 0xfffff) + (code & 0xf),
159            (((tile & 0x0ff00000) >> 20) ^ 0x0f) + 0x100,
158            (((tile & 0x0ff00000) >> 20)) + 0x100,
160159            TILE_FLIPXY((code & 0x6000) >> 13));
160   }
161161}
162#endif
163162
164163/* 8x8x4 or 8x8x8 tiles. It's the tile's color that decides: if its low 4
165164   bits are high ($f,$1f,$2f etc) the tile is 8bpp, otherwise it's 4bpp */
r4441r4442
185184   {
186185      int _code = code & 0x000f;
187186      tileinfo->pen_data = empty_tiles + _code*16*16;
188      tileinfo->palette_base = ((code & 0x0ff0) ^ 0x0f0) + 0x1000;
187      tileinfo->palette_base = ((code & 0x0ff0)) + 0x1000;
189188      tileinfo->flags = 0;
189      tileinfo->group = 0;
190190   }
191191   else if ((tile & 0x00f00000)==0x00f00000)   /* draw tile as 8bpp */
192   {
193      tileinfo->group = 1;
192194      SET_TILE_INFO(
193195            1,
194196            (tile & 0xfffff) + 2*(code & 0xf),
195197            ((tile & 0x0f000000) >> 24) + 0x10,
196198            TILE_FLIPXY((code & 0x6000) >> 13));
199   }
197200   else
201   {
202      tileinfo->group = 0;
198203      SET_TILE_INFO(
199204            0,
200205            (tile & 0xfffff) + (code & 0xf),
201            (((tile & 0x0ff00000) >> 20) ^ 0x0f) + 0x100,
206            (((tile & 0x0ff00000) >> 20)) + 0x100,
202207            TILE_FLIPXY((code & 0x6000) >> 13));
208   }
203209}
204210
205211/* 16x16x4 or 16x16x8 tiles. It's the tile's color that decides: if its low 4
206212   bits are high ($f,$1f,$2f etc) the tile is 8bpp, otherwise it's 4bpp */
207#ifdef UNUSED_FUNCTION
208213INLINE void get_tile_info_16x16_8bit(running_machine *machine,tile_data *tileinfo,int tile_index,int layer,UINT16 *vram)
209214{
210215   UINT16 code;
r4441r4442
227232   {
228233      int _code = code & 0x000f;
229234      tileinfo->pen_data = empty_tiles + _code*16*16;
230      tileinfo->palette_base = ((code & 0x0ff0) ^ 0x0f0) + 0x1000;
235      tileinfo->palette_base = ((code & 0x0ff0)) + 0x1000;
231236      tileinfo->flags = 0;
237      tileinfo->group = 0;
232238   }
233239   else if ((tile & 0x00f00000)==0x00f00000)   /* draw tile as 8bpp */
240   {
241      tileinfo->group = 1;
234242      SET_TILE_INFO(
235243            3,
236244            (tile & 0xfffff) + 8*(code & 0xf),
237245            ((tile & 0x0f000000) >> 24) + 0x10,
238246            TILE_FLIPXY((code & 0x6000) >> 13));
247   }
239248   else
249   {
250      tileinfo->group = 0;
240251      SET_TILE_INFO(
241252            2,
242253            (tile & 0xfffff) + 4*(code & 0xf),
243            (((tile & 0x0ff00000) >> 20) ^ 0x0f) + 0x100,
254            (((tile & 0x0ff00000) >> 20)) + 0x100,
244255            TILE_FLIPXY((code & 0x6000) >> 13));
256
257   }
245258}
246#endif
247259
248260INLINE void hyprduel_vram_w(offs_t offset,UINT16 data,UINT16 mem_mask,int layer,UINT16 *vram)
249261{
250262   COMBINE_DATA(&vram[offset]);
251
252263   {
253264      /* Account for the window */
254265      int col      =   (offset % BIG_NX) - ((hyprduel_window[layer * 2 + 1] / 8) % BIG_NX);
r4441r4442
286297   }
287298}
288299
289
290300/***************************************************************************
291301                            Video Init Routines
292302***************************************************************************/
r4441r4442
299309 the tile's sizes to be known at startup - which we don't!
300310*/
301311
302static int hyprduel_sprite_xoffs, hyprduel_sprite_yoffs;
303
304
305312static void alloc_empty_tiles(void)
306313{
307314   int code,i;
r4441r4442
310317
311318   for (code = 0;code < 0x10;code++)
312319      for (i = 0;i < 16*16;i++)
313         empty_tiles[16*16*code + i] = code ^ 0x0f;
320         empty_tiles[16*16*code + i] = code;
314321}
315322
323
324static STATE_POSTLOAD( hyprduel_postload )
325{
326   int i;
327
328   for (i=0; i<3; i++)
329   {
330      UINT16 wx = hyprduel_window[i * 2 + 1];
331      UINT16 wy = hyprduel_window[i * 2 + 0];
332
333      tilemap_set_scrollx(bg_tilemap[i], 0, hyprduel_scroll[i * 2 + 1] - wx - (wx & 7));
334      tilemap_set_scrolly(bg_tilemap[i], 0, hyprduel_scroll[i * 2 + 0] - wy - (wy & 7));
335
336      tilemap_mark_all_tiles_dirty(bg_tilemap[i]);
337   }
338}
339
340
316341VIDEO_START( hyprduel_14220 )
317342{
318343   alloc_empty_tiles();
319   hypr_tiletable_old = auto_malloc(hyprduel_tiletable_size);
344   hyprduel_tiletable_old = auto_malloc(hyprduel_tiletable_size);
320345   dirtyindex = auto_malloc(hyprduel_tiletable_size/4);
321346
322347   bg_tilemap[0] = tilemap_create(machine, get_tile_info_0_8bit,tilemap_scan_rows,8,8,WIN_NX,WIN_NY);
323348   bg_tilemap[1] = tilemap_create(machine, get_tile_info_1_8bit,tilemap_scan_rows,8,8,WIN_NX,WIN_NY);
324349   bg_tilemap[2] = tilemap_create(machine, get_tile_info_2_8bit,tilemap_scan_rows,8,8,WIN_NX,WIN_NY);
325350
326   tilemap_set_transparent_pen(bg_tilemap[0],0);
327   tilemap_set_transparent_pen(bg_tilemap[1],0);
328   tilemap_set_transparent_pen(bg_tilemap[2],0);
351    tilemap_map_pen_to_layer(bg_tilemap[0], 0, 15,  TILEMAP_PIXEL_TRANSPARENT);
352    tilemap_map_pen_to_layer(bg_tilemap[0], 1, 255, TILEMAP_PIXEL_TRANSPARENT);
329353
354    tilemap_map_pen_to_layer(bg_tilemap[1], 0, 15,  TILEMAP_PIXEL_TRANSPARENT);
355    tilemap_map_pen_to_layer(bg_tilemap[1], 1, 255, TILEMAP_PIXEL_TRANSPARENT);
356
357    tilemap_map_pen_to_layer(bg_tilemap[2], 0, 15,  TILEMAP_PIXEL_TRANSPARENT);
358    tilemap_map_pen_to_layer(bg_tilemap[2], 1, 255, TILEMAP_PIXEL_TRANSPARENT);
359
330360   tilemap_set_scrolldx(bg_tilemap[0], 0, 0);
331361   tilemap_set_scrolldx(bg_tilemap[1], 0, 0);
332362   tilemap_set_scrolldx(bg_tilemap[2], 0, 0);
363
364   if (!strcmp(machine->gamedrv->name, "magerror"))
365      hyprduel_sprite_yoffs_sub = 0;
366   else
367      hyprduel_sprite_yoffs_sub = 2;
368
369   /* Set up save state */
370   state_save_register_global(machine, hyprduel_sprite_xoffs);
371   state_save_register_global(machine, hyprduel_sprite_yoffs);
372   state_save_register_global(machine, hyprduel_sprite_yoffs_sub);
373   state_save_register_postload(machine, hyprduel_postload, NULL);
333374}
334375
335376/***************************************************************************
r4441r4442
361402
362403***************************************************************************/
363404
364
365
366405/***************************************************************************
367406
368407                                Sprites Drawing
r4441r4442
391430
392431/* Draw sprites */
393432
394static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
433void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
395434{
396   const char * region      =   "gfx1";
435   UINT8 *base_gfx   =   memory_region(machine, "gfx1");
436   UINT8 *gfx_max   =   base_gfx + memory_region_length(machine, "gfx1");
397437
398   UINT8 *base_gfx   =   memory_region(machine, region);
399   UINT8 *gfx_max   =   base_gfx + memory_region_length(machine, region);
400
401438   int max_x = video_screen_get_width(machine->primary_screen);
402439   int max_y = video_screen_get_height(machine->primary_screen);
403440
r4441r4442
406443
407444   int color_start         =   ((hyprduel_videoregs[0x08/2] & 0xf) << 4 ) + 0x100;
408445
409   int i, pri;
446   int i, j, pri;
410447   static const int primask[4] = { 0x0000, 0xff00, 0xff00|0xf0f0, 0xff00|0xf0f0|0xcccc };
411448
449   UINT16 *src;
450   int inc;
451
452   if (sprites == 0)
453      return;
454
412455   for (i=0; i<0x20; i++)
413456   {
414      UINT16 *src         =   spriteram16 + (sprites - 1) * (8/2);
415      UINT16 *end         =   spriteram16;
457      gfx_element gfx;
416458
417      for ( ; src >= end; src -= 8/2 )
459      if (!(hyprduel_videoregs[0x02/2] & 0x8000))
418460      {
461         src = spriteram16 + (sprites - 1) * (8/2);
462         inc = -(8/2);
463      } else {
464         src = spriteram16;
465         inc = (8/2);
466      }
467
468      for (j=0; j<sprites; j++)
469      {
419470         int x,y, attr,code,color,flipx,flipy, zoom, curr_pri,width,height;
420         gfx_element gfx;
421471         UINT8 *gfxdata;
422472
423473         /* Exponential zoom table extracted from daitoride */
r4441r4442
433483
434484         x               =   src[ 0 ];
435485         curr_pri         =   (x & 0xf800) >> 11;
436         if ((curr_pri == 0x1f) || (curr_pri != i)) continue;
437486
487         if ((curr_pri == 0x1f) || (curr_pri != i))
488         {
489            src += inc;
490            continue;
491         }
492
438493         pri = (hyprduel_videoregs[0x02/2] & 0x0300) >> 8;
439494
440495         if (!(hyprduel_videoregs[0x02/2] & 0x8000))
r4441r4442
454509         zoom            =   zoomtable[(y & 0xfc00) >> 10] << (16-8);
455510
456511         x               =   (x & 0x07ff) - hyprduel_sprite_xoffs;
457         y               =   (y & 0x03ff) - hyprduel_sprite_yoffs +2;
512         y               =   (y & 0x03ff) - hyprduel_sprite_yoffs;
458513
459514         width            = (( (attr >> 11) & 0x7 ) + 1 ) * 8;
460515         height            = (( (attr >>  8) & 0x7 ) + 1 ) * 8;
r4441r4442
480535                        color_start >> 4,
481536                        flipx, flipy,
482537                        x, y,
483                        cliprect, TRANSPARENCY_PEN, 0,
538                        cliprect, TRANSPARENCY_PEN, 255,
484539                        zoom, zoom,
485540                        primask[pri]);
486541         }
r4441r4442
494549
495550            pdrawgfxzoom(   bitmap,&gfx,
496551                        0,
497                        (color ^ 0x0f) + color_start,
552                        color + color_start,
498553                        flipx, flipy,
499554                        x, y,
500                        cliprect, TRANSPARENCY_PEN, 0,
555                        cliprect, TRANSPARENCY_PEN, 15,
501556                        zoom, zoom,
502557                        primask[pri]);
503558         }
r4441r4442
508563   ui_draw_text(buf, x, y);
509564}
510565#endif
566         src += inc;
511567      }
512568   }
513569}
514570
515
516571/***************************************************************************
517572                                Screen Drawing
518573***************************************************************************/
519574
520/* Draw all the layers that match the given priority */
575WRITE16_HANDLER( hyprduel_scrollreg_w )
576{
577   UINT16 window = hyprduel_window[offset];
578
579   COMBINE_DATA(&hyprduel_scroll[offset]);
580
581   if (offset & 0x01)
582      tilemap_set_scrollx(bg_tilemap[offset / 2], 0, hyprduel_scroll[offset] - window - (window & 7));
583   else
584      tilemap_set_scrolly(bg_tilemap[offset / 2], 0, hyprduel_scroll[offset] - window - (window & 7));
585}
586
587WRITE16_HANDLER( hyprduel_scrollreg_init_w )
588{
589   int i;
590
591   for (i=0; i<3; i++)
592   {
593      UINT16 wx = hyprduel_window[i * 2 + 1];
594      UINT16 wy = hyprduel_window[i * 2 + 0];
595
596      hyprduel_scroll[i * 2 + 1] = data;
597      hyprduel_scroll[i * 2 + 0] = data;
598
599      tilemap_set_scrollx(bg_tilemap[i], 0, data - wx - (wx & 7));
600      tilemap_set_scrolly(bg_tilemap[i], 0, data - wy - (wy & 7));
601   }
602}
603
604
521605static void draw_layers(bitmap_t *bitmap, const rectangle *cliprect, int pri, int layers_ctrl)
522606{
523607   UINT16 layers_pri = hyprduel_videoregs[0x10/2];
524608   int layer;
525   int offs;
526   rectangle clip;
527609
528   clip.min_x = 0;
529   clip.max_x = 319;
530
531610   /* Draw all the layers with priority == pri */
532611   for (layer = 2; layer >= 0; layer--)   // tilemap[2] below?
533612   {
534613      if ( pri == ((layers_pri >> (layer*2)) & 3) )
535614      {
536         /* Scroll and Window values */
537         UINT16 wx = hyprduel_window[layer * 2 + 1];
538         UINT16 wy = hyprduel_window[layer * 2 + 0];
539         wx = wx - (wx & 7);
540         wy = wy - (wy & 7);
541
542         if (layers_ctrl & (1<<layer))
543         {
544            for (offs = cliprect->min_y; offs <= cliprect->max_y; offs++)
545            {
546               clip.min_y = offs;
547               clip.max_y = offs;
548
549               tilemap_set_scrollx(bg_tilemap[layer], 0, hyprduel_scrollx[layer][offs+RASTER_LINES-(LAST_VISIBLE_LINE+1)] - wx);
550               tilemap_set_scrolly(bg_tilemap[layer], 0, hyprduel_scrolly[layer][offs+RASTER_LINES-(LAST_VISIBLE_LINE+1)] - wy);
551               tilemap_draw(bitmap,&clip,bg_tilemap[layer], 0, 1<<(3-pri));
552            }
553         }
615         if (layers_ctrl & (1<<layer))   // for debug
616            tilemap_draw(bitmap,cliprect,bg_tilemap[layer], 0, 1<<(3-pri));
554617      }
555618   }
556619}
557620
558
559621/* Dirty tilemaps when the tiles set changes */
560622static void dirty_tiles(int layer,UINT16 *vram)
561623{
r4441r4442
588650      for (i = 0;i < hyprduel_tiletable_size/4;i++)
589651      {
590652         UINT32 tile_new = (hyprduel_tiletable[2*i + 0] << 16 ) + hyprduel_tiletable[2*i + 1];
591         UINT32 tile_old = (hypr_tiletable_old[2*i + 0] << 16 ) + hypr_tiletable_old[2*i + 1];
653         UINT32 tile_old = (hyprduel_tiletable_old[2*i + 0] << 16 ) + hyprduel_tiletable_old[2*i + 1];
592654
593655         if ((tile_new ^ tile_old) & 0x0fffffff)
594656         {
r4441r4442
596658            dirty = 1;
597659         }
598660      }
599      memcpy(hypr_tiletable_old,hyprduel_tiletable,hyprduel_tiletable_size);
661      memcpy(hyprduel_tiletable_old,hyprduel_tiletable,hyprduel_tiletable_size);
600662
601663      if (dirty)
602664      {
r4441r4442
607669   }
608670
609671   hyprduel_sprite_xoffs   =   hyprduel_videoregs[0x06/2] - video_screen_get_width(screen)  / 2;
610   hyprduel_sprite_yoffs   =   hyprduel_videoregs[0x04/2] - video_screen_get_height(screen) / 2;
672   hyprduel_sprite_yoffs   =   hyprduel_videoregs[0x04/2] - video_screen_get_height(screen) / 2 - hyprduel_sprite_yoffs_sub;
611673
612674   /* The background color is selected by a register */
613675   bitmap_fill(priority_bitmap,cliprect,0);
614   bitmap_fill(bitmap,cliprect,((hyprduel_videoregs[0x12/2] & 0x0fff) ^ 0x0ff) + 0x1000);
676   bitmap_fill(bitmap,cliprect,((hyprduel_videoregs[0x12/2] & 0x0fff)) + 0x1000);
615677
616678   /*  Screen Control Register:
617679
r4441r4442
627689   if (screenctrl & 2)   return 0;
628690   flip_screen_set(screen->machine, screenctrl & 1);
629691
630   /* If the game supports 16x16 tiles, make sure that the
631       16x16 and 8x8 tilemaps of a given layer are not simultaneously
632       enabled! */
633
634692#if 0
635693if (input_code_pressed(KEYCODE_Z))
636694{   int msk = 0;
r4441r4442
653711
654712   if (layers_ctrl & 0x08)
655713      draw_sprites(screen->machine,bitmap,cliprect);
714
656715   return 0;
657716}
src/mame/video/dc.c
r4441r4442
1515#define DEBUG_PVRTA_REGS (0)
1616#define DEBUG_PVRDLIST   (0)
1717#define DEBUG_VERTICES   (1)
18#define DEBUG_PALRAM (1)
1819
20#define NUM_BUFFERS 4
21
1922static UINT32 pvrctrl_regs[0x100/4];
2023static UINT32 pvrta_regs[0x2000/4];
2124static const int pvr_parconfseq[] = {1,2,3,2,3,4,5,6,5,6,7,8,9,10,11,12,13,14,13,14,15,16,17,16,17,0,0,0,0,0,18,19,20,19,20,21,22,23,22,23};
r4441r4442
3033static UINT32 tafifo_buff[32];
3134
3235static emu_timer *vbout_timer;
36static emu_timer *endofrender_timer;
37static bitmap_t *fakeframebuffer_bitmap;
38static void testdrawscreen(const running_machine *machine,bitmap_t *bitmap,const rectangle *cliprect);
3339
34typedef struct {
35   struct testsprites
36   {
37      int positionx, positiony;
38      int sizex, sizey;
39      UINT32 textureaddress;
40      float u, v, du, dv;
41      int texturemode;
42      int texturesizex, texturesizey, texturesizes, texturepf, texturepalette;
43   } showsprites[2048];
40typedef struct
41{
42   float x;
43   float y;
44   float z;
45   float u;
46   float v;
47} vert;
48
49typedef struct
50{
51   int positionx, positiony;
52   int sizex, sizey;
53   UINT32 textureaddress;
54   float u, v, du, dv;
55   int texturemode;
56   int texturesizex, texturesizey, texturesizes, texturepf, texturepalette;
57
58   vert a,b,c,d;
59
60} testsprites;
61
4462#if DEBUG_VERTICES
45   struct testvertices
46   {
47      int x;
48      int y;
49      int endofstrip;
50   } showvertices[65536];
63typedef   struct
64{
65   int x;
66   int y;
67   int endofstrip;
68} testvertices;
5169#endif
70
71typedef struct {
72   testsprites showsprites[2048];
73
74   #if DEBUG_VERTICES
75   testvertices showvertices[65536];
76   #endif
77
5278   int testsprites_size, testsprites_toerase, testvertices_size;
5379   UINT32 ispbase;
5480   UINT32 fbwsof1;
r4441r4442
6389   int renderselect;
6490   int listtype_used;
6591   int alloc_ctrl_OPB_Mode, alloc_ctrl_PT_OPB, alloc_ctrl_TM_OPB, alloc_ctrl_T_OPB, alloc_ctrl_OM_OPB, alloc_ctrl_O_OPB;
66   receiveddata grab[4];
92   receiveddata grab[NUM_BUFFERS];
6793   int grabsel;
6894   int grabsellast;
6995   UINT32 paracontrol,paratype,endofstrip,listtype,global_paratype,parameterconfig;
r4441r4442
185211      }
186212      if (dat & 2)
187213      {
214
188215         #if DEBUG_PVRTA
189216         mame_printf_verbose("pvr_ta_w:  Core Pipeline soft reset\n");
190217         #endif
191218         if (state_ta.start_render_received == 1)
192219         {
193            for (a=0;a < 4;a++)
220            for (a=0;a < NUM_BUFFERS;a++)
194221               if (state_ta.grab[a].busy == 1)
195222                  state_ta.grab[a].busy = 0;
196223            state_ta.start_render_received = 0;
r4441r4442
246273      }
247274      #endif
248275      // select buffer to draw using PARAM_BASE
249      for (a=0;a < 4;a++)
276      for (a=0;a < NUM_BUFFERS;a++)
250277      {
251278         if ((state_ta.grab[a].ispbase == pvrta_regs[PARAM_BASE]) && (state_ta.grab[a].valid == 1) && (state_ta.grab[a].busy == 0))
252279         {
280            rectangle clip;
281
253282            state_ta.grab[a].busy = 1;
254283            state_ta.renderselect = a;
255284            state_ta.start_render_received=1;
285
286
256287            state_ta.grab[a].fbwsof1=pvrta_regs[FB_W_SOF1];
257288            state_ta.grab[a].fbwsof2=pvrta_regs[FB_W_SOF2];
289
290            clip.min_x = 0;
291            clip.max_x = 1023;
292            clip.min_y = 0;
293            clip.max_y = 1023;
294
295            // we've got a request to draw, so, draw to the fake fraembuffer!
296            testdrawscreen(space->machine,fakeframebuffer_bitmap,&clip);
297
298            timer_adjust_oneshot(endofrender_timer, ATTOTIME_IN_USEC(1000) , 0); // hack, make sure render takes some amount of time
299
258300            break;
259301         }
260302      }
261      if (a != 4)
303      if (a != NUM_BUFFERS)
262304         break;
263      assert_always(0, "TA grabber error!\n");
305      assert_always(0, "TA grabber error A!\n");
264306      break;
265307   case TA_LIST_INIT:
266308      state_ta.tafifo_pos=0;
r4441r4442
285327      // use TA_ISP_BASE and select buffer for grab data
286328      state_ta.grabsel = -1;
287329      // try to find already used buffer but not busy
288      for (a=0;a < 4;a++)
330      for (a=0;a < NUM_BUFFERS;a++)
289331      {
290332         if ((state_ta.grab[a].ispbase == pvrta_regs[TA_ISP_BASE]) && (state_ta.grab[a].busy == 0) && (state_ta.grab[a].valid == 1))
291333         {
r4441r4442
296338      // try a buffer not used yet
297339      if (state_ta.grabsel < 0)
298340      {
299         for (a=0;a < 4;a++)
341         for (a=0;a < NUM_BUFFERS;a++)
300342         {
301343            if (state_ta.grab[a].valid == 0)
302344            {
r4441r4442
318360         }
319361      }
320362      if (state_ta.grabsel < 0)
321         assert_always(0, "TA grabber error!\n");
363         assert_always(0, "TA grabber error B!\n");
322364      state_ta.grabsellast=state_ta.grabsel;
323365      state_ta.grab[state_ta.grabsel].ispbase=pvrta_regs[TA_ISP_BASE];
324366      state_ta.grab[state_ta.grabsel].busy=0;
r4441r4442
340382      mame_printf_verbose("PVRTA: [%08x=%x] write %llx to %x (reg %x %x), mask %llx\n", 0x5f8000+reg*4, dat, data>>shift, offset, reg, (reg*4)+0x8000, mem_mask);
341383   #endif
342384}
343
344WRITE64_HANDLER( ta_fifo_poly_w )
385void process_ta_fifo(running_machine* machine)
345386{
346387   UINT32 a;
347388
348   if (mem_mask == U64(0xffffffffffffffff))    // 64 bit
389   /* first byte in the buffer is the Parameter Control Word
390
391     pppp pppp gggg gggg oooo oooo oooo oooo
392
393     p = para control
394     g = group control
395     o = object control
396
397    */
398
399   // Para Control
400   state_ta.paracontrol=(tafifo_buff[0] >> 24) & 0xff;
401   // 0 end of list
402   // 1 user tile clip
403   // 2 object list set
404   // 3 reserved
405   // 4 polygon/modifier volume
406   // 5 sprite
407   // 6 reserved
408   // 7 vertex
409   state_ta.paratype=(state_ta.paracontrol >> 5) & 7;
410   state_ta.endofstrip=(state_ta.paracontrol >> 4) & 1;
411   state_ta.listtype=(state_ta.paracontrol >> 0) & 7;
412   if ((state_ta.paratype >= 4) && (state_ta.paratype <= 6))
349413   {
350      tafifo_buff[state_ta.tafifo_pos]=(UINT32)data;
351      tafifo_buff[state_ta.tafifo_pos+1]=(UINT32)(data >> 32);
352      #if DEBUG_FIFO_POLY
353      mame_printf_debug("ta_fifo_poly_w:  Unmapped write64 %08x = %llx -> %08x %08x\n", 0x10000000+offset*8, data, tafifo_buff[state_ta.tafifo_pos], tafifo_buff[state_ta.tafifo_pos+1]);
354      #endif
355      state_ta.tafifo_pos += 2;
414      state_ta.global_paratype = state_ta.paratype;
415      // Group Control
416      state_ta.groupcontrol=(tafifo_buff[0] >> 16) & 0xff;
417      state_ta.groupen=(state_ta.groupcontrol >> 7) & 1;
418      state_ta.striplen=(state_ta.groupcontrol >> 2) & 3;
419      state_ta.userclip=(state_ta.groupcontrol >> 0) & 3;
420      // Obj Control
421      state_ta.objcontrol=(tafifo_buff[0] >> 0) & 0xffff;
422      state_ta.shadow=(state_ta.objcontrol >> 7) & 1;
423      state_ta.volume=(state_ta.objcontrol >> 6) & 1;
424      state_ta.coltype=(state_ta.objcontrol >> 4) & 3;
425      state_ta.texture=(state_ta.objcontrol >> 3) & 1;
426      state_ta.offfset=(state_ta.objcontrol >> 2) & 1;
427      state_ta.gouraud=(state_ta.objcontrol >> 1) & 1;
428      state_ta.uv16bit=(state_ta.objcontrol >> 0) & 1;
356429   }
357   else
430
431   // check if we need 8 words more
432   if (state_ta.tafifo_mask == 7)
358433   {
359      mame_printf_debug("ta_fifo_poly_w:  Only 64 bit writes supported!\n");
434      state_ta.parameterconfig = pvr_parameterconfig[state_ta.objcontrol & 0x3d];
435      // decide number of words per vertex
436      if (state_ta.paratype == 7)
437      {
438         if ((state_ta.global_paratype == 5) || (state_ta.tafifo_listtype == 1) || (state_ta.tafifo_listtype == 3))
439            state_ta.tafifo_vertexwords = 16;
440         if (state_ta.tafifo_vertexwords == 16)
441         {
442            state_ta.tafifo_mask = 15;
443            state_ta.tafifo_pos = 8;
444            return;
445         }
446      }
447      // decide number of words when not a vertex
448      state_ta.tafifo_vertexwords=pvr_wordsvertex[state_ta.parameterconfig];
449      if ((state_ta.paratype == 4) && ((state_ta.listtype != 1) && (state_ta.listtype != 3)))
450         if (pvr_wordspolygon[state_ta.parameterconfig] == 16)
451         {
452            state_ta.tafifo_mask = 15;
453            state_ta.tafifo_pos = 8;
454            return;
455         }
360456   }
457   state_ta.tafifo_mask = 7;
361458
362   state_ta.tafifo_pos &= state_ta.tafifo_mask;
363   if (state_ta.tafifo_pos == 0)
364   {
365      // Para Control
366      state_ta.paracontrol=(tafifo_buff[0] >> 24) & 0xff;
367      // 0 end of list
368      // 1 user tile clip
369      // 2 object list set
370      // 3 reserved
371      // 4 polygon/modifier volume
372      // 5 sprite
373      // 6 reserved
374      // 7 vertex
375      state_ta.paratype=(state_ta.paracontrol >> 5) & 7;
376      state_ta.endofstrip=(state_ta.paracontrol >> 4) & 1;
377      state_ta.listtype=(state_ta.paracontrol >> 0) & 7;
378      if ((state_ta.paratype >= 4) && (state_ta.paratype <= 6))
459   // now we heve all the needed words
460   // here we should generate the data for the various tiles
461   // for now, just interpret their meaning
462   if (state_ta.paratype == 0)
463   { // end of list
464      #if DEBUG_PVRDLIST
465      mame_printf_verbose("Para Type 0 End of List\n");
466      #endif
467      a=0; // 6-10 0-3
468      switch (state_ta.tafifo_listtype)
379469      {
380         state_ta.global_paratype = state_ta.paratype;
381         // Group Control
382         state_ta.groupcontrol=(tafifo_buff[0] >> 16) & 0xff;
383         state_ta.groupen=(state_ta.groupcontrol >> 7) & 1;
384         state_ta.striplen=(state_ta.groupcontrol >> 2) & 3;
385         state_ta.userclip=(state_ta.groupcontrol >> 0) & 3;
386         // Obj Control
387         state_ta.objcontrol=(tafifo_buff[0] >> 0) & 0xffff;
388         state_ta.shadow=(state_ta.objcontrol >> 7) & 1;
389         state_ta.volume=(state_ta.objcontrol >> 6) & 1;
390         state_ta.coltype=(state_ta.objcontrol >> 4) & 3;
391         state_ta.texture=(state_ta.objcontrol >> 3) & 1;
392         state_ta.offfset=(state_ta.objcontrol >> 2) & 1;
393         state_ta.gouraud=(state_ta.objcontrol >> 1) & 1;
394         state_ta.uv16bit=(state_ta.objcontrol >> 0) & 1;
470      case 0:
471         a = 1 << 7;
472         break;
473      case 1:
474         a = 1 << 8;
475         break;
476      case 2:
477         a = 1 << 9;
478         break;
479      case 3:
480         a = 1 << 10;
481         break;
482      case 4:
483         a = 1 << 21;
484         break;
395485      }
396486
397      // check if we need 8 words more
398      if (state_ta.tafifo_mask == 7)
487      dc_sysctrl_regs[SB_ISTNRM] |= a;
488      dc_update_interrupt_status(machine);
489      state_ta.tafifo_listtype= -1; // no list being received
490      state_ta.listtype_used |= (2+8);
491   }
492   else if (state_ta.paratype == 1)
493   { // user tile clip
494      #if DEBUG_PVRDLIST
495      mame_printf_verbose("Para Type 1 User Tile Clip\n");
496      mame_printf_verbose(" (%d , %d)-(%d , %d)\n", tafifo_buff[4], tafifo_buff[5], tafifo_buff[6], tafifo_buff[7]);
497      #endif
498   }
499   else if (state_ta.paratype == 2)
500   { // object list set
501      #if DEBUG_PVRDLIST
502      mame_printf_verbose("Para Type 2 Object List Set at %08x\n", tafifo_buff[1]);
503      mame_printf_verbose(" (%d , %d)-(%d , %d)\n", tafifo_buff[4], tafifo_buff[5], tafifo_buff[6], tafifo_buff[7]);
504      #endif
505   }
506   else if (state_ta.paratype == 3)
507   {
508      #if DEBUG_PVRDLIST
509      mame_printf_verbose("Para Type %x Unknown!\n", tafifo_buff[0]);
510      #endif
511   }
512   else
513   { // global parameter or vertex parameter
514      #if DEBUG_PVRDLIST
515      mame_printf_verbose("Para Type %d", state_ta.paratype);
516      if (state_ta.paratype == 7)
517         mame_printf_verbose(" End of Strip %d", state_ta.endofstrip);
518      if (state_ta.listtype_used & 3)
519         mame_printf_verbose(" List Type %d", state_ta.listtype);
520      mame_printf_verbose("\n");
521      #endif
522
523      // set type of list currently being recieved
524      if ((state_ta.paratype == 4) || (state_ta.paratype == 5) || (state_ta.paratype == 6))
399525      {
400         state_ta.parameterconfig = pvr_parameterconfig[state_ta.objcontrol & 0x3d];
401         // decide number of words per vertex
402         if (state_ta.paratype == 7)
526         if (state_ta.tafifo_listtype < 0)
403527         {
404            if ((state_ta.global_paratype == 5) || (state_ta.tafifo_listtype == 1) || (state_ta.tafifo_listtype == 3))
405               state_ta.tafifo_vertexwords = 16;
406            if (state_ta.tafifo_vertexwords == 16)
528            state_ta.tafifo_listtype = state_ta.listtype;
529         }
530      }
531      state_ta.listtype_used = state_ta.listtype_used ^ (state_ta.listtype_used & 3);
532
533      if ((state_ta.paratype == 4) || (state_ta.paratype == 5))
534      { // quad or polygon
535         state_ta.depthcomparemode=(tafifo_buff[1] >> 29) & 7;
536         state_ta.cullingmode=(tafifo_buff[1] >> 27) & 3;
537         state_ta.zwritedisable=(tafifo_buff[1] >> 26) & 1;
538         state_ta.cachebypass=(tafifo_buff[1] >> 21) & 1;
539         state_ta.dcalcctrl=(tafifo_buff[1] >> 20) & 1;
540         state_ta.volumeinstruction=(tafifo_buff[1] >> 29) & 7;
541         state_ta.textureusize=1 << (3+((tafifo_buff[2] >> 3) & 7));
542         state_ta.texturevsize=1 << (3+(tafifo_buff[2] & 7));
543         state_ta.texturesizes=tafifo_buff[2] & 0x3f;
544         state_ta.srcalphainstr=(tafifo_buff[2] >> 29) & 7;
545         state_ta.dstalphainstr=(tafifo_buff[2] >> 26) & 7;
546         state_ta.srcselect=(tafifo_buff[2] >> 25) & 1;
547         state_ta.dstselect=(tafifo_buff[2] >> 24) & 1;
548         state_ta.fogcontrol=(tafifo_buff[2] >> 22) & 3;
549         state_ta.colorclamp=(tafifo_buff[2] >> 21) & 1;
550         state_ta.usealpha=(tafifo_buff[2] >> 20) & 1;
551         state_ta.ignoretexalpha=(tafifo_buff[2] >> 19) & 1;
552         state_ta.flipuv=(tafifo_buff[2] >> 17) & 3;
553         state_ta.clampuv=(tafifo_buff[2] >> 15) & 3;
554         state_ta.filtermode=(tafifo_buff[2] >> 13) & 3;
555         state_ta.sstexture=(tafifo_buff[2] >> 12) & 1;
556         state_ta.mmdadjust=(tafifo_buff[2] >> 8) & 1;
557         state_ta.tsinstruction=(tafifo_buff[2] >> 6) & 3;
558         if (state_ta.texture == 1)
559         {
560            state_ta.textureaddress=(tafifo_buff[3] & 0x1FFFFF) << 3;
561            state_ta.scanorder=(tafifo_buff[3] >> 26) & 1;
562            state_ta.pixelformat=(tafifo_buff[3] >> 27) & 7;
563            state_ta.mipmapped=(tafifo_buff[3] >> 31) & 1;
564            state_ta.vqcompressed=(tafifo_buff[3] >> 30) & 1;
565            state_ta.strideselect=(tafifo_buff[3] >> 25) & 1;
566            state_ta.paletteselector=(tafifo_buff[3] >> 21) & 0x3F;
567            #if DEBUG_PVRDLIST
568            mame_printf_verbose(" Texture %d x %d at %08x format %d\n", state_ta.textureusize, state_ta.texturevsize, (tafifo_buff[3] & 0x1FFFFF) << 3, state_ta.pixelformat);
569            #endif
570         }
571         if (state_ta.paratype == 4)
572         { // polygon or mv
573            if ((state_ta.tafifo_listtype == 1) || (state_ta.tafifo_listtype == 3))
407574            {
408               state_ta.tafifo_mask = 15;
409               state_ta.tafifo_pos = 8;
410               return;
575            #if DEBUG_PVRDLIST
576               mame_printf_verbose(" Modifier Volume\n");
577            #endif
411578            }
412         }
413         // decide number of words when not a vertex
414         state_ta.tafifo_vertexwords=pvr_wordsvertex[state_ta.parameterconfig];
415         if ((state_ta.paratype == 4) && ((state_ta.listtype != 1) && (state_ta.listtype != 3)))
416            if (pvr_wordspolygon[state_ta.parameterconfig] == 16)
579            else
417580            {
418               state_ta.tafifo_mask = 15;
419               state_ta.tafifo_pos = 8;
420               return;
581            #if DEBUG_PVRDLIST
582               mame_printf_verbose(" Polygon\n");
583            #endif
421584            }
585         }
586         if (state_ta.paratype == 5)
587         { // quad
588            #if DEBUG_PVRDLIST
589            mame_printf_verbose(" Sprite\n");
590            #endif
591         }
422592      }
423      state_ta.tafifo_mask = 7;
424593
425      // now we heve all the needed words
426      // here we should generate the data for the various tiles
427      // for now, just interpret their meaning
428      if (state_ta.paratype == 0)
429      { // end of list
430         #if DEBUG_PVRDLIST
431         mame_printf_verbose("Para Type 0 End of List\n");
432         #endif
433         a=0; // 6-10 0-3
434         switch (state_ta.tafifo_listtype)
594      if (state_ta.paratype == 7)
595      { // vertex
596         if ((state_ta.tafifo_listtype == 1) || (state_ta.tafifo_listtype == 3))
435597         {
436         case 0:
437            a = 1 << 7;
438            break;
439         case 1:
440            a = 1 << 8;
441            break;
442         case 2:
443            a = 1 << 9;
444            break;
445         case 3:
446            a = 1 << 10;
447            break;
448         case 4:
449            a = 1 << 21;
450            break;
598            #if DEBUG_PVRDLIST
599            mame_printf_verbose(" Vertex modifier volume");
600            mame_printf_verbose(" A(%f,%f,%f) B(%f,%f,%f) C(%f,%f,%f)", u2f(tafifo_buff[1]), u2f(tafifo_buff[2]),
601               u2f(tafifo_buff[3]), u2f(tafifo_buff[4]), u2f(tafifo_buff[5]), u2f(tafifo_buff[6]), u2f(tafifo_buff[7]),
602               u2f(tafifo_buff[8]), u2f(tafifo_buff[9]));
603            mame_printf_verbose("\n");
604            #endif
451605         }
452         dc_sysctrl_regs[SB_ISTNRM] |= a;
453         dc_update_interrupt_status(space->machine);
454         state_ta.tafifo_listtype= -1; // no list being received
455         state_ta.listtype_used |= (2+8);
456      }
457      else if (state_ta.paratype == 1)
458      { // user tile clip
459         #if DEBUG_PVRDLIST
460         mame_printf_verbose("Para Type 1 User Tile Clip\n");
461         mame_printf_verbose(" (%d , %d)-(%d , %d)\n", tafifo_buff[4], tafifo_buff[5], tafifo_buff[6], tafifo_buff[7]);
462         #endif
463      }
464      else if (state_ta.paratype == 2)
465      { // object list set
466         #if DEBUG_PVRDLIST
467         mame_printf_verbose("Para Type 2 Object List Set at %08x\n", tafifo_buff[1]);
468         mame_printf_verbose(" (%d , %d)-(%d , %d)\n", tafifo_buff[4], tafifo_buff[5], tafifo_buff[6], tafifo_buff[7]);
469         #endif
470      }
471      else if (state_ta.paratype == 3)
472      {
473         #if DEBUG_PVRDLIST
474         mame_printf_verbose("Para Type %x Unknown!\n", tafifo_buff[0]);
475         #endif
476      }
477      else
478      { // global parameter or vertex parameter
479         #if DEBUG_PVRDLIST
480         mame_printf_verbose("Para Type %d", state_ta.paratype);
481         if (state_ta.paratype == 7)
482            mame_printf_verbose(" End of Strip %d", state_ta.endofstrip);
483         if (state_ta.listtype_used & 3)
484            mame_printf_verbose(" List Type %d", state_ta.listtype);
485         mame_printf_verbose("\n");
486         #endif
487
488         // set type of list currently being recieved
489         if ((state_ta.paratype == 4) || (state_ta.paratype == 5) || (state_ta.paratype == 6))
606         else if (state_ta.global_paratype == 5)
490607         {
491            if (state_ta.tafifo_listtype < 0)
492            {
493               state_ta.tafifo_listtype = state_ta.listtype;
494            }
495         }
496         state_ta.listtype_used = state_ta.listtype_used ^ (state_ta.listtype_used & 3);
497
498         if ((state_ta.paratype == 4) || (state_ta.paratype == 5))
499         { // quad or polygon
500            state_ta.depthcomparemode=(tafifo_buff[1] >> 29) & 7;
501            state_ta.cullingmode=(tafifo_buff[1] >> 27) & 3;
502            state_ta.zwritedisable=(tafifo_buff[1] >> 26) & 1;
503            state_ta.cachebypass=(tafifo_buff[1] >> 21) & 1;
504            state_ta.dcalcctrl=(tafifo_buff[1] >> 20) & 1;
505            state_ta.volumeinstruction=(tafifo_buff[1] >> 29) & 7;
506            state_ta.textureusize=1 << (3+((tafifo_buff[2] >> 3) & 7));
507            state_ta.texturevsize=1 << (3+(tafifo_buff[2] & 7));
508            state_ta.texturesizes=tafifo_buff[2] & 0x3f;
509            state_ta.srcalphainstr=(tafifo_buff[2] >> 29) & 7;
510            state_ta.dstalphainstr=(tafifo_buff[2] >> 26) & 7;
511            state_ta.srcselect=(tafifo_buff[2] >> 25) & 1;
512            state_ta.dstselect=(tafifo_buff[2] >> 24) & 1;
513            state_ta.fogcontrol=(tafifo_buff[2] >> 22) & 3;
514            state_ta.colorclamp=(tafifo_buff[2] >> 21) & 1;
515            state_ta.usealpha=(tafifo_buff[2] >> 20) & 1;
516            state_ta.ignoretexalpha=(tafifo_buff[2] >> 19) & 1;
517            state_ta.flipuv=(tafifo_buff[2] >> 17) & 3;
518            state_ta.clampuv=(tafifo_buff[2] >> 15) & 3;
519            state_ta.filtermode=(tafifo_buff[2] >> 13) & 3;
520            state_ta.sstexture=(tafifo_buff[2] >> 12) & 1;
521            state_ta.mmdadjust=(tafifo_buff[2] >> 8) & 1;
522            state_ta.tsinstruction=(tafifo_buff[2] >> 6) & 3;
608            #if DEBUG_PVRDLIST
609            mame_printf_verbose(" Vertex sprite");
610            mame_printf_verbose(" A(%f,%f,%f) B(%f,%f,%f) C(%f,%f,%f) D(%f,%f,)", u2f(tafifo_buff[1]), u2f(tafifo_buff[2]),
611               u2f(tafifo_buff[3]), u2f(tafifo_buff[4]), u2f(tafifo_buff[5]), u2f(tafifo_buff[6]), u2f(tafifo_buff[7]),
612               u2f(tafifo_buff[8]), u2f(tafifo_buff[9]), u2f(tafifo_buff[10]), u2f(tafifo_buff[11]));
613            mame_printf_verbose("\n");
614            #endif
523615            if (state_ta.texture == 1)
524616            {
525               state_ta.textureaddress=(tafifo_buff[3] & 0x1FFFFF) << 3;
526               state_ta.scanorder=(tafifo_buff[3] >> 26) & 1;
527               state_ta.pixelformat=(tafifo_buff[3] >> 27) & 7;
528               state_ta.mipmapped=(tafifo_buff[3] >> 31) & 1;
529               state_ta.vqcompressed=(tafifo_buff[3] >> 30) & 1;
530               state_ta.strideselect=(tafifo_buff[3] >> 25) & 1;
531               state_ta.paletteselector=(tafifo_buff[3] >> 21) & 0x3F;
532617               #if DEBUG_PVRDLIST
533               mame_printf_verbose(" Texture %d x %d at %08x format %d\n", state_ta.textureusize, state_ta.texturevsize, (tafifo_buff[3] & 0x1FFFFF) << 3, state_ta.pixelformat);
618               mame_printf_verbose(" A(%f,%f) B(%f,%f) C(%f,%f)\n",u2f(tafifo_buff[13] & 0xffff0000),u2f((tafifo_buff[13] & 0xffff) << 16),u2f(tafifo_buff[14] & 0xffff0000),u2f((tafifo_buff[14] & 0xffff) << 16),u2f(tafifo_buff[15] & 0xffff0000),u2f((tafifo_buff[15] & 0xffff) << 16));
534619               #endif
620
621               /* add a sprite to our 'test sprites' list */
622               /* sprites are used for the Naomi Bios logo + text for example */
623               /* -- this is wildly inaccurate! */
624               testsprites* testsprite = &state_ta.grab[state_ta.grabsel].showsprites[state_ta.grab[state_ta.grabsel].testsprites_size];
625
626               /* Sprite Type 1 (for Sprite)
627                     0x00 Parameter Control Word (see above)
628                     0x04 A.X
629                     0x08 A.Y
630                     0x0C A.Z
631                     0x10 B.X
632                     0x14 B.Y
633                     0x18 B.Z
634                     0x1C C.X
635                     0x20 C.Y
636                     0x24 C.Z
637                     0x28 D.X
638                     0x2C D.Y
639                     0x30 (ignored) D.Z is calculated from the Plane Equation
640                     0x34 AU/AV (16-bits each)
641                     0x38 BU/BV (16-bits each)
642                     0x3C CU/CV  (16-bits each)
643
644                     note: DU/DV is calculated, not specified
645                    */
646
647               testsprite->a.x = u2f(tafifo_buff[0x04/4]);
648               testsprite->a.y = u2f(tafifo_buff[0x08/4]);
649               testsprite->a.z = u2f(tafifo_buff[0x0c/4]);
650               testsprite->b.x = u2f(tafifo_buff[0x10/4]);
651               testsprite->b.y = u2f(tafifo_buff[0x14/4]);
652               testsprite->b.z = u2f(tafifo_buff[0x18/4]);
653               testsprite->c.x = u2f(tafifo_buff[0x1c/4]);
654               testsprite->c.y = u2f(tafifo_buff[0x20/4]);
655               testsprite->c.z = u2f(tafifo_buff[0x24/4]);
656
657               testsprite->d.x = u2f(tafifo_buff[0x28/4]);
658               testsprite->d.y = u2f(tafifo_buff[0x2c/4]);
659               testsprite->d.z = 0.0f;// calculated
660
661               testsprite->a.u = u2f( (tafifo_buff[0x34/4]&0xffff0000) );
662               testsprite->a.v = u2f( (tafifo_buff[0x34/4]&0x0000ffff)<<16);
663               testsprite->b.u = u2f( (tafifo_buff[0x38/4]&0xffff0000) );
664               testsprite->b.v = u2f( (tafifo_buff[0x38/4]&0x0000ffff)<<16);
665               testsprite->c.u = u2f( (tafifo_buff[0x3c/4]&0xffff0000) );
666               testsprite->c.v = u2f( (tafifo_buff[0x3c/4]&0x0000ffff)<<16);
667               testsprite->d.u = 0.0f;// calculated
668               testsprite->d.v = 0.0f;// calculated
669
670               /*
671                    printf("Sending a sprite with\n%f %f %f - %f %f\n %f %f %f - %f %f\n%f %f %f - %f %f\n%f %f %f - %f %f\n",
672                    testsprite->a.x, testsprite->a.y, testsprite->a.z, testsprite->a.u, testsprite->a.v,
673                    testsprite->b.x, testsprite->b.y, testsprite->b.z, testsprite->b.u, testsprite->b.v,
674                    testsprite->c.x, testsprite->c.y, testsprite->c.z, testsprite->c.u, testsprite->c.v,
675                    testsprite->d.x, testsprite->d.y, testsprite->d.z, testsprite->d.u, testsprite->d.v);
676                    */
677
678               /*
679                    horizontal test mode
680                    224.000000 224.000000 999.999939 - 0.000000 0.609375
681                    232.000000 224.000000 999.999939 - 1.000000 0.609375
682                    232.000000 232.000000 999.999939 - 1.000000 0.617188
683                    224.000000 232.000000
684                    should calculate      999.999939 - 0.000000 0.617188
685
686
687                    vertical test mode
688                      8.000000 184.000000 999.999939 - 0.000000 0.617188
689                     16.000000 184.000000 999.999939 - 0.000000 0.609375
690                     16.000000 192.000000 999.999939 - 1.000000 0.609375
691                      8.000000 192.000000
692                    should calculate      999.999939 - 1.000000 0.617188
693                    */
694
695               // old code, used for the test drawing
696               testsprite->positionx=testsprite->a.x;
697               testsprite->positiony=testsprite->a.y;
698               testsprite->sizex=u2f(tafifo_buff[4])-u2f(tafifo_buff[1]);
699               testsprite->sizey=u2f(tafifo_buff[8])-u2f(tafifo_buff[2]);
700               testsprite->u=u2f(tafifo_buff[13] & 0xffff0000);
701               testsprite->v=u2f((tafifo_buff[13] & 0xffff) << 16);
702               testsprite->du=u2f(tafifo_buff[14] & 0xffff0000)-testsprite->u;
703               testsprite->dv=u2f((tafifo_buff[15] & 0xffff) << 16)-testsprite->v;
704               testsprite->textureaddress=state_ta.textureaddress;
705               testsprite->texturesizex=state_ta.textureusize;
706               testsprite->texturesizey=state_ta.texturevsize;
707               testsprite->texturemode=state_ta.scanorder+state_ta.vqcompressed*2;
708               testsprite->texturesizes=state_ta.texturesizes;
709               testsprite->texturepf=state_ta.pixelformat;
710               testsprite->texturepalette=state_ta.paletteselector;
711
712               state_ta.grab[state_ta.grabsel].testsprites_size++;
535713            }
536            if (state_ta.paratype == 4)
537            { // polygon or mv
538               if ((state_ta.tafifo_listtype == 1) || (state_ta.tafifo_listtype == 3))
539               {
540               #if DEBUG_PVRDLIST
541                  mame_printf_verbose(" Modifier Volume\n");
542               #endif
543               }
544               else
545               {
546               #if DEBUG_PVRDLIST
547                  mame_printf_verbose(" Polygon\n");
548               #endif
549               }
550            }
551            if (state_ta.paratype == 5)
552            { // quad
553               #if DEBUG_PVRDLIST
554               mame_printf_verbose(" Sprite\n");
555               #endif
556            }
557714         }
715         else if (state_ta.global_paratype == 4)
716         {
717            #if DEBUG_PVRDLIST
718            mame_printf_verbose(" Vertex polygon");
719            mame_printf_verbose(" V(%f,%f,%f)", u2f(tafifo_buff[1]), u2f(tafifo_buff[2]), u2f(tafifo_buff[3]));
720            mame_printf_verbose("\n");
721            #endif
722#if DEBUG_VERTICES
723            if (state_ta.grab[state_ta.grabsel].testvertices_size <= 65530)
724            {
725               /* add a vertex to our 'testverticies' list */
726               /* this is used for 3d stuff, ie most of the graphics (see guilty gear, confidential mission, maze of the kings etc.) */
727               /* -- this is also wildly inaccurate! */
728               testvertices* testvertex = &state_ta.grab[state_ta.grabsel].showvertices[state_ta.grab[state_ta.grabsel].testvertices_size];
558729
559         if (state_ta.paratype == 7)
560         { // vertex
561            if ((state_ta.tafifo_listtype == 1) || (state_ta.tafifo_listtype == 3))
562            {
563               #if DEBUG_PVRDLIST
564               mame_printf_verbose(" Vertex modifier volume");
565               mame_printf_verbose(" A(%f,%f,%f) B(%f,%f,%f) C(%f,%f,%f)", u2f(tafifo_buff[1]), u2f(tafifo_buff[2]),
566                  u2f(tafifo_buff[3]), u2f(tafifo_buff[4]), u2f(tafifo_buff[5]), u2f(tafifo_buff[6]), u2f(tafifo_buff[7]),
567                  u2f(tafifo_buff[8]), u2f(tafifo_buff[9]));
568               mame_printf_verbose("\n");
569               #endif
730               testvertex->x=u2f(tafifo_buff[1]);
731               testvertex->y=u2f(tafifo_buff[2]);
732               testvertex->endofstrip=state_ta.endofstrip;
570733            }
571            else if (state_ta.global_paratype == 5)
572            {
573               #if DEBUG_PVRDLIST
574               mame_printf_verbose(" Vertex sprite");
575               mame_printf_verbose(" A(%f,%f,%f) B(%f,%f,%f) C(%f,%f,%f) D(%f,%f,)", u2f(tafifo_buff[1]), u2f(tafifo_buff[2]),
576                  u2f(tafifo_buff[3]), u2f(tafifo_buff[4]), u2f(tafifo_buff[5]), u2f(tafifo_buff[6]), u2f(tafifo_buff[7]),
577                  u2f(tafifo_buff[8]), u2f(tafifo_buff[9]), u2f(tafifo_buff[10]), u2f(tafifo_buff[11]));
578               mame_printf_verbose("\n");
579               #endif
580               if (state_ta.texture == 1)
581               {
582                  #if DEBUG_PVRDLIST
583                  mame_printf_verbose(" A(%f,%f) B(%f,%f) C(%f,%f)\n",u2f(tafifo_buff[13] & 0xffff0000),u2f((tafifo_buff[13] & 0xffff) << 16),u2f(tafifo_buff[14] & 0xffff0000),u2f((tafifo_buff[14] & 0xffff) << 16),u2f(tafifo_buff[15] & 0xffff0000),u2f((tafifo_buff[15] & 0xffff) << 16));
584                  #endif
585/* test video start */
586                  state_ta.grab[state_ta.grabsel].showsprites[state_ta.grab[state_ta.grabsel].testsprites_size].positionx=u2f(tafifo_buff[1]);
587                  state_ta.grab[state_ta.grabsel].showsprites[state_ta.grab[state_ta.grabsel].testsprites_size].positiony=u2f(tafifo_buff[2]);
588                  state_ta.grab[state_ta.grabsel].showsprites[state_ta.grab[state_ta.grabsel].testsprites_size].sizex=u2f(tafifo_buff[4])-u2f(tafifo_buff[1]);
589                  state_ta.grab[state_ta.grabsel].showsprites[state_ta.grab[state_ta.grabsel].testsprites_size].sizey=u2f(tafifo_buff[8])-u2f(tafifo_buff[2]);
590                  state_ta.grab[state_ta.grabsel].showsprites[state_ta.grab[state_ta.grabsel].testsprites_size].u=u2f(tafifo_buff[13] & 0xffff0000);
591                  state_ta.grab[state_ta.grabsel].showsprites[state_ta.grab[state_ta.grabsel].testsprites_size].v=u2f((tafifo_buff[13] & 0xffff) << 16);
592                  state_ta.grab[state_ta.grabsel].showsprites[state_ta.grab[state_ta.grabsel].testsprites_size].du=u2f(tafifo_buff[14] & 0xffff0000)-state_ta.grab[state_ta.grabsel].showsprites[state_ta.grab[state_ta.grabsel].testsprites_size].u;
593                  state_ta.grab[state_ta.grabsel].showsprites[state_ta.grab[state_ta.grabsel].testsprites_size].dv=u2f((tafifo_buff[15] & 0xffff) << 16)-state_ta.grab[state_ta.grabsel].showsprites[state_ta.grab[state_ta.grabsel].testsprites_size].v;
594                  state_ta.grab[state_ta.grabsel].showsprites[state_ta.grab[state_ta.grabsel].testsprites_size].textureaddress=state_ta.textureaddress;
595                  state_ta.grab[state_ta.grabsel].showsprites[state_ta.grab[state_ta.grabsel].testsprites_size].texturesizex=state_ta.textureusize;
596                  state_ta.grab[state_ta.grabsel].showsprites[state_ta.grab[state_ta.grabsel].testsprites_size].texturesizey=state_ta.texturevsize;
597                  state_ta.grab[state_ta.grabsel].showsprites[state_ta.grab[state_ta.grabsel].testsprites_size].texturemode=state_ta.scanorder+state_ta.vqcompressed*2;
598                  state_ta.grab[state_ta.grabsel].showsprites[state_ta.grab[state_ta.grabsel].testsprites_size].texturesizes=state_ta.texturesizes;
599                  state_ta.grab[state_ta.grabsel].showsprites[state_ta.grab[state_ta.grabsel].testsprites_size].texturepf=state_ta.pixelformat;
600                  state_ta.grab[state_ta.grabsel].showsprites[state_ta.grab[state_ta.grabsel].testsprites_size].texturepalette=state_ta.paletteselector;
601                  state_ta.grab[state_ta.grabsel].testsprites_size=state_ta.grab[state_ta.grabsel].testsprites_size+1;
602/* test video end */
603               }
604            }
605            else if (state_ta.global_paratype == 4)
606            {
607               #if DEBUG_PVRDLIST
608               mame_printf_verbose(" Vertex polygon");
609               mame_printf_verbose(" V(%f,%f,%f)", u2f(tafifo_buff[1]), u2f(tafifo_buff[2]), u2f(tafifo_buff[3]));
610               mame_printf_verbose("\n");
611               #endif
612#if DEBUG_VERTICES
613               if (state_ta.grab[state_ta.grabsel].testvertices_size <= 65530)
614               {
615                  state_ta.grab[state_ta.grabsel].showvertices[state_ta.grab[state_ta.grabsel].testvertices_size].x=u2f(tafifo_buff[1]);
616                  state_ta.grab[state_ta.grabsel].showvertices[state_ta.grab[state_ta.grabsel].testvertices_size].y=u2f(tafifo_buff[2]);
617                  state_ta.grab[state_ta.grabsel].showvertices[state_ta.grab[state_ta.grabsel].testvertices_size].endofstrip=state_ta.endofstrip;
618               }
619               state_ta.grab[state_ta.grabsel].testvertices_size=state_ta.grab[state_ta.grabsel].testvertices_size+1;
734            state_ta.grab[state_ta.grabsel].testvertices_size++;
620735#endif
621            }
622736         }
623737      }
624   } // if (state_ta.tafifo_pos == 0)
738   }
625739}
626740
741WRITE64_HANDLER( ta_fifo_poly_w )
742{
743
744   if (mem_mask == U64(0xffffffffffffffff))    // 64 bit
745   {
746      tafifo_buff[state_ta.tafifo_pos]=(UINT32)data;
747      tafifo_buff[state_ta.tafifo_pos+1]=(UINT32)(data >> 32);
748      #if DEBUG_FIFO_POLY
749      mame_printf_debug("ta_fifo_poly_w:  Unmapped write64 %08x = %llx -> %08x %08x\n", 0x10000000+offset*8, data, tafifo_buff[state_ta.tafifo_pos], tafifo_buff[state_ta.tafifo_pos+1]);
750      #endif
751      state_ta.tafifo_pos += 2;
752   }
753   else
754   {
755      fatalerror("ta_fifo_poly_w:  Only 64 bit writes supported!\n");
756   }
757
758   state_ta.tafifo_pos &= state_ta.tafifo_mask;
759
760   // if the command is complete, process it
761   if (state_ta.tafifo_pos == 0)
762      process_ta_fifo(space->machine);
763
764}
765
627766WRITE64_HANDLER( ta_fifo_yuv_w )
628767{
629768   int reg;
r4441r4442
744883}
745884#endif
746885
886/// !!
887
747888static void testdrawscreen(const running_machine *machine,bitmap_t *bitmap,const rectangle *cliprect)
748889{
890
749891   const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM);
750892   int cs,x,y,dx,dy,xi,yi,a,rs,ns;
751893   float iu,iv,u,v;
r4441r4442
759901   UINT32 k;
760902#endif
761903
904
762905   if (state_ta.renderselect < 0)
763906      return;
907
908   //printf("drawtest!\n");
909
764910   rs=state_ta.renderselect;
765911   c=pvrta_regs[ISP_BACKGND_T];
766912   c=memory_read_dword(space,0x05000000+((c&0xfffff8)>>1)+(3+3)*4);
r4441r4442
9681114#endif
9691115}
9701116
1117#if 0
9711118static void testdrawscreenframebuffer(bitmap_t *bitmap,const rectangle *cliprect)
9721119{
9731120   int x,y,dy,xi;
r4441r4442
9901137      }
9911138   }
9921139}
1140#endif
1141
1142#if DEBUG_PALRAM
1143static void debug_paletteram(running_machine *machine)
1144{
1145   UINT64 pal;
1146   UINT32 r,g,b;
1147   int i;
1148
1149   //popmessage("%02x",pvrta_regs[PAL_RAM_CTRL]);
1150
1151   for(i=0;i<0x400;i++)
1152   {
1153      pal = pvrta_regs[((0x005F9000-0x005F8000)/4)+i];
1154      switch(pvrta_regs[PAL_RAM_CTRL])
1155      {
1156         case 0: //argb1555 <- guilty gear uses this mode
1157         {
1158            //a = (pal & 0x8000)>>15;
1159            r = (pal & 0x7c00)>>10;
1160            g = (pal & 0x03e0)>>5;
1161            b = (pal & 0x001f)>>0;
1162            //a = a ? 0xff : 0x00;
1163            palette_set_color_rgb(machine, i, pal5bit(r), pal5bit(g), pal5bit(b));
1164         }
1165         break;
1166         case 1: //rgb565
1167         {
1168            //a = 0xff;
1169            r = (pal & 0xf800)>>11;
1170            g = (pal & 0x07e0)>>5;
1171            b = (pal & 0x001f)>>0;
1172            palette_set_color_rgb(machine, i, pal5bit(r), pal6bit(g), pal5bit(b));
1173         }
1174         break;
1175         case 2: //argb4444
1176         {
1177            //a = (pal & 0xf000)>>12;
1178            r = (pal & 0x0f00)>>8;
1179            g = (pal & 0x00f0)>>4;
1180            b = (pal & 0x000f)>>0;
1181            palette_set_color_rgb(machine, i, pal4bit(r), pal4bit(g), pal4bit(b));
1182         }
1183         break;
1184         case 3: //argb8888
1185         {
1186            //a = (pal & 0xff000000)>>20;
1187            r = (pal & 0x00ff0000)>>16;
1188            g = (pal & 0x0000ff00)>>8;
1189            b = (pal & 0x000000ff)>>0;
1190            palette_set_color_rgb(machine, i, r, g, b);
1191         }
1192         break;
1193      }
1194   }
1195}
1196#endif
1197
9931198/* test video end */
9941199
9951200static void pvr_build_parameterconfig(void)
r4441r4442
10241229
10251230static TIMER_CALLBACK(vbout)
10261231{
1027UINT32 a;
10281232
1233   UINT32 a;
1234   //printf("vbout\n");
1235
10291236   a=dc_sysctrl_regs[SB_ISTNRM] | IST_VBL_OUT;
10301237   dc_sysctrl_regs[SB_ISTNRM] = a; // V Blank-out interrupt
10311238   dc_update_interrupt_status(machine);
r4441r4442
10331240   timer_adjust_oneshot(vbout_timer, attotime_never, 0);
10341241}
10351242
1243// moved, interrupts should never be changed in a VIDEO_UDPATE call!!
1244static TIMER_CALLBACK(endofrender)
1245{
1246   UINT32 a;
1247
1248   //printf("endofrender\n");
1249
1250   // don't know if this is right.. but we get asserts otherwise, timing error?
1251   if (state_ta.start_render_received == 1)
1252   {
1253      for (a=0;a < NUM_BUFFERS;a++)
1254         if (state_ta.grab[a].busy == 1)
1255            state_ta.grab[a].busy = 0;
1256      state_ta.start_render_received = 0;
1257   }
1258
1259   state_ta.start_render_received=0;
1260   state_ta.renderselect= -1;
1261   dc_sysctrl_regs[SB_ISTNRM] |= IST_EOR_TSP;   // TSP end of render
1262   dc_update_interrupt_status(machine);
1263
1264   timer_adjust_oneshot(endofrender_timer, attotime_never, 0);
1265
1266
1267}
1268
1269
10361270VIDEO_START(dc)
10371271{
10381272   memset(pvrctrl_regs, 0, sizeof(pvrctrl_regs));
r4441r4442
10571291
10581292   vbout_timer = timer_alloc(machine, vbout, 0);
10591293   timer_adjust_oneshot(vbout_timer, attotime_never, 0);
1294
1295   endofrender_timer = timer_alloc(machine, endofrender, 0);
1296   timer_adjust_oneshot(endofrender_timer, attotime_never, 0);
1297
1298   fakeframebuffer_bitmap = auto_bitmap_alloc(1024,1024,BITMAP_FORMAT_RGB32);
1299
1300
10601301}
10611302
10621303VIDEO_UPDATE(dc)
10631304{
1064static int useframebuffer=1;
1305   /******************
1306      MAME note
1307    *******************
10651308
1066   if ((useframebuffer) && !state_ta.start_render_received)
1309    The video update function should NOT be generating interrupts, setting timers or doing _anything_ the game might be able to detect
1310    as it will be called at different times depending on frameskip etc.
1311
1312    Rendering should happen when the hardware requests it, to the framebuffer(s)
1313
1314    Everything else should depend on timers.
1315
1316    ******************/
1317
1318//  static int useframebuffer=1;
1319   const rectangle *visarea = video_screen_get_visible_area(screen);
1320   int y,x;
1321   //printf("videoupdate\n");
1322
1323#if DEBUG_PALRAM
1324   debug_paletteram(screen->machine);
1325#endif
1326
1327   // copy our fake framebuffer bitmap (where things have been rendered) to the screen
1328   for (y = visarea->min_y ; y < visarea->max_y ; y++)
10671329   {
1068      if (pvrta_regs[VO_CONTROL] & (1 << 3))
1069         bitmap_fill(bitmap,cliprect,pvrta_regs[VO_BORDER_COL] & 0xFFFFFF);
1070      else
1071         testdrawscreenframebuffer(bitmap,cliprect);
1072      return 0;
1330      for (x = visarea->min_x ; x < visarea->max_x ; x++)
1331      {
1332         UINT32* src = BITMAP_ADDR32(fakeframebuffer_bitmap, y, x);
1333         UINT32* dst = BITMAP_ADDR32(bitmap, y, x);
1334         dst[0] = src[0];
1335      }
10731336   }
10741337
1075   if (state_ta.start_render_received)
1076   {
1077      useframebuffer=0;
1078      testdrawscreen(screen->machine,bitmap,cliprect);
1079      if (pvrta_regs[VO_CONTROL] & (1 << 3))
1080         bitmap_fill(bitmap,cliprect,pvrta_regs[VO_BORDER_COL] & 0xFFFFFF);
1081      state_ta.start_render_received=0;
1082      state_ta.renderselect= -1;
1083      dc_sysctrl_regs[SB_ISTNRM] |= IST_EOR_TSP;   // TSP end of render
1084      dc_update_interrupt_status(screen->machine);
1085      return 0;
1086   }
1087   else
1088      return 1;
1338   return 0;
10891339}
10901340
10911341void dc_vblank(running_machine *machine)
10921342{
1343   //printf("vblankin\n");
1344
10931345   dc_sysctrl_regs[SB_ISTNRM] |= IST_VBL_IN; // V Blank-in interrupt
10941346   dc_update_interrupt_status(machine);
10951347
src/mame/video/nemesis.c
r4441r4442
88#include "includes/nemesis.h"
99
1010
11UINT16 *nemesis_videoram1b;
12UINT16 *nemesis_videoram2b;
13UINT16 *nemesis_videoram1f;
14UINT16 *nemesis_videoram2f;
15
11UINT16 *nemesis_videoram1;
12UINT16 *nemesis_videoram2;
13UINT16 *nemesis_colorram1;
14UINT16 *nemesis_colorram2;
1615UINT16 *nemesis_characterram;
1716size_t nemesis_characterram_size;
18UINT16 *nemesis_xscroll1,*nemesis_xscroll2,*nemesis_yscroll;
19UINT16 *nemesis_yscroll1,*nemesis_yscroll2;
17UINT16 *nemesis_xscroll1, *nemesis_xscroll2;
18UINT16 *nemesis_yscroll1, *nemesis_yscroll2;
2019
2120static int spriteram_words;
2221static int tilemap_flip;
2322static int flipscreen;
23static UINT8 irq_port_last;
2424
2525static tilemap *background, *foreground;
2626
r4441r4442
3838
3939static UINT8 blank_tile[8*8];
4040
41
4142static TILE_GET_INFO( get_bg_tile_info )
4243{
43   int code,color,flags;
44   code = nemesis_videoram1f[tile_index];
45   color = nemesis_videoram2f[tile_index];
44   int code,color,flags,mask,layer;
45
46   code = nemesis_videoram2[tile_index];
47   color = nemesis_colorram2[tile_index];
4648   flags = 0;
47   if ( color & 0x80)  flags |= TILE_FLIPX;
48   if ( code & 0x0800) flags |= TILE_FLIPY;
49
50   if (color & 0x80) flags |= TILE_FLIPX;
51   if (code & 0x0800) flags |= TILE_FLIPY;
4952   if ((~code & 0x2000) || ((code & 0xc000) == 0x4000))
50       flags |= TILE_FORCE_LAYER0;
53       flags |= TILE_FORCE_LAYER0;      /* no transparency */
5154   if (code & 0xf800) {
52      SET_TILE_INFO( 0, code&0x7ff, color&0x7f, flags );
55      SET_TILE_INFO( 0, code & 0x7ff, color & 0x7f, flags );
5356   } else {
5457      SET_TILE_INFO( 0, 0, 0x00, 0 );
5558      tileinfo->pen_data = blank_tile;
5659   }
57   tileinfo->category = (code & 0x1000)>>12;
60
61   mask = (code & 0x1000) >> 12;
62   layer = (code & 0x4000) >> 14;
63   if (mask && !layer)
64      layer = 1;
65
66   tileinfo->category = mask | (layer << 1);
5867}
5968
6069static TILE_GET_INFO( get_fg_tile_info )
6170{
62   int code,color,flags;
63   code = nemesis_videoram1b[tile_index];
64   color = nemesis_videoram2b[tile_index];
71   int code,color,flags,mask,layer;
72
73   code = nemesis_videoram1[tile_index];
74   color = nemesis_colorram1[tile_index];
6575   flags = 0;
66   if ( color & 0x80)  flags |= TILE_FLIPX;
67   if ( code & 0x0800) flags |= TILE_FLIPY;
76
77   if (color & 0x80) flags |= TILE_FLIPX;
78   if (code & 0x0800) flags |= TILE_FLIPY;
6879   if ((~code & 0x2000) || ((code & 0xc000) == 0x4000))
69       flags |= TILE_FORCE_LAYER0;
80       flags |= TILE_FORCE_LAYER0;      /* no transparency */
7081   if (code & 0xf800) {
71      SET_TILE_INFO( 0, code&0x7ff, color&0x7f, flags );
82      SET_TILE_INFO( 0, code & 0x7ff, color & 0x7f, flags );
7283   } else {
7384      SET_TILE_INFO( 0, 0, 0x00, 0 );
7485      tileinfo->pen_data = blank_tile;
7586   }
76   tileinfo->category = (code & 0x1000)>>12;
87
88   mask = (code & 0x1000) >> 12;
89   layer = (code & 0x4000) >> 14;
90   if (mask && !layer)
91      layer = 1;
92
93   tileinfo->category = mask | (layer << 1);
7794}
7895
79WRITE16_HANDLER( nemesis_gfx_flipx_w )
96
97WRITE16_HANDLER( nemesis_gfx_flipx_word_w )
8098{
8199   if (ACCESSING_BITS_0_7)
82100   {
83101      flipscreen = data & 0x01;
84      if (flipscreen)
102
103      if (data & 0x01)
85104         tilemap_flip |= TILEMAP_FLIPX;
86105      else
87106         tilemap_flip &= ~TILEMAP_FLIPX;
88107
89108      tilemap_set_flip(ALL_TILEMAPS, tilemap_flip);
90109   }
91   else
110
111   if (ACCESSING_BITS_8_15)
92112   {
93      if (data & 0x100)
113      if (data & 0x0100)
94114         cpu_set_input_line_and_vector(space->machine->cpu[1], 0, HOLD_LINE, 0xff);
95115   }
96116}
97117
98WRITE16_HANDLER( nemesis_gfx_flipy_w )
118WRITE16_HANDLER( nemesis_gfx_flipy_word_w )
99119{
100120   if (ACCESSING_BITS_0_7)
101121   {
r4441r4442
108128   }
109129}
110130
131
132WRITE16_HANDLER( salamand_control_port_word_w )
133{
134   if (ACCESSING_BITS_0_7)
135   {
136      UINT8 accessing_bits = data ^ irq_port_last;
137
138      nemesis_irq_on = data & 0x01;
139      nemesis_irq2_on = data & 0x02;
140      flipscreen = data & 0x04;
141
142      if (data & 0x04)
143         tilemap_flip |= TILEMAP_FLIPX;
144      else
145         tilemap_flip &= ~TILEMAP_FLIPX;
146
147      if (data & 0x08)
148         tilemap_flip |= TILEMAP_FLIPY;
149      else
150         tilemap_flip &= ~TILEMAP_FLIPY;
151
152      if (accessing_bits & 0x0c)
153         tilemap_set_flip(ALL_TILEMAPS, tilemap_flip);
154
155      irq_port_last = data;
156   }
157
158   if (ACCESSING_BITS_8_15)
159   {
160      coin_lockout_w(0, data & 0x0200);
161      coin_lockout_w(1, data & 0x0400);
162
163      if (data & 0x0800)
164         cpu_set_input_line(space->machine->cpu[1], 0, HOLD_LINE);
165
166      hcrash_selected_ip = (~data & 0x1000) >> 12;      /* citybomb steering & accel */
167   }
168}
169
170
111171WRITE16_HANDLER( nemesis_palette_word_w )
112172{
113173   int r,g,b,bit1,bit2,bit3,bit4,bit5;
r4441r4442
133193   bit4=(data >>  3)&1;
134194   bit5=(data >>  4)&1;
135195   r = MULTIPLIER;
196   r = pow (r/255.0, 2)*255;
136197   bit1=(data >>  5)&1;
137198   bit2=(data >>  6)&1;
138199   bit3=(data >>  7)&1;
139200   bit4=(data >>  8)&1;
140201   bit5=(data >>  9)&1;
141202   g = MULTIPLIER;
203   g = pow (g/255.0, 2)*255;
142204   bit1=(data >>  10)&1;
143205   bit2=(data >>  11)&1;
144206   bit3=(data >>  12)&1;
145207   bit4=(data >>  13)&1;
146208   bit5=(data >>  14)&1;
147209   b = MULTIPLIER;
210   b = pow (b/255.0, 2)*255;
148211
149212   palette_set_color(space->machine,offset,MAKE_RGB(r,g,b));
150213}
r4441r4442
158221   palette_set_color_rgb(space->machine,offset / 2,pal5bit(data >> 0),pal5bit(data >> 5),pal5bit(data >> 10));
159222}
160223
161WRITE16_HANDLER( nemesis_videoram1b_word_w )
224
225WRITE16_HANDLER( nemesis_videoram1_word_w )
162226{
163   COMBINE_DATA(nemesis_videoram1b + offset);
164   tilemap_mark_tile_dirty( foreground,offset );
227   COMBINE_DATA(nemesis_videoram1 + offset);
228   tilemap_mark_tile_dirty( foreground, offset );
165229}
166WRITE16_HANDLER( nemesis_videoram1f_word_w )
230
231WRITE16_HANDLER( nemesis_videoram2_word_w )
167232{
168   COMBINE_DATA(nemesis_videoram1f + offset);
169   tilemap_mark_tile_dirty( background,offset );
233   COMBINE_DATA(nemesis_videoram2 + offset);
234   tilemap_mark_tile_dirty( background, offset );
170235}
171236
172WRITE16_HANDLER( nemesis_videoram2b_word_w )
237WRITE16_HANDLER( nemesis_colorram1_word_w )
173238{
174   COMBINE_DATA(nemesis_videoram2b + offset);
175   tilemap_mark_tile_dirty( foreground,offset );
239   COMBINE_DATA(nemesis_colorram1 + offset);
240   tilemap_mark_tile_dirty( foreground, offset );
176241}
177WRITE16_HANDLER( nemesis_videoram2f_word_w )
242
243WRITE16_HANDLER( nemesis_colorram2_word_w )
178244{
179   COMBINE_DATA(nemesis_videoram2f + offset);
180   tilemap_mark_tile_dirty( background,offset );
245   COMBINE_DATA(nemesis_colorram2 + offset);
246   tilemap_mark_tile_dirty( background, offset );
181247}
182248
183249
r4441r4442
201267}
202268
203269
270static STATE_POSTLOAD( nemesis_postload )
271{
272   int i,offs;
273
274   for (offs=0; offs<nemesis_characterram_size; offs++)
275   {
276      for (i=0; i<8; i++)
277      {
278         int w = sprite_data[i].width;
279         int h = sprite_data[i].height;
280         gfx_element_mark_dirty(machine->gfx[sprite_data[i].char_type], offs * 4 / (w * h));
281      }
282   }
283   tilemap_mark_all_tiles_dirty(background);
284   tilemap_mark_all_tiles_dirty(foreground);
285}
286
287
204288/* claim a palette dirty array */
205289VIDEO_START( nemesis )
206290{
r4441r4442
217301   tilemap_set_scroll_rows( background, 256 );
218302   tilemap_set_scroll_rows( foreground, 256 );
219303
220   memset(nemesis_characterram,0,nemesis_characterram_size);
304   memset(nemesis_characterram, 0, nemesis_characterram_size);
221305
222306   gfx_element_set_source(machine->gfx[0], (UINT8 *)nemesis_characterram);
223307   gfx_element_set_source(machine->gfx[1], (UINT8 *)nemesis_characterram);
r4441r4442
230314
231315   flipscreen = 0;
232316   tilemap_flip = 0;
317   irq_port_last = 0;
318
319   /* Set up save state */
320   state_save_register_global(machine, spriteram_words);
321   state_save_register_global(machine, tilemap_flip);
322   state_save_register_global(machine, flipscreen);
323   state_save_register_global(machine, irq_port_last);
324   state_save_register_postload(machine, nemesis_postload, NULL);
233325}
234326
327
235328static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
236329{
237330   /*
r4441r4442
276369
277370         if (zoom != 0xFF || code!=0)
278371         {
279            size=spriteram16[adress+1];
280            zoom+=(size&0xc0)<<2;
372            size = spriteram16[adress+1];
373            zoom += (size & 0xc0) << 2;
281374
282            sx = spriteram16[adress+5]&0xff;
283            sy = spriteram16[adress+6]&0xff;
284            if(spriteram16[adress+4]&1)
375            sx = spriteram16[adress+5] & 0xff;
376            sy = spriteram16[adress+6] & 0xff;
377            if (spriteram16[adress+4] & 0x01)
285378               sx-=0x100;   /* fixes left side clip */
286379            color = (spriteram16[adress+4] & 0x1e) >> 1;
287380            flipx = spriteram16[adress+1] & 0x01;
r4441r4442
295388
296389            if( zoom )
297390            {
298               zoom = ((1<<16)*0x80/zoom) + 0x02ab;
391               zoom = ((1<<16) * 0x80 / zoom) + 0x02ab;
299392               if (flipscreen)
300393               {
301394                  sx = 256 - ((zoom * w) >> 16) - sx;
r4441r4442
310403                  sx,sy,
311404                  cliprect,TRANSPARENCY_PEN,0,
312405                  zoom,zoom,
313                  0xfff0 );
406                  0xffcc );
314407            }
315408         } /* if sprite */
316409      } /* for loop */
r4441r4442
322415VIDEO_UPDATE( nemesis )
323416{
324417   int offs;
325
326   bitmap_fill(priority_bitmap,cliprect,0);
327   bitmap_fill(bitmap,cliprect,0);
328
329   tilemap_set_scrolly( background, 0, (nemesis_yscroll[0x180] & 0xff) );
330
331   for (offs = 0;offs < 256;offs++)
332   {
333      tilemap_set_scrollx( background, offs,
334         (nemesis_xscroll2[offs] & 0xff) + ((nemesis_xscroll2[0x100 + offs] & 0x01) << 8) - (flipscreen ? 0x107 : 0) );
335      tilemap_set_scrollx( foreground, offs,
336         (nemesis_xscroll1[offs] & 0xff) + ((nemesis_xscroll1[0x100 + offs] & 0x01) << 8) - (flipscreen ? 0x107 : 0) );
337   }
338
339   tilemap_draw(bitmap,cliprect,background,0,1);
340   tilemap_draw(bitmap,cliprect,foreground,0,2);
341   tilemap_draw(bitmap,cliprect,background,1,4);
342   tilemap_draw(bitmap,cliprect,foreground,1,8);
343
344   draw_sprites(screen->machine,bitmap,cliprect);
345   return 0;
346}
347
348VIDEO_UPDATE( salamand )
349{
350   int offs;
351418   rectangle clip;
352419
353420   bitmap_fill(priority_bitmap,cliprect,0);
r4441r4442
363430
364431   for (offs = 0; offs < 64; offs++)
365432   {
366      tilemap_set_scrolly( background, offs, nemesis_yscroll1[offs] );
367      tilemap_set_scrolly( foreground, offs, nemesis_yscroll2[offs] );
433      int offset_x = offs;
434
435      if (flipscreen)
436         offset_x = (offs + 0x20) & 0x3f;
437
438      tilemap_set_scrolly( background, offs, nemesis_yscroll2[offset_x] );
439      tilemap_set_scrolly( foreground, offs, nemesis_yscroll1[offset_x] );
368440   }
369441
370442   for (offs = cliprect->min_y; offs <= cliprect->max_y; offs++)
371443   {
444      int i;
445      int offset_y = offs;
446
372447      clip.min_y = offs;
373448      clip.max_y = offs;
374449
375      tilemap_set_scrollx( background, 0,
376         ((nemesis_xscroll2[offs] & 0xff) + ((nemesis_xscroll2[0x100 + offs] & 1) << 8)) );
377      tilemap_set_scrollx( foreground, 0,
378         ((nemesis_xscroll1[offs] & 0xff) + ((nemesis_xscroll1[0x100 + offs] & 1) << 8)) );
450      if (flipscreen)
451         offset_y = 255 - offs;
379452
380      tilemap_draw(bitmap,&clip,foreground,0,1);
381      tilemap_draw(bitmap,&clip,background,0,2);
382      tilemap_draw(bitmap,&clip,foreground,1,4);
383      tilemap_draw(bitmap,&clip,background,1,8);
453      tilemap_set_scrollx( background, 0, (nemesis_xscroll2[offset_y] & 0xff) + ((nemesis_xscroll2[0x100 + offset_y] & 0x01) << 8) - (flipscreen ? 0x107 : 0) );
454      tilemap_set_scrollx( foreground, 0, (nemesis_xscroll1[offset_y] & 0xff) + ((nemesis_xscroll1[0x100 + offset_y] & 0x01) << 8) - (flipscreen ? 0x107 : 0) );
455
456      for (i=0; i<4; i+=2)
457      {
458         tilemap_draw(bitmap, &clip, background, TILEMAP_DRAW_CATEGORY(i+0), 1);
459         tilemap_draw(bitmap, &clip, background, TILEMAP_DRAW_CATEGORY(i+1), 2);
460         tilemap_draw(bitmap, &clip, foreground, TILEMAP_DRAW_CATEGORY(i+0), 1);
461         tilemap_draw(bitmap, &clip, foreground, TILEMAP_DRAW_CATEGORY(i+1), 2);
462      }
384463   }
385464
386465   draw_sprites(screen->machine,bitmap,cliprect);
466
387467   return 0;
388468}
src/mame/tiny.mak
r4441r4442
3535
3636CPUS += Z80
3737CPUS += M6502
38CPUS += M6808
38CPUS += M680
3939CPUS += M6809
4040CPUS += M68000
41CPUS += DS5002FP
41CPUS += MCS51
4242
4343
4444
r4441r4442
9393$(DRIVERS)/astrocde.o:   $(LAYOUT)/gorf.lh \
9494                  $(LAYOUT)/tenpindx.lh
9595$(DRIVERS)/circus.o:   $(LAYOUT)/circus.lh \
96                  $(LAYOUT)/crash.lh
src/mame/drivers/sfbonus.c
r4441r4442
53155315
53165316*/
53175317
5318GAME( 2004, sfbonus,     0,        sfbonus,    amcoetype2,    sfbonus, ROT0,  "Amcoe", "Skill Fruit Bonus (Version 1.6)", 0)
5318GAME( 2003, sfbonus,     0,        sfbonus,    amcoetype2,    sfbonus, ROT0,  "Amcoe", "Skill Fruit Bonus (Version 1.6)", 0)
53195319
5320GAME( 2004, sfbonusa,    sfbonus,  sfbonus,    amcoetype2,    sfbonus, ROT0,  "Amcoe", "Skill Fruit Bonus (Version 1.7)", 0)
5320GAME( 2003, sfbonusa,    sfbonus,  sfbonus,    amcoetype2,    sfbonus, ROT0,  "Amcoe", "Skill Fruit Bonus (Version 1.7)", 0)
53215321
5322GAME( 2004, sfbonusb,    sfbonus,  sfbonus,    amcoetype2,    sfbonus, ROT0,  "Amcoe", "Skill Fruit Bonus (Version 1.9R, set 1)", 0)
5323GAME( 2004, sfbonusd,    sfbonus,  sfbonus,    amcoetype1,    sfbonusd,ROT0,  "Amcoe", "Skill Fruit Bonus (Version 1.9R, set 2)", 0)
5324GAME( 2004, sfbonusv,    sfbonus,  sfbonus,    amcoetype1,    sfbonusv,ROT0,  "Amcoe", "Skill Fruit Bonus (Version 1.9R Dual)", 0)
5322GAME( 2003, sfbonusb,    sfbonus,  sfbonus,    amcoetype2,    sfbonus, ROT0,  "Amcoe", "Skill Fruit Bonus (Version 1.9R, set 1)", 0)
5323GAME( 2003, sfbonusd,    sfbonus,  sfbonus,    amcoetype1,    sfbonusd,ROT0,  "Amcoe", "Skill Fruit Bonus (Version 1.9R, set 2)", 0)
5324GAME( 2003, sfbonusv,    sfbonus,  sfbonus,    amcoetype1,    sfbonusv,ROT0,  "Amcoe", "Skill Fruit Bonus (Version 1.9R Dual)", 0)
53255325
5326GAMEL( 2004, parrot3,     0,        sfbonus,    amcoetype2,    pirpok2,  ROT0,  "Amcoe", "Parrot Poker III (Version 2.4)", 0, layout_pirpok2)
5326GAMEL( 2003, parrot3,     0,        sfbonus,    amcoetype2,    pirpok2,  ROT0,  "Amcoe", "Parrot Poker III (Version 2.4)", 0, layout_pirpok2)
53275327
53285328GAMEL( 2004, parrot3b,    parrot3,  sfbonus,    amcoetype2,    pirpok2,  ROT0,  "Amcoe", "Parrot Poker III (Version 2.6R, set 1)", 0, layout_pirpok2)
53295329GAMEL( 2004, parrot3d,    parrot3,  sfbonus,    amcoetype1,    parrot3d, ROT0,  "Amcoe", "Parrot Poker III (Version 2.6R, set 2)", 0, layout_pirpok2)
src/mame/drivers/bublbobl.c
r4441r4442
259259  (similar to the HD63701). I've just mapped the I/O ports since that's the only
260260    thing required for normal operation, but the program does use some of the
261261    additional features in its special "test" mode.
262- emulate the CPU #1 <-> sound CPU communication status flags (which are not used)
263- why does emulating the sound CPU reset port (fa03) cause sound to stop working?
264262- tokio: doesn't work due to missing MCU protection emulation.
265263- tokio: sound support is probably incomplete. There are a couple of unknown
266264  accesses done by the CPU, including to the YM2203 I/O ports. At the
r4441r4442
280278
281279#define MAIN_XTAL    XTAL_24MHz
282280
283#if 0 // doesn't work for some reason
284static WRITE8_HANDLER(soundcpu_reset_w)
285{
286   cpu_set_input_line(space->machine->cpu[2], INPUT_LINE_RESET, (data & 0x01) ? ASSERT_LINE : CLEAR_LINE);
287}
288#endif
289281
290
291282static ADDRESS_MAP_START( master_map, ADDRESS_SPACE_PROGRAM, 8 )
292283   AM_RANGE(0x0000, 0x7fff) AM_ROM
293284   AM_RANGE(0x8000, 0xbfff) AM_ROMBANK(1)
r4441r4442
295286   AM_RANGE(0xdd00, 0xdfff) AM_RAM AM_BASE(&bublbobl_objectram) AM_SIZE(&bublbobl_objectram_size)
296287   AM_RANGE(0xe000, 0xf7ff) AM_RAM AM_SHARE(1)
297288   AM_RANGE(0xf800, 0xf9ff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_be_w) AM_BASE(&paletteram)
298   AM_RANGE(0xfa00, 0xfa00) AM_WRITE(bublbobl_sound_command_w)
299//  AM_RANGE(0xfa03, 0xfa03) AM_WRITE(soundcpu_reset_w) // doesn't work for some reason
289   AM_RANGE(0xfa00, 0xfa00) AM_READWRITE(sound_status_r, bublbobl_sound_command_w)
290   AM_RANGE(0xfa03, 0xfa03) AM_WRITE(soundcpu_reset_w)
300291   AM_RANGE(0xfa80, 0xfa80) AM_WRITE(watchdog_reset_w)
301292   AM_RANGE(0xfb40, 0xfb40) AM_WRITE(bublbobl_bankswitch_w)
302293   AM_RANGE(0xfc00, 0xffff) AM_RAM AM_BASE(&bublbobl_mcu_sharedram)
r4441r4442
312303   AM_RANGE(0x8000, 0x8fff) AM_RAM
313304   AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE("ym1", ym2203_r, ym2203_w)
314305   AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE("ym2", ym3526_r, ym3526_w)
315   AM_RANGE(0xb000, 0xb000) AM_READ(soundlatch_r) AM_WRITENOP
306   AM_RANGE(0xb000, 0xb000) AM_READWRITE(soundlatch_r, sound_status_w)
316307   AM_RANGE(0xb001, 0xb001) AM_WRITE(bublbobl_sh_nmi_enable_w) AM_READNOP
317308   AM_RANGE(0xb002, 0xb002) AM_WRITE(bublbobl_sh_nmi_disable_w)
318309   AM_RANGE(0xe000, 0xffff) AM_ROM   // space for diagnostic ROM?
r4441r4442
351342   AM_RANGE(0xdd00, 0xdfff) AM_RAM AM_BASE(&bublbobl_objectram) AM_SIZE(&bublbobl_objectram_size)
352343   AM_RANGE(0xe000, 0xf7ff) AM_RAM AM_SHARE(1)
353344   AM_RANGE(0xf800, 0xf9ff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_be_w) AM_BASE(&paletteram)
354   AM_RANGE(0xfa00, 0xfa00) AM_WRITE(bublbobl_sound_command_w)
355   AM_RANGE(0xfa03, 0xfa03) AM_WRITENOP // sound cpu reset
345   AM_RANGE(0xfa00, 0xfa00) AM_READWRITE(sound_status_r, bublbobl_sound_command_w)
346   AM_RANGE(0xfa03, 0xfa03) AM_WRITE(soundcpu_reset_w)
356347   AM_RANGE(0xfa80, 0xfa80) AM_WRITENOP // ???
357348   AM_RANGE(0xfb40, 0xfb40) AM_WRITE(bublbobl_bankswitch_w)
358349   AM_RANGE(0xfc00, 0xfcff) AM_RAM
r4441r4442
384375   AM_RANGE(0xfa80, 0xfa80) AM_WRITE(tokio_bankswitch_w)
385376   AM_RANGE(0xfb00, 0xfb00) AM_WRITE(tokio_videoctrl_w)
386377   AM_RANGE(0xfb80, 0xfb80) AM_WRITE(bublbobl_nmitrigger_w)
387   AM_RANGE(0xfc00, 0xfc00) AM_READNOP AM_WRITE(bublbobl_sound_command_w) // ???
378   AM_RANGE(0xfc00, 0xfc00) AM_READWRITE(sound_status_r, bublbobl_sound_command_w)
388379   AM_RANGE(0xfe00, 0xfe00) AM_READ(tokio_mcu_r) AM_WRITENOP // ???
389380ADDRESS_MAP_END
390381
r4441r4442
396387static ADDRESS_MAP_START( tokio_sound_map, ADDRESS_SPACE_PROGRAM, 8 )
397388   AM_RANGE(0x0000, 0x7fff) AM_ROM
398389   AM_RANGE(0x8000, 0x8fff) AM_RAM
399   AM_RANGE(0x9000, 0x9000) AM_READ(soundlatch_r) AM_WRITENOP   // ???
390   AM_RANGE(0x9000, 0x9000) AM_READWRITE(soundlatch_r, sound_status_w)
400391   AM_RANGE(0x9800, 0x9800) AM_READNOP   // ???
401392   AM_RANGE(0xa000, 0xa000) AM_WRITE(bublbobl_sh_nmi_disable_w)
402393   AM_RANGE(0xa800, 0xa800) AM_WRITE(bublbobl_sh_nmi_enable_w)
r4441r4442
12821273
12831274static DRIVER_INIT( tokiob )
12841275{
1285   configure_banks(machine);
1276   DRIVER_INIT_CALL(tokio);
12861277
12871278   memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xfe00, 0xfe00, 0, 0, tokiob_mcu_r );
1288
1289   DRIVER_INIT_CALL(tokio);
12901279}
12911280
12921281
src/mame/drivers/galpani2.c
r4441r4442
1717
1818- The layers are offset
1919
20- Sound banking's not correct
21
2220***************************************************************************/
2321
2422#include "driver.h"
r4441r4442
135133      case 0x00:
136134         break;
137135
136      //case 0x02: //?, gp2se is the only one to use it, often!
137      //  break;
138
138139      case 0x0a:   // Copy N bytes from RAM1 to RAM2
139140         mcu_src      =   (memory_read_byte(srcspace, mcu_address + 2)<<8) +
140141                     (memory_read_byte(srcspace, mcu_address + 3)<<0) ;
r4441r4442
160161
161162         break;
162163
164      //case 0x10: //? Clear gal?
165      //case 0x1B: //? Display gal?
166      //case 0x1F: //? Display gal?
167      //case 0x21: //? Display gal?
168      //case 0x27: //? Display gal?
169      //case 0x3E: //? Display gal?
170      //case 0x43: //? Display gal?
171      //case 0x45: //? Display gal?
172      //case 0x4C: //? Display gal?
173      //case 0x68: //? Display "Changed" gal?
174      //case 0x6B: //? Display "Changed" gal?
175      //case 0x6E: //? Display "Changed" gal?
163176      default:
164177         /* Raise a "job done" flag */
165178         memory_write_byte(srcspace,mcu_address+0,0xff);
166179         memory_write_byte(srcspace,mcu_address+1,0xff);
167180
168         logerror("%s : MCU ERROR, unknown command %02X\n",cpuexec_describe_context(machine),mcu_command);
181         logerror("%s : MCU ERROR, unknown command $%02X\n",cpuexec_describe_context(machine),mcu_command);
169182      }
170183
171184      /* Erase command? */
r4441r4442
204217   }
205218}
206219
207static WRITE16_HANDLER( galpani2_oki_0_bank_w )
220static WRITE16_DEVICE_HANDLER( galpani2_oki1_bank_w )
208221{
209222   if (ACCESSING_BITS_0_7)
210223   {
211      UINT8 *ROM = memory_region(space->machine, "oki1");
212      logerror("CPU #0 PC %06X : OKI 0 bank %08X\n",cpu_get_pc(space->cpu),data);
224      UINT8 *ROM = memory_region(device->machine, "oki1");
225      logerror("%s : %s bank %08X\n",cpuexec_describe_context(device->machine),device->tag,data);
213226      memcpy(ROM + 0x30000, ROM + 0x40000 + 0x10000 * (~data & 0xf), 0x10000);
214227   }
215228}
216229
217static WRITE16_DEVICE_HANDLER( galpani2_oki_1_bank_w )
230static WRITE16_DEVICE_HANDLER( galpani2_oki2_bank_w )
218231{
219232   if (ACCESSING_BITS_0_7)
220233   {
221234      okim6295_set_bank_base(device, 0x40000 * (data & 0xf) );
222      logerror("%s:OKI 1 bank %08X\n",cpuexec_describe_context(device->machine),data);
235      logerror("%s : %s bank %08X\n",cpuexec_describe_context(device->machine),device->tag,data);
223236   }
224237}
225238
r4441r4442
230243   AM_RANGE(0x300000, 0x301fff) AM_RAM                                    // ?
231244   AM_RANGE(0x302000, 0x303fff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size   )   // Sprites
232245   AM_RANGE(0x304000, 0x30401f) AM_RAM_WRITE(kaneko16_sprites_regs_w) AM_BASE(&kaneko16_sprites_regs   )   // Sprites Regs
233//  AM_RANGE(0x308000, 0x308001) AM_WRITE(SMH_NOP                             )   // ? 0 at startup
246   AM_RANGE(0x308000, 0x308001) AM_WRITE(SMH_NOP                        )   // ? 0 at startup
234247   AM_RANGE(0x30c000, 0x30c001) AM_WRITE(SMH_NOP                        )   // ? hblank effect ?
235248   AM_RANGE(0x310000, 0x3101ff) AM_RAM_WRITE(galpani2_palette_0_w) AM_BASE(&galpani2_palette_0   )   // ?
236249   AM_RANGE(0x314000, 0x314001) AM_WRITE(SMH_NOP                        )   // ? flip backgrounds ?
237250   AM_RANGE(0x318000, 0x318001) AM_READWRITE(galpani2_eeprom_r, galpani2_eeprom_w   )   // EEPROM
238251   AM_RANGE(0x380000, 0x387fff) AM_RAM                                    // Palette?
239252   AM_RANGE(0x388000, 0x38ffff) AM_RAM_WRITE(paletteram16_xGGGGGRRRRRBBBBB_word_w) AM_BASE(&paletteram16   )   // Palette
253   AM_RANGE(0x390000, 0x3901ff) AM_WRITE(SMH_NOP                        )   // ? at startup of service mode
254
240255   AM_RANGE(0x400000, 0x43ffff) AM_RAM_WRITE(galpani2_bg8_0_w) AM_BASE(&galpani2_bg8_0   )   // Background 0
241256   AM_RANGE(0x440000, 0x440001) AM_RAM AM_BASE(&galpani2_bg8_0_scrollx   )         // Background 0 Scroll X
242257   AM_RANGE(0x480000, 0x480001) AM_RAM AM_BASE(&galpani2_bg8_0_scrolly   )         // Background 0 Scroll Y
243258   AM_RANGE(0x4c0000, 0x4c0001) AM_WRITE(SMH_NOP                        )   // ? 0 at startup only
244259   AM_RANGE(0x500000, 0x53ffff) AM_RAM_WRITE(galpani2_bg8_1_w) AM_BASE(&galpani2_bg8_1   )   // Background 1
245260   AM_RANGE(0x540000, 0x540001) AM_RAM AM_BASE(&galpani2_bg8_1_scrollx   )         // Background 1 Scroll X
261
262   AM_RANGE(0x54059a, 0x54059b) AM_READ(SMH_NOP                  )   // ? galpani2 at F0A4
263   AM_RANGE(0x5405a2, 0x5405a3) AM_READ(SMH_NOP                  )   // ? galpani2 at F0A4 and F148
264   AM_RANGE(0x5405aa, 0x5405ab) AM_READ(SMH_NOP                  )   // ? galpani2 at F0A4 and F148
265   AM_RANGE(0x5405b2, 0x5405b3) AM_READ(SMH_NOP                  )   // ? galpani2 at F0A4 and F148
266   AM_RANGE(0x5405ba, 0x5405bb) AM_READ(SMH_NOP                  )   // ? galpani2 at F0A4 and F148
267   AM_RANGE(0x5405c2, 0x5405c3) AM_READ(SMH_NOP                  )   // ? galpani2 at F0A4 and F148
268   AM_RANGE(0x5405ca, 0x5405cb) AM_READ(SMH_NOP                  )   // ? galpani2 at F148
269
246270   AM_RANGE(0x580000, 0x580001) AM_RAM AM_BASE(&galpani2_bg8_1_scrolly   )         // Background 1 Scroll Y
247271   AM_RANGE(0x5c0000, 0x5c0001) AM_WRITE(SMH_NOP                        )   // ? 0 at startup only
248272   AM_RANGE(0x600000, 0x600001) AM_WRITE(SMH_NOP                        )   // Watchdog
249//  AM_RANGE(0x640000, 0x640001) AM_WRITE(SMH_NOP                             )   // ? 0 before resetting and at startup
273   AM_RANGE(0x640000, 0x640001) AM_WRITE(SMH_NOP                        )   // ? 0 before resetting and at startup
250274    AM_RANGE(0x680000, 0x680001) AM_WRITE(galpani2_mcu_nmi_w   )               // ? 0 -> 1 -> 0 (lev 5) / 0 -> $10 -> 0
251275   AM_RANGE(0x6c0000, 0x6c0001) AM_WRITE(galpani2_coin_lockout_w            )   // Coin + Card Lockout
252276   AM_RANGE(0x780000, 0x780001) AM_READ_PORT("DSW1_P1")
r4441r4442
255279   AM_RANGE(0x780006, 0x780007) AM_READ_PORT("SERVICE")
256280   AM_RANGE(0xc00000, 0xc00001) AM_DEVREADWRITE8("oki1", okim6295_r, okim6295_w, 0x00ff   )   // 2 x OKIM6295
257281   AM_RANGE(0xc40000, 0xc40001) AM_DEVREADWRITE8("oki2", okim6295_r, okim6295_w, 0x00ff   )   //
258   AM_RANGE(0xc80000, 0xc80001) AM_WRITE(galpani2_oki_0_bank_w               )   //
259   AM_RANGE(0xcc0000, 0xcc0001) AM_DEVWRITE("oki2", galpani2_oki_1_bank_w               )   //
282   AM_RANGE(0xc80000, 0xc80001) AM_DEVWRITE("oki1", galpani2_oki1_bank_w               )   //
283   AM_RANGE(0xcc0000, 0xcc0001) AM_DEVWRITE("oki2", galpani2_oki2_bank_w               )   //
260284ADDRESS_MAP_END
261285
262286
r4441r4442
286310   AM_RANGE(0x100000, 0x13ffff) AM_RAM AM_BASE(&galpani2_ram2)                              // Work RAM
287311   AM_RANGE(0x400000, 0x4fffff) AM_RAM_WRITE(galpani2_bg15_w) AM_BASE(&galpani2_bg15)   // bg15
288312   AM_RANGE(0x500000, 0x5fffff) AM_RAM                                                // bg15
289   AM_RANGE(0x600000, 0x600001) AM_WRITE(SMH_NOP                  )   // ? 0 at startup only
313   AM_RANGE(0x600000, 0x600001) AM_READWRITE(SMH_NOP, SMH_NOP         )   // ? 0 at startup only
290314   AM_RANGE(0x640000, 0x640001) AM_WRITE(SMH_NOP                  )   // ? 0 at startup only
291315   AM_RANGE(0x680000, 0x680001) AM_WRITE(SMH_NOP                  )   // ? 0 at startup only
292316   AM_RANGE(0x6c0000, 0x6c0001) AM_WRITE(SMH_NOP                  )   // ? 0 at startup only
r4441r4442
307331static INPUT_PORTS_START( galpani2 )
308332   PORT_START("DSW1_P1")   /* 780000.w */
309333   PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Difficulty ) )
310   PORT_DIPSETTING(      0x007, DEF_STR( Normal ) )
311   PORT_DIPSETTING(      0x006, DEF_STR( Very_Easy ) )
312   PORT_DIPSETTING(      0x005, DEF_STR( Easy ) )
313   PORT_DIPSETTING(      0x004, "Normal +" )
314   PORT_DIPSETTING(      0x003, DEF_STR( Hard ) )
315   PORT_DIPSETTING(      0x002, DEF_STR( Very_Hard ) )
316   PORT_DIPSETTING(      0x001, "Ultra Hard" )
317   PORT_DIPSETTING(      0x000, "God Hands" )
334   PORT_DIPSETTING(      0x0007, DEF_STR( Normal ) )
335   PORT_DIPSETTING(      0x0006, DEF_STR( Very_Easy ) )
336   PORT_DIPSETTING(      0x0005, DEF_STR( Easy ) )
337   PORT_DIPSETTING(      0x0004, "Normal +" )
338   PORT_DIPSETTING(      0x0003, DEF_STR( Hard ) )
339   PORT_DIPSETTING(      0x0002, DEF_STR( Very_Hard ) )
340   PORT_DIPSETTING(      0x0001, "Ultra Hard" )
341   PORT_DIPSETTING(      0x0000, "God Hands" )
318342   PORT_DIPNAME( 0x0008, 0x0008, "Picture Mode" )
319343   PORT_DIPSETTING(      0x0008, DEF_STR( Normal ) )
320344   PORT_DIPSETTING(      0x0000, "Adult" )
r4441r4442
397421   PORT_SERVICE_NO_TOGGLE( 0x2000, IP_ACTIVE_LOW )
398422   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_TILT     )
399423   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SERVICE1 )
424
425   //missing "test" input
400426INPUT_PORTS_END
401427
428static INPUT_PORTS_START( gp2se )
429   PORT_START("DSW1_P1")   /* 780000.w */
430   PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Difficulty ) )
431   PORT_DIPSETTING(      0x0007, DEF_STR( Normal ) )
432   PORT_DIPSETTING(      0x0006, DEF_STR( Very_Easy ) )
433   PORT_DIPSETTING(      0x0005, DEF_STR( Easy ) )
434   PORT_DIPSETTING(      0x0004, "Normal +" )
435   PORT_DIPSETTING(      0x0003, DEF_STR( Hard ) )
436   PORT_DIPSETTING(      0x0002, DEF_STR( Very_Hard ) )
437   PORT_DIPSETTING(      0x0001, "Ultra Hard" )
438   PORT_DIPSETTING(      0x0000, "God Hard" )
439   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) // picture mode is "normal fix"
440   PORT_DIPNAME( 0x0030, 0x0030, "Initial Player" )
441   PORT_DIPSETTING(      0x0030, "3" )
442   PORT_DIPSETTING(      0x0020, "1" )
443   PORT_DIPSETTING(      0x0010, "4" )
444   PORT_DIPSETTING(      0x0000, "5" )
445   PORT_DIPNAME( 0x00c0, 0x00c0, "Max Player" )
446   PORT_DIPSETTING(      0x00c0, "9" )
447   PORT_DIPSETTING(      0x0080, "1" )
448   PORT_DIPSETTING(      0x0040, "4" )
449   PORT_DIPSETTING(      0x0000, "6" )
402450
451   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
452   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
453   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
454   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
455   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
456   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
457   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START1 )
458   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1)
403459
460   PORT_START("DSW2_P2")   /* 780002.w */
461   PORT_DIPNAME( 0x000f, 0x000f, DEF_STR( Coinage ) )
462   PORT_DIPSETTING(      0x000f, "1 Coin/1 Credit  1/1" )
463   PORT_DIPSETTING(      0x000e, "2 Coin/1 Credit  2/1" )
464   PORT_DIPSETTING(      0x000d, "3 Coin/1 Credit  3/1" )
465   PORT_DIPSETTING(      0x000c, "4 Coin/1 Credit  4/1" )
466   PORT_DIPSETTING(      0x000b, "5 Coin/1 Credit  5/1" )
467   PORT_DIPSETTING(      0x000a, "2 Coin/1 Credit  1/1" )
468   PORT_DIPSETTING(      0x0009, "3 Coin/1 Credit  1/1" )
469   PORT_DIPSETTING(      0x0008, "4 Coin/1 Credit  1/1" )
470   PORT_DIPSETTING(      0x0007, "5 Coin/1 Credit  1/1" )
471   PORT_DIPSETTING(      0x0006, "2 Coin/1 Credit  2/1" )
472   PORT_DIPSETTING(      0x0005, "3 Coin/1 Credit  2/1" )
473   PORT_DIPSETTING(      0x0004, "4 Coin/1 Credit  2/1" )
474   PORT_DIPSETTING(      0x0003, "5 Coin/1 Credit  2/1" )
475   PORT_DIPSETTING(      0x0002, "1 Coin/2 Credit  1/2" )
476   PORT_DIPSETTING(      0x0001, "1 Coin/3 Credit  1/3" )
477   PORT_DIPSETTING(      0x0000, DEF_STR( Free_Play ) )
478   PORT_DIPNAME( 0x0010, 0x0010, "Card Dispenser" )
479   PORT_DIPSETTING(      0x0000, "Used" )
480   PORT_DIPSETTING(      0x0010, DEF_STR( Unused ) )
481   PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Flip_Screen ) )
482   PORT_DIPSETTING(      0x0020, DEF_STR( Off ) )
483   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
484   PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Demo_Sounds ) )
485   PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
486   PORT_DIPSETTING(      0x0040, DEF_STR( On ) )
487   PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
488
489   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
490   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
491   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
492   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
493   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
494   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
495   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START2  )
496   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(1)
497
498   PORT_START("SPECIAL")   /* 780004.w */
499   PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN )
500   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
501   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
502   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
503   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
504   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
505   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_SPECIAL )   // CARD full
506   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SPECIAL )   // CARD full
507   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SPECIAL )   // CARD empty
508
509   PORT_START("SERVICE")   /* 780006.w */
510   PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNKNOWN )
511   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
512   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
513   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
514   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
515   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
516   PORT_SERVICE_NO_TOGGLE( 0x2000, IP_ACTIVE_LOW )
517   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_TILT     )
518   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_SERVICE1 )
519
520   //missing "test" input
521INPUT_PORTS_END
522
404523/***************************************************************************
405524
406525
r4441r4442
439558
440559/* CPU#1 Interrups */
441560#define GALPANI2_INTERRUPTS_NUM   4
442static INTERRUPT_GEN( galpani2_interrupt )
561static INTERRUPT_GEN( galpani2_interrupt1 )
443562{
444563   switch ( cpu_getiloops(device) )
445564   {
r4441r4442
468587   /* basic machine hardware */
469588   MDRV_CPU_ADD("maincpu", M68000, 16000000)   /* 16MHz */
470589   MDRV_CPU_PROGRAM_MAP(galpani2_mem1, 0)
471   MDRV_CPU_VBLANK_INT_HACK(galpani2_interrupt,GALPANI2_INTERRUPTS_NUM)
590   MDRV_CPU_VBLANK_INT_HACK(galpani2_interrupt1,GALPANI2_INTERRUPTS_NUM)
472591
473592   MDRV_CPU_ADD("sub", M68000, 16000000)   /* 16MHz */
474593   MDRV_CPU_PROGRAM_MAP(galpani2_mem2, 0)
r4441r4442
513632
514633***************************************************************************/
515634
516//POST's displayed checksums
635//POST's displayed checksums (ROM $0-$FFFFF) or (ROM $0-$FFFFF even)/(ROM $1-$FFFFF odd)
517636//
518//galpani2 = 6A6C
519//galpan2g = 15A3
520//galpan2t = 18A3
521//galpan2j = 08E1 / A582
522//gp2quiz  = 78D6 / 84A0
523//gp2se    = 6D8C / FCE4
637//galpani2 = 6A6C                bkg layer offset
638//galpan2g = 15A3                bkg layer offset
639//galpan2t = 18A3                bkg layer offset
640//galpan2j = 08E1 / A582         bkg layer OK          has demo
641//gp2quiz  = 78D6 / 84A0         bkg layer OK          has demo
642//gp2se    = 6D8C / FCE4 (Japan) bkg layer unknown
524643
525644/***************************************************************************
526645
r4441r4442
617736   ROM_COPY( "oki1", 0x0c0000, 0, 0x40000 )
618737
619738   ROM_REGION( 0x400000, "oki2", 0 )   /* Samples */
620   ROM_LOAD( "gp2-102.045", 0x000000, 0x100000, CRC(b4bee779) SHA1(a41098e4b8e48577719dc4bd7f09f5e893e8b388) )   //  $8 x $40000
621   ROM_CONTINUE(            0x200000, 0x100000 )
622   ROM_LOAD( "gp2-101.044", 0x100000, 0x100000, CRC(f75ba6a0) SHA1(91cc0c019a7ebfa2562bbe570af029f00b5e0699) )   //  $4 x $40000
623   ROM_RELOAD(              0x300000, 0x100000 )
739   ROM_LOAD( "gp2-102.045", 0x080000, 0x180000, CRC(b4bee779) SHA1(a41098e4b8e48577719dc4bd7f09f5e893e8b388) )   //  $8 x $40000
740   ROM_CONTINUE(            0x000000, 0x080000 )
741   ROM_LOAD( "gp2-101.044", 0x280000, 0x080000, CRC(f75ba6a0) SHA1(91cc0c019a7ebfa2562bbe570af029f00b5e0699) )   //  $4 x $40000
742   ROM_CONTINUE(            0x200000, 0x080000 )
624743ROM_END
625744
626745ROM_START( galpan2g )
r4441r4442
661780   ROM_LOAD16_BYTE( "g204a0.u33-00", 0x400000, 0x040000, CRC(2867cbfd) SHA1(89af600fb33ce72a7a3fbdf9ff05a4916454a205) )
662781   ROM_LOAD16_BYTE( "g204a1.u27-00", 0x400001, 0x040000, CRC(c50503bc) SHA1(5003aa414660358900857901d5e9eca6739f14e3) )
663782
664   ROM_REGION( 0x140000, "oki1", 0 )   /* Samples */
783   ROM_REGION( 0x1c0000, "oki1", 0 )   /* Samples */
665784   ROM_LOAD( "gp2-100.043", 0x040000, 0x100000, CRC(4235ac5b) SHA1(7e35831523fbb2d0587b9ab93c13b2b43dc481a8) )   // $10 x $10000
666785   ROM_COPY( "oki1", 0x0c0000, 0, 0x40000 )
786 /* Sound samples: unknown load position, but included here to retain the rom in this set */
787   ROM_LOAD( "g104g1.u04-00", 0x140000, 0x080000, CRC(03539013) SHA1(36b96c59c59d0e747eb000472c22a30de0810902) )   // $8 x $10000, 1st is just audio data, no header
667788
668789   ROM_REGION( 0x400000, "oki2", 0 )   /* Samples */
669   ROM_LOAD( "gp2-102.045", 0x000000, 0x100000, CRC(b4bee779) SHA1(a41098e4b8e48577719dc4bd7f09f5e893e8b388) )   //  $8 x $40000
670   ROM_CONTINUE(            0x200000, 0x100000 )
671   ROM_LOAD( "gp2-101.044", 0x100000, 0x100000, CRC(f75ba6a0) SHA1(91cc0c019a7ebfa2562bbe570af029f00b5e0699) )   //  $4 x $40000
672   ROM_RELOAD(              0x300000, 0x100000 )
673 /* Sound samples: unknown load position, but included here to retain the rom in this set */
674   ROM_LOAD( "g104g1.u04-00", 0x300000, 0x080000, CRC(03539013) SHA1(36b96c59c59d0e747eb000472c22a30de0810902) )
790   ROM_LOAD( "gp2-102.045", 0x080000, 0x180000, CRC(b4bee779) SHA1(a41098e4b8e48577719dc4bd7f09f5e893e8b388) )   //  $8 x $40000
791   ROM_CONTINUE(            0x000000, 0x080000 )
792   ROM_LOAD( "gp2-101.044", 0x280000, 0x080000, CRC(f75ba6a0) SHA1(91cc0c019a7ebfa2562bbe570af029f00b5e0699) )   //  $4 x $40000
793   ROM_CONTINUE(            0x200000, 0x080000 )
675794ROM_END
676795
677796ROM_START( galpan2t )
r4441r4442
715834   ROM_COPY( "oki1", 0x0c0000, 0, 0x40000 )
716835
717836   ROM_REGION( 0x400000, "oki2", 0 )   /* Samples */
718   ROM_LOAD( "gp2-102.045", 0x000000, 0x100000, CRC(b4bee779) SHA1(a41098e4b8e48577719dc4bd7f09f5e893e8b388) )   //  $8 x $40000
719   ROM_CONTINUE(            0x200000, 0x100000 )
720   ROM_LOAD( "gp2-101.044", 0x100000, 0x100000, CRC(f75ba6a0) SHA1(91cc0c019a7ebfa2562bbe570af029f00b5e0699) )   //  $4 x $40000
721   ROM_RELOAD(              0x300000, 0x100000 )
837   ROM_LOAD( "gp2-102.045", 0x080000, 0x180000, CRC(b4bee779) SHA1(a41098e4b8e48577719dc4bd7f09f5e893e8b388) )   //  $8 x $40000
838   ROM_CONTINUE(            0x000000, 0x080000 )
839   ROM_LOAD( "gp2-101.044", 0x280000, 0x080000, CRC(f75ba6a0) SHA1(91cc0c019a7ebfa2562bbe570af029f00b5e0699) )   //  $4 x $40000
840   ROM_CONTINUE(            0x200000, 0x080000 )
722841ROM_END
723842
724843/*
725CPU #0 PC 02F8F4 : OKI 1 bank 00000007
726CPU #0 PC 02F918 : OKI 1 (030)000000-000000
727043(16 banks):  0x10000 *: 2,8,
728044(4 banks):   0x40000 *: 1,3,
729045(8 banks):   0x40000 *: 1,
730CPU #0 PC 02F8D6 : OKI 0 bank 0000000A
731CPU #0 PC 02F918 : OKI 0 (380)000000-000000
732043(16 banks):  0x10000 *: 5,8,
733044(4 banks):   0x40000 *: -
734045(8 banks):   0x40000 *: -
735*/
736844
737/*
738
739845Gals Panic II - Quiz Version (c) 1993 Kaneko
740846
741847CPUs: 68HC000-16 (x2)
r4441r4442
776882   ROM_LOAD16_BYTE( "g204j1.170", 0x400001, 0x040000, CRC(bfd89343) SHA1(884d17b3302643d86f84a4a4917de850c5bf8924) )
777883
778884   ROM_REGION( 0x140000, "oki1", 0 )   /* Samples */
779   ROM_LOAD( "gp2-100j.61", 0x040000, 0x100000, CRC(60382cbf) SHA1(766c50a3302bc11d54de49a2850522d93fc36ba2) )
780   ROM_COPY( "oki1", 0x0c0000, 0, 0x40000 )
885   ROM_LOAD( "gp2-100j.61", 0x000000, 0x100000, CRC(60382cbf) SHA1(766c50a3302bc11d54de49a2850522d93fc36ba2) )
781886
782   ROM_REGION( 0x400000, "oki2", 0 )   /* Samples */
783   ROM_LOAD( "gp2-102.59",  0x280000, 0x080000, CRC(1bed6ecd) SHA1(3208aacac64ac95fcb6eeef59986c3154c1c415b) )
784   ROM_CONTINUE(            0x200000, 0x080000 )
785   ROM_CONTINUE(            0x080000, 0x080000 )
786   ROM_CONTINUE(            0x000000, 0x080000 )
787   ROM_LOAD( "gp2-101.60",  0x180000, 0x080000, CRC(3c45134f) SHA1(a5362bfcc6beb6e776c1bce4544475f8947fccea) )
788   ROM_CONTINUE(            0x100000, 0x080000 )
789   ROM_COPY( "oki2", 0x100000, 0x300000, 0x100000 )
887   ROM_REGION( 0x300000, "oki2", 0 )   /* Samples */
888   ROM_LOAD( "gp2-102.59",  0x000000, 0x200000, CRC(1bed6ecd) SHA1(3208aacac64ac95fcb6eeef59986c3154c1c415b) )
889   ROM_LOAD( "gp2-101.60",  0x200000, 0x100000, CRC(3c45134f) SHA1(a5362bfcc6beb6e776c1bce4544475f8947fccea) )
790890ROM_END
791891
792892ROM_START( gp2se )
r4441r4442
820920   /* no u61 on this one */
821921   ROM_LOAD( "g104j4.u62", 0x000000, 0x080000, CRC(0546ea41) SHA1(cf351b496d93648a50fc0e84badb5bb855b681b4) )
822922
823   ROM_REGION( 0x400000, "oki2", 0 )   /* Samples */
824   ROM_LOAD( "gp2-102-0045.u59",  0x280000, 0x080000, CRC(1bed6ecd) SHA1(3208aacac64ac95fcb6eeef59986c3154c1c415b) )
825   ROM_CONTINUE(            0x200000, 0x080000 )
826   ROM_CONTINUE(            0x080000, 0x080000 )
827   ROM_CONTINUE(            0x000000, 0x080000 )
828   ROM_LOAD( "gp2-101-0044.u60",  0x180000, 0x080000, CRC(3c45134f) SHA1(a5362bfcc6beb6e776c1bce4544475f8947fccea) )
829   ROM_CONTINUE(            0x100000, 0x080000 )
830   ROM_COPY( "oki2", 0x100000, 0x300000, 0x100000 )
923   ROM_REGION( 0x300000, "oki2", 0 )   /* Samples */
924   ROM_LOAD( "gp2-102-0045.u59",  0x000000, 0x200000, CRC(1bed6ecd) SHA1(3208aacac64ac95fcb6eeef59986c3154c1c415b) )
925   ROM_LOAD( "gp2-101-0044.u60",  0x200000, 0x100000, CRC(3c45134f) SHA1(a5362bfcc6beb6e776c1bce4544475f8947fccea) )
831926ROM_END
832927
833928ROM_START( gp2quiz )
r4441r4442
853948   ROM_LOAD16_BYTE( "g204a3.u169-3", 0x400000, 0x080000, CRC(92a837b7) SHA1(f581e1f7754f1fb20255c6c55ffc4e486d867111) )
854949   ROM_LOAD16_BYTE( "g204a4.u170-3", 0x400001, 0x080000, CRC(3c2dd1cd) SHA1(d5267ad6f51283191174988ac0519c0e0aa6552f) )
855950
856   ROM_REGION( 0x240000, "oki1", 0 )   /* Samples */
857   ROM_LOAD( "gp2-100-0043.u61", 0x040000, 0x100000, CRC(a61e8868) SHA1(ad84ae00ebe7c70a36b1aa75e743686a0193e5d9) )
858   ROM_COPY( "oki1", 0x0c0000, 0, 0x40000 )
859   ROM_LOAD( "g104a3.u62-3", 0x140000, 0x080000, CRC(42b3470e) SHA1(c121ea6c98e6ff452f4bcc49c3a5179e99237128) )
951   ROM_REGION( 0x180000, "oki1", 0 )   /* Samples */
952   ROM_LOAD( "gp2-100-0043.u61", 0x000000, 0x100000, CRC(a61e8868) SHA1(ad84ae00ebe7c70a36b1aa75e743686a0193e5d9) )
953   ROM_LOAD( "g104a3.u62-3", 0x100000, 0x080000, CRC(42b3470e) SHA1(c121ea6c98e6ff452f4bcc49c3a5179e99237128) )
860954
861   ROM_REGION( 0x400000, "oki2", 0 )   /* Samples */
862   ROM_LOAD( "gp2-102-0045.u59",  0x280000, 0x080000, CRC(1bed6ecd) SHA1(3208aacac64ac95fcb6eeef59986c3154c1c415b) )
863   ROM_CONTINUE(            0x200000, 0x080000 )
864   ROM_CONTINUE(            0x080000, 0x080000 )
865   ROM_CONTINUE(            0x000000, 0x080000 )
866   ROM_LOAD( "gp2-101-0044.u60",  0x180000, 0x080000, CRC(3c45134f) SHA1(a5362bfcc6beb6e776c1bce4544475f8947fccea) )
867   ROM_CONTINUE(            0x100000, 0x080000 )
868   ROM_COPY( "oki2", 0x100000, 0x300000, 0x100000 )
955   ROM_REGION( 0x300000, "oki2", 0 )   /* Samples */
956   ROM_LOAD( "gp2-102-0045.u59",  0x000000, 0x200000, CRC(1bed6ecd) SHA1(3208aacac64ac95fcb6eeef59986c3154c1c415b) )
957   ROM_LOAD( "gp2-101-0044.u60",  0x200000, 0x100000, CRC(3c45134f) SHA1(a5362bfcc6beb6e776c1bce4544475f8947fccea) )
869958ROM_END
870959
871960GAME( 1993, galpani2, 0,        galpani2, galpani2, 0, ROT90, "Kaneko", "Gals Panic II (Asia)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION )
r4441r4442
873962GAME( 1993, galpan2t, galpani2, galpani2, galpani2, 0, ROT90, "Kaneko", "Gals Panic II (Taiwan)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION )
874963GAME( 1993, galpan2j, galpani2, galpani2, galpani2, 0, ROT90, "Kaneko", "Gals Panic II (Japan)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION ) // it is a 'quiz edition' but the title screen doesn't say that??
875964GAME( 1993, gp2quiz,  0,        galpani2, galpani2, 0, ROT90, "Kaneko", "Gals Panic II - Quiz Version (Japan)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION ) // this one has 'quiz edition' on the title screen
876GAME( 1994, gp2se,    0,        galpani2, galpani2, 0, ROT90, "Kaneko", "Gals Panic II' - Special Edition (Japan)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION )
965GAME( 1994, gp2se,    0,        galpani2, gp2se,    0, ROT90, "Kaneko", "Gals Panic II' - Special Edition (Japan)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION )
src/mame/drivers/seibuspi.c
r4441r4442
676676#include "machine/intelfsh.h"
677677#include "sound/okim6295.h"
678678#include "sound/ymf271.h"
679#include "sound/ymz280b.h"
679680#include "includes/seibuspi.h"
680681
681682UINT32 *spimainram;
r4441r4442
697698
698699static UINT8 sb_coin_latch = 0;
699700
701static UINT8 ejsakura_input_port = 0;
702
700703static UINT8 z80_fifoout_pop(const address_space *space)
701704{
702705   UINT8 r;
r4441r4442
910913   return 0xffffffff;
911914}
912915
916static CUSTOM_INPUT( ejsakura_keyboard_r )
917{
918   switch(ejsakura_input_port)
919   {
920      case 0x01:
921         return input_port_read(field->port->machine, "INPUT01");
922      case 0x02:
923         return input_port_read(field->port->machine, "INPUT02");
924      case 0x04:
925         return input_port_read(field->port->machine, "INPUT04");
926      case 0x08:
927         return input_port_read(field->port->machine, "INPUT08");
928      case 0x10:
929         return input_port_read(field->port->machine, "INPUT10");
930      default:
931         return input_port_read(field->port->machine, "SYSTEM");
932   }
933   return 0xffffffff;
934}
913935/********************************************************************/
914936
915937static READ8_HANDLER( z80_soundfifo_r )
r4441r4442
10631085      cpu_set_input_line(device->machine->cpu[1], 0, CLEAR_LINE);
10641086}
10651087
1088static WRITE32_HANDLER(sys386f2_eeprom_w)
1089{
1090   eeprom_write_bit((data & 0x80) ? 1 : 0);
1091   eeprom_set_clock_line((data & 0x40) ? ASSERT_LINE : CLEAR_LINE);
1092   eeprom_set_cs_line((data & 0x20) ? CLEAR_LINE : ASSERT_LINE);
1093}
1094
10661095static const ymf271_interface ymf271_config =
10671096{
10681097   DEVCB_HANDLER(flashrom_read),
r4441r4442
10951124   AM_RANGE(0xffe00000, 0xffffffff) AM_ROM AM_REGION("user1", 0) AM_SHARE(2)      /* ROM location in real-mode */
10961125ADDRESS_MAP_END
10971126
1127static WRITE32_HANDLER(input_select_w)
1128{
1129   ejsakura_input_port = data;
1130}
1131
10981132static ADDRESS_MAP_START( sys386f2_map, ADDRESS_SPACE_PROGRAM, 32 )
1099   AM_RANGE(0x00000000, 0x00000417) AM_RAM
1100   AM_RANGE(0x00000418, 0x0000041b) AM_READWRITE(spi_layer_bank_r, spi_layer_bank_w)
1101   AM_RANGE(0x0000041c, 0x0000041f) AM_READNOP
1102   AM_RANGE(0x0000041c, 0x0000041f) AM_WRITE(spi_layer_enable_w)
1103   AM_RANGE(0x00000420, 0x0000042b) AM_RAM AM_BASE(&spi_scrollram)
1104   AM_RANGE(0x00000480, 0x00000483) AM_WRITE(tilemap_dma_start_w)
1133   AM_RANGE(0x00000000, 0x0000000f) AM_RAM
1134   AM_RANGE(0x00000010, 0x00000013) AM_READ(spi_int_r)            /* Unknown */
1135   AM_RANGE(0x00000090, 0x00000097) AM_RAM /* Unknown */
1136   AM_RANGE(0x00000400, 0x00000403) AM_READNOP AM_WRITE(input_select_w)
1137   AM_RANGE(0x00000404, 0x00000407) AM_WRITE(sys386f2_eeprom_w)
1138   AM_RANGE(0x00000408, 0x0000040f) AM_DEVWRITE8("ymz", ymz280b_w, 0x000000ff)
11051139   AM_RANGE(0x00000484, 0x00000487) AM_WRITE(palette_dma_start_w)
11061140   AM_RANGE(0x00000490, 0x00000493) AM_WRITE(video_dma_length_w)
11071141   AM_RANGE(0x00000494, 0x00000497) AM_WRITE(video_dma_address_w)
1108   AM_RANGE(0x0000050c, 0x0000050f) AM_WRITE(sprite_dma_start_w)
1109   AM_RANGE(0x00000600, 0x00000603) AM_READ(spi_int_r)            /* Unknown */
1110   AM_RANGE(0x00000604, 0x00000607) AM_READ(spi_controls1_r)   /* Player controls */
1142   AM_RANGE(0x00000500, 0x0000054f) AM_RAM /* Unknown */
1143   AM_RANGE(0x00000560, 0x00000563) AM_WRITE(sprite_dma_start_w)
1144   AM_RANGE(0x00000600, 0x00000607) AM_DEVREAD8("ymz", ymz280b_r, 0x000000ff)
11111145   AM_RANGE(0x00000608, 0x0000060b) AM_READ(spi_unknown_r)
1112   AM_RANGE(0x0000060c, 0x0000060f) AM_READ(spi_controls2_r)   /* Player controls (start) */
1113   AM_RANGE(0x0000068c, 0x0000068f) AM_WRITE(eeprom_w)
1146   AM_RANGE(0x0000060c, 0x0000060f) AM_READ(spi_controls1_r)   /* Player controls */
11141147   AM_RANGE(0x00000800, 0x0003ffff) AM_RAM AM_BASE(&spimainram)
11151148   AM_RANGE(0x00200000, 0x003fffff) AM_ROM AM_SHARE(2)
11161149   AM_RANGE(0xffe00000, 0xffffffff) AM_ROM AM_REGION("user1", 0) AM_SHARE(2)      /* ROM location in real-mode */
r4441r4442
12931326   PORT_BIT( 0x100, IP_ACTIVE_HIGH, IPT_MAHJONG_RON ) PORT_PLAYER(1)
12941327INPUT_PORTS_END
12951328
1329static INPUT_PORTS_START( spi_ejsakura )
1330   PORT_START("INPUTS")
1331   PORT_BIT( 0xffffffff, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM(ejsakura_keyboard_r, NULL)
1332
1333   PORT_START("INPUT01")
1334   PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_UNKNOWN )
1335   PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_PLAYER(1)
1336   PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_PLAYER(1)
1337   PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_PLAYER(1)
1338   PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_PLAYER(1)
1339   PORT_BIT( 0xffffffe0, IP_ACTIVE_LOW, IPT_UNUSED )
1340
1341   PORT_START("INPUT02")
1342   PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_PLAYER(1)
1343   PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) PORT_PLAYER(1)
1344   PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) PORT_PLAYER(1)
1345   PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE )  PORT_PLAYER(1)
1346   PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE )  PORT_PLAYER(1)
1347   PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_PLAYER(1)
1348   PORT_BIT( 0xffffffc0, IP_ACTIVE_LOW, IPT_UNUSED )
1349
1350   PORT_START("INPUT04")
1351   PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_PLAYER(1)
1352   PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_PLAYER(1)
1353   PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_PLAYER(1)
1354   PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_PLAYER(1)
1355   PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_PLAYER(1)
1356   PORT_BIT( 0xffffffe0, IP_ACTIVE_LOW, IPT_UNUSED )
1357
1358   PORT_START("INPUT08")
1359   PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_PLAYER(1)
1360   PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_PLAYER(1)
1361   PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_PLAYER(1)
1362   PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_PLAYER(1)
1363   PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_PLAYER(1)
1364   PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_START1 )
1365   PORT_BIT( 0xffffffc0, IP_ACTIVE_LOW, IPT_UNUSED )
1366
1367   PORT_START("INPUT10")
1368   PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_PLAYER(1)
1369   PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_PLAYER(1)
1370   PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_PLAYER(1)
1371   PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_PLAYER(1)
1372   PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_PLAYER(1)
1373   PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_PLAYER(1)
1374   PORT_SERVICE_NO_TOGGLE( 0x00000200, IP_ACTIVE_LOW) /* Test Button */
1375   PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Payout") PORT_CODE(KEYCODE_Q)
1376   PORT_BIT( 0xfffff5c0, IP_ACTIVE_LOW, IPT_UNUSED )
1377
1378   PORT_START("SYSTEM")
1379   PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_COIN1 )
1380   PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_COIN2 )
1381   PORT_BIT( 0x00004000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(eeprom_bit_r, NULL)
1382   PORT_BIT( 0xffffbf3f, IP_ACTIVE_LOW, IPT_UNUSED )
1383
1384INPUT_PORTS_END
12961385/********************************************************************/
12971386
12981387#define PLANE_CHAR 0
r4441r4442
16431732#endif
16441733GFXDECODE_END
16451734
1735static const gfx_layout sys386f2_spritelayout =
1736{
1737   16,16,
1738   RGN_FRAC(1,4),
1739   8,
1740   { 0, 8, RGN_FRAC(1,4)+0, RGN_FRAC(1,4)+8, RGN_FRAC(2,4)+0, RGN_FRAC(2,4)+8, RGN_FRAC(3,4)+0, RGN_FRAC(3,4)+8 },
1741   {
1742      7,6,5,4,3,2,1,0,23,22,21,20,19,18,17,16
1743   },
1744   {
1745      0*32,1*32,2*32,3*32,4*32,5*32,6*32,7*32,8*32,9*32,10*32,11*32,12*32,13*32,14*32,15*32
1746   },
1747   16*32
1748};
1749
1750static GFXDECODE_START( sys386f2)
1751   GFXDECODE_ENTRY( "gfx1", 0, spi_charlayout,          5632, 16 ) // Not used
1752   GFXDECODE_ENTRY( "gfx2", 0, spi_tilelayout,          4096, 24 ) // Not used
1753   GFXDECODE_ENTRY( "gfx3", 0, sys386f2_spritelayout,      0, 96 )
1754GFXDECODE_END
1755
16461756/********************************************************************************/
16471757
16481758static NVRAM_HANDLER( spi )
r4441r4442
20922202/* SYS386-F V2.0 */
20932203static DRIVER_INIT( sys386f2 )
20942204{
2095   //init_rf2(machine);
2205   int i, j;
2206   UINT16 *src = (UINT16 *)memory_region(machine, "gfx3");
2207   UINT16 tmp[0x40 / 2], Offset;
2208
2209   // sprite_reorder() only
2210   for(i = 0; i < memory_region_length(machine, "gfx3") / 0x40; i++)
2211   {
2212      memcpy(tmp, src, 0x40);
2213
2214      for(j = 0; j < 0x40 / 2; j++)
2215      {
2216         Offset = (j >> 1) | (j << 4 & 0x10);
2217         *src++ = tmp[Offset];
2218      }
2219   }
20962220}
20972221
20982222static MACHINE_DRIVER_START( sys386f2 )
r4441r4442
21152239   MDRV_SCREEN_SIZE(64*8, 32*8)
21162240   MDRV_SCREEN_VISIBLE_AREA(0*8, 40*8-1, 0*8, 30*8-1)
21172241
2118   MDRV_GFXDECODE(spi)
2119   MDRV_PALETTE_LENGTH(6144)
2242   MDRV_GFXDECODE(sys386f2)
2243   MDRV_PALETTE_LENGTH(8192)
21202244
2121   MDRV_VIDEO_START(spi)
2122   MDRV_VIDEO_UPDATE(spi)
2245   MDRV_VIDEO_START(sys386f2)
2246   MDRV_VIDEO_UPDATE(sys386f2)
21232247
21242248   MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
21252249
2126   MDRV_SOUND_ADD("ymf", YMF271, 16934400)
2127   MDRV_SOUND_CONFIG(ymf271_config)
2250   MDRV_SOUND_ADD("ymz", YMZ280B, 16934400)
21282251   MDRV_SOUND_ROUTE(0, "lspeaker", 1.0)
21292252   MDRV_SOUND_ROUTE(1, "rspeaker", 1.0)
21302253MACHINE_DRIVER_END
r4441r4442
28302953ROM_START(rdft2j2) /* SPI Cart, Japan */
28312954   ROM_REGION32_LE(0x200000, "user1", 0)   /* i386 program */
28322955   ROM_LOAD32_BYTE("rf2.1",    0x000000, 0x80000, CRC(391d5057) SHA1(a1849142cbf7344ac1279781597e27b3b8ae6127) )
2833   ROM_LOAD32_BYTE("u212.bin", 0x000001, 0x80000, CRC(58ccb10c) SHA1(0cce4057bfada78121d9586574b98d46cdd7dd46) )
2834   ROM_LOAD32_BYTE("u210.bin", 0x000002, 0x80000, CRC(47fc3c96) SHA1(7378f8caa847f89f235b5be6779118721076873b) )
2835   ROM_LOAD32_BYTE("u29.bin",  0x000003, 0x80000, CRC(271bdd4b) SHA1(0a805568cbd6a9c18bdb755a41972ff6bba9e6eb) )
2956   ROM_LOAD32_BYTE("rf2_2.bin", 0x000001, 0x80000, CRC(ec73a767) SHA1(83f3905afe49401793c0ea0193cb31d3ba1e1739) )
2957   ROM_LOAD32_BYTE("rf2_3.bin", 0x000002, 0x80000, CRC(e66243b2) SHA1(54e67af37a4586fd1afc79085ed433d599e1bb87) )
2958   ROM_LOAD32_BYTE("rf2_4.bin", 0x000003, 0x80000, CRC(92b7b73e) SHA1(128649b2a6a0616113bd0f9846fb6cf814ae326d) )
28362959
2837   ROM_REGION( 0x30000, "gfx1", 0)   /* text layer roms */
2838   ROM_LOAD24_BYTE("gd_5.423", 0x000000, 0x10000, CRC(8f8d4e14) SHA1(06c803975767ae98f40ba7ac5764a5bc8baa3a30) )
2839   ROM_LOAD24_BYTE("gd_6.424", 0x000001, 0x10000, CRC(6ac64968) SHA1(ec395205c24c4f864a1f805bb0d4641562d4faa9) )
2840   ROM_LOAD24_BYTE("gd_7.48",  0x000002, 0x10000, CRC(4d87e1ea) SHA1(3230e9b643fad773e61ab8ce09c0cd7d4d0558e3) )
2960   ROM_REGION( 0x30000, "gfx1", 0)
2961   ROM_LOAD24_BYTE("rf2_5.bin", 0x000001, 0x10000, CRC(377cac2f) SHA1(f7c9323d79b77f6c8c02ba2c6cdca127d6e5cb5c) )
2962   ROM_LOAD24_BYTE("rf2_6.bin", 0x000000, 0x10000, CRC(42bd5372) SHA1(c38df85b25070db9640eac541f71c0511bab0c98) )
2963   ROM_LOAD24_BYTE("rf2_7.bin", 0x000002, 0x10000, CRC(1efaac7e) SHA1(8252af56dcb7a6306dc3422070176778e3c511c2) )
28412964
2842   ROM_REGION( 0x600000, "gfx2", 0)   /* background layer roms */
2843   ROM_LOAD24_WORD("gd_bg1-d.415", 0x000000, 0x200000, CRC(6a68054c) SHA1(5cbfc4ac90045f1401c2dda7a51936558c9de07e) )
2844   ROM_LOAD24_BYTE("gd_bg1-p.410", 0x000002, 0x100000, CRC(3400794a) SHA1(719808f7442bac612cefd7b7fffcd665e6337ad0) )
2845   ROM_LOAD24_WORD("gd_bg2-d.416", 0x300000, 0x200000, CRC(61cd2991) SHA1(bb608e3948bf9ea35b5e1615d2ba6858d029dcbe) )
2846   ROM_LOAD24_BYTE("gd_bg2-p.49",  0x300002, 0x100000, CRC(502d5799) SHA1(c3a0e1a4f5a7b35572ae1ff31315da4ed08aa2fe) )
2965   ROM_REGION( 0xc00000, "gfx2", 0)   /* background layer roms */
2966   ROM_LOAD24_WORD("bg-1d.u0535", 0x000000, 0x400000, CRC(6143f576) SHA1(c034923d0663d9ef24357a03098b8cb81dbab9f8) )
2967   ROM_LOAD24_BYTE("bg-1p.u0537", 0x000002, 0x200000, CRC(55e64ef7) SHA1(aae991268948d07342ee8ba1b3761bd180aab8ec) )
2968   ROM_LOAD24_WORD("bg-2d.u0536", 0x600000, 0x400000, CRC(c607a444) SHA1(dc1aa96a42e9394ca6036359670a4ec6f830c96d) )
2969   ROM_LOAD24_BYTE("bg-2p.u0538", 0x600002, 0x200000, CRC(f0830248) SHA1(6075df96b49e70d2243fef691e096119e7a4d044) )
28472970
2848   ROM_REGION( 0xc00000, "gfx3", 0)   /* sprites */
2849   ROM_LOAD("gd_obj-1.322", 0x000000, 0x400000, CRC(59d86c99) SHA1(d3c9241e7b51fe21f8351051b063f91dc69bf905) )
2850   ROM_LOAD("gd_obj-2.324", 0x400000, 0x400000, CRC(1ceb0b6f) SHA1(97225a9b3e7be18080aa52f6570af2cce8f25c06) )
2851   ROM_LOAD("gd_obj-3.323", 0x800000, 0x400000, CRC(36e93234) SHA1(51917a80b7da5c32a9434a1076fc2916d62e6a3e) )
2971   ROM_REGION( 0x1200000, "gfx3", 0)   /* sprites */
2972   ROM_LOAD("obj3.u0434",  0x0000000, 0x400000, CRC(e08f42dc) SHA1(5188d71d4355eaf43ea8893b4cfc4fe80cc24f41) )
2973   ROM_LOAD("obj3b.u0433", 0x0400000, 0x200000, CRC(1b6a523c) SHA1(99a420dbc8e22e7832ccda7cec9fa661a2a2687a) )
2974   ROM_LOAD("obj2.u0431",  0x0600000, 0x400000, CRC(7aeadd8e) SHA1(47103c0579240c5b1add4d0b164eaf76f5fa97f0) )
2975   ROM_LOAD("obj2b.u0432", 0x0a00000, 0x200000, CRC(5d790a5d) SHA1(1ed5d4ad4c9a7e505ce35dcc90d184c26ce891dc) )
2976   ROM_LOAD("obj1.u0429",  0x0c00000, 0x400000, CRC(c2c50f02) SHA1(b81397b5800c6d49f58b7ac7ff6eac56da3c5257) )
2977   ROM_LOAD("obj1b.u0430", 0x1000000, 0x200000, CRC(5259321f) SHA1(3c70c1147e49f81371d0f60f7108d9718d56faf4) )
28522978
28532979   ROM_REGION(0x200000, "ymf", ROMREGION_ERASE00)
28542980
28552981   ROM_REGION(0x280000, "user2", ROMREGION_ERASE00)   /* sound roms */
2856   ROM_LOAD("gd_pcm.217", 0x000000, 0x200000, CRC(31253ad7) SHA1(c81c8d50f8f287f5cbfaec77b30d969b01ce11a9) )
2857   ROM_LOAD("gd_8.216",   0x200000, 0x080000, CRC(f88cb6e4) SHA1(fb35b41307b490d5d08e4b8a70f8ff4ce2ca8105) )
2982   ROM_LOAD("pcm.u0217",    0x000000, 0x200000, CRC(2edc30b5) SHA1(c25d690d633657fc3687636b9070f36bd305ae06) )
2983   ROM_LOAD("sound1.u0222", 0x200000, 0x080000, CRC(b7bd3703) SHA1(6427a7e6de10d6743d6e64b984a1d1c647f5643a) )
28582984ROM_END
28592985
28602986ROM_START(rdft2a) /* SPI Cart, Asia (Metrotainment license) */
r4441r4442
32673393   ROM_REGION( 0x900000, "gfx2", ROMREGION_ERASEFF)   /* background layer roms */
32683394
32693395   ROM_REGION( 0x1000000, "gfx3", 0)   /* sprites */
3270   ROM_LOAD("chr1.442", 0x000000, 0x400000, CRC(177e3139) SHA1(0385a831c141d59ec4e9c6d6fae9436dca123764) )
3271   ROM_LOAD("chr2.443", 0x400000, 0x400000, CRC(638dc9ae) SHA1(0c11b1e688733fbaeabf83b33410714c22ae53cd) )
3272   ROM_LOAD("chr3.444", 0x800000, 0x400000, CRC(8e5d1de5) SHA1(c1ccb6b4341ee1e939958ec9e68280c6faa2ef1f) )
3273   ROM_LOAD("chr4.445", 0xc00000, 0x400000, CRC(40c6c238) SHA1(0d07b59e25632feb070ce0e572ae75f9bb939893) )
3396   ROM_LOAD16_WORD_SWAP("chr4.445", 0x000000, 0x400000, CRC(40c6c238) SHA1(0d07b59e25632feb070ce0e572ae75f9bb939893) )
3397   ROM_LOAD16_WORD_SWAP("chr3.444", 0x400000, 0x400000, CRC(8e5d1de5) SHA1(c1ccb6b4341ee1e939958ec9e68280c6faa2ef1f) )
3398   ROM_LOAD16_WORD_SWAP("chr2.443", 0x800000, 0x400000, CRC(638dc9ae) SHA1(0c11b1e688733fbaeabf83b33410714c22ae53cd) )
3399   ROM_LOAD16_WORD_SWAP("chr1.442", 0xc00000, 0x400000, CRC(177e3139) SHA1(0385a831c141d59ec4e9c6d6fae9436dca123764) )
32743400
3275   ROM_REGION(0x1000000, "ymf", ROMREGION_ERASE00)
3401   ROM_REGION(0x1000000, "ymz", 0)
32763402   ROM_LOAD("sound1.83",  0x000000, 0x800000, CRC(98783cfc) SHA1(f142429e0658a36e908cc135fe0e01ce853d071d) )
32773403   ROM_LOAD("sound2.84",  0x800000, 0x800000, CRC(ff37e769) SHA1(eb6d260cbc4e4a925a5d8f604ec695e567ac6bb5) )
32783404ROM_END
r4441r4442
33303456GAME( 2000, rdft22kc,  rdft2,   seibu386, seibu386_2button, rdft22kc, ROT270, "Seibu Kaihatsu", "Raiden Fighters 2 - 2000 (China)", GAME_IMPERFECT_GRAPHICS )
33313457
33323458/* SYS386F V2.0 */
3333GAME( 1999, ejsakura,  0,       sys386f2, spi_ejanhs, sys386f2, ROT270, "Seibu Kaihatsu", "E-Jan Sakurasou", GAME_NOT_WORKING )
3459GAME( 1999, ejsakura,  0, sys386f2, spi_ejsakura, sys386f2, ROT0, "Seibu Kaihatsu", "E-Jan Sakurasou", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
src/mame/drivers/system1.c
r4441r4442
868868   PORT_MODIFY("P1")
869869   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 )
870870
871   PORT_MODIFY("P1")
871   PORT_MODIFY("P2")
872872   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL
873873
874874   PORT_MODIFY("DSW1")
src/mame/drivers/suprnova.c
r4441r4442
2020   Paul Priest for a lot of things
2121   Stephh for spotting what was wrong with Puzz Loop's inputs
2222
23Puzz Loop is currently the only game dumped for all known regions.  This game is normally found on a ROM 4 BOARD
24   so the "U" location is printed on the label as U4 & U6.  However this same game has also been found on the
25   ROM-2-BOARD using EPROMs labeled for the ROM 4 BOARD, but inserted in sockets at U8 & U10
2326
2427ToDo:
2528   Priorities
r4441r4442
927930   return skns_main_ram[0x86714/4];
928931}
929932
933static READ32_HANDLER( puzzloopa_speedup_r )
934{
935   if (cpu_get_pc(space->cpu)==0x401d9d4) cpu_spinuntil_int(space->cpu);
936   return skns_main_ram[0x85bcc/4];
937}
938
930939static READ32_HANDLER( puzzloopu_speedup_r )
931940{
932941   if (cpu_get_pc(space->cpu)==0x401dab0) cpu_spinuntil_int(space->cpu);
r4441r4442
10231032static DRIVER_INIT( senknow )  { skns_sprite_kludge(+1,+1); init_skns(machine); memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x60000dc, 0x60000df, 0, 0, senknow_speedup_r ); set_drc_pcflush(machine, 0x4017dce);  }
10241033static DRIVER_INIT( puzzloop ) { skns_sprite_kludge(-9,-1); init_skns(machine); memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x6081d38, 0x6081d3b, 0, 0, puzzloop_speedup_r ); set_drc_pcflush(machine, 0x401da14); }
10251034static DRIVER_INIT( puzzloopj ) { skns_sprite_kludge(-9,-1); init_skns(machine); memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x6086714, 0x6086717, 0, 0, puzzloopj_speedup_r ); set_drc_pcflush(machine, 0x401dca0); }
1035static DRIVER_INIT( puzzloopa ) { skns_sprite_kludge(-9,-1); init_skns(machine); memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x6085bcc, 0x6085bcf, 0, 0, puzzloopa_speedup_r ); set_drc_pcflush(machine, 0x401d9d4); }
10261036static DRIVER_INIT( puzzloopu ) { skns_sprite_kludge(-9,-1); init_skns(machine); memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x6085cec, 0x6085cef, 0, 0, puzzloopu_speedup_r ); set_drc_pcflush(machine, 0x401dab0); }
10271037static DRIVER_INIT( jjparads ) { skns_sprite_kludge(+5,+1); init_skns(machine); memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x6000994, 0x6000997, 0, 0, jjparads_speedup_r ); set_drc_pcflush(machine, 0x4015e84); }
10281038static DRIVER_INIT( jjparad2 ) { skns_sprite_kludge(+5,+1); init_skns(machine); memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x6000984, 0x6000987, 0, 0, jjparad2_speedup_r ); set_drc_pcflush(machine, 0x401620a); }
r4441r4442
13251335   ROM_LOAD       ( "sknsj1.u10",   0x000000, 0x080000, CRC(7e2b836c) SHA1(92c5a7a2472496028bff0e5980d41dd294f42144) ) /* Japan BIOS */
13261336
13271337   ROM_REGION32_BE( 0x200000, "user1", 0 ) /* SH-2 Code mapped at 0x04000000 */
1328   ROM_LOAD16_BYTE( "pl0j2u6.u10", 0x000000, 0x080000, CRC(23c3bf97) SHA1(77ea1f32bed5709a6ad5b250370f08cfe8036867) )
1329   ROM_LOAD16_BYTE( "pl0j2u4.u8",  0x000001, 0x080000, CRC(55b2a3cb) SHA1(d4cbe143fe2ad622af808cbd9eedffeff3b77e0d) )
1338   ROM_LOAD16_BYTE( "pl0j2.u6", 0x000000, 0x080000, CRC(23c3bf97) SHA1(77ea1f32bed5709a6ad5b250370f08cfe8036867) )
1339   ROM_LOAD16_BYTE( "pl0j2.u4", 0x000001, 0x080000, CRC(55b2a3cb) SHA1(d4cbe143fe2ad622af808cbd9eedffeff3b77e0d) )
13301340
13311341   ROM_REGION( 0x800000, "gfx1", 0 )
13321342   ROM_LOAD( "pzl10000.u24", 0x000000, 0x400000, CRC(35bf6897) SHA1(8a1f1f5234a61971a62401633de1dec1920fc4da) )
r4441r4442
13431353   ROM_LOAD( "pzl30000.u4", 0x000000, 0x400000, CRC(38604b8d) SHA1(1191cf48a6a7baa58e51509442b40ea67f5252d2) )
13441354ROM_END
13451355
1346ROM_START( puzzloopu )
1356ROM_START( puzzloopa )
13471357   ROM_REGION( 0x080000, "maincpu", 0 ) /* SH-2 Code */
1348   ROM_LOAD       ( "sknsu1.u10",   0x000000, 0x080000, CRC(384d21ec) SHA1(a27e8a18099d9cea64fa32db28d01101c2a78815) ) /* US BIOS */
1358   ROM_LOAD       ( "sknsa1.u10", 0x000000, 0x080000, CRC(745e5212) SHA1(caba649ab2d83b2d7e007eecee0fc582c019df38) ) /* Asia BIOS */
13491359
13501360   ROM_REGION32_BE( 0x200000, "user1", 0 ) /* SH-2 Code mapped at 0x04000000 */
1351   ROM_LOAD16_BYTE( "plue5.u6", 0x000000, 0x080000, CRC(e6f3f82f) SHA1(ac61dc22fa3c1b1c2f3a41d3a8fb43938b77ca68) )
1352   ROM_LOAD16_BYTE( "plue5.u4", 0x000001, 0x080000, CRC(0d081d30) SHA1(ec0cdf120126104b9bb706f68c9ba9c3777dd69c) )
1361   ROM_LOAD16_BYTE( "pl0a3.u6", 0x000000, 0x080000, CRC(4e8673b8) SHA1(17acfb0550912e6f2519df2bc24fbf629a1f6147) )
1362   ROM_LOAD16_BYTE( "pl0a3.u4", 0x000001, 0x080000, CRC(e08a1a07) SHA1(aba58a81ae46c7b4e235a3213984026d170fa189) )
13531363
13541364   ROM_REGION( 0x800000, "gfx1", 0 )
13551365   ROM_LOAD( "pzl10000.u24", 0x000000, 0x400000, CRC(35bf6897) SHA1(8a1f1f5234a61971a62401633de1dec1920fc4da) )
r4441r4442
13891399   ROM_LOAD( "pzl30000.u4", 0x000000, 0x400000, CRC(38604b8d) SHA1(1191cf48a6a7baa58e51509442b40ea67f5252d2) )
13901400ROM_END
13911401
1402ROM_START( puzzloopu )
1403   ROM_REGION( 0x080000, "maincpu", 0 ) /* SH-2 Code */
1404   ROM_LOAD       ( "sknsu1.u10",   0x000000, 0x080000, CRC(384d21ec) SHA1(a27e8a18099d9cea64fa32db28d01101c2a78815) ) /* US BIOS */
1405
1406   ROM_REGION32_BE( 0x200000, "user1", 0 ) /* SH-2 Code mapped at 0x04000000 */
1407   ROM_LOAD16_BYTE( "plue5.u6", 0x000000, 0x080000, CRC(e6f3f82f) SHA1(ac61dc22fa3c1b1c2f3a41d3a8fb43938b77ca68) )
1408   ROM_LOAD16_BYTE( "plue5.u4", 0x000001, 0x080000, CRC(0d081d30) SHA1(ec0cdf120126104b9bb706f68c9ba9c3777dd69c) )
1409
1410   ROM_REGION( 0x800000, "gfx1", 0 )
1411   ROM_LOAD( "pzl10000.u24", 0x000000, 0x400000, CRC(35bf6897) SHA1(8a1f1f5234a61971a62401633de1dec1920fc4da) )
1412
1413   ROM_REGION( 0x400000, "gfx2", ROMREGION_DISPOSE )
1414   ROM_LOAD( "pzl20000.u16", 0x000000, 0x400000, CRC(ff558e68) SHA1(69a50c8100edbf2d5d92ce14b3f079f76c544bdd) )
1415
1416   ROM_REGION( 0x800000, "gfx3", ROMREGION_ERASE00 ) /* Tiles Plane B */
1417   /* First 0x040000 bytes (0x03ff Tiles) are RAM Based Tiles */
1418   /* 0x040000 - 0x3fffff empty? */
1419   ROM_LOAD( "pzl21000.u18", 0x400000, 0x400000, CRC(c8b3be64) SHA1(6da9ca8b963ebf10df6bc02bd1bdc66392e2fa60) )
1420
1421   ROM_REGION( 0x400000, "ymz", 0 ) /* Samples */
1422   ROM_LOAD( "pzl30000.u4", 0x000000, 0x400000, CRC(38604b8d) SHA1(1191cf48a6a7baa58e51509442b40ea67f5252d2) )
1423ROM_END
1424
13921425/* haven't even tried to run the ones below yet */
13931426
13941427ROM_START( jjparads )
r4441r4442
16201653GAME( 1996, skns,      0,        skns, skns,     0,         ROT0,  "Kaneko", "Super Kaneko Nova System BIOS", GAME_IS_BIOS_ROOT )
16211654
16221655GAME( 1996, galpani4,  skns,     skns, cyvern,   galpani4,  ROT0,  "Kaneko", "Gals Panic 4 (Japan)", GAME_IMPERFECT_GRAPHICS )
1656GAME( 1996, jjparads,  skns,     skns, skns_1p,  jjparads,  ROT0,  "Electro Design", "Jan Jan Paradise", GAME_IMPERFECT_GRAPHICS )
16231657GAME( 1997, galpanis,  skns,     skns, galpanis, galpanis,  ROT0,  "Kaneko", "Gals Panic S - Extra Edition (Japan)", GAME_IMPERFECT_GRAPHICS )
1658GAME( 1997, jjparad2,  skns,     skns, skns_1p,  jjparad2,  ROT0,  "Electro Design", "Jan Jan Paradise 2", GAME_IMPERFECT_GRAPHICS )
1659GAME( 1997, sengekis,  skns,     skns, skns,     sengekis,  ROT90, "Kaneko / Warashi", "Sengeki Striker (Asia)", GAME_IMPERFECT_GRAPHICS )
1660GAME( 1997, sengekij,  sengekis, skns, skns,     sengekij,  ROT90, "Kaneko / Warashi", "Sengeki Striker (Japan)", GAME_IMPERFECT_GRAPHICS )
1661GAME( 1997, vblokbrk,  skns,     skns, vblokbrk, sarukani,  ROT0,  "Kaneko / Mediaworks", "VS Block Breaker (Asia)", GAME_IMPERFECT_GRAPHICS )
1662GAME( 1997, sarukani,  vblokbrk, skns, vblokbrk, sarukani,  ROT0,  "Kaneko / Mediaworks", "Saru-Kani-Hamu-Zou (Japan)", GAME_IMPERFECT_GRAPHICS )
16241663GAME( 1998, cyvern,    skns,     skns, cyvern,   cyvern,    ROT90, "Kaneko", "Cyvern (Japan)", GAME_IMPERFECT_GRAPHICS )
1664GAME( 1998, puzzloop,  skns,     skns, puzzloop, puzzloop,  ROT0,  "Mitchell", "Puzz Loop (Europe)", GAME_IMPERFECT_GRAPHICS )
1665GAME( 1998, puzzloopj, puzzloop, skns, puzzloop, puzzloopj, ROT0,  "Mitchell", "Puzz Loop (Japan)", GAME_IMPERFECT_GRAPHICS )
1666GAME( 1998, puzzloopa, puzzloop, skns, puzzloop, puzzloopa, ROT0,  "Mitchell", "Puzz Loop (Asia)", GAME_IMPERFECT_GRAPHICS )
1667GAME( 1998, puzzloopk, puzzloop, skns, puzzloop, puzzloopu, ROT0,  "Mitchell", "Puzz Loop (Korea)", GAME_IMPERFECT_GRAPHICS ) // Same speed up as US version
1668GAME( 1998, puzzloopu, puzzloop, skns, puzzloop, puzzloopu, ROT0,  "Mitchell", "Puzz Loop (USA)", GAME_IMPERFECT_GRAPHICS )
1669GAME( 1998, ryouran ,  skns,     skns, skns_1p,  ryouran,   ROT0,  "Electro Design", "VS Mahjong Otome Ryouran", GAME_IMPERFECT_GRAPHICS )
16251670GAME( 1999, galpans2,  skns,     skns, galpanis, galpans2,  ROT0,  "Kaneko", "Gals Panic S2 (Japan)", GAME_IMPERFECT_GRAPHICS )
16261671GAME( 1999, galpans2a, galpans2, skns, galpanis, galpans2,  ROT0,  "Kaneko", "Gals Panic S2 (Asia)", GAME_IMPERFECT_GRAPHICS )
16271672GAME( 1999, galpansu,  galpans2, skns, galpanis, galpans2,  ROT0,  "Kaneko", "Gals Panic SU (Korea)", GAME_IMPERFECT_GRAPHICS ) // official or hack?
16281673GAME( 1999, panicstr,  skns,     skns, galpanis, panicstr,  ROT0,  "Kaneko", "Panic Street (Japan)", GAME_IMPERFECT_GRAPHICS )
16291674GAME( 1999, senknow ,  skns,     skns, skns,     senknow,   ROT0,  "Kaneko / Kouyousha", "Sen-Know (Japan)", GAME_IMPERFECT_GRAPHICS )
1675GAME( 1999, teljan  ,  skns,     skns, skns_1p,  teljan,    ROT0,  "Electro Design", "Tel Jan", GAME_IMPERFECT_GRAPHICS )
16301676GAME( 2000, gutsn,     skns,     skns, skns,     gutsn,     ROT0,  "Kaneko / Kouyousha", "Guts'n (Japan)", GAME_IMPERFECT_GRAPHICS ) // quite fragile, started working of it's own accord in 0.69 :)
1631GAME( 1998, puzzloop,  skns,     skns, puzzloop, puzzloop,  ROT0,  "Mitchell", "Puzz Loop (Europe)", GAME_IMPERFECT_GRAPHICS )
1632GAME( 1998, puzzloopj, puzzloop, skns, puzzloop, puzzloopj, ROT0,  "Mitchell", "Puzz Loop (Japan)", GAME_IMPERFECT_GRAPHICS )
1633GAME( 1998, puzzloopu, puzzloop, skns, puzzloop, puzzloopu, ROT0,  "Mitchell", "Puzz Loop (USA)", GAME_IMPERFECT_GRAPHICS )
1634GAME( 1998, puzzloopk, puzzloop, skns, puzzloop, puzzloopu, ROT0,  "Mitchell", "Puzz Loop (Korea)", GAME_IMPERFECT_GRAPHICS ) // Same speed up as US version
1635GAME( 1996, jjparads,  skns,     skns, skns_1p,  jjparads,  ROT0,  "Electro Design", "Jan Jan Paradise", GAME_IMPERFECT_GRAPHICS )
1636GAME( 1997, jjparad2,  skns,     skns, skns_1p,  jjparad2,  ROT0,  "Electro Design", "Jan Jan Paradise 2", GAME_IMPERFECT_GRAPHICS )
1637GAME( 1998, ryouran ,  skns,     skns, skns_1p,  ryouran,   ROT0,  "Electro Design", "VS Mahjong Otome Ryouran", GAME_IMPERFECT_GRAPHICS )
1638GAME( 1999, teljan  ,  skns,     skns, skns_1p,  teljan,    ROT0,  "Electro Design", "Tel Jan", GAME_IMPERFECT_GRAPHICS )
1639GAME( 1997, sengekis,  skns,     skns, skns,     sengekis,  ROT90, "Kaneko / Warashi", "Sengeki Striker (Asia)", GAME_IMPERFECT_GRAPHICS )
1640GAME( 1997, sengekij,  sengekis, skns, skns,     sengekij,  ROT90, "Kaneko / Warashi", "Sengeki Striker (Japan)", GAME_IMPERFECT_GRAPHICS )
1641GAME( 1997, vblokbrk,  skns,     skns, vblokbrk, sarukani,  ROT0,  "Kaneko / Mediaworks", "VS Block Breaker (Asia)", GAME_IMPERFECT_GRAPHICS )
1642GAME( 1997, sarukani,  vblokbrk, skns, vblokbrk, sarukani,  ROT0,  "Kaneko / Mediaworks", "Saru-Kani-Hamu-Zou (Japan)", GAME_IMPERFECT_GRAPHICS )
16431677GAME( 2002, galpans3,  skns,     skns, galpanis, galpans3,  ROT0,  "Kaneko", "Gals Panic S3 (Japan)", GAME_IMPERFECT_GRAPHICS )
16441678
src/mame/drivers/zn.c
r4441r4442
142142   { "shiryu2",  cp10, cp13 }, /* OK ( random crashes on bosses ) */
143143   { "beastrzr", et01, et02 }, /* OK */
144144   { "beastrzb", et01, et02 }, /* OK */
145   { "bldyror2", et01, et03 }, /* OK ( bad dump? ) */
145   { "bldyror2", et01, et03 }, /* OK */
146146   { "bam2",     et01, et05 },
147147   { "glpracr2", mg01, mg02 }, /* locks up when starting a game/entering test mode */
148148   { "glprac2j", mg01, mg02 }, /* locks up when starting a game/entering test mode */
r4441r4442
173173   { "gdarius",  tt01, tt07 }, /* OK */
174174   { "gdariusb", tt01, tt07 }, /* OK */
175175   { "gdarius2", tt01, tt07 }, /* OK */
176   { "taitogn",  tt10, tt16 }, /* shows gnet logo */
177176   { "aerofgts", kn01, kn02 }, /* OK */
178177   { "sncwgltd", kn01, kn02 }, /* OK */
179178   { NULL, NULL, NULL }
src/mame/drivers/itech32.c
r4441r4442
117117
118118****************************************************************************
119119
120Golden Tee 3D / World Class Bowling / Shuffleshot hardware (aka P/N 1083 PCB)
121Incredible Technologies, 1996-2002
122
123This covers all the Incredible Technologies games on the single large PCB
124
125PCB Layout
126----------
127
128P/N 1083 REV 2
129|----------------------------------------------------------------------|
130|SROM2 SROM1 SROM0 U88 LH5164                 XC7336(2)          GRM2_0|
131|                                  HM538123       8MHz       GRM1_0    |
132|SROM4 SROM3                       HM538123              GRM0_0        |
133|       68B09           CY7C199    HM538123   |------|           GRM2_1|
134|            PAL1 PAL2             HM538123   | IT42 |       GRM1_1    |
135|                       CY7C199    HM538123   |      |   GRM0_1        |
136|           16MHz                  HM538123   |------|           GRM2_3|
137|   ES5506              CY7C199                              GRM1_2    |
138|                       PROM1 PROM0   CY7C185            GRM0_2        |
139|   TDA1543 LED                       CY7C185    68EC020         GRM2_3|
140|   X9312WS X9312WS                   CY7C185          25MHz GRM1_3    |
141|    3403             TC551001        CY7C185            GRM0_3        |
142|TICKETS     BATTERY    PROM2 PROM3              XC7336(1)      PLAYER1|
143|                   LTC691                           DSW(4)            |
144|VOLUME                LT723                                    PLAYER2|
145|  TDA7240A             DSW(4)                 4MHz       PAL3         |
146|                                              PIC16C54 LED            |
147|------------------------------JAMMA-----------------------------------|
148Notes:
149      68EC020   - clock 25.000MHz
150      ES5506    - clock 16.000MHz
151      68B09     - clock 2.000MHz [16/8]
152      CY7C185   - 8k x8 SRAM
153      CY7C199   - 32k x8 SRAM
154      HM528123  - Hitachi HM538123 128k x8 VRAM
155      TC551001  - Toshiba TC551001 128k x8 SRAM
156      LH5164    - Sharp LH5164 8k x8 SRAM
157      XC7336(1) - XILINX XC7336 CPLD labelled 'ITMP3-15'
158      XC7336(2) - XILINX XC7336 CPLD labelled 'ITVR-1'
159      IT42      - Custom Incredible Technologies Graphics Generator (QFP208)
160
161      Measurements
162      ------------
163      X1    - 8.00006MHz
164      X2    - 25.00002MHz
165      X3    - 4.00000MHz
166      X5    - 15.99984MHz
167      VSync - 59.7612Hz
168      HSync - 15.6570kHz
169
170****************************************************************************
171
120172Hot Memory (German V1.2)
121173Tuning/Strata/Incredible Technologies, 1994
122174
r4441r4442
12901342
12911343   PORT_START("80000")
12921344   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1293   PORT_BIT( 0x00ff0000, 0x00000000, IPT_PEDAL ) PORT_MINMAX(0x00000000,0x00060000) PORT_SENSITIVITY(2) PORT_KEYDELTA(100) PORT_PLAYER(3)
1345   PORT_BIT( 0x00ff0000, 0x00000000, IPT_PEDAL3 ) PORT_MINMAX(0x00000000,0x00060000) PORT_SENSITIVITY(2) PORT_KEYDELTA(100)
12941346
12951347   PORT_START("82000")
12961348   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1297   PORT_BIT( 0x00ff0000, 0x00000000, IPT_PEDAL ) PORT_MINMAX(0x00000000,0x00060000) PORT_SENSITIVITY(2) PORT_KEYDELTA(100) PORT_PLAYER(2)
1349   PORT_BIT( 0x00ff0000, 0x00000000, IPT_PEDAL2 ) PORT_MINMAX(0x00000000,0x00060000) PORT_SENSITIVITY(2) PORT_KEYDELTA(100)   /* Brake */
12981350
12991351   PORT_START("STEER")      /* 88000 */
13001352   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(25) PORT_KEYDELTA(5)
src/mame/drivers/midzeus.c
r4441r4442
661661   PORT_DIPNAME( 0x0001, 0x0001, "Coinage Source" )
662662   PORT_DIPSETTING(      0x0001, "Dipswitch" )
663663   PORT_DIPSETTING(      0x0000, "CMOS" )
664   PORT_DIPNAME( 0x003e, 0x003e, DEF_STR( Coinage ))
664   PORT_DIPNAME( 0x003e, 0x003e, DEF_STR( Coinage ) )
665665   PORT_DIPSETTING(      0x003e, "USA-1" )
666666   PORT_DIPSETTING(      0x003c, "USA-2" )
667667   PORT_DIPSETTING(      0x003a, "USA-3" )
r4441r4442
679679   PORT_DIPSETTING(      0x001a, "French-3" )
680680   PORT_DIPSETTING(      0x0018, "French-4" )
681681   PORT_DIPSETTING(      0x0016, "French-ECA" )
682   PORT_DIPSETTING(      0x0030, DEF_STR( Free_Play ))
683   PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ))   /* Manual lists this dip as Unused */
684   PORT_DIPSETTING(      0x0040, DEF_STR( Off ))
685   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
682   PORT_DIPSETTING(      0x0030, DEF_STR( Free_Play ) )
683   PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )   /* Manual lists this dip as Unused */
684   PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
685   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
686686   PORT_DIPNAME( 0x0080, 0x0080, "Test Switch" )
687   PORT_DIPSETTING(      0x0080, DEF_STR( Off ))
688   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
687   PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
688   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
689689    PORT_DIPNAME( 0x0100, 0x0100, "Fatalities" )
690   PORT_DIPSETTING(      0x0000, DEF_STR( Off ))
691   PORT_DIPSETTING(      0x0100, DEF_STR( On ))
690   PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
691   PORT_DIPSETTING(      0x0100, DEF_STR( On ) )
692692    PORT_DIPNAME( 0x0200, 0x0200, "Blood" )
693   PORT_DIPSETTING(      0x0000, DEF_STR( Off ))
694   PORT_DIPSETTING(      0x0200, DEF_STR( On ))
695    PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown )) /* Manual states that switches 3-7 are Unused */
696   PORT_DIPSETTING(      0x0400, DEF_STR( Off ))
697   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
698    PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ))
699   PORT_DIPSETTING(      0x0800, DEF_STR( Off ))
700   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
701    PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ))
702    PORT_DIPSETTING(      0x1000, DEF_STR( Off ))
703    PORT_DIPSETTING(      0x0000, DEF_STR( On ))
704   PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ))
705   PORT_DIPSETTING(      0x2000, DEF_STR( Off ))
706   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
707   PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ))
708   PORT_DIPSETTING(      0x4000, DEF_STR( Off ))
709   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
710   PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ))
711   PORT_DIPSETTING(      0x8000, DEF_STR( Off ))
712   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
693   PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
694   PORT_DIPSETTING(      0x0200, DEF_STR( On ) )
695    PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) ) /* Manual states that switches 3-7 are Unused */
696   PORT_DIPSETTING(      0x0400, DEF_STR( Off ) )
697   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
698    PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
699   PORT_DIPSETTING(      0x0800, DEF_STR( Off ) )
700   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
701    PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
702    PORT_DIPSETTING(      0x1000, DEF_STR( Off ) )
703    PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
704   PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
705   PORT_DIPSETTING(      0x2000, DEF_STR( Off ) )
706   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
707   PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
708   PORT_DIPSETTING(      0x4000, DEF_STR( Off ) )
709   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
710   PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
711   PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
712   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
713713
714714   PORT_START("SYSTEM")
715715   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
r4441r4442
763763   PORT_DIPNAME( 0x0001, 0x0001, "Coinage Source" )
764764   PORT_DIPSETTING(      0x0001, "Dipswitch" )
765765   PORT_DIPSETTING(      0x0000, "CMOS" )
766   PORT_DIPNAME( 0x003e, 0x003e, DEF_STR( Coinage ))
766   PORT_DIPNAME( 0x003e, 0x003e, DEF_STR( Coinage ) )
767767   PORT_DIPSETTING(      0x003e, "USA-1" )
768768   PORT_DIPSETTING(      0x003c, "USA-2" )
769769   PORT_DIPSETTING(      0x003a, "USA-3" )
r4441r4442
784784   PORT_DIPSETTING(      0x0014, "French-11" )
785785   PORT_DIPSETTING(      0x0012, "French-12" )
786786   PORT_DIPSETTING(      0x0016, "French-ECA" )
787   PORT_DIPSETTING(      0x0030, DEF_STR( Free_Play ))
787   PORT_DIPSETTING(      0x0030, DEF_STR( Free_Play ) )
788788   PORT_DIPNAME( 0x0040, 0x0040, "Flip Y" )
789   PORT_DIPSETTING(      0x0040, DEF_STR( Off ))
790   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
789   PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
790   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
791791   PORT_DIPNAME( 0x0080, 0x0080, "Test Switch" )
792   PORT_DIPSETTING(      0x0080, DEF_STR( Off ))
793   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
792   PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
793   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
794794   PORT_DIPNAME( 0x0100, 0x0100, "Mirrored Display" )
795   PORT_DIPSETTING(      0x0100, DEF_STR( Off ))
796   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
795   PORT_DIPSETTING(      0x0100, DEF_STR( Off ) )
796   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
797797   PORT_DIPNAME( 0x0200, 0x0200, "Show Blood" )
798   PORT_DIPSETTING(      0x0000, DEF_STR( Off ))
799   PORT_DIPSETTING(      0x0200, DEF_STR( On ))
800   PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ))
801   PORT_DIPSETTING(      0x0400, DEF_STR( Off ))
802   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
803   PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ))
804   PORT_DIPSETTING(      0x0800, DEF_STR( Off ))
805   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
806   PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ))
807   PORT_DIPSETTING(      0x1000, DEF_STR( Off ))
808   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
809   PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ))
810   PORT_DIPSETTING(      0x2000, DEF_STR( Off ))
811   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
812   PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ))
813   PORT_DIPSETTING(      0x4000, DEF_STR( Off ))
814   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
815   PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ))
816   PORT_DIPSETTING(      0x8000, DEF_STR( Off ))
817   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
798   PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
799   PORT_DIPSETTING(      0x0200, DEF_STR( On ) )
800   PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) )
801   PORT_DIPSETTING(      0x0400, DEF_STR( Off ) )
802   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
803   PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) )
804   PORT_DIPSETTING(      0x0800, DEF_STR( Off ) )
805   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
806   PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) )
807   PORT_DIPSETTING(      0x1000, DEF_STR( Off ) )
808   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
809   PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) )
810   PORT_DIPSETTING(      0x2000, DEF_STR( Off ) )
811   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
812   PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )
813   PORT_DIPSETTING(      0x4000, DEF_STR( Off ) )
814   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
815   PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
816   PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
817   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
818818
819819   PORT_START("SYSTEM")
820820   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
r4441r4442
887887    PORT_DIPSETTING(      0x0020, "Mode 3" ) /* USA7/GER1/FRA1/SPN1/AUSTRIA1/GEN5/CAN3/SWI3/ITL3/JPN3/TWN3/BLGN3 */
888888    PORT_DIPSETTING(      0x0000, "Mode 4" ) /* USA8/GER1/FRA1/SPN1/AUSTRIA1/GEN7 */
889889   PORT_DIPNAME( 0x0080, 0x0080, "Test Switch" )
890   PORT_DIPSETTING(      0x0080, DEF_STR( Off ))
891   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
890   PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
891   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
892892    PORT_DIPNAME( 0x0100, 0x0100, "Game Type" )   /* Manual states "*DIP 1, Switch 1 MUST be set */
893893    PORT_DIPSETTING(      0x0100, "Dedicated" )   /*   to OFF position for proper operation" */
894894    PORT_DIPSETTING(      0x0000, "Kit" )
895895    PORT_DIPNAME( 0x0200, 0x0200, "Seat Motion" )   /* For dedicated Sit Down models with Motion Seat */
896     PORT_DIPSETTING(      0x0200, DEF_STR( Off ))
897     PORT_DIPSETTING(      0x0000, DEF_STR( On ))
898    PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Cabinet ))
896     PORT_DIPSETTING(      0x0200, DEF_STR( Off ) )
897     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
898    PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Cabinet ) )
899899    PORT_DIPSETTING(      0x0400, "Stand Up" )
900900    PORT_DIPSETTING(      0x0000, "Sit Down" )
901901    PORT_DIPNAME( 0x0800, 0x0800, "Wheel Invert" )
902     PORT_DIPSETTING(      0x0800, DEF_STR( Off ))
903     PORT_DIPSETTING(      0x0000, DEF_STR( On ))
902     PORT_DIPSETTING(      0x0800, DEF_STR( Off ) )
903     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
904904    PORT_DIPNAME( 0x1000, 0x1000, "ROM Configuration" )   /* Manual lists this dip as Unused */
905905    PORT_DIPSETTING(      0x1000, "32M ROM Normal" )
906906     PORT_DIPSETTING(      0x0000, "16M ROM Split Active" )
907907    PORT_DIPNAME( 0x2000, 0x2000, "Link" )
908    PORT_DIPSETTING(      0x2000, DEF_STR( Off ))
909     PORT_DIPSETTING(      0x0000, DEF_STR( On ))
908    PORT_DIPSETTING(      0x2000, DEF_STR( Off ) )
909     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
910910    PORT_DIPNAME( 0xc000, 0xc000, "Linking I.D.")
911911    PORT_DIPSETTING(      0xc000, "Master #1" )
912912    PORT_DIPSETTING(      0x8000, "Slave #2" )
r4441r4442
931931   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BILL1 )
932932
933933   PORT_START("IN1")   /* Listed "names" are via the manual's "JAMMA" pinout sheet" */
934   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )   /* Not Used */
935   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON6 )   /* Radio Switch */
936   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )   /* Not Used */
937   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )   /* Not Used */
938   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) /* View 1 */
939   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) /* View 2 */
940   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) /* View 3 */
941   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) /* View 4 */
942   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON2 )    /* Gear 1 */
943   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 )    /* Gear 2 */
944   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 )    /* Gear 3 */
945   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON5 )    /* Gear 4 */
946   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )   /* Not Used */
947   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )   /* Not Used */
948   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )   /* Not Used */
934   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )                     /* Not Used */
935   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("Radio")      /* Radio Switch */
936   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )                     /* Not Used */
937   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )                     /* Not Used */
938   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("View 1")      /* View 1 */
939   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("View 2")      /* View 2 */
940   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME("View 3")      /* View 3 */
941   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("View 4")      /* View 4 */
942   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("1st Gear")   /* Gear 1 */
943   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("2nd Gear")    /* Gear 2 */
944   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("3rd Gear")    /* Gear 3 */
945   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("4th Gear")    /* Gear 4 */
946   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )                     /* Not Used */
947   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )                     /* Not Used */
948   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )                     /* Not Used */
949949   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
950950
951951   PORT_START("IN2")
r4441r4442
953953   PORT_BIT( 0xfff8, IP_ACTIVE_LOW, IPT_UNUSED )
954954
955955   PORT_START("KEYPAD")
956   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3)   /* keypad 3 */
957   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)   /* keypad 1 */
958   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)   /* keypad 2 */
959   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(3)   /* keypad 6 */
960   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(3)   /* keypad 4 */
961   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(3)   /* keypad 5 */
962   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_PLAYER(3)   /* keypad 9 */
963   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER(3)   /* keypad 7 */
964   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_PLAYER(3)   /* keypad 8 */
965   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON12 ) PORT_PLAYER(3)   /* keypad # */
966   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON11 ) PORT_PLAYER(3)   /* keypad * */
967   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_PLAYER(3)   /* keypad 0 */
956   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_NAME("Keypad 3") PORT_CODE(KEYCODE_3_PAD)   /* keypad 3 */
957   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_NAME("Keypad 1") PORT_CODE(KEYCODE_1_PAD)   /* keypad 1 */
958   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_NAME("Keypad 2") PORT_CODE(KEYCODE_2_PAD)   /* keypad 2 */
959   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_NAME("Keypad 6") PORT_CODE(KEYCODE_6_PAD)   /* keypad 6 */
960   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_NAME("Keypad 4") PORT_CODE(KEYCODE_4_PAD)   /* keypad 4 */
961   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_NAME("Keypad 5") PORT_CODE(KEYCODE_5_PAD)   /* keypad 5 */
962   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_NAME("Keypad 9") PORT_CODE(KEYCODE_9_PAD)   /* keypad 9 */
963   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_NAME("Keypad 7") PORT_CODE(KEYCODE_7_PAD)   /* keypad 7 */
964   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_NAME("Keypad 8") PORT_CODE(KEYCODE_8_PAD)   /* keypad 8 */
965   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_NAME("Keypad #") PORT_CODE(KEYCODE_PLUS_PAD)   /* keypad # */
966   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_NAME("Keypad *") PORT_CODE(KEYCODE_MINUS_PAD)   /* keypad * */
967   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_NAME("Keypad 0") PORT_CODE(KEYCODE_0_PAD)   /* keypad 0 */
968968
969969   PORT_START("ANALOG3")
970970   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(25) PORT_KEYDELTA(20)
r4441r4442
983983static INPUT_PORTS_START( thegrid )
984984   PORT_START("DIPS")      /* DS1 */
985985    PORT_DIPNAME( 0x0001, 0x0001, "Show Blood" )
986   PORT_DIPSETTING(      0x0001, DEF_STR( Off ))
987   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
988    PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown )) /* Manual states that switches 2-7 are Unused */
989   PORT_DIPSETTING(      0x0002, DEF_STR( Off ))
990   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
991   PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ))
992   PORT_DIPSETTING(      0x0004, DEF_STR( Off ))
993   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
994    PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ))
995   PORT_DIPSETTING(      0x0000, DEF_STR( Off ))
996   PORT_DIPSETTING(      0x0008, DEF_STR( On ))
997    PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ))
998    PORT_DIPSETTING(      0x0010, DEF_STR( Off ))
999    PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1000   PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ))
1001   PORT_DIPSETTING(      0x0020, DEF_STR( Off ))
1002   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1003   PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ))
1004   PORT_DIPSETTING(      0x0040, DEF_STR( Off ))
1005   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1006   PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ))
1007   PORT_DIPSETTING(      0x0080, DEF_STR( Off ))
1008   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
986   PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
987   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
988    PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) /* Manual states that switches 2-7 are Unused */
989   PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
990   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
991   PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) )
992   PORT_DIPSETTING(      0x0004, DEF_STR( Off ) )
993   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
994    PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) )
995   PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
996   PORT_DIPSETTING(      0x0008, DEF_STR( On ) )
997    PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) )
998    PORT_DIPSETTING(      0x0010, DEF_STR( Off ) )
999    PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1000   PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) )
1001   PORT_DIPSETTING(      0x0020, DEF_STR( Off ) )
1002   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1003   PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
1004   PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
1005   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1006   PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) )
1007   PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
1008   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
10091009   PORT_DIPNAME( 0x0100, 0x0100, "Coinage Source" )
10101010   PORT_DIPSETTING(      0x0100, "Dipswitch" )
10111011   PORT_DIPSETTING(      0x0000, "CMOS" )
1012   PORT_DIPNAME( 0x3e00, 0x3e00, DEF_STR( Coinage ))
1012   PORT_DIPNAME( 0x3e00, 0x3e00, DEF_STR( Coinage ) )
10131013   PORT_DIPSETTING(      0x3e00, "USA-1" )
10141014   PORT_DIPSETTING(      0x3800, "USA-2" )
10151015   PORT_DIPSETTING(      0x3c00, "USA-10" )
r4441r4442
10411041   PORT_DIPSETTING(      0x0a00, "UK-3 ECA" )
10421042   PORT_DIPSETTING(      0x0400, "UK-6 ECA" )
10431043   PORT_DIPSETTING(      0x0200, "UK-7 ECA" )
1044   PORT_DIPSETTING(      0x0000, DEF_STR( Free_Play ))
1045   PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ))   /* Manual states switches 7 & 8 are Unused */
1046   PORT_DIPSETTING(      0x4000, DEF_STR( Off ))
1047   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1048   PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ))
1049   PORT_DIPSETTING(      0x8000, DEF_STR( Off ))
1050   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1044   PORT_DIPSETTING(      0x0000, DEF_STR( Free_Play ) )
1045   PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) )   /* Manual states switches 7 & 8 are Unused */
1046   PORT_DIPSETTING(      0x4000, DEF_STR( Off ) )
1047   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
1048   PORT_DIPNAME( 0x8000, 0x8000, DEF_STR( Unknown ) )
1049   PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
1050   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
10511051
10521052   PORT_START("SYSTEM")
10531053   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
src/mame/drivers/vegas.c
r4441r4442
17241724static INPUT_PORTS_START( vegas_common )
17251725   PORT_START("DIPS")
17261726   PORT_DIPNAME( 0x0001, 0x0001, "Unknown0001" )
1727   PORT_DIPSETTING(      0x0001, DEF_STR( Off ))
1728   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1727   PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
1728   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17291729   PORT_DIPNAME( 0x0002, 0x0002, "Unknown0002" )
1730   PORT_DIPSETTING(      0x0002, DEF_STR( Off ))
1731   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1730   PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
1731   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17321732   PORT_DIPNAME( 0x0004, 0x0004, "Unknown0004" )
1733   PORT_DIPSETTING(      0x0004, DEF_STR( Off ))
1734   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1733   PORT_DIPSETTING(      0x0004, DEF_STR( Off ) )
1734   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17351735   PORT_DIPNAME( 0x0008, 0x0008, "Unknown0008" )
1736   PORT_DIPSETTING(      0x0008, DEF_STR( Off ))
1737   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1736   PORT_DIPSETTING(      0x0008, DEF_STR( Off ) )
1737   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17381738   PORT_DIPNAME( 0x0010, 0x0010, "Unknown0010" )
1739   PORT_DIPSETTING(      0x0010, DEF_STR( Off ))
1740   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1739   PORT_DIPSETTING(      0x0010, DEF_STR( Off ) )
1740   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17411741   PORT_DIPNAME( 0x0020, 0x0020, "Unknown0020" )
1742   PORT_DIPSETTING(      0x0020, DEF_STR( Off ))
1743   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1742   PORT_DIPSETTING(      0x0020, DEF_STR( Off ) )
1743   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17441744   PORT_DIPNAME( 0x0040, 0x0040, "Unknown0040" )
1745   PORT_DIPSETTING(      0x0040, DEF_STR( Off ))
1746   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1745   PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
1746   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17471747   PORT_DIPNAME( 0x0080, 0x0080, "Unknown0080" )
1748   PORT_DIPSETTING(      0x0080, DEF_STR( Off ))
1749   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1748   PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
1749   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17501750   PORT_DIPNAME( 0x0100, 0x0100, "Unknown0100" )
1751   PORT_DIPSETTING(      0x0100, DEF_STR( Off ))
1752   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1751   PORT_DIPSETTING(      0x0100, DEF_STR( Off ) )
1752   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17531753   PORT_DIPNAME( 0x0200, 0x0200, "Unknown0200" )
1754   PORT_DIPSETTING(      0x0200, DEF_STR( Off ))
1755   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1754   PORT_DIPSETTING(      0x0200, DEF_STR( Off ) )
1755   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17561756   PORT_DIPNAME( 0x0400, 0x0400, "Unknown0400" )
1757   PORT_DIPSETTING(      0x0400, DEF_STR( Off ))
1758   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1757   PORT_DIPSETTING(      0x0400, DEF_STR( Off ) )
1758   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17591759   PORT_DIPNAME( 0x0800, 0x0800, "Unknown0800" )
1760   PORT_DIPSETTING(      0x0800, DEF_STR( Off ))
1761   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1760   PORT_DIPSETTING(      0x0800, DEF_STR( Off ) )
1761   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17621762   PORT_DIPNAME( 0x1000, 0x1000, "Unknown1000" )
1763   PORT_DIPSETTING(      0x1000, DEF_STR( Off ))
1764   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1763   PORT_DIPSETTING(      0x1000, DEF_STR( Off ) )
1764   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17651765   PORT_DIPNAME( 0x2000, 0x2000, "Unknown2000" )
1766   PORT_DIPSETTING(      0x2000, DEF_STR( Off ))
1767   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1766   PORT_DIPSETTING(      0x2000, DEF_STR( Off ) )
1767   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17681768   PORT_DIPNAME( 0x4000, 0x4000, "Unknown4000" )
1769   PORT_DIPSETTING(      0x4000, DEF_STR( Off ))
1770   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1769   PORT_DIPSETTING(      0x4000, DEF_STR( Off ) )
1770   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17711771   PORT_DIPNAME( 0x8000, 0x8000, "Unknown8000" )
1772   PORT_DIPSETTING(      0x8000, DEF_STR( Off ))
1773   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1772   PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
1773   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17741774
17751775   PORT_START("SYSTEM")
17761776   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
r4441r4442
18421842   PORT_DIPSETTING(      0x0001, "Watchdog resets only" )
18431843   PORT_DIPSETTING(      0x0000, "All resets" )
18441844   PORT_DIPNAME( 0x0040, 0x0040, "Boot ROM Test" )
1845   PORT_DIPSETTING(      0x0040, DEF_STR( Off ))
1846   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1845   PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
1846   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
18471847   PORT_DIPNAME( 0x0800, 0x0800, "SIO Rev" )
18481848   PORT_DIPSETTING(      0x0800, "1 or later")
18491849   PORT_DIPSETTING(      0x0000, "0")
r4441r4442
18741874   PORT_DIPSETTING(      0x0004, "8MB" )
18751875   PORT_DIPSETTING(      0x0000, "32MB" )
18761876   PORT_DIPNAME( 0x0040, 0x0040, "Boot ROM Test" )
1877   PORT_DIPSETTING(      0x0040, DEF_STR( Off ))
1878   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1877   PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
1878   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
18791879   PORT_DIPNAME( 0x0800, 0x0800, "SIO Rev" )
18801880   PORT_DIPSETTING(      0x0800, "1 or later")
18811881   PORT_DIPSETTING(      0x0000, "0")
r4441r4442
18971897
18981898   PORT_MODIFY("DIPS")
18991899   PORT_DIPNAME( 0x0040, 0x0040, "Boot ROM Test" )
1900   PORT_DIPSETTING(      0x0040, DEF_STR( Off ))
1901   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1900   PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
1901   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
19021902   PORT_DIPNAME( 0xc000, 0xc000, "Resolution" )
19031903   PORT_DIPSETTING(      0xc000, "Standard Res 512x256" )
19041904   PORT_DIPSETTING(      0x4000, "Medium Res 512x384" )
r4441r4442
19271927   PORT_DIPSETTING(      0x0002, "4" )
19281928   PORT_DIPSETTING(      0x0000, "?" )
19291929   PORT_DIPNAME( 0x0040, 0x0040, "Boot ROM Test" )
1930   PORT_DIPSETTING(      0x0040, DEF_STR( Off ))
1931   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1930   PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
1931   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
19321932   PORT_DIPNAME( 0xc000, 0x4000, "Resolution" )
19331933   PORT_DIPSETTING(      0xc000, "Standard Res 512x256" )
19341934   PORT_DIPSETTING(      0x4000, "Medium Res 512x384" )
r4441r4442
19651965
19661966   PORT_MODIFY("DIPS")
19671967   PORT_DIPNAME( 0x0002, 0x0002, "Boot ROM Test" )
1968   PORT_DIPSETTING(      0x0002, DEF_STR( Off ))
1969   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1968   PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
1969   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
19701970   PORT_DIPNAME( 0x0040, 0x0040, "Quantum 3dfx card rev" )
19711971   PORT_DIPSETTING(      0x0040, "4" )
19721972   PORT_DIPSETTING(      0x0000, "?" )
r4441r4442
19781978   PORT_DIPSETTING(      0x0200, "Medium Res 512x384" )
19791979   PORT_DIPSETTING(      0x0000, "VGA Res 640x480" )
19801980
1981   PORT_START("AN0")
1981   PORT_START("AN0")   /* Steer */
19821982   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x10, 0xf0) PORT_SENSITIVITY(25) PORT_KEYDELTA(5)
19831983
1984   PORT_START("AN1")
1984   PORT_START("AN1")   /* Accel */
19851985   PORT_BIT( 0xff, 0x80, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(20)
19861986
1987   PORT_START("AN2")
1988   PORT_BIT( 0xff, 0x80, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(100) PORT_PLAYER(2)
1987   PORT_START("AN2")   /* Brake */
1988   PORT_BIT( 0xff, 0x80, IPT_PEDAL2 ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(100)
19891989
19901990   PORT_START("AN3")
19911991   PORT_BIT( 0xff, 0x80, IPT_SPECIAL )
r4441r4442
20112011   PORT_DIPNAME( 0x0001, 0x0000, "Coinage Source" )
20122012   PORT_DIPSETTING(      0x0001, "Dipswitch" )
20132013   PORT_DIPSETTING(      0x0000, "CMOS" )
2014   PORT_DIPNAME( 0x000e, 0x000e, DEF_STR( Coinage ))
2014   PORT_DIPNAME( 0x000e, 0x000e, DEF_STR( Coinage ) )
20152015   PORT_DIPSETTING(      0x000e, "Mode 1" )
20162016   PORT_DIPSETTING(      0x0008, "Mode 2" )
20172017   PORT_DIPSETTING(      0x0009, "Mode 3" )
r4441r4442
20192019   PORT_DIPSETTING(      0x000c, "Mode ECA" )
20202020//  PORT_DIPSETTING(      0x0004, "Not Used 1" )        /* Marked as Unused in the manual */
20212021//  PORT_DIPSETTING(      0x0008, "Not Used 2" )        /* Marked as Unused in the manual */
2022   PORT_DIPSETTING(      0x0000, DEF_STR( Free_Play ))
2022   PORT_DIPSETTING(      0x0000, DEF_STR( Free_Play ) )
20232023   PORT_DIPNAME( 0x0030, 0x0030, "Curency Type" )
2024   PORT_DIPSETTING(      0x0030, DEF_STR( USA ))
2025   PORT_DIPSETTING(      0x0020, DEF_STR( French ))
2026   PORT_DIPSETTING(      0x0010, DEF_STR( German ))
2024   PORT_DIPSETTING(      0x0030, DEF_STR( USA ) )
2025   PORT_DIPSETTING(      0x0020, DEF_STR( French ) )
2026   PORT_DIPSETTING(      0x0010, DEF_STR( German ) )
20272027//  PORT_DIPSETTING(      0x0000, "Not Used" )      /* Marked as Unused in the manual */
2028   PORT_DIPSETTING(      0x0000, DEF_STR( Free_Play ))
2029   PORT_DIPNAME( 0x0040, 0x0000, DEF_STR( Unknown ))   /* Marked as Unused in the manual */
2028   PORT_DIPSETTING(      0x0000, DEF_STR( Free_Play ) )
2029   PORT_DIPNAME( 0x0040, 0x0000, DEF_STR( Unknown ) )   /* Marked as Unused in the manual */
20302030   PORT_DIPSETTING(      0x0040, "0" )
20312031   PORT_DIPSETTING(      0x0000, "1" )
20322032   PORT_DIPNAME( 0x0080, 0x0080, "Game" )
r4441r4442
20492049   PORT_DIPSETTING(      0x2000, "2" )
20502050   PORT_DIPSETTING(      0x0000, "4" )
20512051   PORT_DIPNAME( 0x4000, 0x0000, "Power On Self Test" )
2052   PORT_DIPSETTING(      0x0000, DEF_STR( No ))
2053   PORT_DIPSETTING(      0x4000, DEF_STR( Yes ))
2052   PORT_DIPSETTING(      0x0000, DEF_STR( No ) )
2053   PORT_DIPSETTING(      0x4000, DEF_STR( Yes ) )
20542054   PORT_DIPNAME( 0x8000, 0x8000, "Test Switch" )
2055   PORT_DIPSETTING(      0x8000, DEF_STR( Off ))
2056   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
2055   PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
2056   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
20572057INPUT_PORTS_END
20582058
20592059
r4441r4442
20622062
20632063   PORT_MODIFY("DIPS")
20642064   PORT_DIPNAME( 0x0003, 0x0003, "Test Mode" )
2065   PORT_DIPSETTING(      0x0003, DEF_STR( Off ))
2065   PORT_DIPSETTING(      0x0003, DEF_STR( Off ) )
20662066   PORT_DIPSETTING(      0x0002, "Disk-based Test" )
20672067   PORT_DIPSETTING(      0x0001, "EPROM-based Test" )
20682068   PORT_DIPSETTING(      0x0000, "Interactive Diagnostics" )
r4441r4442
20742074   PORT_DIPSETTING(      0x0200, "Medium Res 512x384" )
20752075   PORT_DIPSETTING(      0x0300, "VGA Res 640x480" )
20762076
2077   PORT_START("AN0")
2077   PORT_START("AN0")   /* Steer */
20782078   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x10, 0xf0) PORT_SENSITIVITY(25) PORT_KEYDELTA(5)
20792079
2080   PORT_START("AN1")
2080   PORT_START("AN1")   /* Accel */
20812081   PORT_BIT( 0xff, 0x80, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(20)
20822082
2083   PORT_START("AN2")
2084   PORT_BIT( 0xff, 0x80, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(100) PORT_PLAYER(2)
2083   PORT_START("AN2")   /* Brake */
2084   PORT_BIT( 0xff, 0x80, IPT_PEDAL2 ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(100)
20852085
20862086   PORT_START("AN3")
20872087   PORT_BIT( 0xff, 0x80, IPT_SPECIAL )
r4441r4442
21052105
21062106   PORT_MODIFY("DIPS")
21072107
2108   PORT_START("AN0")
2108   PORT_START("AN0")   /* Steer */
21092109   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x10, 0xf0) PORT_SENSITIVITY(25) PORT_KEYDELTA(5)
21102110
2111   PORT_START("AN1")
2111   PORT_START("AN1")   /* Accel */
21122112   PORT_BIT( 0xff, 0x80, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(20)
21132113
2114   PORT_START("AN2")
2115   PORT_BIT( 0xff, 0x80, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(100) PORT_PLAYER(2)
2114   PORT_START("AN2")   /* Brake */
2115   PORT_BIT( 0xff, 0x80, IPT_PEDAL2 ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(100)
21162116
21172117   PORT_START("AN3")
21182118   PORT_BIT( 0xff, 0x80, IPT_SPECIAL )
r4441r4442
21362136
21372137   PORT_MODIFY("DIPS")
21382138
2139   PORT_START("AN0")
2139   PORT_START("AN0")   /* Steer */
21402140   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x10, 0xf0) PORT_SENSITIVITY(25) PORT_KEYDELTA(5)
21412141
2142   PORT_START("AN1")
2142   PORT_START("AN1")   /* Accel */
21432143   PORT_BIT( 0xff, 0x80, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(20)
21442144
2145   PORT_START("AN2")
2146   PORT_BIT( 0xff, 0x80, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(100) PORT_PLAYER(2)
2145   PORT_START("AN2")   /* Brake */
2146   PORT_BIT( 0xff, 0x80, IPT_PEDAL2 ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(100)
21472147
21482148   PORT_START("AN3")
21492149   PORT_BIT( 0xff, 0x80, IPT_SPECIAL )
r4441r4442
21672167
21682168   PORT_MODIFY("DIPS")
21692169
2170   PORT_START("AN0")
2170   PORT_START("AN0")   /* Steer */
21712171   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x10, 0xf0) PORT_SENSITIVITY(25) PORT_KEYDELTA(5)
21722172
2173   PORT_START("AN1")
2173   PORT_START("AN1")   /* Accel */
21742174   PORT_BIT( 0xff, 0x80, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(20)
21752175
2176   PORT_START("AN2")
2177   PORT_BIT( 0xff, 0x80, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(100) PORT_PLAYER(2)
2176   PORT_START("AN2")   /* Brake */
2177   PORT_BIT( 0xff, 0x80, IPT_PEDAL2 ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(100)
21782178
21792179   PORT_START("AN3")
21802180   PORT_BIT( 0xff, 0x80, IPT_SPECIAL )
src/mame/drivers/mazerbla.c
r4441r4442
16761676
16771677GAME( 1983, mazerbla, 0,        mazerbla,  mazerbla, 0, ROT0, "Stern", "Mazer Blazer (set 1)", GAME_IMPERFECT_GRAPHICS |GAME_NO_SOUND | GAME_NOT_WORKING )
16781678GAME( 1983, mzrblzra, mazerbla, mazerbla,  mazerbla, 0, ROT0, "Stern", "Mazer Blazer (set 2)", GAME_IMPERFECT_GRAPHICS |GAME_NO_SOUND | GAME_NOT_WORKING )
1679GAME( 1983, greatgun, 0,        greatgun,  greatgun, 0, ROT0, "Stern", "Great Guns", GAME_IMPERFECT_GRAPHICS )
1679GAME( 1983, greatgun, 0,        greatgun,  greatgun, 0, ROT0, "Stern", "Great Guns", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING )
16801680
16811681
src/mame/drivers/pengo.c
r4441r4442
137137   AM_RANGE(0x9046, 0x9046) AM_WRITE(pengo_colortablebank_w)
138138   AM_RANGE(0x9047, 0x9047) AM_WRITE(jrpacman_charbank_w)
139139   AM_RANGE(0x9070, 0x9070) AM_WRITE(SMH_NOP)
140   AM_RANGE(0x9080, 0x90bf) AM_READ_PORT("P1")
141   AM_RANGE(0x90c0, 0x90ff) AM_READ_PORT("P2")
140   AM_RANGE(0x9080, 0x90bf) AM_READ_PORT("P2")
141   AM_RANGE(0x90c0, 0x90ff) AM_READ_PORT("P1")
142142ADDRESS_MAP_END
143143
144144
src/mame/drivers/model1.c
r4441r4442
10451045   PORT_BIT( 0xff, 0x30, IPT_PEDAL ) PORT_MINMAX(1,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
10461046
10471047   PORT_START("AN2")   /* Brake */
1048   PORT_BIT( 0xff, 0x30, IPT_PEDAL ) PORT_MINMAX(1,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(16) PORT_PLAYER(2)
1048   PORT_BIT( 0xff, 0x30, IPT_PEDAL2 ) PORT_MINMAX(1,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
10491049
10501050   PORT_START("IN0")
10511051   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
r4441r4442
10531053   PORT_SERVICE_NO_TOGGLE(0x0004, IP_ACTIVE_LOW)
10541054   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE1 )
10551055   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 )
1056   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
1057   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
1058   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
1056   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("VR1 (Red)") PORT_PLAYER(1)
1057   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("VR2 (Blue)") PORT_PLAYER(1)
1058   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("VR3 (Yellow)") PORT_PLAYER(1)
10591059   PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
10601060
10611061   PORT_START("IN1")
1062   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
1062   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("VR4 (Green)") PORT_PLAYER(1)
10631063   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNUSED )
10641064   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNUSED )
10651065   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED )
1066   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1)
1067   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1)
1066   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Shift Down") PORT_PLAYER(1)
1067   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("Shift Up") PORT_PLAYER(1)
10681068   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
10691069   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
10701070   PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
src/mame/drivers/suna8.c
r4441r4442
2323
2424To Do:
2525
26- Samples playing in rranger, starfigh, sparkman (AY8910 ports A&B)
26- Samples playing in starfigh, sparkman (AY8910 ports A&B)
2727
2828Notes:
2929
r4441r4442
576576*/
577577static READ8_HANDLER( rranger_soundstatus_r )
578578{
579   soundlatch2_r(space, offset);
579580   return 0x02;
580581}
581582
r4441r4442
996997static ADDRESS_MAP_START( rranger_sound_writemem, ADDRESS_SPACE_PROGRAM, 8 )
997998   AM_RANGE(0x0000, 0x7fff) AM_WRITE(SMH_ROM               )   // ROM
998999   AM_RANGE(0xc000, 0xc7ff) AM_WRITE(SMH_RAM               )   // RAM
999   AM_RANGE(0xd000, 0xd000) AM_WRITE(soundlatch2_w            )   //
1000   AM_RANGE(0xa000, 0xa001) AM_DEVWRITE("ym1", ym2203_w )
1001   AM_RANGE(0xa002, 0xa003) AM_DEVWRITE("ym2", ym2203_w   )
1000   AM_RANGE(0xd000, 0xd000) AM_WRITE(soundlatch2_w            )   // To Sound CPU
1001   AM_RANGE(0xa000, 0xa001) AM_DEVWRITE("ym1", ym2203_w         )   // Samples + Music
1002   AM_RANGE(0xa002, 0xa003) AM_DEVWRITE("ym2", ym2203_w         )   // Music + FX
10021003ADDRESS_MAP_END
10031004
10041005
r4441r4442
15301531
15311532/* 1 x 24 MHz crystal */
15321533
1534static const ym2203_interface rranger_ym2203_interface =
1535{
1536   {
1537   AY8910_LEGACY_OUTPUT,
1538   AY8910_DEFAULT_LOADS,
1539   DEVCB_NULL,
1540   DEVCB_NULL,
1541   DEVCB_DEVICE_HANDLER("samples", rranger_play_samples_w),
1542   DEVCB_DEVICE_HANDLER("samples", suna8_samples_number_w),
1543   }
1544};
1545
15331546/* 2203 + 8910 */
15341547static MACHINE_DRIVER_START( rranger )
15351548
r4441r4442
15611574   MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
15621575
15631576   MDRV_SOUND_ADD("ym1", YM2203, SUNA8_MASTER_CLOCK / 6)
1564   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
1565   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
1577   MDRV_SOUND_CONFIG(rranger_ym2203_interface)
1578   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.90)
1579   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.90)
15661580
15671581   MDRV_SOUND_ADD("ym2", YM2203, SUNA8_MASTER_CLOCK / 6)
1582   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.90)
1583   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.90)
1584
1585   MDRV_SOUND_ADD("samples", SAMPLES, 0)
1586   MDRV_SOUND_CONFIG(suna8_samples_interface)
15681587   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
15691588   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
15701589MACHINE_DRIVER_END
r4441r4442
23232342}
23242343
23252344/* Working Games */
2326GAME( 1988, rranger,  0,        rranger,  rranger,  suna8,    ROT0,  "SunA (Sharp Image license)", "Rough Ranger (v2.0)", GAME_IMPERFECT_SOUND )
2327GAME( 1988, hardhead, 0,        hardhead, hardhead, hardhead, ROT0,  "SunA",                       "Hard Head"                           , 0)
2328GAME( 1988, hardhedb, hardhead, hardhead, hardhead, hardhedb, ROT0,  "bootleg",                    "Hard Head (bootleg)"                  , 0)
2329GAME( 1988, pop_hh,   hardhead, hardhead, hardhead, hardhedb, ROT0,  "bootleg",                    "Popper (Hard Head bootleg)"            , 0)
2330GAME( 1991, hardhea2, 0,        hardhea2, hardhea2, hardhea2, ROT0,  "SunA",                       "Hard Head 2 (v2.0)"                       , 0 )
2345GAME( 1988, rranger,  0,        rranger,  rranger,  suna8,    ROT0,  "SunA (Sharp Image license)", "Rough Ranger (v2.0)", 0)
2346GAME( 1988, hardhead, 0,        hardhead, hardhead, hardhead, ROT0,  "SunA", "Hard Head" , 0)
2347GAME( 1988, hardhedb, hardhead, hardhead, hardhead, hardhedb, ROT0,  "bootleg", "Hard Head (bootleg)" , 0)
2348GAME( 1988, pop_hh,   hardhead, hardhead, hardhead, hardhedb, ROT0,  "bootleg", "Popper (Hard Head bootleg)" , 0)
2349GAME( 1991, hardhea2, 0,        hardhea2, hardhea2, hardhea2, ROT0,  "SunA", "Hard Head 2 (v2.0)" , 0 )
23312350
23322351/* Non Working Games */
2333GAME( 1988, sranger,  rranger, rranger,  rranger,   suna8,        ROT0,  "SunA",    "Super Ranger (v2.0)",           GAME_NOT_WORKING )
2334GAME( 1988, srangerb, rranger, rranger,  rranger,   suna8,        ROT0,  "bootleg", "Super Ranger (bootleg)",        GAME_NOT_WORKING )
2335GAME( 1988, srangerw, rranger, rranger,  rranger,   suna8,        ROT0,  "SunA (WDK license)", "Super Ranger (WDK)", GAME_NOT_WORKING )
2336GAME( 1989, sparkman, 0,       sparkman, sparkman, sparkman, ROT0,  "SunA",    "Spark Man (v 2.0)",             GAME_NOT_WORKING )
2337GAME( 1990, starfigh, 0,       starfigh, hardhea2, starfigh, ROT90, "SunA",    "Star Fighter (v1)",             GAME_NOT_WORKING )
2338GAME( 1992, brickzn,  0,       brickzn,  brickzn,  brickzn,  ROT90, "SunA",    "Brick Zone (v5.0)",             GAME_NOT_WORKING )
2339GAME( 1992, brickzn3, brickzn, brickzn,  brickzn,  brickzn3, ROT90, "SunA",    "Brick Zone (v4.0)",             GAME_NOT_WORKING )
2352GAME( 1988, sranger,  rranger,  rranger,  rranger,  suna8,    ROT0,  "SunA", "Super Ranger (v2.0)", GAME_NOT_WORKING )
2353GAME( 1988, srangerb, rranger,  rranger,  rranger,  suna8,    ROT0,  "bootleg", "Super Ranger (bootleg)", GAME_NOT_WORKING )
2354GAME( 1988, srangerw, rranger,  rranger,  rranger,  suna8,    ROT0,  "SunA (WDK license)", "Super Ranger (WDK)", GAME_NOT_WORKING )
2355GAME( 1989, sparkman, 0,        sparkman, sparkman, sparkman, ROT0,  "SunA", "Spark Man (v 2.0)", GAME_NOT_WORKING )
2356GAME( 1990, starfigh, 0,        starfigh, hardhea2, starfigh, ROT90, "SunA", "Star Fighter (v1)", GAME_NOT_WORKING )
2357GAME( 1992, brickzn,  0,        brickzn,  brickzn,  brickzn,  ROT90, "SunA", "Brick Zone (v5.0)", GAME_NOT_WORKING )
2358GAME( 1992, brickzn3, brickzn,  brickzn,  brickzn,  brickzn3, ROT90, "SunA", "Brick Zone (v4.0)", GAME_NOT_WORKING )
23402359
src/mame/drivers/dcon.c
r4441r4442
369369   ROM_LOAD16_BYTE( "911-a03.27",   0x40000, 0x20000, CRC(6c24b4f2) SHA1(e9fb82884f47694bebcad9254cb57a0b01dcd9c8) )
370370   ROM_LOAD16_BYTE( "911-a04.28",   0x40001, 0x20000, CRC(6ff9d716) SHA1(303faec19a84afd6cbcf3ca5d4877693c11d406e) )
371371
372   ROM_REGION( 0x20000*2, "audiocpu", 0 )   /* Z80 code, banked data */
372   ROM_REGION( 0x20000, "audiocpu", 0 )   /* Z80 code, banked data */
373373   ROM_LOAD( "911-a05.010",   0x00000, 0x08000, CRC(90455406) SHA1(dd2c5b96ac4b51251a3d34d97cc9af360afaa38c) )
374374   ROM_CONTINUE(              0x10000, 0x08000 )
375   ROM_COPY( "audiocpu", 0,  0x18000, 0x08000 )
375376
376377   ROM_REGION( 0x020000, "gfx1", ROMREGION_DISPOSE )
377378   ROM_LOAD( "911-a08.66",   0x000000, 0x10000, CRC(e7e04823) SHA1(d9b1ace5cd8218d5a4767cf5adbc267dce7c0668) )   /* chars */
src/mame/drivers/galaxian.c
r4441r4442
252252static UINT8 kingball_speech_dip;
253253static UINT8 kingball_sound;
254254static UINT8 mshuttle_ay8910_cs;
255static UINT8 *frogg_ram;
255256
256257static UINT16 protection_state;
257258static UINT8 protection_result;
r4441r4442
24182419
24192420   /* ...but needs a full 2k of RAM */
24202421   memory_install_readwrite8_handler(space, 0x4000, 0x47ff, 0, 0, SMH_BANK1, SMH_BANK1);
2421   memory_set_bankptr(machine, 1, auto_malloc(0x800));
2422   frogg_ram = auto_malloc(0x800);
2423   memory_set_bankptr(machine, 1, frogg_ram);
2424
2425   state_save_register_global_pointer(machine, frogg_ram, 0x800);
24222426}
24232427
24242428
r4441r4442
28102814
28112815   /* actually needs 2k of RAM */
28122816   memory_install_readwrite8_handler(space, 0x8000, 0x87ff, 0, 0, SMH_BANK1, SMH_BANK1);
2813   memory_set_bankptr(machine, 1, auto_malloc(0x800));
2817   frogg_ram = auto_malloc(0x800);
2818   memory_set_bankptr(machine, 1, frogg_ram);
28142819
2820   state_save_register_global_pointer(machine, frogg_ram, 0x800);
2821
28152822   /* decrypt */
28162823   decode_frogger_sound(machine);
28172824}
src/mame/drivers/hyprduel.c
r4441r4442
1212
1313
1414Magical Error wo Sagase
15(c)1993? Technosoft / Jaleco
15(c)1994 Technosoft / Jaleco
1616TEC5000(Japan)
1717
1818TMP68000N-10 x2
r4441r4442
2222Imagetek Inc 14220 071
2323
2424--
25driver by Eisuke Watanabe
25Written by Hau
2603/28/2009
2627based on driver from drivers/metro.c by Luca Elia
2728spthx to kikur,Cha,teioh,kokkyu,teruchu,aya,sgo
28
29Note:
30sub68k is performing not only processing of sound but assistance of main68k.
31
3229---
3330
3431Magical Error
r4441r4442
4340#include "sound/2151intf.h"
4441#include "sound/okim6295.h"
4542#include "sound/2413intf.h"
43#include "includes/hyprduel.h"
4644
47#define RASTER_LINES 262
48#define FIRST_VISIBLE_LINE 0
49#define LAST_VISIBLE_LINE 223
5045
51/* Variables defined in video: */
52extern UINT16 *hyprduel_videoregs;
53extern UINT16 *hyprduel_screenctrl;
54extern UINT16 *hyprduel_tiletable;
55extern size_t hyprduel_tiletable_size;
56extern UINT16 *hyprduel_vram_0, *hyprduel_vram_1, *hyprduel_vram_2;
57extern UINT16 *hyprduel_window;
58extern UINT16 hyprduel_scrollx[3][RASTER_LINES+1];
59extern UINT16 hyprduel_scrolly[3][RASTER_LINES+1];
60
61/* Functions defined in video: */
62WRITE16_HANDLER( hyprduel_paletteram_w );
63WRITE16_HANDLER( hyprduel_window_w );
64WRITE16_HANDLER( hyprduel_vram_0_w );
65WRITE16_HANDLER( hyprduel_vram_1_w );
66WRITE16_HANDLER( hyprduel_vram_2_w );
67
68VIDEO_START( hyprduel_14220 );
69VIDEO_UPDATE( hyprduel );
70
71/***************************************************************************
72                                Interrupts
73***************************************************************************/
74
7546static int blitter_bit;
7647static int requested_int;
7748static UINT16 *hypr_irq_enable;
7849static int subcpu_resetline;
79
80static int rastersplit;
81
8250static int int_num;
8351
84static UINT16 *hypr_sharedram1;
85static UINT16 *hypr_sharedram2;
86static UINT16 *hypr_sub_sharedram1_1;
87static UINT16 *hypr_sub_sharedram1_2;
88static UINT16 *hypr_sub_sharedram2_1;
89static UINT16 *hypr_sub_sharedram2_2;
52static UINT16 *sharedram;
9053
54/***************************************************************************
55                                Interrupts
56***************************************************************************/
9157
92static WRITE16_HANDLER( hypr_sharedram1_w )
58static void update_irq_state(running_machine *machine)
9359{
94   COMBINE_DATA(&hypr_sharedram1[offset]);
95   COMBINE_DATA(&hypr_sub_sharedram1_1[offset]);
96   if (offset < 0x4000/2)
97      COMBINE_DATA(&hypr_sub_sharedram1_2[offset]);
60   int irq = requested_int & ~*hypr_irq_enable;
61
62   cpu_set_input_line(machine->cpu[0], 3, (irq & int_num) ? ASSERT_LINE : CLEAR_LINE);
9863}
9964
100static WRITE16_HANDLER( hypr_sharedram2_w )
65static TIMER_CALLBACK( vblank_end_callback )
10166{
102   COMBINE_DATA(&hypr_sharedram2[offset]);
103   COMBINE_DATA(&hypr_sub_sharedram2_1[offset]);
104   if ((offset >= 0x4000/2) && (offset < 0x7fff/2))
105      COMBINE_DATA(&hypr_sub_sharedram2_2[offset-0x4000/2]);
67   requested_int &= ~param;
68   cpu_set_input_line(machine->cpu[1], 2, HOLD_LINE);
10669}
10770
108static void update_irq_state(running_machine *machine)
71static INTERRUPT_GEN( hyprduel_interrupt )
10972{
110   int irq = requested_int & ~*hypr_irq_enable;
73   int line = RASTER_LINES - cpu_getiloops(device);
11174
112   cpu_set_input_line(machine->cpu[0], 3, (irq & int_num) ? ASSERT_LINE : CLEAR_LINE);
75   if (line == RASTER_LINES)
76   {
77      requested_int |= 0x01;      /* vblank */
78      requested_int |= 0x20;
79      cpu_set_input_line(device, 2, HOLD_LINE);
80      cpu_set_input_line(device->machine->cpu[1], 1, HOLD_LINE);
81      /* the duration is a guess */
82      timer_set(device->machine, ATTOTIME_IN_USEC(2500), NULL, 0x20, vblank_end_callback);
83   } else {
84      requested_int |= 0x12;      /* hsync */
85   }
86
87   update_irq_state(device->machine);
11388}
11489
11590static READ16_HANDLER( hyprduel_irq_cause_r )
r4441r4442
130105   }
131106}
132107
108
133109static WRITE16_HANDLER( hypr_subcpu_control_w )
134110{
135   int pc = cpu_get_pc(space->cpu);
136
137111   if (data & 0x01)
138112   {
139113      if (!subcpu_resetline)
140114      {
141         if (pc != 0x95f2)
142         {
143            cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, ASSERT_LINE);
144            subcpu_resetline = 1;
145         } else {
146            cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_HALT, ASSERT_LINE);
147            subcpu_resetline = -1;
148         }
115         cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, ASSERT_LINE);
116         subcpu_resetline = 1;
149117      }
150   } else {
151      if (subcpu_resetline == 1 && (data != 0x0c))
118   }
119   else
120   {
121      if ((subcpu_resetline == 1) && (data != 0x0c))
152122      {
153123         cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_RESET, CLEAR_LINE);
154124         subcpu_resetline = 0;
155         if (pc == 0xbb0 || pc == 0x9d30 || pc == 0xb19c)
156            cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(15000));      /* sync semaphore */
125
126         if ((int_num == 0x02) && (cpu_get_pc(space->cpu) == 0x000bb0))
127            cpu_spinuntil_time(space->cpu, ATTOTIME_IN_USEC(8000));
128         else
129            cpu_spinuntil_int(space->cpu);
157130      }
158      else if (subcpu_resetline == -1)
159      {
160         cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_HALT, CLEAR_LINE);
161         subcpu_resetline = 0;
162      }
163131   }
164132}
165133
166static WRITE16_HANDLER( hypr_scrollreg_w )
134static READ16_HANDLER( hypr_cpusync_r )
167135{
168   int i;
136   cpu_spin(space->cpu);
169137
170   if (offset & 0x01)
171   {
172      for (i = rastersplit; i < RASTER_LINES; i++)
173         hyprduel_scrollx[offset>>1][i] = data;
174   } else {
175      for (i = rastersplit; i < RASTER_LINES; i++)
176         hyprduel_scrolly[offset>>1][i] = data;
177   }
138   return sharedram[0x408/2 + offset];
178139}
179140
180static WRITE16_HANDLER( hypr_scrollreg_init_w )
181{
182   int i;
183141
184   for (i = 0; i < RASTER_LINES; i++)
185   {
186      hyprduel_scrollx[0][i] = data;
187      hyprduel_scrollx[1][i] = data;
188      hyprduel_scrollx[2][i] = data;
189      hyprduel_scrolly[0][i] = data;
190      hyprduel_scrolly[1][i] = data;
191      hyprduel_scrolly[2][i] = data;
192   }
193}
142static emu_timer *magerror_irq_timer;
194143
195static TIMER_CALLBACK( vblank_end_callback )
144static TIMER_CALLBACK( magerror_irq_callback )
196145{
197   requested_int &= ~param;
198   cpu_set_input_line(machine->cpu[1], 2, HOLD_LINE);
146   cpu_set_input_line(machine->cpu[1], 1, HOLD_LINE);
199147}
200148
201static INTERRUPT_GEN( hyprduel_interrupt )
202{
203   int line = RASTER_LINES - cpu_getiloops(device);
204
205   if (line == RASTER_LINES)
206   {
207      requested_int |= 0x01;      /* vblank */
208      requested_int |= 0x20;
209      cpu_set_input_line(device, 2, HOLD_LINE);
210      cpu_set_input_line(device->machine->cpu[1], 1, HOLD_LINE);
211      /* the duration is a guess */
212      timer_set(device->machine, ATTOTIME_IN_USEC(2500), NULL, 0x20, vblank_end_callback);
213      rastersplit = 0;
214   } else {
215      requested_int |= 0x12;      /* hsync */
216      rastersplit = line + 1;
217   }
218
219   update_irq_state(device->machine);
220}
221
222static MACHINE_RESET( hyprduel )
223{
224   /* start with cpu2 halted */
225   cpu_set_input_line(machine->cpu[1], INPUT_LINE_RESET, ASSERT_LINE);
226   subcpu_resetline = 1;
227}
228
229
230149/***************************************************************************
231150                                Banked ROM access
232151***************************************************************************/
r4441r4442
243162
244163static READ16_HANDLER( hyprduel_bankedrom_r )
245164{
246   const char *region = "gfx1";
165   UINT8 *ROM = memory_region( space->machine, "gfx1" );
166   size_t  len  = memory_region_length( space->machine, "gfx1" );
247167
248   UINT8 *ROM = memory_region( space->machine, region );
249   size_t  len  = memory_region_length( space->machine, region );
250
251168   offset = offset * 2 + 0x10000 * (*hyprduel_rombank);
252169
253   if ( offset < len )   return ((ROM[offset+0]<<8)+ROM[offset+1])^0xffff;
170   if ( offset < len )   return ((ROM[offset+0]<<8)+ROM[offset+1]);
254171   else            return 0xffff;
255172}
256173
r4441r4442
308225
309226INLINE int blt_read(const UINT8 *ROM, const int offs)
310227{
311   return ROM[offs] ^ 0xff;
228   return ROM[offs];
312229}
313230
314231INLINE void blt_write(const address_space *space, const int tmap, const offs_t offs, const UINT16 data, const UINT16 mask)
r4441r4442
329246
330247   if (offset == 0xC/2)
331248   {
332      const char *region = "gfx1";
249      UINT8 *src   =   memory_region(space->machine, "gfx1");
250      size_t  src_len   =   memory_region_length(space->machine, "gfx1");
333251
334      UINT8 *src   =   memory_region(space->machine, region);
335      size_t  src_len   =   memory_region_length(space->machine, region);
336
337252      UINT32 tmap      =   (hyprduel_blitter_regs[ 0x00 / 2 ] << 16 ) +
338253                      hyprduel_blitter_regs[ 0x02 / 2 ];
339254      UINT32 src_offs   =   (hyprduel_blitter_regs[ 0x04 / 2 ] << 16 ) +
r4441r4442
342257                      hyprduel_blitter_regs[ 0x0a / 2 ];
343258
344259      int shift         =   (dst_offs & 0x80) ? 0 : 8;
345      UINT16 mask      =   (dst_offs & 0x80) ? 0xff00 : 0x00ff;
260      UINT16 mask      =   (dst_offs & 0x80) ? 0x00ff : 0xff00;
346261
347262//      logerror("CPU #0 PC %06X : Blitter regs %08X, %08X, %08X\n",cpu_get_pc(space->cpu),tmap,src_offs,dst_offs);
348263
r4441r4442
461376                                Memory Maps
462377***************************************************************************/
463378
464static ADDRESS_MAP_START( hyprduel_readmem, ADDRESS_SPACE_PROGRAM, 16 )
465   AM_RANGE(0x000000, 0x07ffff) AM_READ(SMH_ROM)
466   AM_RANGE(0x400000, 0x41ffff) AM_READ(SMH_RAM            )   // Layer 0
467   AM_RANGE(0x420000, 0x43ffff) AM_READ(SMH_RAM            )   // Layer 1
468   AM_RANGE(0x440000, 0x45ffff) AM_READ(SMH_RAM            )   // Layer 2
469   AM_RANGE(0x460000, 0x46ffff) AM_READ(hyprduel_bankedrom_r   )   // Banked ROM
470   AM_RANGE(0x470000, 0x473fff) AM_READ(SMH_RAM            )   // Palette
471   AM_RANGE(0x474000, 0x474fff) AM_READ(SMH_RAM            )   // Sprites
472   AM_RANGE(0x475000, 0x477fff) AM_READ(SMH_RAM            )   // (only used memory test)
473   AM_RANGE(0x478000, 0x4787ff) AM_READ(SMH_RAM            )   // Tiles Set
474   AM_RANGE(0x4788a2, 0x4788a3) AM_READ(hyprduel_irq_cause_r   )   // IRQ Cause
475   AM_RANGE(0xc00000, 0xc07fff) AM_READ(SMH_RAM            )   // (sound driver controls)
476   AM_RANGE(0xe00000, 0xe00001) AM_READ_PORT("SERVICE")
379static ADDRESS_MAP_START( hyprduel_map, ADDRESS_SPACE_PROGRAM, 16 )
380   AM_RANGE(0x000000, 0x07ffff) AM_ROM
381   AM_RANGE(0x400000, 0x41ffff) AM_RAM_WRITE(hyprduel_vram_0_w) AM_BASE(&hyprduel_vram_0)      /* Layer 0 */
382   AM_RANGE(0x420000, 0x43ffff) AM_RAM_WRITE(hyprduel_vram_1_w) AM_BASE(&hyprduel_vram_1)      /* Layer 1 */
383   AM_RANGE(0x440000, 0x45ffff) AM_RAM_WRITE(hyprduel_vram_2_w) AM_BASE(&hyprduel_vram_2)      /* Layer 2 */
384   AM_RANGE(0x460000, 0x46ffff) AM_READ(hyprduel_bankedrom_r)      /* Banked ROM */
385   AM_RANGE(0x470000, 0x473fff) AM_RAM AM_WRITE(hyprduel_paletteram_w) AM_BASE(&paletteram16)   /* Palette */
386   AM_RANGE(0x474000, 0x474fff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size)         /* Sprites */
387   AM_RANGE(0x475000, 0x477fff) AM_RAM         /* only used memory test */
388   AM_RANGE(0x478000, 0x4787ff) AM_RAM AM_BASE(&hyprduel_tiletable) AM_SIZE(&hyprduel_tiletable_size)   /* Tiles Set */
389   AM_RANGE(0x478840, 0x47884d) AM_WRITE(hyprduel_blitter_w) AM_BASE(&hyprduel_blitter_regs)   /* Tiles Blitter */
390   AM_RANGE(0x478860, 0x47886b) AM_WRITE(hyprduel_window_w) AM_BASE(&hyprduel_window)         /* Tilemap Window */
391   AM_RANGE(0x478870, 0x47887b) AM_RAM_WRITE(hyprduel_scrollreg_w) AM_BASE(&hyprduel_scroll)      /* Scroll Regs */
392   AM_RANGE(0x47887c, 0x47887d) AM_WRITE(hyprduel_scrollreg_init_w)
393   AM_RANGE(0x478880, 0x478881) AM_WRITENOP
394   AM_RANGE(0x478890, 0x478891) AM_WRITENOP
395   AM_RANGE(0x4788a0, 0x4788a1) AM_WRITENOP
396   AM_RANGE(0x4788a2, 0x4788a3) AM_READWRITE(hyprduel_irq_cause_r, hyprduel_irq_cause_w)   /* IRQ Cause,Acknowledge */
397   AM_RANGE(0x4788a4, 0x4788a5) AM_RAM AM_BASE(&hypr_irq_enable)      /* IRQ Enable */
398   AM_RANGE(0x4788aa, 0x4788ab) AM_RAM AM_BASE(&hyprduel_rombank)      /* Rom Bank */
399   AM_RANGE(0x4788ac, 0x4788ad) AM_RAM AM_BASE(&hyprduel_screenctrl)   /* Screen Control */
400   AM_RANGE(0x479700, 0x479713) AM_RAM AM_BASE(&hyprduel_videoregs)   /* Video Registers */
401   AM_RANGE(0x800000, 0x800001) AM_WRITE(hypr_subcpu_control_w)
402   AM_RANGE(0xc00000, 0xc07fff) AM_RAM AM_SHARE(1) AM_BASE(&sharedram)
403   AM_RANGE(0xe00000, 0xe00001) AM_READ_PORT("SERVICE") AM_WRITENOP
477404   AM_RANGE(0xe00002, 0xe00003) AM_READ_PORT("DSW")
478405   AM_RANGE(0xe00004, 0xe00005) AM_READ_PORT("P1_P2")
479406   AM_RANGE(0xe00006, 0xe00007) AM_READ_PORT("SYSTEM")
480   AM_RANGE(0xfe0000, 0xffffff) AM_READ(SMH_RAM            )
407   AM_RANGE(0xfe0000, 0xfe3fff) AM_RAM AM_SHARE(2)
408   AM_RANGE(0xfe4000, 0xffffff) AM_RAM AM_SHARE(3)
481409ADDRESS_MAP_END
482410
483static ADDRESS_MAP_START( hyprduel_writemem, ADDRESS_SPACE_PROGRAM, 16 )
484   AM_RANGE(0x000000, 0x07ffff) AM_WRITE(SMH_ROM                )
485   AM_RANGE(0x400000, 0x41ffff) AM_WRITE(hyprduel_vram_0_w) AM_BASE(&hyprduel_vram_0   )   // Layer 0
486   AM_RANGE(0x420000, 0x43ffff) AM_WRITE(hyprduel_vram_1_w) AM_BASE(&hyprduel_vram_1   )   // Layer 1
487   AM_RANGE(0x440000, 0x45ffff) AM_WRITE(hyprduel_vram_2_w) AM_BASE(&hyprduel_vram_2   )   // Layer 2
488   AM_RANGE(0x470000, 0x473fff) AM_WRITE(hyprduel_paletteram_w) AM_BASE(&paletteram16   )   // Palette
489   AM_RANGE(0x474000, 0x474fff) AM_WRITE(SMH_RAM) AM_BASE(&spriteram16) AM_SIZE(&spriteram_size   )   // Sprites
490   AM_RANGE(0x475000, 0x477fff) AM_WRITE(SMH_RAM                )
491   AM_RANGE(0x478000, 0x4787ff) AM_WRITE(SMH_RAM) AM_BASE(&hyprduel_tiletable) AM_SIZE(&hyprduel_tiletable_size   )   // Tiles Set
492   AM_RANGE(0x478840, 0x47884d) AM_WRITE(hyprduel_blitter_w) AM_BASE(&hyprduel_blitter_regs   )   // Tiles Blitter
493   AM_RANGE(0x478860, 0x47886b) AM_WRITE(hyprduel_window_w) AM_BASE(&hyprduel_window   )   // Tilemap Window
494   AM_RANGE(0x478870, 0x47887b) AM_WRITE(hypr_scrollreg_w            )   // Scroll Regs
495   AM_RANGE(0x47887c, 0x47887d) AM_WRITE(hypr_scrollreg_init_w         )   // scroll regs all sets
496   AM_RANGE(0x478880, 0x478881) AM_WRITE(SMH_NOP                  )
497   AM_RANGE(0x478890, 0x478891) AM_WRITE(SMH_NOP                  )
498   AM_RANGE(0x4788a0, 0x4788a1) AM_WRITE(SMH_NOP                  )
499   AM_RANGE(0x4788a2, 0x4788a3) AM_WRITE(hyprduel_irq_cause_w         )   // IRQ Acknowledge
500   AM_RANGE(0x4788a4, 0x4788a5) AM_WRITE(SMH_RAM) AM_BASE(&hypr_irq_enable   )   // IRQ Enable
501   AM_RANGE(0x4788aa, 0x4788ab) AM_WRITE(SMH_RAM) AM_BASE(&hyprduel_rombank      )   // Rom Bank
502   AM_RANGE(0x4788ac, 0x4788ad) AM_WRITE(SMH_RAM) AM_BASE(&hyprduel_screenctrl   )   // Screen Control
503   AM_RANGE(0x479700, 0x479713) AM_WRITE(SMH_RAM) AM_BASE(&hyprduel_videoregs   )   // Video Registers
504   AM_RANGE(0x800000, 0x800001) AM_WRITE(hypr_subcpu_control_w         )
505   AM_RANGE(0xc00000, 0xc07fff) AM_WRITE(SMH_RAM) AM_BASE(&hypr_sharedram1   )
506   AM_RANGE(0xe00000, 0xe00001) AM_WRITE(SMH_NOP                  )
507   AM_RANGE(0xfe0000, 0xffffff) AM_WRITE(SMH_RAM) AM_BASE(&hypr_sharedram2   )
411static ADDRESS_MAP_START( hyprduel_map2, ADDRESS_SPACE_PROGRAM, 16 )
412   AM_RANGE(0x000000, 0x003fff) AM_RAM AM_SHARE(1)                  /* shadow ($c00000 - $c03fff : vector) */
413   AM_RANGE(0x004000, 0x007fff) AM_RAM AM_WRITENOP AM_SHARE(3)         /* shadow ($fe4000 - $fe7fff : read only) */
414   AM_RANGE(0x400000, 0x400003) AM_DEVREADWRITE8("ym", ym2151_r, ym2151_w, 0x00ff )
415   AM_RANGE(0x400004, 0x400005) AM_DEVREADWRITE8("oki", okim6295_r, okim6295_w, 0x00ff)
416   AM_RANGE(0x800000, 0x800001) AM_NOP
417   AM_RANGE(0xc00000, 0xc07fff) AM_RAM AM_SHARE(1)
418   AM_RANGE(0xfe0000, 0xfe3fff) AM_RAM AM_SHARE(2)
419   AM_RANGE(0xfe4000, 0xffffff) AM_RAM AM_SHARE(3)
508420ADDRESS_MAP_END
509421
510static ADDRESS_MAP_START( hyprduel_readmem2, ADDRESS_SPACE_PROGRAM, 16 )
511   AM_RANGE(0x000000, 0x003fff) AM_READ(SMH_RAM                  )
512   AM_RANGE(0x004000, 0x007fff) AM_READ(SMH_RAM                  )
513   AM_RANGE(0x400000, 0x400003) AM_DEVREAD8("ym", ym2151_r, 0x00ff )
514   AM_RANGE(0x400004, 0x400005) AM_DEVREAD8("oki", okim6295_r, 0x00ff )
515   AM_RANGE(0xc00000, 0xc07fff) AM_READ(SMH_RAM                  )
516   AM_RANGE(0xfe0000, 0xffffff) AM_READ(SMH_RAM                  )
517ADDRESS_MAP_END
518422
519static ADDRESS_MAP_START( hyprduel_writemem2, ADDRESS_SPACE_PROGRAM, 16 )
520   AM_RANGE(0x000000, 0x003fff) AM_WRITE(SMH_RAM) AM_BASE(&hypr_sub_sharedram1_2   )   // shadow ($c00000 - $c03fff : vector, write ok)
521   AM_RANGE(0x004000, 0x007fff) AM_WRITE(SMH_RAM) AM_BASE(&hypr_sub_sharedram2_2   )   // shadow ($fe4000 - $fe7fff : read only)
522   AM_RANGE(0x400000, 0x400003) AM_DEVWRITE8("ym", ym2151_w, 0x00ff )
523   AM_RANGE(0x400004, 0x400005) AM_DEVWRITE8("oki", okim6295_w, 0x00ff)
524   AM_RANGE(0x800000, 0x800001) AM_WRITE(SMH_NOP                  )
525   AM_RANGE(0xc00000, 0xc07fff) AM_WRITE(SMH_RAM) AM_BASE(&hypr_sub_sharedram1_1   )   // (sound driver)
526   AM_RANGE(0xfe0000, 0xffffff) AM_WRITE(SMH_RAM) AM_BASE(&hypr_sub_sharedram2_1   )
527ADDRESS_MAP_END
528
529423/* Magical Error - video is at 8x now */
530424
531static ADDRESS_MAP_START( magerror_readmem, ADDRESS_SPACE_PROGRAM, 16 )
532   AM_RANGE(0x000000, 0x07ffff) AM_READ(SMH_ROM)
533   AM_RANGE(0x800000, 0x81ffff) AM_READ(SMH_RAM            )   // Layer 0
534   AM_RANGE(0x820000, 0x83ffff) AM_READ(SMH_RAM            )   // Layer 1
535   AM_RANGE(0x840000, 0x85ffff) AM_READ(SMH_RAM            )   // Layer 2
536   AM_RANGE(0x860000, 0x86ffff) AM_READ(hyprduel_bankedrom_r   )   // Banked ROM
537   AM_RANGE(0x870000, 0x873fff) AM_READ(SMH_RAM            )   // Palette
538   AM_RANGE(0x874000, 0x874fff) AM_READ(SMH_RAM            )   // Sprites
539   AM_RANGE(0x875000, 0x877fff) AM_READ(SMH_RAM            )   // (only used memory test)
540   AM_RANGE(0x878000, 0x8787ff) AM_READ(SMH_RAM            )   // Tiles Set
541   AM_RANGE(0x8788a2, 0x8788a3) AM_READ(hyprduel_irq_cause_r   )   // IRQ Cause
542   AM_RANGE(0xc00000, 0xc1ffff) AM_READ(SMH_RAM            )   // (sound driver controls) ?
543   AM_RANGE(0xe00000, 0xe00001) AM_READ_PORT("SERVICE")
425static ADDRESS_MAP_START( magerror_map, ADDRESS_SPACE_PROGRAM, 16 )
426   AM_RANGE(0x000000, 0x07ffff) AM_ROM
427   AM_RANGE(0x400000, 0x400001) AM_WRITE(hypr_subcpu_control_w)
428   AM_RANGE(0x800000, 0x81ffff) AM_RAM_WRITE(hyprduel_vram_0_w) AM_BASE(&hyprduel_vram_0)      /* Layer 0 */
429   AM_RANGE(0x820000, 0x83ffff) AM_RAM_WRITE(hyprduel_vram_1_w) AM_BASE(&hyprduel_vram_1)      /* Layer 1 */
430   AM_RANGE(0x840000, 0x85ffff) AM_RAM_WRITE(hyprduel_vram_2_w) AM_BASE(&hyprduel_vram_2)      /* Layer 2 */
431   AM_RANGE(0x860000, 0x86ffff) AM_READ(hyprduel_bankedrom_r)      /* Banked ROM */
432   AM_RANGE(0x870000, 0x873fff) AM_RAM AM_WRITE(hyprduel_paletteram_w) AM_BASE(&paletteram16)   /* Palette */
433   AM_RANGE(0x874000, 0x874fff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size   )      /* Sprites */
434   AM_RANGE(0x875000, 0x877fff) AM_RAM         /* only used memory test */
435   AM_RANGE(0x878000, 0x8787ff) AM_RAM AM_BASE(&hyprduel_tiletable) AM_SIZE(&hyprduel_tiletable_size)   /* Tiles Set */
436   AM_RANGE(0x878840, 0x87884d) AM_WRITE(hyprduel_blitter_w) AM_BASE(&hyprduel_blitter_regs)   /* Tiles Blitter */
437   AM_RANGE(0x878860, 0x87886b) AM_WRITE(hyprduel_window_w) AM_BASE(&hyprduel_window)         /* Tilemap Window */
438   AM_RANGE(0x878870, 0x87887b) AM_RAM_WRITE(hyprduel_scrollreg_w) AM_BASE(&hyprduel_scroll)      /* Scroll Regs */
439   AM_RANGE(0x87887c, 0x87887d) AM_WRITE(hyprduel_scrollreg_init_w)
440   AM_RANGE(0x878880, 0x878881) AM_WRITENOP
441   AM_RANGE(0x878890, 0x878891) AM_WRITENOP
442   AM_RANGE(0x8788a0, 0x8788a1) AM_WRITENOP
443   AM_RANGE(0x8788a2, 0x8788a3) AM_READWRITE(hyprduel_irq_cause_r, hyprduel_irq_cause_w)   /* IRQ Cause, Acknowledge */
444   AM_RANGE(0x8788a4, 0x8788a5) AM_RAM AM_BASE(&hypr_irq_enable)      /* IRQ Enable */
445   AM_RANGE(0x8788aa, 0x8788ab) AM_RAM AM_BASE(&hyprduel_rombank)      /* Rom Bank */
446   AM_RANGE(0x8788ac, 0x8788ad) AM_RAM AM_BASE(&hyprduel_screenctrl)   /* Screen Control */
447   AM_RANGE(0x879700, 0x879713) AM_RAM AM_BASE(&hyprduel_videoregs)   /* Video Registers */
448   AM_RANGE(0xc00000, 0xc1ffff) AM_RAM AM_SHARE(1) AM_BASE(&sharedram)
449   AM_RANGE(0xe00000, 0xe00001) AM_READ_PORT("SERVICE") AM_WRITENOP
544450   AM_RANGE(0xe00002, 0xe00003) AM_READ_PORT("DSW")
545451   AM_RANGE(0xe00004, 0xe00005) AM_READ_PORT("P1_P2")
546452   AM_RANGE(0xe00006, 0xe00007) AM_READ_PORT("SYSTEM")
547   AM_RANGE(0xfe0000, 0xffffff) AM_READ(SMH_RAM            )
453   AM_RANGE(0xfe0000, 0xfe3fff) AM_RAM AM_SHARE(2)
454   AM_RANGE(0xfe4000, 0xffffff) AM_RAM AM_SHARE(3)
548455ADDRESS_MAP_END
549456
550static ADDRESS_MAP_START( magerror_writemem, ADDRESS_SPACE_PROGRAM, 16 )
551   AM_RANGE(0x000000, 0x07ffff) AM_WRITE(SMH_ROM                )
552   AM_RANGE(0x800000, 0x81ffff) AM_WRITE(hyprduel_vram_0_w) AM_BASE(&hyprduel_vram_0   )   // Layer 0
553   AM_RANGE(0x820000, 0x83ffff) AM_WRITE(hyprduel_vram_1_w) AM_BASE(&hyprduel_vram_1   )   // Layer 1
554   AM_RANGE(0x840000, 0x85ffff) AM_WRITE(hyprduel_vram_2_w) AM_BASE(&hyprduel_vram_2   )   // Layer 2
555   AM_RANGE(0x870000, 0x873fff) AM_WRITE(hyprduel_paletteram_w) AM_BASE(&paletteram16   )   // Palette
556   AM_RANGE(0x874000, 0x874fff) AM_WRITE(SMH_RAM) AM_BASE(&spriteram16) AM_SIZE(&spriteram_size   )   // Sprites
557   AM_RANGE(0x875000, 0x877fff) AM_WRITE(SMH_RAM                )
558   AM_RANGE(0x878000, 0x8787ff) AM_WRITE(SMH_RAM) AM_BASE(&hyprduel_tiletable) AM_SIZE(&hyprduel_tiletable_size   )   // Tiles Set
559   AM_RANGE(0x878840, 0x87884d) AM_WRITE(hyprduel_blitter_w) AM_BASE(&hyprduel_blitter_regs   )   // Tiles Blitter
560   AM_RANGE(0x878860, 0x87886b) AM_WRITE(hyprduel_window_w) AM_BASE(&hyprduel_window   )   // Tilemap Window
561   AM_RANGE(0x878870, 0x87887b) AM_WRITE(hypr_scrollreg_w            )   // Scroll Regs
562   AM_RANGE(0x87887c, 0x87887d) AM_WRITE(hypr_scrollreg_init_w         )   // scroll regs all sets
563   AM_RANGE(0x878880, 0x878881) AM_WRITE(SMH_NOP                  )
564   AM_RANGE(0x878890, 0x878891) AM_WRITE(SMH_NOP                  )
565   AM_RANGE(0x8788a0, 0x8788a1) AM_WRITE(SMH_NOP                  )
566   AM_RANGE(0x8788a2, 0x8788a3) AM_WRITE(hyprduel_irq_cause_w         )   // IRQ Acknowledge
567   AM_RANGE(0x8788a4, 0x8788a5) AM_WRITE(SMH_RAM) AM_BASE(&hypr_irq_enable   )   // IRQ Enable
568   AM_RANGE(0x8788aa, 0x8788ab) AM_WRITE(SMH_RAM) AM_BASE(&hyprduel_rombank      )   // Rom Bank
569   AM_RANGE(0x8788ac, 0x8788ad) AM_WRITE(SMH_RAM) AM_BASE(&hyprduel_screenctrl   )   // Screen Control
570   AM_RANGE(0x879700, 0x879713) AM_WRITE(SMH_RAM) AM_BASE(&hyprduel_videoregs   )   // Video Registers
571   AM_RANGE(0x400000, 0x400001) AM_WRITE(hypr_subcpu_control_w         )
572   AM_RANGE(0xc00000, 0xc1ffff) AM_WRITE(SMH_RAM) AM_BASE(&hypr_sharedram1   ) //?
573   AM_RANGE(0xe00000, 0xe00001) AM_WRITE(SMH_NOP                  )
574   AM_RANGE(0xfe0000, 0xffffff) AM_WRITE(SMH_RAM) AM_BASE(&hypr_sharedram2   )
457static ADDRESS_MAP_START( magerror_map2, ADDRESS_SPACE_PROGRAM, 16 )
458   AM_RANGE(0x000000, 0x003fff) AM_RAM AM_SHARE(1)                  /* shadow ($c00000 - $c03fff : vector) */
459   AM_RANGE(0x004000, 0x007fff) AM_RAM AM_WRITENOP AM_SHARE(3)         /* shadow ($fe4000 - $fe7fff : read only) */
460   AM_RANGE(0x400000, 0x400003) AM_NOP
461   AM_RANGE(0x800000, 0x800003) AM_READNOP AM_DEVWRITE8("ym", ym2413_w, 0x00ff)
462   AM_RANGE(0x800004, 0x800005) AM_DEVREADWRITE8("oki", okim6295_r, okim6295_w, 0x00ff)
463   AM_RANGE(0xc00000, 0xc1ffff) AM_RAM AM_SHARE(1)
464   AM_RANGE(0xfe0000, 0xfe3fff) AM_RAM AM_SHARE(2)
465   AM_RANGE(0xfe4000, 0xffffff) AM_RAM AM_SHARE(3)
575466ADDRESS_MAP_END
576467
577static ADDRESS_MAP_START( magerror_readmem2, ADDRESS_SPACE_PROGRAM, 16 )
578   AM_RANGE(0x000000, 0x003fff) AM_READ(SMH_RAM                  )
579   AM_RANGE(0x004000, 0x007fff) AM_READ(SMH_RAM                  )
580//  AM_RANGE(0x400000, 0x400003) AM_DEVREAD8("ym", ym2151_r, 0x00ff )
581   AM_RANGE(0x400004, 0x400005) AM_DEVREAD8("oki", okim6295_r, 0x00ff)
582   AM_RANGE(0xc00000, 0xc07fff) AM_READ(SMH_RAM                  )
583   AM_RANGE(0xfe0000, 0xffffff) AM_READ(SMH_RAM                  )
584ADDRESS_MAP_END
585
586static ADDRESS_MAP_START( magerror_writemem2, ADDRESS_SPACE_PROGRAM, 16 )
587   AM_RANGE(0x000000, 0x003fff) AM_WRITE(SMH_RAM) AM_BASE(&hypr_sub_sharedram1_2   )   // shadow ($c00000 - $c03fff : vector, write ok)
588   AM_RANGE(0x004000, 0x007fff) AM_WRITE(SMH_RAM) AM_BASE(&hypr_sub_sharedram2_2   )   // shadow ($fe4000 - $fe7fff : read only)
589     AM_RANGE(0x400000, 0x400003) AM_DEVWRITE8("ym", ym2413_w, 0x00ff)
590   AM_RANGE(0x400004, 0x400005) AM_DEVWRITE8("oki", okim6295_w, 0x00ff)
591   AM_RANGE(0x800000, 0x800001) AM_WRITE(SMH_NOP                  )
592   AM_RANGE(0xc00000, 0xc07fff) AM_WRITE(SMH_RAM) AM_BASE(&hypr_sub_sharedram1_1   )   // (sound driver)
593   AM_RANGE(0xfe0000, 0xffffff) AM_WRITE(SMH_RAM) AM_BASE(&hypr_sub_sharedram2_1   )
594ADDRESS_MAP_END
595
596
597468/***************************************************************************
598469                                Input Ports
599470***************************************************************************/
r4441r4442
650521   PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
651522   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
652523   PORT_DIPNAME( 0x0080, 0x0080, "Start Up Mode" )
653   PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
654   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
524   PORT_DIPSETTING(      0x0080, "Game Mode" )
525   PORT_DIPSETTING(      0x0000, "Test Mode" )
655526   PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Flip_Screen ) )
656527   PORT_DIPSETTING(      0x0100, DEF_STR( Off ) )
657528   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
r4441r4442
715586                                Machine Drivers
716587***************************************************************************/
717588
589static MACHINE_RESET( hyprduel )
590{
591   /* start with cpu2 halted */
592   cpu_set_input_line(machine->cpu[1], INPUT_LINE_RESET, ASSERT_LINE);
593   subcpu_resetline = 1;
594
595   requested_int = 0x00;
596   blitter_bit = 2;
597   *hypr_irq_enable = 0xff;
598}
599
600static MACHINE_START( magerror )
601{
602   timer_adjust_periodic(magerror_irq_timer, attotime_zero, 0, ATTOTIME_IN_HZ(968));      /* ? */
603}
604
718605static MACHINE_DRIVER_START( hyprduel )
719606
720607   /* basic machine hardware */
721608   MDRV_CPU_ADD("maincpu", M68000,20000000/2)      /* 10MHz */
722   MDRV_CPU_PROGRAM_MAP(hyprduel_readmem,hyprduel_writemem)
609   MDRV_CPU_PROGRAM_MAP(hyprduel_map,0)
723610   MDRV_CPU_VBLANK_INT_HACK(hyprduel_interrupt,RASTER_LINES)
724611
725612   MDRV_CPU_ADD("sub", M68000,20000000/2)      /* 10MHz */
726   MDRV_CPU_PROGRAM_MAP(hyprduel_readmem2,hyprduel_writemem2)
613   MDRV_CPU_PROGRAM_MAP(hyprduel_map2,0)
727614
728615   MDRV_MACHINE_RESET(hyprduel)
729616
730617   /* video hardware */
618   MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_SCANLINE)
619
731620   MDRV_SCREEN_ADD("screen", RASTER)
732621   MDRV_SCREEN_REFRESH_RATE(60)
733622   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
r4441r4442
760649
761650   /* basic machine hardware */
762651   MDRV_CPU_ADD("maincpu", M68000,20000000/2)      /* 10MHz */
763   MDRV_CPU_PROGRAM_MAP(magerror_readmem,magerror_writemem)
652   MDRV_CPU_PROGRAM_MAP(magerror_map,0)
764653   MDRV_CPU_VBLANK_INT_HACK(hyprduel_interrupt,RASTER_LINES)
765654
766655   MDRV_CPU_ADD("sub", M68000,20000000/2)      /* 10MHz */
767   MDRV_CPU_PROGRAM_MAP(magerror_readmem2,magerror_writemem2)
656   MDRV_CPU_PROGRAM_MAP(magerror_map2,0)
768657
658   MDRV_MACHINE_START(magerror)
769659   MDRV_MACHINE_RESET(hyprduel)
770660
771661   /* video hardware */
662   MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_SCANLINE)
663
772664   MDRV_SCREEN_ADD("screen", RASTER)
773665   MDRV_SCREEN_REFRESH_RATE(60)
774666   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
r4441r4442
786678   MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
787679
788680   MDRV_SOUND_ADD("ym", YM2413, 3579545)
789   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.57)
790   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.57)
681   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.00)
682   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.00)
791683
792684   MDRV_SOUND_ADD("oki", OKIM6295, 4000000/16/16*132)
793685   MDRV_SOUND_CONFIG(okim6295_interface_pin7high) // clock frequency & pin 7 not verified
r4441r4442
799691                                ROMs Loading
800692***************************************************************************/
801693
802static DRIVER_INIT( hyprduel )
803{
804   int i, len = memory_region_length(machine, "gfx1");
805   UINT8 *ROM = memory_region(machine, "gfx1");
806
807   /*
808      Tiles can be either 4-bit or 8-bit, and both depths can be used at the same
809      time. The transparent pen is the last one, that is 15 or 255. To make
810      tilemap.c handle that, we invert gfx data so the transparent pen becomes 0
811      for both tile depths.
812    */
813   for (i = 0;i < len;i++)
814      ROM[i] ^= 0xff;
815
816//  ROM[(0x174b9*0x20)+0x1f] |= 0x0e;       /* I */
817//  ROM[(0x174e9*0x20)+0x1f] |= 0x0e;
818
819   memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xc00000, 0xc07fff, 0, 0, hypr_sharedram1_w);
820   memory_install_write16_handler(cpu_get_address_space(machine->cpu[1], ADDRESS_SPACE_PROGRAM), 0xc00000, 0xc07fff, 0, 0, hypr_sharedram1_w);
821   memory_install_write16_handler(cpu_get_address_space(machine->cpu[1], ADDRESS_SPACE_PROGRAM), 0x000000, 0x003fff, 0, 0, hypr_sharedram1_w);
822
823   memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xfe0000, 0xffffff, 0, 0, hypr_sharedram2_w);
824   memory_install_write16_handler(cpu_get_address_space(machine->cpu[1], ADDRESS_SPACE_PROGRAM), 0xfe0000, 0xffffff, 0, 0, hypr_sharedram2_w);
825
826   requested_int = 0x00;
827   blitter_bit = 2;
828   *hypr_irq_enable = 0xff;
829
830   int_num = strcmp(machine->gamedrv->name, "magerror")?2:1;
831}
832
833
834694ROM_START( hyprduel )
835695   ROM_REGION( 0x80000, "maincpu", 0 )
836696   ROM_LOAD16_BYTE( "24.u24", 0x000000, 0x40000, CRC(c7402722) SHA1(e385676cdcee65a3ddf07791d82a1fe83ba1b3e2) ) /* Also silk screened as position 10 */
r4441r4442
876736   ROM_LOAD( "97.u97", 0x00000, 0x40000, CRC(2e62bca8) SHA1(191fff11186dbbc1d9d9f3ba1b6e17c38a7d2d1d) ) /* Also silk screened as position 11 */
877737ROM_END
878738
879GAME( 1993, hyprduel, 0,        hyprduel, hyprduel, hyprduel, ROT0, "Technosoft", "Hyper Duel (Japan set 1)", 0 )
880GAME( 1993, hyprdelj, hyprduel, hyprduel, hyprduel, hyprduel, ROT0, "Technosoft", "Hyper Duel (Japan set 2)", 0 )
881739
882GAME( 199?, magerror, 0,        magerror, hyprduel, hyprduel, ROT0, "Technosoft / Jaleco", "Magical Error wo Sagase", GAME_NOT_WORKING )
740static DRIVER_INIT( hyprduel )
741{
742   int_num = 0x02;
743
744   memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xc00408, 0xc0040b, 0, 0, hypr_cpusync_r);
745
746   /* Set up save state */
747   state_save_register_global(machine, blitter_bit);
748   state_save_register_global(machine, requested_int);
749   state_save_register_global(machine, subcpu_resetline);
750   state_save_register_global(machine, int_num);
751}
752
753static DRIVER_INIT( magerror )
754{
755   DRIVER_INIT_CALL(hyprduel);
756
757   int_num = 0x01;
758   magerror_irq_timer = timer_alloc(machine, magerror_irq_callback, NULL);
759}
760
761
762GAME( 1993, hyprduel, 0,        hyprduel, hyprduel, hyprduel, ROT0, "Technosoft", "Hyper Duel (Japan set 1)", GAME_SUPPORTS_SAVE )
763GAME( 1993, hyprdelj, hyprduel, hyprduel, hyprduel, hyprduel, ROT0, "Technosoft", "Hyper Duel (Japan set 2)", GAME_SUPPORTS_SAVE )
764GAME( 1994, magerror, 0,        magerror, hyprduel, magerror, ROT0, "Technosoft / Jaleco", "Magical Error wo Sagase", GAME_SUPPORTS_SAVE )
src/mame/drivers/model2.c
r4441r4442
392392
393393static void chcolor(running_machine *machine, pen_t color, UINT16 data)
394394{
395   palette_set_color_rgb(machine,color,pal5bit(data >> 0),pal5bit(data >> 5),pal5bit(data >> 10));
395   palette_set_color_rgb(machine, color, pal5bit(data >> 0), pal5bit(data >> 5), pal5bit(data >> 10));
396396}
397397
398static WRITE32_HANDLER(pal32_w)
398static WRITE32_HANDLER( pal32_w )
399399{
400   COMBINE_DATA(paletteram32+offset);
400   COMBINE_DATA(paletteram32 + offset);
401401   if(ACCESSING_BITS_0_15)
402      chcolor(space->machine, offset*2, paletteram32[offset]);
402      chcolor(space->machine, offset * 2, paletteram32[offset]);
403403   if(ACCESSING_BITS_16_31)
404      chcolor(space->machine, offset*2+1, paletteram32[offset]>>16);
404      chcolor(space->machine, offset * 2 + 1, paletteram32[offset] >> 16);
405405}
406406
407static WRITE32_HANDLER(ctrl0_w)
407static WRITE32_HANDLER( ctrl0_w )
408408{
409   if(ACCESSING_BITS_0_7) {
409   if(ACCESSING_BITS_0_7)
410   {
410411      model2_ctrlmode = data & 0x01;
411412      eeprom_write_bit(data & 0x20);
412413      eeprom_set_clock_line((data & 0x80) ? ASSERT_LINE : CLEAR_LINE);
r4441r4442
414415   }
415416}
416417
417static READ32_HANDLER(ctrl0_r)
418static WRITE32_HANDLER( analog_2b_w )
418419{
419   UINT32 ret = input_port_read(space->machine, "IN0");
420   ret <<= 16;
421   if(model2_ctrlmode==0)
422   {
423      return ret;
424   }
425   else
426   {
427      ret &= ~0x00300000;
428      return ret | 0x00d00000 | (eeprom_read_bit() << 21);
429   }
420   analog_channel = (data >> 16) & 0x07;
430421}
431static READ32_HANDLER(ctrl1_r)
432{
433   return input_port_read(space->machine, "IN1") | input_port_read(space->machine, "IN2")<<16;
434}
435422
436static READ32_HANDLER(ctrl10_r)
437{
438   return input_port_read(space->machine, "IN0") | input_port_read(space->machine, "IN1")<<16;
439}
440423
441static READ32_HANDLER(ctrl14_r)
424static READ32_HANDLER( fifoctl_r )
442425{
443   return input_port_read(space->machine, "IN2");
444}
426   UINT32 r = 0;
445427
446static READ32_HANDLER(analog_r)
447{
448   if (offset)
449      return input_port_read_safe(space->machine, "BRAKE", 0);
450
451   return input_port_read_safe(space->machine, "STEER", 0) | input_port_read_safe(space->machine, "ACCEL", 0)<<16;
452}
453
454static READ32_HANDLER(analog_2b_r)
455{
456   UINT32 iptval=0x00ff;
457   if(analog_channel<4)
428   if (copro_fifoout_num == 0)
458429   {
459      static const char *const ports[] = { "ANA0", "ANA1", "ANA2", "ANA3" };
460      iptval=input_port_read_safe(space->machine, ports[analog_channel], 0);
461      ++analog_channel;
430      r |= 1;
462431   }
463   return (iptval<<16)|0x0000001a;
432
433   // #### 1 if fifo empty, zerogun needs | 0x04 set
434   return r | 0x04;
464435}
465436
466static WRITE32_HANDLER(analog_2b_w)
437static READ32_HANDLER( videoctl_r )
467438{
468   analog_channel=(data>>16)&7;
439   return (video_screen_get_frame_number(space->machine->primary_screen) & 1) << 2;
469440}
470441
471
472static READ32_HANDLER(fifoctl_r)
442static CUSTOM_INPUT( _1c00000_r )
473443{
474   UINT32 r = 0;
444   UINT32 ret = input_port_read(field->port->machine, "IN0");
475445
476   if (copro_fifoout_num == 0)
446   if(model2_ctrlmode == 0)
477447   {
478      r |= 1;
448      return ret;
479449   }
480
481   // #### 1 if fifo empty, zerogun needs | 0x04 set
482   return r | 0x04;
450   else
451   {
452      ret &= ~0x0030;
453      return ret | 0x00d0 | (eeprom_read_bit() << 5);
454   }
483455}
484456
485static READ32_HANDLER(videoctl_r)
457static CUSTOM_INPUT( _1c0001c_r )
486458{
487   return (video_screen_get_frame_number(space->machine->primary_screen) & 1)<<2;
459   UINT32 iptval = 0x00ff;
460   if(analog_channel < 4)
461   {
462      static const char *const ports[] = { "ANA0", "ANA1", "ANA2", "ANA3" };
463      iptval = input_port_read_safe(field->port->machine, ports[analog_channel], 0);
464      ++analog_channel;
465   }
466   return iptval;
488467}
489468
490
491
492
493469/*****************************************************************************/
494470/* COPRO */
495471
r4441r4442
818794/*****************************************************************************/
819795
820796
821
822
823
824
825797static READ32_HANDLER(hotd_unk_r)
826798{
827799   return 0x000c0000;
r4441r4442
12951267   AM_RANGE(0x12400000, 0x125fffff) AM_RAM_WRITE(model2o_tex_w1) AM_MIRROR(0x200000) AM_BASE(&model2_textureram1)   // texture RAM 1
12961268   AM_RANGE(0x12800000, 0x1281ffff) AM_RAM_WRITE(model2o_luma_w) AM_BASE(&model2_lumaram) // polygon "luma" RAM
12971269
1298   AM_RANGE(0x01c00000, 0x01c00007) AM_READ(analog_r)
1299   AM_RANGE(0x01c00010, 0x01c00013) AM_READ(ctrl10_r)
1300   AM_RANGE(0x01c00014, 0x01c00017) AM_READ(ctrl14_r)
1270   AM_RANGE(0x01c00000, 0x01c00003) AM_READ_PORT("1c00000")
1271   AM_RANGE(0x01c00004, 0x01c00007) AM_READ_PORT("1c00004")
1272   AM_RANGE(0x01c00010, 0x01c00013) AM_READ_PORT("1c00010")
1273   AM_RANGE(0x01c00014, 0x01c00017) AM_READ_PORT("1c00014")
13011274   AM_RANGE(0x01c0001c, 0x01c0001f) AM_READ( desert_unk_r )
13021275   AM_RANGE(0x01c00040, 0x01c00043) AM_READ( daytona_unk_r )
13031276   AM_RANGE(0x01c00200, 0x01c002ff) AM_RAM AM_BASE( &model2_backup2 )
r4441r4442
13221295   AM_RANGE(0x12400000, 0x125fffff) AM_RAM_WRITE(model2o_tex_w1) AM_MIRROR(0x200000) AM_BASE(&model2_textureram1)   // texture RAM 1
13231296   AM_RANGE(0x12800000, 0x1281ffff) AM_RAM_WRITE(model2o_luma_w) AM_BASE(&model2_lumaram) // polygon "luma" RAM
13241297
1325   AM_RANGE(0x01c00000, 0x01c00003) AM_READWRITE(ctrl0_r, ctrl0_w)
1326   AM_RANGE(0x01c00004, 0x01c00007) AM_READ(ctrl1_r)
1327   AM_RANGE(0x01c00010, 0x01c00013) AM_READ(ctrl10_r)
1328   AM_RANGE(0x01c00014, 0x01c00017) AM_READ(ctrl14_r)
1298   AM_RANGE(0x01c00000, 0x01c00003) AM_READ_PORT("1c00000") AM_WRITE( ctrl0_w )
1299   AM_RANGE(0x01c00004, 0x01c00007) AM_READ_PORT("1c00004")
1300   AM_RANGE(0x01c00010, 0x01c00013) AM_READ_PORT("1c00010")
1301   AM_RANGE(0x01c00014, 0x01c00017) AM_READ_PORT("1c00014")
13291302   AM_RANGE(0x01c00018, 0x01c0001b) AM_READ( hotd_unk_r )
1330   AM_RANGE(0x01c0001c, 0x01c0001f) AM_READ( analog_2b_r ) AM_WRITE( analog_2b_w )
1303   AM_RANGE(0x01c0001c, 0x01c0001f) AM_READ_PORT("1c0001c") AM_WRITE( analog_2b_w )
13311304   AM_RANGE(0x01c80000, 0x01c80003) AM_READWRITE( model2_serial_r, model2_serial_w )
13321305ADDRESS_MAP_END
13331306
r4441r4442
13551328   AM_RANGE(0x11400000, 0x1140ffff) AM_RAM   AM_BASE(&model2_lumaram)      // polygon "luma" RAM (2b/2c)
13561329
13571330
1358   AM_RANGE(0x01c00000, 0x01c00003) AM_READWRITE(ctrl0_r, ctrl0_w)
1359   AM_RANGE(0x01c00004, 0x01c00007) AM_READ(ctrl1_r)
1360   AM_RANGE(0x01c00010, 0x01c00013) AM_READ(ctrl10_r)
1361   AM_RANGE(0x01c00014, 0x01c00017) AM_READ(ctrl14_r)
1331   AM_RANGE(0x01c00000, 0x01c00003) AM_READ_PORT("1c00000") AM_WRITE( ctrl0_w )
1332   AM_RANGE(0x01c00004, 0x01c00007) AM_READ_PORT("1c00004")
1333   AM_RANGE(0x01c00010, 0x01c00013) AM_READ_PORT("1c00010")
1334   AM_RANGE(0x01c00014, 0x01c00017) AM_READ_PORT("1c00014")
13621335   AM_RANGE(0x01c00018, 0x01c0001b) AM_READ( hotd_unk_r )
1363   AM_RANGE(0x01c0001c, 0x01c0001f) AM_READ( analog_2b_r ) AM_WRITE( analog_2b_w )
1336   AM_RANGE(0x01c0001c, 0x01c0001f) AM_READ_PORT("1c0001c") AM_WRITE( analog_2b_w )
13641337   AM_RANGE(0x01c80000, 0x01c80003) AM_READWRITE( model2_serial_r, model2_serial_w )
13651338ADDRESS_MAP_END
13661339
r4441r4442
13791352   AM_RANGE(0x11200000, 0x113fffff) AM_RAM   AM_BASE(&model2_textureram1)   // texture RAM 1 (2b/2c)
13801353   AM_RANGE(0x11400000, 0x1140ffff) AM_RAM   AM_BASE(&model2_lumaram)      // polygon "luma" RAM (2b/2c)
13811354
1382   AM_RANGE(0x01c00000, 0x01c00003) AM_READWRITE(ctrl0_r, ctrl0_w)
1383   AM_RANGE(0x01c00004, 0x01c00007) AM_READ(ctrl1_r)
1384   AM_RANGE(0x01c00010, 0x01c00013) AM_READ(ctrl10_r)
1385   AM_RANGE(0x01c00014, 0x01c00017) AM_READ(ctrl14_r)
1355   AM_RANGE(0x01c00000, 0x01c00003) AM_READ_PORT("1c00000") AM_WRITE( ctrl0_w )
1356   AM_RANGE(0x01c00004, 0x01c00007) AM_READ_PORT("1c00004")
1357   AM_RANGE(0x01c00010, 0x01c00013) AM_READ_PORT("1c00010")
1358   AM_RANGE(0x01c00014, 0x01c00017) AM_READ_PORT("1c00014")
13861359   AM_RANGE(0x01c00018, 0x01c0001b) AM_READ( hotd_unk_r )
1387   AM_RANGE(0x01c0001c, 0x01c0001f) AM_READ( analog_2b_r ) AM_WRITE( analog_2b_w )
1360   AM_RANGE(0x01c0001c, 0x01c0001f) AM_READ_PORT("1c0001c") AM_WRITE( analog_2b_w )
13881361   AM_RANGE(0x01c80000, 0x01c80003) AM_READWRITE( model2_serial_r, model2_serial_w )
13891362ADDRESS_MAP_END
13901363
13911364/* Input definitions */
13921365
13931366#define MODEL2_PLAYER_INPUTS(_n_, _b1_, _b2_, _b3_, _b4_) \
1394   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_##_b1_         ) PORT_PLAYER(_n_) \
1395   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_##_b2_         ) PORT_PLAYER(_n_) \
1396   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_##_b3_         ) PORT_PLAYER(_n_) \
1397   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_##_b4_         ) PORT_PLAYER(_n_) \
1398   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  ) PORT_PLAYER(_n_) \
1399   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    ) PORT_PLAYER(_n_) \
1400   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(_n_) \
1401   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  ) PORT_PLAYER(_n_)
1367   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_##_b1_         ) PORT_PLAYER(_n_) \
1368   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_##_b2_         ) PORT_PLAYER(_n_) \
1369   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_##_b3_         ) PORT_PLAYER(_n_) \
1370   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_##_b4_         ) PORT_PLAYER(_n_) \
1371   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN  ) PORT_PLAYER(_n_) \
1372   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_UP    ) PORT_PLAYER(_n_) \
1373   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(_n_) \
1374   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  ) PORT_PLAYER(_n_)
14021375
14031376static INPUT_PORTS_START( model2 )
1377   PORT_START("1c00000")
1378   PORT_BIT( 0x0000ffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
1379   PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(_1c00000_r, NULL)
1380
1381   PORT_START("1c00004")
1382   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1")
1383   PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN2")
1384
1385   PORT_START("1c00010")
1386   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN0")
1387   PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1")
1388
1389   PORT_START("1c00014")
1390   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN2")
1391   PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN )
1392
1393   PORT_START("1c0001c")
1394   PORT_BIT( 0x0000001a, IP_ACTIVE_HIGH, IPT_SPECIAL )   // these must be high
1395   PORT_BIT( 0x0000ffe5, IP_ACTIVE_LOW, IPT_UNKNOWN )
1396   PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(_1c0001c_r, NULL)
1397
14041398   PORT_START("IN0")
1405   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN1 )
1406   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_COIN2 )
1407   PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW )
1408   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
1409   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_START1 )
1410   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_START2 )
1411   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("1P Push Switch") PORT_CODE(KEYCODE_7)
1412   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("2P Push Switch") PORT_CODE(KEYCODE_8)
1399   PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
1400   PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
1401   PORT_SERVICE_NO_TOGGLE( 0x0004, IP_ACTIVE_LOW )
1402   PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_SERVICE1 )
1403   PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_START1 )
1404   PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_START2 )
1405   PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("1P Push Switch") PORT_CODE(KEYCODE_7)
1406   PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("2P Push Switch") PORT_CODE(KEYCODE_8)
1407   PORT_BIT(0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
14131408
14141409   PORT_START("IN1")
14151410   MODEL2_PLAYER_INPUTS(1, BUTTON1, BUTTON2, BUTTON3, BUTTON4)
1411   PORT_BIT(0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
14161412
14171413   PORT_START("IN2")
14181414   MODEL2_PLAYER_INPUTS(2, BUTTON1, BUTTON2, BUTTON3, BUTTON4)
1415   PORT_BIT(0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
14191416INPUT_PORTS_END
14201417
14211418static INPUT_PORTS_START( desert )
1419   PORT_START("1c00000")
1420   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "STEER")
1421   PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "ACCEL")
1422
1423   PORT_START("1c00004")
1424   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "BRAKE")
1425   PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN )
1426
1427   PORT_START("1c00010")
1428   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN0")
1429   PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1")
1430
1431   PORT_START("1c00014")
1432   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN2")
1433   PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN )
1434
14221435   PORT_START("IN0")
14231436   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN1 )
14241437   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_COIN2 )
r4441r4442
14391452   PORT_START("IN2")
14401453   MODEL2_PLAYER_INPUTS(2, BUTTON1, BUTTON2, BUTTON3, BUTTON4)
14411454
1442   PORT_START("STEER")   // steer
1455   PORT_START("STEER")
14431456   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(1)
14441457
1445   PORT_START("ACCEL")   // accel
1458   PORT_START("ACCEL")
14461459   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(1)
14471460
1448   PORT_START("BRAKE")   // brake
1461   PORT_START("BRAKE")
14491462   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(1)
14501463INPUT_PORTS_END
14511464
14521465static INPUT_PORTS_START( daytona )
1466   PORT_START("1c00000")
1467   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "STEER")
1468   PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "ACCEL")
1469
1470   PORT_START("1c00004")
1471   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "BRAKE")
1472   PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN )
1473
1474   PORT_START("1c00010")
1475   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN0")
1476   PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1")
1477
1478   PORT_START("1c00014")
1479   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN2")
1480   PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN )
1481
14531482   PORT_START("IN0")
14541483   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN1 )
14551484   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_COIN2 )
r4441r4442
14661495   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) // shift 3
14671496   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) // shift 4
14681497   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
1469   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
1498   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
14701499
14711500   PORT_START("IN2")
14721501   MODEL2_PLAYER_INPUTS(2, BUTTON1, BUTTON2, BUTTON3, BUTTON4)
14731502
1474   PORT_START("STEER")   // steer
1503   PORT_START("STEER")
14751504   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(1)
14761505
1477   PORT_START("ACCEL")   // accel
1506   PORT_START("ACCEL")
14781507   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(1)
14791508
1480   PORT_START("BREAK")   // brake
1509   PORT_START("BRAKE")
14811510   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(1)
14821511INPUT_PORTS_END
14831512
14841513static INPUT_PORTS_START( srallyc)
1514   PORT_START("1c00000")
1515   PORT_BIT( 0x0000ffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
1516   PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(_1c00000_r, NULL)
1517
1518   PORT_START("1c00004")
1519   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1")
1520   PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN2")
1521
1522   PORT_START("1c00010")
1523   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN0")
1524   PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1")
1525
1526   PORT_START("1c00014")
1527   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN2")
1528   PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN )
1529
1530   PORT_START("1c0001c")
1531   PORT_BIT( 0x0000001a, IP_ACTIVE_HIGH, IPT_SPECIAL )   // these must be high
1532   PORT_BIT( 0x0000ffe5, IP_ACTIVE_LOW, IPT_UNKNOWN )
1533   PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(_1c0001c_r, NULL)
1534
14851535   PORT_START("IN0")
1486   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN1 )
1487   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_COIN2 )
1488   PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW )
1489   PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_SERVICE1 )
1490   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) // VR
1491   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_START1 )
1492   PORT_BIT(0x90, IP_ACTIVE_LOW, IPT_UNUSED )
1536   PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
1537   PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
1538   PORT_SERVICE_NO_TOGGLE( 0x0004, IP_ACTIVE_LOW )
1539   PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_SERVICE1 )
1540   PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1) // VR
1541   PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_START1 )
1542   PORT_BIT(0x0090, IP_ACTIVE_LOW, IPT_UNUSED )
1543   PORT_BIT(0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
14931544
14941545   PORT_START("IN1")
1495   PORT_BIT(0xFF, IP_ACTIVE_LOW, IPT_UNUSED )
1546   PORT_BIT(0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
1547   PORT_BIT(0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
14961548
14971549   PORT_START("IN2")
1498   PORT_BIT(0xFF, IP_ACTIVE_LOW, IPT_UNUSED )
1550   PORT_BIT(0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
1551   PORT_BIT(0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
14991552
15001553   PORT_START("ANA0")   // steer
15011554   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(30) PORT_KEYDELTA(10) PORT_PLAYER(1)
r4441r4442
15091562
15101563
15111564static INPUT_PORTS_START( bel )
1565   PORT_START("1c00000")
1566   PORT_BIT( 0x0000ffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
1567   PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(_1c00000_r, NULL)
1568
1569   PORT_START("1c00004")
1570   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1")
1571   PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN2")
1572
1573   PORT_START("1c00010")
1574   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN0")
1575   PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN1")
1576
1577   PORT_START("1c00014")
1578   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "IN2")
1579   PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN )
1580
1581   PORT_START("1c0001c")
1582   PORT_BIT( 0x0000001a, IP_ACTIVE_HIGH, IPT_SPECIAL )   // these must be high
1583   PORT_BIT( 0x0000ffe5, IP_ACTIVE_LOW, IPT_UNKNOWN )
1584   PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(_1c0001c_r, NULL)
1585
15121586   PORT_START("IN0")
1513   PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN1 )
1514   PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_COIN2 )
1515   PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
1516   PORT_SERVICE_NO_TOGGLE( 0x08, IP_ACTIVE_LOW )
1517   PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_START1 )
1518   PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_START2 )
1519   PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("1P Push Switch") PORT_CODE(KEYCODE_7)
1520   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("2P Push Switch") PORT_CODE(KEYCODE_8)
1587   PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
1588   PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
1589   PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 )
1590   PORT_SERVICE_NO_TOGGLE( 0x0008, IP_ACTIVE_LOW )
1591   PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_START1 )
1592   PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_START2 )
1593   PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("1P Push Switch") PORT_CODE(KEYCODE_7)
1594   PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("2P Push Switch") PORT_CODE(KEYCODE_8)
1595   PORT_BIT(0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
15211596
15221597   PORT_START("IN1")
15231598   MODEL2_PLAYER_INPUTS(1, BUTTON1, BUTTON2, BUTTON3, BUTTON4)
1599   PORT_BIT(0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
15241600
15251601   PORT_START("IN2")
15261602   MODEL2_PLAYER_INPUTS(2, BUTTON1, BUTTON2, BUTTON3, BUTTON4)
1603   PORT_BIT(0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
15271604INPUT_PORTS_END
15281605
15291606static INTERRUPT_GEN(model2_interrupt)
src/mame/drivers/pcat_nit.c
r4441r4442
613613   ROM_LOAD("10-0003-04.u12", 0x080000,0x80000, CRC(5a50f519) SHA1(c07a583b4220d4d5506824def91774fede760e65) )
614614   ROM_LOAD("10-0003-04.u13", 0x100000,0x80000, CRC(8a609145) SHA1(18fcb58b461aa9149a163b85dd8267dec90da3cd) )
615615
616   ROM_REGION(0x10000, "disk_bios", 0) //TODO: should be half size
617   ROM_LOAD("disk-bios-10-0001-04.u10",     0x00000, 0x10000, CRC(f2b50115) SHA1(b329f798ade8d891614e1af78e3d91f5c82af73d))
616   ROM_REGION(0x08000, "disk_bios", 0)
617   ROM_LOAD("disk-bios-10-0001-04.u10",     0x00000, 0x08000, CRC(1b4ce068) SHA1(8570b36acf3eb29f1c59e56a4dad6d38c218748f) )
618618
619619   ROM_REGION(0x08000, "nvram_data", 0)
620620   ROM_LOAD("8k_nvram.u9",     0x00000, 0x02000, CRC(44be0b89) SHA1(81666dd369d1d85269833293136d61ffe80e940a))
r4441r4442
630630
631631   ROM_REGION(0x180000, "game_prg", 0)   /* proper game */
632632   ROM_LOAD("10-00003-03.u11", 0x000000,0x80000, CRC(2fbcb12b) SHA1(f6413565fc1289ba32b411de877cdf6526f1fa9d) )
633   ROM_LOAD("10-00003-03.u12", 0x080000,0x80000, CRC(75660aac) SHA1(6a521e1d2a632c26e53b83d2cc4b0edecfc1e68c) )
633   ROM_LOAD("10-00003-03.u12", 0x080000,0x80000, CRC(b37c7dff) SHA1(cf6318bfeca0bd272734f45c7589a0224863b0f1) )
634634   ROM_LOAD("10-00003-03.u13", 0x100000,0x80000, CRC(6a9d0771) SHA1(6cd9a56a2413416d0928e5cf9340c94bc0c87c46) )
635635
636   ROM_REGION(0x10000, "disk_bios", 0) //TODO: should be half size
637   ROM_LOAD("disk-bios-10-0001-04.u10",     0x00000, 0x10000, CRC(f2b50115) SHA1(b329f798ade8d891614e1af78e3d91f5c82af73d))
636   ROM_REGION(0x08000, "disk_bios", 0)
637   ROM_LOAD("disk-bios-10-0001-04.u10",     0x00000, 0x08000, CRC(1b4ce068) SHA1(8570b36acf3eb29f1c59e56a4dad6d38c218748f) )
638638
639639   ROM_REGION(0x08000, "nvram_data", 0)
640640   ROM_LOAD("8k_nvram.u9",     0x00000, 0x02000, CRC(44be0b89) SHA1(81666dd369d1d85269833293136d61ffe80e940a))
r4441r4442
645645   ROM_LOAD("system-bios-sx-10-0004-02.u6", 0x00000, 0x10000, CRC(fa545ba8) SHA1(db64548bd87262cd2e82175a1b66f168b5ae072d) )
646646
647647   ROM_REGION(0x08000, "video_bios", 0)
648   ROM_LOAD16_BYTE("techyosd-isa-bios-v1.2.u8",     0x00000, 0x04000, BAD_DUMP CRC(1446cc86) SHA1(b51ba8dde59b3cd5bbd92e15903187a9a06d4018) )
649   ROM_CONTINUE(                                    0x00001, 0x04000 ) //FIXED BITS (xxxx0xxx)
648   ROM_LOAD16_BYTE("techyosd-isa-bios-v1.2.u8",     0x00000, 0x04000, CRC(6adf7e71) SHA1(2b07d964cc7c2c0aa560625b7c12f38d4537d652) )
649   ROM_CONTINUE(                                    0x00001, 0x04000 )
650650
651651   ROM_REGION(0x300000, "game_prg", 0)   /* proper game */
652   ROM_LOAD("10-0018-03-090894.u11", 0x000000,0x80000, BAD_DUMP CRC(75660aac) SHA1(6a521e1d2a632c26e53b83d2cc4b0edecfc1e68c) ) //BLANK!
652   ROM_LOAD("10-0018-03-090894.u11", 0x000000,0x80000, CRC(32b6c8bc) SHA1(7f4097990dca268915842d4253d4257654de2cfc) )
653653   ROM_LOAD("10-0018-03-090894.u12", 0x080000,0x80000, CRC(d7cb191d) SHA1(2047f3668b0e41ad5347107f4e3446c0374c5bb7) )
654654   ROM_LOAD("10-0018-03-090894.u13", 0x100000,0x80000, CRC(1d3ddeaa) SHA1(8e73fe535882f6d634668733e550281e727fbdbc) )
655655   ROM_LOAD("10-0018-03-090894.u15", 0x180000,0x80000, CRC(b9b3f442) SHA1(6ea5ce3eb007b95ad3350fdb634625b151ae7bdb) )
656656   ROM_LOAD("10-0018-03-090894.u16", 0x200000,0x80000, CRC(5b0dd6f5) SHA1(8172118185179ecb7d3f958480186bf9c906785f) )
657657   ROM_LOAD("10-0018-03-090894.u17", 0x280000,0x80000, CRC(b637eb58) SHA1(7c4615f58118d9b82575d816ef916fccbb1be0f9) )
658658
659   ROM_REGION(0x10000, "disk_bios", 0) //TODO: should be half size
660   ROM_LOAD("disk-bios-10-0001-04.u10",     0x00000, 0x10000, CRC(f2b50115) SHA1(b329f798ade8d891614e1af78e3d91f5c82af73d))
659   ROM_REGION(0x08000, "disk_bios", 0)
660   ROM_LOAD("disk-bios-10-0001-04.u10",     0x00000, 0x08000, CRC(1b4ce068) SHA1(8570b36acf3eb29f1c59e56a4dad6d38c218748f) )
661661
662662   ROM_REGION(0x08000, "nvram_data", 0)
663663   ROM_LOAD("bq4010yma-150.u9",     0x00000, 0x02000, CRC(f4ca28ee) SHA1(17b852028568fb814df62f5870b91a8303302b55))
r4441r4442
668668   ROM_LOAD("system-bios-sx-10-0004-02.u6", 0x00000, 0x10000, CRC(fa545ba8) SHA1(db64548bd87262cd2e82175a1b66f168b5ae072d) )
669669
670670   ROM_REGION(0x08000, "video_bios", 0)
671   ROM_LOAD16_BYTE("techyosd-isa-bios-v1.2.u8",     0x00000, 0x04000, BAD_DUMP CRC(1446cc86) SHA1(b51ba8dde59b3cd5bbd92e15903187a9a06d4018) )
672   ROM_CONTINUE(                                    0x00001, 0x04000 ) //FIXED BITS (xxxx0xxx)
671   ROM_LOAD16_BYTE("techyosd-isa-bios-v1.2.u8",     0x00000, 0x04000, CRC(6adf7e71) SHA1(2b07d964cc7c2c0aa560625b7c12f38d4537d652) )
672   ROM_CONTINUE(                                    0x00001, 0x04000 )
673673
674674   ROM_REGION(0x300000, "game_prg", 0)   /* proper game */
675675   ROM_LOAD("10-0018-02-081794.u11", 0x000000,0x80000, CRC(f87fa935) SHA1(b06144496406231aa63149ae12a048ffab8f77d0) )
r4441r4442
679679   ROM_LOAD("10-0018-02-081794.u16", 0x200000,0x80000, CRC(fe29ad76) SHA1(64aaae639f024c50c09fe920bc92e6d45ced5648) )
680680   ROM_LOAD("10-0018-02-081794.u17", 0x280000,0x80000, CRC(066108fe) SHA1(ef837422a2a81f5ac3375b6ed68f20143ac6caec) )
681681
682   ROM_REGION(0x10000, "disk_bios", 0) //TODO: should be half size
683   ROM_LOAD("disk-bios-10-0001-04.u10",     0x00000, 0x10000, CRC(f2b50115) SHA1(b329f798ade8d891614e1af78e3d91f5c82af73d))
682   ROM_REGION(0x08000, "disk_bios", 0)
683   ROM_LOAD("disk-bios-10-0001-04.u10",     0x00000, 0x08000, CRC(1b4ce068) SHA1(8570b36acf3eb29f1c59e56a4dad6d38c218748f) )
684684
685685   ROM_REGION(0x08000, "nvram_data", 0)
686686   ROM_LOAD("bq4010yma-150.u9",     0x00000, 0x02000, CRC(f4ca28ee) SHA1(17b852028568fb814df62f5870b91a8303302b55))
src/mame/drivers/hyperspt.c
r4441r4442
22
33Based on drivers from Juno First emulator by Chris Hardy (chrish@kcbbs.gen.nz)
44
5- DIPs verified and defaults (when avaialble) are set from manuals
6
57***************************************************************************/
68
79#include "driver.h"
r4441r4442
131133   AM_RANGE(0xe002, 0xe002) AM_DEVWRITE("sn", konami_SN76496_w)     /* This address triggers the SN chip to read the data port. */
132134ADDRESS_MAP_END
133135
134
135
136static INPUT_PORTS_START( hyperspt )
137   PORT_START("SYSTEM")
138   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
139   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
140   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
141   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
142   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
143   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN4 )
144   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
145   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
146
147   PORT_START("P1_P2")
148   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
149   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
150   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
151   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START3 )
152   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
153   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
154   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
155//  PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
156   /* Fake button to press buttons 1 and 3 impossibly fast. Handle via konami_IN1_r */
157   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Run Like Hell (Cheat)") PORT_PLAYER(1)
158
159   PORT_START("P3_P4")
160   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3  ) PORT_PLAYER(3) //PORT_COCKTAIL  These were commented out
161   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2  ) PORT_PLAYER(3) //PORT_COCKTAIL  before the system changed.
162   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1  ) PORT_PLAYER(3) //PORT_COCKTAIL  Why?
163   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START4 )
164   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3  ) PORT_PLAYER(4) //PORT_COCKTAIL
165   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2  ) PORT_PLAYER(4) //PORT_COCKTAIL
166   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1  ) PORT_PLAYER(4) //PORT_COCKTAIL
167   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
168
136static INPUT_PORTS_START( shared_dsw1 )
137        /* This DSW1 is shared between games */
169138   PORT_START("DSW1")
170   PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )
139   PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:1,2,3,4")
171140   PORT_DIPSETTING(   0x02, DEF_STR( 4C_1C ) )
172141   PORT_DIPSETTING(   0x05, DEF_STR( 3C_1C ) )
173142   PORT_DIPSETTING(   0x08, DEF_STR( 2C_1C ) )
r4441r4442
184153   PORT_DIPSETTING(   0x0a, DEF_STR( 1C_6C ) )
185154   PORT_DIPSETTING(   0x09, DEF_STR( 1C_7C ) )
186155   PORT_DIPSETTING(   0x00, DEF_STR( Free_Play ) )
187   PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )
156   PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6,7,8")
188157   PORT_DIPSETTING(   0x20, DEF_STR( 4C_1C ) )
189158   PORT_DIPSETTING(   0x50, DEF_STR( 3C_1C ) )
190159   PORT_DIPSETTING(   0x80, DEF_STR( 2C_1C ) )
r4441r4442
203172   PORT_DIPSETTING(   0x00, "Disabled" )
204173   /* 0x00 disables Coin 2. It still accepts coins and makes the sound, but
205174       it doesn't give you any credit */
175INPUT_PORTS_END
206176
177
178static INPUT_PORTS_START( hyperspt )
179   PORT_START("SYSTEM")
180   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
181   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
182   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
183   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
184   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
185   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN4 )
186   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
187   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
188
189   PORT_START("P1_P2")
190   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
191   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
192   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
193   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START3 )
194   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
195   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
196   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
197//  PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
198   /* Fake button to press buttons 1 and 3 impossibly fast. Handle via konami_IN1_r */
199   PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Run Like Hell (Cheat)") PORT_PLAYER(1)
200
201   PORT_START("P3_P4")
202   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3  ) PORT_PLAYER(3) //PORT_COCKTAIL  These were commented out
203   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2  ) PORT_PLAYER(3) //PORT_COCKTAIL  before the system changed.
204   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1  ) PORT_PLAYER(3) //PORT_COCKTAIL  Why?
205   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START4 )
206   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3  ) PORT_PLAYER(4) //PORT_COCKTAIL
207   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2  ) PORT_PLAYER(4) //PORT_COCKTAIL
208   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1  ) PORT_PLAYER(4) //PORT_COCKTAIL
209   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
210
211        PORT_INCLUDE(shared_dsw1)
212
207213   PORT_START("DSW2")
208   PORT_DIPNAME( 0x01, 0x00, "After Last Event" )
214   PORT_DIPNAME( 0x01, 0x01, "After Last Event" ) PORT_DIPLOCATION("SW2:1")
209215   PORT_DIPSETTING(   0x01, "Game Over" )
210216   PORT_DIPSETTING(   0x00, "Game Continues" )
211   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) )
217   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:2")
212218   PORT_DIPSETTING(   0x00, DEF_STR( Upright ) )
213219   PORT_DIPSETTING(   0x02, DEF_STR( Cocktail ) )
214   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Demo_Sounds ) )
220   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:3")
215221   PORT_DIPSETTING(   0x04, DEF_STR( Off ) )
216222   PORT_DIPSETTING(   0x00, DEF_STR( On ) )
217   PORT_DIPNAME( 0x08, 0x08, "World Records" )
223   PORT_DIPNAME( 0x08, 0x08, "World Records" ) PORT_DIPLOCATION("SW2:4")
218224   PORT_DIPSETTING(   0x08, "Don't Erase" )
219225   PORT_DIPSETTING(   0x00, "Erase on Reset" )
220   PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Difficulty ) )
226   PORT_DIPNAME( 0xf0, 0x40, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:5,6,7,8")
221227   PORT_DIPSETTING(   0xf0, "Easy 1" )
222228   PORT_DIPSETTING(   0xe0, "Easy 2" )
223229   PORT_DIPSETTING(   0xd0, "Easy 3" )
r4441r4442
236242   PORT_DIPSETTING(   0x00, "Difficult 4" )
237243INPUT_PORTS_END
238244
245
239246static INPUT_PORTS_START( roadf )
240247   PORT_START("SYSTEM")
241248   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
r4441r4442
267274   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )   /* the game doesn't boot if this is 1 */
268275   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
269276
270   PORT_START("DSW1")
271   PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )
272   PORT_DIPSETTING(   0x02, DEF_STR( 4C_1C ) )
273   PORT_DIPSETTING(   0x05, DEF_STR( 3C_1C ) )
274   PORT_DIPSETTING(   0x08, DEF_STR( 2C_1C ) )
275   PORT_DIPSETTING(   0x04, DEF_STR( 3C_2C ) )
276   PORT_DIPSETTING(   0x01, DEF_STR( 4C_3C ) )
277   PORT_DIPSETTING(   0x0f, DEF_STR( 1C_1C ) )
278   PORT_DIPSETTING(   0x03, DEF_STR( 3C_4C ) )
279   PORT_DIPSETTING(   0x07, DEF_STR( 2C_3C ) )
280   PORT_DIPSETTING(   0x0e, DEF_STR( 1C_2C ) )
281   PORT_DIPSETTING(   0x06, DEF_STR( 2C_5C ) )
282   PORT_DIPSETTING(   0x0d, DEF_STR( 1C_3C ) )
283   PORT_DIPSETTING(   0x0c, DEF_STR( 1C_4C ) )
284   PORT_DIPSETTING(   0x0b, DEF_STR( 1C_5C ) )
285   PORT_DIPSETTING(   0x0a, DEF_STR( 1C_6C ) )
286   PORT_DIPSETTING(   0x09, DEF_STR( 1C_7C ) )
287   PORT_DIPSETTING(   0x00, DEF_STR( Free_Play ) )
288   PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )
289   PORT_DIPSETTING(   0x20, DEF_STR( 4C_1C ) )
290   PORT_DIPSETTING(   0x50, DEF_STR( 3C_1C ) )
291   PORT_DIPSETTING(   0x80, DEF_STR( 2C_1C ) )
292   PORT_DIPSETTING(   0x40, DEF_STR( 3C_2C ) )
293   PORT_DIPSETTING(   0x10, DEF_STR( 4C_3C ) )
294   PORT_DIPSETTING(   0xf0, DEF_STR( 1C_1C ) )
295   PORT_DIPSETTING(   0x30, DEF_STR( 3C_4C ) )
296   PORT_DIPSETTING(   0x70, DEF_STR( 2C_3C ) )
297   PORT_DIPSETTING(   0xe0, DEF_STR( 1C_2C ) )
298   PORT_DIPSETTING(   0x60, DEF_STR( 2C_5C ) )
299   PORT_DIPSETTING(   0xd0, DEF_STR( 1C_3C ) )
300   PORT_DIPSETTING(   0xc0, DEF_STR( 1C_4C ) )
301   PORT_DIPSETTING(   0xb0, DEF_STR( 1C_5C ) )
302   PORT_DIPSETTING(   0xa0, DEF_STR( 1C_6C ) )
303   PORT_DIPSETTING(   0x90, DEF_STR( 1C_7C ) )
304   PORT_DIPSETTING(   0x00, "Disabled" )
305   /* 0x00 disables Coin 2. It still accepts coins and makes the sound, but
306       it doesn't give you any credit */
277        PORT_INCLUDE(shared_dsw1)
307278
308279   PORT_START("DSW2")
309   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Allow_Continue ) )
280   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW2:1")
310281   PORT_DIPSETTING(   0x01, DEF_STR( No ) )
311282   PORT_DIPSETTING(   0x00, DEF_STR( Yes ) )
312   PORT_DIPNAME( 0x06, 0x06, "Number of Opponents" )
313   PORT_DIPSETTING(   0x06, DEF_STR( Easy ) )
314   PORT_DIPSETTING(   0x04, DEF_STR( Medium ) )
315   PORT_DIPSETTING(   0x02, DEF_STR( Hard ) )
316   PORT_DIPSETTING(   0x00, DEF_STR( Hardest ) )
317   PORT_DIPNAME( 0x08, 0x08, "Speed of Opponents" )
318   PORT_DIPSETTING(   0x08, DEF_STR( Easy ) )
319   PORT_DIPSETTING(   0x00, "Difficult" )
320   PORT_DIPNAME( 0x30, 0x30, "Fuel Consumption" )
321   PORT_DIPSETTING(   0x30, DEF_STR( Easy ) )
322   PORT_DIPSETTING(   0x20, DEF_STR( Medium ) )
323   PORT_DIPSETTING(   0x10, DEF_STR( Hard ) )
324   PORT_DIPSETTING(   0x00, DEF_STR( Hardest ) )
325   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) )
283   PORT_DIPNAME( 0x06, 0x04, "Number of Opponents" ) PORT_DIPLOCATION("SW2:2,3")
284   PORT_DIPSETTING(   0x06, "Few" )
285   PORT_DIPSETTING(   0x04, DEF_STR( Normal ) )
286   PORT_DIPSETTING(   0x02, "Many" )
287   PORT_DIPSETTING(   0x00, "Great Many" )
288   PORT_DIPNAME( 0x08, 0x08, "Speed of Opponents" ) PORT_DIPLOCATION("SW2:4")
289   PORT_DIPSETTING(   0x08, "Fast" )
290   PORT_DIPSETTING(   0x00, "Slow" )
291   PORT_DIPNAME( 0x30, 0x20, "Fuel Consumption" ) PORT_DIPLOCATION("SW2:5,6")
292   PORT_DIPSETTING(   0x30, "Slow" )
293   PORT_DIPSETTING(   0x20, DEF_STR( Normal ) )
294   PORT_DIPSETTING(   0x10, "Fast" )
295   PORT_DIPSETTING(   0x00, "Very Fast" )
296   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:7")
326297   PORT_DIPSETTING(   0x00, DEF_STR( Upright ) )
327298   PORT_DIPSETTING(   0x40, DEF_STR( Cocktail ) )
328   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) )
299   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:8")
329300   PORT_DIPSETTING(   0x80, DEF_STR( Off ) )
330301   PORT_DIPSETTING(   0x00, DEF_STR( On ) )
331302INPUT_PORTS_END
332303
333304
334
335305static const gfx_layout hyperspt_charlayout =
336306{
337307   8,8,   /* 8*8 sprites */
src/mame/drivers/zodiack.c
r4441r4442
1/*
2
3Zodiack
4Orca, 1983
5
6PCB Layouts
7-----------
8
9Top PCB                             Middle PCB
10
11 |---------------------|             |---------------------|
12 |     HM4334     DIP24|             |             OVG30C.6|
13|-|    HM4334          |            |-|              DIP24 |
14| |            OVG20C.1|            | |    6116      DIP24 |
15| |                    |            | |              DIP24 |
16| |               Z80  |            | |            OVG30C.3|
17| |                    |            | |            OVG30C.2|
18|-|                    |            |-|                    |
19 |             AY3-8910|             |                     |
20 |                     |             |                     |
21 |2                    |             |                     |
22 |2           DSW1 DSW2|             |                     |
23 |W                    |             |            Z80      |
24 |A  555 LM324         |             |                     |
25 |Y  M51516   VOL      |             |            18.432MHz|
26 |---------------------|             |---------------------|
27Notes:                              Notes:
28      Z80      - clock 18.432/6           Z80   - clock 18.432/6
29      AY3-8910 - clock 18.432/12          6116  - 2k x8 SRAM
30      HM4334   - 1k x4 SRAM               DIP24 - Empty socket
31      DIP24    - Empty socket             ROM 2/3 - 2764
32      ROM 1    - 2716                     ROM 6   - 2732
33      VSync    - 60.5900Hz
34      HSync    - 15.5143kHz
35
36
37Bottom PCB
38
39 |------------------------------------------|
40 |    2114          OVG40C.7                |
41|-|   2114                         OVG40C.9 |
42| |                   2114                  |
43| |                   2114         OVG40C.8 |
44| |                                         |
45| |        2114                             |
46|-|        2114                             |
47 |                                          |
48 |                                          |
49 |                           93422          |
50 |         OVG40C.2B                        |
51 |         OVG40C.2A                        |
52 |------------------------------------------|
53Notes:
54      2114  - 1k x4 SRAM
55      93422 - 256 x4 SRAM
56      ALL ROMs 2732
57      ALL PROMs MMI 6331
58
59*/
60
161/***************************************************************************
262
363Zodiack/Dogfight Memory Map (preliminary)
src/mame/drivers/pgm.c
r4441r4442
163163ASIC 25 + ASIC 28
164164    Oriental Legend Super
165165
166ASIC 28:
166ASIC 27 (5585E):
167167    performs a variety of calculations, quite complex, different per region, supplies region code
168168    used by:
169    Knights of Valour 1 / Plus / Superheroes (plus & superheroes seems to use extra functions, emulation issues reported in places in plus)
170    Photo Y2k / Real and Fake (maybe..)
171    This could be an ARM chip like the 27A below, but without the support for an external ROM (or nothing uses it..)
169    Knights of Valour 1 / Plus
170    Photo Y2k / Real and Fake
172171
173ASIC 27A:
174    arm9? cpu with (max?) 64kb internal rom (different per game / revision) + optional external data rom
172ASIC 27A(5585F/5585G):
173    arm7 cpu with 16kb internal rom (different per game / region) + optional external data rom
175174    probably used to give extra power to the system, lots of calculations are offloaded to it
176175    used by:
176    Knights of Valour Superheros / Hero
177    Puzzli II
178    Oriental Legend Ex
179    Knights of Valor 2 / 2 Plus
177180    DoDonPachi II
178    Knights of Valor 2 / 2 Plus
179181    Martial Masters
182    The Gladiator
180183    Demon Front
181    Puzzli II
182    The Gladiator
184    Killing Blade Plus
185    Spectral VS Generation
183186
184187there are probably more...
185188
r4441r4442
261264      OTHER
262265      -----
263266         3.6V_BATT - 3.6V NICad battery, connected to the V3021 RTC
264         IDC34     - IDC34 way flat cable plug, doesn't appear to be used for any games. Might be for
265                     re-programming some of the custom IC's or on-board surface mounted ROMs?
267         IDC34     - IDC34 way flat cable plug, PGM can support 4 players max in two cabs,
268                     this is jamma connecter for another cab and the P3&P4
266269         PAL       - Atmel ATF16V8B PAL (DIP20)
267270         SW1       - Push button switch to enter Test Mode
268271         SW2       - 8 position DIP Switch (for configuration of PCB/game options)
269         SW3       - SPDT switch (purpose unknown)
272         SW3       - SPDT switch , to clear the NVRAM and reset the whole system
270273         TD62064   - Toshiba NPN 50V 1.5A Quad Darlinton Switch; for driving coin meters (DIP16)
271274         TDA1519A  - Philips 2x 6W Stereo Power AMP (SIL9)
272275         uPD6379   - NEC 2-channel 16-bit D/A converter 10mW typ. (SOIC8)
r4441r4442
278281
279282#define PGMLOGERROR 0
280283#define PGMARM7LOGERROR 1
281#define PGMARM7SPEEDHACK 1
282284
283285#include "driver.h"
284286#include "cpu/z80/z80.h"
r4441r4442
293295UINT16 *pgm_mainram, *pgm_bg_videoram, *pgm_tx_videoram, *pgm_videoregs, *pgm_rowscrollram;
294296static UINT8 *z80_mainram;
295297static UINT32 *arm7_shareram;
296static UINT32 arm7_latch;
298static UINT32 *svg_shareram[2];   //for 5585G MACHINE
299static UINT32 kov2_latchdata_68k_w;
300static UINT32 kov2_latchdata_arm_w;
297301
298302
299303static READ16_HANDLER ( z80_ram_r )
r4441r4442
303307
304308static READ32_HANDLER( arm7_latch_arm_r )
305309{
306   if (PGMARM7LOGERROR) logerror("ARM7: Latch read: %08x (%08x) (%06x)\n", arm7_latch, mem_mask, cpu_get_pc(space->cpu) );
307   return arm7_latch;
310   if (PGMARM7LOGERROR) logerror("ARM7: Latch read: %08x (%08x) (%06x)\n", kov2_latchdata_68k_w, mem_mask, cpu_get_pc(space->cpu) );
311   return kov2_latchdata_68k_w;
308312}
309313
310
311#ifdef PGMARM7SPEEDHACK
312static TIMER_CALLBACK( arm_irq )
313{
314   generic_pulse_irq_line(machine->cpu[2], ARM7_FIRQ_LINE);
315}
316#endif
317
318//static emu_timer *   arm_comms_timer;
319314static WRITE32_HANDLER( arm7_latch_arm_w )
320315{
321316   if (PGMARM7LOGERROR) logerror("ARM7: Latch write: %08x (%08x) (%06x)\n", data, mem_mask, cpu_get_pc(space->cpu) );
322   COMBINE_DATA(&arm7_latch);
323
324#ifdef PGMARM7SPEEDHACK
325//  cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(100));
326   if (data!=0xaa) cpu_spinuntil_trigger(space->cpu, 1000);
327   cpuexec_trigger(space->machine, 1002);
328#else
329   cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(100));
330   cpu_spinuntil_time(space->cpu, cpu_clocks_to_attotime(space->cpu, 100));
331#endif
317   COMBINE_DATA(&kov2_latchdata_arm_w);
332318}
333319
334320static READ32_HANDLER( arm7_shareram_r )
r4441r4442
345331
346332static READ16_HANDLER( arm7_latch_68k_r )
347333{
348   if (PGMARM7LOGERROR) logerror("M68K: Latch read: %04x (%04x) (%06x)\n", arm7_latch & 0x0000ffff, mem_mask, cpu_get_pc(space->cpu) );
349   return arm7_latch;
334   if (PGMARM7LOGERROR) logerror("M68K: Latch read: %04x (%04x) (%06x)\n", kov2_latchdata_arm_w & 0x0000ffff, mem_mask, cpu_get_pc(space->cpu) );
335   return kov2_latchdata_arm_w;
350336}
351337
352338static WRITE16_HANDLER( arm7_latch_68k_w )
353339{
354340   if (PGMARM7LOGERROR) logerror("M68K: Latch write: %04x (%04x) (%06x)\n", data & 0x0000ffff, mem_mask, cpu_get_pc(space->cpu) );
355   COMBINE_DATA(&arm7_latch);
341   COMBINE_DATA(&kov2_latchdata_68k_w);
356342
357#ifdef PGMARM7SPEEDHACK
358   cpuexec_trigger(space->machine, 1000);
359   timer_set(space->machine, ATTOTIME_IN_USEC(50), NULL, 0, arm_irq); // i don't know how long..
360   cpu_spinuntil_trigger(space->cpu, 1002);
361#else
362343   generic_pulse_irq_line(space->machine->cpu[2], ARM7_FIRQ_LINE);
363344   cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(200));
364345   cpu_spinuntil_time(space->cpu, cpu_clocks_to_attotime(space->machine->cpu[2], 200)); // give the arm time to respond (just boosting the interleave doesn't help
365#endif
366346}
367347
368348static READ16_HANDLER( arm7_ram_r )
r4441r4442
607587static ADDRESS_MAP_START( olds_mem, ADDRESS_SPACE_PROGRAM, 16)
608588   AM_RANGE(0x000000, 0x01ffff) AM_ROM   /* BIOS ROM */
609589   AM_RANGE(0x100000, 0x3fffff) AM_ROMBANK(1) /* Game ROM */
610   AM_RANGE(0x400000, 0x43ffff) AM_RAM AM_BASE(&olds_sharedprotram) // Shared with protection device
590   AM_RANGE(0x400000, 0x403fff) AM_RAM AM_BASE(&olds_sharedprotram) // Shared with protection device
611591
612592   AM_RANGE(0x700006, 0x700007) AM_WRITENOP // Watchdog?
613593
r4441r4442
721701
722702/* Kov Superheroes */
723703
724static UINT16 kovsh_highlatch, kovsh_lowlatch;
704static UINT16 kovsh_highlatch_arm_w, kovsh_lowlatch_arm_w;
705static UINT16 kovsh_highlatch_68k_w, kovsh_lowlatch_68k_w;
725706
726707static READ32_HANDLER( kovsh_arm7_protlatch_r )
727708{
728//  return 0x00880000;
729//  return 0x0088ff66;
730
731   return (kovsh_highlatch << 16) | (kovsh_lowlatch);
709   return (kovsh_highlatch_68k_w << 16) | (kovsh_lowlatch_68k_w);
732710}
733711
734712static WRITE32_HANDLER( kovsh_arm7_protlatch_w )
735713{
736714   if (ACCESSING_BITS_16_31)
737715   {
738      kovsh_highlatch = data>>16;
716      kovsh_highlatch_arm_w = data>>16;
717      kovsh_highlatch_68k_w = 0;
739718   }
740719   if (ACCESSING_BITS_0_15)
741720   {
742      kovsh_lowlatch = data;
721      kovsh_lowlatch_arm_w = data;
722      kovsh_lowlatch_68k_w = 0;
743723   }
744724
745725//  cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(100));
r4441r4442
749729static READ16_HANDLER( kovsh_68k_protlatch_r )
750730{
751731   //cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(200));
752   cpu_spinuntil_time(space->cpu, cpu_clocks_to_attotime(space->machine->cpu[0], 600));
732   //cpu_spinuntil_time(space->cpu, cpu_clocks_to_attotime(space->machine->cpu[0], 600));
753733
754734   switch (offset)
755735   {
756      case 1: return kovsh_highlatch;
757      case 0: return kovsh_lowlatch;
736      case 1: return kovsh_highlatch_arm_w;
737      case 0: return kovsh_lowlatch_arm_w;
758738   }
759739   return -1;
760740}
r4441r4442
763743{
764744   switch (offset)
765745   {
766      case 1: kovsh_highlatch = data; break;
767      case 0: kovsh_lowlatch = data; break;
746      case 1: kovsh_highlatch_68k_w = data; break;
747      case 0: kovsh_lowlatch_68k_w = data; break;
768748   }
769749}
770750
751static READ16_HANDLER( kovsh_arm7_ram_r )
752{
753   UINT16 *share16 = (UINT16 *)arm7_shareram;
754   if (PGMARM7LOGERROR) logerror("M68K: ARM7 Shared RAM Read: %04x = %04x (%08x) (%06x)\n", BYTE_XOR_LE(offset), share16[BYTE_XOR_LE(offset)], mem_mask, cpu_get_pc(space->cpu) );
755   return share16[BYTE_XOR_LE(offset<<1)];
756}
757
758static WRITE16_HANDLER( kovsh_arm7_ram_w )
759{
760   UINT16 *share16 = (UINT16 *)arm7_shareram;
761   if (PGMARM7LOGERROR) logerror("M68K: ARM7 Shared RAM Write: %04x = %04x (%04x) (%06x)\n", BYTE_XOR_LE(offset), data, mem_mask, cpu_get_pc(space->cpu) );
762
763   COMBINE_DATA(&share16[BYTE_XOR_LE(offset<<1)]);
764}
765
771766static ADDRESS_MAP_START( kovsh_mem, ADDRESS_SPACE_PROGRAM, 16)
772767   AM_RANGE(0x000000, 0x01ffff) AM_ROM   /* BIOS ROM */
773   AM_RANGE(0x100000, 0x37ffff) AM_ROMBANK(1) /* Game ROM */
768   AM_RANGE(0x100000, 0x4effff) AM_ROMBANK(1) /* Game ROM */
774769
775770   AM_RANGE(0x700006, 0x700007) AM_WRITENOP // Watchdog?
776771
r4441r4442
795790   AM_RANGE(0xc08006, 0xc08007) AM_READ_PORT("DSW")
796791
797792   AM_RANGE(0xc10000, 0xc1ffff) AM_READWRITE(z80_ram_r, z80_ram_w) /* Z80 Program */
798   AM_RANGE(0x4f0000, 0x4f003f) AM_READWRITE(arm7_ram_r, arm7_ram_w) /* ARM7 Shared RAM */
799   AM_RANGE(0x500000, 0x500003) AM_READWRITE(kovsh_68k_protlatch_r, kovsh_68k_protlatch_w) /* ARM7 Latch */
793   AM_RANGE(0x4f0000, 0x4f003f) AM_READWRITE(kovsh_arm7_ram_r, kovsh_arm7_ram_w) /* ARM7 Shared RAM */
794   AM_RANGE(0x500000, 0x500005) AM_READWRITE(kovsh_68k_protlatch_r, kovsh_68k_protlatch_w) /* ARM7 Latch */
800795ADDRESS_MAP_END
801796
797static UINT32 kovsh_counter=1;
798
802799static READ32_HANDLER( kovsh_arm7_unk_r )
803800{
801   return kovsh_counter++;
802}
803
804static READ32_HANDLER( kovsh_exrom_r )
805{
804806   return 0x00000000;
805807}
806808
807809static ADDRESS_MAP_START( kovsh_arm7_map, ADDRESS_SPACE_PROGRAM, 32 )
808810   AM_RANGE(0x00000000, 0x00003fff) AM_ROM
809   AM_RANGE(0x08100000, 0x081fffff) AM_ROM AM_REGION("user1", 0) // unpopulated, returns 0 to keep checksum happy
810   AM_RANGE(0x10000000, 0x100003ff) AM_RAM // main ram for asic?
811
811   AM_RANGE(0x08100000, 0x083fffff) AM_READ(kovsh_exrom_r) // unpopulated, returns 0 to keep checksum happy
812   AM_RANGE(0x10000000, 0x100003ff) AM_RAM // internal ram for asic
812813   AM_RANGE(0x40000000, 0x40000003) AM_READ(kovsh_arm7_protlatch_r) AM_WRITE(kovsh_arm7_protlatch_w)
813814   AM_RANGE(0x40000008, 0x4000000b) AM_WRITE(SMH_NOP) // ?
814815   AM_RANGE(0x4000000c, 0x4000000f) AM_READ(kovsh_arm7_unk_r)
r4441r4442
816817   AM_RANGE(0x50000000, 0x500003ff) AM_RAM // uploads xor table to decrypt 68k rom here
817818ADDRESS_MAP_END
818819
820
821//5585G
822unsigned char svg_ram_sel;
823
824static WRITE32_HANDLER( svg_arm7_ram_sel_w )
825{
826   svg_ram_sel=data&1;
827}
828
829static READ32_HANDLER( svg_arm7_shareram_r )
830{
831   unsigned char ram_sel=svg_ram_sel&1;
832
833   return svg_shareram[ram_sel][offset];
834}
835
836static WRITE32_HANDLER( svg_arm7_shareram_w )
837{
838   unsigned char ram_sel=svg_ram_sel&1;
839   COMBINE_DATA(&svg_shareram[ram_sel][offset]);
840}
841
842static READ16_HANDLER( svg_m68k_ram_r )
843{
844   unsigned char ram_sel=(svg_ram_sel&1)^1;
845   UINT16 *share16 = (UINT16 *)(svg_shareram[ram_sel]);
846   return share16[BYTE_XOR_LE(offset)];
847}
848
849static WRITE16_HANDLER( svg_m68k_ram_w )
850{
851   unsigned char ram_sel=(svg_ram_sel&1)^1;
852   UINT16 *share16 = (UINT16 *)(svg_shareram[ram_sel]);
853   COMBINE_DATA(&share16[BYTE_XOR_LE(offset)]);
854}
855
856static READ16_HANDLER( svg_68k_nmi_r )
857{
858   return 0;
859}
860
861static WRITE16_HANDLER( svg_68k_nmi_w )
862{
863   generic_pulse_irq_line(space->machine->cpu[2], ARM7_FIRQ_LINE);
864   cpuexec_boost_interleave(space->machine, attotime_zero, ATTOTIME_IN_USEC(200));
865   cpu_spinuntil_time(space->cpu, cpu_clocks_to_attotime(space->machine->cpu[2], 200)); // give the arm time to respond (just boosting the interleave doesn't help
866}
867
868static WRITE16_HANDLER( svg_latch_68k_w )
869{
870   if (PGMARM7LOGERROR) logerror("M68K: Latch write: %04x (%04x) (%06x)\n", data & 0x0000ffff, mem_mask, cpu_get_pc(space->cpu) );
871   COMBINE_DATA(&kov2_latchdata_68k_w);
872}
873
874static ADDRESS_MAP_START( svg_68k_mem, ADDRESS_SPACE_PROGRAM, 16)
875   AM_RANGE(0x000000, 0x07ffff) AM_ROM         /* BIOS ROM */
876   AM_RANGE(0x100000, 0x1fffff) AM_ROMBANK(1)  /* Game ROM */
877
878   AM_RANGE(0x700006, 0x700007) AM_WRITENOP // Watchdog?
879
880   AM_RANGE(0x800000, 0x81ffff) AM_RAM AM_MIRROR(0x0e0000) AM_BASE(&pgm_mainram) /* Main Ram */
881
882   AM_RANGE(0x900000, 0x903fff) AM_RAM_WRITE(pgm_bg_videoram_w) AM_BASE(&pgm_bg_videoram) /* Backgrounds */
883   AM_RANGE(0x904000, 0x905fff) AM_RAM_WRITE(pgm_tx_videoram_w) AM_BASE(&pgm_tx_videoram) /* Text Layer */
884   AM_RANGE(0x907000, 0x9077ff) AM_RAM AM_BASE(&pgm_rowscrollram)
885   AM_RANGE(0xa00000, 0xa011ff) AM_RAM_WRITE(paletteram16_xRRRRRGGGGGBBBBB_word_w) AM_BASE(&paletteram16)
886   AM_RANGE(0xb00000, 0xb0ffff) AM_RAM AM_BASE(&pgm_videoregs) /* Video Regs inc. Zoom Table */
887
888   AM_RANGE(0xc00002, 0xc00003) AM_READWRITE(soundlatch_word_r, m68k_l1_w)
889   AM_RANGE(0xc00004, 0xc00005) AM_READWRITE(soundlatch2_word_r, soundlatch2_word_w)
890   AM_RANGE(0xc00006, 0xc00007) AM_READWRITE(pgm_calendar_r, pgm_calendar_w)
891   AM_RANGE(0xc00008, 0xc00009) AM_WRITE(z80_reset_w)
892   AM_RANGE(0xc0000a, 0xc0000b) AM_WRITE(z80_ctrl_w)
893   AM_RANGE(0xc0000c, 0xc0000d) AM_READWRITE(soundlatch3_word_r, soundlatch3_word_w)
894
895   AM_RANGE(0xc08000, 0xc08001) AM_READ_PORT("P1P2")
896   AM_RANGE(0xc08002, 0xc08003) AM_READ_PORT("P3P4")
897   AM_RANGE(0xc08004, 0xc08005) AM_READ_PORT("Service")
898   AM_RANGE(0xc08006, 0xc08007) AM_READ_PORT("DSW")
899
900   AM_RANGE(0xc10000, 0xc1ffff) AM_READWRITE(z80_ram_r, z80_ram_w) /* Z80 Program */
901   AM_RANGE(0x500000, 0x51ffff) AM_READWRITE(svg_m68k_ram_r, svg_m68k_ram_w)    /* ARM7 Shared RAM */
902   AM_RANGE(0x5c0000, 0x5c0001) AM_READWRITE(svg_68k_nmi_r, svg_68k_nmi_w)      /* ARM7 FIQ */
903   AM_RANGE(0x5c0300, 0x5c0301) AM_READWRITE(arm7_latch_68k_r, svg_latch_68k_w) /* ARM7 Latch */
904ADDRESS_MAP_END
905
906static ADDRESS_MAP_START( svg_arm7_map, ADDRESS_SPACE_PROGRAM, 32 )
907   AM_RANGE(0x00000000, 0x00003fff) AM_ROM
908   AM_RANGE(0x08000000, 0x087fffff) AM_ROM AM_REGION("user1", 0)
909   AM_RANGE(0x10000000, 0x100003ff) AM_RAM
910   AM_RANGE(0x18000000, 0x1803ffff) AM_RAM
911   AM_RANGE(0x38000000, 0x3801ffff) AM_READWRITE(svg_arm7_shareram_r, svg_arm7_shareram_w)
912   AM_RANGE(0x48000000, 0x48000003) AM_READWRITE(arm7_latch_arm_r, arm7_latch_arm_w) /* 68k Latch */
913   AM_RANGE(0x40000018, 0x4000001b) AM_WRITE(svg_arm7_ram_sel_w) /* RAM SEL */
914   AM_RANGE(0x50000000, 0x500003ff) AM_RAM
915ADDRESS_MAP_END
916
819917/*** Input Ports *************************************************************/
820918
821919/* enough for 4 players, the basic dips mapped are listed in the test mode */
r4441r4442
12121310
12131311MACHINE_DRIVER_END
12141312
1313static MACHINE_DRIVER_START( kov )
1314   MDRV_IMPORT_FROM(pgm)
12151315
1316   MDRV_CPU_MODIFY("maincpu")
1317   MDRV_CPU_PROGRAM_MAP(kovsh_mem,0)
1318
1319   /* protection CPU */
1320   MDRV_CPU_ADD("prot", ARM7, 20000000)   // 5585E/F/G
1321   MDRV_CPU_PROGRAM_MAP(kovsh_arm7_map, 0)
1322MACHINE_DRIVER_END
1323
12161324static MACHINE_DRIVER_START( kov2 )
12171325   MDRV_IMPORT_FROM(pgm)
12181326
r4441r4442
12201328   MDRV_CPU_PROGRAM_MAP(kov2_mem,0)
12211329
12221330   /* protection CPU */
1223   MDRV_CPU_ADD("prot", ARM7, 20000000)   // ???
1331   MDRV_CPU_ADD("prot", ARM7, 20000000)   // 5585F
12241332   MDRV_CPU_PROGRAM_MAP(arm7_map, 0)
12251333MACHINE_DRIVER_END
12261334
1227static MACHINE_DRIVER_START( kovsh )
1335static MACHINE_DRIVER_START( svg )
12281336   MDRV_IMPORT_FROM(pgm)
12291337
12301338   MDRV_CPU_MODIFY("maincpu")
1231   MDRV_CPU_PROGRAM_MAP(kovsh_mem,0)
1339   MDRV_CPU_PROGRAM_MAP(svg_68k_mem,0)
12321340
12331341   /* protection CPU */
1234   MDRV_CPU_ADD("prot", ARM7, 20000000)   // ???
1235   MDRV_CPU_PROGRAM_MAP(kovsh_arm7_map, 0)
1342   MDRV_CPU_ADD("prot", ARM7, 20000000)   // 5585G
1343   MDRV_CPU_PROGRAM_MAP(svg_arm7_map, 0)
12361344MACHINE_DRIVER_END
12371345
12381346#if 0
r4441r4442
13831491static DRIVER_INIT( kov )
13841492{
13851493   pgm_basic_init(machine);
1494    pgm_kov_decrypt(machine);
1495}
13861496
1387   memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x500000, 0x500003, 0, 0, ASIC28_r16, ASIC28_w16);
1497static DRIVER_INIT( pstar )
1498{
1499   pgm_basic_init(machine);
1500   pgm_pstar_decrypt(machine);
1501}
13881502
1389   /* 0x4f0000 - ? is actually ram shared with the protection device,
1390      the protection device provides the region code */
1391   memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x4f0000, 0x4fffff, 0, 0, sango_protram_r);
1503static DRIVER_INIT( djlzz )
1504{
1505   pgm_basic_init(machine);
1506   pgm_djlzz_decrypt(machine);
1507}
13921508
1393    pgm_kov_decrypt(machine);
1509static DRIVER_INIT( kovsh )
1510{
1511   pgm_basic_init(machine);
1512   pgm_kovsh_decrypt(machine);
13941513}
13951514
1515static DRIVER_INIT( kovh )
1516{
1517   pgm_basic_init(machine);
1518   pgm_kovh_decrypt(machine);
1519}
1520
1521static DRIVER_INIT( oldss )
1522{
1523   pgm_basic_init(machine);
1524   pgm_oldss_decrypt(machine);
1525}
1526
13961527static DRIVER_INIT( kov2 )
13971528{
13981529   pgm_basic_init(machine);
r4441r4442
14011532
14021533static DRIVER_INIT( kov2p )
14031534{
1404// this hacks the identification of the kov2 rom to return the string required for kov2p
1405// this is _NOT_ appropriate for use in MAME, the internal rom should be dumped.
1406#if 0
1407   UINT8 *mem8 = (UINT8 *)memory_region(machine, "user1");
14081535   pgm_basic_init(machine);
14091536   pgm_kov2p_decrypt(machine);
1410
1411   mem8[0xDE] = 0xC0;
1412   mem8[0xDF] = 0x46;
1413   mem8[0x4ED8] = 0xA8;// B0
1414   mem8[0x4EDC] = 0x9C;// A4
1415   mem8[0x4EE0] = 0x5C;// 64
1416   mem8[0x4EE4] = 0x94;// 9C
1417   mem8[0x4EE8] = 0xE8;// F0
1418   mem8[0x4EEC] = 0x6C;// 74
1419   mem8[0x4EF0] = 0xD4;// DC
1420   mem8[0x4EF4] = 0x50;// 58
1421   mem8[0x4EF8] = 0x80;// 88
1422   mem8[0x4EFC] = 0x9C;// A4
1423   mem8[0x4F00] = 0x28;// 30
1424   mem8[0x4F04] = 0x30;// 38
1425   mem8[0x4F08] = 0x34;// 3C
1426   mem8[0x4F0C] = 0x1C;// 24
1427   mem8[0x1FFFFC] = 0x33;
1428   mem8[0x1FFFFD] = 0x99;
1429#endif
14301537}
14311538
14321539static DRIVER_INIT( martmast )
r4441r4442
14351542   pgm_mm_decrypt(machine);
14361543}
14371544
1438
1439static DRIVER_INIT( pstar )
1545static DRIVER_INIT( ddp2 )
14401546{
14411547   pgm_basic_init(machine);
1442    pgm_pstar_decrypt(machine);
1443
1444   memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x4f0000, 0x4f0025, 0, 0, PSTARS_protram_r);
1445   memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x500000, 0x500003, 0, 0, PSTARS_r16);
1446   memory_install_write16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x500000, 0x500005, 0, 0, PSTARS_w16);
1548   pgm_ddp2_decrypt(machine);
14471549}
14481550
1449
1450
1451static DRIVER_INIT( kovsh )
1551static void svg_basic_init(running_machine *machine)
14521552{
14531553   pgm_basic_init(machine);
1554   svg_shareram[0]=auto_malloc(0x10000);
1555   svg_shareram[1]=auto_malloc(0x10000);
1556   svg_ram_sel=0;
1557}
14541558
1455//  memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x500000, 0x500003, 0, 0, ASIC28_r16, ASIC28_w16);
1559static DRIVER_INIT( theglad )
1560{
1561   svg_basic_init(machine);
1562   pgm_theglad_decrypt(machine);
1563}
14561564
1457   /* 0x4f0000 - ? is actually ram shared with the protection device,
1458      the protection device provides the region code */
1459//  memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x4f0000, 0x4fffff, 0, 0, sango_protram_r);
1565static DRIVER_INIT( svg )
1566{
1567   svg_basic_init(machine);
1568   pgm_svg_decrypt(machine);
1569}
14601570
1461    pgm_kovsh_decrypt(machine);
1571static DRIVER_INIT( killbldp )
1572{
1573   svg_basic_init(machine);
1574   pgm_killbldp_decrypt(machine);
14621575}
14631576
1464static DRIVER_INIT( djlzz )
1577static DRIVER_INIT( dmnfrnt )
14651578{
1466   pgm_basic_init(machine);
1467
1468   memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x500000, 0x500003, 0, 0, ASIC28_r16, ASIC28_w16);
1469
1470   /* 0x4f0000 - ? is actually ram shared with the protection device,
1471      the protection device provides the region code */
1472   memory_install_read16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0x4f0000, 0x4fffff, 0, 0, sango_protram_r);
1473
1474    pgm_djlzz_decrypt(machine);
1579   svg_basic_init(machine);
1580   pgm_dfront_decrypt(machine);
14751581}
14761582
14771583static DRIVER_INIT( dw3 )
r4441r4442
14831589    pgm_dw3_decrypt(machine);
14841590}
14851591
1486
14871592/* Killing Blade uses some kind of DMA protection device which can copy data from a data rom.  The
14881593   MCU appears to have an internal ROM as if you remove the data ROM then the shared ram is filled
14891594   with a constant value.
r4441r4442
14941599
14951600static int kb_cmd;
14961601static int reg;
1497static int ptr;
1602static int ptr=0;
14981603
14991604static WRITE16_HANDLER( killbld_prot_w )
15001605{
r4441r4442
16761781         UINT32 protvalue;
16771782         protvalue = 0x89911400|input_port_read(space->machine, "Region");
16781783         res=(protvalue>>(8*(ptr-1)))&0xff;
1679
16801784      }
16811785   }
16821786   logerror("%06X: ASIC25 R CMD %X  VAL %X",cpu_get_pc(space->cpu),kb_cmd,res);
r4441r4442
16921796   /* fill the protection ram with a5 */
16931797   for (i = 0;i < 0x4000/2;i++)
16941798      killbld_sharedprotram[i] = 0xa5a5;
1695
16961799}
16971800
16981801
r4441r4442
17031806   pgm_basic_init(machine);
17041807    pgm_killbld_decrypt(machine);
17051808
1706
1707
17081809   /* this isn't a hack.. doing a rom dump while the game is running shows the
17091810       rom space to look like this.. there may be more overlays / enables tho */
17101811
r4441r4442
17291830   memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xd40000, 0xd40003, 0, 0, killbld_prot_r, killbld_prot_w);
17301831}
17311832
1732/* ddp2 rubbish */
1733
1734static UINT16 *ddp2_protram;
1735static int ddp2_asic27_0xd10000 = 0;
1736
1737static WRITE16_HANDLER ( ddp2_asic27_0xd10000_w )
1738{
1739   ddp2_asic27_0xd10000=data;
1740}
1741
1742static READ16_HANDLER ( ddp2_asic27_0xd10000_r )
1743{
1744   if (PGMLOGERROR) logerror("d100000_prot_r %04x, %04x\n", offset,ddp2_asic27_0xd10000);
1745   ddp2_asic27_0xd10000++;
1746   ddp2_asic27_0xd10000&=0x7f;
1747   return ddp2_asic27_0xd10000;
1748}
1749
1750
1751static READ16_HANDLER(ddp2_protram_r)
1752{
1753   if (PGMLOGERROR) logerror("prot_r %04x, %04x\n", offset,ddp2_protram[offset]);
1754
1755   if (offset == 0x02/2) return input_port_read(space->machine, "Region");
1756
1757   if (offset == 0x1f00/2) return 0;
1758
1759   return ddp2_protram[offset];
1760}
1761
1762static WRITE16_HANDLER(ddp2_protram_w)
1763{
1764   if (PGMLOGERROR) logerror("prot_w %04x, %02x\n", offset,data);
1765   COMBINE_DATA(&ddp2_protram[offset]);
1766
1767   ddp2_protram[0x10/2] = 0;
1768   ddp2_protram[0x20/2] = 1;
1769}
1770
1771static DRIVER_INIT( ddp2 )
1772{
1773   pgm_basic_init(machine);
1774
1775   /* some kind of busy / counter */
1776   /* the actual protection is an arm cpu with internal rom */
1777
1778   ddp2_protram = auto_malloc(0x2000);
1779
1780   memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xd10000, 0xd10001, 0, 0, ddp2_asic27_0xd10000_r, ddp2_asic27_0xd10000_w);
1781
1782   memory_install_readwrite16_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xd00000, 0xd01fff, 0, 0, ddp2_protram_r, ddp2_protram_w);
1783}
1784
17851833static DRIVER_INIT( puzzli2 )
17861834{
17871835   /* this protection emulation is wrong
r4441r4442
18901938
18911939   /* populate shared protection ram with data read from pcb .. */
18921940
1893   for(i=0;i<0x40000/2;i++)
1941   for(i=0;i<0x4000/2;i++)
18941942   {
18951943      olds_sharedprotram[i] = mem16[i];
18961944   }
18971945
18981946   //ROM:004008B4                 .word 0xFBA5
1899   for(i=0;i<0x20000/2;i++)
1947   for(i=0;i<0x4000/2;i++)
19001948   {
19011949      if(olds_sharedprotram[i]==(0xffff-i))
19021950         olds_sharedprotram[i]=0x4e75;
r4441r4442
20102058
20112059   /* CPU2 = Z80, romless, code uploaded by 68k */
20122060
2013   ROM_REGION( 0x200000, "gfx1", 0 ) /* 8x8 Text Layer Tiles */
2061   ROM_REGION( 0x200000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Layer Tiles */
20142062   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) )
20152063
20162064   ROM_REGION( 0x200000, "ics", 0 ) /* Samples - (8 bit mono 11025Hz) - */
r4441r4442
24282476   ROM_REGION( 0x010000, "user1", 0 ) /* Protection Data */
24292477   ROM_LOAD( "dw3_v100.u15", 0x000000, 0x010000, CRC(03dc4fdf) SHA1(b329b04325d4f725231b1bb7862eedef2319b652) )
24302478
2431   ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
2479   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
24322480   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
24332481   ROM_LOAD( "dw3t0400.u18",   0x400000, 0x400000, CRC(b70f3357) SHA1(8733969d7d21f540f295a9f747a4bb8f0d325cf0) )
24342482
r4441r4442
24742522   ROM_REGION( 0x010000, "user1", 0 ) /* Protection Data - is it correct for this set? */
24752523   ROM_LOAD( "dw3_v100.u15", 0x000000, 0x010000, CRC(03dc4fdf) SHA1(b329b04325d4f725231b1bb7862eedef2319b652) )
24762524
2477   ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
2525   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
24782526   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
24792527   ROM_LOAD( "dw3t0400.u18",   0x400000, 0x400000, CRC(b70f3357) SHA1(8733969d7d21f540f295a9f747a4bb8f0d325cf0) )
24802528
r4441r4442
25002548
25012549   /* CPU2 = Z80, romless, code uploaded by 68k */
25022550
2503   ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
2551   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
2552   ROM_LOAD( "kov_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
2553
2554   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
25042555   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
25052556   ROM_LOAD( "t0600.rom",    0x400000, 0x800000, CRC(4acc1ad6) SHA1(0668dbd5e856c2406910c6b7382548b37c631780) )
25062557
r4441r4442
25292580
25302581   /* CPU2 = Z80, romless, code uploaded by 68k */
25312582
2532   ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
2583   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
2584   ROM_LOAD( "kov_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
2585
2586   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
25332587   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
25342588   ROM_LOAD( "t0600.rom",    0x400000, 0x800000, CRC(4acc1ad6) SHA1(0668dbd5e856c2406910c6b7382548b37c631780) )
25352589
r4441r4442
25932647
25942648   /* CPU2 = Z80, romless, code uploaded by 68k */
25952649
2596   ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
2650   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
2651   ROM_LOAD( "kov_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
2652
2653   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
25972654   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
25982655   ROM_LOAD( "t0600.rom",    0x400000, 0x800000, CRC(4acc1ad6) SHA1(0668dbd5e856c2406910c6b7382548b37c631780) )
25992656
r4441r4442
26222679
26232680   /* CPU2 = Z80, romless, code uploaded by 68k */
26242681
2625   ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
2682   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
2683   ROM_LOAD( "kov_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
2684
2685   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
26262686   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
26272687   ROM_LOAD( "t0600.rom",    0x400000, 0x800000, CRC(4acc1ad6) SHA1(0668dbd5e856c2406910c6b7382548b37c631780) )
26282688
r4441r4442
26862746
26872747   /* CPU2 = Z80, romless, code uploaded by 68k */
26882748
2689   ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
2749   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
2750   ROM_LOAD( "kov_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
2751
2752   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
26902753   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
26912754   ROM_LOAD( "t0600.rom",    0x400000, 0x800000, CRC(4acc1ad6) SHA1(0668dbd5e856c2406910c6b7382548b37c631780) )
26922755
r4441r4442
27082771   ROM_LOAD( "m0600.rom",    0x400000, 0x400000, CRC(3ada4fd6) SHA1(4c87adb25d31cbd41f04fbffe31f7bc37173da76) )
27092772ROM_END
27102773
2711/* is this loading the right roms? */
27122774ROM_START( kovsh )
27132775   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
27142776   ROM_LOAD16_WORD_SWAP( "pgm_p01s.rom", 0x000000, 0x020000, CRC(e42b166e) SHA1(2a9df9ec746b14b74fae48b1a438da14973702ea) )  // (BIOS)
r4441r4442
27192781   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
27202782   ROM_LOAD( "kovsh_v100_china.asic", 0x000000, 0x04000,  CRC(0f09a5c1) SHA1(621b38c05f33277608d58b49822aebc930ae4870) )
27212783
2722   ROM_REGION( 0x400000, "user1", ROMREGION_ERASE00 )
2723   /* unpopulated (needs to return 0) */
2724
2725   ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
2784   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
27262785   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
2727   ROM_LOAD( "t0600.320",    0x400000, 0x400000, CRC(164b3c94) SHA1(f00ea66886ca6bff74bbeaa49e7f5c75c275d5d7) ) // bad? its half the size of the kov one
2786   ROM_LOAD( "t0600.rom",    0x400000, 0x800000, CRC(4acc1ad6) SHA1(0668dbd5e856c2406910c6b7382548b37c631780) )
27282787
27292788   ROM_REGION( 0xc00000/5*8, "gfx2", ROMREGION_DISPOSE | ROMREGION_ERASEFF ) /* Region for 32x32 BG Tiles */
27302789   /* 32x32 Tile Data is put here for easier Decoding */
27312790
27322791   /* all roms below need checking to see if they're the same on this board */
2733   ROM_REGION( 0x1c00000, "gfx3", ROMREGION_DISPOSE ) /* Sprite Colour Data */
2792   ROM_REGION( 0x1e00000, "gfx3", ROMREGION_DISPOSE ) /* Sprite Colour Data */
27342793   ROM_LOAD( "a0600.rom",    0x0000000, 0x0800000, CRC(d8167834) SHA1(fa55a99629d03b2ea253392352f70d2c8639a991) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
27352794   ROM_LOAD( "a0601.rom",    0x0800000, 0x0800000, CRC(ff7a4373) SHA1(7def9fca7513ad5a117da230bebd2e3c78679041) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
27362795   ROM_LOAD( "a0602.rom",    0x1000000, 0x0800000, CRC(e7a32959) SHA1(3d0ed684dc5b269238890836b2ce7ef46aa5265b) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
27372796   ROM_LOAD( "a0603.rom",    0x1800000, 0x0400000, CRC(ec31abda) SHA1(ee526655369bae63b0ef0730e9768b765c9950fc) )
2797   ROM_LOAD( "a0604.rom",    0x1a00000, 0x0400000, CRC(26b59fd3) SHA1(53219376056f4766dc5236735599d982ceb56b84) )
27382798
27392799   ROM_REGION( 0x1000000, "gfx4", 0 ) /* Sprite Masks + Colour Indexes */
27402800   ROM_LOAD( "b0600.rom",    0x0000000, 0x0800000, CRC(7d3cd059) SHA1(00cf994b63337e0e4ebe96453daf45f24192af1c) )
27412801   ROM_LOAD( "b0601.rom",    0x0800000, 0x0400000, CRC(a0bb1c2f) SHA1(0542348c6e27779e0a98de16f04f9c18158f2b28) )
2802   ROM_LOAD( "b0602.rom",    0x0c00000, 0x0100000, CRC(9df77934) SHA1(99a3fe337c13702c9aa2373bcd1bb1befd0e2a13) )
27422803
27432804   ROM_REGION( 0x800000, "ics", 0 ) /* Samples - (8 bit mono 11025Hz) - */
27442805   ROM_LOAD( "pgm_m01s.rom", 0x000000, 0x200000, CRC(45ae7159) SHA1(d3ed3ff3464557fd0df6b069b2e431528b0ebfa8) ) // (BIOS)
r4441r4442
27522813
27532814   /* CPU2 = Z80, romless, code uploaded by 68k */
27542815
2755   ROM_REGION( 0x4000, "cpu2", 0 ) /* ARM protection ASIC - internal rom, supplies region code etc. */
2756   /* not hooked up yet (simulation code used instead for now) */
2816   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
27572817   ROM_LOAD( "photoy2k_v100_china.asic", 0x000000, 0x04000,  CRC(6dd7f257) SHA1(1984f98a282d8b3264674f231c3b7def1757cf72) )
27582818
2759   ROM_REGION( 0x480000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
2819   ROM_REGION( 0x480000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
27602820   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
27612821   ROM_LOAD( "t0700.rom",    0x400000, 0x080000, CRC(93943b4d) SHA1(3b439903853727d45d62c781af6073024eb3c5a3) )
27622822
r4441r4442
28212881
28222882   /* CPU2 = Z80, romless, code uploaded by 68k */
28232883
2824   ROM_REGION( 0x480000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
2884   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
2885   ROM_LOAD( "photoy2k_v100_china.asic", 0x000000, 0x04000,  CRC(6dd7f257) SHA1(1984f98a282d8b3264674f231c3b7def1757cf72) )
2886
2887   ROM_REGION( 0x480000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
28252888   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
28262889   ROM_LOAD( "t0700.rom",    0x400000, 0x080000, CRC(93943b4d) SHA1(3b439903853727d45d62c781af6073024eb3c5a3) )
28272890
r4441r4442
29302993   ROM_REGION( 0x010000, "user1", 0 ) /* Protection Data */
29312994   ROM_LOAD16_WORD_SWAP( "kb_u2_v104.u2", 0x000000, 0x010000,  CRC(c970f6d5) SHA1(399fc6f80262784c566363c847dc3fdc4fb37494) )
29322995
2933   ROM_REGION( 0x800000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
2996   ROM_REGION( 0x800000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
29342997   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
29352998   ROM_LOAD( "t0300.u14",    0x400000, 0x400000, CRC(0922f7d9) SHA1(4302b4b7369e13f315fad14f7d6cad1321101d24) )
29362999
r4441r4442
29713034   ROM_REGION( 0x010000, "user1", 0 ) /* Protection Data */
29723035   ROM_LOAD16_WORD_SWAP( "kb_u2.rom", 0x000000, 0x010000,  CRC(de3eae63) SHA1(03af767ef764055bda528b5cc6a24b9e1218cca8) )
29733036
2974   ROM_REGION( 0x800000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
3037   ROM_REGION( 0x800000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
29753038   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
29763039   ROM_LOAD( "t0300.u14",    0x400000, 0x400000, CRC(0922f7d9) SHA1(4302b4b7369e13f315fad14f7d6cad1321101d24) )
29773040
r4441r4442
30593122
30603123   /* CPU2 = Z80, romless, code uploaded by 68k */
30613124
3062   ROM_REGION( 0x4000, "cpu2", ROMREGION_ERASEFF ) /* ARM protection ASIC - internal rom */
3063   /* this has no external rom so the internal rom probably can't be dumped */
3064//  ROM_LOAD( "puzlstar_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
3125   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
3126   ROM_LOAD( "puzlstar_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
30653127
3066   ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
3128   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
30673129   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
30683130   ROM_LOAD( "t0800.u5",    0x400000, 0x200000, CRC(f9d84e59) SHA1(80ec77025ac5bf355b1a60f2a678dd4c56071f6b) )
30693131
r4441r4442
31513213   ROM_REGION( 0x010000, "user1", 0 ) /* ASIC25? Protection Data */
31523214   ROM_LOAD( "sp_v101.u6", 0x000000, 0x010000,  CRC(097046bc) SHA1(6d75db85cf4c79b63e837897785c253014b2126d) )
31533215
3154   ROM_REGION( 0x200000, "user2", ROMREGION_ERASEFF ) /* its a dump of the shared protection rom/ram from pcb. */
3216   ROM_REGION( 0x4000, "user2", ROMREGION_ERASEFF ) /* its a dump of the shared protection rom/ram from pcb. */
31553217   // clearly not for this revision
3156   //ROM_LOAD16_WORD_SWAP( "ram_dump", 0x000000, 0x200000, CRC(e7b26aea) SHA1(17d101f760d790619ce4858984787b494bdbbc8a) )
3218   ROM_LOAD( "ram_dump", 0x000000, 0x04000, CRC(280cfb4e) SHA1(cd2bdcaa21347952c2bf38b105a204d327fde39e) )
31573219
3158
31593220   ROM_REGION( 0xc00000, "gfx1",  ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
31603221   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
31613222   ROM_LOAD( "t0500.rom",    0x400000, 0x400000, CRC(d881726c) SHA1(a82517e665996f7b7017c940f1fcf016fccb65c2) )
r4441r4442
31923253   ROM_LOAD16_BYTE( "v100-u3.040",      0x100000, 0x080000,  CRC(d0e2b741) SHA1(2e671dbb4320d1f0c059b35efd33cdea26f12131) )
31933254   ROM_LOAD16_BYTE( "v100-u4.040",      0x200001, 0x080000,  CRC(32a6bdbd) SHA1(a93d7f4eae722a58eca9ec351ad5890cefda56f0) )
31943255   ROM_LOAD16_BYTE( "v100-u5.040",      0x200000, 0x080000,  CRC(b4a1cafb) SHA1(b2fccd480ede93f58ad043387b18b898152f06ef) )
3195   /* u1 is missing from this set? - the parent has v101 rom for u1 so it probably doesn't go with v100 main program roms */
3196//  ROM_LOAD16_WORD_SWAP( "v100-u1.040",0x300000, 0x080000,    CRC(1) SHA1(1) )
3256   ROM_LOAD16_WORD_SWAP( "v100-u1.040", 0x300000, 0x080000,  CRC(37ea4e75) SHA1(a94fcb89da3394a43d360f885419677f511d2580) )
31973257
31983258   /* CPU2 = Z80, romless, code uploaded by 68k */
31993259
3200   ROM_REGION( 0x200000, "user2", ROMREGION_ERASEFF ) /* its a dump of the shared protection rom/ram from pcb. */
3260   ROM_REGION( 0x4000, "user2", ROMREGION_ERASEFF ) /* its a dump of the shared protection rom/ram from pcb. */
32013261   // used to simulate encrypted DMA protection device for now ..
3202   //ROM_LOAD16_WORD_SWAP( "ram_dump", 0x000000, 0x200000, CRC(e7b26aea) SHA1(17d101f760d790619ce4858984787b494bdbbc8a) )
3262   ROM_LOAD( "ram_dump", 0x000000, 0x04000, CRC(280cfb4e) SHA1(cd2bdcaa21347952c2bf38b105a204d327fde39e) )
32033263
3204
32053264   ROM_REGION( 0x010000, "user1", 0 ) /* ASIC25? Protection Data */
32063265   ROM_LOAD( "kd-u6.512", 0x000000, 0x010000,  CRC(e7613dda) SHA1(0d7c043b90e2f9a36a45066f22e3e305dc716676) )
32073266
r4441r4442
32453304   ROM_REGION( 0x010000, "user1", ROMREGION_ERASEFF ) /* ASIC25? Protection Data */
32463305   /* missing from this set .. */
32473306
3248   ROM_REGION( 0x40000, "user2", ROMREGION_ERASEFF ) /* its a dump of the shared protection rom/ram from pcb. */
3307   ROM_REGION( 0x4000, "user2", ROMREGION_ERASEFF ) /* its a dump of the shared protection rom/ram from pcb. */
32493308   // used to simulate encrypted DMA protection device for now ..
3250   ROM_LOAD16_WORD_SWAP( "ram_dump", 0x000000, 0x40000, CRC(619cc52d) SHA1(f249a0b58c8790a42d042ad09eb28d8d4eeb20eb) )
3309   ROM_LOAD( "ram_dump", 0x000000, 0x04000, CRC(280cfb4e) SHA1(cd2bdcaa21347952c2bf38b105a204d327fde39e) )
32513310
32523311   ROM_REGION( 0xc00000, "gfx1",  ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
32533312   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
r4441r4442
32773336   ROM_LOAD( "m0500.rom",    0x400000, 0x200000, CRC(37928cdd) SHA1(e80498cabc2a6a54d4f3ebcb097d4b3fad96fe55) )
32783337ROM_END
32793338
3280
32813339ROM_START( kov2 )
32823340   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
32833341   ROM_LOAD16_WORD_SWAP( "pgm_p01s.rom", 0x000000, 0x020000, CRC(e42b166e) SHA1(2a9df9ec746b14b74fae48b1a438da14973702ea) )  // (BIOS)
r4441r4442
32913349   ROM_REGION32_LE( 0x400000, "user1", 0 ) /* Protection Data (encrypted external ARM data) */
32923350   ROM_LOAD( "igs_u19.rom", 0x000000, 0x200000,   CRC(edd59922) SHA1(09b14f20f685944a93292c83e5830849aade42c9) )
32933351
3294   ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
3352   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
32953353   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
32963354   ROM_LOAD( "t1200.rom",    0x400000, 0x800000, CRC(d7e26609) SHA1(bdad810f82fcf1d50a8791bdc495374ec5a309c6) )
32973355
r4441r4442
33143372   ROM_LOAD( "m1200.rom",    0x800000, 0x800000, CRC(b0d88720) SHA1(44ab137e3f8e15b7cb5697ffbd9b1143d8210c4f) )
33153373ROM_END
33163374
3317
33183375ROM_START( kov2106 )
33193376   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
33203377   ROM_LOAD16_WORD_SWAP( "pgm_p01s.rom", 0x000000, 0x020000, CRC(e42b166e) SHA1(2a9df9ec746b14b74fae48b1a438da14973702ea) )  // (BIOS)
r4441r4442
33283385   ROM_REGION32_LE( 0x400000, "user1", 0 ) /* Protection Data (encrypted external ARM data) */
33293386   ROM_LOAD( "u19.102", 0x000000, 0x200000,   CRC(462e2980) SHA1(3da7c3d2c65b59f50c78be1c25922b71d40f6080) )
33303387
3331   ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
3388   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
33323389   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
33333390   ROM_LOAD( "t1200.rom",    0x400000, 0x800000, CRC(d7e26609) SHA1(bdad810f82fcf1d50a8791bdc495374ec5a309c6) )
33343391
r4441r4442
33513408   ROM_LOAD( "m1200.rom",    0x800000, 0x800000, CRC(b0d88720) SHA1(44ab137e3f8e15b7cb5697ffbd9b1143d8210c4f) )
33523409ROM_END
33533410
3354
33553411ROM_START( kov2p )
33563412   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
33573413   ROM_LOAD16_WORD_SWAP( "pgm_p01s.rom", 0x000000, 0x020000, CRC(e42b166e) SHA1(2a9df9ec746b14b74fae48b1a438da14973702ea) )  // (BIOS)
r4441r4442
33603416   /* CPU2 = Z80, romless, code uploaded by 68k */
33613417
33623418   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
3363   /* not correct for this set, needs dumping from internal rom */
3364   //ROM_LOAD( "kov2p.asic", 0x000000, 0x04000, BAD_DUMP CRC(e0d7679f) SHA1(e1c2d127eba4ddbeb8ad173c55b90ac1467e1ca8) ) // NOT for this version, works with a hack
3365   ROM_LOAD( "kov2p.asic", 0x000000, 0x04000, NO_DUMP )
3419   ROM_LOAD( "kov2p_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
33663420
33673421   ROM_REGION32_LE( 0x400000, "user1", 0 ) /* Protection Data (encrypted external ARM data) */
33683422   ROM_LOAD( "v200-16.rom", 0x000000, 0x200000,  CRC(16a0c11f) SHA1(ce449cef76ebd5657d49b57951e2eb0f132e203e) )
33693423
3370   ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
3424   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
33713425   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
33723426   ROM_LOAD( "t1200.rom",    0x400000, 0x800000, CRC(d7e26609) SHA1(bdad810f82fcf1d50a8791bdc495374ec5a309c6) )
33733427
r4441r4442
33903444   ROM_LOAD( "m1200.rom",    0x800000, 0x800000, CRC(b0d88720) SHA1(44ab137e3f8e15b7cb5697ffbd9b1143d8210c4f) )
33913445ROM_END
33923446
3393
33943447ROM_START( kov2p205 )
33953448   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
33963449   ROM_LOAD16_WORD_SWAP( "pgm_p01s.rom", 0x000000, 0x020000, CRC(e42b166e) SHA1(2a9df9ec746b14b74fae48b1a438da14973702ea) )  // (BIOS)
r4441r4442
33993452   /* CPU2 = Z80, romless, code uploaded by 68k */
34003453
34013454   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
3402   /* not correct for this set, needs dumping from internal rom */
3403   //ROM_LOAD( "kov2p.asic", 0x000000, 0x04000, BAD_DUMP CRC(e0d7679f) SHA1(e1c2d127eba4ddbeb8ad173c55b90ac1467e1ca8) ) // NOT for this version, works with a hack
3404   ROM_LOAD( "kov2p205.asic", 0x000000, 0x04000, NO_DUMP )
3455   ROM_LOAD( "kov2p_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
34053456
3406
34073457   ROM_REGION32_LE( 0x400000, "user1", 0 ) /* Protection Data (encrypted external ARM data) */
34083458   ROM_LOAD( "v200-16.rom", 0x000000, 0x200000,  CRC(16a0c11f) SHA1(ce449cef76ebd5657d49b57951e2eb0f132e203e) )
34093459
3410   ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
3460   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
34113461   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
34123462   ROM_LOAD( "t1200.rom",    0x400000, 0x800000, CRC(d7e26609) SHA1(bdad810f82fcf1d50a8791bdc495374ec5a309c6) )
34133463
r4441r4442
34483498ROM_START( ddp2 )
34493499   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
34503500   ROM_LOAD16_WORD_SWAP( "pgm_p01s.rom", 0x000000, 0x020000, CRC(e42b166e) SHA1(2a9df9ec746b14b74fae48b1a438da14973702ea) )  // (BIOS)
3501   ROM_LOAD16_WORD_SWAP( "ddp2_v102.u8", 0x100000, 0x200000, CRC(5a9ea040) SHA1(51eaec46c368f7cfc5245e64896092f52b1193e0) )
3502
3503   /* CPU2 = Z80, romless, code uploaded by 68k */
3504
3505   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
3506   ROM_LOAD( "ddp2_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
3507
3508   ROM_REGION32_LE( 0x400000, "user1", 0 ) /* Protection Data (encrypted external ARM data, internal missing) */
3509   ROM_LOAD( "v100.u23", 0x000000, 0x20000, CRC(06c3dd29) SHA1(20c9479f158467fc2037dcf162b6c6be18c91d46) )
3510
3511   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
3512   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
3513   ROM_LOAD( "t1300.u21",    0x400000, 0x800000, CRC(e748f0cb) SHA1(5843bee3a17c33648ce904af2b98c6a90aff7393) )
3514
3515   ROM_REGION( 0xc00000/5*8, "gfx2", ROMREGION_DISPOSE | ROMREGION_ERASEFF ) /* Region for 32x32 BG Tiles */
3516   /* 32x32 Tile Data is put here for easier Decoding */
3517
3518   ROM_REGION( 0x1000000, "gfx3", 0 ) /* Sprite Colour Data */
3519   ROM_LOAD( "a1300.u1",    0x0000000, 0x0800000, CRC(fc87a405) SHA1(115c21ecc56997652e527c92654076870bc9fa51) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
3520   ROM_LOAD( "a1301.u2",    0x0800000, 0x0800000, CRC(0c8520da) SHA1(390317857ae5baa94a4cc042874b00a811f06a63) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
3521
3522   ROM_REGION( 0x0800000, "gfx4", 0 ) /* Sprite Masks + Colour Indexes */
3523   ROM_LOAD( "b1300.u7",    0x0000000, 0x0800000,  CRC(ef646604) SHA1(d737ff513792962f18df88c2caa9dd71de449079) )
3524
3525   ROM_REGION( 0x800000, "ics", ROMREGION_ERASE00 ) /* Samples - (8 bit mono 11025Hz) - */
3526   ROM_LOAD( "pgm_m01s.rom", 0x000000, 0x200000, CRC(45ae7159) SHA1(d3ed3ff3464557fd0df6b069b2e431528b0ebfa8) ) // (BIOS)
3527   ROM_LOAD( "m1300.u5",    0x400000, 0x400000, CRC(82d4015d) SHA1(d4cdc1aec1c97cf23ff7a20ccaad822962e66ffa) )
3528ROM_END
3529
3530ROM_START( ddp2a )
3531   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
3532   ROM_LOAD16_WORD_SWAP( "pgm_p01s.rom", 0x000000, 0x020000, CRC(e42b166e) SHA1(2a9df9ec746b14b74fae48b1a438da14973702ea) )  // (BIOS)
34513533   ROM_LOAD16_WORD_SWAP( "v100.u8",    0x100000, 0x200000, CRC(0c8aa8ea) SHA1(57e33224622607a1df8daabf26ba063cf8a6d3fc) )
34523534
34533535   /* CPU2 = Z80, romless, code uploaded by 68k */
34543536
3455   ROM_REGION( 0x4000, "cpu2", 0 ) /* ARM protection ASIC - internal rom */
3537   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
34563538   ROM_LOAD( "ddp2_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
34573539
3458   ROM_REGION32_LE( 0x20000, "user1", 0 ) /* Protection Data (encrypted external ARM data, internal missing) */
3540   ROM_REGION32_LE( 0x400000, "user1", 0 ) /* Protection Data (encrypted external ARM data, internal missing) */
34593541   ROM_LOAD( "v100.u23", 0x000000, 0x20000, CRC(06c3dd29) SHA1(20c9479f158467fc2037dcf162b6c6be18c91d46) )
34603542
3461   ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
3543   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
34623544   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
34633545   ROM_LOAD( "t1300.u21",    0x400000, 0x800000, CRC(e748f0cb) SHA1(5843bee3a17c33648ce904af2b98c6a90aff7393) )
34643546
r4441r4442
34773559   ROM_LOAD( "m1300.u5",    0x400000, 0x400000, CRC(82d4015d) SHA1(d4cdc1aec1c97cf23ff7a20ccaad822962e66ffa) )
34783560ROM_END
34793561
3562
34803563/*
34813564
34823565Puzzli 2
r4441r4442
35383621
35393622   /* CPU2 = Z80, romless, code uploaded by 68k */
35403623
3541   ROM_REGION( 0x4000, "cpu2", ROMREGION_ERASEFF ) /* ARM protection ASIC - internal rom */
3542   /* this has no external rom so the internal rom probably can't be dumped */
3543//  ROM_LOAD( "puzzli2_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
3624   ROM_REGION( 0x4000, "prot", ROMREGION_ERASEFF ) /* ARM protection ASIC - internal rom */
3625   ROM_LOAD( "puzzli2_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
35443626
3627   ROM_REGION32_LE( 0x4000000, "user1", ROMREGION_ERASEFF )
3628   /* not on this PCB */
35453629
3546   ROM_REGION( 0x600000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
3630   ROM_REGION( 0x600000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
35473631   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
35483632   ROM_LOAD( "t0900.u9",    0x400000, 0x200000, CRC(70615611) SHA1(a46d4aa71396947b427f9ba4ba0e636876c09d6b) )
35493633
r4441r4442
36343718   ROM_REGION32_LE( 0x400000, "user1", 0 ) /* Protection Data (encrypted external ARM data) */
36353719   ROM_LOAD( "v102_16m.u10", 0x000000, 0x200000,  CRC(18b745e6) SHA1(7bcb58dd3a2d6072f492cf0dd7181cb061c1f49d) )
36363720
3637   ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
3721   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
36383722   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
36393723   ROM_LOAD( "t1000.u3",    0x400000, 0x800000, CRC(bbf879b5) SHA1(bd9a6aea34ad4001e89e62ff4b7a2292eb833c00) )
36403724
r4441r4442
36713755   ROM_REGION32_LE( 0x400000, "user1", 0 ) /* Protection Data (encrypted external ARM data) */
36723756   ROM_LOAD( "v102_16m.u10", 0x000000, 0x200000,  CRC(18b745e6) SHA1(7bcb58dd3a2d6072f492cf0dd7181cb061c1f49d) )
36733757
3674   ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
3758   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
36753759   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
36763760   ROM_LOAD( "t1000.u3",    0x400000, 0x800000, CRC(bbf879b5) SHA1(bd9a6aea34ad4001e89e62ff4b7a2292eb833c00) )
36773761
r4441r4442
37523836
37533837   /* CPU2 = Z80, romless, code uploaded by 68k */
37543838
3755   ROM_REGION( 0x4000, "cpu2", 0 ) /* ARM protection ASIC - internal rom */
3839   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
37563840   ROM_LOAD( "dmnfrnt_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
37573841
3758   ROM_REGION( 0x400000, "user1", 0 ) /* Protection Data (encrypted external ARM data, internal missing) */
3842   ROM_REGION( 0x800000, "user1", 0 ) /* Protection Data (encrypted external ARM data, internal missing) */
37593843   ROM_LOAD( "v101_32m.u26", 0x000000, 0x400000,  CRC(93965281) SHA1(89da198aaa7ca759cb96b5f18859a477e55fd590) )
37603844
3761   ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
3845   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
37623846   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
37633847   ROM_LOAD( "t04501.u29",    0x400000, 0x800000, CRC(900eaaac) SHA1(4033cb7b28fcadb92d5af3ea7fdd1c22747618fd) )
37643848
r4441r4442
37863870
37873871   /* CPU2 = Z80, romless, code uploaded by 68k */
37883872
3789   ROM_REGION( 0x4000, "cpu2", 0 ) /* ARM protection ASIC - internal rom */
3873   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
37903874   ROM_LOAD( "dmnfrnt_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
37913875
3792   ROM_REGION( 0x400000, "user1", 0 ) /* Protection Data (encrypted external ARM data, internal missing) */
3876   ROM_REGION( 0x800000, "user1", 0 ) /* Protection Data (encrypted external ARM data, internal missing) */
37933877   ROM_LOAD( "v105_32m.u26", 0x000000, 0x400000,  CRC(d200ee63) SHA1(3128c27c5f5a4361d31e7b4bb006de631b3a228c) )
37943878
3795   ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
3879   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
37963880   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
37973881   ROM_LOAD( "t04501.u29",    0x400000, 0x800000, CRC(900eaaac) SHA1(4033cb7b28fcadb92d5af3ea7fdd1c22747618fd) )
37983882
r4441r4442
38163900ROM_START( theglad )
38173901   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
38183902   ROM_LOAD16_WORD_SWAP( "pgm_p01s.rom", 0x000000, 0x020000, CRC(e42b166e) SHA1(2a9df9ec746b14b74fae48b1a438da14973702ea) )  // (BIOS)
3819   ROM_LOAD16_WORD_SWAP( "u6.rom",    0x100000, 0x080000, CRC(14c85212) SHA1(8d2489708e176a2c460498a13173be01f645b79e) )
3903//  ROM_LOAD16_WORD_SWAP( "u6.rom",    0x100000, 0x080000, CRC(14c85212) SHA1(8d2489708e176a2c460498a13173be01f645b79e) )
3904   ROM_LOAD16_WORD_SWAP( "sjfy_v101.u6", 0x100000, 0x080000, CRC(f799e866) SHA1(dccc3c903357c40c3cf85ac0ae8fc12fb0f853a6) )
38203905
38213906   /* CPU2 = Z80, romless, code uploaded by 68k */
38223907
3823   ROM_REGION( 0x200000, "user1", 0 ) /* Protection Data (encrypted external ARM data, internal missing) */
3824   ROM_LOAD( "u2.rom", 0x000000, 0x200000,  CRC(c7bcf2ae) SHA1(10bc012c83987f594d5375a51bc4be2e17568a81) )
3908   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
3909   ROM_LOAD( "sjfy_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
38253910
3826   ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
3911   ROM_REGION( 0x800000, "user1", 0 ) /* Protection Data (encrypted external ARM data, internal missing) */
3912//  ROM_LOAD( "u2.rom", 0x000000, 0x200000,  CRC(c7bcf2ae) SHA1(10bc012c83987f594d5375a51bc4be2e17568a81) )
3913   ROM_LOAD( "sjfy_v107.u26", 0x000000, 0x200000,  CRC(f7c61357) SHA1(52d31c464dfc83c5371b078cb6b73c0d0e0d57e3) )
3914
3915   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
38273916   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
3828   ROM_LOAD( "t04601.u33",    0x400000, 0x800000, BAD_DUMP CRC(2da3be8e) SHA1(704be0efc09bc931c71efd0b3e9f1bc4bfcdd3c1) )
3917   ROM_LOAD( "t04601.u33",   0x400000, 0x800000, CRC(e5dab371) SHA1(2e3c93958eb0326b6b84b95c2168626f26bbac76) )
38293918
38303919   ROM_REGION( 0xc00000/5*8, "gfx2", ROMREGION_DISPOSE | ROMREGION_ERASEFF ) /* Region for 32x32 BG Tiles */
38313920   /* 32x32 Tile Data is put here for easier Decoding */
r4441r4442
38363925   ROM_LOAD( "a04603.u6",    0x1000000, 0x0800000,  CRC(8f621e17) SHA1(b0f87f378e0115d0c95017ca0f1b0d508827a7c6) )
38373926
38383927   ROM_REGION( 0x1000000, "gfx4", 0 ) /* Sprite Masks + Colour Indexes */
3839   ROM_LOAD( "b04601.u11",    0x0000000, 0x0800000, CRC(ee72bccf) SHA1(73c25fe659f6c903447066e4ef83d2f580449d76) )
3840   ROM_LOAD( "b04602.u12",    0x0800000, 0x0400000, CRC(7dba9c38) SHA1(a03d509274e8f6a500a7ebe2da5aab8bed4e7f2f) )
3928   ROM_LOAD( "b04601.u11",   0x0000000, 0x0800000, CRC(ee72bccf) SHA1(73c25fe659f6c903447066e4ef83d2f580449d76) )
3929   ROM_LOAD( "b04602.u12",   0x0800000, 0x0400000, CRC(7dba9c38) SHA1(a03d509274e8f6a500a7ebe2da5aab8bed4e7f2f) )
38413930
38423931   ROM_REGION( 0x1000000, "ics", 0 ) /* Samples - (8 bit mono 11025Hz) - */
38433932   ROM_LOAD( "pgm_m01s.rom", 0x000000, 0x200000, CRC(45ae7159) SHA1(d3ed3ff3464557fd0df6b069b2e431528b0ebfa8) ) // (BIOS)
38443933   ROM_LOAD( "w04601.u1",    0x400000, 0x800000, CRC(5f15ddb3) SHA1(c38dcef8e06802a84e42a7fc9fa505475fc3ac65) )
38453934ROM_END
38463935
3936ROM_START( oldss )
3937   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
3938   ROM_LOAD16_WORD_SWAP( "pgm_p01s.rom", 0x000000, 0x020000, CRC(e42b166e) SHA1(2a9df9ec746b14b74fae48b1a438da14973702ea) )  // (BIOS)
3939   ROM_LOAD16_WORD_SWAP( "p05301.rom",   0x100000, 0x400000, CRC(923f7246) SHA1(818ade79e9724f5a2b0cc5a647ae5d4ee0374799) )
38473940
3941   /* CPU2 = Z80, romless, code uploaded by 68k */
3942
3943   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
3944   ROM_LOAD( "oldss_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
3945
3946   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
3947   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
3948   ROM_LOAD( "t05301.rom",   0x400000, 0x800000, CRC(8257bbb0) SHA1(b48067b7e7081a15fddf21739b641d677c2df3d9) )
3949
3950   ROM_REGION( 0xc00000/5*8, "gfx2", ROMREGION_DISPOSE | ROMREGION_ERASEFF ) /* Region for 32x32 BG Tiles */
3951   /* 32x32 Tile Data is put here for easier Decoding */
3952
3953   /* all roms below need checking to see if they're the same on this board */
3954   ROM_REGION( 0x2000000, "gfx3", ROMREGION_DISPOSE ) /* Sprite Colour Data */
3955   ROM_LOAD( "a05301.rom",   0x0000000, 0x0800000, CRC(57946fd2) SHA1(5d79bc71a1881f3099821a9b255a5f271e0eeff6) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
3956   ROM_LOAD( "a05302.rom",   0x0800000, 0x0800000, CRC(3459a0b8) SHA1(94ab6f980b5582f1db9bb12019d03f0b6e0a06df) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
3957   ROM_LOAD( "a05303.rom",   0x1000000, 0x0800000, CRC(13475d85) SHA1(4683a3bf304fdc15ffb1c61b7957ad68b023fa33) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
3958   ROM_LOAD( "a05304.rom",   0x1800000, 0x0800000, CRC(f03ef7a6) SHA1(c18b1b622b430d5e031e65daa6819b84c3e12ef5) )
3959
3960   ROM_REGION( 0x1000000, "gfx4", 0 ) /* Sprite Masks + Colour Indexes */
3961   ROM_LOAD( "b05301.rom",   0x0000000, 0x0800000, CRC(fd98f503) SHA1(02046ab1aa89f63bff149003d9d61776e025a92a) )
3962   ROM_LOAD( "b05302.rom",   0x0800000, 0x0800000, CRC(9f6094a8) SHA1(69f6f2003ab975eae13ea6b5c2ffa40df6e6bdf6) )
3963
3964   ROM_REGION( 0x800000, "ics", 0 ) /* Samples - (8 bit mono 11025Hz) - */
3965   ROM_LOAD( "pgm_m01s.rom", 0x000000, 0x200000, CRC(45ae7159) SHA1(d3ed3ff3464557fd0df6b069b2e431528b0ebfa8) ) // (BIOS)
3966   ROM_LOAD( "m05301.rom",   0x400000, 0x400000, CRC(86ec83bc) SHA1(067cb7ec449eacd1f49298f45a364368934db5dd) )
3967ROM_END
3968
3969ROM_START( kovh )
3970   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
3971   ROM_LOAD16_WORD_SWAP( "pgm_p01s.rom", 0x000000, 0x020000, CRC(e42b166e) SHA1(2a9df9ec746b14b74fae48b1a438da14973702ea) )  // (BIOS)
3972   ROM_LOAD16_WORD_SWAP( "p0600h.rom",   0x100000, 0x400000, CRC(e251e8e4) SHA1(af5b7c81632a39e1450d932951bed634c76b84e8) )
3973
3974   /* CPU2 = Z80, romless, code uploaded by 68k */
3975
3976   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
3977   ROM_LOAD( "kovh_igs027a.bin", 0x000000, 0x04000, NO_DUMP )
3978
3979   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
3980   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
3981   ROM_LOAD( "t0600.rom",    0x400000, 0x800000, CRC(4acc1ad6) SHA1(0668dbd5e856c2406910c6b7382548b37c631780) )
3982
3983   ROM_REGION( 0xc00000/5*8, "gfx2", ROMREGION_DISPOSE | ROMREGION_ERASEFF ) /* Region for 32x32 BG Tiles */
3984   /* 32x32 Tile Data is put here for easier Decoding */
3985
3986   /* all roms below need checking to see if they're the same on this board */
3987   ROM_REGION( 0x2000000, "gfx3", ROMREGION_DISPOSE ) /* Sprite Colour Data */
3988   ROM_LOAD( "a0600.rom",    0x0000000, 0x0800000, CRC(d8167834) SHA1(fa55a99629d03b2ea253392352f70d2c8639a991) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
3989   ROM_LOAD( "a0601.rom",    0x0800000, 0x0800000, CRC(ff7a4373) SHA1(7def9fca7513ad5a117da230bebd2e3c78679041) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
3990   ROM_LOAD( "a0602.rom",    0x1000000, 0x0800000, CRC(e7a32959) SHA1(3d0ed684dc5b269238890836b2ce7ef46aa5265b) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
3991   ROM_LOAD( "a0540.rom",    0x1800000, 0x0800000, CRC(4fd3413e) SHA1(5e8f3e421342bf558c77e59635f9b5d713e825c2) )
3992
3993   ROM_REGION( 0x1000000, "gfx4", 0 ) /* Sprite Masks + Colour Indexes */
3994   ROM_LOAD( "b0600.rom",    0x0000000, 0x0800000, CRC(7d3cd059) SHA1(00cf994b63337e0e4ebe96453daf45f24192af1c) )
3995   ROM_LOAD( "b0540.rom",    0x0800000, 0x0800000, CRC(60999757) SHA1(118cf058e67858958bcb931e14f5d160c7de87cc) )
3996
3997   ROM_REGION( 0x800000, "ics", 0 ) /* Samples - (8 bit mono 11025Hz) - */
3998   ROM_LOAD( "pgm_m01s.rom", 0x000000, 0x200000, CRC(45ae7159) SHA1(d3ed3ff3464557fd0df6b069b2e431528b0ebfa8) ) // (BIOS)
3999   ROM_LOAD( "m0600.rom",    0x400000, 0x400000, CRC(3ada4fd6) SHA1(4c87adb25d31cbd41f04fbffe31f7bc37173da76) )
4000ROM_END
4001
4002ROM_START( killbldp )
4003   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
4004   ROM_LOAD16_WORD_SWAP( "pgm_p01s.rom", 0x000000, 0x020000, CRC(e42b166e) SHA1(2a9df9ec746b14b74fae48b1a438da14973702ea) )  // (BIOS)
4005   ROM_LOAD16_WORD_SWAP( "kbex_v300x.u6",0x100000, 0x080000, CRC(b7fb8ec9) )
4006
4007   /* CPU2 = Z80, romless, code uploaded by 68k */
4008
4009   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
4010   ROM_LOAD( "kbex_027a.rom", 0x000000, 0x04000, NO_DUMP )
4011
4012   ROM_REGION( 0x800000, "user1", 0 ) /* Protection Data (encrypted external ARM data) */
4013   ROM_LOAD( "kbex_v300x.u26", 0x000000, 0x200000,  CRC(144388c8) )
4014
4015   ROM_REGION( 0xC00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
4016   ROM_LOAD( "pgm_t01s.rom",  0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
4017   ROM_LOAD( "t05701w032.bin",0x400000, 0x800000, CRC(bb8cc6c9) )
4018
4019   ROM_REGION( 0xc00000/5*8, "gfx2", ROMREGION_DISPOSE | ROMREGION_ERASEFF ) /* Region for 32x32 BG Tiles */
4020   /* 32x32 Tile Data is put here for easier Decoding */
4021
4022   ROM_REGION( 0x2000000, "gfx3", 0 ) /* Sprite Colour Data */
4023   ROM_LOAD( "a05701w064.bin",   0x0000000, 0x0800000, CRC(8c0c992c) )
4024   ROM_LOAD( "a05702w064.bin",   0x0800000, 0x0800000, CRC(7e5b0f27) )
4025   ROM_LOAD( "a05703w064.bin",   0x1000000, 0x0800000, CRC(accbdb44) )
4026
4027   ROM_REGION( 0x1000000, "gfx4", 0 ) /* Sprite Masks + Colour Indexes */
4028   ROM_LOAD( "b05701w064.bin",   0x0000000, 0x0800000, CRC(a20cdcef) )
4029   ROM_LOAD( "b05702w016.bin",   0x0800000, 0x0800000, CRC(3447be95) )
4030
4031   ROM_REGION( 0x1000000, "ics", 0 ) /* Samples - (8 bit mono 11025Hz) - */
4032   ROM_LOAD( "pgm_m01s.rom",     0x000000, 0x200000, CRC(45ae7159) SHA1(d3ed3ff3464557fd0df6b069b2e431528b0ebfa8) ) // (BIOS)
4033   ROM_LOAD( "w05701b032.bin",   0x400000, 0x800000, CRC(4f139b7a) )
4034ROM_END
4035
4036ROM_START( svg )
4037   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
4038   ROM_LOAD16_WORD_SWAP( "pgm_p01s.rom", 0x000000, 0x020000, CRC(e42b166e) SHA1(2a9df9ec746b14b74fae48b1a438da14973702ea) )  // (BIOS)
4039   ROM_LOAD16_WORD_SWAP( "svg.u30.bin",  0x100000, 0x080000, CRC(34c18f3f) SHA1(42d1edd0dcfaa5e44861c6a1d4cb24f51ba23de8) )
4040
4041   /* CPU2 = Z80, romless, code uploaded by 68k */
4042
4043   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
4044   ROM_LOAD( "svg_027a.rom", 0x000000, 0x04000, NO_DUMP )
4045
4046   ROM_REGION( 0x800000, "user1", 0 ) /* Protection Data (encrypted external ARM data) */
4047   ROM_LOAD( "svg.u26.bin", 0x000000, 0x400000, CRC(46826ec8) SHA1(ad1daf6f615fb8d748ce7f98f19dd3bf22f79fba) )
4048   ROM_LOAD( "svg.u29.bin", 0x400000, 0x400000, CRC(fa5f3901) SHA1(8ab7c6763df4f752b50ed2197063f58046b32ddb) )
4049
4050   ROM_REGION( 0xc00000, "gfx1", ROMREGION_DISPOSE ) /* 8x8 Text Tiles + 32x32 BG Tiles */
4051   ROM_LOAD( "pgm_t01s.rom",  0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
4052   ROM_LOAD( "t05601w016.bin",0x400000, 0x200000, CRC(03e110dc) SHA1(41c8f286e9303b24ba6235b341371c298226fb6a) )
4053
4054   ROM_REGION( 0xc00000/5*8, "gfx2", ROMREGION_DISPOSE | ROMREGION_ERASEFF ) /* Region for 32x32 BG Tiles */
4055   /* 32x32 Tile Data is put here for easier Decoding */
4056
4057   ROM_REGION( 0x1C00000, "gfx3", 0 ) /* Sprite Colour Data */
4058   ROM_LOAD( "a05601w064.bin",  0x0000000, 0x0800000, CRC(ea6453e4) SHA1(b5c82edafa8008ad59b5f2219511947d078d446e) )
4059   ROM_LOAD( "a05602w064.bin",  0x0800000, 0x0800000, CRC(6d00621b) SHA1(55a4bc357e14b975b0234a9cd49e2224f509dad9) )
4060   ROM_LOAD( "a05603w064.bin",  0x1000000, 0x0800000, CRC(7b71c64f) SHA1(bec7c7edf0634cf8351a54abb867c56af08ad2c3) )
4061   ROM_LOAD( "a05604w032.bin",  0x1800000, 0x0400000, CRC(9452a567) SHA1(01fdb8e1f131603843ef4c49ab76d7a56b2d6414) )
4062
4063   ROM_REGION( 0x1000000, "gfx4", 0 ) /* Sprite Masks + Colour Indexes */
4064   ROM_LOAD( "b05601w064.bin",  0x0000000, 0x0800000, CRC(35c0a489) SHA1(a7d5527da01f8eaa7499fb6785b57094521bce97) )
4065   ROM_LOAD( "b05602w064.bin",  0x0800000, 0x0800000, CRC(8aad3f85) SHA1(da6996d901d42b3a2ba7019ad014bb938a5e328b) )
4066
4067   ROM_REGION( 0x1000000, "ics", 0 ) /* Samples - (8 bit mono 11025Hz) - */
4068   ROM_LOAD( "pgm_m01s.rom",    0x000000, 0x200000, CRC(45ae7159) SHA1(d3ed3ff3464557fd0df6b069b2e431528b0ebfa8) ) // (BIOS)
4069   ROM_LOAD( "w05601b064.bin",  0x400000, 0x800000, CRC(bfe61a71) SHA1(e682ca8d57ca51c4d72f64fc091161f3dbdce871) )
4070   ROM_LOAD( "w05602b032.bin",  0xc00000, 0x400000, CRC(0685166d) SHA1(64dac49abd2a46d5fb58c678027aa5e23d672dc4) )
4071ROM_END
4072
4073
38484074/*** GAME ********************************************************************/
38494075
38504076GAME( 1997, pgm,      0,          pgm, pgm,      pgm,        ROT0,   "IGS", "PGM (Polygame Master) System BIOS", GAME_IS_BIOS_ROOT )
38514077
3852GAME( 1997, orlegend, pgm,        pgm, pgm,      orlegend,   ROT0,   "IGS", "Oriental Legend / Xi Yo Gi Shi Re Zuang (ver. 126)", GAME_IMPERFECT_SOUND  )
3853GAME( 1997, orlegnde, orlegend,   pgm, pgm,      orlegend,   ROT0,   "IGS", "Oriental Legend / Xi Yo Gi Shi Re Zuang (ver. 112)", GAME_IMPERFECT_SOUND  )
3854GAME( 1997, orlegndc, orlegend,   pgm, pgm,      orlegend,   ROT0,   "IGS", "Oriental Legend / Xi Yo Gi Shi Re Zuang (ver. 112, Chinese Board)", GAME_IMPERFECT_SOUND  )
3855GAME( 1997, orld111c, orlegend,   pgm, pgm,      orlegend,   ROT0,   "IGS", "Oriental Legend / Xi Yo Gi Shi Re Zuang (ver. 111, Chinese Board)", GAME_IMPERFECT_SOUND  )
3856GAME( 1997, orld105k, orlegend,   pgm, orld105k, orlegend,   ROT0,   "IGS", "Oriental Legend / Xi Yo Gi Shi Re Zuang (ver. 105, Korean Board)", GAME_IMPERFECT_SOUND  )
3857GAME( 1997, drgw2c,   drgw2,      drgw2, pgm,      drgw2c,     ROT0,   "IGS", "Zhong Guo Long II (ver. 100C, China)", GAME_IMPERFECT_SOUND )
3858GAME( 1999, kov,      pgm,        pgm, sango,    kov,        ROT0,   "IGS", "Knights of Valour / Sangoku Senki (ver. 117)", GAME_IMPERFECT_SOUND ) /* ver # provided by protection? */
3859GAME( 1999, kov115,   kov,        pgm, sango,    kov,        ROT0,   "IGS", "Knights of Valour / Sangoku Senki (ver. 115)", GAME_IMPERFECT_SOUND ) /* ver # provided by protection? */
3860GAME( 1999, kovj,     kov,        pgm, sango,    kov,        ROT0,   "IGS", "Knights of Valour / Sangoku Senki (ver. 100, Japanese Board)", GAME_IMPERFECT_SOUND ) /* ver # provided by protection? */
3861GAME( 1999, kovplus,  kov,        pgm, sango,    kov,        ROT0,   "IGS", "Knights of Valour Plus / Sangoku Senki Plus (ver. 119)", GAME_IMPERFECT_SOUND )
3862GAME( 1999, kovplusa, kov,        pgm, sango,    kov,        ROT0,   "IGS", "Knights of Valour Plus / Sangoku Senki Plus (alt ver. 119)", GAME_IMPERFECT_SOUND )
3863GAME( 1999, photoy2k, pgm,        pgm, photoy2k,    djlzz,      ROT0,   "IGS", "Photo Y2K", GAME_IMPERFECT_SOUND ) /* region provided by protection device */
3864GAME( 1999, raf102j,  photoy2k,   pgm, photoy2k,    djlzz,      ROT0,   "IGS", "Real and Fake / Photo Y2K (ver. 102, Japanese Board)", GAME_IMPERFECT_SOUND ) /* region provided by protection device */
4078GAME( 1997, orlegend, pgm,        pgm, pgm,      orlegend,   ROT0,   "IGS", "Oriental Legend / Xi You Ji Shi E Zhuan (ver. 126)", GAME_IMPERFECT_SOUND  )
4079GAME( 1997, orlegnde, orlegend,   pgm, pgm,      orlegend,   ROT0,   "IGS", "Oriental Legend / Xi You Ji Shi E Zhuan (ver. 112)", GAME_IMPERFECT_SOUND  )
4080GAME( 1997, orlegndc, orlegend,   pgm, pgm,      orlegend,   ROT0,   "IGS", "Oriental Legend / Xi You Ji Shi E Zhuan (ver. 112, Chinese Board)", GAME_IMPERFECT_SOUND  )
4081GAME( 1997, orld111c, orlegend,   pgm, pgm,      orlegend,   ROT0,   "IGS", "Oriental Legend / Xi You Ji Shi E Zhuan (ver. 111, Chinese Board)", GAME_IMPERFECT_SOUND  )
4082GAME( 1997, orld105k, orlegend,   pgm, orld105k, orlegend,   ROT0,   "IGS", "Oriental Legend / Xi You Ji Shi E Zhuan (ver. 105, Korean Board)", GAME_IMPERFECT_SOUND  )
4083GAME( 1997, drgw2c,   drgw2,    drgw2, pgm,      drgw2c,     ROT0,   "IGS", "Zhong Guo Long II (ver. 100C, China)", GAME_IMPERFECT_SOUND )
4084GAME( 1999, photoy2k, pgm,        kov, photoy2k, djlzz,      ROT0,   "IGS", "Photo Y2K", GAME_IMPERFECT_SOUND ) /* region provided by protection device */
4085GAME( 1999, raf102j,  photoy2k,   kov, photoy2k, djlzz,      ROT0,   "IGS", "Real and Fake / Photo Y2K (ver. 102, Japanese Board)", GAME_IMPERFECT_SOUND ) /* region provided by protection device */
4086GAME( 1999, kovsh,    kov,        kov, sango,    kovsh,      ROT0,   "IGS", "Knights of Valour Superheroes / Sangoku Senki Superheroes (ver. 104)", GAME_IMPERFECT_SOUND )
38654087GAME( 2000, kov2,     pgm,       kov2, sango,    kov2,       ROT0,   "IGS", "Knights of Valour 2 (ver. 100)", GAME_IMPERFECT_SOUND )
38664088GAME( 2000, kov2106,  kov2,      kov2, sango,    kov2,       ROT0,   "IGS", "Knights of Valour 2 (ver. 106)", GAME_IMPERFECT_SOUND )
38674089GAME( 2001, martmast, pgm,       kov2, sango,    martmast,   ROT0,   "IGS", "Martial Masters (ver. 102)", GAME_IMPERFECT_SOUND )
38684090GAME( 2001, martmasc, martmast,  kov2, sango,    martmast,   ROT0,   "IGS", "Martial Masters (ver. 101, Chinese Board)", GAME_IMPERFECT_SOUND )
38694091
38704092/* Playable but maybe imperfect protection emulation */
3871GAME( 1997, drgw2,    pgm,        drgw2, pgm,      drgw2,      ROT0,   "IGS", "Dragon World II (ver. 110X, Export)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
3872GAME( 1997, drgw2j,   drgw2,      drgw2, pgm,      drgw2j,     ROT0,   "IGS", "Chuugokuryuu II (ver. 100J, Japan)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
3873GAME( 1998, killbldt, killbld, killbld,killbld,    killbld,    ROT0,   "IGS", "The Killing Blade (Chinese Board)", GAME_IMPERFECT_SOUND ) // it's playable, but there are some things unclear about the protection
3874GAME( 1999, puzlstar, pgm,        pgm, sango,    pstar,      ROT0,   "IGS", "Puzzle Star", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )  // not playable past first few rounds
3875GAME( 1999, olds100a, olds,       olds, olds,    olds,   ROT0,   "IGS", "Oriental Legend Super / Special (alt ver. 100)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING  ) // grashes on some bosses, high score table etc.
4093GAME( 1997, drgw2,    pgm,       drgw2, pgm,     drgw2,      ROT0,   "IGS", "Dragon World II (ver. 110X, Export)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
4094GAME( 1997, drgw2j,   drgw2,     drgw2, pgm,     drgw2j,     ROT0,   "IGS", "Chuugokuryuu II (ver. 100J, Japan)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
4095GAME( 1998, killbldt, killbld, killbld, killbld, killbld,    ROT0,   "IGS", "The Killing Blade (Chinese Board)", GAME_IMPERFECT_SOUND ) // it's playable, but there are some things unclear about the protection
4096GAME( 1998, olds,     pgm,       olds, olds,     olds,       ROT0,   "IGS", "Oriental Legend Special / Xi You Ji Shi E Zhuan Super (ver. 101, Korean Board)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
4097GAME( 1998, olds100,  olds,      olds, olds,     olds,       ROT0,   "IGS", "Oriental Legend Special / Xi You Ji Shi E Zhuan Super (ver. 100)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
4098GAME( 1998, olds100a, olds,      olds, olds,     olds,       ROT0,   "IGS", "Oriental Legend Special / Xi You Ji Shi E Zhuan Super (alt ver. 100)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING  ) // grashes on some bosses, high score table etc.
38764099
3877
38784100/* not working */
38794101GAME( 1998, drgw3,    pgm,        pgm, sango,    dw3,        ROT0,   "IGS", "Dragon World 3", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
38804102GAME( 1998, drgw3k,   drgw3,      pgm, sango,    dw3,        ROT0,   "IGS", "Dragon World 3 (Korean Board)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
3881GAME( 1999, kovsh,    kov,      kovsh, sango,    kovsh,      ROT0,   "IGS", "Knights of Valour Superheroes / Sangoku Senki Superheroes (ver. 104)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
3882GAME( 1998, killbld,  pgm,     killbld,killbld,  killbld,    ROT0,   "IGS", "The Killing Blade", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
3883GAME( 1999, olds,     pgm,        olds, olds,    olds,   ROT0,   "IGS", "Oriental Legend Super / Special (ver. 101, Korean Board)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
3884GAME( 1999, olds100,  olds,       olds, olds,    olds,   ROT0,   "IGS", "Oriental Legend Super / Special (ver. 100)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
3885GAME( 2001, ddp2,     pgm,        pgm, ddp2,     ddp2,       ROT270, "IGS", "Bee Storm - DoDonPachi II", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
3886GAME( 2001, puzzli2,  pgm,        pgm, sango,    puzzli2,    ROT0,   "IGS", "Puzzli 2 Super", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
3887GAME( 2001, theglad,  pgm,        pgm, sango,    pgm,        ROT0,   "IGS", "The Gladiator", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
3888GAME( 2002, dmnfrnt,  pgm,        pgm, sango,    pgm,        ROT0,   "IGS", "Demon Front (ver. 102)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
3889GAME( 2002, dmnfrnta, dmnfrnt,    pgm, sango,    pgm,        ROT0,   "IGS", "Demon Front (ver. 105)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
3890GAME( 2000, kov2p,    kov2,      kov2, sango,    kov2p,      ROT0,   "IGS", "Knights of Valour 2 Plus - Nine Dragons (ver. M204XX)", GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_SOUND ) // works if you hack the kov2 ARM rom
3891GAME( 2000, kov2p205, kov2,      kov2, sango,    kov2p,      ROT0,   "IGS", "Knights of Valour 2 Plus - Nine Dragons (ver. M205XX)", GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_SOUND ) // works if you hack the kov2 ARM rom
4103GAME( 1998, killbld,  pgm,    killbld, killbld,  killbld,    ROT0,   "IGS", "The Killing Blade", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
4104GAME( 1999, kov,      pgm,        kov, sango,    kov,        ROT0,   "IGS", "Knights of Valour / Sangoku Senki (ver. 117)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) /* need internal rom of IGS027A */
4105GAME( 1999, kov115,   kov,        kov, sango,    kov,        ROT0,   "IGS", "Knights of Valour / Sangoku Senki (ver. 115)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) /* need internal rom of IGS027A */
4106GAME( 1999, kovj,     kov,        kov, sango,    kov,        ROT0,   "IGS", "Knights of Valour / Sangoku Senki (ver. 100, Japanese Board)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) /* need internal rom of IGS027A */
4107GAME( 1999, kovplus,  kov,        kov, sango,    kov,        ROT0,   "IGS", "Knights of Valour Plus / Sangoku Senki Plus (ver. 119)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) /* need internal rom of IGS027A */
4108GAME( 1999, kovplusa, kov,        kov, sango,    kov,        ROT0,   "IGS", "Knights of Valour Plus / Sangoku Senki Plus (alt ver. 119)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) /* need internal rom of IGS027A */
4109GAME( 1999, puzlstar, pgm,        kov, sango,    pstar,      ROT0,   "IGS", "Puzzle Star", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) /* need internal rom of IGS027A */
4110GAME( 2001, kov2p,    kov2,      kov2, sango,    kov2p,      ROT0,   "IGS", "Knights of Valour 2 Plus - Nine Dragons (ver. M204XX)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) /* need internal rom of IGS027A */
4111GAME( 2001, kov2p205, kov2,      kov2, sango,    kov2p,      ROT0,   "IGS", "Knights of Valour 2 Plus - Nine Dragons (ver. M205XX)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) /* need internal rom of IGS027A */
4112GAME( 2001, ddp2,     pgm,       kov2, ddp2,     ddp2,       ROT270, "IGS", "Bee Storm - DoDonPachi II (set 1)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) /* need internal rom of IGS027A */
4113GAME( 2001, ddp2a,    pgm,       kov2, ddp2,     ddp2,       ROT270, "IGS", "Bee Storm - DoDonPachi II (set 2)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) /* need internal rom of IGS027A */
4114GAME( 2001, puzzli2,  pgm,        svg, sango,    puzzli2,    ROT0,   "IGS", "Puzzli 2 Super", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
4115GAME( 2001, theglad,  pgm,        svg, sango,    theglad,    ROT0,   "IGS", "The Gladiator", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
4116GAME( 2002, dmnfrnt,  pgm,        svg, sango,    dmnfrnt,    ROT0,   "IGS", "Demon Front (ver. 102)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
4117GAME( 2002, dmnfrnta, dmnfrnt,    svg, sango,    dmnfrnt,    ROT0,   "IGS", "Demon Front (ver. 105)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
4118GAME( 2004, kovh,     kov,        kov, sango,    kovh,       ROT0,   "IGS", "Knights of Valour Hero (ver. 101)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) /* need internal rom of IGS027A */
4119GAME( 2004, oldss,    pgm,        kov, sango,    oldss,      ROT0,   "IGS", "Oriental Legend Super Super", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING ) /* need internal rom of IGS027A */
4120GAME( 2005, killbldp, pgm,        svg, sango,    killbldp,   ROT0,   "IGS", "The Killing Blade Ex / Plus", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
4121GAME( 2005, svg,      pgm,        svg, sango,    svg,        ROT0,   "IGS", "Spectral VS Generation", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
src/mame/drivers/gameplan.c
r4441r4442
5252- Megatack's test mode reports the same fire buttons as Killer Comet, but this
5353  is wrong: there is only one fire button, not three.
5454
55- Megatack's actual name which displays proudly on the cover and everywhere in
56  the manual as "MEGATTACK"
57
58- Checked and verified DIPs from manuals and service mode for:
59  Challenger
60  Kaos
61  Killer Comet
62  Megattack
63  Pot Of Gold (Leprechaun)
64
65
5566TODO:
5667- The board has, instead of a watchdog, a timed reset that has to be disabled
5768  on startup. The disable line is tied to CA2 of VIA2, but I don't see writes
r4441r4442
317328   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_COCKTAIL
318329
319330   PORT_START("DSW0")   /* DSW A - from "TEST NO.6 - dip switch A" */
320   PORT_DIPNAME( 0x03, 0x03, "Coinage P1/P2" )
331   PORT_DIPNAME( 0x03, 0x03, "Coinage P1/P2" ) PORT_DIPLOCATION("SW1:1,2")
321332   PORT_DIPSETTING(    0x03, "1 Credit/2 Credits" )
322333   PORT_DIPSETTING(    0x02, "2 Credits/3 Credits" )
323334   PORT_DIPSETTING(    0x01, "2 Credits/4 Credits" )
324335   PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
325   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
336   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:3")
326337   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
327338   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
328   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) )
339   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:4")
329340   PORT_DIPSETTING(    0x00, "4" )
330341   PORT_DIPSETTING(    0x08, "5" )
331   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) )
332   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
333   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
334   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
335   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
336   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
337   PORT_DIPNAME( 0xc0, 0xc0, "Reaction" )
342   PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW1:5" )
343   PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW1:6" )
344   PORT_DIPNAME( 0xc0, 0xc0, "Reaction" ) PORT_DIPLOCATION("SW1:7,8")
338345   PORT_DIPSETTING(    0xc0, "Slowest" )
339346   PORT_DIPSETTING(    0x80, "Slow" )
340347   PORT_DIPSETTING(    0x40, "Fast" )
341348   PORT_DIPSETTING(    0x00, "Fastest" )
342349
343350   PORT_START("DSW1")   /* DSW B - from "TEST NO.6 - dip switch B" */
344   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
345   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
346   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
347   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unused ) )
348   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
349   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
350   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
351   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
352   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
353   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) )
354   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
355   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
356   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) )
357   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
358   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
359   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
360   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
361   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
362   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) )
351   PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW2:1" )
352   PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW2:2" )
353   PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW2:3" )
354   PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW2:4" )
355   PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW2:5" )
356   PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW2:6" )
357   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:7")
363358   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
364359   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
365   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )
360   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:8")
366361   PORT_DIPSETTING(    0x80, DEF_STR( Upright ) )
367362   PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
368363
369364   PORT_START("DSW2")   /* audio board DSW A */
370   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
371   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
372   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
373   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unused ) )
374   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
375   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
376   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
377   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
378   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
379   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) )
380   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
381   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
382   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) )
383   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
384   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
385   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
386   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
387   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
388   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
389   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
390   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
391   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
392   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
393   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
365   PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW3:1" )
366   PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW3:2" )
367   PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW3:3" )
368   PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW3:4" )
369   PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW3:5" )
370   PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW3:6" )
371   PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW3:7" )
372   PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW3:8" )
394373
395374   PORT_START("DSW3")   /* audio board DSW B */
396   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
397   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
398   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
399   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unused ) )
400   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
401   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
402   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
403   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
404   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
405   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) )
406   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
407   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
408   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) )
409   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
410   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
411   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
412   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
413   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
414   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
415   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
416   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
417   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
418   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
419   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
375   PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW4:1" )
376   PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW4:2" )
377   PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW4:3" )
378   PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW4:4" )
379   PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW4:5" )
380   PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW4:6" )
381   PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW4:7" )
382   PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW4:8" )
420383INPUT_PORTS_END
421384
422385
r4441r4442
462425   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
463426
464427   PORT_START("DSW0")   /* DSW A - from "TEST NO.6 - dip switch A" */
465   PORT_DIPNAME( 0x03, 0x03, "Coinage P1/P2" )
428   PORT_DIPNAME( 0x03, 0x03, "Coinage P1/P2" ) PORT_DIPLOCATION("SW1:1,2")
466429   PORT_DIPSETTING(    0x03, "1 Credit/2 Credits" )
467430   PORT_DIPSETTING(    0x02, "2 Credits/3 Credits" )
468431   PORT_DIPSETTING(    0x01, "2 Credits/4 Credits" )
469432   PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
470   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
471   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
433   PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW1:3" )
472434   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
473   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) )
435   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:4")
474436   PORT_DIPSETTING(    0x08, "3" )
475437   PORT_DIPSETTING(    0x00, "4" )
476   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) )
477   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
478   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
479   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
480   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
481   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
482   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
483   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
484   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
485   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
486   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
487   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
438   PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW1:5" )
439   PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW1:6" )
440   PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW1:7" )
441   PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW1:8" )
488442
489443   PORT_START("DSW1")   /* DSW B - from "TEST NO.6 - dip switch B" */
490   PORT_DIPNAME( 0x07, 0x07, DEF_STR( Bonus_Life ) )
444   PORT_DIPNAME( 0x07, 0x07, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:1,2,3")
491445   PORT_DIPSETTING(    0x07, "20000" )
492446   PORT_DIPSETTING(    0x06, "30000" )
493447   PORT_DIPSETTING(    0x05, "40000" )
r4441r4442
496450   PORT_DIPSETTING(    0x02, "70000" )
497451   PORT_DIPSETTING(    0x01, "80000" )
498452   PORT_DIPSETTING(    0x00, "90000" )
499   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) )
500   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
501   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
502   PORT_DIPNAME( 0x10, 0x10, "Monitor View" )
453   PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW2:4" )
454   PORT_DIPNAME( 0x10, 0x10, "Monitor View" ) PORT_DIPLOCATION("SW2:5")
503455   PORT_DIPSETTING(    0x10, "Direct" )
504456   PORT_DIPSETTING(    0x00, "Mirror" )
505   PORT_DIPNAME( 0x20, 0x20, "Monitor Orientation" )
457   PORT_DIPNAME( 0x20, 0x20, "Monitor Orientation" ) PORT_DIPLOCATION("SW2:6")
506458   PORT_DIPSETTING(    0x20, "Horizontal" )
507459   PORT_DIPSETTING(    0x00, "Vertical" )
508   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) )
460   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:7")
509461   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
510462   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
511   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )
463   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:8")
512464   PORT_DIPSETTING(    0x80, DEF_STR( Upright ) )
513465   PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
514466
515467   PORT_START("DSW2")   /* audio board DSW A */
516   PORT_DIPNAME( 0x01, 0x00, "Sound Test A 0" )
468   PORT_DIPNAME( 0x01, 0x00, "Sound Test A 0" ) PORT_DIPLOCATION("SW3:1")
517469   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
518470   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
519   PORT_DIPNAME( 0x02, 0x00, "Sound Test A 1" )
471   PORT_DIPNAME( 0x02, 0x00, "Sound Test A 1" ) PORT_DIPLOCATION("SW3:2")
520472   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
521473   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
522   PORT_DIPNAME( 0x04, 0x00, "Sound Test A 2" )
474   PORT_DIPNAME( 0x04, 0x00, "Sound Test A 2" ) PORT_DIPLOCATION("SW3:3")
523475   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
524476   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
525   PORT_DIPNAME( 0x08, 0x00, "Sound Test A 3" )
477   PORT_DIPNAME( 0x08, 0x00, "Sound Test A 3" ) PORT_DIPLOCATION("SW3:4")
526478   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
527479   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
528   PORT_DIPNAME( 0x10, 0x00, "Sound Test A 4" )
480   PORT_DIPNAME( 0x10, 0x00, "Sound Test A 4" ) PORT_DIPLOCATION("SW3:5")
529481   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
530482   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
531   PORT_DIPNAME( 0x20, 0x00, "Sound Test A 5" )
483   PORT_DIPNAME( 0x20, 0x00, "Sound Test A 5" ) PORT_DIPLOCATION("SW3:6")
532484   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
533485   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
534   PORT_DIPNAME( 0x40, 0x00, "Sound Test A 6" )
486   PORT_DIPNAME( 0x40, 0x00, "Sound Test A 6" ) PORT_DIPLOCATION("SW3:7")
535487   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
536488   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
537   PORT_DIPNAME( 0x80, 0x80, "Sound Test Enable" )
489   PORT_DIPNAME( 0x80, 0x80, "Sound Test Enable" ) PORT_DIPLOCATION("SW3:8")
538490   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
539491   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
540492
541493   PORT_START("DSW3")   /* audio board DSW B */
542   PORT_DIPNAME( 0x01, 0x00, "Sound Test B 0" )
494   PORT_DIPNAME( 0x01, 0x00, "Sound Test B 0" ) PORT_DIPLOCATION("SW4:1")
543495   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
544496   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
545   PORT_DIPNAME( 0x02, 0x00, "Sound Test B 1" )
497   PORT_DIPNAME( 0x02, 0x00, "Sound Test B 1" ) PORT_DIPLOCATION("SW4:2")
546498   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
547499   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
548   PORT_DIPNAME( 0x04, 0x00, "Sound Test B 2" )
500   PORT_DIPNAME( 0x04, 0x00, "Sound Test B 2" ) PORT_DIPLOCATION("SW4:3")
549501   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
550502   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
551   PORT_DIPNAME( 0x08, 0x00, "Sound Test B 3" )
503   PORT_DIPNAME( 0x08, 0x00, "Sound Test B 3" ) PORT_DIPLOCATION("SW4:4")
552504   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
553505   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
554   PORT_DIPNAME( 0x10, 0x00, "Sound Test B 4" )
506   PORT_DIPNAME( 0x10, 0x00, "Sound Test B 4" ) PORT_DIPLOCATION("SW4:5")
555507   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
556508   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
557   PORT_DIPNAME( 0x20, 0x00, "Sound Test B 5" )
509   PORT_DIPNAME( 0x20, 0x00, "Sound Test B 5" ) PORT_DIPLOCATION("SW4:6")
558510   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
559511   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
560   PORT_DIPNAME( 0x40, 0x00, "Sound Test B 6" )
512   PORT_DIPNAME( 0x40, 0x00, "Sound Test B 6" ) PORT_DIPLOCATION("SW4:7")
561513   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
562514   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
563   PORT_DIPNAME( 0x80, 0x00, "Sound Test B 7" )
515   PORT_DIPNAME( 0x80, 0x00, "Sound Test B 7" ) PORT_DIPLOCATION("SW4:8")
564516   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
565517   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
566518INPUT_PORTS_END
r4441r4442
608560   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
609561
610562   PORT_START("DSW0")   /* DSW A - from "TEST NO.6 - dip switch A" */
611   PORT_DIPNAME( 0x03, 0x03, "Coinage P1/P2" )
563   PORT_DIPNAME( 0x03, 0x03, "Coinage P1/P2" ) PORT_DIPLOCATION("SW1:1,2")
612564   PORT_DIPSETTING(    0x03, "1 Credit/2 Credits" )
613565   PORT_DIPSETTING(    0x02, "2 Credits/3 Credits" )
614566   PORT_DIPSETTING(    0x01, "2 Credits/4 Credits" )
615567   PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
616   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
617   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
618   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
619   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) )
620   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
621   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
622   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) )
623   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
624   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
625   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
626   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
627   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
628   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) )
568   PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW1:3" )
569   PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW1:4" )
570   PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW1:5" )
571   PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW1:6" )
572   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:7,8")
629573   PORT_DIPSETTING(    0xc0, "3" )
630574   PORT_DIPSETTING(    0x80, "4" )
631575   PORT_DIPSETTING(    0x40, "5" )
632576   PORT_DIPSETTING(    0x00, "6" )
633577
578// Manual states information which differs from actual settings for DSW1
579// Switches 4 & 5 are factory settings and remain in the OFF position.
580// Switches 6 & 7 are factory settings which remain in the ON position.
581
634582   PORT_START("DSW1")   /* DSW B - from "TEST NO.6 - dip switch B" */
635   PORT_DIPNAME( 0x07, 0x07, DEF_STR( Bonus_Life ) )
583   PORT_DIPNAME( 0x07, 0x07, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:1,2,3")
636584   PORT_DIPSETTING(    0x01, "20000" )
637585   PORT_DIPSETTING(    0x00, "30000" )
638586   PORT_DIPSETTING(    0x07, "40000" )
r4441r4442
641589   PORT_DIPSETTING(    0x04, "70000" )
642590   PORT_DIPSETTING(    0x03, "80000" )
643591   PORT_DIPSETTING(    0x02, "90000" )
644   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) )
645   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
646   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
647   PORT_DIPNAME( 0x10, 0x10, "Monitor View" )
592   PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW2:4" )
593   PORT_DIPNAME( 0x10, 0x10, "Monitor View" ) PORT_DIPLOCATION("SW2:5")
648594   PORT_DIPSETTING(    0x10, "Direct" )
649595   PORT_DIPSETTING(    0x00, "Mirror" )
650   PORT_DIPNAME( 0x20, 0x20, "Monitor Orientation" )
596   PORT_DIPNAME( 0x20, 0x20, "Monitor Orientation" ) PORT_DIPLOCATION("SW2:6")
651597   PORT_DIPSETTING(    0x20, "Horizontal" )
652598   PORT_DIPSETTING(    0x00, "Vertical" )
653   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) )
599   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:7")
654600   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
655601   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
656   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )
602   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:8")
657603   PORT_DIPSETTING(    0x80, DEF_STR( Upright ) )
658604   PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
659605
660606   PORT_START("DSW2")   /* audio board DSW A */
661   PORT_DIPNAME( 0x01, 0x00, "Sound Test A 0" )
607   PORT_DIPNAME( 0x01, 0x00, "Sound Test A 0" ) PORT_DIPLOCATION("SW3:1")
662608   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
663609   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
664   PORT_DIPNAME( 0x02, 0x00, "Sound Test A 1" )
610   PORT_DIPNAME( 0x02, 0x00, "Sound Test A 1" ) PORT_DIPLOCATION("SW3:2")
665611   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
666612   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
667   PORT_DIPNAME( 0x04, 0x00, "Sound Test A 2" )
613   PORT_DIPNAME( 0x04, 0x00, "Sound Test A 2" ) PORT_DIPLOCATION("SW3:3")
668614   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
669615   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
670   PORT_DIPNAME( 0x08, 0x00, "Sound Test A 3" )
616   PORT_DIPNAME( 0x08, 0x00, "Sound Test A 3" ) PORT_DIPLOCATION("SW3:4")
671617   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
672618   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
673   PORT_DIPNAME( 0x10, 0x00, "Sound Test A 4" )
619   PORT_DIPNAME( 0x10, 0x00, "Sound Test A 4" ) PORT_DIPLOCATION("SW3:5")
674620   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
675621   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
676   PORT_DIPNAME( 0x20, 0x00, "Sound Test A 5" )
622   PORT_DIPNAME( 0x20, 0x00, "Sound Test A 5" ) PORT_DIPLOCATION("SW3:6")
677623   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
678624   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
679   PORT_DIPNAME( 0x40, 0x00, "Sound Test A 6" )
625   PORT_DIPNAME( 0x40, 0x00, "Sound Test A 6" ) PORT_DIPLOCATION("SW3:7")
680626   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
681627   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
682   PORT_DIPNAME( 0x80, 0x80, "Sound Test Enable" )
628   PORT_DIPNAME( 0x80, 0x80, "Sound Test Enable" ) PORT_DIPLOCATION("SW3:8")
683629   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
684630   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
685631
686632   PORT_START("DSW3")   /* audio board DSW B */
687   PORT_DIPNAME( 0x01, 0x00, "Sound Test B 0" )
633   PORT_DIPNAME( 0x01, 0x00, "Sound Test B 0" ) PORT_DIPLOCATION("SW4:1")
688634   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
689635   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
690   PORT_DIPNAME( 0x02, 0x00, "Sound Test B 1" )
636   PORT_DIPNAME( 0x02, 0x00, "Sound Test B 1" ) PORT_DIPLOCATION("SW4:2")
691637   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
692638   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
693   PORT_DIPNAME( 0x04, 0x00, "Sound Test B 2" )
639   PORT_DIPNAME( 0x04, 0x00, "Sound Test B 2" ) PORT_DIPLOCATION("SW4:3")
694640   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
695641   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
696   PORT_DIPNAME( 0x08, 0x00, "Sound Test B 3" )
642   PORT_DIPNAME( 0x08, 0x00, "Sound Test B 3" ) PORT_DIPLOCATION("SW4:4")
697643   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
698644   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
699   PORT_DIPNAME( 0x10, 0x00, "Sound Test B 4" )
645   PORT_DIPNAME( 0x10, 0x00, "Sound Test B 4" ) PORT_DIPLOCATION("SW4:5")
700646   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
701647   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
702   PORT_DIPNAME( 0x20, 0x00, "Sound Test B 5" )
648   PORT_DIPNAME( 0x20, 0x00, "Sound Test B 5" ) PORT_DIPLOCATION("SW4:6")
703649   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
704650   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
705   PORT_DIPNAME( 0x40, 0x00, "Sound Test B 6" )
651   PORT_DIPNAME( 0x40, 0x00, "Sound Test B 6" ) PORT_DIPLOCATION("SW4:7")
706652   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
707653   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
708   PORT_DIPNAME( 0x80, 0x00, "Sound Test B 7" )
654   PORT_DIPNAME( 0x80, 0x00, "Sound Test B 7" ) PORT_DIPLOCATION("SW4:8")
709655   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
710656   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
711657INPUT_PORTS_END
r4441r4442
753699   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
754700
755701   PORT_START("DSW0")
756   PORT_DIPNAME( 0x0f, 0x0e, DEF_STR( Coinage ) )
702   PORT_DIPNAME( 0x0f, 0x0e, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2,3,4")
757703   PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
758704   PORT_DIPSETTING(    0x0e, DEF_STR( 1C_1C ) )
759705   PORT_DIPSETTING(    0x0d, DEF_STR( 1C_2C ) )
r4441r4442
770716   PORT_DIPSETTING(    0x02, "1 Coin/13 Credits" )
771717   PORT_DIPSETTING(    0x01, "1 Coin/14 Credits" )
772718   PORT_DIPSETTING(    0x0f, DEF_STR( 2C_3C ) )
773   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Demo_Sounds ) )
719   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:5")
774720   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
775721   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
776   PORT_DIPNAME( 0x60, 0x60, "Max Credits" )
722   PORT_DIPNAME( 0x60, 0x60, "Max Credits" ) PORT_DIPLOCATION("SW1:6,7")
777723   PORT_DIPSETTING(    0x60, "10" )
778724   PORT_DIPSETTING(    0x40, "20" )
779725   PORT_DIPSETTING(    0x20, "30" )
780726   PORT_DIPSETTING(    0x00, "40" )
781   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Free_Play ) )
727   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW1:8")
782728   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
783729   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
784730
785731   PORT_START("DSW1")
786   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) )
732   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1")
787733   PORT_DIPSETTING(    0x01, "3" )
788734   PORT_DIPSETTING(    0x00, "4" )
789   PORT_DIPNAME( 0x02, 0x00, "Speed" )
735   PORT_DIPNAME( 0x02, 0x00, "Speed" ) PORT_DIPLOCATION("SW2:2")
790736   PORT_DIPSETTING(    0x00, "Slow" )
791737   PORT_DIPSETTING(    0x02, "Fast" )
792   PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
738   PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:3,4")
793739   PORT_DIPSETTING(    0x0c, "No Bonus" )
794740   PORT_DIPSETTING(    0x08, "10k" )
795741   PORT_DIPSETTING(    0x04, "10k 30k" )
796742   PORT_DIPSETTING(    0x00, "10k 30k 60k" )
797   PORT_DIPNAME( 0x10, 0x10, "Number of $" )
743   PORT_DIPNAME( 0x10, 0x10, "Number of $" ) PORT_DIPLOCATION("SW2:5")
798744   PORT_DIPSETTING(    0x10, "8" )
799745   PORT_DIPSETTING(    0x00, "12" )
800   PORT_DIPNAME( 0x20, 0x00, "Bonus erg" )
746   PORT_DIPNAME( 0x20, 0x00, "Bonus erg" ) PORT_DIPLOCATION("SW2:6")
801747   PORT_DIPSETTING(    0x20, "Every other screen" )
802748   PORT_DIPSETTING(    0x00, "Every screen" )
803   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
804   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
805   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
806   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )
749   PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW2:7" )
750   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:8")
807751   PORT_DIPSETTING(    0x80, DEF_STR( Upright ) )
808752   PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
809753
810754   PORT_START("DSW2")   /* audio board DSW A */
811   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
812   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
813   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
814   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unused ) )
815   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
816   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
817   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
818   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
819   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
820   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) )
821   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
822   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
823   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) )
824   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
825   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
826   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
827   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
828   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
829   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
830   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
831   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
832   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
833   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
834   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
755   PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW3:1" )
756   PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW3:2" )
757   PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW3:3" )
758   PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW3:4" )
759   PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW3:5" )
760   PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW3:6" )
761   PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW3:7" )
762   PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW3:8" )
835763
836764   PORT_START("DSW3")   /* audio board DSW B */
837   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
838   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
839   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
840   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unused ) )
841   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
842   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
843   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
844   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
845   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
846   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) )
847   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
848   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
849   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) )
850   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
851   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
852   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
853   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
854   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
855   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
856   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
857   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
858   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
859   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
860   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
765   PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW4:1" )
766   PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW4:2" )
767   PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW4:3" )
768   PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW4:4" )
769   PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW4:5" )
770   PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW4:6" )
771   PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW4:7" )
772   PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW4:8" )
861773INPUT_PORTS_END
862774
863775
r4441r4442
903815   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_COCKTAIL
904816
905817   PORT_START("DSW0")   /* DSW A - from "TEST NO.6 - dip switch A" */
906   PORT_DIPNAME( 0x09, 0x09, DEF_STR( Coin_B ) )
818   PORT_DIPNAME( 0x09, 0x09, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:1,4")
907819   PORT_DIPSETTING(    0x09, DEF_STR( 1C_1C ) )
908820   PORT_DIPSETTING(    0x01, DEF_STR( 1C_5C ) )
909821   PORT_DIPSETTING(    0x08, DEF_STR( 1C_6C ) )
910822   PORT_DIPSETTING(    0x00, DEF_STR( 1C_7C ) )
911   PORT_DIPNAME( 0x22, 0x22, "Max Credits" )
823   PORT_DIPNAME( 0x22, 0x22, "Max Credits" ) PORT_DIPLOCATION("SW1:2,6")
912824   PORT_DIPSETTING(    0x22, "10" )
913825   PORT_DIPSETTING(    0x20, "20" )
914826   PORT_DIPSETTING(    0x02, "30" )
915827   PORT_DIPSETTING(    0x00, "40" )
916   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Cabinet ) )
828   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:3")
917829   PORT_DIPSETTING(    0x04, DEF_STR( Upright ) )
918830   PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
919   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Free_Play ) )
831   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW1:5")
920832   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
921833   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
922   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_A ) )
834   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:7,8")
923835   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_1C ) )
924836   PORT_DIPSETTING(    0x40, DEF_STR( 1C_2C ) )
925837   PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) )
926838   PORT_DIPSETTING(    0x00, DEF_STR( 1C_4C ) )
927839
928840   PORT_START("DSW1")   /* DSW B - from "TEST NO.6 - dip switch B" */
929   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
841   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:1")
930842   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
931843   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
932   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) )
933   PORT_DIPSETTING(    0x08, "3" )
934   PORT_DIPSETTING(    0x00, "4" )
935   PORT_DIPNAME( 0xc0, 0x40, DEF_STR( Bonus_Life ) )
844   PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW2:2" )
845   PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW2:3" )
846   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:4")
847   PORT_DIPSETTING(    0x08, "4" )
848   PORT_DIPSETTING(    0x00, "5" )
849   PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW2:5" )
850   PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW2:6" )
851   PORT_DIPNAME( 0xc0, 0x40, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:7,8")
936852   PORT_DIPSETTING(    0x40, "30000" )
937853   PORT_DIPSETTING(    0x80, "60000" )
938854   PORT_DIPSETTING(    0x00, "90000" )
939855   PORT_DIPSETTING(    0xc0, DEF_STR( None ) )
940   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
941   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
942   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
943   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
944   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
945   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
946   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
947   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
948   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
949   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
950   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
951   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
952856
953857   PORT_START("DSW2")   /* audio board DSW A */
954   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
955   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
956   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
957   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unused ) )
958   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
959   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
960   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
961   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
962   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
963   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) )
964   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
965   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
966   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) )
967   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
968   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
969   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
970   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
971   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
972   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
973   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
974   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
975   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
976   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
977   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
858   PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW3:1" )
859   PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW3:2" )
860   PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW3:3" )
861   PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW3:4" )
862   PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW3:5" )
863   PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW3:6" )
864   PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW3:7" )
865   PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW3:8" )
978866
979867   PORT_START("DSW3")   /* audio board DSW B */
980   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
981   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
982   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
983   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unused ) )
984   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
985   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
986   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
987   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
988   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
989   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) )
990   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
991   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
992   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) )
993   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
994   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
995   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
996   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
997   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
998   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
999   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
1000   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1001   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
1002   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
1003   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
868   PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW4:1" )
869   PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW4:2" )
870   PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW4:3" )
871   PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW4:4" )
872   PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW4:5" )
873   PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW4:6" )
874   PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW4:7" )
875   PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW4:8" )
1004876INPUT_PORTS_END
1005877
1006878
879static INPUT_PORTS_START( potogold )
880        PORT_INCLUDE(leprechn)
881        PORT_MODIFY("DSW1")
882   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:4")
883   PORT_DIPSETTING(    0x08, "3" )
884   PORT_DIPSETTING(    0x00, "4" )
885INPUT_PORTS_END
886
887
1007888static INPUT_PORTS_START( piratetr )
1008889   PORT_START("IN0")   /* COL. A - from "TEST NO.7 - status locator - coin-door" */
1009890   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
r4441r4442
1046927   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_COCKTAIL
1047928
1048929   PORT_START("DSW0")   /* DSW A - from "TEST NO.6 - dip switch A" */
1049   PORT_DIPNAME( 0x09, 0x09, DEF_STR( Coin_B ) )
930   PORT_DIPNAME( 0x09, 0x09, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:1,4")
1050931   PORT_DIPSETTING(    0x09, DEF_STR( 1C_1C ) )
1051932   PORT_DIPSETTING(    0x01, DEF_STR( 1C_5C ) )
1052933   PORT_DIPSETTING(    0x08, DEF_STR( 1C_6C ) )
1053934   PORT_DIPSETTING(    0x00, DEF_STR( 1C_7C ) )
1054   PORT_DIPNAME( 0x22, 0x22, "Max Credits" )
935   PORT_DIPNAME( 0x22, 0x22, "Max Credits" ) PORT_DIPLOCATION("SW1:2,6")
1055936   PORT_DIPSETTING(    0x22, "10" )
1056937   PORT_DIPSETTING(    0x20, "20" )
1057938   PORT_DIPSETTING(    0x02, "30" )
1058939   PORT_DIPSETTING(    0x00, "40" )
1059   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Cabinet ) )
940   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:3")
1060941   PORT_DIPSETTING(    0x04, DEF_STR( Upright ) )
1061942   PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
1062   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Free_Play ) )
943   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW1:5")
1063944   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
1064945   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1065   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_A ) )
946   PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:7,8")
1066947   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_1C ) )
1067948   PORT_DIPSETTING(    0x40, DEF_STR( 1C_2C ) )
1068949   PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) )
1069950   PORT_DIPSETTING(    0x00, DEF_STR( 1C_4C ) )
1070951
1071952   PORT_START("DSW1")   /* DSW B - from "TEST NO.6 - dip switch B" */
1072   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) )
953   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:1")
1073954   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
1074955   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1075   PORT_DIPNAME( 0x02, 0x02, "Stringing Check" )
956   PORT_DIPNAME( 0x02, 0x02, "Stringing Check" ) PORT_DIPLOCATION("SW2:2")
1076957   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
1077958   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1078   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) )
959   PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW2:3" )
960   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:4")
1079961   PORT_DIPSETTING(    0x08, "3" )
1080962   PORT_DIPSETTING(    0x00, "4" )
1081   PORT_DIPNAME( 0xc0, 0x40, DEF_STR( Bonus_Life ) )
963   PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW2:5" )
964   PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW2:6" )
965   PORT_DIPNAME( 0xc0, 0x40, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:7,8")
1082966   PORT_DIPSETTING(    0x40, "30000" )
1083967   PORT_DIPSETTING(    0x80, "60000" )
1084968   PORT_DIPSETTING(    0x00, "90000" )
1085969   PORT_DIPSETTING(    0xc0, DEF_STR( None ) )
1086   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
1087   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
1088   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1089   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
1090   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
1091   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1092   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
1093   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
1094   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1095970
1096971   PORT_START("DSW2")   /* audio board DSW A */
1097   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
1098   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
1099   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1100   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unused ) )
1101   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
1102   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1103   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
1104   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
1105   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1106   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) )
1107   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
1108   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1109   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) )
1110   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
1111   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1112   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
1113   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
1114   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1115   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
1116   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
1117   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1118   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
1119   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
1120   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
972   PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW3:1" )
973   PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW3:2" )
974   PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW3:3" )
975   PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW3:4" )
976   PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW3:5" )
977   PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW3:6" )
978   PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW3:7" )
979   PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW3:8" )
1121980
1122981   PORT_START("DSW3")   /* audio board DSW B */
1123   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) )
1124   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
1125   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1126   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unused ) )
1127   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
1128   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1129   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) )
1130   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
1131   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1132   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unused ) )
1133   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
1134   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1135   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unused ) )
1136   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
1137   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1138   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) )
1139   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
1140   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1141   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) )
1142   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
1143   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1144   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) )
1145   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
1146   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
982   PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW4:1" )
983   PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW4:2" )
984   PORT_DIPUNUSED_DIPLOC( 0x04, 0x04, "SW4:3" )
985   PORT_DIPUNUSED_DIPLOC( 0x08, 0x08, "SW4:4" )
986   PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "SW4:5" )
987   PORT_DIPUNUSED_DIPLOC( 0x20, 0x20, "SW4:6" )
988   PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "SW4:7" )
989   PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW4:8" )
1147990INPUT_PORTS_END
1148991
1149992
r4441r4442
11991042static MACHINE_DRIVER_START( leprechn )
12001043
12011044   MDRV_IMPORT_FROM(gameplan)
1045   MDRV_CPU_REPLACE("maincpu", M6502, LEPRECHAUN_MAIN_CPU_CLOCK)
12021046
12031047   /* basic machine hardware */
12041048   MDRV_CPU_MODIFY("audiocpu")
r4441r4442
13551199GAME( 1981, challeng, 0,        gameplan, challeng, 0, ROT0,   "GamePlan (Centuri license)", "Challenger", GAME_SUPPORTS_SAVE )
13561200GAME( 1981, kaos,     0,        gameplan, kaos,     0, ROT270, "GamePlan", "Kaos", GAME_SUPPORTS_SAVE )
13571201GAME( 1982, leprechn, 0,        leprechn, leprechn, 0, ROT0,   "Tong Electronic", "Leprechaun", GAME_SUPPORTS_SAVE )
1358GAME( 1982, potogold, leprechn, leprechn, leprechn, 0, ROT0,   "GamePlan", "Pot of Gold", GAME_SUPPORTS_SAVE )
1359GAME( 1982, leprechp, leprechn, leprechn, leprechn, 0, ROT0,   "Tong Electronic", "Leprechaun (Pacific Polytechnical license)", GAME_SUPPORTS_SAVE )
1202GAME( 1982, potogold, leprechn, leprechn, potogold, 0, ROT0,   "GamePlan", "Pot of Gold", GAME_SUPPORTS_SAVE )
1203GAME( 1982, leprechp, leprechn, leprechn, potogold, 0, ROT0,   "Tong Electronic", "Leprechaun (Pacific Polytechnical license)", GAME_SUPPORTS_SAVE )
13601204GAME( 1982, piratetr, 0,        leprechn, piratetr, 0, ROT0,   "Tong Electronic", "Pirate Treasure", GAME_SUPPORTS_SAVE )
src/mame/drivers/suprgolf.c
r4441r4442
505505   ROM_LOAD( "cg12.6k",0x00000, 0x10000, CRC(5707b3d5) SHA1(9102a40fefb6426f2cd9d92d66fdc77e078e3f4c) )
506506ROM_END
507507
508GAME( 1989?, suprgolf, 0, suprgolf,  suprgolf,  0, ROT0, "Nasco", "Super Crowns Golf (Japan)", GAME_NOT_WORKING )
509
508GAME( 1989, suprgolf, 0, suprgolf,  suprgolf,  0, ROT0, "Nasco", "Super Crowns Golf (Japan)", GAME_NOT_WORKING )
src/mame/drivers/glass.c
r4441r4442
337337   glass_ROM16_split_gfx(machine, "gfx2", "gfx1", 0x0200000, 0x0200000, 0x0200000, 0x0300000);
338338}
339339
340GAME( 1993, glass,    0,     glass, glass, glass, ROT0, "Gaelco", "Glass (Ver 1.1)",        GAME_UNEMULATED_PROTECTION )
341GAME( 1993, glass10,  glass, glass, glass, glass, ROT0, "Gaelco", "Glass (Ver 1.0, set 1)", GAME_UNEMULATED_PROTECTION )
342GAME( 1993, glass10a, glass, glass, glass, glass, ROT0, "Gaelco", "Glass (Ver 1.0, set 2)", GAME_UNEMULATED_PROTECTION )
340GAME( 1993, glass,    0,     glass, glass, glass, ROT0, "Gaelco", "Glass (Ver 1.1)",        GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
341GAME( 1993, glass10,  glass, glass, glass, glass, ROT0, "Gaelco", "Glass (Ver 1.0, set 1)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
342GAME( 1993, glass10a, glass, glass, glass, glass, ROT0, "Gaelco", "Glass (Ver 1.0, set 2)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
src/mame/drivers/pcxt.c
r4441r4442
1212  version;
1313
1414TODO:
15- 02851: tetriskr: Corrupt game graphics after some time of gameplay, caused by a wrong
16  reading of the i/o $3c8 bit 1.
1517- EGA/CGA/VGA emulation uses the bare minimum for these games,there are still a lot of
1618  features that needs to be added;
1719- Filetto: Add a proper FDC device,if you enable it will give a boot error,probably because it
r4441r4442
10691071   }
10701072}
10711073
1072GAME( 1990, filetto,  0, filetto,  filetto,  filetto,  ROT0,  "Novarmatic", "Filetto (v1.05 901009)",GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS)
1073GAME( 1988?,tetriskr, 0, tetriskr, tetriskr, tetriskr, ROT0,  "bootleg",    "Tetris  (bootleg of Mirrorsoft PC-XT Tetris version)", GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS)
1074GAME( 1990, filetto,  0, filetto,  filetto,  filetto,  ROT0,  "Novarmatic", "Filetto (v1.05 901009)",GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS )
1075GAME( 1988?,tetriskr, 0, tetriskr, tetriskr, tetriskr, ROT0,  "bootleg",    "Tetris (bootleg of Mirrorsoft PC-XT Tetris version)", GAME_NO_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING )
src/mame/drivers/seattle.c
r4441r4442
17591759static INPUT_PORTS_START( seattle_common )
17601760   PORT_START("DIPS")
17611761   PORT_DIPNAME( 0x0001, 0x0001, "Unknown0001" )
1762   PORT_DIPSETTING(      0x0001, DEF_STR( Off ))
1763   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1762   PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
1763   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17641764   PORT_DIPNAME( 0x0002, 0x0002, "Unknown0002" )
1765   PORT_DIPSETTING(      0x0002, DEF_STR( Off ))
1766   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1765   PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
1766   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17671767   PORT_DIPNAME( 0x0004, 0x0004, "Unknown0004" )
1768   PORT_DIPSETTING(      0x0004, DEF_STR( Off ))
1769   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1768   PORT_DIPSETTING(      0x0004, DEF_STR( Off ) )
1769   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17701770   PORT_DIPNAME( 0x0008, 0x0008, "Unknown0008" )
1771   PORT_DIPSETTING(      0x0008, DEF_STR( Off ))
1772   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1771   PORT_DIPSETTING(      0x0008, DEF_STR( Off ) )
1772   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17731773   PORT_DIPNAME( 0x0010, 0x0010, "Unknown0010" )
1774   PORT_DIPSETTING(      0x0010, DEF_STR( Off ))
1775   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1774   PORT_DIPSETTING(      0x0010, DEF_STR( Off ) )
1775   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17761776   PORT_DIPNAME( 0x0020, 0x0020, "Unknown0020" )
1777   PORT_DIPSETTING(      0x0020, DEF_STR( Off ))
1778   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1777   PORT_DIPSETTING(      0x0020, DEF_STR( Off ) )
1778   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17791779   PORT_DIPNAME( 0x0040, 0x0040, "Unknown0040" )
1780   PORT_DIPSETTING(      0x0040, DEF_STR( Off ))
1781   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1780   PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
1781   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17821782   PORT_DIPNAME( 0x0080, 0x0080, "Unknown0080" )
1783   PORT_DIPSETTING(      0x0080, DEF_STR( Off ))
1784   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1783   PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
1784   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17851785   PORT_DIPNAME( 0x0100, 0x0100, "Unknown0100" )
1786   PORT_DIPSETTING(      0x0100, DEF_STR( Off ))
1787   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1786   PORT_DIPSETTING(      0x0100, DEF_STR( Off ) )
1787   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17881788   PORT_DIPNAME( 0x0200, 0x0200, "Unknown0200" )
1789   PORT_DIPSETTING(      0x0200, DEF_STR( Off ))
1790   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1789   PORT_DIPSETTING(      0x0200, DEF_STR( Off ) )
1790   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17911791   PORT_DIPNAME( 0x0400, 0x0400, "Unknown0400" )
1792   PORT_DIPSETTING(      0x0400, DEF_STR( Off ))
1793   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1792   PORT_DIPSETTING(      0x0400, DEF_STR( Off ) )
1793   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17941794   PORT_DIPNAME( 0x0800, 0x0800, "Unknown0800" )
1795   PORT_DIPSETTING(      0x0800, DEF_STR( Off ))
1796   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1795   PORT_DIPSETTING(      0x0800, DEF_STR( Off ) )
1796   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
17971797   PORT_DIPNAME( 0x1000, 0x1000, "Unknown1000" )
1798   PORT_DIPSETTING(      0x1000, DEF_STR( Off ))
1799   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1798   PORT_DIPSETTING(      0x1000, DEF_STR( Off ) )
1799   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
18001800   PORT_DIPNAME( 0x2000, 0x2000, "Unknown2000" )
1801   PORT_DIPSETTING(      0x2000, DEF_STR( Off ))
1802   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1801   PORT_DIPSETTING(      0x2000, DEF_STR( Off ) )
1802   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
18031803   PORT_DIPNAME( 0x4000, 0x4000, "Unknown4000" )
1804   PORT_DIPSETTING(      0x4000, DEF_STR( Off ))
1805   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1804   PORT_DIPSETTING(      0x4000, DEF_STR( Off ) )
1805   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
18061806   PORT_DIPNAME( 0x8000, 0x8000, "Unknown8000" )
1807   PORT_DIPSETTING(      0x8000, DEF_STR( Off ))
1808   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1807   PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
1808   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
18091809
18101810   PORT_START("SYSTEM")
18111811   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 )
r4441r4442
18751875   PORT_MODIFY("DIPS")
18761876   PORT_SERVICE_NO_TOGGLE( 0x0001, IP_ACTIVE_LOW )
18771877   PORT_DIPNAME( 0x0002, 0x0002, "Boot ROM Test" )
1878   PORT_DIPSETTING(      0x0002, DEF_STR( Off ))
1879   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1878   PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
1879   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
18801880INPUT_PORTS_END
18811881
18821882
r4441r4442
18851885
18861886   PORT_MODIFY("DIPS")
18871887   PORT_DIPNAME( 0x0040, 0x0040, "Boot ROM Test" )
1888   PORT_DIPSETTING(      0x0040, DEF_STR( Off ))
1889   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1888   PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
1889   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
18901890   PORT_SERVICE_NO_TOGGLE( 0x0080, IP_ACTIVE_LOW )
18911891   PORT_DIPNAME( 0x8000, 0x0000, "Resolution" )
18921892   PORT_DIPSETTING(      0x8000, DEF_STR( Low ) )
r4441r4442
19001900   PORT_MODIFY("DIPS")
19011901   PORT_SERVICE_NO_TOGGLE( 0x0001, IP_ACTIVE_LOW )
19021902   PORT_DIPNAME( 0x0002, 0x0002, "Boot ROM Test" )
1903   PORT_DIPSETTING(      0x0002, DEF_STR( Off ))
1904   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1903   PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
1904   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
19051905
19061906   PORT_MODIFY("SYSTEM")
1907   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1)   /* reverse */
1907   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON11 ) PORT_NAME(DEF_STR( Reverse )) PORT_PLAYER(1)   /* reverse */
19081908   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
19091909   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START3 )
19101910   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_START4 )
r4441r4442
19121912   PORT_BIT( 0xe000, IP_ACTIVE_LOW, IPT_UNUSED )
19131913
19141914   PORT_MODIFY("IN1")
1915   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)   /* view 1 */
1916   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)   /* view 2 */
1917   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)   /* view 3 */
1918   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2)   /* music */
1919   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)   /* track 1 */
1920   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3)   /* track 2 */
1921   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(3)   /* track 3 */
1922   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(3)   /* track 4 */
1923   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)   /* 1st gear */
1924   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)   /* 2nd gear */
1925   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)   /* 3rd gear */
1926   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1)   /* 4th gear */
1915   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("View 1") PORT_PLAYER(1)   /* view 1 */
1916   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME("View 2") PORT_PLAYER(1)   /* view 2 */
1917   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("View 3") PORT_PLAYER(1)   /* view 3 */
1918   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON12 ) PORT_NAME("Music") PORT_PLAYER(1)   /* music */
1919   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON13 ) PORT_NAME("Track 1") PORT_PLAYER(1)   /* track 1 */
1920   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON14 ) PORT_NAME("Track 2") PORT_PLAYER(1)   /* track 2 */
1921   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON15 ) PORT_NAME("Track 3") PORT_PLAYER(1)   /* track 3 */
1922   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON16 ) PORT_NAME("Track 4") PORT_PLAYER(1)   /* track 4 */
1923   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("1st Gear") PORT_PLAYER(1)   /* 1st gear */
1924   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("2nd Gear") PORT_PLAYER(1)   /* 2nd gear */
1925   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("3rd Gear") PORT_PLAYER(1)   /* 3rd gear */
1926   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("4th Gear") PORT_PLAYER(1)   /* 4th gear */
19271927   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_VOLUME_DOWN )
19281928   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_VOLUME_UP )
19291929   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED )
r4441r4442
19441944   PORT_START("AN3")
19451945   PORT_BIT( 0xff, 0x80, IPT_SPECIAL )
19461946
1947   PORT_START("AN4")
1947   PORT_START("AN4")   /* Accel */
19481948   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(20) PORT_PLAYER(1)
19491949
1950   PORT_START("AN5")
1951   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(100) PORT_PLAYER(2)
1950   PORT_START("AN5")   /* Brake */
1951   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(25) PORT_KEYDELTA(100) PORT_PLAYER(1)
19521952
1953   PORT_START("AN6")
1954   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(100) PORT_PLAYER(3)
1953   PORT_START("AN6")   /* Clutch */
1954   PORT_BIT( 0xff, 0x00, IPT_PEDAL3 ) PORT_SENSITIVITY(25) PORT_KEYDELTA(100) PORT_PLAYER(1)
19551955
1956   PORT_START("AN7")
1956   PORT_START("AN7")   /* Steer */
19571957   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(25) PORT_KEYDELTA(5)
19581958INPUT_PORTS_END
19591959
r4441r4442
19631963
19641964   PORT_MODIFY("DIPS")
19651965   PORT_DIPNAME( 0x0001, 0x0001, "Calibrate at startup" )
1966   PORT_DIPSETTING(      0x0000, DEF_STR( Off ))
1967   PORT_DIPSETTING(      0x0001, DEF_STR( On ))
1966   PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
1967   PORT_DIPSETTING(      0x0001, DEF_STR( On ) )
19681968   PORT_DIPNAME( 0x0002, 0x0002, "Unknown0002" )
1969   PORT_DIPSETTING(      0x0002, DEF_STR( Off ))
1970   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1969   PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
1970   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
19711971   PORT_DIPNAME( 0x0040, 0x0040, "Boot ROM Test" )
1972   PORT_DIPSETTING(      0x0040, DEF_STR( Off ))
1973   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1972   PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
1973   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
19741974   PORT_SERVICE_NO_TOGGLE( 0x0080, IP_ACTIVE_LOW )
19751975INPUT_PORTS_END
19761976
r4441r4442
19801980
19811981   PORT_MODIFY("DIPS")
19821982   PORT_DIPNAME( 0x0040, 0x0040, "Boot ROM Test" )
1983   PORT_DIPSETTING(      0x0040, DEF_STR( Off ))
1984   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
1983   PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
1984   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
19851985   PORT_SERVICE_NO_TOGGLE( 0x0080, IP_ACTIVE_LOW )
19861986
19871987   PORT_MODIFY("SYSTEM")
r4441r4442
19931993
19941994   PORT_MODIFY("IN1")
19951995   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNUSED )
1996   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2)   /* radio */
1996   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("Radio") PORT_PLAYER(1)   /* radio */
19971997   PORT_BIT( 0x000c, IP_ACTIVE_LOW, IPT_UNUSED )
1998   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)   /* road cam */
1999   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)   /* tailgate cam */
2000   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)   /* sky cam */
1998   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("View 1") PORT_PLAYER(1)   /* road cam */
1999   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("View 2") PORT_PLAYER(1)   /* tailgate cam */
2000   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME("View 3") PORT_PLAYER(1)   /* sky cam */
20012001   PORT_BIT( 0x0f80, IP_ACTIVE_LOW, IPT_UNUSED )
2002   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)   /* 1st gear */
2003   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)   /* 2nd gear */
2004   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)   /* 3rd gear */
2005   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1)   /* 4th gear */
2002   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("1st Gear") PORT_PLAYER(1)   /* 1st gear */
2003   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("2nd Gear") PORT_PLAYER(1)   /* 2nd gear */
2004   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("3rd Gear") PORT_PLAYER(1)   /* 3rd gear */
2005   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("4th Gear") PORT_PLAYER(1)   /* 4th gear */
20062006
20072007   PORT_MODIFY("IN2")
20082008   PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
20092009
2010   PORT_START("AN0")
2010   PORT_START("AN0")   /* Steer */
20112011   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(25) PORT_KEYDELTA(5)
20122012
2013   PORT_START("AN1")
2013   PORT_START("AN1")   /* Accel */
20142014   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(20) PORT_PLAYER(1)
20152015
2016   PORT_START("AN2")
2017   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(100) PORT_PLAYER(2)
2016   PORT_START("AN2")   /* Brake */
2017   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(25) PORT_KEYDELTA(100) PORT_PLAYER(1)
20182018
20192019   PORT_START("AN3")
20202020   PORT_BIT( 0xff, 0x80, IPT_SPECIAL )
r4441r4442
20382038
20392039   PORT_MODIFY("DIPS")
20402040   PORT_DIPNAME( 0x0040, 0x0040, "Boot ROM Test" )
2041   PORT_DIPSETTING(      0x0040, DEF_STR( Off ))
2042   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
2041   PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
2042   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
20432043   PORT_SERVICE_NO_TOGGLE( 0x0080, IP_ACTIVE_LOW )
20442044
20452045   PORT_MODIFY("SYSTEM")
r4441r4442
20542054
20552055   PORT_MODIFY("IN1")
20562056   PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_UNUSED )
2057   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)   /* right trigger */
2058   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)   /* left thumb */
2059   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)   /* right thumb */
2057   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CODE(KEYCODE_A) PORT_PLAYER(1)   /* right trigger */
2058   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)                  /* left thumb */
2059   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_S) PORT_PLAYER(1)   /* right thumb */
20602060   PORT_BIT( 0x0180, IP_ACTIVE_LOW, IPT_UNUSED )
2061   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)   /* left view */
2061   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)                  /* left view */
20622062   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED )
2063   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)   /* right view */
2063   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_CODE(KEYCODE_Q) PORT_PLAYER(1)   /* right view */
20642064   PORT_BIT( 0xf000, IP_ACTIVE_LOW, IPT_UNUSED )
20652065
20662066   PORT_MODIFY("IN2")
r4441r4442
20972097
20982098   PORT_MODIFY("DIPS")
20992099   PORT_DIPNAME( 0x0001, 0x0001, "Hilink download??" )
2100   PORT_DIPSETTING(      0x0001, DEF_STR( Off ))
2101   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
2100   PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
2101   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
21022102   PORT_DIPNAME( 0x0002, 0x0002, "Boot ROM Test" )
2103   PORT_DIPSETTING(      0x0002, DEF_STR( Off ))
2104   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
2103   PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
2104   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
21052105
21062106   PORT_MODIFY("IN1")
21072107   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)   /* LP = P1 left punch */
r4441r4442
21732173   PORT_DIPSETTING(      0x0000, DEF_STR( No ))
21742174   PORT_DIPSETTING(      0x4000, DEF_STR( Yes ))
21752175   PORT_DIPNAME( 0x8000, 0x8000, "Test Switch" )
2176   PORT_DIPSETTING(      0x8000, DEF_STR( Off ))
2177   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
2176   PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
2177   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
21782178
21792179   PORT_MODIFY("IN1")
21802180   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
r4441r4442
22982298   PORT_DIPSETTING(      0x0000, DEF_STR( No ))
22992299   PORT_DIPSETTING(      0x4000, DEF_STR( Yes ))
23002300   PORT_DIPNAME( 0x8000, 0x8000, "Test Switch" )
2301   PORT_DIPSETTING(      0x8000, DEF_STR( Off ))
2302   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
2301   PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
2302   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
23032303
23042304   PORT_MODIFY("SYSTEM")
23052305   PORT_BIT( 0x0780, IP_ACTIVE_LOW, IPT_UNUSED )
r4441r4442
23962396   PORT_DIPSETTING(      0x0000, DEF_STR( No ))
23972397   PORT_DIPSETTING(      0x4000, DEF_STR( Yes ))
23982398   PORT_DIPNAME( 0x8000, 0x8000, "Test Switch" )
2399   PORT_DIPSETTING(      0x8000, DEF_STR( Off ))
2400   PORT_DIPSETTING(      0x0000, DEF_STR( On ))
2399   PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
2400   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
24012401
24022402   PORT_MODIFY("IN1")
24032403   PORT_BIT( 0x0003, IP_ACTIVE_LOW, IPT_UNUSED )
24042404   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_2WAY PORT_PLAYER(1)
24052405   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_2WAY PORT_PLAYER(1)
2406   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
2407   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
2408   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
2406   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1)
2407   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
2408   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
24092409   PORT_BIT( 0xff80, IP_ACTIVE_LOW, IPT_UNUSED )
24102410
24112411   PORT_MODIFY("IN2")
r4441r4442
24152415   PORT_BIT( 0x00ff, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(25) PORT_KEYDELTA(25)
24162416   PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
24172417
2418   PORT_START("AN1")
2418   PORT_START("AN1")   /* Accel */
24192419   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(20) PORT_PLAYER(1)
24202420
2421   PORT_START("AN2")
2422   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(100) PORT_PLAYER(2)
2421   PORT_START("AN2")   /* Brake */
2422   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(25) PORT_KEYDELTA(100) PORT_PLAYER(1)
24232423
24242424   PORT_START("AN3")
24252425   PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_MINMAX(0x10,0xf0) PORT_SENSITIVITY(25) PORT_KEYDELTA(25)
src/mame/drivers/munchmo.c
r4441r4442
1   /***************************************************************************
1/***************************************************************************
22  Munch Mobile
33  (C) 1983 SNK
44
r4441r4442
1212    - several unmapped registers
1313    - sustained sounds (when there should be silence)
1414
15
1615Stephh's notes (based on the game Z80 code and some tests) :
1716
1817  - The "Continue after Game Over" Dip Switch (DSW1:1) allows the player
r4441r4442
2221    See code at 0x013a ('joyfulr') or 0x013e ('mnchmobl') for more infos.
2322  - There is extra code at 0x1de2 in 'mnchmobl' but it doesn't seem to be used.
2423
24- DIPs are now verified from Munch Mobile manual and playtesting.
25
2526***************************************************************************/
2627
2728#include "driver.h"
r4441r4442
2930#include "cpu/z80/z80.h"
3031#include "sound/ay8910.h"
3132
32
3333extern UINT8 *mnchmobl_vreg;
3434extern UINT8 *mnchmobl_status_vram;
3535extern UINT8 *mnchmobl_sprite_xpos;
r4441r4442
7171   cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_NMI, CLEAR_LINE);
7272}
7373
74static CUSTOM_INPUT( mnchmobl_bonus_r )
75{
76   int bit_mask = (FPTR)param;
7774
78   switch (bit_mask)
79   {
80      case 0x03:  /* 2nd Bonus Life" Dip Switches (DSW2:1,2) */
81         return ((input_port_read(field->port->machine, "BONUS") & bit_mask) >> 0);
82      case 0x10:  /* "Occurence" Dip Switch (DSW2:7) */
83         return ((input_port_read(field->port->machine, "BONUS") & bit_mask) >> 4);
84      case 0xe0:  /* "1st Bonus Life" Dip Switches (DSW1:6,7,8) */
85         return ((input_port_read(field->port->machine, "BONUS") & bit_mask) >> 5);
86
87      default:
88         logerror("mnchmobl_bonus_r : invalid %02X bit_mask\n",bit_mask);
89         return 0;
90   }
91}
92
93
9475static ADDRESS_MAP_START( mnchmobl_map, ADDRESS_SPACE_PROGRAM, 8 )
9576    AM_RANGE(0x0000, 0x3fff) AM_ROM
9677   AM_RANGE(0x8000, 0x83ff) AM_RAM
r4441r4442
159140   PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
160141
161142   PORT_START("DSW1")
162   PORT_DIPNAME( 0x01, 0x00, "Continue after Game Over (Cheat)" )    /* see notes */
143        /* See notes about this DIP */
144   PORT_DIPNAME( 0x01, 0x00, "Continue after Game Over (Cheat)" ) PORT_DIPLOCATION("SW1:1")
163145   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
164146   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
165   PORT_DIPNAME( 0x1e, 0x00, DEF_STR( Coinage ) )
147
148   PORT_DIPNAME( 0x1e, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:2,3,4,5")
166149   PORT_DIPSETTING(    0x14, DEF_STR( 3C_1C ) )
167150   PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
168151   PORT_DIPSETTING(    0x16, DEF_STR( 3C_2C ) )
169152   PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
170//  PORT_DIPSETTING(    0x1e, DEF_STR( 1C_1C ) )
171//  PORT_DIPSETTING(    0x1c, DEF_STR( 1C_1C ) )
172//  PORT_DIPSETTING(    0x1a, DEF_STR( 1C_1C ) )
173//  PORT_DIPSETTING(    0x18, DEF_STR( 1C_1C ) )
174153   PORT_DIPSETTING(    0x12, DEF_STR( 2C_3C ) )
175154   PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
176155   PORT_DIPSETTING(    0x04, DEF_STR( 1C_3C ) )
r4441r4442
179158   PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )
180159   PORT_DIPSETTING(    0x0c, DEF_STR( 1C_7C ) )
181160   PORT_DIPSETTING(    0x0e, DEF_STR( 1C_8C ) )
182   PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(mnchmobl_bonus_r, (void *)0xe0)
183161
162// Duplicate Settings
163// PORT_DIPSETTING(    0x1e, DEF_STR( 1C_1C ) )
164// PORT_DIPSETTING(    0x1c, DEF_STR( 1C_1C ) )
165// PORT_DIPSETTING(    0x1a, DEF_STR( 1C_1C ) )
166// PORT_DIPSETTING(    0x18, DEF_STR( 1C_1C ) )
167
168   PORT_DIPNAME( 0xe0, 0x00, "1st Bonus" ) PORT_DIPLOCATION("SW1:6,7,8")
169   PORT_DIPSETTING(    0x00, "10000" )
170   PORT_DIPSETTING(    0x20, "20000" )
171   PORT_DIPSETTING(    0x40, "30000" )
172   PORT_DIPSETTING(    0x60, "40000" )
173   PORT_DIPSETTING(    0x80, "50000" )
174   PORT_DIPSETTING(    0xa0, "60000" )
175   PORT_DIPSETTING(    0xc0, "70000" )
176   PORT_DIPSETTING(    0xe0, "No Bonus" )
177
184178   PORT_START("DSW2")
185   PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(mnchmobl_bonus_r, (void *)0x03)
186   PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) )
179   PORT_DIPNAME( 0x03, 0x00, "2nd Bonus (1st+)" ) PORT_DIPLOCATION("SW2:1,2")
180   PORT_DIPSETTING(    0x00, "30000" )
181   PORT_DIPSETTING(    0x01, "40000" )
182   PORT_DIPSETTING(    0x02, "100000" )
183   PORT_DIPSETTING(    0x03, "No Bonus" )
184   PORT_DIPNAME( 0x0c, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:3,4")
187185   PORT_DIPSETTING(    0x00, "1" )
188186   PORT_DIPSETTING(    0x04, "2" )
189187   PORT_DIPSETTING(    0x08, "3" )
190188   PORT_DIPSETTING(    0x0c, "5" )
191   PORT_DIPNAME( 0x10, 0x00, "Freeze" )
192   PORT_DIPSETTING(    0x00, DEF_STR( No ) )
193   PORT_DIPSETTING(    0x10, DEF_STR( Yes ) )
194   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) )
189   PORT_DIPNAME( 0x10, 0x00, "Freeze" ) PORT_DIPLOCATION("SW2:5")
190   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
191   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
192   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:6")
195193   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
196194   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
197   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) )
195   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:7")
198196   PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
199197   PORT_DIPSETTING(    0x40, DEF_STR( Cocktail ) )
200   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(mnchmobl_bonus_r, (void *)0x10)  /* must use unused mask */
201
202   PORT_START("BONUS")  /* fake port to handle bonus lives settings via multiple input ports */
203   PORT_DIPNAME( 0xf3, 0x00, DEF_STR( Bonus_Life ) )
204   PORT_DIPSETTING(    0x10, "10k 40k 30k+" )
205   PORT_DIPSETTING(    0x30, "20k 50k 30k+" )
206   PORT_DIPSETTING(    0x50, "30k 60k 30k+" )
207   PORT_DIPSETTING(    0x70, "40k 70k 30k+" )
208   PORT_DIPSETTING(    0x90, "50k 80k 30k+" )
209   PORT_DIPSETTING(    0xb0, "60k 90k 30k+" )
210   PORT_DIPSETTING(    0xd0, "70k 100k 30k+" )
211   PORT_DIPSETTING(    0x11, "10k 50k 40k+" )
212   PORT_DIPSETTING(    0x31, "20k 60k 40k+" )
213   PORT_DIPSETTING(    0x51, "30k 70k 40k+" )
214   PORT_DIPSETTING(    0x71, "40k 80k 40k+" )
215   PORT_DIPSETTING(    0x91, "50k 80k 40k+" )
216   PORT_DIPSETTING(    0xb1, "60k 100k 40k+" )
217   PORT_DIPSETTING(    0xd1, "70k 100k 40k+" )
218   PORT_DIPSETTING(    0x12, "10k 110k 100k+" )
219   PORT_DIPSETTING(    0x32, "20k 120k 100k+" )
220   PORT_DIPSETTING(    0x52, "30k 130k 100k+" )
221   PORT_DIPSETTING(    0x72, "40k 140k 100k+" )
222   PORT_DIPSETTING(    0x92, "50k 150k 100k+" )
223   PORT_DIPSETTING(    0xb2, "60k 160k 100k+" )
224   PORT_DIPSETTING(    0xd2, "70k 170k 100k+" )
225   PORT_DIPSETTING(    0x00, "10k 40k" )
226   PORT_DIPSETTING(    0x20, "20k 50k" )
227   PORT_DIPSETTING(    0x40, "30k 60k" )
228   PORT_DIPSETTING(    0x60, "40k 70k" )
229   PORT_DIPSETTING(    0x80, "50k 80k" )
230   PORT_DIPSETTING(    0xa0, "60k 90k" )
231   PORT_DIPSETTING(    0xc0, "70k 100k" )
232   PORT_DIPSETTING(    0x01, "10k 50k" )
233   PORT_DIPSETTING(    0x21, "20k 60k" )
234   PORT_DIPSETTING(    0x41, "30k 70k" )
235   PORT_DIPSETTING(    0x61, "40k 80k" )
236   PORT_DIPSETTING(    0x81, "50k 80k" )
237   PORT_DIPSETTING(    0xa1, "60k 100k" )
238   PORT_DIPSETTING(    0xc1, "70k 100k" )
239   PORT_DIPSETTING(    0x02, "10k 110k" )
240   PORT_DIPSETTING(    0x22, "20k 120k" )
241   PORT_DIPSETTING(    0x42, "30k 130k" )
242   PORT_DIPSETTING(    0x62, "40k 140k" )
243   PORT_DIPSETTING(    0x82, "50k 150k" )
244   PORT_DIPSETTING(    0xa2, "60k 160k" )
245   PORT_DIPSETTING(    0xc2, "70k 170k" )
246//  PORT_DIPSETTING(    0x13, "10k" )                       /* duplicated setting */
247//  PORT_DIPSETTING(    0x33, "20k" )                       /* duplicated setting */
248//  PORT_DIPSETTING(    0x53, "30k" )                       /* duplicated setting */
249//  PORT_DIPSETTING(    0x73, "40k" )                       /* duplicated setting */
250//  PORT_DIPSETTING(    0x93, "50k" )                       /* duplicated setting */
251//  PORT_DIPSETTING(    0xb3, "60k" )                       /* duplicated setting */
252//  PORT_DIPSETTING(    0xd3, "70k" )                       /* duplicated setting */
253   PORT_DIPSETTING(    0x03, "10k" )
254   PORT_DIPSETTING(    0x23, "20k" )
255   PORT_DIPSETTING(    0x43, "30k" )
256   PORT_DIPSETTING(    0x63, "40k" )
257   PORT_DIPSETTING(    0x83, "50k" )
258   PORT_DIPSETTING(    0xa3, "60k" )
259   PORT_DIPSETTING(    0xc3, "70k" )
260//  PORT_DIPSETTING(    0xf0, DEF_STR( None ) )             /* duplicated setting */
261//  PORT_DIPSETTING(    0xf1, DEF_STR( None ) )             /* duplicated setting */
262//  PORT_DIPSETTING(    0xf2, DEF_STR( None ) )             /* duplicated setting */
263//  PORT_DIPSETTING(    0xf3, DEF_STR( None ) )             /* duplicated setting */
264//  PORT_DIPSETTING(    0xe1, DEF_STR( None ) )             /* duplicated setting */
265//  PORT_DIPSETTING(    0xe2, DEF_STR( None ) )             /* duplicated setting */
266//  PORT_DIPSETTING(    0xe3, DEF_STR( None ) )             /* duplicated setting */
267   PORT_DIPSETTING(    0xe0, DEF_STR( None ) )
198   PORT_DIPNAME( 0x80, 0x00, "Additional Bonus (2nd Bonus Value)" ) PORT_DIPLOCATION("SW2:8")
199   PORT_DIPSETTING(    0x00, DEF_STR( No ) )
200   PORT_DIPSETTING(    0x80, DEF_STR( Yes ) )
268201INPUT_PORTS_END
269202
270203static const gfx_layout char_layout =
r4441r4442
339272static MACHINE_DRIVER_START( mnchmobl )
340273
341274   /* basic machine hardware */
342   MDRV_CPU_ADD("maincpu", Z80, 3750000) /* ? */
275   MDRV_CPU_ADD("maincpu", Z80, XTAL_15MHz/4) /* ? */
343276   MDRV_CPU_PROGRAM_MAP(mnchmobl_map,0)
344277   MDRV_CPU_VBLANK_INT_HACK(mnchmobl_interrupt,2)
345278
346   MDRV_CPU_ADD("audiocpu", Z80, 3750000) /* ? */
279   MDRV_CPU_ADD("audiocpu", Z80, XTAL_15MHz/4) /* ? */
347280   MDRV_CPU_PROGRAM_MAP(sound_map,0)
348281   MDRV_CPU_VBLANK_INT("screen", nmi_line_assert)
349282
r4441r4442
365298   /* sound hardware */
366299   MDRV_SPEAKER_STANDARD_MONO("mono")
367300
368   MDRV_SOUND_ADD("ay1", AY8910, 1500000)
301        /* AY clock speeds confirmed to match known recording */
302   MDRV_SOUND_ADD("ay1", AY8910, XTAL_15MHz/4/2)
369303   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
370304
371   MDRV_SOUND_ADD("ay2", AY8910, 1500000)
305   MDRV_SOUND_ADD("ay2", AY8910, XTAL_15MHz/4/2)
372306   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
373307MACHINE_DRIVER_END
374308
src/mame/drivers/wgp.c
r4441r4442
12311231
12321232/* Working Games with some graphics problems - e.g. missing rotation */
12331233
1234GAME( 1989, wgp,      0,      wgp,    wgp,    wgp,    ROT0, "Taito America Corporation", "World Grand Prix (US)", GAME_IMPERFECT_GRAPHICS )
1235GAME( 1989, wgpj,     wgp,    wgp,    wgpj,   wgp,    ROT0, "Taito Corporation", "World Grand Prix (Japan)", GAME_IMPERFECT_GRAPHICS )
1236GAME( 1989, wgpjoy,   wgp,    wgp,    wgpjoy, wgp,    ROT0, "Taito Corporation", "World Grand Prix (joystick version) (Japan, set 1)", GAME_IMPERFECT_GRAPHICS )
1237GAME( 1989, wgpjoya,  wgp,    wgp,    wgpjoy, wgp,    ROT0, "Taito Corporation", "World Grand Prix (joystick version) (Japan, set 2)", GAME_IMPERFECT_GRAPHICS )
1238GAME( 1990, wgp2,     wgp,    wgp2,   wgp2,   wgp2,   ROT0, "Taito Corporation", "World Grand Prix 2 (Japan)", GAME_IMPERFECT_GRAPHICS )
1234GAME( 1989, wgp,      0,      wgp,    wgp,    wgp,    ROT0, "Taito America Corporation", "World Grand Prix (US)", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING )
1235GAME( 1989, wgpj,     wgp,    wgp,    wgpj,   wgp,    ROT0, "Taito Corporation", "World Grand Prix (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING )
1236GAME( 1989, wgpjoy,   wgp,    wgp,    wgpjoy, wgp,    ROT0, "Taito Corporation", "World Grand Prix (joystick version) (Japan, set 1)", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING )
1237GAME( 1989, wgpjoya,  wgp,    wgp,    wgpjoy, wgp,    ROT0, "Taito Corporation", "World Grand Prix (joystick version) (Japan, set 2)", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING )
1238GAME( 1990, wgp2,     wgp,    wgp2,   wgp2,   wgp2,   ROT0, "Taito Corporation", "World Grand Prix 2 (Japan)", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING )
12391239
src/mame/drivers/midvunit.c
r4441r4442
562562   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 )
563563   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_VOLUME_DOWN )
564564   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_VOLUME_UP )
565   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON5 )   /* 4th */
566   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON4 )   /* 3rd */
567   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON3 )   /* 2nd */
568   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 )   /* 1st */
565   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("4th Gear")   /* 4th */
566   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("3rd Gear")   /* 3rd */
567   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("2nd Gear")   /* 2nd */
568   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("1st Gear")   /* 1st */
569569   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_COIN4 )
570570   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
571571
572572   PORT_START("IN1")
573573   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
574   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON6 )   /* radio */
574   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Radio")   /* radio */
575575   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
576576   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
577   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)   /* view 1 */
578   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)   /* view 2 */
579   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)   /* view 3 */
580   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2)   /* view 4 */
577   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("View 1")   /* view 1 */
578   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME("View 2")   /* view 2 */
579   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("View 3")   /* view 3 */
580   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON11 ) PORT_NAME("View 4")   /* view 4 */
581581   PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
582582
583583   PORT_START("DSW")
r4441r4442
694694   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 )
695695   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_VOLUME_DOWN )
696696   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_VOLUME_UP )
697   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON5 )   /* 4th */
698   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON4 )   /* 3rd */
699   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON3 )   /* 2nd */
700   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 )   /* 1st */
697   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("4th Gear")   /* 4th */
698   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("3rd Gear")   /* 3rd */
699   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("2nd Gear")   /* 2nd */
700   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("1st Gear")   /* 1st */
701701   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_COIN4 )
702702   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
703703
704704   PORT_START("IN1")
705705   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
706   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON6 )   /* radio */
706   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Radio")   /* radio */
707707   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
708708   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
709   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)   /* view 1 */
710   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)   /* view 2 */
711   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)   /* view 3 */
712   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2)   /* view 4 */
709   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("View 1")   /* view 1 */
710   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME("View 2")   /* view 2 */
711   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("View 3")   /* view 3 */
712   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON11 ) PORT_NAME("View 4")   /* view 4 */
713713   PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
714714
715715   PORT_START("DSW")
r4441r4442
823823   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN3 )
824824   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_VOLUME_DOWN )
825825   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_VOLUME_UP )
826   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON5 )   /* 4th */
827   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON4 )   /* 3rd */
828   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON3 )   /* 2nd */
829   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 )   /* 1st */
826   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("4th Gear")   /* 4th */
827   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("3rd Gear")   /* 3rd */
828   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("2nd Gear")   /* 2nd */
829   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("1st Gear")   /* 1st */
830830   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_COIN4 )
831831   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
832832
833833   PORT_START("IN1")
834834   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN )
835   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON6 )   /* radio */
835   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Radio")   /* radio */
836836   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN )
837837   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN )
838   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)   /* view 1 */
839   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)   /* view 2 */
840   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)   /* view 3 */
841   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2)   /* view 4 */
838   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("View 1")   /* view 1 */
839   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME("View 2")   /* view 2 */
840   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("View 3")   /* view 3 */
841   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON11 ) PORT_NAME("View 4")   /* view 4 */
842842   PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
843843
844844   PORT_START("DSW")
src/mame/drivers/opwolf.c
r4441r4442
727727   ROM_LOAD( "b20-08.21",  0x00000, 0x80000, CRC(f3e19c64) SHA1(39d48645f776c9c2ade537d959ecc6f9dc6dfa1b) )
728728ROM_END
729729
730ROM_START( opwolfj )
731   ROM_REGION( 0x40000, "maincpu", 0 )     /* 256k for 68000 code */
732   ROM_LOAD16_BYTE( "b20-05-02.40",  0x00000, 0x10000, CRC(3ffbfe3a) SHA1(e41257e6af18bab4e36267a0c25a6aaa742972d2) )
733   ROM_LOAD16_BYTE( "b20-03-02.30",  0x00001, 0x10000, CRC(fdabd8a5) SHA1(866ec6168489024b8d157f2d5b1553d7f6e3d9b7) )
734   ROM_LOAD16_BYTE( "b20-04.39",     0x20000, 0x10000, CRC(216b4838) SHA1(2851cae00bb3e32e20f35fdab8ed6f149e658363) )
735   ROM_LOAD16_BYTE( "b20-18.29",     0x20001, 0x10000, CRC(fd202470) SHA1(3108c14953d2f50d861946e9f646813b7050b58a) )
730736
737   ROM_REGION( 0x20000, "audiocpu", 0 )      /* sound cpu */
738   ROM_LOAD( "b20-07.10",  0x00000, 0x04000, CRC(45c7ace3) SHA1(06f7393f6b973b7735c27e8380cb4148650cfc16) )
739   ROM_CONTINUE(           0x10000, 0x0c000 ) /* banked stuff */
740
741   ROM_REGION( 0x80000, "gfx1", ROMREGION_DISPOSE )
742   ROM_LOAD( "b20-13.13",  0x00000, 0x80000, CRC(f6acdab1) SHA1(716b94ab3fa330ecf22df576f6a9f47a49c7554a) )   /* SCR tiles (8 x 8) */
743
744   ROM_REGION( 0x80000, "gfx2", ROMREGION_DISPOSE )
745   ROM_LOAD( "b20-14.72",  0x00000, 0x80000, CRC(89f889e5) SHA1(1592f6ce4fbb75e33d6ab957e5b90242a7a7a8c4) )   /* Sprites (16 x 16) */
746
747   ROM_REGION( 0x80000, "adpcm", 0 )   /* ADPCM samples */
748   ROM_LOAD( "b20-08.21",  0x00000, 0x80000, CRC(f3e19c64) SHA1(39d48645f776c9c2ade537d959ecc6f9dc6dfa1b) )
749ROM_END
750
731751ROM_START( opwolfu ) /* Taito TC0030 C-Chip labeled B20-18 (yes, it has a specific label on it) */
732752   ROM_REGION( 0x40000, "maincpu", 0 )     /* 256k for 68000 code */
733753   ROM_LOAD16_BYTE( "b20-05-02.40",  0x00000, 0x10000, CRC(3ffbfe3a) SHA1(e41257e6af18bab4e36267a0c25a6aaa742972d2) )
r4441r4442
828848/*    year  rom       parent    machine   inp       init */
829849GAME( 1987, opwolf,   0,        opwolf,   opwolf,   opwolf,   ROT0, "Taito Corporation Japan", "Operation Wolf (World, set 1)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
830850GAME( 1987, opwolfa,  opwolf,   opwolf,   opwolf,   opwolf,   ROT0, "Taito Corporation Japan", "Operation Wolf (World, set 2)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
851GAME( 1987, opwolfj,  opwolf,   opwolf,   opwolf,   opwolf,   ROT0, "Taito Corporation", "Operation Wolf (Japan)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
831852GAME( 1987, opwolfu,  opwolf,   opwolf,   opwolfu,  opwolf,   ROT0, "Taito America Corporation", "Operation Wolf (US)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
832853GAME( 1987, opwolfb,  opwolf,   opwolfb,  opwolfb,  opwolfb,  ROT0, "[Taito] (Bear Corporation Korea bootleg)", "Operation Bear (bootleg of Operation Wolf)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
src/mame/drivers/suna16.c
r4441r4442
10351035
10361036   /* video hardware */
10371037   MDRV_SCREEN_ADD("screen", RASTER)
1038   MDRV_SCREEN_REFRESH_RATE(60)
1038   MDRV_SCREEN_REFRESH_RATE(59.1734)    // measured on pcb (15.6218kHz HSync)
10391039   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
10401040   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
10411041   MDRV_SCREEN_SIZE(256, 256)
r4441r4442
12691269      6116     - 2kx8 SRAM
12701270      62256    - 32kx8 SRAM
12711271      CN1      - Connector for extra controls
1272      VSync    - 60Hz
1273      HSync    - 15.68kHz
1274
12751272      ROMs 7-18 located on a plug-in daughterboard
12761273      Both PROMs are identical
12771274
1275      Measurements
1276      ------------
1277      XTAL  - 23.99463MHz
1278      VSync - 59.1734Hz
1279      HSync - 15.6218kHz
1280
12781281***************************************************************************/
12791282
12801283ROM_START( bestbest )
src/mame/drivers/eolith.c
r4441r4442
3535 - Fortress 2 Blue Arcade (v. 1.01 / pcb ver 3.05)
3636 - Fortress 2 Blue Arcade (v. 1.00 / pcb ver 3.05)
3737 - Puzzle King (Dance & Puzzle)
38 - Iron Fortress
3839
3940 Known games not dumped
4041 - Hidden Catch (pcb ver 3.02)
r4441r4442
4243 - Ribbon (Step1. Mild Mind) (c) 1999
4344
4445 TODO:
45 - emulate Hidden Catch 3 touch screen (which has force feedback as well)
4646 - sound & sound cpu
4747
4848 Original Bugs:
r4441r4442
121121   // bit 0x100 and 0x040 ?
122122}
123123
124static READ32_HANDLER( hidctch3_pen1_r )
125{
126   //320 x 240
127   int xpos = input_port_read(space->machine, "PEN_X_P1");
128   int ypos = input_port_read(space->machine, "PEN_Y_P1");
124129
130   return xpos + (ypos*168*2);
131}
125132
133static READ32_HANDLER( hidctch3_pen2_r )
134{
135   //320 x 240
136   int xpos = input_port_read(space->machine, "PEN_X_P2");
137   int ypos = input_port_read(space->machine, "PEN_Y_P2");
126138
139   return xpos + (ypos*168*2);
140}
127141
128142static ADDRESS_MAP_START( eolith_map, ADDRESS_SPACE_PROGRAM, 32 )
129143   AM_RANGE(0x00000000, 0x001fffff) AM_RAM // fort2b wants ram here
r4441r4442
134148   AM_RANGE(0xfc800000, 0xfc800003) AM_WRITENOP // sound latch
135149   AM_RANGE(0xfca00000, 0xfca00003) AM_READ_PORT("DSW1")
136150   AM_RANGE(0xfcc00000, 0xfcc0005b) AM_WRITENOP // crt registers ?
137
138   // hidden catch 3 touch screen inputs
139   AM_RANGE(0xfce00000, 0xfce00003) AM_READNOP
140   AM_RANGE(0xfce80000, 0xfce80003) AM_READNOP
141   AM_RANGE(0xfcf00000, 0xfcf00003) AM_READNOP
142   AM_RANGE(0xfcf80000, 0xfcf80003) AM_READNOP
143
144151   AM_RANGE(0xfd000000, 0xfeffffff) AM_ROM AM_REGION("user1", 0)
145152   AM_RANGE(0xfff80000, 0xffffffff) AM_ROM AM_REGION("cpu", 0)
146153ADDRESS_MAP_END
r4441r4442
180187   PORT_BIT( 0xffffffff, IP_ACTIVE_LOW, IPT_UNUSED   )
181188INPUT_PORTS_END
182189
190static INPUT_PORTS_START( ironfort )
191   PORT_START("IN0")
192   PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_START1 )
193   PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_START2 )
194   PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_UNUSED )
195   PORT_BIT( 0x00000008, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(eeprom_bit_r, NULL) // eeprom bit
196   PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_COIN1 )
197   PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_UNUSED )
198   PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(eolith_speedup_getvblank, NULL)
199   PORT_BIT( 0x00003f80, IP_ACTIVE_LOW, IPT_UNUSED )
200   PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_UNUSED )
201   PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_UNUSED )
202   PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP   ) PORT_8WAY PORT_PLAYER(1)
203   PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN   ) PORT_8WAY PORT_PLAYER(1)
204   PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT   ) PORT_8WAY PORT_PLAYER(1)
205   PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT   ) PORT_8WAY PORT_PLAYER(1)
206   PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
207   PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
208   PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_UNUSED )
209   PORT_BIT( 0x00800000, IP_ACTIVE_LOW, IPT_UNUSED )
210   PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_JOYSTICK_UP   ) PORT_8WAY PORT_PLAYER(2)
211   PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN   ) PORT_8WAY PORT_PLAYER(2)
212   PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT   ) PORT_8WAY PORT_PLAYER(2)
213   PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT   ) PORT_8WAY PORT_PLAYER(2)
214   PORT_BIT( 0x10000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
215   PORT_BIT( 0x20000000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
216   PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_UNUSED )
217   PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_UNUSED )
218
219   PORT_START("DSW1")
220   PORT_DIPNAME( 0x00000001, 0x00000001, "Show Dip-switch Information" )
221   PORT_DIPSETTING(          0x00000001, DEF_STR( Off ) )
222   PORT_DIPSETTING(          0x00000000, DEF_STR( On ) )
223   PORT_DIPNAME( 0x00000002, 0x00000000, DEF_STR( Demo_Sounds ) )
224   PORT_DIPSETTING(          0x00000002, DEF_STR( Off ) )
225   PORT_DIPSETTING(          0x00000000, DEF_STR( On ) )
226   PORT_DIPNAME( 0x0000000c, 0x0000000c, DEF_STR( Lives ) )
227   PORT_DIPSETTING(          0x00000008, "1" )
228   PORT_DIPSETTING(          0x00000004, "2" )
229   PORT_DIPSETTING(          0x0000000c, "3" )
230   PORT_DIPSETTING(          0x00000000, "4" )
231   PORT_DIPNAME( 0x00000030, 0x00000030, DEF_STR( Coinage ) )
232   PORT_DIPSETTING(          0x00000010, DEF_STR( 3C_1C ) )
233   PORT_DIPSETTING(          0x00000020, DEF_STR( 2C_1C ) )
234   PORT_DIPSETTING(          0x00000030, DEF_STR( 1C_1C ) )
235   PORT_DIPSETTING(          0x00000000, DEF_STR( Free_Play ) )
236   PORT_DIPNAME( 0x000000c0, 0x000000c0, DEF_STR( Difficulty ) )
237   PORT_DIPSETTING(          0x00000000, DEF_STR( Very_Hard ) )
238   PORT_DIPSETTING(          0x00000040, DEF_STR( Hard ) )
239   PORT_DIPSETTING(          0x000000c0, DEF_STR( Normal ) )
240   PORT_DIPSETTING(          0x00000080, DEF_STR( Easy ) )
241   PORT_BIT( 0xffffff00, IP_ACTIVE_LOW, IPT_UNUSED   )
242INPUT_PORTS_END
243
183244static INPUT_PORTS_START( hidnctch )
184245   PORT_INCLUDE(common)
185246   PORT_MODIFY("IN0")
r4441r4442
207268   PORT_DIPSETTING(          0x00000000, DEF_STR( On ) )
208269   PORT_BIT( 0xfffffffe, IP_ACTIVE_LOW, IPT_UNUSED   )
209270
210   // missing touch screen / pen inputs
271   PORT_START("PEN_X_P1")
272   PORT_BIT( 0xffff, 0, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_MINMAX(0,159) PORT_SENSITIVITY(25) PORT_KEYDELTA(1) PORT_PLAYER(1)
273
274   PORT_START("PEN_Y_P1")
275   PORT_BIT( 0xffff, 0, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_MINMAX(0,119) PORT_SENSITIVITY(25) PORT_KEYDELTA(1) PORT_PLAYER(1)
276
277   PORT_START("PEN_X_P2")
278   PORT_BIT( 0xffff, 0, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_MINMAX(0,159) PORT_SENSITIVITY(25) PORT_KEYDELTA(1) PORT_PLAYER(2)
279
280   PORT_START("PEN_Y_P2")
281   PORT_BIT( 0xffff, 0, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_MINMAX(0,119) PORT_SENSITIVITY(25) PORT_KEYDELTA(1) PORT_PLAYER(2)
211282INPUT_PORTS_END
212283
213284static INPUT_PORTS_START( raccoon )
r4441r4442
287358   MDRV_CPU_REPLACE("cpu", E132N, 50000000)       /* 50 MHz */
288359MACHINE_DRIVER_END
289360
361static MACHINE_DRIVER_START( ironfort )
362   MDRV_IMPORT_FROM(eolith45)
363   MDRV_CPU_REPLACE("cpu", E132N, 44900000) /* Normaly 45MHz??? but PCB actually had a 44.9MHz OSC, so it's value is used */
364MACHINE_DRIVER_END
365
366
367
368/*
369
370Iron Fortress
371Eolith, 1998
372
373This game runs on hardware that looks exactly like the Gradation 2D PCB
374but there's no text or labelling on the PCB to say that. However, it is
375an original Eolith PCB.
376
377Printed on the back of the pcb is "9752 12-133"
378
379PCB Layout
380----------
381
382(No PCB number)
383|-------------------------------------------------|
384|            VOL    KM6161002 KM6161002  IS61C1024|
385|            VOL                                  |
386|                   KM6161002 KM6161002  IS61C1024|
387|     24MHz       QS1001A  DSW4 DSW3              |
388|          QS1000                        IS61C1024|
389|            U107   U97  EV0514-001               |
390|J                                       IC61C1024|
391|A                     14.31818MHz                |
392|M                                    E1-32N      |
393|M                                                |
394|A     93C66                        44.9MHz       |
395|                                                 |
396|                                                 |
397|            GMS80C301                            |
398|       12MHz                                     |
399|                                                 |
400|             U108    U41*  U39   U36*  U34       |
401|        U111      U42*  U40   U37*  U35    U43   |
402|                                                 |
403|-------------------------------------------------|
404Notes:
405      E1-32N       - Hyperstone E1-32N CPU, clock 44.900MHz (QFP160)
406      80C301 clock - 12.000MHz
407      IS61C1024    - ISSI 128k x4 High Speed CMOS Static RAM (SOJ32)
408      KM6161002    - Samsung 64k x4 Ultra High Speed CMOS Video Static RAM (SOJ44)
409      QS1000       - QDSP QS1000 AdMOS 9638R, Wavetable Audio chip, clock input of 24.000MHz (QFP100)
410                     see http://www.hwass.co.kr/product.htm for more info on QS100x chips.
411      QS1001A      - QDSP QS1001A 512k x8 MaskROM (SOP32)
412      EV0514-001   - Custom Eolith IC (QFP100)
413      VSync        - 60Hz
414      HSync        - 15.64kHz
415
416      DSW4 & DSW3 are 4 switch dipswitches
417
418      U107, U97, U111, U108 & U43 are populated with EPROMs and are not labeled in any way
419      U34 - U42 are C32000 MASK roms read as 27C322 those marked with '*' are unpopulated
420
421      qs1001a.u96 was not dumped from this PCB, but is a standard sample rom found on many Eolith gradation PCBs
422*/
423
424ROM_START( ironfort )
425   ROM_REGION( 0x80000, "cpu", 0 ) /* Hyperstone CPU Code */
426   ROM_LOAD( "u43", 0x00000, 0x80000, CRC(29f55825) SHA1(e048ec0f5d83d4b64aa48d706fa0947afcdc1a3d) ) /* 27C040 eprom with no label */
427
428   ROM_REGION32_BE( 0x2000000, "user1", ROMREGION_ERASE00 ) /* Game Data - banked ROM, swapping necessary */
429   ROM_LOAD32_WORD_SWAP( "if00-00.u39", 0x0000000, 0x400000, CRC(63b74601) SHA1(c111ecf55359e9005a3ec1fe1202a34624f8b242) )
430   ROM_LOAD32_WORD_SWAP( "if00-01.u34", 0x0000002, 0x400000, CRC(890470b3) SHA1(57df122ab01744b47ebd38554eb6a7d780977be2) )
431   ROM_LOAD32_WORD_SWAP( "if00-02.u40", 0x0800000, 0x400000, CRC(63b5cca5) SHA1(4ec8b813c7e465f659a4a2361ddfbad763bf6e6a) )
432   ROM_LOAD32_WORD_SWAP( "if00-03.u35", 0x0800002, 0x400000, CRC(54a76cb5) SHA1(21fb3bedf065079d59f642b19487f76590f97558) )
433
434   ROM_REGION( 0x008000, "cpu1", 0 ) /* QDSP ('51) Code */
435   ROM_LOAD( "u107", 0x0000, 0x8000, CRC(89450a2f) SHA1(d58efa805f497bec179fdbfb8c5860ac5438b4ec) ) /* 27C256 eprom with no label */
436
437   ROM_REGION( 0x08000, "cpu2", 0 ) /* Sound (80c301) CPU Code */
438   ROM_LOAD( "u111", 0x0000, 0x8000, CRC(5d1d1387) SHA1(91c8aa4c7472b91c149bef9da64569a97df35298) ) /* 27C256 eprom with no label */
439
440   ROM_REGION( 0x080000, "music", 0 ) /* Music data */
441   ROM_LOAD( "u108", 0x00000, 0x80000, CRC(89233144) SHA1(74e87679a7559450934b80fcfcb667d9845977a7) ) /* 27C040 eprom with no label */
442
443   ROM_REGION( 0x080000, "sfx", 0 ) /* QDSP samples (SFX) */
444   ROM_LOAD( "u97", 0x00000, 0x80000, CRC(47b9d43a) SHA1(e0bc42892480cb563dc694fcefa8ca0b984749dd) ) /* 27C040 eprom with no label */
445
446   ROM_REGION( 0x080000, "wavetable", 0 ) /* QDSP wavetable rom */
447   ROM_LOAD( "qs1001a.u96",  0x000000, 0x80000, CRC(d13c6407) SHA1(57b14f97c7d4f9b5d9745d3571a0b7115fbe3176) )
448ROM_END
449
290450/* Hidden Catch */
291451
292452ROM_START( hidnctch )
r4441r4442
8711031   init_eolith_speedup(machine);
8721032}
8731033
1034static DRIVER_INIT( hidctch3 )
1035{
1036   memory_install_write32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xfc200000, 0xfc200003, 0, 0, SMH_NOP); // this generates pens vibration
1037
1038   // It is not clear why the first reads are needed too
1039
1040   memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xfce00000, 0xfce00003, 0, 0, hidctch3_pen1_r);
1041   memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xfce80000, 0xfce80003, 0, 0, hidctch3_pen1_r);
1042
1043   memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xfcf00000, 0xfcf00003, 0, 0, hidctch3_pen2_r);
1044   memory_install_read32_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xfcf80000, 0xfcf80003, 0, 0, hidctch3_pen2_r);
1045
1046   init_eolith_speedup(machine);
1047}
1048
1049GAME( 1998, ironfort, 0,       ironfort, ironfort, eolith,   ROT0, "Eolith", "Iron Fortress", GAME_NO_SOUND )
8741050GAME( 1998, hidnctch, 0,       eolith45, hidnctch, eolith,   ROT0, "Eolith", "Hidden Catch (World) / Tul Lin Gu Lim Chat Ki '98 (Korea) (pcb ver 3.03)",  GAME_NO_SOUND ) // or Teurrin Geurim Chajgi '98
8751051GAME( 1998, raccoon,  0,       eolith45, raccoon,  eolith,   ROT0, "Eolith", "Raccoon World", GAME_NO_SOUND )
8761052GAME( 1998, puzzlekg, 0,       eolith45, puzzlekg, eolith,   ROT0, "Eolith", "Puzzle King (Dance & Puzzle)",  GAME_NO_SOUND )
r4441r4442
8781054GAME( 1999, landbrk,  0,       eolith45, landbrk,  landbrk,  ROT0, "Eolith", "Land Breaker (World) / Miss Tang Ja Ru Gi (Korea) (pcb ver 3.02)",  GAME_NO_SOUND ) // or Miss Ttang Jjareugi
8791055GAME( 1999, landbrka, landbrk, eolith45, landbrk,  landbrka, ROT0, "Eolith", "Land Breaker (World) / Miss Tang Ja Ru Gi (Korea) (pcb ver 3.03)",  GAME_NO_SOUND ) // or Miss Ttang Jjareugi
8801056GAME( 1999, nhidctch, 0,       eolith45, hidnctch, eolith,   ROT0, "Eolith", "New Hidden Catch (World) / New Tul Lin Gu Lim Chat Ki '98 (Korea) (pcb ver 3.02)", GAME_NO_SOUND ) // or New Teurrin Geurim Chajgi '98
881GAME( 2000, hidctch3, 0,       eolith50, hidctch3, eolith,   ROT0, "Eolith", "Hidden Catch 3 (ver 1.00 / pcb ver 3.05)", GAME_NO_SOUND | GAME_NOT_WORKING )
1057GAME( 2000, hidctch3, 0,       eolith50, hidctch3, hidctch3, ROT0, "Eolith", "Hidden Catch 3 (ver 1.00 / pcb ver 3.05)", GAME_NO_SOUND )
8821058GAME( 2001, fort2b,   0,       eolith50, common,   eolith,   ROT0, "Eolith", "Fortress 2 Blue Arcade (ver 1.01 / pcb ver 3.05)",  GAME_NO_SOUND )
8831059GAME( 2001, fort2ba,  fort2b,  eolith50, common,   eolith,   ROT0, "Eolith", "Fortress 2 Blue Arcade (ver 1.00 / pcb ver 3.05)",  GAME_NO_SOUND )
src/mame/drivers/cubocd32.c
r4441r4442
11/* Cubo CD32 (Original hardware by Commodore, additional hardware and games by CD Express, Milan, Italy)
22
3   Preliminary driver by Mariusz Wojcieszek
4   CD-ROM controller by Ernesto Corvi
5
36   This is basically a CD32 (Amiga 68020, AGA based games system) hacked up to run arcade games.
47   see http://ninjaw.ifrance.com/cd32/cubo/ for a brief overview.
58
r4441r4442
2124
2225
2326   ToDo:
27      Inputs
2428
25   Everything - This is a skeleton driver.
26      Add full AGA (68020 based systems, Amiga 1200 / CD32) support to Amiga driver
27      Add CD Controller emulation for CD32.
28      ... work from there
2929
30
3130   Known Games:
3231   Title                | rev. | year
3332   ----------------------------------------------
r4441r4442
5150#include "includes/cubocd32.h"
5251#include "machine/6526cia.h"
5352
53static void handle_cd32_joystick_cia(UINT8 pra, UINT8 dra);
54
5455static WRITE32_HANDLER( aga_overlay_w )
5556{
5657   if (ACCESSING_BITS_16_23)
r4441r4442
9293
9394   /* bit 2 = Power Led on Amiga */
9495   set_led_status(0, (data & 2) ? 0 : 1);
96
97   handle_cd32_joystick_cia(data, cia_r(device, 2));
9598}
9699
97100/*************************************
r4441r4442
135138   AM_RANGE(0xf80000, 0xffffff) AM_ROM AM_REGION("user1", 0x0)      /* Kickstart */
136139ADDRESS_MAP_END
137140
141int cubo_input_port_val = 0;
142int cubo_input_select = 0;
143UINT16 potgo_value = 0;
144int cd32_shifter[2];
138145
146static void cubocd32_potgo_w(running_machine *machine, UINT16 data)
147{
148   int i;
139149
150   potgo_value = potgo_value & 0x5500;
151   potgo_value |= data & 0xaa00;
152
153    for (i = 0; i < 8; i += 2)
154   {
155      UINT16 dir = 0x0200 << i;
156      if (data & dir)
157      {
158         UINT16 d = 0x0100 << i;
159         potgo_value &= ~d;
160         potgo_value |= data & d;
161      }
162    }
163    for (i = 0; i < 2; i++)
164   {
165       UINT16 p5dir = 0x0200 << (i * 4); /* output enable P5 */
166       UINT16 p5dat = 0x0100 << (i * 4); /* data P5 */
167       if ((potgo_value & p5dir) && (potgo_value & p5dat))
168      cd32_shifter[i] = 8;
169    }
170
171}
172
173static void handle_cd32_joystick_cia(UINT8 pra, UINT8 dra)
174{
175    static int oldstate[2];
176    int i;
177
178    for (i = 0; i < 2; i++)
179   {
180      UINT8 but = 0x40 << i;
181      UINT16 p5dir = 0x0200 << (i * 4); /* output enable P5 */
182      UINT16 p5dat = 0x0100 << (i * 4); /* data P5 */
183      if (!(potgo_value & p5dir) || !(potgo_value & p5dat))
184      {
185         if ((dra & but) && (pra & but) != oldstate[i])
186         {
187            if (!(pra & but))
188            {
189               cd32_shifter[i]--;
190               if (cd32_shifter[i] < 0)
191                  cd32_shifter[i] = 0;
192            }
193         }
194      }
195      oldstate[i] = pra & but;
196    }
197}
198
199static UINT16 handle_joystick_potgor (running_machine *machine, UINT16 potgor)
200{
201    int i;
202
203    for (i = 0; i < 2; i++)
204   {
205      UINT16 p9dir = 0x0800 << (i * 4); /* output enable P9 */
206      UINT16 p9dat = 0x0400 << (i * 4); /* data P9 */
207      UINT16 p5dir = 0x0200 << (i * 4); /* output enable P5 */
208      UINT16 p5dat = 0x0100 << (i * 4); /* data P5 */
209
210       /* p5 is floating in input-mode */
211       potgor &= ~p5dat;
212       potgor |= potgo_value & p5dat;
213       if (!(potgo_value & p9dir))
214         potgor |= p9dat;
215       /* P5 output and 1 -> shift register is kept reset (Blue button) */
216       if ((potgo_value & p5dir) && (potgo_value & p5dat))
217         cd32_shifter[i] = 8;
218       /* shift at 1 == return one, >1 = return button states */
219       if (cd32_shifter[i] == 0)
220         potgor &= ~p9dat; /* shift at zero == return zero */
221      if (i == 0)
222         if (cd32_shifter[i] >= 2 && (input_port_read(machine, "IN0") & (1 << (cd32_shifter[i] - 2))))
223            potgor &= ~p9dat;
224    }
225    return potgor;
226}
227
228static CUSTOM_INPUT(cubo_input)
229{
230   return handle_joystick_potgor(field->port->machine, potgo_value) >> 10;
231}
232
233
140234static INPUT_PORTS_START( cd32 )
141235   PORT_START("CIA0PORTA")
142236   PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_SPECIAL )
r4441r4442
156250   PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED )
157251
158252   PORT_START("POTGO")
159   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED )
160   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 )
161   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNUSED )
162   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
163   PORT_BIT( 0xaaff, IP_ACTIVE_HIGH, IPT_UNUSED )
253   PORT_BIT( 0x4400, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(cubo_input, 0)
254   PORT_BIT( 0xaaff, IP_ACTIVE_LOW, IPT_UNUSED )
164255
165256   PORT_START("P1JOY")
166257   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
r4441r4442
201292   PORT_DIPNAME( 0x80, 0x80, "DSW1 8" )
202293   PORT_DIPSETTING(    0x80, "Reset" )
203294   PORT_DIPSETTING(    0x00, "Set" )
295
296   PORT_START("IN0")
297   PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_BUTTON1 )
298   PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_BUTTON2 )
299   PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_BUTTON3 )
300   PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_BUTTON4 )
301   PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON5 )
302   PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON6 )
303   PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_BUTTON7 )
304   PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_UNUSED )
305   PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNUSED )
306
204307INPUT_PORTS_END
205308
206309/*************************************
r4441r4442
246349   MDRV_SCREEN_ADD("screen", RASTER)
247350   MDRV_SCREEN_REFRESH_RATE(59.997)
248351   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
249   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
352   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
250353   MDRV_SCREEN_SIZE(512*2, 312)
251354   MDRV_SCREEN_VISIBLE_AREA((129-8)*2, (449+8-1)*2, 44-8, 300+8-1)
252355
253356   MDRV_PALETTE_LENGTH(4096)
254   MDRV_PALETTE_INIT(amiga)
357   MDRV_PALETTE_INIT(amiga_aga)
255358
256   MDRV_VIDEO_START(amiga)
257   MDRV_VIDEO_UPDATE(amiga)
359   MDRV_VIDEO_START(amiga_aga)
360   MDRV_VIDEO_UPDATE(amiga_aga)
258361
259362   /* sound hardware */
260363    MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
r4441r4442
344447   static const amiga_machine_interface cubocd32_intf =
345448   {
346449      AGA_CHIP_RAM_MASK,
450      NULL, NULL, cubocd32_potgo_w,
347451      NULL, NULL, NULL,
348      NULL, NULL, NULL,
349452      NULL, NULL,
350453      NULL,
351454      FLAGS_AGA_CHIPSET
src/mame/drivers/seta.c
r4441r4442
29142914   AM_RANGE(0x0000, 0x01ff) AM_WRITE(SMH_RAM               )   // RAM
29152915   AM_RANGE(0x1000, 0x1000) AM_WRITE(sub_bankswitch_lockout_w   )   // ROM Bank + Coin Lockout
29162916   AM_RANGE(0x2000, 0x2001) AM_DEVWRITE("ym1", ym2203_w   )
2917   AM_RANGE(0x3000, 0x3000) AM_DEVWRITE("ym2", ym3812_w   )
2917   AM_RANGE(0x3000, 0x3001) AM_DEVWRITE("ym2", ym3812_w   )
29182918   AM_RANGE(0x5000, 0x57ff) AM_WRITE(SMH_RAM) AM_BASE(&sharedram      )   // Shared RAM
29192919   AM_RANGE(0x6000, 0xffff) AM_WRITE(SMH_ROM               )   // ROM
29202920ADDRESS_MAP_END
src/mame/drivers/naomi.c
r4441r4442
33  Sega Naomi
44 + Related Systems (possibly to be split at a later date)
55
6  Driver by Samuele Zannoli, R. Belmont, and ElSemi.
6  Driver by Samuele Zannoli, R. Belmont, and ElSemi,
7            David Haywood & Angelo Salese
78
89Sega Naomi is Dreamcast based Arcade hardware.
910
11Current Compatibility notes (GD-rom games only)
12|----------|-------|-----|------|------|------|--------------------------------|-----------------------------------------------------|
13|romname   | Pl(s) | Rot | Test | Boot | Game | Control Type                   | Notes                                               |
14|----------|-------|-----|------|------|------|--------------------------------|-----------------------------------------------------|
15|gundmgd   |   1   |  H  | Yes  | Yes  | Yes  | twin-joystick with 4+6 buttons |                                                     |
16|sfz3ugd   |   2   |  H  | Yes  | Yes  | No   | joystick with 6 buttons        | Spurious irq on ARM7 prg / broken timings           |
17|cvsgd     |   2   |  H  | Yes  | Yes  | Yes  | joystick with 4 buttons        | 2 + 2 extra buttons                                 |
18|gundmxgd  |   1   |  H  | Yes  | Yes  | Yes  | twin-joystick with 4+6 buttons |                                                     |
19|cvs2gd    |   2   |  H  | Yes  | Yes  | Yes  | joystick with 6 buttons        |                                                     |
20|ikaruga   |   2   |  V  | Yes  | Yes  | No   | joystick with 2 buttons?       | Broken i/o / timings                                |
21|ggxx      |   2   |  H  | Yes  | Yes  | Yes  | joystick with 5 buttons        |                                                     |
22|moeru     |   2   |  H  | No   | No   | No   | joystick with 3 buttons?       | Broken i/o, stuck at the "now loading" msg          |
23|chocomk   |   2   |  H  | No?  | Yes  | Yes? | joystick with 3 buttons?       | Broken i/o?                                         |
24|quizqgd   |   2   |  V  | Yes  | Yes  | Yes  | joystick(?) with 4 buttons     |                                                     |
25|ggxxrl    |   2   |  H  | Yes  | Yes  | Yes  | joystick with 5 buttons        |                                                     |
26|tetkiwam  |   2   |  H  | No   | No   | No   | joystick with 3 buttons?       |                                                     |
27|shikgam2  |   2   |  V  | Yes  | Yes  | No   | joystick with 3 buttons?       | Broken i/o                                          |
28|usagui    |   1   |  H  | Yes  | Yes  | No   | mahjong panel                  |                                                     |
29|bdrdown   |   2   |  H  | Yes  | Yes  | No?  | joystick with 3 buttons?       | Broken i/o in test mode                             |
30|psyvar2   |   1   |  V  | No   | No   | No   | joystick with 3 buttons?       |                                                     |
31|cfield    |   1?  |  H  | No?  | Yes  | No   | joystick with 3 buttons?       | Broken i/o                                          |
32|trizeal   |   2   |  V  | No   | No   | No   | joystick with 3 buttons?       |                                                     |
33|meltybld  |   2   |  H  | No?  | Yes  | No?  | joystick with 4 buttons?       | Crashes in attract with wrong mask                  |
34|senko     |   2   |  H  | Yes  | Yes  | No   | joystick with 3 buttons?       | Broken i/o                                          |
35|senkoo    |   2   |  H  | Yes  | Yes  | No   | joystick with 3 buttons?       | Broken i/o                                          |
36|ss2005    |   1   |  H  | Yes  | Yes  | No   | joystick with 3 buttons?       | Broken i/o                                          |
37|radirgy   |   1   |  V  | Yes  | Yes  | No   | joystick with 3 buttons?       | Broken i/o                                          |
38|ggxxsla   |   2   |  H  | Yes  | Yes  | Yes  | joystick with 5 buttons        |                                                     |
39|kurucham  |   2   |  H  | Yes  | Yes  | No   | joystick with 3 buttons?       | Broken i/o, crashes in attract with wrong mask      |
40|undefeat  |   2   |  V  | No   | No   | No   | joystick with 3 buttons?       | Stuck at the "now loading" msg                      |
41|trgheart  |   1   |  V  | Yes  | Yes  | No   | joystick with 3 buttons?       | Broken i/o                                          |
42|jingystm  |   2   |  H  | Yes  | Yes  | No   | joystick with 4 buttons?       | Broken i/o                                          |
43|meltyb    |   2   |  H  | No?  | Yes  | No?  | joystick with 4 buttons?       | Crashes in attract with wrong mask                  |
44|meltyba   |   2   |  H  | No?  | Yes  | No?  | joystick with 4 buttons?       | Crashes in attract with wrong mask                  |
45|karous    |   1   |  V  | Yes  | Yes  | No   | joystick with 3 buttons?       | Broken i/o                                          |
46|takoron   |   2   |  H  | Yes  | Yes  | Yes  | joystick with 3 buttons        |                                                     |
47--------------------------------------------------------------------------------------------------------------------------------------
48|confmiss  |   2   |  H  | Yes  | Yes  | No   | lightgun                       |                                                     |
49|sprtjam   |   2   |  H  | Yes  | Yes  | Yes  | joystick with 2 buttons        |                                                     |
50|slashout  |   1   |  H  | Yes  | Yes  | Yes  | joystick with 4 buttons        | Needs to map the extra button                       |
51|spkrbtl   |   2   |  H  | Yes  | Yes  | No   | joystick with 4 buttons        | Crashes when loading the gameplay                   |
52|monkeyba  |   1   |  H  | Yes  | Yes  | No   | ad stick                       | Crashes when loading the gameplay                   |
53|dygolf    |   2   |  H  | No   | No   | No   | trackball + 4 buttons          | Moans about the jvs settings                        |
54|wsbbgd    |   2   |  H  | No   | No   | No   | ad stick + 2 buttons           | Moans about the jvs settings                        |
55|vtennisg  |   2   |  H  | Yes  | Yes  | No   | joystick with 2 buttons        | Broken gfxs, crashes after a while                  |
56|vathlete  |   2   |  H  | Yes  | Yes  | No   | joystick with 3 buttons?       | Broken i/o                                          |
57|vtennis2  |   2   |  H  | No   | No   | No   | joystick with 3 buttons        |                                                     |
58|keyboard  |   2   |  H  | Yes  | Yes  | No   | keyboard                       | Broken i/o, crashes after a while                   |
59|lupinsho  |   2   |  H  | Yes  | Yes  | No   | lightgun                       | Broken i/o, crashes after a while                   |
60|luptype   |   2   |  H  | Yes  | Yes  | No   | keyboard                       | Broken i/o, crashes after a while                   |
61|mok       |   2   |  H  | Yes  | Yes  | No   | lightgun                       | Broken i/o                                          |
62|ngdup23a  |   2   |  H  | Yes  | Yes  | Yes  | n/a                            | Missing DIMM emulation                              |
63|ngdup23c  |   2   |  H  | Yes  | Yes  | Yes  | n/a                            | Missing DIMM emulation                              |
64|puyofev   |   2   |  H  | Yes  | Yes  | No   | joystick with 3 buttons?       | Broken i/o                                          |
65--------------------------------------------------------------------------------------------------------------------------------------
66
67Test: If it enters into test mode (not actually working test mode, i.e. if inputs doesn't work)
68Boot: If game boots and draws some gfxs
69Game: If game can be coined up and can actually be played without problems.
70If the three aforementioned are all yes and there aren't any notes, game is fully working.
71
72
1073---------------------------------------------------------------------------------------------------------------------------------------------------
1174
1275Guru's Readme
r4441r4442
698761* Non-volatile memories
699762*/
700763
764extern UINT8 maple0x86data1[0x80];
765
766
767// some default eeprom settings
768UINT8 jvseeprom_default_karous[128] =   { 0x58, 0xE5, 0x11, 0x42, 0x4D, 0x57, 0x00, 0x09, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0x58, 0xE5, 0x11, 0x42, 0x4D, 0x57, 0x00, 0x09, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
769UINT8 jvseeprom_default_sfz3ugd[128] =  { 0xE3, 0xF2, 0x10, 0x42, 0x43, 0x59, 0x30, 0x09, 0x10, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0xE3, 0xF2, 0x10, 0x42, 0x43, 0x59, 0x30, 0x09, 0x10, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0xBE, 0x1F, 0x18, 0x18, 0xBE, 0x1F, 0x18, 0x18, 0x30, 0x59, 0x43, 0x42, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x30, 0x59, 0x43, 0x42, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
770UINT8 jvseeprom_default_shikgam2[128] = { 0xA4, 0xF6, 0x11, 0x42, 0x47, 0x45, 0x30, 0x09, 0x10, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0xA4, 0xF6, 0x11, 0x42, 0x47, 0x45,   0x30, 0x09, 0x10, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11,0x43, 0x84, 0x20, 0x20, 0x43, 0x84, 0x20, 0x20, 0x42, 0x47, 0x45, 0x30,   0x53, 0x48, 0x49, 0x4B, 0x49, 0x32, 0x52, 0x4F, 0x4D, 0x20, 0x30, 0x32,   0x32, 0x38, 0x00, 0x00, 0x4B, 0x4B, 0x00, 0x02, 0x00, 0x02, 0x01, 0x00,   0x00, 0x00, 0x00, 0x00, 0x42, 0x47, 0x45, 0x30, 0x53, 0x48, 0x49, 0x4B,   0x49, 0x32, 0x52, 0x4F, 0x4D, 0x20, 0x30, 0x32, 0x32, 0x38, 0x00, 0x00,   0x4B, 0x4B, 0x00, 0x02, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
771UINT8 jvseeprom_default_quizqgd[128] =  { 0xAD, 0x1E, 0x11, 0x42, 0x46, 0x50, 0x31, 0x09, 0x10, 0x00, 0x01, 0x01,   0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0xAD, 0x1E, 0x11, 0x42, 0x46, 0x50,   0x31, 0x09, 0x10, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11,   0xC4, 0x18, 0x1D, 0x20, 0xC4, 0x18, 0x1D, 0x20, 0x42, 0x46, 0x50, 0x31,   0x51, 0x2D, 0x4D, 0x4F, 0x44, 0x45, 0x51, 0x2D, 0x4D, 0x4F, 0x44, 0x45,   0x01, 0x01, 0x05, 0x01, 0x02, 0x00, 0x01, 0x03, 0x01, 0x00, 0x4B, 0x4B,   0x00, 0x00, 0x00, 0x00, 0x42, 0x46, 0x50, 0x31, 0x51, 0x2D, 0x4D, 0x4F,   0x44, 0x45, 0x51, 0x2D, 0x4D, 0x4F, 0x44, 0x45, 0x01, 0x01, 0x05, 0x01,   0x02, 0x00, 0x01, 0x03, 0x01, 0x00, 0x4B, 0x4B, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
772UINT8 jvseeprom_default_senko[128] =    { 0xCD, 0xEE, 0x10, 0x42, 0x4B, 0x47, 0x30, 0x09, 0x10, 0x00, 0x01, 0x01,   0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0xCD, 0xEE, 0x10, 0x42, 0x4B, 0x47,   0x30, 0x09, 0x10, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11,   0xE5, 0x91, 0x10, 0x10, 0xE5, 0x91, 0x10, 0x10, 0x07, 0x51, 0x17, 0x03,   0x00, 0x01, 0x02, 0x02, 0x46, 0x00, 0x96, 0x00, 0x46, 0x00, 0x00, 0x00,   0x07, 0x51, 0x17, 0x03, 0x00, 0x01, 0x02, 0x02, 0x46, 0x00, 0x96, 0x00,   0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
773UINT8 jvseeprom_default_senkoo[128] =   { 0xCD, 0xEE, 0x10, 0x42, 0x4B, 0x47, 0x30, 0x09, 0x10, 0x00, 0x01, 0x01,   0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0xCD, 0xEE, 0x10, 0x42, 0x4B, 0x47,   0x30, 0x09, 0x10, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11,   0x12, 0xF0, 0x0C, 0x0C, 0x12, 0xF0, 0x0C, 0x0C, 0x07, 0x51, 0x17, 0x03,   0x01, 0x02, 0x46, 0x00, 0x96, 0x00, 0x00, 0x00, 0x07, 0x51, 0x17, 0x03,   0x01, 0x02, 0x46, 0x00, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
774UINT8 jvseeprom_default_radirgy[128] =  { 0x0C, 0x29, 0x11, 0x42, 0x4B, 0x57, 0x00, 0x09, 0x00, 0x00, 0x01, 0x01,   0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0x0C, 0x29, 0x11, 0x42, 0x4B, 0x57,   0x00, 0x09, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
775UINT8 jvseeprom_default_trgheart[128] = { 0xF0, 0xC2, 0x11, 0x42, 0x4D, 0x41, 0x31, 0x09, 0x00, 0x00, 0x01, 0x01,   0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0xF0, 0xC2, 0x11, 0x42, 0x4D, 0x41,   0x31, 0x09, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11,   0x7E, 0xE1, 0x24, 0x24, 0x7E, 0xE1, 0x24, 0x24, 0x30, 0x41, 0x4D, 0x42,   0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x48, 0x45, 0x41, 0x52, 0x54,   0x20, 0x45, 0x58, 0x45, 0x4C, 0x49, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00,   0x01, 0x03, 0x02, 0x00, 0x09, 0x09, 0x09, 0x00, 0x30, 0x41, 0x4D, 0x42,   0x54, 0x52, 0x49, 0x47, 0x47, 0x45, 0x52, 0x48, 0x45, 0x41, 0x52, 0x54,   0x20, 0x45, 0x58, 0x45, 0x4C, 0x49, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00,   0x01, 0x03, 0x02, 0x00, 0x09, 0x09, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
776UINT8 jvseeprom_default_gundmgd[128] =  { 0xCD, 0x77, 0x10, 0x42, 0x43, 0x56, 0x30, 0x09, 0x00, 0x00, 0x01, 0x01,   0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0xCD, 0x77, 0x10, 0x42, 0x43, 0x56,   0x30, 0x09, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
777UINT8 jvseeprom_default_gundmxgd[128] = { 0xAA, 0xAD, 0x10, 0x42, 0x44, 0x55, 0x30, 0x09, 0x00, 0x00, 0x01, 0x01,   0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0xAA, 0xAD, 0x10, 0x42, 0x44, 0x55,   0x30, 0x09, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
778UINT8 jvseeprom_default_psyvar2[128] =  { 0xCB, 0x6E, 0x11, 0x42, 0x48, 0x42, 0x30, 0x09, 0x00, 0x00, 0x01, 0x01,   0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0xCB, 0x6E, 0x11, 0x42, 0x48, 0x42,   0x30, 0x09, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
779UINT8 jvseeprom_default_cfield[128] =   { 0xFB, 0xD4, 0x10, 0x42, 0x4A, 0x42, 0x00, 0x09, 0x00, 0x00, 0x01, 0x01,   0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0xFB, 0xD4, 0x10, 0x42, 0x4A, 0x42,   0x00, 0x09, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
780UINT8 jvseeprom_default_puyofev[128] =  { 0x65, 0x7E, 0x10, 0x42, 0x48, 0x44, 0x00, 0x09, 0x10, 0x00, 0x01, 0x01,   0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0x65, 0x7E, 0x10, 0x42, 0x48, 0x44,   0x00, 0x09, 0x10, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11,   0x0E, 0x0B, 0x20, 0x20, 0x0E, 0x0B, 0x20, 0x20, 0x42, 0x48, 0x44, 0x00,   0x50, 0x55, 0x59, 0x4F, 0x20, 0x50, 0x55, 0x59, 0x4F, 0x20, 0x46, 0x45,   0x56, 0x45, 0x52, 0x2E, 0x20, 0x10, 0x03, 0x20, 0x01, 0x00, 0x02, 0x03,   0x00, 0x80, 0x00, 0x00, 0x42, 0x48, 0x44, 0x00, 0x50, 0x55, 0x59, 0x4F,   0x20, 0x50, 0x55, 0x59, 0x4F, 0x20, 0x46, 0x45, 0x56, 0x45, 0x52, 0x2E,   0x20, 0x10, 0x03, 0x20, 0x01, 0x00, 0x02, 0x03, 0x00, 0x80, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
781UINT8 jvseeprom_default_bdrdown[128] =  { 0xA0, 0x75, 0x10, 0x42, 0x47, 0x48, 0x30, 0x09, 0x10, 0x00, 0x01, 0x01,   0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0xA0, 0x75, 0x10, 0x42, 0x47, 0x48,   0x30, 0x09, 0x10, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11,   0xAE, 0x7E, 0x08, 0x08, 0xAE, 0x7E, 0x08, 0x08, 0x01, 0x00, 0x00, 0x00,   0x33, 0xB8, 0x96, 0xE4, 0x01, 0x00, 0x00, 0x00, 0x33, 0xB8, 0x96, 0xE4,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
782UINT8 jvseeprom_default_ss2005[128] =   { 0xAD, 0x0A, 0x10, 0x42, 0x4B, 0x4C, 0x30, 0x09, 0x00, 0x00, 0x01, 0x01,   0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0xAD, 0x0A, 0x10, 0x42, 0x4B, 0x4C,   0x30, 0x09, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
783UINT8 jvseeprom_default_usagui[128] =   { 0x02, 0x8C, 0x10, 0x42, 0x47, 0x46, 0x00, 0x09, 0x00, 0x00, 0x01, 0x01,   0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0x02, 0x8C, 0x10, 0x42, 0x47, 0x46,   0x00, 0x09, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
784UINT8 jvseeprom_default_undefeat[128] = { 0x06, 0x18, 0x11, 0x42, 0x4C, 0x48, 0x30, 0x09, 0x00, 0x00, 0x01, 0x01,   0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0x06, 0x18, 0x11, 0x42, 0x4C, 0x48,   0x30, 0x09, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
785UINT8 jvseeprom_default_trizeal[128] =  { 0x8F, 0x05, 0x11, 0x42, 0x4A, 0x46, 0x30, 0x09, 0x10, 0x00, 0x01, 0x01,   0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0x8F, 0x05, 0x11, 0x42, 0x4A, 0x46,   0x30, 0x09, 0x10, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
786UINT8 jvseeprom_default_moeru[128] =    { 0xA1, 0x18, 0x10, 0x42, 0x45, 0x55, 0x20, 0x09, 0x00, 0x00, 0x01, 0x01,   0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0xA1, 0x18, 0x10, 0x42, 0x45, 0x55,   0x20, 0x09, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
787UINT8 jvseeprom_default_tetkiwam[128] = { 0x3C, 0x11, 0x10, 0x42, 0x47, 0x43, 0x31, 0x09, 0x10, 0x00, 0x01, 0x01,   0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0x3C, 0x11, 0x10, 0x42, 0x47, 0x43,   0x31, 0x09, 0x10, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
788UINT8 jvseeprom_default_keyboard[128] = { 0x32, 0x7E, 0x10, 0x42, 0x45, 0x42, 0x30, 0x09, 0x10, 0x00, 0x01, 0x01,   0x01, 0x00, 0x11, 0x11, 0x11, 0x11, 0x32, 0x7E, 0x10, 0x42, 0x45, 0x42,   0x30, 0x09, 0x10, 0x00, 0x01, 0x01, 0x01, 0x00, 0x11, 0x11, 0x11, 0x11,   0xF0, 0x4A, 0x0C, 0x0C, 0xF0, 0x4A, 0x0C, 0x0C, 0x18, 0x09, 0x01, 0x20,   0x02, 0x00, 0x3C, 0x00, 0x32, 0x00, 0x00, 0x00, 0x18, 0x09, 0x01, 0x20,   0x02, 0x00, 0x3C, 0x00, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
789
790
701791static NVRAM_HANDLER( naomi_eeproms )
702792{
703793   if (read_or_write)
704      /*eeprom_save(file)*/;
794   {
795      /* JVS 'eeprom' */
796      mame_fwrite(file,maple0x86data1,0x80);
797
798
799      // mainboard eeprom?
800      eeprom_save(file);
801
802   }
705803   else
706804   {
707805      eeprom_init(machine, &eeprom_interface_93C46);
708      /*if (file)
806      if (file)
807      {
808         UINT8 tmp[0x80];
809
810         /* JVS 'eeprom' */
811         mame_fread(file,maple0x86data1,0x80);
812
813         mame_fread(file,&tmp,0x80);
814         eeprom_set_data((UINT8 *)tmp, 0x80);
815
816         // mainboard eeprom?
709817            eeprom_load(file);
710        else*/
711      eeprom_set_data((UINT8 *)"\011\241                              0000000000000000", 48);  // 2*checksum 30*unknown 16*serial
818
819      }
820        else
821      {
822      //  int a;
823
824         UINT32 length, size;
825         UINT8 *dat;
826         UINT8* jvseeprom_default = NULL;
827
828         dat = eeprom_get_data_pointer(&length, &size);
829         memset(dat, 0, length * size);
830
831         // mainboard eeprom?
832         eeprom_set_data((UINT8 *)"\011\241                              0000000000000000", 48);  // 2*checksum 30*unknown 16*serial
833
834         // some games require defaults to boot (vertical, 1 player etc.)
835         if (!strcmp(machine->gamedrv->name,"karous"))  jvseeprom_default = jvseeprom_default_karous;
836         if (!strcmp(machine->gamedrv->name,"sfz3ugd")) jvseeprom_default = jvseeprom_default_sfz3ugd;
837         if (!strcmp(machine->gamedrv->name,"shikgam2")) jvseeprom_default = jvseeprom_default_shikgam2;
838         if (!strcmp(machine->gamedrv->name,"quizqgd")) jvseeprom_default = jvseeprom_default_quizqgd;
839         if (!strcmp(machine->gamedrv->name,"senko")) jvseeprom_default = jvseeprom_default_senko;
840         if (!strcmp(machine->gamedrv->name,"senkoo")) jvseeprom_default = jvseeprom_default_senkoo;
841         if (!strcmp(machine->gamedrv->name,"radirgy")) jvseeprom_default = jvseeprom_default_radirgy;
842         if (!strcmp(machine->gamedrv->name,"trgheart")) jvseeprom_default = jvseeprom_default_trgheart;
843         if (!strcmp(machine->gamedrv->name,"gundmgd")) jvseeprom_default = jvseeprom_default_gundmgd;
844         if (!strcmp(machine->gamedrv->name,"gundmxgd")) jvseeprom_default = jvseeprom_default_gundmxgd;
845         if (!strcmp(machine->gamedrv->name,"psyvar2")) jvseeprom_default = jvseeprom_default_psyvar2;
846         if (!strcmp(machine->gamedrv->name,"cfield")) jvseeprom_default = jvseeprom_default_cfield;
847         if (!strcmp(machine->gamedrv->name,"puyofev")) jvseeprom_default = jvseeprom_default_puyofev;
848         if (!strcmp(machine->gamedrv->name,"bdrdown")) jvseeprom_default = jvseeprom_default_bdrdown;
849         if (!strcmp(machine->gamedrv->name,"ss2005")) jvseeprom_default = jvseeprom_default_ss2005;
850         if (!strcmp(machine->gamedrv->name,"usagui")) jvseeprom_default = jvseeprom_default_usagui;
851         if (!strcmp(machine->gamedrv->name,"undefeat")) jvseeprom_default = jvseeprom_default_undefeat;
852         if (!strcmp(machine->gamedrv->name,"trizeal")) jvseeprom_default = jvseeprom_default_trizeal;
853         if (!strcmp(machine->gamedrv->name,"moeru")) jvseeprom_default = jvseeprom_default_moeru;
854         if (!strcmp(machine->gamedrv->name,"tetkiwam")) jvseeprom_default = jvseeprom_default_tetkiwam;
855         if (!strcmp(machine->gamedrv->name,"keyboard")) jvseeprom_default = jvseeprom_default_keyboard;
856
857         if (jvseeprom_default)
858            memcpy(maple0x86data1, jvseeprom_default, 0x80);
859
860      #if 0
861         /* JVS 'eeprom' */
862         for (a=0;a < 0x80;a++)
863            maple0x86data1[a]=0x11+a;
864
865         // checksums
866         maple0x86data1[0]=0xb9;
867         maple0x86data1[1]=0xb1;
868         maple0x86data1[18]=0xb8;
869         maple0x86data1[19]=0x8a;
870      #endif
871      }
712872   }
713873}
714874
r4441r4442
731891   eeprom_set_clock_line((data & 0x4) ? ASSERT_LINE : CLEAR_LINE);
732892}
733893
894/* Dreamcast MAP
895
8960 0x00000000 - 0x001FFFFF MPX System/Boot ROM
8970 0x00200000 - 0x0021FFFF Flash Memory
8980 0x00400000 - 0x005F67FF Unassigned
8990 0x005F6800 - 0x005F69FF System Control Reg.
9000 0x005F6C00 - 0x005F6CFF Maple i/f Control Reg.
9010 0x005F7000 - 0x005F70FF GD-ROM
9020 0x005F7400 - 0x005F74FF G1 i/f Control Reg.
9030 0x005F7800 - 0x005F78FF G2 i/f Control Reg.
9040 0x005F7C00 - 0x005F7CFF PVR i/f Control Reg.
9050 0x005F8000 - 0x005F9FFF TA / PVR Core Reg.
9060 0x00600000 - 0x006007FF MODEM
9070 0x00600800 - 0x006FFFFF G2 (Reserved)
9080 0x00700000 - 0x00707FFF AICA- Sound Cntr. Reg.
9090 0x00710000 - 0x0071000B AICA- RTC Cntr. Reg.
9100 0x00800000 - 0x00FFFFFF AICA- Wave Memory
9110 0x01000000 - 0x01FFFFFF Ext. Device
9120 0x02000000 - 0x03FFFFFF Image Area (Mirror Area)
913
9141 0x04000000 - 0x04FFFFFF MPX Tex.Mem. 64bit Acc.
9151 0x05000000 - 0x05FFFFFF Tex.Mem. 32bit Acc.
9161 0x06000000 - 0x07FFFFFF Image Area*
917
9182 0x08000000 - 0x0BFFFFFF Unassigned
919
9203 0x0C000000 - 0x0CFFFFFF System Memory
9213 0x0D000000 - 0x0DFFFFFF (Mirror on DC, Extra RAM on Naomi)
922
9233 0x0E000000 - 0x0FFFFFFF Image Area (Mirror Area)
924
9254 0x10000000 - 0x107FFFFF MPX TA FIFO Polygon Cnv.
9264 0x10800000 - 0x10FFFFFF TA FIFO YUV Conv.
9274 0x11000000 - 0x11FFFFFF Tex.Mem. 32/64bit Acc.
9284 0x12000000 - 0x13FFFFFF Image Area (Mirror Area)
929
9305 0x14000000 - 0x17FFFFFF MPX Ext.
931
9326 0x18000000 - 0x1BFFFFFF Unassigned
933
9347 0x1C000000 - 0x1FFFFFFF(SH4 Internal area)
935
936*/
937
734938/*
735939 * Common address map for Naomi 1, Naomi GD-Rom, Naomi 2, Atomiswave ...
736940 */
r4441r4442
764968 */
765969
766970static ADDRESS_MAP_START( naomi_map, ADDRESS_SPACE_PROGRAM, 64 )
767   AM_RANGE(0x00000000, 0x001fffff) AM_ROM                                             // BIOS
971   /* Area 0 */
972   AM_RANGE(0x00000000, 0x001fffff) AM_ROM AM_SHARE(3) AM_REGION("maincpu", 0) // BIOS
973   AM_RANGE(0xa0000000, 0xa01fffff) AM_ROM AM_SHARE(3)  // non cachable access to  0x00000000 - 0x001fffff
974
768975   AM_RANGE(0x00200000, 0x00207fff) AM_RAM                                             // bios uses it (battery backed ram ?)
769976   AM_RANGE(0x005f6800, 0x005f69ff) AM_READWRITE( dc_sysctrl_r, dc_sysctrl_w )
770977   AM_RANGE(0x005f6c00, 0x005f6cff) AM_READWRITE( dc_maple_r, dc_maple_w )
978   AM_RANGE(0x005f7000, 0x005f70ff) AM_DEVREADWRITE("rom_board", naomibd_r, naomibd_w)
771979   AM_RANGE(0x005f7400, 0x005f74ff) AM_READWRITE( dc_g1_ctrl_r, dc_g1_ctrl_w )
772980   AM_RANGE(0x005f7800, 0x005f78ff) AM_READWRITE( dc_g2_ctrl_r, dc_g2_ctrl_w )
773981   AM_RANGE(0x005f7c00, 0x005f7cff) AM_READWRITE( pvr_ctrl_r, pvr_ctrl_w )
r4441r4442
776984   AM_RANGE(0x00700000, 0x00707fff) AM_DEVREADWRITE( "aica", dc_aica_reg_r, dc_aica_reg_w )
777985   AM_RANGE(0x00710000, 0x0071000f) AM_READWRITE( dc_rtc_r, dc_rtc_w )
778986   AM_RANGE(0x00800000, 0x00ffffff) AM_READWRITE( naomi_arm_r, naomi_arm_w )           // sound RAM (8 MB)
987
988
779989   AM_RANGE(0x0103ff00, 0x0103ffff) AM_READWRITE( naomi_unknown1_r, naomi_unknown1_w ) // bios uses it, actual start and end addresses not known
990
991   /* Area 1 */
780992   AM_RANGE(0x04000000, 0x04ffffff) AM_RAM   AM_SHARE(2) AM_BASE( &dc_texture_ram )      // texture memory 64 bit access
781993   AM_RANGE(0x05000000, 0x05ffffff) AM_RAM AM_SHARE(2)                                 // mirror of texture RAM 32 bit access
782   AM_RANGE(0x0c000000, 0x0dffffff) AM_RAM AM_BASE(&naomi_ram64)
994
995   /* Area 2*/
996   AM_RANGE(0x08000000, 0x0bffffff) AM_NOP // 'Unassigned'
997
998   /* Area 3 */
999   AM_RANGE(0x0c000000, 0x0cffffff) AM_RAM AM_BASE(&naomi_ram64) AM_SHARE(4)
1000   AM_RANGE(0x0d000000, 0x0dffffff) AM_RAM AM_SHARE(5)// extra ram on Naomi (mirror on DC)
1001   AM_RANGE(0x0e000000, 0x0effffff) AM_RAM AM_SHARE(4)// mirror
1002   AM_RANGE(0x0f000000, 0x0fffffff) AM_RAM AM_SHARE(5)// mirror
1003
1004   AM_RANGE(0x8c000000, 0x8cffffff) AM_RAM AM_SHARE(4) // RAM access through cache
1005
1006
1007   /* Area 4 */
7831008   AM_RANGE(0x10000000, 0x107fffff) AM_WRITE( ta_fifo_poly_w )
7841009   AM_RANGE(0x10800000, 0x10ffffff) AM_WRITE( ta_fifo_yuv_w )
785   AM_RANGE(0x11000000, 0x11ffffff) AM_RAM AM_SHARE(2)                                 // another mirror of texture memory
786   AM_RANGE(0x13000000, 0x13ffffff) AM_RAM AM_SHARE(2)                                 // another mirror of texture memory
787   AM_RANGE(0xa0000000, 0xa01fffff) AM_ROM AM_REGION("maincpu", 0)
1010   AM_RANGE(0x11000000, 0x11ffffff) AM_RAM AM_SHARE(2)
1011   /*       0x12000000 -0x13ffffff Mirror area of  0x10000000 -0x11ffffff */
1012   AM_RANGE(0x12000000, 0x127fffff) AM_WRITE( ta_fifo_poly_w )
1013   AM_RANGE(0x12800000, 0x12ffffff) AM_WRITE( ta_fifo_yuv_w )
1014   AM_RANGE(0x13000000, 0x13ffffff) AM_RAM AM_SHARE(2)
7881015
789   AM_RANGE(0x005f7000, 0x005f70ff) AM_DEVREADWRITE("rom_board", naomibd_r, naomibd_w)
1016   /* Area 5 */
1017   //AM_RANGE(0x14000000, 0x17ffffff) AM_NOP // MPX Ext.
1018
1019   /* Area 6 */
1020   //AM_RANGE(0x18000000, 0x1bffffff) AM_NOP // Unassigned
1021
1022   /* Area 7 */
1023   //AM_RANGE(0x1c000000, 0x1fffffff) AM_NOP // SH4 Internal
7901024ADDRESS_MAP_END
7911025
7921026
r4441r4442
9881222
9891223*/
9901224// game specific bios roms quite clearly don't belong in here.
991
1225// Japan bios is default, because most games require it.
1226/* bios e works, the newer japan one gives 'board malfunction' with some games?' */
9921227#define NAOMI_BIOS \
993   ROM_SYSTEM_BIOS( 0, "bios0", "epr-21578e (Export)" ) \
994   ROM_LOAD16_WORD_SWAP_BIOS( 0, "epr-21578e.bin",  0x000000, 0x200000, CRC(087f09a3) SHA1(0418eb2cf9766f0b1b874a4e92528779e22c0a4a) ) \
995   ROM_SYSTEM_BIOS( 1, "bios1", "epr-21578d (Export)" ) \
996   ROM_LOAD16_WORD_SWAP_BIOS( 1, "epr-21578d.bin",  0x000000, 0x200000, CRC(dfd5f42a) SHA1(614a0db4743a5e5a206190d6786ade24325afbfd) ) \
997   ROM_SYSTEM_BIOS( 2, "bios2", "epr-21578b (Export)" ) \
998   ROM_LOAD16_WORD_SWAP_BIOS( 2, "epr-21578b.bin",  0x000000, 0x200000, CRC(6c9aad83) SHA1(555918de76d8dbee2a97d8a95297ef694b3e803f) ) \
999   ROM_SYSTEM_BIOS( 3, "bios3", "epr-21577e (USA)" ) \
1000   ROM_LOAD16_WORD_SWAP_BIOS( 3, "epr-21577e.bin",  0x000000, 0x200000, CRC(cf36e97b) SHA1(b085305982e7572e58b03a9d35f17ae319c3bbc6) ) \
1001   ROM_SYSTEM_BIOS( 4, "bios4", "epr-21577d (USA)" ) \
1002   ROM_LOAD16_WORD_SWAP_BIOS( 4, "epr-21577d.bin",  0x000000, 0x200000, CRC(60ddcbbe) SHA1(58b15096d269d6df617ca1810b66b47deb184958) ) \
1003   ROM_SYSTEM_BIOS( 5, "bios5", "epr-21576h (Japan)" ) \
1004   ROM_LOAD16_WORD_SWAP_BIOS( 5, "epr-21576h.bin",  0x000000, 0x200000, CRC(d4895685) SHA1(91424d481ff99a8d3f4c45cea6d3f0eada049a6d) ) \
1005   ROM_SYSTEM_BIOS( 6, "bios6", "epr-21576g (Japan)" ) \
1006   ROM_LOAD16_WORD_SWAP_BIOS( 6, "epr-21576g.bin",  0x000000, 0x200000, CRC(d2a1c6bf) SHA1(6d27d71aec4dfba98f66316ae74a1426d567698a) ) \
1007   ROM_SYSTEM_BIOS( 7, "bios7", "epr-21576e (Japan)" ) \
1008   ROM_LOAD16_WORD_SWAP_BIOS( 7, "epr-21576e.bin",  0x000000, 0x200000, CRC(08c0add7) SHA1(e7c1a7673cb2ccb21748ef44105e46d1bad7266d) ) \
1009   ROM_SYSTEM_BIOS( 8, "bios8", "epr-21576d (Japan)" ) \
1010   ROM_LOAD16_WORD_SWAP_BIOS( 8, "epr-21576d.bin",  0x000000, 0x200000, CRC(3b2afa7b) SHA1(d007e1d321c198a38c5baff86eb2ab84385d150a) ) \
1011   ROM_SYSTEM_BIOS( 9, "bios9", "epr-21576b (Japan)" ) \
1012   ROM_LOAD16_WORD_SWAP_BIOS( 9, "epr-21576b.bin",  0x000000, 0x200000, CRC(755a6e07) SHA1(7e8b8ccfc063144d89668e7224dcd8a36c54f3b3) ) \
1013   ROM_SYSTEM_BIOS( 10, "bios10", "epr-21576 (Japan)" ) \
1014   ROM_LOAD16_WORD_SWAP_BIOS( 10,  "epr-21576.bin", 0x000000, 0x200000, CRC(9dad3495) SHA1(5fb66f9a2b68d120f059c72758e65d34f461044a) ) \
1228   ROM_SYSTEM_BIOS( 0, "bios0", "epr-21576e (Japan)" ) \
1229   ROM_LOAD16_WORD_SWAP_BIOS( 0, "epr-21576e.bin",  0x000000, 0x200000, CRC(08c0add7) SHA1(e7c1a7673cb2ccb21748ef44105e46d1bad7266d) ) \
1230   ROM_SYSTEM_BIOS( 1, "bios1", "epr-21576g (Japan)" ) \
1231   ROM_LOAD16_WORD_SWAP_BIOS( 1, "epr-21576g.bin",  0x000000, 0x200000, CRC(d2a1c6bf) SHA1(6d27d71aec4dfba98f66316ae74a1426d567698a) ) \
1232   ROM_SYSTEM_BIOS( 2, "bios2", "epr-21576h (Japan)" ) \
1233   ROM_LOAD16_WORD_SWAP_BIOS( 2, "epr-21576h.bin",  0x000000, 0x200000, CRC(d4895685) SHA1(91424d481ff99a8d3f4c45cea6d3f0eada049a6d) ) \
1234   ROM_SYSTEM_BIOS( 3, "bios3", "epr-21576d (Japan)" ) \
1235   ROM_LOAD16_WORD_SWAP_BIOS( 3, "epr-21576d.bin",  0x000000, 0x200000, CRC(3b2afa7b) SHA1(d007e1d321c198a38c5baff86eb2ab84385d150a) ) \
1236   ROM_SYSTEM_BIOS( 4, "bios4", "epr-21576b (Japan)" ) \
1237   ROM_LOAD16_WORD_SWAP_BIOS( 4, "epr-21576b.bin",  0x000000, 0x200000, CRC(755a6e07) SHA1(7e8b8ccfc063144d89668e7224dcd8a36c54f3b3) ) \
1238   ROM_SYSTEM_BIOS( 5, "bios5", "epr-21576 (Japan)" ) \
1239   ROM_LOAD16_WORD_SWAP_BIOS( 5,  "epr-21576.bin", 0x000000, 0x200000, CRC(9dad3495) SHA1(5fb66f9a2b68d120f059c72758e65d34f461044a) ) \
1240   ROM_SYSTEM_BIOS( 6, "bios6", "epr-21578e (Export)" ) \
1241   ROM_LOAD16_WORD_SWAP_BIOS( 6, "epr-21578e.bin",  0x000000, 0x200000, CRC(087f09a3) SHA1(0418eb2cf9766f0b1b874a4e92528779e22c0a4a) ) \
1242   ROM_SYSTEM_BIOS( 7, "bios7", "epr-21578d (Export)" ) \
1243   ROM_LOAD16_WORD_SWAP_BIOS( 7, "epr-21578d.bin",  0x000000, 0x200000, CRC(dfd5f42a) SHA1(614a0db4743a5e5a206190d6786ade24325afbfd) ) \
1244   ROM_SYSTEM_BIOS( 8, "bios8", "epr-21578b (Export)" ) \
1245   ROM_LOAD16_WORD_SWAP_BIOS( 8, "epr-21578b.bin",  0x000000, 0x200000, CRC(6c9aad83) SHA1(555918de76d8dbee2a97d8a95297ef694b3e803f) ) \
1246   ROM_SYSTEM_BIOS( 9, "bios9", "epr-21577e (USA)" ) \
1247   ROM_LOAD16_WORD_SWAP_BIOS( 9, "epr-21577e.bin",  0x000000, 0x200000, CRC(cf36e97b) SHA1(b085305982e7572e58b03a9d35f17ae319c3bbc6) ) \
1248   ROM_SYSTEM_BIOS( 10, "bios10", "epr-21577d (USA)" ) \
1249   ROM_LOAD16_WORD_SWAP_BIOS( 10, "epr-21577d.bin",  0x000000, 0x200000, CRC(60ddcbbe) SHA1(58b15096d269d6df617ca1810b66b47deb184958) ) \
10151250   ROM_SYSTEM_BIOS( 11, "bios11", "Ferrari F355 (Export)" ) \
10161251   ROM_LOAD16_WORD_SWAP_BIOS( 11,  "epr-22851.bin", 0x000000, 0x200000, CRC(62483677) SHA1(3e3bcacf5f972c376b569f45307ee7fd0b5031b7) ) \
10171252   ROM_SYSTEM_BIOS( 12, "bios12", "Ferrari F355 (USA)" ) \
r4441r4442
10281263
10291264
10301265/* only revisions d and higher support the GDROM, and there is an additional bios (and SH4!) on the DIMM board for the CD Controller */
1266/* bios e works, the newer japan one gives 'board malfunction' with some games?' */
10311267#define NAOMIGD_BIOS \
10321268   ROM_REGION( 0x200000, "maincpu", 0) \
1033   ROM_SYSTEM_BIOS( 0, "bios0", "epr-21578e (Export)" ) \
1034   ROM_LOAD16_WORD_SWAP_BIOS( 0, "epr-21578e.bin",  0x000000, 0x200000, CRC(087f09a3) SHA1(0418eb2cf9766f0b1b874a4e92528779e22c0a4a) ) \
1035   ROM_SYSTEM_BIOS( 1, "bios1", "epr-21578d (Export)" ) \
1036   ROM_LOAD16_WORD_SWAP_BIOS( 1, "epr-21578d.bin",  0x000000, 0x200000, CRC(dfd5f42a) SHA1(614a0db4743a5e5a206190d6786ade24325afbfd) ) \
1037   ROM_SYSTEM_BIOS( 2, "bios2", "epr-21577e (USA)" ) \
1038   ROM_LOAD16_WORD_SWAP_BIOS( 2, "epr-21577e.bin",  0x000000, 0x200000, CRC(cf36e97b) SHA1(b085305982e7572e58b03a9d35f17ae319c3bbc6) ) \
1039   ROM_SYSTEM_BIOS( 3, "bios3", "epr-21577d (USA)" ) \
1040   ROM_LOAD16_WORD_SWAP_BIOS( 3, "epr-21577d.bin",  0x000000, 0x200000, CRC(60ddcbbe) SHA1(58b15096d269d6df617ca1810b66b47deb184958) ) \
1041   ROM_SYSTEM_BIOS( 4, "bios4", "epr-21576h (Japan)" ) \
1042   ROM_LOAD16_WORD_SWAP_BIOS( 4, "epr-21576h.bin",  0x000000, 0x200000, CRC(d4895685) SHA1(91424d481ff99a8d3f4c45cea6d3f0eada049a6d) ) \
1043   ROM_SYSTEM_BIOS( 5, "bios5", "epr-21576g (Japan)" ) \
1044   ROM_LOAD16_WORD_SWAP_BIOS( 5, "epr-21576g.bin",  0x000000, 0x200000, CRC(d2a1c6bf) SHA1(6d27d71aec4dfba98f66316ae74a1426d567698a) ) \
1045   ROM_SYSTEM_BIOS( 6, "bios6", "epr-21576e (Japan)" ) \
1046   ROM_LOAD16_WORD_SWAP_BIOS( 6, "epr-21576e.bin",  0x000000, 0x200000, CRC(08c0add7) SHA1(e7c1a7673cb2ccb21748ef44105e46d1bad7266d) ) \
1047   ROM_SYSTEM_BIOS( 7, "bios7", "epr-21576d (Japan)" ) \
1048   ROM_LOAD16_WORD_SWAP_BIOS( 7, "epr-21576d.bin",  0x000000, 0x200000, CRC(3b2afa7b) SHA1(d007e1d321c198a38c5baff86eb2ab84385d150a) ) \
1269   ROM_SYSTEM_BIOS( 0, "bios0", "epr-21576e (Japan)" ) \
1270   ROM_LOAD16_WORD_SWAP_BIOS( 0, "epr-21576e.bin",  0x000000, 0x200000, CRC(08c0add7) SHA1(e7c1a7673cb2ccb21748ef44105e46d1bad7266d) ) \
1271   ROM_SYSTEM_BIOS( 1, "bios1", "epr-21576g (Japan)" ) \
1272   ROM_LOAD16_WORD_SWAP_BIOS( 1, "epr-21576g.bin",  0x000000, 0x200000, CRC(d2a1c6bf) SHA1(6d27d71aec4dfba98f66316ae74a1426d567698a) ) \
1273   ROM_SYSTEM_BIOS( 2, "bios2", "epr-21576h (Japan)" ) \
1274   ROM_LOAD16_WORD_SWAP_BIOS( 2, "epr-21576h.bin",  0x000000, 0x200000, CRC(d4895685) SHA1(91424d481ff99a8d3f4c45cea6d3f0eada049a6d) ) \
1275   ROM_SYSTEM_BIOS( 3, "bios3", "epr-21576d (Japan)" ) \
1276   ROM_LOAD16_WORD_SWAP_BIOS( 3, "epr-21576d.bin",  0x000000, 0x200000, CRC(3b2afa7b) SHA1(d007e1d321c198a38c5baff86eb2ab84385d150a) ) \
1277   ROM_SYSTEM_BIOS( 4, "bios4", "epr-21578e (Export)" ) \
1278   ROM_LOAD16_WORD_SWAP_BIOS( 4, "epr-21578e.bin",  0x000000, 0x200000, CRC(087f09a3) SHA1(0418eb2cf9766f0b1b874a4e92528779e22c0a4a) ) \
1279   ROM_SYSTEM_BIOS( 5, "bios5", "epr-21578d (Export)" ) \
1280   ROM_LOAD16_WORD_SWAP_BIOS( 5, "epr-21578d.bin",  0x000000, 0x200000, CRC(dfd5f42a) SHA1(614a0db4743a5e5a206190d6786ade24325afbfd) ) \
1281   ROM_SYSTEM_BIOS( 6, "bios6", "epr-21577e (USA)" ) \
1282   ROM_LOAD16_WORD_SWAP_BIOS( 6, "epr-21577e.bin",  0x000000, 0x200000, CRC(cf36e97b) SHA1(b085305982e7572e58b03a9d35f17ae319c3bbc6) ) \
1283   ROM_SYSTEM_BIOS( 7, "bios7", "epr-21577d (USA)" ) \
1284   ROM_LOAD16_WORD_SWAP_BIOS( 7, "epr-21577d.bin",  0x000000, 0x200000, CRC(60ddcbbe) SHA1(58b15096d269d6df617ca1810b66b47deb184958) ) \
10491285   ROM_REGION( 0x200000, "user2", 0) \
10501286   ROM_LOAD16_WORD_SWAP( "fpr-23489c.ic14", 0x000000, 0x200000, CRC(bc38bea1) SHA1(b36fcc6902f397d9749e9d02de1bbb7a5e29d468) ) \
10511287
r4441r4442
10781314
10791315#define NAOMI2_BIOS \
10801316   ROM_REGION( 0x200000, "maincpu", 0) \
1081   ROM_SYSTEM_BIOS( 0, "bios0", "epr-23608b (Export)" ) \
1082   ROM_LOAD16_WORD_SWAP_BIOS( 0, "epr-23608b.bin",   0x000000, 0x200000, CRC(a554b1e3) SHA1(343b727a3619d1c75a9b6d4cc156a9050447f155) ) \
1083   ROM_SYSTEM_BIOS( 1, "bios1", "epr-23608 (Export)"  ) \
1084   ROM_LOAD16_WORD_SWAP_BIOS( 1, "epr-23608.bin",    0x000000, 0x200000, CRC(929cc3a6) SHA1(47d00c818de23f733a4a33b1bbc72eb8aa729246) ) \
1085   ROM_SYSTEM_BIOS( 2, "bios2", "epr-23607b (USA)" ) \
1086   ROM_LOAD16_WORD_SWAP_BIOS( 2, "epr-23607b.bin",   0x000000, 0x200000, CRC(f308c5e9) SHA1(5470ab1cee6afecbd8ca8cf40f8fbe4ec2cb1471) ) \
1087   ROM_SYSTEM_BIOS( 3, "bios3", "epr-23607 (USA)"  ) \
1088   ROM_LOAD16_WORD_SWAP_BIOS( 3, "epr-23607.bin",    0x000000, 0x200000, CRC(2b55add2) SHA1(547de5f97d3183c8cd069c4fa3c09f13d8b637d9) ) \
1089   ROM_SYSTEM_BIOS( 4, "bios4", "epr-23605c (Japan)" ) \
1090   ROM_LOAD16_WORD_SWAP_BIOS( 4, "epr-23605c.bin",   0x000000, 0x200000, CRC(297ea6ed) SHA1(cfbfe57c80e6ee86a101fa83aec0a01e00c0f42a) ) \
1091   ROM_SYSTEM_BIOS( 5, "bios5", "epr-23605b (Japan)" ) \
1092   ROM_LOAD16_WORD_SWAP_BIOS( 5, "epr-23605b.bin",   0x000000, 0x200000, CRC(3a3242d4) SHA1(aaca4df51ef91d926f8191d372f3dfe1d20d9484) ) \
1093   ROM_SYSTEM_BIOS( 6, "bios6", "epr-23605a (Japan)" ) \
1094   ROM_LOAD16_WORD_SWAP_BIOS( 6, "epr-23605a.bin",   0x000000, 0x200000, CRC(7bc3fc2d) SHA1(a4a9531a7c66ff30046908cf71f6c7b6fb59c392) ) \
1095   ROM_SYSTEM_BIOS( 7, "bios7", "epr-23605 (Japan)"  ) \
1096   ROM_LOAD16_WORD_SWAP_BIOS( 7, "epr-23605.bin",    0x000000, 0x200000, CRC(5731e446) SHA1(787b0844fc408cf124c12405c095c59948709ea6) )
1317   ROM_SYSTEM_BIOS( 0, "bios0", "epr-23605c (Japan)" ) \
1318   ROM_LOAD16_WORD_SWAP_BIOS( 0, "epr-23605c.bin",   0x000000, 0x200000, CRC(297ea6ed) SHA1(cfbfe57c80e6ee86a101fa83aec0a01e00c0f42a) ) \
1319   ROM_SYSTEM_BIOS( 1, "bios1", "epr-23605b (Japan)" ) \
1320   ROM_LOAD16_WORD_SWAP_BIOS( 1, "epr-23605b.bin",   0x000000, 0x200000, CRC(3a3242d4) SHA1(aaca4df51ef91d926f8191d372f3dfe1d20d9484) ) \
1321   ROM_SYSTEM_BIOS( 2, "bios2", "epr-23605a (Japan)" ) \
1322   ROM_LOAD16_WORD_SWAP_BIOS( 2, "epr-23605a.bin",   0x000000, 0x200000, CRC(7bc3fc2d) SHA1(a4a9531a7c66ff30046908cf71f6c7b6fb59c392) ) \
1323   ROM_SYSTEM_BIOS( 3, "bios3", "epr-23605 (Japan)"  ) \
1324   ROM_LOAD16_WORD_SWAP_BIOS( 3, "epr-23605.bin",    0x000000, 0x200000, CRC(5731e446) SHA1(787b0844fc408cf124c12405c095c59948709ea6) ) \
1325   ROM_SYSTEM_BIOS( 4, "bios4", "epr-23608b (Export)" ) \
1326   ROM_LOAD16_WORD_SWAP_BIOS( 4, "epr-23608b.bin",   0x000000, 0x200000, CRC(a554b1e3) SHA1(343b727a3619d1c75a9b6d4cc156a9050447f155) ) \
1327   ROM_SYSTEM_BIOS( 5, "bios5", "epr-23608 (Export)"  ) \
1328   ROM_LOAD16_WORD_SWAP_BIOS( 5, "epr-23608.bin",    0x000000, 0x200000, CRC(929cc3a6) SHA1(47d00c818de23f733a4a33b1bbc72eb8aa729246) ) \
1329   ROM_SYSTEM_BIOS( 6, "bios6", "epr-23607b (USA)" ) \
1330   ROM_LOAD16_WORD_SWAP_BIOS( 6, "epr-23607b.bin",   0x000000, 0x200000, CRC(f308c5e9) SHA1(5470ab1cee6afecbd8ca8cf40f8fbe4ec2cb1471) ) \
1331   ROM_SYSTEM_BIOS( 7, "bios7", "epr-23607 (USA)"  ) \
1332   ROM_LOAD16_WORD_SWAP_BIOS( 7, "epr-23607.bin",    0x000000, 0x200000, CRC(2b55add2) SHA1(547de5f97d3183c8cd069c4fa3c09f13d8b637d9) ) \
10971333
10981334/* this is one flashrom, however the second half looks like it's used for game settings, may differ between dumps, and may not be needed / could be blanked */
10991335#define AW_BIOS \
r4441r4442
14291665   ROM_LOAD("mpr23427.8", 0x4000000, 0x0800000, CRC(5851d525) SHA1(1cb1073542d75a3bcc0d363ed31d49bcaf1fd494) )
14301666ROM_END
14311667
1668
14321669/*
14331670
14341671SYSTEMID: NAOMI
1672JAP:  POWER SMASH --------------
1673USA:  VIRTUA TENNIS IN USA -----
1674EXP:  VIRTUA TENNIS IN EXPORT --
1675
1676NO. Type    Byte    Word
1677IC22    32M 0000    1111
1678IC1 64M 7422    83DD
1679IC2 64M 7F26    A93D
1680IC3 64M 8E02    D3FC
1681IC4 64M 2545    F734
1682IC5 64M E197    B75D
1683IC6 64M 9453    CF75
1684IC7 64M 29AC    2FEB
1685IC8 64M 0434    2E9E
1686IC9 64M C86E    79E6
1687IC10    64M C67A    BF14
1688IC11    64M F590    D280
1689
1690*/
1691
1692ROM_START( vtennis )
1693   ROM_REGION( 0x200000, "maincpu", 0)
1694   NAOMI_BIOS
1695
1696   ROM_REGION( 0x6000000, "user1", 0)
1697   ROM_LOAD("epr22927.22", 0x0000000, 0x0400000,  CRC(89781723) SHA1(cf644aa66abcec6964d77485a0292f11ba80dd0d) )
1698   ROM_RELOAD( 0x400000, 0x400000)
1699   ROM_LOAD("ic1.bin", 0x0800000, 0x0800000, CRC(903873e5) SHA1(09af791bc02cca0e2dc72187679830ed9f4fc772) )
1700   ROM_LOAD("ic2.bin", 0x1000000, 0x0800000, CRC(5f020fa6) SHA1(bd2519be8c88ff34cf2fd2b17271d2b41b64ce9f) )
1701   ROM_LOAD("ic3.bin", 0x1800000, 0x0800000, CRC(3c3bf533) SHA1(db43ca9332e76b968b9b388b4824b768f82b9859) )
1702   ROM_LOAD("ic4.bin", 0x2000000, 0x0800000, CRC(3d8dd003) SHA1(91f494b06b9977215ab726a2499b5855d4d49e81) )
1703   ROM_LOAD("ic5.bin", 0x2800000, 0x0800000, CRC(efd781d4) SHA1(ced5a8dc8ff7677b3cac2a4fae04670c46cc96af) )
1704   ROM_LOAD("ic6.bin", 0x3000000, 0x0800000, CRC(79e75be1) SHA1(82318613c947907e01bbe50569b05ef24789d7c9) )
1705   ROM_LOAD("ic7.bin", 0x3800000, 0x0800000, CRC(44bd3883) SHA1(5c595d903d8865bf8bf3aafb1f527bff232718ed) )
1706   ROM_LOAD("ic8.bin", 0x4000000, 0x0800000, CRC(9ebdf0f8) SHA1(f1b688bda387fc00c70cb6a0c374c6c13926c138) )
1707   ROM_LOAD("ic9.bin", 0x4800000, 0x0800000, CRC(ecde9d57) SHA1(1fbe7fdf66a56f4f1765baf113dff95142bfd114) )
1708   ROM_LOAD("ic10.bin",0x5000000, 0x0800000, CRC(81057e42) SHA1(d41137ae28c64dbdb50150db8cf25851bc0709c4) )
1709   ROM_LOAD("ic11.bin",0x5800000, 0x0800000, CRC(57eec89d) SHA1(dd8f9a9155e51ee5260f559449fb0ea245077952) )
1710ROM_END
1711
1712
1713/*
1714
1715SYSTEMID: NAOMI
14351716JAP:  DERBY OWNERS CLUB ------------
14361717USA:  DERBY OWNERS CLUB ------------
14371718EXP:  DERBY OWNERS CLUB IN EXPORT --
r4441r4442
17892070   ROM_LOAD("mpr-22034.ic10",0x5000000, 0x0800000, CRC(3aa5ce5e) SHA1(f00a906235e4522d6fc2ac771324114346875314) )
17902071ROM_END
17912072
2073
17922074/*
17932075
17942076SYSTEMID: NAOMI
2077JAP: SLASHOUT JAPAN VERSION
2078USA: SLASHOUT USA VERSION
2079EXP: SLASHOUT EXPORT VERSION
2080
2081NO.  Type   Byte    Word
2082IC22 32M    0000    0000
2083IC1  64M    D1BF    FB18
2084IC2  64M    1F98    4295
2085IC3  64M    5F61    67E3
2086IC4  64M    C6A4    449B
2087IC5  64M    BB2A    58AB
2088IC6  64M    60B2    5262
2089IC7  64M    178B    3705
2090IC8  64M    E4B9    FF46
2091IC9  64M    D4FC    2273
2092IC10 64M    6BA5    8087
2093IC11 64M    7DBA    A143
2094IC12 64M    B708    0C61
2095IC13 64M    0C4A    8DF0
2096IC14 64M    B2FF    A057
2097IC15 64M    60DB    3D06
2098IC16 64M    B5EA    4965
2099IC17 64M    6586    1F3F
2100
2101*/
2102
2103ROM_START( slasho )
2104   ROM_REGION( 0x200000, "maincpu", 0)
2105   NAOMI_BIOS
2106
2107   ROM_REGION( 0x9000000, "user1", 0)
2108   ROM_LOAD("epr23341.22", 0x0000000, 0x0400000,  CRC(477fa123) SHA1(d2474766dcd0b0e5fe317a858534829eb1c26789) )
2109   ROM_RELOAD( 0x400000, 0x400000)
2110   ROM_LOAD("ic1.bin", 0x0800000, 0x0800000, CRC(8624493a) SHA1(4fe940a889619f2a75c45e15efb2b8ed9020bc55) )
2111   ROM_LOAD("ic2.bin", 0x1000000, 0x0800000, CRC(f952d0d4) SHA1(4b5403b98bf977c1e3a045619e1eddb4e4ab69c7) )
2112   ROM_LOAD("ic3.bin", 0x1800000, 0x0800000, CRC(6c5ce16e) SHA1(110b5d536557ab6610a7c32db2e6e46901da9579) )
2113   ROM_LOAD("ic4.bin", 0x2000000, 0x0800000, CRC(1b3d02a0) SHA1(3e02a0cb3d945e5d6cea03236d6571d45a7afd51) )
2114   ROM_LOAD("ic5.bin", 0x2800000, 0x0800000, CRC(50053662) SHA1(3ced87ee533fd7a32d64c41f1fcbde9c648ab188) )
2115   ROM_LOAD("ic6.bin", 0x3000000, 0x0800000, CRC(96148e80) SHA1(c0f30556395edb9a7558006e89d6adc2f6bdc048) )
2116   ROM_LOAD("ic7.bin", 0x3800000, 0x0800000, CRC(15f2f9a1) SHA1(9cea71b6f6466ccd840218f5dcb09ea7525208d8) )
2117   ROM_LOAD("ic8.bin", 0x4000000, 0x0800000, CRC(a084ab51) SHA1(1f5c863012004bbeefc82b172a92011a175428a6) )
2118   ROM_LOAD("ic9.bin", 0x4800000, 0x0800000, CRC(50539e17) SHA1(38ec16a868c892e177fbb45be563e1b649956550) )
2119   ROM_LOAD("ic10.bin",0x5000000, 0x0800000, CRC(29891831) SHA1(f318bca11ac5eb24b32d5b910a596280221a44ab) )
2120   ROM_LOAD("ic11.bin",0x5800000, 0x0800000, CRC(c1ad0614) SHA1(e38ff316da889eb029d0a9348f6b2284f3a36f29) )
2121   ROM_LOAD("ic12.bin",0x6000000, 0x0800000, CRC(faeb25ed) SHA1(623f3f78c94ba44e77491c18a6521a19b1101a67) )
2122   ROM_LOAD("ic13.bin",0x6800000, 0x0800000, CRC(63589d0f) SHA1(53770cc1268892e8cdb76b6edf2fb39e8b605554) )
2123   ROM_LOAD("ic14.bin",0x7000000, 0x0800000, CRC(2bc46263) SHA1(38ec579768ac37ed3ad21911b1970241906af8ea) )
2124   ROM_LOAD("ic15.bin",0x7800000, 0x0800000, CRC(323e4db2) SHA1(c5484589c1613110faef6cf8b8f4def8867a8226) )
2125   ROM_LOAD("ic16.bin",0x8000000, 0x0800000, CRC(fd8c2736) SHA1(34ae1a4e35b4aac6666719fb4fc0959bd64ff3d6) )
2126   ROM_LOAD("ic17.bin",0x8800000, 0x0800000, CRC(001604f8) SHA1(615ec027d383d44d4aadb1175be6320e4139d7d1) )
2127ROM_END
2128
2129
2130/*
2131
2132SYSTEMID: NAOMI
17952133JAP: MOERO JUSTICE GAKUEN  JAPAN
17962134USA: PROJECT JUSTICE  USA
17972135EXP: PROJECT JUSTICE  EXPORT
r4441r4442
20552393/*
20562394
20572395SYSTEMID: NAOMI
2058JAP: SLASHOUT JAPAN VERSION
2059USA: SLASHOUT USA VERSION
2060EXP: SLASHOUT EXPORT VERSION
2061
2062NO.  Type   Byte    Word
2063IC22 32M    0000    0000
2064IC1  64M    D1BF    FB18
2065IC2  64M    1F98    4295
2066IC3  64M    5F61    67E3
2067IC4  64M    C6A4    449B
2068IC5  64M    BB2A    58AB
2069IC6  64M    60B2    5262
2070IC7  64M    178B    3705
2071IC8  64M    E4B9    FF46
2072IC9  64M    D4FC    2273
2073IC10 64M    6BA5    8087
2074IC11 64M    7DBA    A143
2075IC12 64M    B708    0C61
2076IC13 64M    0C4A    8DF0
2077IC14 64M    B2FF    A057
2078IC15 64M    60DB    3D06
2079IC16 64M    B5EA    4965
2080IC17 64M    6586    1F3F
2081
2082*/
2083
2084ROM_START( slasho )
2085   ROM_REGION( 0x200000, "maincpu", 0)
2086   NAOMI_BIOS
2087
2088   ROM_REGION( 0x400000, "user1", 0)
2089   ROM_LOAD("epr23341.22", 0x0000000, 0x0400000,  CRC(477fa123) SHA1(d2474766dcd0b0e5fe317a858534829eb1c26789) )
2090
2091   ROM_REGION( 0x8800000, "user2", 0)
2092   ROM_LOAD("ic1", 0x0000000, 0x0800000, NO_DUMP )
2093   ROM_LOAD("ic2", 0x0800000, 0x0800000, NO_DUMP )
2094   ROM_LOAD("ic3", 0x1000000, 0x0800000, NO_DUMP )
2095   ROM_LOAD("ic4", 0x1800000, 0x0800000, NO_DUMP )
2096   ROM_LOAD("ic5", 0x2000000, 0x0800000, NO_DUMP )
2097   ROM_LOAD("ic6", 0x2800000, 0x0800000, NO_DUMP )
2098   ROM_LOAD("ic7", 0x3000000, 0x0800000, NO_DUMP )
2099   ROM_LOAD("ic8", 0x3800000, 0x0800000, NO_DUMP )
2100   ROM_LOAD("ic9", 0x4000000, 0x0800000, NO_DUMP )
2101   ROM_LOAD("ic10",0x4800000, 0x0800000, NO_DUMP )
2102   ROM_LOAD("ic11",0x5000000, 0x0800000, NO_DUMP )
2103   ROM_LOAD("ic12",0x5800000, 0x0800000, NO_DUMP )
2104   ROM_LOAD("ic13",0x6000000, 0x0800000, NO_DUMP )
2105   ROM_LOAD("ic14",0x6800000, 0x0800000, NO_DUMP )
2106   ROM_LOAD("ic15",0x7000000, 0x0800000, NO_DUMP )
2107   ROM_LOAD("ic16",0x7800000, 0x0800000, NO_DUMP )
2108   ROM_LOAD("ic17",0x8000000, 0x0800000, NO_DUMP )
2109ROM_END
2110
2111/*
2112
2113SYSTEMID: NAOMI
21142396JAP: SPAWN JAPAN
21152397USA: SPAWN USA
21162398EXP: SPAWN EURO
r4441r4442
22922574/*
22932575
22942576SYSTEMID: NAOMI
2295JAP:  POWER SMASH --------------
2296USA:  VIRTUA TENNIS IN USA -----
2297EXP:  VIRTUA TENNIS IN EXPORT --
2298
2299NO. Type    Byte    Word
2300IC22    32M 0000    1111
2301IC1 64M 7422    83DD
2302IC2 64M 7F26    A93D
2303IC3 64M 8E02    D3FC
2304IC4 64M 2545    F734
2305IC5 64M E197    B75D
2306IC6 64M 9453    CF75
2307IC7 64M 29AC    2FEB
2308IC8 64M 0434    2E9E
2309IC9 64M C86E    79E6
2310IC10    64M C67A    BF14
2311IC11    64M F590    D280
2312
2313*/
2314
2315ROM_START( vtennis )
2316   ROM_REGION( 0x200000, "maincpu", 0)
2317   NAOMI_BIOS
2318
2319   ROM_REGION( 0x400000, "user1", 0)
2320   ROM_LOAD("epr22927.22", 0x0000000, 0x0400000,  CRC(89781723) SHA1(cf644aa66abcec6964d77485a0292f11ba80dd0d) )
2321
2322   ROM_REGION( 0x5800000, "user2", 0)
2323   ROM_LOAD("ic1", 0x0000000, 0x0800000, NO_DUMP )
2324   ROM_LOAD("ic2", 0x0800000, 0x0800000, NO_DUMP )
2325   ROM_LOAD("ic3", 0x1000000, 0x0800000, NO_DUMP )
2326   ROM_LOAD("ic4", 0x1800000, 0x0800000, NO_DUMP )
2327   ROM_LOAD("ic5", 0x2000000, 0x0800000, NO_DUMP )
2328   ROM_LOAD("ic6", 0x2800000, 0x0800000, NO_DUMP )
2329   ROM_LOAD("ic7", 0x3000000, 0x0800000, NO_DUMP )
2330   ROM_LOAD("ic8", 0x3800000, 0x0800000, NO_DUMP )
2331   ROM_LOAD("ic9", 0x4000000, 0x0800000, NO_DUMP )
2332   ROM_LOAD("ic10",0x4800000, 0x0800000, NO_DUMP )
2333   ROM_LOAD("ic11",0x5000000, 0x0800000, NO_DUMP )
2334ROM_END
2335
2336/*
2337
2338SYSTEMID: NAOMI
23392577JAP: ZOMBIE REVENGE IN JAPAN
23402578USA: ZOMBIE REVENGE IN USA
23412579EXP: ZOMBIE REVENGE IN EXPORT
r4441r4442
27262964GAME( 1999, vs2_2k,   naomi,    naomi,    naomi,    0, ROT0, "Sega",            "Virtua Striker 2 Ver. 2000 (JPN, USA, EXP, KOR, AUS)", GAME_NO_SOUND|GAME_NOT_WORKING )
27272965GAME( 1999, smarinef, naomi,    naomi,    naomi,    0, ROT0, "Sega",            "Sega Marine Fishing", GAME_NO_SOUND|GAME_NOT_WORKING )
27282966GAME( 1999, toyfight, naomi,    naomi,    naomi,    0, ROT0, "Sega",            "Toy Fighter", GAME_NO_SOUND|GAME_NOT_WORKING )
2967GAME( 1999, doa2,     naomi,    naomi,    naomi,    0, ROT0, "Tecmo",           "Dead or Alive 2 (JPN, USA, EXP, KOR, AUS)", GAME_NO_SOUND|GAME_NOT_WORKING )
2968GAME( 2000, doa2m,    doa2,     naomi,    naomi,    0, ROT0, "Tecmo",           "Dead or Alive 2 Millennium (JPN, USA, EXP, KOR, AUS)", GAME_NO_SOUND|GAME_NOT_WORKING )
2969GAME( 1999, vtennis,  naomi,    naomi,    naomi,    0, ROT0, "Sega",            "Power Smash (JPN) / Virtua Tennis (USA, EXP, KOR, AUS)", GAME_NO_SOUND|GAME_NOT_WORKING )
2970GAME( 2000, slasho,   naomi,    naomi,    naomi,    0, ROT0, "Sega",            "Slashout (JPN, USA, EXP, KOR, AUS)", GAME_NO_SOUND|GAME_NOT_WORKING )
27292971
2972
27302973/* Incomplete Dumps (just the program rom IC22) */
27312974GAME( 2000, cspike,   naomi,    naomi,    naomi,    0, ROT0, "Psikyo / Capcom", "Gun Spike (JPN) / Cannon Spike (USA, EXP, KOR, AUS)", GAME_NO_SOUND|GAME_NOT_WORKING )
27322975GAME( 2000, capsnk,   naomi,    naomi,    naomi,    0, ROT0, "Capcom / SNK",    "Capcom Vs. SNK Millennium Fight 2000 (JPN, USA, EXP, KOR, AUS)", GAME_NO_SOUND|GAME_NOT_WORKING )
r4441r4442
27412984GAME( 2000, pstone2,  naomi,    naomi,    naomi,    0, ROT0, "Capcom",          "Power Stone 2 (JPN, USA, EUR, ASI, AUS)", GAME_NO_SOUND|GAME_NOT_WORKING )
27422985GAME( 1999, otrigger, naomi,    naomi,    naomi,    0, ROT0, "Sega",            "OutTrigger (JPN, USA, EXP, KOR, AUS)", GAME_NO_SOUND|GAME_NOT_WORKING )
27432986GAME( 1999, samba,    naomi,    naomi,    naomi,    0, ROT0, "Sega",            "Samba De Amigo (JPN)", GAME_NO_SOUND|GAME_NOT_WORKING )
2744GAME( 2000, slasho,   naomi,    naomi,    naomi,    0, ROT0, "Sega",            "Slashout (JPN, USA, EXP, KOR, AUS)", GAME_NO_SOUND|GAME_NOT_WORKING )
27452987GAME( 1999, spawn,    naomi,    naomi,    naomi,    0, ROT0, "Capcom",          "Spawn (JPN, USA, EUR, ASI, AUS)", GAME_NO_SOUND|GAME_NOT_WORKING )
27462988GAME( 2000, virnba,   naomi,    naomi,    naomi,    0, ROT0, "Sega",            "Virtua NBA (JPN, USA, EXP, KOR, AUS)", GAME_NO_SOUND|GAME_NOT_WORKING )
2747GAME( 1999, vtennis,  naomi,    naomi,    naomi,    0, ROT0, "Sega",            "Power Smash (JPN) / Virtua Tennis (USA, EXP, KOR, AUS)", GAME_NO_SOUND|GAME_NOT_WORKING )
27482989GAME( 1999, zombrvn,  naomi,    naomi,    naomi,    0, ROT0, "Sega",            "Zombie Revenge (JPN, USA, EXP, KOR, AUS)", GAME_NO_SOUND|GAME_NOT_WORKING )
2749GAME( 1999, doa2,     naomi,    naomi,    naomi,    0, ROT0, "Tecmo",           "Dead or Alive 2 (JPN, USA, EXP, KOR, AUS)", GAME_NO_SOUND|GAME_NOT_WORKING )
2750GAME( 2000, doa2m,    doa2,     naomi,    naomi,    0, ROT0, "Tecmo",           "Dead or Alive 2 Millennium (JPN, USA, EXP, KOR, AUS)", GAME_NO_SOUND|GAME_NOT_WORKING )
27512990GAME( 1998, dybbnao,  naomi,    naomi,    naomi,    0, ROT0, "Sega",            "Dynamite Baseball NAOMI (JPN)", GAME_NO_SOUND|GAME_NOT_WORKING )
27522991
27532992/* Games with game specific bios sets */
r4441r4442
28213060   ROM_REGION( 0x10000000, "user1", ROMREGION_ERASE) // allocate max size in init instead?
28223061
28233062   DISK_REGION( "gdrom" )
2824   DISK_IMAGE_READONLY( "gdl-0007a", 0, SHA1(d6da7a404e5f22df6d4bb049143391cf4505c492) )
3063   DISK_IMAGE_READONLY( "gdl-0007a", 0, SHA1(56510390667b39b3915d8bc078660cbe093cf566) )
28253064
28263065   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE)
28273066   //PIC16C622A (317-5078-COM)
r4441r4442
28593098ROM_END
28603099
28613100
3101ROM_START( moeru )
3102   NAOMIGD_BIOS
3103
3104   ROM_REGION( 0x10000000, "user1", ROMREGION_ERASE) // allocate max size in init instead?
3105
3106   DISK_REGION( "gdrom" )
3107   DISK_IMAGE_READONLY( "gdl-0013", 0, SHA1(c8869069c28bc8eec96d820886bc388d69d46143) )
3108
3109   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE)
3110   ROM_LOAD("gdl-0013.data", 0x00, 0x50, CRC(56de2066) SHA1(a16a6d9f7272d3f8d322c85222a0487a87811910) )
3111ROM_END
3112
28623113ROM_START( chocomk )
28633114   NAOMIGD_BIOS
28643115
r4441r4442
28883139   ROM_LOAD("317-5090-jpn.data", 0x00, 0x50, CRC(b4dd88f6) SHA1(c9aacd79c1088225fa5a69b7bd31a7c1286160e1) )
28893140ROM_END
28903141
3142
3143
28913144ROM_START( ggxxrl )
28923145   NAOMIGD_BIOS
28933146
r4441r4442
29023155   ROM_LOAD("317-5092-jpn.data", 0x00, 0x50, CRC(7c8cca4b) SHA1(92c5a0fd8916744eefc023e64daea69803573928) )
29033156ROM_END
29043157
3158ROM_START( tetkiwam )
3159   NAOMIGD_BIOS
3160
3161   ROM_REGION( 0x10000000, "user1", ROMREGION_ERASE) // allocate max size in init instead?
3162
3163   DISK_REGION( "gdrom" )
3164   DISK_IMAGE_READONLY( "gdl-0020", 0, SHA1(7b2ef47ca2038d6a93615b760b03e8f7cb1b83c2) )
3165
3166   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE)
3167   //PIC16C622A (317-5095-JPN)
3168   //(sticker 253-5509-5095J)
3169   ROM_LOAD("gdl-0020.data", 0x00, 0x50, CRC(06bc5013) SHA1(f7a46b7e34b20409ce2fdae80e5cdfff7adb9c64) )
3170ROM_END
3171
3172
29053173ROM_START( shikgam2 )
29063174   NAOMIGD_BIOS
29073175
r4441r4442
29163184   ROM_LOAD("317-5095-jpn.data", 0x00, 0x50, CRC(6033ec89) SHA1(9e99a8ad43fa29296dbf2e13b3a3d4552130b4e8) )
29173185ROM_END
29183186
3187ROM_START( usagui )
3188   NAOMIGD_BIOS
3189
3190   ROM_REGION( 0x10000000, "user1", ROMREGION_ERASE) // allocate max size in init instead?
3191
3192   DISK_REGION( "gdrom" )
3193   DISK_IMAGE_READONLY( "gdl-0022", 0, SHA1(45deba05a12abbf6390c0fc0e4cdeaedfa7d2ca5) )
3194
3195   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE)
3196   //PIC16C622A (317-5095-JPN)
3197   //(sticker 253-5509-5095J)
3198   ROM_LOAD("gdl-0022.data", 0x00, 0x50, CRC(621e827a) SHA1(cdc7580f5d1dfe85d2806233f22bc4f13fd62946) )
3199ROM_END
3200
3201
29193202ROM_START( bdrdown )
29203203   NAOMIGD_BIOS
29213204
r4441r4442
29453228ROM_END
29463229
29473230
3231ROM_START( cfield )
3232   NAOMIGD_BIOS
29483233
3234   ROM_REGION( 0x10000000, "user1", ROMREGION_ERASE) // allocate max size in init instead?
3235
3236   DISK_REGION( "gdrom" )
3237   DISK_IMAGE_READONLY( "gdl-0025", 0, SHA1(be0d88eb4f48403a2ceaa7ef588ed60b96ba93bf) )
3238
3239
3240   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE)
3241   ROM_LOAD("gdl-0025.data", 0x00, 0x50, CRC(32adf2eb) SHA1(d86752e6fe9ccac093c512828fca5b7ae62a3ff2) )
3242ROM_END
3243
3244
29493245ROM_START( trizeal )
29503246   NAOMIGD_BIOS
29513247
r4441r4442
30213317   ROM_LOAD("317-5108-jpn.data", 0x00, 0x50, CRC(6a2eb334) SHA1(cab407d2e994f33aa921d50f399b17e6fbf98eb0) )
30223318ROM_END
30233319
3320ROM_START( radirgy )
3321   NAOMIGD_BIOS
30243322
3323   ROM_REGION( 0x10000000, "user1", ROMREGION_ERASE) // allocate max size in init instead?
3324
3325   DISK_REGION( "gdrom" )
3326   DISK_IMAGE_READONLY( "gdl-0032", 0, SHA1(ebd7a40e59082e660ebf9a2d4ae7cb64371dae8d) )
3327
3328
3329   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE)
3330   ROM_LOAD("gdl-0032.data", 0x00, 0x50, CRC(04e4ac45) SHA1(4102a4d68f20a7e78f6c7e3494e7229018e30e39) )
3331ROM_END
3332
3333
3334
30253335ROM_START( ggxxsla )
30263336   NAOMIGD_BIOS
30273337
r4441r4442
30373347ROM_END
30383348
30393349
3350ROM_START( kurucham )
3351   NAOMIGD_BIOS
3352
3353   ROM_REGION( 0x10000000, "user1", ROMREGION_ERASE) // allocate max size in init instead?
3354
3355   DISK_REGION( "gdrom" )
3356   DISK_IMAGE_READONLY( "gdl-0034", 0, SHA1(10fd7edb0b620133c003d686e5af2ed27004fa09) )
3357
3358
3359   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE)
3360   ROM_LOAD("gdl-0034.data", 0x00, 0x50,  CRC(f40072a8) SHA1(366df2079a4d2ff7a93082c9bf849aad40ab079d) )
3361ROM_END
3362
30403363ROM_START( undefeat )
30413364   NAOMIGD_BIOS
30423365
r4441r4442
30533376ROM_END
30543377
30553378
3379ROM_START( meltyb )
3380   NAOMIGD_BIOS
30563381
3382   ROM_REGION( 0x10000000, "user1", ROMREGION_ERASE) // allocate max size in init instead?
3383
3384   DISK_REGION( "gdrom" )
3385   DISK_IMAGE_READONLY( "gdl-0039", 0, SHA1(ffc7f6e113ad69422a4f22f318bdf9b1dc5c25db) )
3386
3387   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE)
3388   //PIC16C622A (317-5104-JPN)
3389   //(sticker 253-5509-5104J)
3390   ROM_LOAD("gdl-0039.data", 0x00, 0x50, CRC(4d6e2c77) SHA1(3bed734c291140d0a61afa40f221395369a251a9) )
3391ROM_END
3392
3393ROM_START( meltyba )
3394   NAOMIGD_BIOS
3395
3396   ROM_REGION( 0x10000000, "user1", ROMREGION_ERASE) // allocate max size in init instead?
3397
3398   DISK_REGION( "gdrom" )
3399   DISK_IMAGE_READONLY( "gdl-0039a", 0, SHA1(e6aa3d65b43a20606e6754bcb8665438770a1f8c) )
3400
3401   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE)
3402   //PIC16C622A (317-5104-JPN)
3403   //(sticker 253-5509-5104J)
3404   ROM_LOAD("gdl-0039.data", 0x00, 0x50, CRC(4d6e2c77) SHA1(3bed734c291140d0a61afa40f221395369a251a9) )
3405ROM_END
3406
3407
30573408ROM_START( trgheart )
30583409   NAOMIGD_BIOS
30593410
r4441r4442
30843435   ROM_LOAD("317-5122-jpn.data", 0x00, 0x50, CRC(0b85b7e4) SHA1(f4e419682ddc4b98a330e5ae543f9276c9bde030) )
30853436ROM_END
30863437
3438ROM_START( karous )
3439   NAOMIGD_BIOS
30873440
3441   ROM_REGION( 0x10000000, "user1", ROMREGION_ERASE) // allocate max size in init instead?
30883442
3443   DISK_REGION( "gdrom" )
3444   DISK_IMAGE_READONLY( "gdl-0040", 0, SHA1(a62c8d4b6c5be44a4aeeea1a1a94f3d0fe542593) )
30893445
3446   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE)
3447   ROM_LOAD("gdl-0040.data", 0x00, 0x50, CRC(9d37b5e3) SHA1(e1d3cdc2ed82c864c9ff54d9399a80b70ba150c5) )
3448ROM_END
3449
3450
3451ROM_START( takoron )
3452   NAOMIGD_BIOS
3453
3454   ROM_REGION( 0x10000000, "user1", ROMREGION_ERASE) // allocate max size in init instead?
3455
3456   DISK_REGION( "gdrom" )
3457   DISK_IMAGE_READONLY( "gdl-0042", 0, SHA1(984a4fa012d83dd8c748304958c847c9867f4125) )
3458
3459   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE)
3460   ROM_LOAD("gdl-0042.data", 0x00, 0x50, CRC(e1a6dbe4) SHA1(61b458937acca55e4010f86b684aaa86b8c10eac) )
3461ROM_END
3462
3463/* -------------------------------- 1st party -------------- */
3464
3465
3466/*
3467Title   CONFIDENTIAL MISSION
3468Media ID    FFCA
3469Media Config    GD-ROM1/1
3470Regions J
3471Peripheral String   0000000
3472Product Number  GDS-0001
3473Version V1.050
3474Release Date    20001011
3475Manufacturer ID SEGA ENTERPRISES
3476TOC DISC
3477Track   Start Sector    End Sector  Track Size
3478track01.bin 150 3788    8558928
3479track02.raw 3939    6071    5016816
3480track03.bin 45150   549299  1185760800
3481
3482
3483PIC
3484317-0298-COM
3485*/
3486
3487ROM_START( confmiss )
3488   NAOMIGD_BIOS
3489
3490   ROM_REGION( 0x10000000, "user1", ROMREGION_ERASE) // allocate max size in init instead?
3491
3492   DISK_REGION( "gdrom" )
3493   DISK_IMAGE_READONLY( "gds-0001", 0, SHA1(bd05f197ba8643577883dd25d9d5a74c91b27ca9) )
3494
3495   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE)
3496   ROM_LOAD("317-0298-com.data", 0x00, 0x50, CRC(c989b336) SHA1(40075500888626cc2261133eec496b3e753631e5) )
3497ROM_END
3498
3499
30903500ROM_START( sprtjam )
30913501   NAOMIGD_BIOS
30923502
r4441r4442
31313541   ROM_LOAD("317-0303-com.data", 0x00, 0x50, CRC(6e7888a3) SHA1(5ca78052bcfd9e9f81934cbddd9c173e88973e0e) )
31323542ROM_END
31333543
3544/*
3545Title   MONKEY_BALL
3546Media ID    43EB
3547Media Config    GD-ROM1/1
3548Regions J
3549Peripheral String   0000000
3550Product Number  GDS-0008
3551Version V1.008
3552Release Date    20010425
3553Manufacturer ID
3554Track   Start Sector    End Sector  Track Size
3555track01.bin 150 449 705600
3556track02.raw 600 2732    5016816
3557track03.bin 45150   549299  1185760800
31343558
3559
3560PIC
3561
3562253-5508-0307
3563317-0307-COM
3564*/
3565
3566ROM_START( monkeyba )
3567   NAOMIGD_BIOS
3568
3569   ROM_REGION( 0x10000000, "user1", ROMREGION_ERASE) // allocate max size in init instead?
3570
3571   DISK_REGION( "gdrom" )
3572   DISK_IMAGE_READONLY( "gds-0008", 0, SHA1(2fadcd141bdbde77b2b335b270959a516af44d99) )
3573
3574   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE)
3575   ROM_LOAD("317-0307-com.data", 0x00, 0x50, CRC(448bedc7) SHA1(092dbe5e28890d3ee40d62ca8cbf225c3ce90304) )
3576ROM_END
3577
3578
31353579ROM_START( dygolf )
31363580   NAOMIGD_BIOS
31373581
r4441r4442
31743618   ROM_LOAD("317-0312-com.data", 0x00, 0x50, CRC(6b24f78f) SHA1(43f89815ec46cf014d941b4b9238da044b338b4c) )
31753619ROM_END
31763620
3621ROM_START( keyboard )
3622   NAOMIGD_BIOS
31773623
3624   ROM_REGION( 0x10000000, "user1", ROMREGION_ERASE) // allocate max size in init instead?
3625
3626   DISK_REGION( "gdrom" )
3627   DISK_IMAGE_READONLY( "gds-0017", 0, SHA1(fb86eff3ef38de7fd78cfde897d5332d2092c172) )
3628
3629   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE)
3630   ROM_LOAD("gds-0017.data", 0x00, 0x50, CRC(c1277eb3) SHA1(529ed5a133550e2854f8656cd377706060a7befa) )
3631ROM_END
3632
31783633ROM_START( vathlete )
31793634   NAOMIGD_BIOS
31803635
r4441r4442
32253680   ROM_LOAD("317-0318-exp.data", 0x00, 0x50, CRC(7758ade6) SHA1(c62f35810bce466bfb0f55fd555066efd53e9bb6) )
32263681ROM_END
32273682
3228/*
3229Title   MONKEY_BALL
3230Media ID    43EB
3231Media Config    GD-ROM1/1
3232Regions J
3233Peripheral String   0000000
3234Product Number  GDS-0008
3235Version V1.008
3236Release Date    20010425
3237Manufacturer ID
3238Track   Start Sector    End Sector  Track Size
3239track01.bin 150 449 705600
3240track02.raw 600 2732    5016816
3241track03.bin 45150   549299  1185760800
3242
3243
3244PIC
3245
3246253-5508-0307
3247317-0307-COM
3248*/
3249
3250ROM_START( monkeyba )
3683ROM_START( lupinsho )
32513684   NAOMIGD_BIOS
32523685
32533686   ROM_REGION( 0x10000000, "user1", ROMREGION_ERASE) // allocate max size in init instead?
32543687
32553688   DISK_REGION( "gdrom" )
3256   DISK_IMAGE_READONLY( "gds-0008", 0, SHA1(2fadcd141bdbde77b2b335b270959a516af44d99) )
3689   DISK_IMAGE_READONLY( "gds-0018", 0, SHA1(0633a99a666f363ab30450a76b9753685d6b1f57) )
32573690
32583691   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE)
3259   ROM_LOAD("317-0307-com.data", 0x00, 0x50, CRC(448bedc7) SHA1(092dbe5e28890d3ee40d62ca8cbf225c3ce90304) )
3692   ROM_LOAD("317-0332-j.data", 0x00, 0x50, CRC(31f2b632) SHA1(bbf253bfe831308a7e7fde3a4a28e5bcd2fbb273) )
32603693ROM_END
32613694
32623695ROM_START( luptype )
r4441r4442
33073740   ROM_LOAD("317-0333-com.data", 0x00, 0x50, CRC(0c07970f) SHA1(8882dd2f8ed522790ea78eed80cfa9442f88f67b) )
33083741ROM_END
33093742
3310ROM_START( lupinsho )
3743ROM_START( ngdup23a )
33113744   NAOMIGD_BIOS
33123745
33133746   ROM_REGION( 0x10000000, "user1", ROMREGION_ERASE) // allocate max size in init instead?
33143747
33153748   DISK_REGION( "gdrom" )
3316   DISK_IMAGE_READONLY( "gds-0018", 0, SHA1(0633a99a666f363ab30450a76b9753685d6b1f57) )
3749   DISK_IMAGE_READONLY( "gds-0023a", 0, SHA1(cd9d808b59eb8f40673ec4353d476f2b9c7f783c) )
33173750
3318   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE)
3319   ROM_LOAD("317-0332-j.data", 0x00, 0x50, CRC(31f2b632) SHA1(bbf253bfe831308a7e7fde3a4a28e5bcd2fbb273) )
3751   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE) // uses the vf4 pic
3752   //PIC16C622A (317-0314-COM)
3753   //(sticker 253-5508-0314)
3754   ROM_LOAD("317-0314-com.data", 0x00, 0x50, CRC(91a97eb4) SHA1(059342368bc5d25b494ed3c729870695f9584fc7) )
33203755ROM_END
33213756
3322/*
3323Title   CONFIDENTIAL MISSION
3324Media ID    FFCA
3325Media Config    GD-ROM1/1
3326Regions J
3327Peripheral String   0000000
3328Product Number  GDS-0001
3329Version V1.050
3330Release Date    20001011
3331Manufacturer ID SEGA ENTERPRISES
3332TOC DISC
3333Track   Start Sector    End Sector  Track Size
3334track01.bin 150 3788    8558928
3335track02.raw 3939    6071    5016816
3336track03.bin 45150   549299  1185760800
3337
3338
3339PIC
3340317-0298-COM
3341*/
3342
3343ROM_START( confmiss )
3757ROM_START( ngdup23c )
33443758   NAOMIGD_BIOS
33453759
33463760   ROM_REGION( 0x10000000, "user1", ROMREGION_ERASE) // allocate max size in init instead?
33473761
33483762   DISK_REGION( "gdrom" )
3349   DISK_IMAGE_READONLY( "gds-0001", 0, SHA1(bd05f197ba8643577883dd25d9d5a74c91b27ca9) )
3763   DISK_IMAGE_READONLY( "gds-0023c", 0, SHA1(1fcb5530748886f4c4f45487d047859182ff7496))
33503764
3351   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE)
3352   ROM_LOAD("317-0298-com.data", 0x00, 0x50, CRC(c989b336) SHA1(40075500888626cc2261133eec496b3e753631e5) )
3765   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE) // uses the vf4 evolution pic
3766   //PIC16C622A (317-0338-JPN)
3767   //(sticker 253-5508-0338J)
3768   ROM_LOAD("317-0338-jpn.data", 0x00, 0x50, CRC(eeb2c9e9) SHA1(d30b5914c603219daea9923e1cf8da2be6096742) )
33533769ROM_END
33543770
33553771ROM_START( puyofev )
r4441r4442
34303846
34313847
34323848/* Naomi GD-Rom Sets */
3433GAME( 2001, naomigd,   0,        naomi,    naomi, naomigd,       ROT0, "Sega",            "Naomi GD-ROM Bios", GAME_NO_SOUND|GAME_NOT_WORKING|GAME_IS_BIOS_ROOT )
3849GAME( 2001, naomigd,   0,        naomi,    naomi, naomigd,       ROT0, "Sega",           "Naomi GD-ROM Bios", GAME_NO_SOUND|GAME_NOT_WORKING|GAME_IS_BIOS_ROOT )
34343850
34353851// GDL-xxxx (licensed games?)
3436GAME( 2001, gundmgd,   naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Capcom",       "Mobile Suit Gundam: Federation VS Zeon (GDL-0001)", GAME_NO_SOUND|GAME_NOT_WORKING )
3437GAME( 2001, sfz3ugd,   naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Capcom",       "Street Fighter Zero 3 Upper (GDL-0002)", GAME_NO_SOUND|GAME_NOT_WORKING )
3438GAME( 2001, cvsgd,     naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Capcom",       "Capcom vs SNK Millenium Fight 2000 Pro (GDL-0004)", GAME_NO_SOUND|GAME_NOT_WORKING )
3439GAME( 2001, gundmxgd,  naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Capcom",       "Mobile Suit Gundam: Federation VS Zeon DX  (GDL-0006)", GAME_NO_SOUND|GAME_NOT_WORKING )
3440GAME( 2001, cvs2gd,    naomigd,  naomigd,  naomi, naomigd,    ROT0,   "Capcom",       "Capcom vs SNK 2 Millionaire Fighting 2001 (GDL-0007A)", GAME_NO_SOUND|GAME_NOT_WORKING )
3441GAME( 2001, ikaruga,   naomigd,  naomigd,  naomi, naomigd,   ROT270, "Treasure",     "Ikaruga (GDL-0010)", GAME_NO_SOUND|GAME_NOT_WORKING )
3442GAME( 2002, ggxx,      naomigd,  naomigd,  naomi, ggxx,      ROT0,   "Arc System Works",       "Guilty Gear XX (GDL-0011)", GAME_NO_SOUND|GAME_NOT_WORKING )
3443GAME( 2002, chocomk,   naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Ecole Software Corporation", "Musapey's Choco Marker (GDL-0014A)", GAME_NO_SOUND|GAME_NOT_WORKING )
3444GAME( 2002, quizqgd,   naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Amedio",       "Quiz Keitai Q mode (GDL-0017)", GAME_NO_SOUND|GAME_NOT_WORKING )
3445GAME( 2003, ggxxrl,    naomigd,  naomigd,  naomi, ggxxrl,    ROT0,   "Arc System Works",       "Guilty Gear XX #Reload (GDL-0019A)", GAME_NO_SOUND|GAME_NOT_WORKING )
3446GAME( 2003, shikgam2,  naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Alpha System", "Shikigami No Shiro II / The Castle of Shikigami II (GDL-0021)", GAME_NO_SOUND|GAME_NOT_WORKING )
3447GAME( 2004, bdrdown,   naomigd,  naomigd,  naomi, naomigd,   ROT0,   "G-Rev",        "Border Down (GDL-0023A)", GAME_NO_SOUND|GAME_NOT_WORKING )
3448GAME( 2003, psyvar2,   naomigd,  naomigd,  naomi, naomigd,   ROT0,   "G-Rev",        "Psyvariar 2 - The Will To Fabricate (GDL-0024)", GAME_NO_SOUND|GAME_NOT_WORKING )
3449GAME( 2004, trizeal,   naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Taito",        "Trizeal (GDL-0026)", GAME_NO_SOUND|GAME_NOT_WORKING )
3450GAME( 2004, meltybld,  naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Ecole",        "Melty Blood Act Cadenza (GDL-0028C)", GAME_NO_SOUND|GAME_NOT_WORKING )
3451GAME( 2005, senko,     naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Grev",         "Senko No Ronde (Rev. A)(GDL-0030A)", GAME_NO_SOUND|GAME_NOT_WORKING )
3452GAME( 2005, senkoo,    senko,    naomigd,  naomi, naomigd,   ROT0,   "Grev",         "Senko No Ronde (GDL-0030)", GAME_NO_SOUND|GAME_NOT_WORKING )
3453GAME( 2005, ss2005,    naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Starfish",     "Super Shanghai 2005 (GDL-0031A)", GAME_NO_SOUND|GAME_NOT_WORKING )
3454GAME( 2005, ggxxsla,   naomigd,  naomigd,  naomi, ggxxsla,   ROT0,   "Arc System Works",       "Guilty Gear XX Slash (GDL-0033A)", GAME_NO_SOUND|GAME_NOT_WORKING )
3455GAME( 2005, undefeat,  naomigd,  naomigd,  naomi, naomigd,   ROT0,   "GRev",         "Under Defeat (GDL-0035)", GAME_NO_SOUND|GAME_NOT_WORKING )
3456GAME( 2005, trgheart,  naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Warashi",      "Trigger Heart Exelica (GDL-0036A)", GAME_NO_SOUND|GAME_NOT_WORKING )
3457GAME( 2005, jingystm,  naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Yuki Enterprise",      "Jingi Storm - The Arcade (GDL-0037)", GAME_NO_SOUND|GAME_NOT_WORKING )
3852GAME( 2001, gundmgd,   naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Capcom",           "Mobile Suit Gundam: Federation VS Zeon (GDL-0001)", GAME_NO_SOUND|GAME_NOT_WORKING )
3853GAME( 2001, sfz3ugd,   naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Capcom",           "Street Fighter Zero 3 Upper (GDL-0002)", GAME_NO_SOUND|GAME_NOT_WORKING )
3854GAME( 2001, cvsgd,     naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Capcom",           "Capcom vs SNK Millenium Fight 2000 Pro (GDL-0004)", GAME_NO_SOUND|GAME_NOT_WORKING )
3855GAME( 2001, gundmxgd,  naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Capcom",           "Mobile Suit Gundam: Federation VS Zeon DX  (GDL-0006)", GAME_NO_SOUND|GAME_NOT_WORKING )
3856GAME( 2001, cvs2gd,    naomigd,  naomigd,  naomi, naomigd,    ROT0,   "Capcom",           "Capcom vs SNK 2 Millionaire Fighting 2001 (Rev A) (GDL-0007A)", GAME_NO_SOUND|GAME_NOT_WORKING )
3857GAME( 2001, ikaruga,   naomigd,  naomigd,  naomi, naomigd,   ROT270, "Treasure",         "Ikaruga (GDL-0010)", GAME_NO_SOUND|GAME_NOT_WORKING )
3858GAME( 2002, ggxx,      naomigd,  naomigd,  naomi, ggxx,      ROT0,   "Arc System Works", "Guilty Gear XX (GDL-0011)", GAME_NO_SOUND|GAME_NOT_WORKING )
3859GAME( 2002, moeru,     naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Altron",          "Moeru Casinyo (GDL-0013)", GAME_NO_SOUND|GAME_NOT_WORKING )
3860GAME( 2002, chocomk,   naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Ecole Software",   "Musapey's Choco Marker (Rev A) (GDL-0014A)", GAME_NO_SOUND|GAME_NOT_WORKING )
3861GAME( 2002, quizqgd,   naomigd,  naomigd,  naomi, naomigd,   ROT270, "Amedio",           "Quiz Keitai Q mode (GDL-0017)", GAME_NO_SOUND|GAME_NOT_WORKING )
3862GAME( 2003, ggxxrl,    naomigd,  naomigd,  naomi, ggxxrl,    ROT0,   "Arc System Works", "Guilty Gear XX #Reload (Rev A) (GDL-0019A)", GAME_NO_SOUND|GAME_NOT_WORKING )
3863GAME( 200?, tetkiwam,  naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Success",          "Tetris Kiwamemichi (GDL-0020)", GAME_NO_SOUND|GAME_NOT_WORKING )
3864GAME( 2003, shikgam2,  naomigd,  naomigd,  naomi, naomigd,   ROT270, "Alpha System",     "Shikigami No Shiro II / The Castle of Shikigami II (GDL-0021)", GAME_NO_SOUND|GAME_NOT_WORKING )
3865GAME( 2003, usagui,    naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Warashi",          "Usagui - Yamashiro Mahjong Hen (GDL-0022)", GAME_NO_SOUND|GAME_NOT_WORKING )
3866GAME( 2004, bdrdown,   naomigd,  naomigd,  naomi, naomigd,   ROT0,   "G-Rev",            "Border Down (Rev A) (GDL-0023A)", GAME_NO_SOUND|GAME_NOT_WORKING )
3867GAME( 2003, psyvar2,   naomigd,  naomigd,  naomi, naomigd,   ROT270, "G-Rev",            "Psyvariar 2 - The Will To Fabricate (GDL-0024)", GAME_NO_SOUND|GAME_NOT_WORKING )
3868GAME( 2004, cfield,    naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Able",             "Chaos Field (GDL-0025)", GAME_NO_SOUND|GAME_NOT_WORKING )
3869GAME( 2004, trizeal,   naomigd,  naomigd,  naomi, naomigd,   ROT270, "Taito",            "Trizeal (GDL-0026)", GAME_NO_SOUND|GAME_NOT_WORKING )
3870GAME( 2005, meltybld,  naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Ecole Software",   "Melty Blood Act Cadenza (Rev C) (GDL-0028C)", GAME_NO_SOUND|GAME_NOT_WORKING )
3871GAME( 2005, senko,     naomigd,  naomigd,  naomi, naomigd,   ROT0,   "G-Rev",            "Senko No Ronde NEW ver. (Rev A) (GDL-0030A)", GAME_NO_SOUND|GAME_NOT_WORKING )
3872GAME( 2005, senkoo,    senko,    naomigd,  naomi, naomigd,   ROT0,   "G-Rev",            "Senko No Ronde (GDL-0030)", GAME_NO_SOUND|GAME_NOT_WORKING )
3873GAME( 2005, ss2005,    naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Starfish",         "Super Shanghai 2005 (Rev A) (GDL-0031A)", GAME_NO_SOUND|GAME_NOT_WORKING )
3874GAME( 2005, radirgy,   naomigd,  naomigd,  naomi, naomigd,   ROT270, "Milestone",        "Radirgy (GDL-0032)", GAME_NO_SOUND|GAME_NOT_WORKING )
3875GAME( 2005, ggxxsla,   naomigd,  naomigd,  naomi, ggxxsla,   ROT0,   "Arc System Works", "Guilty Gear XX Slash (Rev A) (GDL-0033A)", GAME_NO_SOUND|GAME_NOT_WORKING )
3876GAME( 2006, kurucham,  naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Able",             "Kurukuru Chameleon (GDL-0034)", GAME_NO_SOUND|GAME_NOT_WORKING )
3877GAME( 2005, undefeat,  naomigd,  naomigd,  naomi, naomigd,   ROT270, "G-Rev",            "Under Defeat (GDL-0035)", GAME_NO_SOUND|GAME_NOT_WORKING )
3878GAME( 2005, trgheart,  naomigd,  naomigd,  naomi, naomigd,   ROT270, "Warashi",          "Trigger Heart Exelica (Rev A) (GDL-0036A)", GAME_NO_SOUND|GAME_NOT_WORKING )
3879GAME( 2005, jingystm,  naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Atrativa Japan",   "Jingi Storm - The Arcade (GDL-0037)", GAME_NO_SOUND|GAME_NOT_WORKING )
3880GAME( 2006, meltyb,    naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Ecole Software",   "Melty Blood Act Cadenza Ver B (GDL-0039)", GAME_NO_SOUND|GAME_NOT_WORKING )
3881GAME( 2006, meltyba,   meltyb,   naomigd,  naomi, naomigd,   ROT0,   "Ecole Software",   "Melty Blood Act Cadenza Ver B (Rev A) (GDL-0039A)", GAME_NO_SOUND|GAME_NOT_WORKING )
3882GAME( 2006, karous,    naomigd,  naomigd,  naomi, naomigd,   ROT270, "Milestone",        "Karous (GDL-0040)", GAME_NO_SOUND|GAME_NOT_WORKING )
3883GAME( 2006, takoron,   naomigd,  naomigd,  naomi, naomigd,   ROT0,   "Compile",          "Noukone Puzzle Takoron (GDL-0042)", GAME_NO_SOUND|GAME_NOT_WORKING )
34583884
34593885
34603886
3887
3888
34613889// GDS-xxxx (first party games?)
3890GAME( 2001, confmiss,  naomigd,  naomigd,  naomi, naomigd,  ROT0, "Sega",          "Confidential Mission (GDS-0001)", GAME_NO_SOUND|GAME_NOT_WORKING )
34623891GAME( 2000, sprtjam,   naomigd,  naomigd,  naomi, naomigd,  ROT0, "Sega",          "Sports Jam (GDS-0003)", GAME_NO_SOUND|GAME_NOT_WORKING )
34633892GAME( 2000, slashout,  naomigd,  naomigd,  naomi, naomigd,  ROT0, "Sega",          "Slashout (GDS-0004)", GAME_NO_SOUND|GAME_NOT_WORKING )
34643893GAME( 2001, spkrbtl,   naomigd,  naomigd,  naomi, naomigd,  ROT0, "Sega",          "Spikers Battle (GDS-0005)", GAME_NO_SOUND|GAME_NOT_WORKING )
3894GAME( 2001, monkeyba,  naomigd,  naomigd,  naomi, naomigd,  ROT0, "Sega",          "Monkey Ball (GDS-0008)", GAME_NO_SOUND|GAME_NOT_WORKING )
34653895GAME( 2001, dygolf,    naomigd,  naomigd,  naomi, naomigd,  ROT0, "Sega",          "Virtua Golf / Dynamic Golf (GDS-0009)", GAME_NO_SOUND|GAME_NOT_WORKING )
34663896GAME( 2001, wsbbgd,    naomigd,  naomigd,  naomi, naomigd,  ROT0, "Sega",          "World Series Baseball / Super Major League (GDS-0010)", GAME_NO_SOUND|GAME_NOT_WORKING )
34673897GAME( 2001, vtennisg,  naomigd,  naomigd,  naomi, naomigd,  ROT0, "Sega",          "Virtua Tennis (GDS-0011)", GAME_NO_SOUND|GAME_NOT_WORKING )
34683898GAME( 2002, vathlete,  naomigd,  naomigd,  naomi, naomigd,  ROT0, "Sega",          "Virtua Athletics / Virtua Athlete (GDS-0019)", GAME_NO_SOUND|GAME_NOT_WORKING )
3469GAME( 2001, vtennis2,  naomigd,  naomigd,  naomi, naomigd,  ROT0, "Sega",          "Virtua Tennis 2 (GDS-0015a)", GAME_NO_SOUND|GAME_NOT_WORKING ) // bad key
3470GAME( 2001, monkeyba,  naomigd,  naomigd,  naomi, naomigd,  ROT0, "Sega",          "Monkey Ball (GDS-0008)", GAME_NO_SOUND|GAME_NOT_WORKING )
3471GAME( 2002, luptype,   naomigd,  naomigd,  naomi, naomigd,  ROT0, "Sega",          "Lupin The Third - The Typing (GDS-0021A)", GAME_NO_SOUND|GAME_NOT_WORKING )
3899GAME( 2001, vtennis2,  naomigd,  naomigd,  naomi, naomigd,  ROT0, "Sega",          "Virtua Tennis 2 (Rev A) (GDS-0015A)", GAME_NO_SOUND|GAME_NOT_WORKING )
3900GAME( 2001, keyboard,  naomigd,  naomigd,  naomi, naomigd,  ROT0, "Sega",          "La Keyboardxyu (GDS-0017)", GAME_NO_SOUND|GAME_NOT_WORKING )
3901GAME( 2001, lupinsho,  naomigd,  naomigd,  naomi, naomigd,  ROT0, "Sega",          "Lupin The Third - The Shooting (GDS-0018)", GAME_NO_SOUND|GAME_NOT_WORKING )
3902GAME( 2002, luptype,   naomigd,  naomigd,  naomi, naomigd,  ROT0, "Sega",          "Lupin The Third - The Typing (Rev A) (GDS-0021A)", GAME_NO_SOUND|GAME_NOT_WORKING )
34723903GAME( 2002, mok,       naomigd,  naomigd,  naomi, naomigd,  ROT0, "Sega",          "The Maze of the Kings (GDS-0022)", GAME_NO_SOUND|GAME_NOT_WORKING )
3473GAME( 2001, lupinsho,  naomigd,  naomigd,  naomi, naomigd,  ROT0, "Sega",          "Lupin The Third - The Shooting (GDS-0018)", GAME_NO_SOUND|GAME_NOT_WORKING )
3474GAME( 2001, confmiss,  naomigd,  naomigd,  naomi, naomigd,  ROT0, "Sega",          "Confidential Mission (GDS-0001)", GAME_NO_SOUND|GAME_NOT_WORKING )
3904GAME( 2001, ngdup23a,  naomigd,  naomigd,  naomi, naomigd,  ROT0, "Sega",          "Naomi DIMM Firmware Updater (GDL-0023A)", GAME_NO_SOUND|GAME_NOT_WORKING )
3905GAME( 2001, ngdup23c,  naomigd,  naomigd,  naomi, naomigd,  ROT0, "Sega",          "Naomi DIMM Firmware Updater (GDL-0023C)", GAME_NO_SOUND|GAME_NOT_WORKING )
34753906GAME( 2003, puyofev,   naomigd,  naomigd,  naomi, naomigd,  ROT0, "Sega",          "Puyo Puyo Fever (GDS-0031)", GAME_NO_SOUND|GAME_NOT_WORKING )
34763907
34773908/* Naomi 2 & Naomi 2 GD-ROM */
r4441r4442
34803911
34813912   NAOMI2_BIOS
34823913
3483   ROM_REGION( 0x400000, "user1", 0)
3914   ROM_REGION( 0xb000000, "user1", 0)
34843915   ROM_LOAD("epr23663.22", 0x0000000, 0x0400000, CRC(7007fec7) SHA1(523168f0b218d0bd5c815d65bf0caba2c8468c9d) )
3485
3486   ROM_REGION( 0xa800000, "user2", 0)
3487   ROM_LOAD("ic1", 0x0000000, 0x0800000, NO_DUMP )
3488   ROM_LOAD("ic2", 0x0800000, 0x0800000, NO_DUMP )
3489   ROM_LOAD("ic3", 0x1000000, 0x0800000, NO_DUMP )
3490   ROM_LOAD("ic4", 0x1800000, 0x0800000, NO_DUMP )
3491   ROM_LOAD("ic5", 0x2000000, 0x0800000, NO_DUMP )
3492   ROM_LOAD("ic6", 0x2800000, 0x0800000, NO_DUMP )
3493   ROM_LOAD("ic7", 0x3000000, 0x0800000, NO_DUMP )
3494   ROM_LOAD("ic8", 0x3800000, 0x0800000, NO_DUMP )
3495   ROM_LOAD("ic9", 0x4000000, 0x0800000, NO_DUMP )
3496   ROM_LOAD("ic10",0x4800000, 0x0800000, NO_DUMP )
3497   ROM_LOAD("ic11",0x5000000, 0x0800000, NO_DUMP )
3498   ROM_LOAD("ic12",0x5800000, 0x0800000, NO_DUMP )
3499   ROM_LOAD("ic13",0x6000000, 0x0800000, NO_DUMP )
3500   ROM_LOAD("ic14",0x6800000, 0x0800000, NO_DUMP )
3501   ROM_LOAD("ic15",0x7000000, 0x0800000, NO_DUMP )
3502   ROM_LOAD("ic16",0x7800000, 0x0800000, NO_DUMP )
3503   ROM_LOAD("ic17",0x8000000, 0x0800000, NO_DUMP )
3504   ROM_LOAD("ic18",0x8800000, 0x0800000, NO_DUMP )
3505   ROM_LOAD("ic19",0x9000000, 0x0800000, NO_DUMP )
3506   ROM_LOAD("ic20",0x9800000, 0x0800000, NO_DUMP )
3507   ROM_LOAD("ic21",0xa000000, 0x0800000, NO_DUMP )
3916   ROM_LOAD("ic.1", 0x0800000, 0x0800000, CRC(db8bf632) SHA1(cd0c5c385dc33778eb6477f48a33d31f8461b810) )
3917   ROM_LOAD("ic.2", 0x1000000, 0x0800000, CRC(f5889f8b) SHA1(540aa6a9adf10d5426ac4962afdc300cc9c5c6ba) )
3918   ROM_LOAD("ic.3", 0x1800000, 0x0800000, CRC(74e7ef35) SHA1(6b63910fa05f98b31689882d3f7f32ea84fb11e5) )
3919   ROM_LOAD("ic.4", 0x2000000, 0x0800000, CRC(69e5eeb3) SHA1(1c615e6150e8c9f5211f7db55158c9b56b9b52fe) )
3920   ROM_LOAD("ic.5", 0x2800000, 0x0800000, CRC(7ea41bdb) SHA1(1a58c4731f9cc570f79e81a3b87b590d52cf3887) )
3921   ROM_LOAD("ic.6", 0x3000000, 0x0800000, CRC(cf730ca3) SHA1(f8e132463d574be906f573ca66fbc8d74959be08) )
3922   ROM_LOAD("ic.7", 0x3800000, 0x0800000, CRC(b8d838fe) SHA1(6722f54a170302978e06305773903a336c6fc9d8) )
3923   ROM_LOAD("ic.8", 0x4000000, 0x0800000, CRC(03aacb8b) SHA1(7ab12a3c79718fea8b7ae019acafb86bb7381c7e) )
3924   ROM_LOAD("ic.9", 0x4800000, 0x0800000, CRC(3252196e) SHA1(2e45de03931554e6500fbb83a0d2b1249f2d3015) )
3925   ROM_LOAD("ic.10",0x5000000, 0x0800000, CRC(b448948b) SHA1(1df5bbd14b24a952bb5289778ceea15ffe161491) )
3926   ROM_LOAD("ic.11",0x5800000, 0x0800000, CRC(937a3280) SHA1(46c6277402c029a55aa0e2417ea14634d17e2601) )
3927   ROM_LOAD("ic.12",0x6000000, 0x0800000, CRC(e3ca01df) SHA1(1c96e596d5ad6e08fcc7625788952d5ca5c80ce5) )
3928   ROM_LOAD("ic.13",0x6800000, 0x0800000, CRC(9bbbbbdc) SHA1(19d124743b686e4d5d38181cee547452402cdf61) )
3929   ROM_LOAD("ic.14",0x7000000, 0x0800000, CRC(eed0270a) SHA1(2b75a2d5bda05e68bb7d81570a7f4e180085fbd5) )
3930   ROM_LOAD("ic.15",0x7800000, 0x0800000, CRC(02bee590) SHA1(77ce37209f525be58d9373b5467b6be9f0e7fb4b) )
3931   ROM_LOAD("ic.16",0x8000000, 0x0800000, CRC(025f4f2f) SHA1(b104dc936036464dcf17524fd5e639c9852e1bd1) )
3932   ROM_LOAD("ic.17",0x8800000, 0x0800000, CRC(98fc3c54) SHA1(d2ba54b9bf15d2b3d623c5358bbf104b48d23223) )
3933   ROM_LOAD("ic.18",0x9000000, 0x0800000, CRC(e9fe50a4) SHA1(053f2a33ab7310c518a66b49d83fc817f2db3ef0) )
3934   ROM_LOAD("ic.19",0x9800000, 0x0800000, CRC(bbd0139c) SHA1(f87e729534d503f2bc37b7d595d25070ae33353c) )
3935   ROM_LOAD("ic.20",0xa000000, 0x0800000, CRC(5a69ab9e) SHA1(205a8facded5dbee8653807ef4d4b5e4210f56ef) )
3936   ROM_LOAD("ic.21",0xa800000, 0x0800000, CRC(d6ef7d68) SHA1(4ee396af6c5caf4c5af6e9ad0e03a7ac2c5039f4) )
35083937ROM_END
35093938
35103939
r4441r4442
35373966   ROM_LOAD("317-0314-com.data", 0x00, 0x50, CRC(91a97eb4) SHA1(059342368bc5d25b494ed3c729870695f9584fc7) )
35383967ROM_END
35393968
3969ROM_START( vf4b )
3970   NAOMI2_BIOS
3971
3972   ROM_REGION( 0x10000000, "user1", ROMREGION_ERASE) // allocate max size in init instead?
3973
3974   DISK_REGION( "gdrom" )
3975   DISK_IMAGE_READONLY( "gds-0012b", 0, SHA1(9b8e05c3d28a09323b13c198dfcc2b771bba67cd) )
3976
3977   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE)
3978   //PIC16C622A (317-0314-COM)
3979   //(sticker 253-5508-0314)
3980   ROM_LOAD("317-0314-com.data", 0x00, 0x50, CRC(91a97eb4) SHA1(059342368bc5d25b494ed3c729870695f9584fc7) )
3981ROM_END
3982
3983ROM_START( vf4c )
3984   NAOMI2_BIOS
3985
3986   ROM_REGION( 0x10000000, "user1", ROMREGION_ERASE) // allocate max size in init instead?
3987
3988   DISK_REGION( "gdrom" )
3989   DISK_IMAGE_READONLY( "gds-0012c", 0, SHA1(0ec149d7edfb326777cdc45a2ac8ad578a32aba1) )
3990
3991   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE)
3992   //PIC16C622A (317-0314-COM)
3993   //(sticker 253-5508-0314)
3994   ROM_LOAD("317-0314-com.data", 0x00, 0x50, CRC(91a97eb4) SHA1(059342368bc5d25b494ed3c729870695f9584fc7) )
3995ROM_END
3996
3997
35403998ROM_START( vf4evo )
35413999   NAOMI2_BIOS
35424000
r4441r4442
36524110// GDS-xxxx (first party games?)
36534111GAME( 2001, vstrik3, naomi2,  naomigd,    naomi,    0,  ROT0, "Sega",          "Virtua Striker 3 (GDS-0006)", GAME_NO_SOUND|GAME_NOT_WORKING )
36544112GAME( 2001, vf4,     naomi2,  naomigd,    naomi,    0,  ROT0, "Sega",          "Virtua Fighter 4 (GDS-0012)", GAME_NO_SOUND|GAME_NOT_WORKING )
3655GAME( 2002, initd,   naomi2,  naomigd,    naomi,    0,  ROT0, "Sega",          "Initial D Arcade Stage (Japan) (GDS-0020b)", GAME_NO_SOUND|GAME_NOT_WORKING )
4113GAME( 2001, vf4b,    vf4,     naomigd,    naomi,    0,  ROT0, "Sega",          "Virtua Fighter 4 (Rev B) (GDS-0012B)", GAME_NO_SOUND|GAME_NOT_WORKING )
4114GAME( 2001, vf4c,    vf4,     naomigd,    naomi,    0,  ROT0, "Sega",          "Virtua Fighter 4 (Rev C) (GDS-0012C)", GAME_NO_SOUND|GAME_NOT_WORKING )
4115GAME( 2002, initd,   naomi2,  naomigd,    naomi,    0,  ROT0, "Sega",          "Initial D Arcade Stage (Rev B) (Japan) (GDS-0020B)", GAME_NO_SOUND|GAME_NOT_WORKING )
36564116GAME( 2002, beachspi,naomi2,  naomigd,    naomi,    0,  ROT0, "Sega",          "Beach Spikers (GDS-0014)", GAME_NO_SOUND|GAME_NOT_WORKING )
36574117GAME( 2002, initdexp,naomi2,  naomigd,    naomi,    0,  ROT0, "Sega",          "Initial D Arcade Stage (Export) (GDS-0025)", GAME_NO_SOUND|GAME_NOT_WORKING )
3658GAME( 2002, vf4evo,  naomi2,  naomigd,    naomi,    0,  ROT0, "Sega",          "Virtua Fighter 4 Evolution (GDS-0024B)", GAME_NO_SOUND|GAME_NOT_WORKING )
4118GAME( 2002, vf4evo,  naomi2,  naomigd,    naomi,    0,  ROT0, "Sega",          "Virtua Fighter 4 Evolution (Rev B) (GDS-0024B)", GAME_NO_SOUND|GAME_NOT_WORKING )
36594119GAME( 2002, initdv2j,naomi2,  naomigd,    naomi,    0,  ROT0, "Sega",          "Initial D : Arcade Stage Ver. 2 (Japan) (GDS-0026)", GAME_NO_SOUND|GAME_NOT_WORKING )
3660GAME( 2004, vf4tuned,naomi2,  naomigd,    naomi,    0,  ROT0, "Sega",          "Virtua Fighter 4 Final Tuned (GDS-0036F)", GAME_NO_SOUND|GAME_NOT_WORKING )
4120GAME( 2004, vf4tuned,naomi2,  naomigd,    naomi,    0,  ROT0, "Sega",          "Virtua Fighter 4 Final Tuned (Rev F) (GDS-0036F)", GAME_NO_SOUND|GAME_NOT_WORKING )
36614121
36624122
36634123/* Atomiswave */
r4441r4442
37494209   ROM_LOAD("317-0337-exp.data", 0x00, 0x50, CRC(aa6be604) SHA1(fabc43ecfb7ddf1d5a87f10884852027d6f4773b) )
37504210ROM_END
37514211
4212
4213ROM_START( gekpurya )
4214   TRIFORCE_BIOS
4215   //NAOMIGD_BIOS
4216
4217   ROM_REGION( 0x20000000, "user1", ROMREGION_ERASE) // allocate max size in init instead?
4218
4219   DISK_REGION( "gdrom" )
4220   DISK_IMAGE_READONLY( "gdt-0008c", 0, SHA1(2c1bdb8324efc216edd771fe45c680ac726111a0) )
4221
4222   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE)
4223   ROM_LOAD("gdt-0008c.data", 0x00, 0x50, CRC(08434e5e) SHA1(2121999e851f6f62ab845e6de40849d850ac9d1c) )
4224ROM_END
4225
4226
4227
37524228GAME( 200?, triforce, 0,        naomigd,    naomi,    0, ROT0, "Sega",           "Triforce Bios", GAME_NO_SOUND|GAME_NOT_WORKING|GAME_IS_BIOS_ROOT )
4229GAME( 2002, vs2002ex, triforce, naomigd,    naomi,    0, ROT0, "Sega",           "Virtua Striker 2002 (GDT-0002)", GAME_NO_SOUND|GAME_NOT_WORKING )
4230GAME( 2003, gekpurya, triforce, naomigd,    naomi,    0, ROT0, "Sega",           "Gekitou Pro Yakyuu Mizushima Shinji All Stars vs. Pro Yakyuu (Rev C) (GDT-0008C)", GAME_NO_SOUND|GAME_NOT_WORKING )
37534231GAME( 200?, vs4,      triforce, naomigd,    naomi,    0, ROT0, "Sega",           "Virtua Striker 4 (GDT-0015)", GAME_NO_SOUND|GAME_NOT_WORKING )
3754GAME( 2002, vs2002ex, triforce, naomigd,    naomi,    0, ROT0, "Sega",           "Virtua Striker 2002 (GDT-0002)", GAME_NO_SOUND|GAME_NOT_WORKING )
37554232
37564233
37574234/*********************************************************************************************************************
r4441r4442
38374314   ROM_LOAD("317-0354-com.data", 0x00, 0x50,  CRC(df7e3217) SHA1(9f0f4bf6b15f3b6eeea81eaa27b3d25bd94110da) )
38384315ROM_END
38394316
4317ROM_START( wangmid )
4318   CHIHIRO_BIOS
38404319
4320   ROM_REGION( 0x20000000, "user1", ROMREGION_ERASE) // allocate max size in init instead?
4321
4322   DISK_REGION( "gdrom" )
4323   DISK_IMAGE_READONLY( "gdx-0009b", 0, SHA1(e032b9fd8d5d09255592f02f7531a608e8179c9c) )
4324
4325   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE)
4326   ROM_LOAD("gdx-0009b.data", 0x00, 0x50, CRC(3af801f3) SHA1(e9a2558930f3f1f55d5b3c2cadad69329d931f26) )
4327ROM_END
4328
4329
38414330GAME( 200?, chihiro,  0,       naomigd,    naomi,    0, ROT0, "Sega",           "Chihiro Bios", GAME_NO_SOUND|GAME_NOT_WORKING|GAME_IS_BIOS_ROOT )
3842GAME( 2005, ghostsqu, chihiro, naomigd,    naomi,    0, ROT0, "Sega",           "Ghost Squad (Ver. A?) (GDX-0012a)", GAME_NO_SOUND|GAME_NOT_WORKING )
3843GAME( 2003, vcop3,    chihiro, naomigd,    naomi,    0, ROT0, "Sega",           "Virtua Cop 3 (GDX-0003a)", GAME_NO_SOUND|GAME_NOT_WORKING )
4331GAME( 2005, wangmid,  chihiro, naomigd,    naomi,    0, ROT0, "Sega",           "Wangan Midnight Maximum Tune (Ver. B) (Export) (GDX-0009B)", GAME_NO_SOUND|GAME_NOT_WORKING )
4332GAME( 2005, ghostsqu, chihiro, naomigd,    naomi,    0, ROT0, "Sega",           "Ghost Squad (Ver. A?) (GDX-0012A)", GAME_NO_SOUND|GAME_NOT_WORKING )
4333GAME( 2003, vcop3,    chihiro, naomigd,    naomi,    0, ROT0, "Sega",           "Virtua Cop 3 (GDX-0003A)", GAME_NO_SOUND|GAME_NOT_WORKING )
38444334
4335
src/mame/drivers/nemesis.c
r4441r4442
2121
2222
2323driver by Bryan McPhail
24modified by Eisuke Watanabe
24
25modified by Hau
2603/27/2009
2527 spthx to Unagi,rassy,hina,nori,Tobikage,Tommy,Crimson,yasuken,cupmen,zoo
2628
2729Notes:
r4441r4442
4951#include "sound/k051649.h"
5052#include "includes/nemesis.h"
5153
52static UINT16 *ram;
53static UINT16 *ram2;
5454
55static int irq_on = 0;
56static int irq1_on = 0;
57static int irq2_on = 0;
58static int irq4_on = 0;
59static UINT8 a;
55int nemesis_irq_on = 0;
56int nemesis_irq2_on = 0;
57static int nemesis_irq1_on = 0;
58static int nemesis_irq4_on = 0;
59static int gx400_irq1_cnt;
60static UINT8 frame_counter;
6061
6162
6263static MACHINE_RESET( nemesis )
6364{
64   irq_on = 0;
65   irq1_on = 0;
66   irq2_on = 0;
67   irq4_on = 0;
68   a = 1;
65   nemesis_irq_on = 0;
66   nemesis_irq1_on = 0;
67   nemesis_irq2_on = 0;
68   nemesis_irq4_on = 0;
69   gx400_irq1_cnt = 0;
70   frame_counter = 1;
6971}
7072
7173
72
7374static INTERRUPT_GEN( nemesis_interrupt )
7475{
75   if (irq_on)
76   if (nemesis_irq_on)
7677      cpu_set_input_line(device, 1, HOLD_LINE);
7778}
7879
79
80static WRITE16_HANDLER( salamand_soundlatch_word_w )
81{
82   if(ACCESSING_BITS_0_7) {
83      soundlatch_w(space,offset,data & 0xff);
84      cpu_set_input_line(space->machine->cpu[1],0,HOLD_LINE);
85   }
86}
87
88static int gx400_irq1_cnt;
89
9080static INTERRUPT_GEN( konamigt_interrupt )
9181{
9282   if (cpu_getiloops(device) == 0)
9383   {
94      if ( (irq_on) && (gx400_irq1_cnt++ & 1) ) cpu_set_input_line(device, 1, HOLD_LINE);
84      if ( (nemesis_irq_on) && (gx400_irq1_cnt++ & 1) ) cpu_set_input_line(device, 1, HOLD_LINE);
9585   }
9686   else
9787   {
98      if (irq2_on) cpu_set_input_line(device, 2, HOLD_LINE);
88      if (nemesis_irq2_on) cpu_set_input_line(device, 2, HOLD_LINE);
9989   }
10090}
10191
r4441r4442
10494   switch (cpu_getiloops(device))
10595   {
10696      case 0:
107         if (irq2_on) cpu_set_input_line(device, 2, HOLD_LINE);
97         if (nemesis_irq2_on) cpu_set_input_line(device, 2, HOLD_LINE);
10898         break;
10999
110100      case 1:
111         if ( (irq1_on) && (gx400_irq1_cnt++ & 1) ) cpu_set_input_line(device, 1, HOLD_LINE);
101         if ( (nemesis_irq1_on) && (gx400_irq1_cnt++ & 1) ) cpu_set_input_line(device, 1, HOLD_LINE);
112102         break;
113103
114104      case 2:
115         if (irq4_on) cpu_set_input_line(device, 4, HOLD_LINE);
105         if (nemesis_irq4_on) cpu_set_input_line(device, 4, HOLD_LINE);
116106         break;
117107   }
118108}
119109
110static INTERRUPT_GEN( salamand_interrupt )
111{
112   if (nemesis_irq_on)
113      cpu_set_input_line(device, 1, HOLD_LINE);
114}
115
116static INTERRUPT_GEN( blkpnthr_interrupt )
117{
118   if (nemesis_irq_on)
119      cpu_set_input_line(device, 2, HOLD_LINE);
120}
121
122
120123static WRITE16_HANDLER( gx400_irq1_enable_word_w )
121124{
122125   if (ACCESSING_BITS_0_7)
123      irq1_on = data & 0x0001;
124/*  else
125logerror("irq1en = %08x\n",data);*/
126      nemesis_irq1_on = data & 0x0001;
127
128   if (ACCESSING_BITS_8_15)
129      coin_lockout_w(1, data & 0x0100);
126130}
127131
128132static WRITE16_HANDLER( gx400_irq2_enable_word_w )
129133{
130134   if (ACCESSING_BITS_0_7)
131      irq2_on = data & 0x0001;
132/*  else
133logerror("irq2en = %08x\n",data);*/
135      nemesis_irq2_on = data & 0x0001;
136
137   if (ACCESSING_BITS_8_15)
138      coin_lockout_w(0, data & 0x0100);
134139}
135140
136141static WRITE16_HANDLER( gx400_irq4_enable_word_w )
137142{
138143   if (ACCESSING_BITS_8_15)
139      irq4_on = data & 0x0100;
140/*  else
141logerror("irq4en = %08x\n",data);*/
144      nemesis_irq4_on = data & 0x0100;
142145}
143146
144static UINT8 *gx400_shared_ram;
147static WRITE16_HANDLER( nemesis_irq_enable_word_w )
148{
149   if (ACCESSING_BITS_0_7)
150      nemesis_irq_on = data & 0xff;
145151
146static READ16_HANDLER( gx400_sharedram_word_r )
147{
148   return gx400_shared_ram[offset];
152   if (ACCESSING_BITS_8_15)
153      coin_lockout_global_w(data & 0x0100);
149154}
150155
151static WRITE16_HANDLER( gx400_sharedram_word_w )
156static WRITE16_HANDLER( konamigt_irq_enable_word_w )
152157{
153   if(ACCESSING_BITS_0_7)
154      gx400_shared_ram[offset] = data;
155}
158   if (ACCESSING_BITS_0_7)
159      nemesis_irq_on = data & 0xff;
156160
157
158
159static INTERRUPT_GEN( salamand_interrupt )
160{
161   if (irq_on)
162      cpu_set_input_line(device, 1, HOLD_LINE);
161   if (ACCESSING_BITS_8_15)
162      coin_lockout_w(1, data & 0x0100);
163163}
164164
165static INTERRUPT_GEN( blkpnthr_interrupt )
165static WRITE16_HANDLER( konamigt_irq2_enable_word_w )
166166{
167   if (irq_on)
168      cpu_set_input_line(device, 2, HOLD_LINE);
169}
167   if (ACCESSING_BITS_0_7)
168      nemesis_irq2_on = data & 0xff;
170169
171static WRITE16_HANDLER( nemesis_irq_enable_word_w )
172{
173   if(ACCESSING_BITS_0_7)
174      irq_on = data & 0xff;
170   if (ACCESSING_BITS_8_15)
171      coin_lockout_w(0, data & 0x0100);
175172}
176173
177static WRITE16_HANDLER( konamigt_irq_enable_word_w )
174
175static UINT8 *gx400_shared_ram;
176
177static READ16_HANDLER( gx400_sharedram_word_r )
178178{
179   if(ACCESSING_BITS_0_7)
180      irq_on = data & 0xff;
179   return gx400_shared_ram[offset];
181180}
182181
183static WRITE16_HANDLER( konamigt_irq2_enable_word_w )
182static WRITE16_HANDLER( gx400_sharedram_word_w )
184183{
185   if(ACCESSING_BITS_0_7)
186      irq2_on = data & 0xff;
184   if (ACCESSING_BITS_0_7)
185      gx400_shared_ram[offset] = data;
187186}
188187
188
189189static READ16_HANDLER( konamigt_input_word_r )
190190{
191191/*
r4441r4442
212212}
213213
214214/* Copied from WEC Le Mans 24 driver, explicity needed for Hyper Crash */
215static UINT16 hcrash_selected_ip;
215UINT16 hcrash_selected_ip;
216216
217static WRITE16_HANDLER( selected_ip_w )
217static WRITE16_HANDLER( selected_ip_word_w )
218218{
219219   if (ACCESSING_BITS_0_7) hcrash_selected_ip = data & 0xff;   // latch the value
220220}
221221
222static READ16_HANDLER( selected_ip_r )
222static READ16_HANDLER( selected_ip_word_r )
223223{
224224   switch (hcrash_selected_ip & 0xf)
225225   {                                    // From WEC Le Mans Schems:
r4441r4442
232232   }
233233}
234234
235
235236static WRITE16_HANDLER( nemesis_soundlatch_word_w )
236237{
237   if(ACCESSING_BITS_0_7) {
238   if (ACCESSING_BITS_0_7)
238239      soundlatch_w(space,offset,data & 0xff);
239   }
240240}
241241
242static ADDRESS_MAP_START( nemesis_map, ADDRESS_SPACE_PROGRAM, 16 )
243   AM_RANGE(0x000000, 0x03ffff) AM_ROM
244   AM_RANGE(0x040000, 0x04ffff) AM_RAM_WRITE(nemesis_characterram_word_w) AM_BASE(&nemesis_characterram) AM_SIZE(&nemesis_characterram_size)
245   AM_RANGE(0x050000, 0x050fff) AM_RAM
246   AM_RANGE(0x050000, 0x0503ff) AM_BASE(&nemesis_xscroll1)
247   AM_RANGE(0x050400, 0x0507ff) AM_BASE(&nemesis_xscroll2)
248   AM_RANGE(0x050c00, 0x050fff) AM_BASE(&nemesis_yscroll)
249   AM_RANGE(0x051000, 0x051fff) AM_WRITENOP      /* used, but written to with 0's */
250   AM_RANGE(0x052000, 0x052fff) AM_RAM_WRITE(nemesis_videoram1b_word_w) AM_BASE(&nemesis_videoram1b)   /* VRAM 1 */
251   AM_RANGE(0x053000, 0x053fff) AM_RAM_WRITE(nemesis_videoram1f_word_w) AM_BASE(&nemesis_videoram1f)   /* VRAM 1 */
252   AM_RANGE(0x054000, 0x054fff) AM_RAM_WRITE(nemesis_videoram2b_word_w) AM_BASE(&nemesis_videoram2b)   /* VRAM 2 */
253   AM_RANGE(0x055000, 0x055fff) AM_RAM_WRITE(nemesis_videoram2f_word_w) AM_BASE(&nemesis_videoram2f)   /* VRAM 2 */
254   AM_RANGE(0x056000, 0x056fff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size)
255   AM_RANGE(0x05a000, 0x05afff) AM_RAM_WRITE(nemesis_palette_word_w) AM_BASE(&paletteram16)
256   AM_RANGE(0x05c000, 0x05c001) AM_WRITE(nemesis_soundlatch_word_w)
257   AM_RANGE(0x05c400, 0x05c401) AM_READ_PORT("DSW0")
258   AM_RANGE(0x05c402, 0x05c403) AM_READ_PORT("DSW1")
259   AM_RANGE(0x05c800, 0x05c801) AM_WRITE(watchdog_reset16_w)   /* probably */
260   AM_RANGE(0x05cc00, 0x05cc01) AM_READ_PORT("IN0")
261   AM_RANGE(0x05cc02, 0x05cc03) AM_READ_PORT("IN1")
262   AM_RANGE(0x05cc04, 0x05cc05) AM_READ_PORT("IN2")
263   AM_RANGE(0x05cc06, 0x05cc07) AM_READ_PORT("TEST")
264   AM_RANGE(0x05e000, 0x05e001) AM_WRITE(&nemesis_irq_enable_word_w)   /* Nemesis */
265   AM_RANGE(0x05e002, 0x05e003) AM_WRITE(&nemesis_irq_enable_word_w)   /* Konami GT */
266   AM_RANGE(0x05e004, 0x05e005) AM_WRITE(nemesis_gfx_flipx_w)
267   AM_RANGE(0x05e006, 0x05e007) AM_WRITE(nemesis_gfx_flipy_w)
268   AM_RANGE(0x060000, 0x067fff) AM_RAM AM_BASE(&ram)   /* WORK RAM */
269ADDRESS_MAP_END
270
271static WRITE8_DEVICE_HANDLER( salamand_speech_start_w )
242static WRITE8_DEVICE_HANDLER( gx400_speech_start_w )
272243{
273        vlm5030_st ( device, 1 );
274        vlm5030_st ( device, 0 );
244   /* the voice data is not in a rom but in sound RAM at $8000 */
245   vlm5030_set_rom(device, gx400_shared_ram + 0x4000);
246   vlm5030_st(device, 1);
247   vlm5030_st(device, 0);
275248}
276249
277static WRITE8_DEVICE_HANDLER( gx400_speech_start_w )
250static WRITE8_DEVICE_HANDLER( salamand_speech_start_w )
278251{
279   /* the voice data is not in a rom but in sound RAM at $8000 */
280   vlm5030_set_rom (device, gx400_shared_ram + 0x4000);
281   vlm5030_st (device, 1);
282   vlm5030_st (device, 0);
252   vlm5030_st(device, 1);
253   vlm5030_st(device, 0);
283254}
284255
285256static READ8_DEVICE_HANDLER( nemesis_portA_r )
r4441r4442
302273   return res;
303274}
304275
305static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 )
306   AM_RANGE(0x0000, 0x3fff) AM_ROM
307   AM_RANGE(0x4000, 0x47ff) AM_RAM
308   AM_RANGE(0xa000, 0xafff) AM_DEVWRITE("konami", k005289_pitch_A_w)
309   AM_RANGE(0xc000, 0xcfff) AM_DEVWRITE("konami", k005289_pitch_B_w)
310   AM_RANGE(0xe001, 0xe001) AM_READ(soundlatch_r)
311   AM_RANGE(0xe003, 0xe003) AM_DEVWRITE("konami", k005289_keylatch_A_w)
312   AM_RANGE(0xe004, 0xe004) AM_DEVWRITE("konami", k005289_keylatch_B_w)
313   AM_RANGE(0xe005, 0xe005) AM_DEVWRITE("ay2", ay8910_address_w)
314   AM_RANGE(0xe006, 0xe006) AM_DEVWRITE("ay1", ay8910_address_w)
315   AM_RANGE(0xe086, 0xe086) AM_DEVREAD("ay1", ay8910_r)
316   AM_RANGE(0xe106, 0xe106) AM_DEVWRITE("ay1", ay8910_data_w)
317   AM_RANGE(0xe205, 0xe205) AM_DEVREAD("ay2", ay8910_r)
318   AM_RANGE(0xe405, 0xe405) AM_DEVWRITE("ay2", ay8910_data_w)
319ADDRESS_MAP_END
276static WRITE8_DEVICE_HANDLER( city_sound_bank_w )
277{
278   int bank_A=(data&0x3);
279   int bank_B=((data>>2)&0x3);
280   k007232_set_bank( device, bank_A, bank_B );
281}
320282
321static ADDRESS_MAP_START( konamigt_map, ADDRESS_SPACE_PROGRAM, 16 )
283
284static ADDRESS_MAP_START( nemesis_map, ADDRESS_SPACE_PROGRAM, 16 )
322285   AM_RANGE(0x000000, 0x03ffff) AM_ROM
323286   AM_RANGE(0x040000, 0x04ffff) AM_RAM_WRITE(nemesis_characterram_word_w) AM_BASE(&nemesis_characterram) AM_SIZE(&nemesis_characterram_size)
324   AM_RANGE(0x050000, 0x050fff) AM_RAM
287   AM_RANGE(0x050000, 0x051fff) AM_RAM
325288   AM_RANGE(0x050000, 0x0503ff) AM_BASE(&nemesis_xscroll1)
326289   AM_RANGE(0x050400, 0x0507ff) AM_BASE(&nemesis_xscroll2)
327   AM_RANGE(0x050c00, 0x050fff) AM_BASE(&nemesis_yscroll)
328   AM_RANGE(0x051000, 0x051fff) AM_WRITENOP      /* used, but written to with 0's */
329   AM_RANGE(0x052000, 0x052fff) AM_RAM_WRITE(nemesis_videoram1b_word_w) AM_BASE(&nemesis_videoram1b)   /* VRAM 1 */
330   AM_RANGE(0x053000, 0x053fff) AM_RAM_WRITE(nemesis_videoram1f_word_w) AM_BASE(&nemesis_videoram1f)   /* VRAM 1 */
331   AM_RANGE(0x054000, 0x054fff) AM_RAM_WRITE(nemesis_videoram2b_word_w) AM_BASE(&nemesis_videoram2b)   /* VRAM 2 */
332   AM_RANGE(0x055000, 0x055fff) AM_RAM_WRITE(nemesis_videoram2f_word_w) AM_BASE(&nemesis_videoram2f)   /* VRAM 2 */
290   AM_RANGE(0x050f00, 0x050f7f) AM_BASE(&nemesis_yscroll2)
291   AM_RANGE(0x050f80, 0x050fff) AM_BASE(&nemesis_yscroll1)
292   AM_RANGE(0x052000, 0x052fff) AM_RAM_WRITE(nemesis_videoram1_word_w) AM_BASE(&nemesis_videoram1)      /* VRAM */
293   AM_RANGE(0x053000, 0x053fff) AM_RAM_WRITE(nemesis_videoram2_word_w) AM_BASE(&nemesis_videoram2)
294   AM_RANGE(0x054000, 0x054fff) AM_RAM_WRITE(nemesis_colorram1_word_w) AM_BASE(&nemesis_colorram1)
295   AM_RANGE(0x055000, 0x055fff) AM_RAM_WRITE(nemesis_colorram2_word_w) AM_BASE(&nemesis_colorram2)
333296   AM_RANGE(0x056000, 0x056fff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size)
334297   AM_RANGE(0x05a000, 0x05afff) AM_RAM_WRITE(nemesis_palette_word_w) AM_BASE(&paletteram16)
335
336298   AM_RANGE(0x05c000, 0x05c001) AM_WRITE(nemesis_soundlatch_word_w)
337299   AM_RANGE(0x05c400, 0x05c401) AM_READ_PORT("DSW0")
338300   AM_RANGE(0x05c402, 0x05c403) AM_READ_PORT("DSW1")
r4441r4442
341303   AM_RANGE(0x05cc02, 0x05cc03) AM_READ_PORT("IN1")
342304   AM_RANGE(0x05cc04, 0x05cc05) AM_READ_PORT("IN2")
343305   AM_RANGE(0x05cc06, 0x05cc07) AM_READ_PORT("TEST")
344
345   AM_RANGE(0x05e000, 0x05e001) AM_WRITE(&konamigt_irq2_enable_word_w)
346   AM_RANGE(0x05e002, 0x05e003) AM_WRITE(&konamigt_irq_enable_word_w)
347   AM_RANGE(0x05e004, 0x05e005) AM_WRITE(nemesis_gfx_flipx_w)
348   AM_RANGE(0x05e006, 0x05e007) AM_WRITE(nemesis_gfx_flipy_w)
349   AM_RANGE(0x060000, 0x067fff) AM_RAM AM_BASE(&ram)   /* WORK RAM */
350   AM_RANGE(0x070000, 0x070001) AM_READ(konamigt_input_word_r)
306   AM_RANGE(0x05e000, 0x05e001) AM_WRITE(&nemesis_irq_enable_word_w)
307   AM_RANGE(0x05e002, 0x05e003) AM_WRITENOP      /* not used irq */
308   AM_RANGE(0x05e004, 0x05e005) AM_WRITE(nemesis_gfx_flipx_word_w)
309   AM_RANGE(0x05e006, 0x05e007) AM_WRITE(nemesis_gfx_flipy_word_w)
310   AM_RANGE(0x05e008, 0x05e009) AM_WRITENOP      /* not used irq */
311   AM_RANGE(0x05e00e, 0x05e00f) AM_WRITENOP      /* not used irq */
312   AM_RANGE(0x060000, 0x067fff) AM_RAM         /* WORK RAM */
351313ADDRESS_MAP_END
352314
353
354315static ADDRESS_MAP_START( gx400_map, ADDRESS_SPACE_PROGRAM, 16 )
355   AM_RANGE(0x000000, 0x00ffff) AM_ROM
356   AM_RANGE(0x010000, 0x01ffff) AM_RAM AM_BASE(&ram)
316   AM_RANGE(0x000000, 0x00ffff) AM_ROM      /* ROM BIOS */
317   AM_RANGE(0x010000, 0x01ffff) AM_RAM
357318   AM_RANGE(0x020000, 0x0287ff) AM_READWRITE(gx400_sharedram_word_r, gx400_sharedram_word_w)
358319   AM_RANGE(0x030000, 0x03ffff) AM_RAM_WRITE(nemesis_characterram_word_w) AM_BASE(&nemesis_characterram) AM_SIZE(&nemesis_characterram_size)
359   AM_RANGE(0x050000, 0x050fff) AM_RAM
320   AM_RANGE(0x050000, 0x051fff) AM_RAM
360321   AM_RANGE(0x050000, 0x0503ff) AM_BASE(&nemesis_xscroll1)
361322   AM_RANGE(0x050400, 0x0507ff) AM_BASE(&nemesis_xscroll2)
362   AM_RANGE(0x050c00, 0x050fff) AM_BASE(&nemesis_yscroll)
363   AM_RANGE(0x051000, 0x051fff) AM_WRITENOP      /* used, but written to with 0's */
364   AM_RANGE(0x052000, 0x052fff) AM_RAM_WRITE(nemesis_videoram1b_word_w) AM_BASE(&nemesis_videoram1b)   /* VRAM 1 */
365   AM_RANGE(0x053000, 0x053fff) AM_RAM_WRITE(nemesis_videoram1f_word_w) AM_BASE(&nemesis_videoram1f)   /* VRAM 1 */
366   AM_RANGE(0x054000, 0x054fff) AM_RAM_WRITE(nemesis_videoram2b_word_w) AM_BASE(&nemesis_videoram2b)   /* VRAM 2 */
367   AM_RANGE(0x055000, 0x055fff) AM_RAM_WRITE(nemesis_videoram2f_word_w) AM_BASE(&nemesis_videoram2f)   /* VRAM 2 */
323   AM_RANGE(0x050f00, 0x050f7f) AM_BASE(&nemesis_yscroll2)
324   AM_RANGE(0x050f80, 0x050fff) AM_BASE(&nemesis_yscroll1)
325   AM_RANGE(0x052000, 0x052fff) AM_RAM_WRITE(nemesis_videoram1_word_w) AM_BASE(&nemesis_videoram1)      /* VRAM */
326   AM_RANGE(0x053000, 0x053fff) AM_RAM_WRITE(nemesis_videoram2_word_w) AM_BASE(&nemesis_videoram2)
327   AM_RANGE(0x054000, 0x054fff) AM_RAM_WRITE(nemesis_colorram1_word_w) AM_BASE(&nemesis_colorram1)
328   AM_RANGE(0x055000, 0x055fff) AM_RAM_WRITE(nemesis_colorram2_word_w) AM_BASE(&nemesis_colorram2)
368329   AM_RANGE(0x056000, 0x056fff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size)
369330   AM_RANGE(0x057000, 0x057fff) AM_RAM            /* needed for twinbee */
370331   AM_RANGE(0x05a000, 0x05afff) AM_RAM_WRITE(nemesis_palette_word_w) AM_BASE(&paletteram16)
r4441r4442
378339   AM_RANGE(0x05cc04, 0x05cc05) AM_READ_PORT("IN2")
379340   AM_RANGE(0x05e000, 0x05e001) AM_WRITE(&gx400_irq2_enable_word_w)   /* ?? */
380341   AM_RANGE(0x05e002, 0x05e003) AM_WRITE(&gx400_irq1_enable_word_w)   /* ?? */
381   AM_RANGE(0x05e004, 0x05e005) AM_WRITE(nemesis_gfx_flipx_w)
382   AM_RANGE(0x05e006, 0x05e007) AM_WRITE(nemesis_gfx_flipy_w)
383   AM_RANGE(0x05e008, 0x05e009) AM_WRITE(SMH_NOP)   /* IRQ acknowledge??? */
342   AM_RANGE(0x05e004, 0x05e005) AM_WRITE(nemesis_gfx_flipx_word_w)
343   AM_RANGE(0x05e006, 0x05e007) AM_WRITE(nemesis_gfx_flipy_word_w)
344   AM_RANGE(0x05e008, 0x05e009) AM_WRITENOP      /* IRQ acknowledge??? */
384345   AM_RANGE(0x05e00e, 0x05e00f) AM_WRITE(&gx400_irq4_enable_word_w)   /* ?? */
385   AM_RANGE(0x060000, 0x07ffff) AM_RAM AM_BASE(&ram2)
346   AM_RANGE(0x060000, 0x07ffff) AM_RAM         /* WORK RAM */
386347   AM_RANGE(0x080000, 0x0bffff) AM_ROM
387348ADDRESS_MAP_END
388349
350static ADDRESS_MAP_START( konamigt_map, ADDRESS_SPACE_PROGRAM, 16 )
351   AM_RANGE(0x000000, 0x03ffff) AM_ROM
352   AM_RANGE(0x040000, 0x04ffff) AM_RAM_WRITE(nemesis_characterram_word_w) AM_BASE(&nemesis_characterram) AM_SIZE(&nemesis_characterram_size)
353   AM_RANGE(0x050000, 0x051fff) AM_RAM
354   AM_RANGE(0x050000, 0x0503ff) AM_BASE(&nemesis_xscroll1)
355   AM_RANGE(0x050400, 0x0507ff) AM_BASE(&nemesis_xscroll2)
356   AM_RANGE(0x050f00, 0x050f7f) AM_BASE(&nemesis_yscroll2)
357   AM_RANGE(0x050f80, 0x050fff) AM_BASE(&nemesis_yscroll1)
358   AM_RANGE(0x052000, 0x052fff) AM_RAM_WRITE(nemesis_videoram1_word_w) AM_BASE(&nemesis_videoram1)      /* VRAM */
359   AM_RANGE(0x053000, 0x053fff) AM_RAM_WRITE(nemesis_videoram2_word_w) AM_BASE(&nemesis_videoram2)
360   AM_RANGE(0x054000, 0x054fff) AM_RAM_WRITE(nemesis_colorram1_word_w) AM_BASE(&nemesis_colorram1)
361   AM_RANGE(0x055000, 0x055fff) AM_RAM_WRITE(nemesis_colorram2_word_w) AM_BASE(&nemesis_colorram2)
362   AM_RANGE(0x056000, 0x056fff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size)
363   AM_RANGE(0x05a000, 0x05afff) AM_RAM_WRITE(nemesis_palette_word_w) AM_BASE(&paletteram16)
364   AM_RANGE(0x05c000, 0x05c001) AM_WRITE(nemesis_soundlatch_word_w)
365   AM_RANGE(0x05c400, 0x05c401) AM_READ_PORT("DSW0")
366   AM_RANGE(0x05c402, 0x05c403) AM_READ_PORT("DSW1")
367   AM_RANGE(0x05c800, 0x05c801) AM_WRITE(watchdog_reset16_w)   /* probably */
368   AM_RANGE(0x05cc00, 0x05cc01) AM_READ_PORT("IN0")
369   AM_RANGE(0x05cc02, 0x05cc03) AM_READ_PORT("IN1")
370   AM_RANGE(0x05cc04, 0x05cc05) AM_READ_PORT("IN2")
371   AM_RANGE(0x05cc06, 0x05cc07) AM_READ_PORT("TEST")
372   AM_RANGE(0x05e000, 0x05e001) AM_WRITE(&konamigt_irq2_enable_word_w)
373   AM_RANGE(0x05e002, 0x05e003) AM_WRITE(&konamigt_irq_enable_word_w)
374   AM_RANGE(0x05e004, 0x05e005) AM_WRITE(nemesis_gfx_flipx_word_w)
375   AM_RANGE(0x05e006, 0x05e007) AM_WRITE(nemesis_gfx_flipy_word_w)
376   AM_RANGE(0x05e008, 0x05e009) AM_WRITENOP      /* not used irq */
377   AM_RANGE(0x05e00e, 0x05e00f) AM_WRITENOP      /* not used irq */
378   AM_RANGE(0x060000, 0x067fff) AM_RAM         /* WORK RAM */
379   AM_RANGE(0x070000, 0x070001) AM_READ(konamigt_input_word_r)
380ADDRESS_MAP_END
381
389382static ADDRESS_MAP_START( rf2_gx400_map, ADDRESS_SPACE_PROGRAM, 16 )
390   AM_RANGE(0x000000, 0x00ffff) AM_ROM
391   AM_RANGE(0x010000, 0x01ffff) AM_RAM AM_BASE(&ram2)
383   AM_RANGE(0x000000, 0x00ffff) AM_ROM      /* ROM BIOS */
384   AM_RANGE(0x010000, 0x01ffff) AM_RAM
392385   AM_RANGE(0x020000, 0x0287ff) AM_READWRITE(gx400_sharedram_word_r, gx400_sharedram_word_w)
393386   AM_RANGE(0x030000, 0x03ffff) AM_RAM_WRITE(nemesis_characterram_word_w) AM_BASE(&nemesis_characterram) AM_SIZE(&nemesis_characterram_size)
394   AM_RANGE(0x050000, 0x050fff) AM_RAM
387   AM_RANGE(0x050000, 0x051fff) AM_RAM
395388   AM_RANGE(0x050000, 0x0503ff) AM_BASE(&nemesis_xscroll1)
396389   AM_RANGE(0x050400, 0x0507ff) AM_BASE(&nemesis_xscroll2)
397   AM_RANGE(0x050c00, 0x050fff) AM_BASE(&nemesis_yscroll)
398   AM_RANGE(0x051000, 0x051fff) AM_WRITENOP   /* used, but written to with 0's */
399   AM_RANGE(0x052000, 0x052fff) AM_RAM_WRITE(nemesis_videoram1b_word_w) AM_BASE(&nemesis_videoram1b)   /* VRAM 1 */
400   AM_RANGE(0x053000, 0x053fff) AM_RAM_WRITE(nemesis_videoram1f_word_w) AM_BASE(&nemesis_videoram1f)   /* VRAM 1 */
401   AM_RANGE(0x054000, 0x054fff) AM_RAM_WRITE(nemesis_videoram2b_word_w) AM_BASE(&nemesis_videoram2b)   /* VRAM 2 */
402   AM_RANGE(0x055000, 0x055fff) AM_RAM_WRITE(nemesis_videoram2f_word_w) AM_BASE(&nemesis_videoram2f)   /* VRAM 2 */
390   AM_RANGE(0x050f00, 0x050f7f) AM_BASE(&nemesis_yscroll2)
391   AM_RANGE(0x050f80, 0x050fff) AM_BASE(&nemesis_yscroll1)
392   AM_RANGE(0x052000, 0x052fff) AM_RAM_WRITE(nemesis_videoram1_word_w) AM_BASE(&nemesis_videoram1)      /* VRAM */
393   AM_RANGE(0x053000, 0x053fff) AM_RAM_WRITE(nemesis_videoram2_word_w) AM_BASE(&nemesis_videoram2)
394   AM_RANGE(0x054000, 0x054fff) AM_RAM_WRITE(nemesis_colorram1_word_w) AM_BASE(&nemesis_colorram1)
395   AM_RANGE(0x055000, 0x055fff) AM_RAM_WRITE(nemesis_colorram2_word_w) AM_BASE(&nemesis_colorram2)
403396   AM_RANGE(0x056000, 0x056fff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size)
404397   AM_RANGE(0x05a000, 0x05afff) AM_RAM_WRITE(nemesis_palette_word_w) AM_BASE(&paletteram16)
405398   AM_RANGE(0x05c000, 0x05c001) AM_WRITE(nemesis_soundlatch_word_w)
r4441r4442
412405   AM_RANGE(0x05cc04, 0x05cc05) AM_READ_PORT("IN2")
413406   AM_RANGE(0x05e000, 0x05e001) AM_WRITE(&gx400_irq2_enable_word_w)   /* ?? */
414407   AM_RANGE(0x05e002, 0x05e003) AM_WRITE(&gx400_irq1_enable_word_w)   /* ?? */
415   AM_RANGE(0x05e004, 0x05e005) AM_WRITE(nemesis_gfx_flipx_w)
416   AM_RANGE(0x05e006, 0x05e007) AM_WRITE(nemesis_gfx_flipy_w)
408   AM_RANGE(0x05e004, 0x05e005) AM_WRITE(nemesis_gfx_flipx_word_w)
409   AM_RANGE(0x05e006, 0x05e007) AM_WRITE(nemesis_gfx_flipy_word_w)
417410   AM_RANGE(0x05e008, 0x05e009) AM_WRITE(SMH_NOP)   /* IRQ acknowledge??? */
418411   AM_RANGE(0x05e00e, 0x05e00f) AM_WRITE(&gx400_irq4_enable_word_w)   /* ?? */
419   AM_RANGE(0x060000, 0x067fff) AM_RAM AM_BASE(&ram)   /* WORK RAM */
412   AM_RANGE(0x060000, 0x067fff) AM_RAM         /* WORK RAM */
420413   AM_RANGE(0x070000, 0x070001) AM_READ(konamigt_input_word_r)
421414   AM_RANGE(0x080000, 0x0bffff) AM_ROM
422415ADDRESS_MAP_END
423416
417
418static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 8 )
419   AM_RANGE(0x0000, 0x3fff) AM_ROM
420   AM_RANGE(0x4000, 0x47ff) AM_RAM
421   AM_RANGE(0xa000, 0xafff) AM_DEVWRITE("konami", k005289_pitch_A_w)
422   AM_RANGE(0xc000, 0xcfff) AM_DEVWRITE("konami", k005289_pitch_B_w)
423   AM_RANGE(0xe001, 0xe001) AM_READ(soundlatch_r)
424   AM_RANGE(0xe003, 0xe003) AM_DEVWRITE("konami", k005289_keylatch_A_w)
425   AM_RANGE(0xe004, 0xe004) AM_DEVWRITE("konami", k005289_keylatch_B_w)
426   AM_RANGE(0xe005, 0xe005) AM_DEVWRITE("ay2", ay8910_address_w)
427   AM_RANGE(0xe006, 0xe006) AM_DEVWRITE("ay1", ay8910_address_w)
428   AM_RANGE(0xe086, 0xe086) AM_DEVREAD("ay1", ay8910_r)
429   AM_RANGE(0xe106, 0xe106) AM_DEVWRITE("ay1", ay8910_data_w)
430   AM_RANGE(0xe205, 0xe205) AM_DEVREAD("ay2", ay8910_r)
431   AM_RANGE(0xe405, 0xe405) AM_DEVWRITE("ay2", ay8910_data_w)
432ADDRESS_MAP_END
433
424434static ADDRESS_MAP_START( gx400_sound_map, ADDRESS_SPACE_PROGRAM, 8 )
425435   AM_RANGE(0x0000, 0x1fff) AM_ROM
426436   AM_RANGE(0x4000, 0x87ff) AM_RAM AM_BASE(&gx400_shared_ram)
r4441r4442
443453
444454static ADDRESS_MAP_START( salamand_map, ADDRESS_SPACE_PROGRAM, 16 )
445455   AM_RANGE(0x000000, 0x07ffff) AM_ROM
446   AM_RANGE(0x080000, 0x087fff) AM_RAM AM_BASE(&ram)
456   AM_RANGE(0x080000, 0x087fff) AM_RAM
447457   AM_RANGE(0x090000, 0x091fff) AM_RAM_WRITE(salamander_palette_word_w) AM_BASE(&paletteram16)
448   AM_RANGE(0x0A0000, 0x0A0001) AM_WRITE(nemesis_irq_enable_word_w)          /* irq enable */
449   AM_RANGE(0x0C0000, 0x0C0001) AM_WRITE(salamand_soundlatch_word_w)
458   AM_RANGE(0x0a0000, 0x0a0001) AM_WRITE(salamand_control_port_word_w)      /* irq enable, flipscreen, etc. */
459   AM_RANGE(0x0c0000, 0x0c0001) AM_WRITE(nemesis_soundlatch_word_w)
450460   AM_RANGE(0x0c0002, 0x0c0003) AM_READ_PORT("DSW0")
451   AM_RANGE(0x0C0004, 0x0C0005) AM_WRITE(SMH_NOP)        /* Watchdog at $c0005 */
461   AM_RANGE(0x0c0004, 0x0c0005) AM_WRITE(watchdog_reset16_w)   /* probably */
452462   AM_RANGE(0x0c2000, 0x0c2001) AM_READ_PORT("IN0")   /* Coins, start buttons, test mode */
453463   AM_RANGE(0x0c2002, 0x0c2003) AM_READ_PORT("IN1")
454464   AM_RANGE(0x0c2004, 0x0c2005) AM_READ_PORT("IN2")
455465   AM_RANGE(0x0c2006, 0x0c2007) AM_READ_PORT("DSW1")
456   AM_RANGE(0x100000, 0x100fff) AM_RAM_WRITE(nemesis_videoram1b_word_w) AM_BASE(&nemesis_videoram1b)   /* VRAM 1 */
457   AM_RANGE(0x101000, 0x101fff) AM_RAM_WRITE(nemesis_videoram1f_word_w) AM_BASE(&nemesis_videoram1f)   /* VRAM 1 */
458   AM_RANGE(0x102000, 0x102fff) AM_RAM_WRITE(nemesis_videoram2b_word_w) AM_BASE(&nemesis_videoram2b)   /* VRAM 2 */
459   AM_RANGE(0x103000, 0x103fff) AM_RAM_WRITE(nemesis_videoram2f_word_w) AM_BASE(&nemesis_videoram2f)   /* VRAM 2 */
466   AM_RANGE(0x100000, 0x100fff) AM_RAM_WRITE(nemesis_videoram2_word_w) AM_BASE(&nemesis_videoram2)      /* VRAM */
467   AM_RANGE(0x101000, 0x101fff) AM_RAM_WRITE(nemesis_videoram1_word_w) AM_BASE(&nemesis_videoram1)
468   AM_RANGE(0x102000, 0x102fff) AM_RAM_WRITE(nemesis_colorram2_word_w) AM_BASE(&nemesis_colorram2)
469   AM_RANGE(0x103000, 0x103fff) AM_RAM_WRITE(nemesis_colorram1_word_w) AM_BASE(&nemesis_colorram1)
460470   AM_RANGE(0x120000, 0x12ffff) AM_RAM_WRITE(nemesis_characterram_word_w) AM_BASE(&nemesis_characterram) AM_SIZE(&nemesis_characterram_size)
461471   AM_RANGE(0x180000, 0x180fff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size)      /* more sprite ram ??? */
462472   AM_RANGE(0x190000, 0x191fff) AM_RAM
463   AM_RANGE(0x190000, 0x1903ff) AM_RAM AM_BASE(&nemesis_xscroll1)
464   AM_RANGE(0x190400, 0x1907ff) AM_RAM AM_BASE(&nemesis_xscroll2)
465   AM_RANGE(0x190f00, 0x190f7f) AM_RAM AM_BASE(&nemesis_yscroll1)
466   AM_RANGE(0x190f80, 0x190fff) AM_RAM AM_BASE(&nemesis_yscroll2)
473   AM_RANGE(0x190000, 0x1903ff) AM_BASE(&nemesis_xscroll2)
474   AM_RANGE(0x190400, 0x1907ff) AM_BASE(&nemesis_xscroll1)
475   AM_RANGE(0x190f00, 0x190f7f) AM_BASE(&nemesis_yscroll1)
476   AM_RANGE(0x190f80, 0x190fff) AM_BASE(&nemesis_yscroll2)
467477ADDRESS_MAP_END
468478
469479static ADDRESS_MAP_START( blkpnthr_map, ADDRESS_SPACE_PROGRAM, 16 )
470480   AM_RANGE(0x000000, 0x07ffff) AM_ROM
471481   AM_RANGE(0x080000, 0x081fff) AM_RAM_WRITE(salamander_palette_word_w) AM_BASE(&paletteram16)
472   AM_RANGE(0x090000, 0x097fff) AM_RAM AM_BASE(&ram)
473   AM_RANGE(0x0A0000, 0x0A0001) AM_WRITE(nemesis_irq_enable_word_w)          /* irq enable */
474   AM_RANGE(0x0C0000, 0x0C0001) AM_WRITE(salamand_soundlatch_word_w)
482   AM_RANGE(0x090000, 0x097fff) AM_RAM
483   AM_RANGE(0x0a0000, 0x0a0001) AM_RAM AM_WRITE(salamand_control_port_word_w)      /* irq enable, flipscreen, etc. */
484   AM_RANGE(0x0c0000, 0x0c0001) AM_WRITE(nemesis_soundlatch_word_w)
475485   AM_RANGE(0x0c0002, 0x0c0003) AM_READ_PORT("DSW0")
476   AM_RANGE(0x0C0004, 0x0C0005) AM_WRITE(SMH_NOP)        /* Watchdog at $c0005 */
486   AM_RANGE(0x0c0004, 0x0c0005) AM_WRITE(watchdog_reset16_w)   /* probably */
477487   AM_RANGE(0x0c2000, 0x0c2001) AM_READ_PORT("IN0")   /* Coins, start buttons, test mode */
478488   AM_RANGE(0x0c2002, 0x0c2003) AM_READ_PORT("IN1")
479489   AM_RANGE(0x0c2004, 0x0c2005) AM_READ_PORT("IN2")
480490   AM_RANGE(0x0c2006, 0x0c2007) AM_READ_PORT("DSW1")
481   AM_RANGE(0x100000, 0x100fff) AM_RAM_WRITE(nemesis_videoram2f_word_w) AM_BASE(&nemesis_videoram2f)   /* VRAM 2 */
482   AM_RANGE(0x101000, 0x101fff) AM_RAM_WRITE(nemesis_videoram2b_word_w) AM_BASE(&nemesis_videoram2b)   /* VRAM 2 */
483   AM_RANGE(0x102000, 0x102fff) AM_RAM_WRITE(nemesis_videoram1f_word_w) AM_BASE(&nemesis_videoram1f)   /* VRAM 1 */
484   AM_RANGE(0x103000, 0x103fff) AM_RAM_WRITE(nemesis_videoram1b_word_w) AM_BASE(&nemesis_videoram1b)   /* VRAM 1 */
491   AM_RANGE(0x100000, 0x100fff) AM_RAM_WRITE(nemesis_colorram1_word_w) AM_BASE(&nemesis_colorram1) AM_MIRROR(0x4000)   /* VRAM */
492   AM_RANGE(0x101000, 0x101fff) AM_RAM_WRITE(nemesis_colorram2_word_w) AM_BASE(&nemesis_colorram2) AM_MIRROR(0x4000)
493   AM_RANGE(0x102000, 0x102fff) AM_RAM_WRITE(nemesis_videoram1_word_w) AM_BASE(&nemesis_videoram1)
494   AM_RANGE(0x103000, 0x103fff) AM_RAM_WRITE(nemesis_videoram2_word_w) AM_BASE(&nemesis_videoram2)
485495   AM_RANGE(0x120000, 0x12ffff) AM_RAM_WRITE(nemesis_characterram_word_w) AM_BASE(&nemesis_characterram) AM_SIZE(&nemesis_characterram_size)
486496   AM_RANGE(0x180000, 0x181fff) AM_RAM
487   AM_RANGE(0x180000, 0x1803ff) AM_BASE(&nemesis_xscroll2)
488   AM_RANGE(0x180400, 0x1807ff) AM_BASE(&nemesis_xscroll1)
497   AM_RANGE(0x180000, 0x1803ff) AM_BASE(&nemesis_xscroll1)
498   AM_RANGE(0x180400, 0x1807ff) AM_BASE(&nemesis_xscroll2)
489499   AM_RANGE(0x180f00, 0x180f7f) AM_BASE(&nemesis_yscroll2)
490500   AM_RANGE(0x180f80, 0x180fff) AM_BASE(&nemesis_yscroll1)
491501   AM_RANGE(0x190000, 0x190fff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size)      /* more sprite ram ??? */
492502ADDRESS_MAP_END
493503
494504static ADDRESS_MAP_START( citybomb_map, ADDRESS_SPACE_PROGRAM, 16 )
495   AM_RANGE(0x000000, 0x01ffff) AM_ROM      /* ROM BIOS */
496   AM_RANGE(0x080000, 0x087fff) AM_RAM AM_BASE(&ram)
505   AM_RANGE(0x000000, 0x01ffff) AM_ROM
506   AM_RANGE(0x080000, 0x087fff) AM_RAM
497507   AM_RANGE(0x0e0000, 0x0e1fff) AM_RAM_WRITE(salamander_palette_word_w) AM_BASE(&paletteram16)
498508   AM_RANGE(0x0f0000, 0x0f0001) AM_READ_PORT("DSW1")
499509   AM_RANGE(0x0f0002, 0x0f0003) AM_READ_PORT("IN2")
500510   AM_RANGE(0x0f0004, 0x0f0005) AM_READ_PORT("IN1")
501511   AM_RANGE(0x0f0006, 0x0f0007) AM_READ_PORT("IN0")   /* Coins, start buttons, test mode */
502512   AM_RANGE(0x0f0008, 0x0f0009) AM_READ_PORT("DSW0")
503   AM_RANGE(0x0f0010, 0x0f0011) AM_WRITE(salamand_soundlatch_word_w)
504   AM_RANGE(0x0f0018, 0x0f0019) AM_WRITENOP         /* Watchdog */
505   AM_RANGE(0x0f0020, 0x0f0021) AM_NOP               /* Analog device */
506   AM_RANGE(0x0f8000, 0x0f8001) AM_WRITE(nemesis_irq_enable_word_w)          /* irq enable */
513   AM_RANGE(0x0f0010, 0x0f0011) AM_WRITE(nemesis_soundlatch_word_w)
514   AM_RANGE(0x0f0018, 0x0f0019) AM_WRITE(watchdog_reset16_w)   /* probably */
515   AM_RANGE(0x0f0020, 0x0f0021) AM_READ(selected_ip_word_r) AM_WRITENOP    /* WEC Le Mans 24 control? */
516   AM_RANGE(0x0f8000, 0x0f8001) AM_WRITE(salamand_control_port_word_w)      /* irq enable, flipscreen, etc. */
507517   AM_RANGE(0x100000, 0x1bffff) AM_ROM
508518   AM_RANGE(0x200000, 0x20ffff) AM_RAM_WRITE(nemesis_characterram_word_w) AM_BASE(&nemesis_characterram) AM_SIZE(&nemesis_characterram_size)
509   AM_RANGE(0x210000, 0x210fff) AM_RAM_WRITE(nemesis_videoram1f_word_w) AM_BASE(&nemesis_videoram1f)   /* VRAM 1 */
510   AM_RANGE(0x211000, 0x211fff) AM_RAM_WRITE(nemesis_videoram1b_word_w) AM_BASE(&nemesis_videoram1b)   /* VRAM 1 */
511   AM_RANGE(0x212000, 0x212fff) AM_RAM_WRITE(nemesis_videoram2f_word_w) AM_BASE(&nemesis_videoram2f)   /* VRAM 2 */
512   AM_RANGE(0x213000, 0x213fff) AM_RAM_WRITE(nemesis_videoram2b_word_w) AM_BASE(&nemesis_videoram2b)   /* VRAM 2 */
519   AM_RANGE(0x210000, 0x210fff) AM_RAM_WRITE(nemesis_videoram1_word_w) AM_BASE(&nemesis_videoram1)      /* VRAM */
520   AM_RANGE(0x211000, 0x211fff) AM_RAM_WRITE(nemesis_videoram2_word_w) AM_BASE(&nemesis_videoram2)
521   AM_RANGE(0x212000, 0x212fff) AM_RAM_WRITE(nemesis_colorram1_word_w) AM_BASE(&nemesis_colorram1)
522   AM_RANGE(0x213000, 0x213fff) AM_RAM_WRITE(nemesis_colorram2_word_w) AM_BASE(&nemesis_colorram2)
513523   AM_RANGE(0x300000, 0x301fff) AM_RAM
514   AM_RANGE(0x300000, 0x3003ff) AM_BASE(&nemesis_xscroll2)
515   AM_RANGE(0x300400, 0x3007ff) AM_BASE(&nemesis_xscroll1)
524   AM_RANGE(0x300000, 0x3003ff) AM_BASE(&nemesis_xscroll1)
525   AM_RANGE(0x300400, 0x3007ff) AM_BASE(&nemesis_xscroll2)
516526   AM_RANGE(0x300f00, 0x300f7f) AM_BASE(&nemesis_yscroll2)
517527   AM_RANGE(0x300f80, 0x300fff) AM_BASE(&nemesis_yscroll1)
518528   AM_RANGE(0x310000, 0x310fff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size)      /* more sprite ram ??? */
519529ADDRESS_MAP_END
520530
521531static ADDRESS_MAP_START( nyanpani_map, ADDRESS_SPACE_PROGRAM, 16 )
522   AM_RANGE(0x000000, 0x01ffff) AM_ROM      /* ROM BIOS */
523   AM_RANGE(0x040000, 0x047fff) AM_RAM AM_BASE(&ram)
532   AM_RANGE(0x000000, 0x01ffff) AM_ROM
533   AM_RANGE(0x040000, 0x047fff) AM_RAM
524534   AM_RANGE(0x060000, 0x061fff) AM_RAM_WRITE(salamander_palette_word_w) AM_BASE(&paletteram16)
525   AM_RANGE(0x100000, 0x13ffff) AM_ROM      /* ROM BIOS */
535   AM_RANGE(0x100000, 0x13ffff) AM_ROM
526536   AM_RANGE(0x070000, 0x070001) AM_READ_PORT("DSW1")
527537   AM_RANGE(0x070002, 0x070003) AM_READ_PORT("IN2")
528538   AM_RANGE(0x070004, 0x070005) AM_READ_PORT("IN1")
529539   AM_RANGE(0x070006, 0x070007) AM_READ_PORT("IN0")   /* Coins, start buttons, test mode */
530540   AM_RANGE(0x070008, 0x070009) AM_READ_PORT("DSW0")
531   AM_RANGE(0x070010, 0x070011) AM_WRITE(salamand_soundlatch_word_w)
532   AM_RANGE(0x070018, 0x070019) AM_WRITE(SMH_NOP)        /* Watchdog */
533   AM_RANGE(0x078000, 0x078001) AM_WRITE(nemesis_irq_enable_word_w)          /* irq enable */
534   AM_RANGE(0x200000, 0x200fff) AM_RAM_WRITE(nemesis_videoram1f_word_w) AM_BASE(&nemesis_videoram1f)   /* VRAM 1 */
535   AM_RANGE(0x201000, 0x201fff) AM_RAM_WRITE(nemesis_videoram1b_word_w) AM_BASE(&nemesis_videoram1b)   /* VRAM 1 */
536   AM_RANGE(0x202000, 0x202fff) AM_RAM_WRITE(nemesis_videoram2f_word_w) AM_BASE(&nemesis_videoram2f)   /* VRAM 2 */
537   AM_RANGE(0x203000, 0x203fff) AM_RAM_WRITE(nemesis_videoram2b_word_w) AM_BASE(&nemesis_videoram2b)   /* VRAM 2 */
541   AM_RANGE(0x070010, 0x070011) AM_WRITE(nemesis_soundlatch_word_w)
542   AM_RANGE(0x070018, 0x070019) AM_WRITE(watchdog_reset16_w)   /* probably */
543   AM_RANGE(0x078000, 0x078001) AM_WRITE(salamand_control_port_word_w)      /* irq enable, flipscreen, etc. */
544   AM_RANGE(0x200000, 0x200fff) AM_RAM_WRITE(nemesis_videoram1_word_w) AM_BASE(&nemesis_videoram1)      /* VRAM */
545   AM_RANGE(0x201000, 0x201fff) AM_RAM_WRITE(nemesis_videoram2_word_w) AM_BASE(&nemesis_videoram2)
546   AM_RANGE(0x202000, 0x202fff) AM_RAM_WRITE(nemesis_colorram1_word_w) AM_BASE(&nemesis_colorram1)
547   AM_RANGE(0x203000, 0x203fff) AM_RAM_WRITE(nemesis_colorram2_word_w) AM_BASE(&nemesis_colorram2)
538548   AM_RANGE(0x210000, 0x21ffff) AM_RAM_WRITE(nemesis_characterram_word_w) AM_BASE(&nemesis_characterram) AM_SIZE(&nemesis_characterram_size)
539549   AM_RANGE(0x300000, 0x300fff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size)      /* more sprite ram ??? */
540550   AM_RANGE(0x310000, 0x311fff) AM_RAM
541   AM_RANGE(0x310000, 0x3103ff) AM_BASE(&nemesis_xscroll2)
542   AM_RANGE(0x310400, 0x3107ff) AM_BASE(&nemesis_xscroll1)
551   AM_RANGE(0x310000, 0x3103ff) AM_BASE(&nemesis_xscroll1)
552   AM_RANGE(0x310400, 0x3107ff) AM_BASE(&nemesis_xscroll2)
543553   AM_RANGE(0x310f00, 0x310f7f) AM_BASE(&nemesis_yscroll2)
544554   AM_RANGE(0x310f80, 0x310fff) AM_BASE(&nemesis_yscroll1)
545555ADDRESS_MAP_END
546556
547557static READ8_HANDLER( wd_r )
548558{
549   a^= 1;
550   return a;
559   frame_counter^= 1;
560   return frame_counter;
551561}
552562
553static WRITE8_DEVICE_HANDLER( city_sound_bank_w )
554{
555   int bank_A=(data&0x3);
556   int bank_B=((data>>2)&0x3);
557   k007232_set_bank( device, bank_A, bank_B );
558}
559
560563static ADDRESS_MAP_START( sal_sound_map, ADDRESS_SPACE_PROGRAM, 8 )
561564   AM_RANGE(0x0000, 0x7fff) AM_ROM
562565   AM_RANGE(0x8000, 0x87ff) AM_RAM
r4441r4442
597600   AM_RANGE(0x040000, 0x05ffff) AM_ROM
598601   AM_RANGE(0x080000, 0x083fff) AM_RAM
599602   AM_RANGE(0x090000, 0x091fff) AM_RAM_WRITE(salamander_palette_word_w) AM_BASE(&paletteram16)
600   AM_RANGE(0x0a0000, 0x0a0001) AM_WRITE(nemesis_irq_enable_word_w)          /* irq enable */
601   AM_RANGE(0x0c0000, 0x0c0001) AM_WRITE(salamand_soundlatch_word_w)
603   AM_RANGE(0x0a0000, 0x0a0001) AM_WRITE(salamand_control_port_word_w)      /* irq enable, flipscreen, etc. */
604   AM_RANGE(0x0c0000, 0x0c0001) AM_WRITE(nemesis_soundlatch_word_w)
602605   AM_RANGE(0x0c0002, 0x0c0003) AM_READ_PORT("DSW0")
603606   AM_RANGE(0x0c0004, 0x0c0005) AM_READ_PORT("DSW1")
604607   AM_RANGE(0x0c0006, 0x0c0007) AM_READ_PORT("TEST")
605   AM_RANGE(0x0c0008, 0x0c0009) AM_WRITENOP   /* watchdog probably */
608   AM_RANGE(0x0c0008, 0x0c0009) AM_WRITE(watchdog_reset16_w)   /* watchdog probably */
606609   AM_RANGE(0x0c000a, 0x0c000b) AM_READ_PORT("IN0")
607610   AM_RANGE(0x0c2000, 0x0c2001) AM_READ(konamigt_input_word_r)   /* Konami GT control */
608611   AM_RANGE(0x0c2800, 0x0c2801) AM_WRITENOP
609612   AM_RANGE(0x0c2802, 0x0c2803) AM_WRITE(gx400_irq2_enable_word_w) // or at 0x0c2804 ?
610613   AM_RANGE(0x0c2804, 0x0c2805) AM_WRITENOP
611   AM_RANGE(0x0c4000, 0x0c4001) AM_READ_PORT("IN1") AM_WRITE(selected_ip_w)
612   AM_RANGE(0x0c4002, 0x0c4003) AM_READ(selected_ip_r)   /* WEC Le Mans 24 control */ AM_WRITENOP /* latches the value read previously */
613   AM_RANGE(0x100000, 0x100fff) AM_READ(SMH_RAM) AM_WRITE(nemesis_videoram1b_word_w) AM_BASE(&nemesis_videoram1b)   /* VRAM 1 */
614   AM_RANGE(0x101000, 0x101fff) AM_READ(SMH_RAM) AM_WRITE(nemesis_videoram1f_word_w) AM_BASE(&nemesis_videoram1f)   /* VRAM 1 */
615   AM_RANGE(0x102000, 0x102fff) AM_READ(SMH_RAM) AM_WRITE(nemesis_videoram2b_word_w) AM_BASE(&nemesis_videoram2b)   /* VRAM 2 */
616   AM_RANGE(0x103000, 0x103fff) AM_READ(SMH_RAM) AM_WRITE(nemesis_videoram2f_word_w) AM_BASE(&nemesis_videoram2f)   /* VRAM 2 */
617   AM_RANGE(0x120000, 0x12ffff) AM_READ(SMH_RAM) AM_WRITE(nemesis_characterram_word_w) AM_BASE(&nemesis_characterram) AM_SIZE(&nemesis_characterram_size)
614   AM_RANGE(0x0c4000, 0x0c4001) AM_READ_PORT("IN1") AM_WRITE(selected_ip_word_w)
615   AM_RANGE(0x0c4002, 0x0c4003) AM_READ(selected_ip_word_r) AM_WRITENOP    /* WEC Le Mans 24 control. latches the value read previously */
616   AM_RANGE(0x100000, 0x100fff) AM_RAM_WRITE(nemesis_videoram2_word_w) AM_BASE(&nemesis_videoram2)      /* VRAM */
617   AM_RANGE(0x101000, 0x101fff) AM_RAM_WRITE(nemesis_videoram1_word_w) AM_BASE(&nemesis_videoram1)
618   AM_RANGE(0x102000, 0x102fff) AM_RAM_WRITE(nemesis_colorram2_word_w) AM_BASE(&nemesis_colorram2)
619   AM_RANGE(0x103000, 0x103fff) AM_RAM_WRITE(nemesis_colorram1_word_w) AM_BASE(&nemesis_colorram1)
620   AM_RANGE(0x120000, 0x12ffff) AM_RAM_WRITE(nemesis_characterram_word_w) AM_BASE(&nemesis_characterram) AM_SIZE(&nemesis_characterram_size)
618621   AM_RANGE(0x180000, 0x180fff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size)
619   AM_RANGE(0x190000, 0x1903ff) AM_READ(SMH_RAM) AM_WRITE(SMH_RAM) AM_BASE(&nemesis_xscroll1)
620   AM_RANGE(0x190400, 0x1907ff) AM_READ(SMH_RAM) AM_WRITE(SMH_RAM) AM_BASE(&nemesis_xscroll2)
621   AM_RANGE(0x190800, 0x190eff) AM_RAM         /* not used */
622   AM_RANGE(0x190f00, 0x190f7f) AM_READ(SMH_RAM) AM_WRITE(SMH_RAM) AM_BASE(&nemesis_yscroll1)
623   AM_RANGE(0x190f80, 0x190fff) AM_READ(SMH_RAM) AM_WRITE(SMH_RAM) AM_BASE(&nemesis_yscroll2)
624   AM_RANGE(0x191000, 0x191fff) AM_RAM         /* not used */
622   AM_RANGE(0x190000, 0x191fff) AM_RAM
623   AM_RANGE(0x190000, 0x1903ff) AM_BASE(&nemesis_xscroll2)
624   AM_RANGE(0x190400, 0x1907ff) AM_BASE(&nemesis_xscroll1)
625   AM_RANGE(0x190f00, 0x190f7f) AM_BASE(&nemesis_yscroll1)
626   AM_RANGE(0x190f80, 0x190fff) AM_BASE(&nemesis_yscroll2)
625627ADDRESS_MAP_END
626628
627629/******************************************************************************/
r4441r4442
812814/* This needs to be sorted */
813815static INPUT_PORTS_START( konamigt )
814816   PORT_START("IN0")
815   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
816   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
817   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
818   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1)
817819   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 )
818820   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
819821   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
r4441r4442
883885/* This needs to be sorted */
884886static INPUT_PORTS_START( rf2 )
885887   PORT_START("IN0")
886   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
887   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
888   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(1)
889   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(1)
888890   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
889891   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
890892   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
r4441r4442
13621364
13631365static INPUT_PORTS_START( blkpnthr )
13641366   PORT_START("IN0")
1365   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
1366   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
1367   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
1368   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1)
13671369   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 )
13681370   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START1 )
13691371   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START2 )
r4441r4442
14911493   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
14921494   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
14931495   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
1494   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
1496   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
14951497
14961498   PORT_START("DSW0")
14971499   PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW0:1,2,3,4")
r4441r4442
15461548   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:6")
15471549   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
15481550   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1551
1552   /* WEC Le Mans 24 specific control? */
1553   PORT_START("ACCEL")      /* Accelerator */
1554   PORT_BIT( 0xff, 0, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(30) PORT_KEYDELTA(10)
1555
1556   PORT_START("WHEEL")      /* Steering Wheel */
1557   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(50) PORT_KEYDELTA(5)
15491558INPUT_PORTS_END
15501559
15511560static INPUT_PORTS_START( nyanpani )
15521561   PORT_START("IN0")
1553   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
1554   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
1562   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2)
1563   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2)
15551564   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
15561565   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
15571566   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
r4441r4442
16391648   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
16401649   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 )
16411650   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START1 )
1642   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 )
1643   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
1651   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
1652   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1)
16441653   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
16451654   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
16461655
r4441r4442
19701979MACHINE_DRIVER_END
19711980
19721981
1982static MACHINE_DRIVER_START( gx400 )
1983
1984   /* basic machine hardware */
1985   MDRV_CPU_ADD("maincpu", M68000,18432000/2)     /* 9.216MHz */
1986   MDRV_CPU_PROGRAM_MAP(gx400_map,0)
1987   MDRV_CPU_VBLANK_INT_HACK(gx400_interrupt,3)
1988
1989   MDRV_CPU_ADD("audiocpu", Z80,14318180/4)        /* 3.579545 MHz */
1990   MDRV_CPU_PROGRAM_MAP(gx400_sound_map,0)
1991   MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse)   /* interrupts are triggered by the main CPU */
1992
1993   MDRV_MACHINE_RESET(nemesis)
1994
1995   /* video hardware */
1996   MDRV_SCREEN_ADD("screen", RASTER)
1997   MDRV_SCREEN_REFRESH_RATE((18432000.0/4)/(288*264))      /* 60.606060 Hz */
1998   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
1999   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
2000   MDRV_SCREEN_SIZE(32*8, 32*8)
2001   MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
2002
2003   MDRV_GFXDECODE(nemesis)
2004   MDRV_PALETTE_LENGTH(2048)
2005
2006   MDRV_VIDEO_START(nemesis)
2007   MDRV_VIDEO_UPDATE(nemesis)
2008
2009   /* sound hardware */
2010   MDRV_SPEAKER_STANDARD_MONO("mono")
2011
2012   MDRV_SOUND_ADD("ay1", AY8910, 14318180/8)
2013   MDRV_SOUND_CONFIG(ay8910_interface_1)
2014   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)   /* verified with OST */
2015
2016   MDRV_SOUND_ADD("ay2", AY8910, 14318180/8)
2017   MDRV_SOUND_CONFIG(ay8910_interface_2)
2018   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)   /* verified with OST */
2019
2020   MDRV_SOUND_ADD("konami", K005289, 3579545/2)
2021   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)   /* verified with OST */
2022
2023   MDRV_SOUND_ADD("vlm", VLM5030, 3579545)
2024   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)   /* unused */
2025MACHINE_DRIVER_END
2026
2027
19732028static MACHINE_DRIVER_START( konamigt )
19742029
19752030   /* basic machine hardware */
r4441r4442
20122067MACHINE_DRIVER_END
20132068
20142069
2070static MACHINE_DRIVER_START( rf2_gx400 )
2071
2072   /* basic machine hardware */
2073   MDRV_CPU_ADD("maincpu", M68000,18432000/2)     /* 9.216MHz */
2074   MDRV_CPU_PROGRAM_MAP(rf2_gx400_map,0)
2075   MDRV_CPU_VBLANK_INT_HACK(gx400_interrupt,3)
2076
2077   MDRV_CPU_ADD("audiocpu", Z80,14318180/4)        /* 3.579545 MHz */
2078   MDRV_CPU_PROGRAM_MAP(gx400_sound_map,0)
2079   MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse)   /* interrupts are triggered by the main CPU */
2080
2081   MDRV_MACHINE_RESET(nemesis)
2082
2083   /* video hardware */
2084   MDRV_SCREEN_ADD("screen", RASTER)
2085   MDRV_SCREEN_REFRESH_RATE((18432000.0/4)/(288*264))      /* 60.606060 Hz */
2086   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
2087   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
2088   MDRV_SCREEN_SIZE(32*8, 32*8)
2089   MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
2090
2091   MDRV_GFXDECODE(nemesis)
2092   MDRV_PALETTE_LENGTH(2048)
2093
2094   MDRV_VIDEO_START(nemesis)
2095   MDRV_VIDEO_UPDATE(nemesis)
2096
2097   /* sound hardware */
2098   MDRV_SPEAKER_STANDARD_MONO("mono")
2099
2100   MDRV_SOUND_ADD("ay1", AY8910, 14318180/8)
2101   MDRV_SOUND_CONFIG(ay8910_interface_1)
2102   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.85)
2103
2104   MDRV_SOUND_ADD("ay2", AY8910, 14318180/8)
2105   MDRV_SOUND_CONFIG(ay8910_interface_2)
2106   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
2107
2108   MDRV_SOUND_ADD("konami", K005289, 3579545/2)
2109   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
2110
2111   MDRV_SOUND_ADD("vlm", VLM5030, 3579545)
2112   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
2113MACHINE_DRIVER_END
2114
2115
20152116static MACHINE_DRIVER_START( salamand )
20162117
20172118   /* basic machine hardware */
r4441r4442
20382139   MDRV_PALETTE_LENGTH(2048)
20392140
20402141   MDRV_VIDEO_START(nemesis)
2041   MDRV_VIDEO_UPDATE(salamand)
2142   MDRV_VIDEO_UPDATE(nemesis)
20422143
20432144   /* sound hardware */
20442145   MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
r4441r4442
20872188   MDRV_PALETTE_LENGTH(2048)
20882189
20892190   MDRV_VIDEO_START(nemesis)
2090   MDRV_VIDEO_UPDATE(salamand)
2191   MDRV_VIDEO_UPDATE(nemesis)
20912192
20922193   /* sound hardware */
20932194   MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
r4441r4442
21322233   MDRV_PALETTE_LENGTH(2048)
21332234
21342235   MDRV_VIDEO_START(nemesis)
2135   MDRV_VIDEO_UPDATE(salamand)
2236   MDRV_VIDEO_UPDATE(nemesis)
21362237
21372238   /* sound hardware */
21382239   MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
r4441r4442
21812282   MDRV_PALETTE_LENGTH(2048)
21822283
21832284   MDRV_VIDEO_START(nemesis)
2184   MDRV_VIDEO_UPDATE(salamand)
2285   MDRV_VIDEO_UPDATE(nemesis)
21852286
21862287   /* sound hardware */
21872288   MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
r4441r4442
22042305MACHINE_DRIVER_END
22052306
22062307
2207static MACHINE_DRIVER_START( gx400 )
2208
2209   /* basic machine hardware */
2210   MDRV_CPU_ADD("maincpu", M68000,18432000/2)     /* 9.216MHz */
2211   MDRV_CPU_PROGRAM_MAP(gx400_map,0)
2212   MDRV_CPU_VBLANK_INT_HACK(gx400_interrupt,3)
2213
2214   MDRV_CPU_ADD("audiocpu", Z80,14318180/4)        /* 3.579545 MHz */
2215   MDRV_CPU_PROGRAM_MAP(gx400_sound_map,0)
2216   MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse)   /* interrupts are triggered by the main CPU */
2217
2218   MDRV_MACHINE_RESET(nemesis)
2219
2220   /* video hardware */
2221   MDRV_SCREEN_ADD("screen", RASTER)
2222   MDRV_SCREEN_REFRESH_RATE((18432000.0/4)/(288*264))      /* 60.606060 Hz */
2223   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
2224   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
2225   MDRV_SCREEN_SIZE(32*8, 32*8)
2226   MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
2227
2228   MDRV_GFXDECODE(nemesis)
2229   MDRV_PALETTE_LENGTH(2048)
2230
2231   MDRV_VIDEO_START(nemesis)
2232   MDRV_VIDEO_UPDATE(nemesis)
2233
2234   /* sound hardware */
2235   MDRV_SPEAKER_STANDARD_MONO("mono")
2236
2237   MDRV_SOUND_ADD("ay1", AY8910, 14318180/8)
2238   MDRV_SOUND_CONFIG(ay8910_interface_1)
2239   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)   /* verified with OST */
2240
2241   MDRV_SOUND_ADD("ay2", AY8910, 14318180/8)
2242   MDRV_SOUND_CONFIG(ay8910_interface_2)
2243   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)   /* verified with OST */
2244
2245   MDRV_SOUND_ADD("konami", K005289, 3579545/2)
2246   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.35)   /* verified with OST */
2247
2248   MDRV_SOUND_ADD("vlm", VLM5030, 3579545)
2249   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)   /* unused */
2250MACHINE_DRIVER_END
2251
2252
2253static MACHINE_DRIVER_START( rf2_gx400 )
2254
2255   /* basic machine hardware */
2256   MDRV_CPU_ADD("maincpu", M68000,18432000/2)     /* 9.216MHz */
2257   MDRV_CPU_PROGRAM_MAP(rf2_gx400_map,0)
2258   MDRV_CPU_VBLANK_INT_HACK(gx400_interrupt,3)
2259
2260   MDRV_CPU_ADD("audiocpu", Z80,14318180/4)        /* 3.579545 MHz */
2261   MDRV_CPU_PROGRAM_MAP(gx400_sound_map,0)
2262   MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse)   /* interrupts are triggered by the main CPU */
2263
2264   MDRV_MACHINE_RESET(nemesis)
2265
2266   /* video hardware */
2267   MDRV_SCREEN_ADD("screen", RASTER)
2268   MDRV_SCREEN_REFRESH_RATE((18432000.0/4)/(288*264))      /* 60.606060 Hz */
2269   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
2270   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
2271   MDRV_SCREEN_SIZE(32*8, 32*8)
2272   MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
2273
2274   MDRV_GFXDECODE(nemesis)
2275   MDRV_PALETTE_LENGTH(2048)
2276
2277   MDRV_VIDEO_START(nemesis)
2278   MDRV_VIDEO_UPDATE(nemesis)
2279
2280   /* sound hardware */
2281   MDRV_SPEAKER_STANDARD_MONO("mono")
2282
2283   MDRV_SOUND_ADD("ay1", AY8910, 14318180/8)
2284   MDRV_SOUND_CONFIG(ay8910_interface_1)
2285   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.85)
2286
2287   MDRV_SOUND_ADD("ay2", AY8910, 14318180/8)
2288   MDRV_SOUND_CONFIG(ay8910_interface_2)
2289   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
2290
2291   MDRV_SOUND_ADD("konami", K005289, 3579545/2)
2292   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
2293
2294   MDRV_SOUND_ADD("vlm", VLM5030, 3579545)
2295   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
2296MACHINE_DRIVER_END
2297
22982308static MACHINE_DRIVER_START( hcrash )
22992309
23002310   /* basic machine hardware */
r4441r4442
23192329   MDRV_PALETTE_LENGTH(2048)
23202330
23212331   MDRV_VIDEO_START(nemesis)
2322   MDRV_VIDEO_UPDATE(salamand)
2332   MDRV_VIDEO_UPDATE(nemesis)
23232333
23242334   /* sound hardware */
23252335   MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
r4441r4442
27532763ROM_END
27542764
27552765
2766static DRIVER_INIT( nemesis )
2767{
2768   /* Set up save state */
2769   state_save_register_global(machine, nemesis_irq_on);
2770   state_save_register_global(machine, nemesis_irq1_on);
2771   state_save_register_global(machine, nemesis_irq2_on);
2772   state_save_register_global(machine, nemesis_irq4_on);
2773   state_save_register_global(machine, frame_counter);
2774   state_save_register_global(machine, gx400_irq1_cnt);
2775   state_save_register_global(machine, hcrash_selected_ip);
2776}
27562777
2757GAME( 1985, nemesis,  0,        nemesis,       nemesis,  0, ROT0,   "Konami", "Nemesis", 0 )
2758GAME( 1985, nemesuk,  nemesis,  nemesis,       nemesuk,  0, ROT0,   "Konami", "Nemesis (World?)", 0 )
2759GAME( 1985, konamigt, 0,        konamigt,      konamigt, 0, ROT0,   "Konami", "Konami GT", 0 )
2760GAME( 1985, rf2,      konamigt, rf2_gx400,     rf2,      0, ROT0,   "Konami", "Konami RF2 - Red Fighter", 0 )
2761GAME( 1985, twinbee,  0,        gx400,         twinbee,  0, ROT90,  "Konami", "TwinBee", 0 )
2762GAME( 1985, gradius,  nemesis,  gx400,         gradius,  0, ROT0,   "Konami", "Gradius", 0 )
2763GAME( 1985, gwarrior, 0,        gx400,         gwarrior, 0, ROT0,   "Konami", "Galactic Warriors", 0 )
2764GAME( 1986, salamand, 0,        salamand,      salamand, 0, ROT0,   "Konami", "Salamander (version D)", GAME_NO_COCKTAIL )
2765GAME( 1986, salamanj, salamand, salamand,      salamand, 0, ROT0,   "Konami", "Salamander (version J)", GAME_NO_COCKTAIL )
2766GAME( 1986, lifefrce, salamand, salamand,      salamand, 0, ROT0,   "Konami", "Lifeforce (US)", GAME_NO_COCKTAIL )
2767GAME( 1987, lifefrcj, salamand, salamand,      lifefrcj, 0, ROT0,   "Konami", "Lifeforce (Japan)", GAME_NO_COCKTAIL )
2768GAME( 1987, blkpnthr, 0,        blkpnthr,      blkpnthr, 0, ROT0,   "Konami", "Black Panther", GAME_NO_COCKTAIL )
2769GAME( 1987, citybomb, 0,        citybomb,      citybomb, 0, ROT270, "Konami", "City Bomber (World)", GAME_NO_COCKTAIL )
2770GAME( 1987, citybmrj, citybomb, citybomb,      citybomb, 0, ROT270, "Konami", "City Bomber (Japan)", GAME_NO_COCKTAIL )
2771GAME( 1987, hcrash,   0,        hcrash,        hcrash,   0, ROT0,   "Konami", "Hyper Crash (version D)", GAME_NO_COCKTAIL )
2772GAME( 1987, hcrashc,  hcrash,   hcrash,        hcrash,   0, ROT0,   "Konami", "Hyper Crash (version C)", GAME_NO_COCKTAIL )
2773GAME( 1988, kittenk,  0,        nyanpani,      nyanpani, 0, ROT0,   "Konami", "Kitten Kaboodle", GAME_NO_COCKTAIL )
2774GAME( 1988, nyanpani, kittenk,  nyanpani,      nyanpani, 0, ROT0,   "Konami", "Nyan Nyan Panic (Japan)", GAME_NO_COCKTAIL )
2778
2779GAME( 1985, nemesis,   0,         nemesis,    nemesis,   nemesis,  ROT0,   "Konami", "Nemesis",  GAME_SUPPORTS_SAVE )
2780GAME( 1985, nemesuk,   nemesis,   nemesis,    nemesuk,   nemesis,  ROT0,   "Konami", "Nemesis (World?)",  GAME_SUPPORTS_SAVE )
2781GAME( 1985, konamigt,  0,         konamigt,   konamigt,  nemesis,  ROT0,   "Konami", "Konami GT",  GAME_SUPPORTS_SAVE )
2782GAME( 1985, rf2,       konamigt,  rf2_gx400,  rf2,       nemesis,  ROT0,   "Konami", "Konami RF2 - Red Fighter",  GAME_SUPPORTS_SAVE )
2783GAME( 1985, twinbee,   0,         gx400,      twinbee,   nemesis,  ROT90,  "Konami", "TwinBee",  GAME_SUPPORTS_SAVE )
2784GAME( 1985, gradius,   nemesis,   gx400,      gradius,   nemesis,  ROT0,   "Konami", "Gradius",  GAME_SUPPORTS_SAVE )
2785GAME( 1985, gwarrior,  0,         gx400,      gwarrior,  nemesis,  ROT0,   "Konami", "Galactic Warriors",  GAME_SUPPORTS_SAVE )
2786GAME( 1986, salamand,  0,         salamand,   salamand,  nemesis,  ROT0,   "Konami", "Salamander (version D)",  GAME_SUPPORTS_SAVE )
2787GAME( 1986, salamanj,  salamand,  salamand,   salamand,  nemesis,  ROT0,   "Konami", "Salamander (version J)",  GAME_SUPPORTS_SAVE )
2788GAME( 1986, lifefrce,  salamand,  salamand,   salamand,  nemesis,  ROT0,   "Konami", "Lifeforce (US)",  GAME_SUPPORTS_SAVE )
2789GAME( 1987, lifefrcj,  salamand,  salamand,   lifefrcj,  nemesis,  ROT0,   "Konami", "Lifeforce (Japan)",  GAME_SUPPORTS_SAVE )
2790GAME( 1987, blkpnthr,  0,         blkpnthr,   blkpnthr,  nemesis,  ROT0,   "Konami", "Black Panther",  GAME_SUPPORTS_SAVE )
2791GAME( 1987, citybomb,  0,         citybomb,   citybomb,  nemesis,  ROT270, "Konami", "City Bomber (World)",  GAME_SUPPORTS_SAVE )
2792GAME( 1987, citybmrj,  citybomb,  citybomb,   citybomb,  nemesis,  ROT270, "Konami", "City Bomber (Japan)",  GAME_SUPPORTS_SAVE )
2793GAME( 1987, hcrash,    0,         hcrash,     hcrash,    nemesis,  ROT0,   "Konami", "Hyper Crash (version D)",  GAME_SUPPORTS_SAVE )
2794GAME( 1987, hcrashc,   hcrash,    hcrash,     hcrash,    nemesis,  ROT0,   "Konami", "Hyper Crash (version C)",  GAME_SUPPORTS_SAVE )
2795GAME( 1988, kittenk,   0,         nyanpani,   nyanpani,  nemesis,  ROT0,   "Konami", "Kitten Kaboodle",  GAME_SUPPORTS_SAVE )
2796GAME( 1988, nyanpani,  kittenk,   nyanpani,   nyanpani,  nemesis,  ROT0,   "Konami", "Nyan Nyan Panic (Japan)",  GAME_SUPPORTS_SAVE )
src/mame/drivers/stv.c
r4441r4442
38023802GAME( 1996, vfkids,    stvbios, stv, stv,        stv,          ROT0,   "Sega",                      "Virtua Fighter Kids (JUET 960319 V0.000)", GAME_IMPERFECT_SOUND )
38033803GAME( 1997, winterht,  stvbios, stv, stv,        winterht,     ROT0,   "Sega",                      "Winter Heat (JUET 971012 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
38043804GAME( 1997, znpwfv,    stvbios, stv, stv,        znpwfv,       ROT0,   "Sega",                       "Zen Nippon Pro-Wrestling Featuring Virtua (J 971123 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
3805GAME( 1997, nclubv3,   stvbios, stv, stv,        nameclv3,     ROT0,   "Sega",                       "Name Club Ver.3 (J 970723 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) // seems to work, although it could do with speedups, and the printer isn't emulated..
38063805
38073806/* Almost */
38083807GAME( 1997, vmahjong,  stvbios, stv, stvmp,      stv,          ROT0,   "Micronet",                    "Virtual Mahjong (J 961214 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
38093808GAME( 1998, twcup98,   stvbios, stv, stv,        twcup98,      ROT0,   "Tecmo",                       "Tecmo World Cup '98 (JUET 980410 V1.000)", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING ) // player movement
3810GAME( 1998, stress,    stvbios, stv, stv,        stv,          ROT0,   "Sega",                       "Stress Busters (J 981020 V1.000)", GAME_NOT_WORKING ) // needs printer
38113809GAME( 1995, smleague,  stvbios, stv, stv,        smleague,     ROT0,   "Sega",                       "Super Major League (U 960108 V1.000)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
38123810GAME( 1995, finlarch,  smleague,stv, stv,        finlarch,     ROT0,   "Sega",                       "Final Arch (J 950714 V1.001)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
3813GAME( 1998, elandore,  stvbios, stv, stv,        elandore,     ROT0,   "Sai-Mate",                    "Touryuu Densetsu Elan-Doree / Elan Doree - Legend of Dragoon (JUET 980922 V1.006)", GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
3811GAME( 1998, elandore,  stvbios, stv, stv,        elandore,     ROT0,   "Sai-Mate",                    "Touryuu Densetsu Elan-Doree / Elan Doree - Legend of Dragoon (JUET 980922 V1.006)", GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION | GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
38143812
3815/* Doing Something.. but not enough yet */
3813/* Unemulated printer device */
3814GAME( 1998, stress,    stvbios, stv, stv,        stv,          ROT0,   "Sega",                       "Stress Busters (J 981020 V1.000)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
3815GAME( 1997, nclubv3,   stvbios, stv, stv,        nameclv3,     ROT0,   "Sega",                       "Name Club Ver.3 (J 970723 V1.000)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING )
3816
3817/* Doing something.. but not enough yet */
38163818GAME( 1995, vfremix,   stvbios, stv, stv,        vfremix,      ROT0,   "Sega",                       "Virtua Fighter Remix (JUETBKAL 950428 V1.000)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
38173819GAME( 1997, findlove,  stvbios, stv, stv,        stv,        ROT0,   "Daiki / FCF",                   "Find Love (J 971212 V1.000)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
38183820GAME( 1996, decathlt,  stvbios, stv, stv,        decathlt,     ROT0,   "Sega",                       "Decathlete (JUET 960709 V1.001)", GAME_NO_SOUND | GAME_NOT_WORKING | GAME_UNEMULATED_PROTECTION )
src/mame/drivers/8080bw.c
r4441r4442
25942594GAME( 1979, spaceph,  ozmawars, invaders, spaceph,  0, ROT270, "Zilec Games", "Space Phantoms", GAME_SUPPORTS_SAVE )
25952595GAME( 1979, yosakdon, 0,        yosakdon, yosakdon, 0, ROT270, "Wing", "Yosaku To Donbei (set 1)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND ) /* bootleg? */
25962596GAME( 1979, yosakdoa, yosakdon, yosakdon, yosakdon, 0, ROT270, "Wing", "Yosaku To Donbei (set 2)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND ) /* bootleg? */
2597GAMEL(197?, shuttlei, 0,        shuttlei, shuttlei, 0, ROT270, "Omori", "Shuttle Invader", GAME_SUPPORTS_SAVE | GAME_NO_COCKTAIL, layout_shuttlei )
2597GAMEL(1979, shuttlei, 0,        shuttlei, shuttlei, 0, ROT270, "Omori", "Shuttle Invader", GAME_SUPPORTS_SAVE | GAME_NO_COCKTAIL, layout_shuttlei )
src/mame/drivers/namcos2.c
r4441r4442
10071007   PORT_START("AN4")      /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 4 */
10081008   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
10091009   PORT_START("AN5")      /* Steering Wheel */      /* sensitivity, delta, min, max */
1010   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(75) PORT_KEYDELTA(100) PORT_PLAYER(1)
1010   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(75) PORT_KEYDELTA(100)
10111011   PORT_START("AN6")      /* Brake Pedal */
1012   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(30) PORT_PLAYER(2)
1012   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(30)
10131013   PORT_START("AN7")      /* Accelerator Pedal */
1014   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(15) PORT_PLAYER(1)
1014   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(15)
10151015
10161016   PORT_START("MCUH")      /* 63B05Z0 - PORT H */
10171017   PORT_DIPNAME( 0x01, 0x01, "PortH 0x01")
r4441r4442
10701070   PORT_START("AN4")      /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 4 */
10711071   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
10721072   PORT_START("AN5")      /* Steering Wheel */      /* sensitivity, delta, min, max */
1073   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(1)
1073   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10)
10741074   PORT_START("AN6")      /* Brake Pedal */
1075   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(30) PORT_PLAYER(2)
1075   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(30)
10761076   PORT_START("AN7")      /* Accelerator Pedal */
1077   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(15) PORT_PLAYER(1)
1077   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(15)
10781078
10791079   PORT_START("MCUH")      /* 63B05Z0 - PORT H */
10801080   PORT_DIPNAME( 0x01, 0x01, "PortH 0x01")
r4441r4442
11571157   PORT_START("AN4")      /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 4 6 */
11581158   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
11591159   PORT_START("AN5")      /* Steering Wheel 7 */      /* sensitivity, delta, min, max */
1160   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(75) PORT_KEYDELTA(50) PORT_PLAYER(1)
1160   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(75) PORT_KEYDELTA(50)
11611161   PORT_START("AN6")      /* Brake Pedal 8 */
1162   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(30) PORT_PLAYER(2)
1162   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(30)
11631163   PORT_START("AN7")      /* Accelerator Pedal 9 */
1164   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(15) PORT_PLAYER(1)
1164   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(15)
11651165
11661166   PORT_START("MCUH")      /* 63B05Z0 - PORT H */
11671167   PORT_DIPNAME( 0x01, 0x01, "PortH 0x01")
r4441r4442
12491249   PORT_START("AN4")      /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 4 */
12501250   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
12511251   PORT_START("AN5") /* Steering Wheel */
1252   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(50) PORT_KEYDELTA(100) PORT_PLAYER(1)
1252   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(50) PORT_KEYDELTA(100)
12531253   PORT_START("AN6")      /* Brake pedal */
1254   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00,0x7f) PORT_SENSITIVITY(100) PORT_KEYDELTA(30) PORT_PLAYER(2)
1254   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_MINMAX(0x00,0x7f) PORT_SENSITIVITY(100) PORT_KEYDELTA(30)
12551255   PORT_START("AN7")      /* Accelerator pedal */
1256   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(15) PORT_PLAYER(1)
1256   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(15)
12571257
12581258   PORT_START("MCUH")      /* 63B05Z0 - PORT H */
12591259   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
r4441r4442
13041304   PORT_START("AN4")
13051305   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(8)
13061306   PORT_START("AN5")      /* Steering Wheel */
1307   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(70) PORT_PLAYER(1)
1307   PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(70)
13081308   PORT_START("AN6")      /* Brake pedal */
1309   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00,0x7f) PORT_SENSITIVITY(100) PORT_KEYDELTA(30) PORT_PLAYER(2)
1309   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_MINMAX(0x00,0x7f) PORT_SENSITIVITY(100) PORT_KEYDELTA(30)
13101310   PORT_START("AN7")      /* Accelerator pedal */
1311   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00,0x7f) PORT_SENSITIVITY(100) PORT_KEYDELTA(15) PORT_PLAYER(1)
1311   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00,0x7f) PORT_SENSITIVITY(100) PORT_KEYDELTA(15)
13121312
13131313   PORT_START("MCUH")      /* 63B05Z0 - PORT H */
13141314   PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED )
r4441r4442
13751375   PORT_START("AN4")      /* 63B05Z0 - 8 CHANNEL ANALOG - CHANNEL 4 */
13761376   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
13771377   PORT_START("AN5")      /* Steering Wheel */
1378   PORT_BIT( 0xff,  0x80, IPT_PADDLE ) PORT_SENSITIVITY(70) PORT_KEYDELTA(50) PORT_PLAYER(1)
1378   PORT_BIT( 0xff,  0x80, IPT_PADDLE ) PORT_SENSITIVITY(70) PORT_KEYDELTA(50)
13791379   PORT_START("AN6")      /* Brake pedal */
1380   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00,0x7f) PORT_SENSITIVITY(100) PORT_KEYDELTA(30) PORT_PLAYER(2)
1380   PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_MINMAX(0x00,0x7f) PORT_SENSITIVITY(100) PORT_KEYDELTA(30)
13811381   PORT_START("AN7")      /* Accelerator pedal */
1382   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00,0x7f) PORT_SENSITIVITY(100) PORT_KEYDELTA(15) PORT_PLAYER(1)
1382   PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00,0x7f) PORT_SENSITIVITY(100) PORT_KEYDELTA(15)
13831383
13841384   PORT_START("MCUH")      /* 63B05Z0 - PORT H */
13851385   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
src/mame/drivers/taitogn.c
r4441r4442
127127      CD PCB          - A PCMCIA cart slot connector mounted onto a small daughterboard
128128      *               - These parts located under the PCB
129129
130
131Taito G-Net card info
132---------------------
133
134The G-Net system uses a custom PCMCIA card for game software storage. The card is
135locked with a password and can't be read by conventional means.
136Some of the cards are made in separate pieces and can be opened. However some
137are encased in a single-piece steel shell and opening it up destroys the card.
138Some of the later games came packaged as a Compact Flash card and a PCMCIA to CF
139adapter, however these cards were also locked the same as the older type.
140The game uses an analog wheel (5k potentiometer) in the shape of a hand-held
141control unit and a trigger (another 5k potentiometer) used for acceleration
142and brake. The trigger and wheel are self centering. If the trigger is pulled back
143(like firing a gun) the car goes faster. If the trigger is pushed forward the car
144slows down. The controller looks a lot like the old Scalextric controllers (remember those?  :-)
145
146The controller is connected to the ZN2 main board to the 10 pin connector labelled
147'ANALOG'. Using two 5k-Ohm potentiometers, power (+5V) and ground are taken from the JAMMA
148edge connector or directly from the power supply. The output of the steering pot is
149connected to pin 2 and the output of the acceleration pot is connected to pin 3.
150The ANALOG connector output pins are tied directly to a chip next to the connector marked
151'NEC 78081G503 9810KX189'. This is a NEC 8-bit 78K0-family microcontroller with on-chip 8k ROM,
152256 bytes RAM, 33 I/O ports, 8-bit resolution 8-channel A/D converter, 3-channel timer, 1-channel
1533-wire serial interface interrupt control (USART) and other peripheral hardware.
154
155
156Card PCB Layouts
157----------------
158
159Type 1 (standard 'Taito' type, as found on most G-Net games)
160------ (This type has separate top and bottom pieces which are glued together and
161       (can be opened if done 'carefully'. But be careful the edges of the top lid are SHARP!)
162
163Top
164---
165
166RO-055A AI AM-1
167|-|-------------------------------------|
168| |        |---------|     |--------|   |
169| |        |S2812A150|     |CXK58257|   |
170| |        |---------|     |--------|   |
171| |                                     |
172| |        |-------|     |-----------|  |
173| |        |       |     |           |  |
174| |        |ML-101 |     |           |  |
175| |        |       |     |  F1PACK   |  |
176| |        |-------|     |           |  |
177| |                      |           |  |
178| |        |-----|       |-----------|  |
179| |        |ROM1 |                      |
180| |        |-----|                      |
181| |                                     |
182|-|-------------------------------------|
183Notes:
184      F1PACK    - TEL F1PACK(tm) TE6350B 9744 E0B (TQFP176)
185      S2812A150 - Seiko Instruments 2k x8 parallel EEPROM (TSOP28)
186      ML-101    - ML-101 24942-6420 9833 Z03 JAPAN (TQFP100, NOTE! This chip looks like it is Fujitsu-manufactured)
187      CXK58257  - SONY CXK58257 32k x8 SRAM (TSOP28)
188      ROM1      - TOSHIBA TC58V32FT 4M x8 (32MBit) CMOS NAND Flash EEPROM 3.3Volt (TSOP44)
189                  The ROMs use a non-standard format and can not be read by conventional methods.
190
191Bottom
192------
193
194|-|-------------------------------------|
195| |                                     |
196| |  |-----|      |-----|     |-----|   |
197| |  |ROM2 |      |ROM3 |     |ROM4 |   |
198| |  |-----|      |-----|     |-----|   |
199| |                                     |
200| |                                     |
201| |  |-----|      |-----|     |-----|   |
202| |  |ROM5 |      |ROM6 |     |ROM7 |   |
203| |  |-----|      |-----|     |-----|   |
204| |                                     |
205| |                                     |
206| |  |-----|      |-----|     |-----|   |
207| |  |ROM8 |      |ROM9 |     |ROM10|   |
208| |  |-----|      |-----|     |-----|   |
209| |                                     |
210|-|-------------------------------------|
211Notes:
212      ROM2-10   - TOSHIBA TC58V32FT 4M x8 (32MBit) CMOS NAND Flash EEPROM 3.3Volt (TSOP44)
213                  The ROMs use a non-standard format and can not be read by conventional methods.
214
215      Note: All ROMs have no markings (except part number) and no labels. There are also
216      no PCB location marks. The numbers I've assigned to the ROMs are made up for
217      simplicity. The actual cards have been dumped as a single storage device.
218
219      Confirmed usage on.... (not all games listed)
220      Chaos Heat
221      Flip Maze
222      Kollon
223      Mahjong OH
224      Nightraid
225      Otenki Kororin / Weather Tales
226      Psyvariar Medium Unit
227      Psyvariar Revision
228      Ray Crisis
229      RC de Go
230      Shanghai Shoryu Sairin
231      Shikigami no Shiro
232      Souten Ryu
233      Space Invaders Anniversary
234      Super Puzzle Bobble (English)
235      XIIStag
236      Zoku Otenami Haiken
237      Zooo
238
239
240Type 2 (3rd party type 'sealed' cards)
241------
242
243Note only 1 card was sacrificed and opened.
244
245Top
246---
247
248|-|-------------------------------------|
249| |             18.00         |-----|   |
250| |                           |U15  |   |
251| |        |---------|        |-----|   |
252| |        |20H2877  |                  |
253| |        |IBM0398  |        |-----|   |
254| |        |1B37001TQ|        |U13  |   |
255| |        |KOREA    |        |-----|   |
256| |        |---------|                  |
257| |                                     |
258| |                                     |
259| |   |-----|     |-------|             |
260| |   |U10  |     |D431000|             |
261| |   |-----|     |-------|             |
262| |                                     |
263|-|-------------------------------------|
264Notes:
265      IBM0398 - Custom IC marked 20H2877 IBM0398 1B37001TQ KOREA (TQFP176)
266      D431000 - NEC D431000 128k x8 SRAM (TSOP32)
267      18.00   - Small square white 'thing', may be an oscillator at 18MHz?
268      U*      - TOSHIBA TC58V32FT 4M x8 (32MBit) CMOS NAND Flash EEPROM 3.3Volt (TSOP44)
269                The ROMs use a non-standard format and can not be read by conventional methods.
270
271Bottom
272------
273
274|-|-------------------------------------|
275| |                                     |
276| |  |-----|      |-----|     |-----|   |
277| |  |U1   |      |U2   |     |U3   |   |
278| |  |-----|      |-----|     |-----|   |
279| |                                     |
280| |                                     |
281| |  |-----|      |-----|     |-----|   |
282| |  |U4   |      |U5   |     |U6   |   |
283| |  |-----|      |-----|     |-----|   |
284| |                                     |
285| |                                     |
286| |               |-----|     |-----|   |
287| |               |U7   |     |U8   |   |
288| |               |-----|     |-----|   |
289| |                                     |
290|-|-------------------------------------|
291Notes:
292      U*  - TOSHIBA TC58V32FT 4M x8 (32MBit) CMOS NAND Flash EEPROM 3.3Volt (TSOP44)
293            The ROMs use a non-standard format and can not be read by conventional methods.
294            U8 not populated in Nightraid card, but may be populated in other cards.
295
296      Note: All ROMs have no markings (except part number) and no labels. There are PCB
297            location marks. The actual cards have been dumped as a single storage device.
298
299      Confirmed usage on.... (not all games listed)
300      Nightraid (another one, not the same as listed above)
301
302      Based on card type (made with single sealed steel shell) these are also using the same PCB...
303      XIIStag (another one, not the same as listed above)
304      Go By RC
305      Space Invaders Anniversary (another one, not the same as listed above)
306      Super Puzzle Bobble (Japan)
307      Usagi
308
130309*/
131310
132311#include "driver.h"
r4441r4442
8591038   ROM_REGION32_LE( 0x080000, "mainbios", 0 ) \
8601039   ROM_LOAD( "coh-3002t.353", 0x000000, 0x080000, CRC(03967fa7) SHA1(0e17fec2286e4e25deb23d40e41ce0986f373d49) ) \
8611040\
862   ROM_REGION32_LE( 0x200000, "subbios", 0 ) \
1041   ROM_REGION16_LE( 0x200000, "subbios", 0 ) \
8631042    ROM_LOAD( "flash.u30",     0x000000, 0x200000, CRC(c48c8236) SHA1(c6dad60266ce2ff635696bc0d91903c543273559) ) \
8641043   ROM_REGION32_LE( 0x80000,  "soundcpu", 0) \
8651044   ROM_FILL( 0, 0x80000, 0xff) \
r4441r4442
9171096   DISK_IMAGE( "spuzbobl", 0, SHA1(1b1c72fb7e5656021485fefaef8f2ba48e2b4ea8))
9181097ROM_END
9191098
1099ROM_START(spuzbobj)
1100   TAITOGNET_BIOS
9201101
1102   DISK_REGION( "card" )
1103   DISK_IMAGE( "spuzbobj", 0, SHA1(dac433cf88543d2499bf797d7406b82ae4338726))
1104ROM_END
1105
9211106ROM_START(soutenry)
9221107   TAITOGNET_BIOS
9231108
r4441r4442
9391124   DISK_IMAGE( "sianniv", 0, SHA1(1e08b813190a9e1baf29bc16884172d6c8da7ae3))
9401125ROM_END
9411126
1127ROM_START(kollon)
1128   TAITOGNET_BIOS
9421129
1130   DISK_REGION( "card" )
1131   DISK_IMAGE( "kollon", 0, SHA1(d8ea5b5b0ee99004b16ef89883e23de6c7ddd7ce))
1132ROM_END
1133
1134ROM_START(shikigam)
1135   TAITOGNET_BIOS
1136
1137   DISK_REGION( "card" )
1138   DISK_IMAGE( "shikigam", 0, SHA1(fa49a0bc47f5cb7c30d7e49e2c3696b21bafb840))
1139ROM_END
1140
9431141/* Success */
9441142
9451143ROM_START(psyvaria)
9461144   TAITOGNET_BIOS
9471145
9481146   DISK_REGION( "card" )
949   DISK_IMAGE( "psyvaria", 0,  SHA1(a80e164c09d795085b65659d1df60710530549c3))
1147   DISK_IMAGE( "psyvaria", 0,  SHA1(b981a42a10069322b77f7a268beae1d409b4156d))
9501148ROM_END
9511149
9521150ROM_START(psyvarrv)
9531151   TAITOGNET_BIOS
9541152
9551153   DISK_REGION( "card" )
956   DISK_IMAGE( "psyvarrv", 0, SHA1(c12f0d5cbb6ec7f906e3dcdc3047c22de36457a5))
1154   DISK_IMAGE( "psyvarrv", 0, SHA1(277c4f52502bcd7acc1889840962ec80d56465f3))
9571155ROM_END
9581156
1157ROM_START(zooo)
1158   TAITOGNET_BIOS
9591159
1160   DISK_REGION( "card" )
1161   DISK_IMAGE( "zooo", 0, SHA1(e275b3141b2bc49142990e6b497a5394a314a30b))
1162ROM_END
1163
9601164ROM_START(zokuoten)
9611165   TAITOGNET_BIOS
9621166
r4441r4442
9701174   TAITOGNET_BIOS
9711175
9721176   DISK_REGION( "card" )
973   DISK_IMAGE( "nightrai", 0, SHA1(7a4d62018fd19ccbdec12b6d24052d49f8a8359e))
1177   DISK_IMAGE( "nightrai", 0, SHA1(74d0458f851cbcf10453c5cc4c47bb4388244cdf))
9741178ROM_END
9751179
1180ROM_START(otenki)
1181   TAITOGNET_BIOS
1182
1183   DISK_REGION( "card" )
1184   DISK_IMAGE( "otenki", 0, SHA1(7e745ca4c4570215f452fd09cdd56a42c39caeba))
1185ROM_END
1186
9761187/* Warashi */
9771188
9781189ROM_START(usagi)
r4441r4442
9951206   TAITOGNET_BIOS
9961207
9971208   DISK_REGION( "card" )
998   DISK_IMAGE( "xiistag", 0, SHA1(8e0b2ee88edf0b45b3b4063d65eae236c12ee8ff))
1209   DISK_IMAGE( "xiistag", 0, SHA1(586e37c8d926293b2bd928e5f0d693910cfb05a2))
9991210ROM_END
10001211
10011212
r4441r4442
10041215/* it in every zip file */
10051216GAME( 1997, taitogn,  0, coh3002t, coh3002t, coh3002t, ROT0, "Sony/Taito", "Taito GNET", GAME_IS_BIOS_ROOT )
10061217
1007GAME( 1998, raycris,  taitogn, coh3002t, coh3002t, coh3002t, ROT0, "Taito", "Ray Crisis (V2.03J)", 0 )
1008GAME( 199?, gobyrc, taitogn, coh3002t, coh3002t, coh3002t, ROT0, "Taito", "Go By RC (V2.03O)", GAME_NOT_WORKING ) // custom inputs need calibrating
1009GAME( 199?, rcdego, gobyrc,  coh3002t, coh3002t, coh3002t, ROT0, "Taito", "RC De Go (V2.03J)", GAME_NOT_WORKING ) // custom inputs need calibrating
1010GAME( 1998, chaoshea, taitogn, coh3002t, coh3002t, coh3002t, ROT0, "Taito", "Chaos Heat (V2.08J)", 0 )
1011GAME( 1998, flipmaze, taitogn, coh3002t, coh3002t, coh3002t, ROT0, "Taito/Moss", "Flip Maze (V2.04J)", 0 )
1012GAME( 1999, spuzbobl, taitogn, coh3002t, coh3002t, coh3002t, ROT0, "Taito", "Super Puzzle Bobble (V2.05O)", 0 )
1013GAME( 2000, soutenry, taitogn, coh3002t, coh3002t, coh3002t, ROT0, "Taito", "Soutenryu (V2.07J)", 0 )
1014GAME( 2000, shanghss, taitogn, coh3002t, coh3002t, coh3002t, ROT0, "Taito", "Shanghai Shoryu Sairin (V2.03J)", 0 )
1015GAME( 2003, sianniv,  taitogn, coh3002t, coh3002t, coh3002t, ROT270, "Taito", "Space Invaders Anniversary (V2.02J)", GAME_NOT_WORKING ) // IRQ at the wrong time
1218GAME( 1998, chaoshea, taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "Chaos Heat (V2.08J)", 0 )
1219GAME( 1998, raycris,  taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "Ray Crisis (V2.03J)", 0 )
1220GAME( 1999, spuzbobl, taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "Super Puzzle Bobble (V2.05O)", 0 )
1221GAME( 1999, spuzbobj, spuzbobl, coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "Super Puzzle Bobble (V2.04J)", 0 )
1222GAME( 1999, gobyrc,   taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "Go By RC (V2.03O)", GAME_NOT_WORKING ) // custom inputs need calibrating
1223GAME( 1999, rcdego,   gobyrc,   coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "RC De Go (V2.03J)", GAME_NOT_WORKING ) // custom inputs need calibrating
1224GAME( 1999, flipmaze, taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Taito/Moss", "Flip Maze (V2.04J)", 0 )
1225GAME( 2001, shikigam, taitogn,  coh3002t, coh3002t, coh3002t, ROT270, "Taito/Alfa System", "Shikigami no Shiro (V2.03J)", 0 )
1226GAME( 2003, sianniv,  taitogn,  coh3002t, coh3002t, coh3002t, ROT270, "Taito", "Space Invaders Anniversary (V2.02J)", GAME_NOT_WORKING ) // IRQ at the wrong time
1227GAME( 2003, kollon,   taitogn,  coh3002t, coh3002t, coh3002t, ROT0,   "Taito", "Kollon (V2.04J)", 0 )
10161228
10171229GAME( 2000, psyvaria, taitogn, coh3002t, coh3002t, coh3002t, ROT270, "Success", "Psyvariar -Medium Unit- (V2.04J)", 0 )
10181230GAME( 2000, psyvarrv, taitogn, coh3002t, coh3002t, coh3002t, ROT270, "Success", "Psyvariar -Revision- (V2.04J)", 0 )
10191231GAME( 2000, zokuoten, taitogn, coh3002t, coh3002t, coh3002t, ROT0,   "Success", "Zoku Otenamihaiken (V2.03J)", 0 )
1232GAME( 2004, zooo,     taitogn, coh3002t, coh3002t, coh3002t, ROT0,   "Success", "Zooo (V2.01J)", GAME_NOT_WORKING ) // missing most of the playfield
10201233
1021GAME( 199?, usagi,    taitogn, coh3002t, coh3002t_mp, coh3002t_mp, ROT0, "Warashi/Mahjong Kobo/Taito", "Usagi (V2.02J)", 0 )
10221234GAME( 1999, mahjngoh, taitogn, coh3002t, coh3002t_mp, coh3002t_mp, ROT0, "Warashi/Mahjong Kobo/Taito", "Mahjong Oh (V2.06J)", 0 )
1235GAME( 2001, usagi,    taitogn, coh3002t, coh3002t_mp, coh3002t_mp, ROT0, "Warashi/Mahjong Kobo/Taito", "Usagi (V2.02J)", 0 )
1236GAME( 2000, soutenry, taitogn, coh3002t, coh3002t, coh3002t, ROT0,   "Warashi", "Soutenryu (V2.07J)", 0 )
1237GAME( 2000, shanghss, taitogn, coh3002t, coh3002t, coh3002t, ROT0,   "Warashi", "Shanghai Shoryu Sairin (V2.03J)", 0 )
10231238
10241239GAME( 2001, nightrai, taitogn, coh3002t, coh3002t, coh3002t, ROT0, "Takumi", "Night Raid (V2.03J)", GAME_NOT_WORKING ) // no background / enemy sprites
1240GAME( 2001, otenki,   taitogn, coh3002t, coh3002t, coh3002t, ROT0, "Takumi", "Otenki Kororin (V2.01J)", 0 )
10251241
10261242GAME( 2002, xiistag,  taitogn, coh3002t, coh3002t, coh3002t, ROT270, "Triangle Service", "XII Stag (V2.01J)", 0 )
src/mame/drivers/phoenix.c
r4441r4442
297297   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) )      PORT_DIPLOCATION( "SW1:7" )
298298   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
299299   PORT_DIPSETTING(   0x40, DEF_STR( On ) )
300
301   /* Based on various sources, no Button 2 was present in Pleiads */
302   PORT_MODIFY("CTRL")      /* fake port for multiplexed controls */
303   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )
304   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
305   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  ) PORT_2WAY
306   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
307   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL               PORT_CONDITION("CAB",0x01,PORTCOND_EQUALS,0x01)
308   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL PORT_CONDITION("CAB",0x01,PORTCOND_EQUALS,0x01)
309   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  ) PORT_2WAY PORT_COCKTAIL   PORT_CONDITION("CAB",0x01,PORTCOND_EQUALS,0x01)
310   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )                           PORT_CONDITION("CAB",0x01,PORTCOND_EQUALS,0x01)
300311INPUT_PORTS_END
301312
313static INPUT_PORTS_START( pleiadbl )
314   PORT_INCLUDE( phoenix )
315
316   PORT_MODIFY("IN0")
317   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM(pleiads_protection_r, NULL)     /* Protection. See 0x0552 */
318
319   PORT_MODIFY("DSW0")
320   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) )      PORT_DIPLOCATION( "SW1:7" )
321   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
322   PORT_DIPSETTING(   0x40, DEF_STR( On ) )
323INPUT_PORTS_END
324
302325static INPUT_PORTS_START( pleiadce )
303   PORT_INCLUDE( pleiads )
326   PORT_INCLUDE( pleiadbl )
304327
305328   PORT_MODIFY("DSW0")
306329   PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )       PORT_DIPLOCATION( "SW1:3,4" )
r4441r4442
311334INPUT_PORTS_END
312335
313336static INPUT_PORTS_START( capitol )
314   PORT_INCLUDE( phoenix )
337   PORT_INCLUDE( pleiads )
315338
316   PORT_MODIFY("DSW0")
317   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) )      PORT_DIPLOCATION( "SW1:7" )
318   PORT_DIPSETTING(   0x00, DEF_STR( Off ) )
319   PORT_DIPSETTING(   0x40, DEF_STR( On ) )
339   /* Capitol has no Button 2 as Pleiads, but there is no protection */
340   PORT_MODIFY("IN0")
341   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
320342INPUT_PORTS_END
321343
322344
r4441r4442
10611083GAME( 1981, nextfase, phoenix,  phoenix,  nextfase, 0,        ROT90, "Petaco S.A. (bootleg)", "Next Fase (bootleg of Phoenix)", GAME_SUPPORTS_SAVE )
10621084
10631085GAME( 1981, pleiads,  0,        pleiads,  pleiads,  0,        ROT90, "Tehkan", "Pleiads (Tehkan)", GAME_IMPERFECT_COLORS )
1064GAME( 1981, pleiadbl, pleiads,  pleiads,  pleiads, 0,        ROT90, "bootleg", "Pleiads (bootleg)", GAME_IMPERFECT_COLORS )
1086GAME( 1981, pleiadbl, pleiads,  pleiads,  pleiadbl, 0,        ROT90, "bootleg", "Pleiads (bootleg)", GAME_IMPERFECT_COLORS )
10651087GAME( 1981, pleiadce, pleiads,  pleiads,  pleiadce, 0,        ROT90, "Tehkan (Centuri license)", "Pleiads (Centuri)", GAME_IMPERFECT_COLORS )
10661088GAME( 1981, capitol,  pleiads,  phoenix,  capitol,  0,        ROT90, "Universal Video Spiel", "Capitol", GAME_IMPERFECT_COLORS )
10671089
src/mame/drivers/badlands.c
r4441r4442
8989        NMI = latch on sound command
9090    ========================================================================
9191
92
93Badlands
94Atari Games, 1989
95
96PCB Layout
97----------
98
99A047193-01 BADLANDS
100|-------------------------------------------------|
101|TDA2030 LM324                ROM.2N ROM.2S ROM.2U|
102|VOL     LM324                ROM.4N ROM.4S ROM.4U|
103|6264    YM3012                                   |
104|      YM2151          6116     PAL3              |
105|   ROM.9C   PAL2                 ROM.10R  10T    |
106|J    6502                        ROM.14R  ROM.14T|
107|A                            MB87316             |
108|M                     14.31818MHz    PAL4  VMA   |
109|M                                                |
110|A    VGC7205      ROM.17F          PAL5          |
111|  TEST_SW   68000 ROM.20F      SOS               |
112| NE556 PAL1       ROM.24F          PAL6     6264 |
113|LED    DIP20      ROM.27F 2816                   |
114|-------------------------------------------------|
115Notes:
116      68000  - clock 7.15909MHz [14.31818/2]
117      6502   - clock 1.7897725 [14.31818/8]
118      YM2151 - clock 3.579545MHz [14.31818/4]
119      VGC7205- VLSI VGC7205A0672 ATARI 137304-2002
120      2816   - 2k x8 EEPROM
121      DIP20  - socket not populated
122      SOS    - Motorola (rebadged) SOS-137550-001 ZKZKAA8946
123      VMA    - Motorola (rebadged) VMA-137552-001 ZKZKAB8948
124      MB87316- Fujitsu MB87316 137536-001 with clock input 7.15909MHz
125               Listed in Jed Margolin's Atari Approved Vendor List
126               (http://www.jmargolin.com/schem/atariavl.htm) as.....
127               137536-001 IC,Line_Buffer(LB),CMOS,672B_RAM,500_Gate,40pin FUJITSU MB87316
128
129      ROMs   -
130               location  label
131               ------------------------
132               9C        136074-1018 E1FF
133               17F       136074-1009 86DF
134               20F       136074-1008 87FF
135               24F       136074-1007 F2DE
136               27F       136074-1006 xxxx (byte checksum unreadable)
137               2N        136074-1013 A5A0
138               2S        136074-1014 567B
139               2U        136074-1017 BB88
140               4N        136074-1012 6B70
141               4S        136074-1014 4475
142               4U        136074-1016 42A5
143               10R       136074-1011 041C
144               10T       not populated
145               14R       136074-1010 5E67
146               14T       136074-1019 D4C4
147
148      PALs   -
149               PAL1 - Lattice GAL16V8 labelled '136074-1001'
150               PAL2 - Lattice GAL16V8 labelled '136074-1005'
151               PAL3 - Lattice GAL16V8 labelled '136074-1004'
152               PAL4 - Lattice GAL16V8 labelled '136074-1003'
153               PAL5 - Lattice GAL16V8 labelled '136074-1002'
154               PAL6 - Lattice GAL16V8 labelled '136074-2000'
155
156Measurements -
157              X1    - 14.31995MHz
158              VSync - 59.9310Hz
159              HSync - 15.4611kHz
160
92161****************************************************************************/
93162
94163
src/mame/drivers/equites.c
r4441r4442
427427   cymvol *= 0.94f;
428428   hihatvol *= 0.94f;
429429
430   sound_set_output_gain(msm, 0, hihatvol + cymvol * (ay_port_b & 3) * 0.33);   /* NO from msm5232 */
430   sound_set_output_gain(msm, 10, hihatvol + cymvol * (ay_port_b & 3) * 0.33);   /* NO from msm5232 */
431431}
432432
433433static SOUND_START(equites)
src/mame/drivers/eolithsp.c
r4441r4442
3939} eolith_speedup_table[] =
4040{
4141   /* eolith.c */
42   { "ironfort", 0x40020854, 239 },
4243   { "hidnctch", 0x4000bba0, 239 },
4344   { "raccoon",  0x40008204, 239 },
4445   { "puzzlekg", 0x40029458, 239 },
src/mame/drivers/peplus.c
r4441r4442
12321232   ROM_REGION( 0x10000, "maincpu", 0 )
12331233   ROM_LOAD( "ke1012.u68",   0x00000, 0x10000, CRC(470e8c10) SHA1(f8a65a3a73477e9e9d2f582eeefa93b470497dfa) )
12341234
1235   ROM_REGION( 0x020000, "gfx1", ROMREGION_DISPOSE ) // BAD DUMPS
1235   ROM_REGION( 0x020000, "gfx1", ROMREGION_DISPOSE )
12361236   ROM_LOAD( "mro-cg1267.u72",    0x00000, 0x8000, CRC(16498b57) SHA1(9c22726299af7204c4be1c6d8afc4c1b512ad918) )
12371237   ROM_LOAD( "mgo-cg1267.u73",    0x08000, 0x8000, CRC(80847c5a) SHA1(8422cd13a91c3c462af5efcfca8615e7eeaa2e52) )
12381238   ROM_LOAD( "mbo-cg1267.u74",    0x10000, 0x8000, CRC(ce7af8a7) SHA1(38675122c764b8fa9260246ea99ac0f0750da277) )
1239   ROM_LOAD( "mxo-cg1267.u75",    0x18000, 0x8000, CRC(3aac0d4a) SHA1(764da54bdb2f2c49551cf1d10286de9450abad2f) )
1239   ROM_LOAD( "mxo-cg1267.u75",    0x18000, 0x8000, CRC(a4394303) SHA1(30a07028de35f74cc4fb776b0505ca743c8d7b5b) )
12401240
12411241   ROM_REGION( 0x200, "proms", 0 )
12421242   ROM_LOAD( "cap1267.u50", 0x0000, 0x0200, CRC(3dac264f) SHA1(e9c9de42ffd64d4463bee6fa10886a53bc062ff8) )
src/mame/drivers/thoop2.c
r4441r4442
236236   /* 0x00000-0x2ffff is fixed, 0x30000-0x3ffff is bank switched */
237237ROM_END
238238
239GAME( 1994, thoop2,  0, thoop2, thoop2,  0, ROT0, "Gaelco", "TH Strikes Back", GAME_UNEMULATED_PROTECTION )
239GAME( 1994, thoop2,  0, thoop2, thoop2,  0, ROT0, "Gaelco", "TH Strikes Back", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
src/mame/drivers/atarigx2.c
r4441r4442
13031303   PORT_BIT( 0x0000fe00, IP_ACTIVE_LOW, IPT_UNUSED )
13041304   PORT_BIT( 0x00ff0000, IP_ACTIVE_LOW, IPT_UNUSED )
13051305   PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_START1 )
1306   PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
1306   PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CODE(KEYCODE_A) PORT_PLAYER(1)
13071307   PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
1308   PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2)
1308   PORT_BIT( 0x08000000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_S) PORT_PLAYER(1)
13091309   PORT_BIT( 0x30000000, IP_ACTIVE_LOW, IPT_UNUSED )
1310   PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
1310   PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
13111311   PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_UNUSED )
13121312
13131313   PORT_START("SERVICE")      /* 68.STATUS (A2=0) */
src/mame/drivers/taotaido.c
r4441r4442
104104   AM_RANGE(0xffff8a, 0xffff8b) AM_READ_PORT("DSW3")
105105   AM_RANGE(0xffff8c, 0xffff8d) AM_READ(SMH_RAM)                  // unknown
106106   AM_RANGE(0xffff8e, 0xffff8f) AM_READ_PORT("JP")
107#if TAOTAIDO_SHOW_ALL_INPUTS
108   AM_RANGE(0xffffa0, 0xffffa1) AM_READ_PORT("P3")                  // unused
109   AM_RANGE(0xffffa2, 0xffffa3) AM_READ_PORT("P4")                  // unused
110#endif
107   AM_RANGE(0xffffa0, 0xffffa1) AM_READ_PORT("P3")                  // used only by taotaida
108   AM_RANGE(0xffffa2, 0xffffa3) AM_READ_PORT("P4")                  // used only by taotaida
111109   AM_RANGE(0xffff00, 0xffff0f) AM_WRITE(taotaido_tileregs_w)
112110   AM_RANGE(0xffff10, 0xffff11) AM_WRITE(SMH_NOP)                  // unknown
113111   AM_RANGE(0xffff20, 0xffff21) AM_WRITE(SMH_NOP)                  // unknown - flip screen related
r4441r4442
175173#endif
176174   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
177175
176   /* These inputs are only to fit the test mode - leftover from another game ? */
177   PORT_START("P3")   /* 0xffffa1.b */
178   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
179#if TAOTAIDO_SHOW_ALL_INPUTS
180   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3)
181   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3)
182   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3)
183   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
184   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
185   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
186   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3)
187   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
188#endif
189
190   PORT_START("P4")   /* 0xffffa3.b */
191   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
192#if TAOTAIDO_SHOW_ALL_INPUTS
193   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4)
194   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4)
195   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4)
196   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4)
197   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
198   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4)
199   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4)
200   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
201#endif
202
178203   PORT_START("SYSTEM")   /* 0xffff85.b */
179204   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
180205   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )   // see notes
r4441r4442
252277//  PORT_DIPSETTING(    0x07, DEF_STR( Japan ) )
253278   PORT_DIPSETTING(    0x08, DEF_STR( World ) )
254279   /* 0x09 to 0x0f : DEF_STR( Japan ) */
255
256#if TAOTAIDO_SHOW_ALL_INPUTS
257   /* These inputs are only to fit the test mode - leftover from another game ? */
258   PORT_START("P3")   /* 0xffffa1.b */
259   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3)
260   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3)
261   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3)
262   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
263   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
264   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
265   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3)
266   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
267
268   PORT_START("P4")   /* 0xffffa3.b */
269   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4)
270   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4)
271   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4)
272   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4)
273   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
274   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4)
275   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4)
276   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
277#endif
278280INPUT_PORTS_END
279281
280282static INPUT_PORTS_START( taotaida )
r4441r4442
285287
286288   PORT_MODIFY("P2")
287289   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
290
291   PORT_MODIFY("P3")
292   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
293   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1)
294   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1)
295   PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNKNOWN )
296
297   PORT_MODIFY("P4")
298   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
299   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2)
300   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2)
301   PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNKNOWN )
288302INPUT_PORTS_END
289303
290304
src/mame/drivers/taito_f3.c
r4441r4442
5050
5151/******************************************************************************/
5252
53static READ32_HANDLER( f3_control_r )
53static CUSTOM_INPUT( f3_analog_r )
5454{
55   int e;
55   const char *tag = (const char *)param;
56   UINT32 ipt = 0;
5657
57   switch (offset)
58   {
59      case 0x0: /* MSW: Test switch, coins, eeprom access, LSW: Player Buttons, Start, Tilt, Service */
60         e = eeprom_read_bit();
61         e = e | (e<<8);
62         return ((e | input_port_read(space->machine, "EEPROM") | (input_port_read(space->machine, "EEPROM")<<8))<<16)      /* top byte may be mirror of bottom byte??  see bubblem */
63               | input_port_read(space->machine, "IN1");
58   ipt = ((input_port_read(field->port->machine, tag) & 0xf)<<12) | ((input_port_read(field->port->machine, tag) & 0xff0)>>4);
6459
65      case 0x1: /* MSW: Coin counters/lockouts are readable, LSW: Joysticks (Player 1 & 2) */
66         return (coin_word[0]<<16) | input_port_read(space->machine, "IN0") | 0xff00;
60   return ipt;
61}
6762
68      case 0x2: /* Analog control 1 */
69         return ((input_port_read(space->machine, "DIAL1") & 0xf)<<12) | ((input_port_read(space->machine, "DIAL1") & 0xff0)>>4);
63static CUSTOM_INPUT( f3_coin_r )
64{
65   int num = (FPTR)param;
66   return coin_word[num];
67}
7068
71      case 0x3: /* Analog control 2 */
72         return ((input_port_read(space->machine, "DIAL2") & 0xf)<<12) | ((input_port_read(space->machine, "DIAL2") & 0xff0)>>4);
69static READ32_HANDLER( f3_control_r )
70{
71   static const char *const iptnames[] = { "IN0", "IN1", "AN0", "AN1", "IN2", "IN3" };
7372
74      case 0x4: /* Player 3 & 4 fire buttons (Player 2 top fire buttons in Kaiser Knuckle) */
75         return input_port_read(space->machine, "IN2")<<8;
73   if (offset < 6)
74      return input_port_read(space->machine, iptnames[offset]);
7675
77      case 0x5: /* Player 3 & 4 joysticks (Player 1 top fire buttons in Kaiser Knuckle) */
78         return (coin_word[1]<<16) | input_port_read(space->machine, "IN3");
79   }
80
8176   logerror("CPU #0 PC %06x: warning - read unmapped control address %06x\n", cpu_get_pc(space->cpu), offset);
8277   return 0xffffffff;
8378}
r4441r4442
196191/******************************************************************************/
197192
198193static INPUT_PORTS_START( f3 )
194   /* MSW: Test switch, coins, eeprom access, LSW: Player Buttons, Start, Tilt, Service */
199195   PORT_START("IN0")
200   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
201   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
202   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
203   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
204   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
205   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
206   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
207   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
196   PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
197   PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
198   PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
199   PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
200   PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
201   PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
202   PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
203   PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
204   PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_TILT )
205   PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_SERVICE1 )   /* Service */
206   PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_SERVICE2 ) /* Only on some games */
207   PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_SERVICE3 ) /* Only on some games */
208   PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_START1 )
209   PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_START2 )
210   PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_START3 )
211   PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_START4 )
212   PORT_BIT( 0x00ff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "EEPROM")
213   PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(custom_port_read, "EEPROM")
208214
215   /* MSW: Coin counters/lockouts are readable, LSW: Joysticks (Player 1 & 2) */
209216   PORT_START("IN1")
210   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
211   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
212   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
213   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
214   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
215   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
216   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
217   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
218   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_TILT )
219   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* Service */
220   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_SERVICE2 ) /* Only on some games */
221   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE3 ) /* Only on some games */
222   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_START1 )
223   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_START2 )
224   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_START3 )
225   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_START4 )
217   PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
218   PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
219   PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
220   PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
221   PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
222   PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
223   PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
224   PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
225   PORT_BIT( 0x0000ff00, IP_ACTIVE_HIGH, IPT_UNKNOWN )   /* These must be high */
226   PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(f3_coin_r, (void *)0)
226227
228   /* Player 3 & 4 fire buttons (Player 2 top fire buttons in Kaiser Knuckle) */
229   PORT_START("IN2")
230   PORT_BIT( 0x000000ff, IP_ACTIVE_LOW, IPT_UNKNOWN )
231   PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
232   PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
233   PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3)
234   PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(3)
235   PORT_BIT( 0x00001000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
236   PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4)
237   PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4)
238   PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(4)
239   PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN )
240
241   /* Player 3 & 4 joysticks (Player 1 top fire buttons in Kaiser Knuckle) */
242   PORT_START("IN3")
243   PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3)
244   PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3)
245   PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3)
246   PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
247   PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4)
248   PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4)
249   PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4)
250   PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4)
251   PORT_BIT( 0x0000ff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
252   PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(f3_coin_r, (void *)1)
253
254   /* Analog control 1 */
255   PORT_START("AN0")
256   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(f3_analog_r, "DIAL1")
257   PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN )
258
259   /* Analog control 2 */
260   PORT_START("AN1")
261   PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(f3_analog_r, "DIAL2")
262   PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN )
263
264   /* These are not read directly, but through PORT_CUSTOMs above */
227265   PORT_START("EEPROM")
228   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) /* Eprom data bit */
266   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(eeprom_bit_r, NULL) /* Eprom data bit */
229267   PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
230268   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
231269   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) /* Another service mode */
r4441r4442
239277
240278   PORT_START("DIAL2")
241279   PORT_BIT( 0xfff, 0x000, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(25) PORT_CODE_DEC(KEYCODE_N) PORT_CODE_INC(KEYCODE_M) PORT_PLAYER(2)
242
243   PORT_START("IN2")
244   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
245   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
246   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3)
247   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(3)
248   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
249   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4)
250   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4)
251   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(4)
252
253   PORT_START("IN3")
254   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(3)
255   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(3)
256   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(3)
257   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
258   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(4)
259   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4)
260   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4)
261   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4)
262280INPUT_PORTS_END
263281
264282static INPUT_PORTS_START( kn )
265283   PORT_INCLUDE( f3 )
266284
285   PORT_MODIFY("IN0")
286   PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_UNUSED )
287   PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_UNUSED )
288
267289   PORT_MODIFY("IN2")
268     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
269     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2)
270     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2)
271     PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNUSED )
290     PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
291     PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2)
292     PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2)
293     PORT_BIT( 0x0000f800, IP_ACTIVE_LOW, IPT_UNUSED )
272294
273295   PORT_MODIFY("IN3")
274   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
275   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1)
276   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1)
277   PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNUSED )
296   PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
297   PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(1)
298   PORT_BIT( 0x00000004, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(1)
299   PORT_BIT( 0x000000f8, IP_ACTIVE_LOW, IPT_UNUSED )
278300INPUT_PORTS_END
279301
280302/******************************************************************************/
src/mame/drivers/gaelco2.c
r4441r4442
14241424   ROM_LOAD( "palce16v8h.u29",  0x0000, 0x0117, BAD_DUMP CRC(4a0a6f39) SHA1(57351e471649391c9abf110828fe2f128fe84eee) )
14251425ROM_END
14261426
1427GAME( 1994, aligator, 0,        alighunt, alighunt, alighunt, ROT0, "Gaelco", "Alligator Hunt", GAME_UNEMULATED_PROTECTION )
1427GAME( 1994, aligator, 0,        alighunt, alighunt, alighunt, ROT0, "Gaelco", "Alligator Hunt", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
14281428GAME( 1994, aligatun, aligator, alighunt, alighunt, alighunt, ROT0, "Gaelco", "Alligator Hunt (unprotected)", 0 )
14291429GAME( 1995, touchgo,  0,        touchgo,  touchgo,  touchgo,  ROT0, "Gaelco", "Touch & Go (World)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
14301430GAME( 1995, touchgon, touchgo,  touchgo,  touchgo,  touchgo,  ROT0, "Gaelco", "Touch & Go (Non North America)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
14311431GAME( 1995, touchgoe, touchgo,  touchgo,  touchgo,  touchgo,  ROT0, "Gaelco", "Touch & Go (earlier revision)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
1432GAME( 1995, wrally2,  0,        wrally2,  wrally2,  0,        ROT0, "Gaelco", "World Rally 2: Twin Racing", GAME_UNEMULATED_PROTECTION )
1432GAME( 1995, wrally2,  0,        wrally2,  wrally2,  0,        ROT0, "Gaelco", "World Rally 2: Twin Racing", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
14331433GAME( 1996, maniacsq, 0,        maniacsq, maniacsq, 0,        ROT0, "Gaelco", "Maniac Square (unprotected)", 0 )
1434GAME( 1996, snowboar, 0,        snowboar, snowboar, snowboar, ROT0, "Gaelco", "Snow Board Championship (set 1)", GAME_UNEMULATED_PROTECTION )
1435GAME( 1996, snowbalt, snowboar, snowboar, snowboar, 0,        ROT0, "Gaelco", "Snow Board Championship (Version 2.1)", GAME_UNEMULATED_PROTECTION )
1434GAME( 1996, snowboar, 0,        snowboar, snowboar, snowboar, ROT0, "Gaelco", "Snow Board Championship (set 1)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
1435GAME( 1996, snowbalt, snowboar, snowboar, snowboar, 0,        ROT0, "Gaelco", "Snow Board Championship (Version 2.1)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
14361436GAME( 1998, bang,     0,        bang,     bang,     bang,     ROT0, "Gaelco", "Bang!", 0 )
14371437GAME( 1998, bangj,    bang,     bang,     bang,     bang,     ROT0, "Gaelco", "Gun Gabacho (Japan)", 0 )
14381438GAME( 1999, grtesoro, 0,        maniacsq, maniacsq, 0,        ROT0, "Nova Desitec", "Gran Tesoro? / Play 2000 (v5.01) (Italy)", GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING )
src/mame/drivers/megasys1.c
r4441r4442
10031003   PORT_DIPSETTING(      0x0000, DEF_STR( Upright ) )
10041004   PORT_DIPSETTING(      0x0040, DEF_STR( Cocktail ) )
10051005
1006   PORT_DIPNAME( 0x4000, 0x0000, DEF_STR( Demo_Sounds ) )
1007   PORT_DIPSETTING(      0x4000, DEF_STR( Off ) )
1008   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
10061009   PORT_DIPNAME( 0x8000, 0x8000, "Freeze Screen (Cheat)")
10071010   PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
10081011   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
r4441r4442
10441047   PORT_DIPNAME( 0x0040, 0x0040, "Scroll Is Based On" )
10451048   PORT_DIPSETTING(      0x0040, "Shadow of Baseball" )
10461049   PORT_DIPSETTING(      0x0000, "The Baseball Itself" )
1050
1051   PORT_DIPNAME( 0x4000, 0x0000, DEF_STR( Demo_Sounds ) )
1052   PORT_DIPSETTING(      0x4000, DEF_STR( Off ) )
1053   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
10471054INPUT_PORTS_END
10481055
10491056static INPUT_PORTS_START( kickoff )
r4441r4442
11551162   PORT_DIPSETTING(      0x0020, DEF_STR( Hard ) )
11561163   PORT_DIPSETTING(      0x0010, DEF_STR( Hardest ) )
11571164   PORT_DIPUNUSED( 0x0040, 0x0040 ) /* Manual states this dip is "Unused" */
1165
1166   PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Demo_Sounds ) )
1167   PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
1168   PORT_DIPSETTING(      0x4000, DEF_STR( On ) )
11581169INPUT_PORTS_END
11591170
11601171static INPUT_PORTS_START( plusalph )
r4441r4442
12041215   PORT_DIPSETTING(      0x0020, DEF_STR( Hard ) )
12051216   PORT_DIPSETTING(      0x0040, DEF_STR( Hardest ) )
12061217
1218   PORT_DIPNAME( 0x4000, 0x0000, DEF_STR( Demo_Sounds ) )
1219   PORT_DIPSETTING(      0x4000, DEF_STR( Off ) )
1220   PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
12071221   PORT_SERVICE( 0x8000, IP_ACTIVE_LOW )
12081222INPUT_PORTS_END
12091223
r4441r4442
12161230   PORT_DIPSETTING(      0x0003, "3" )
12171231   PORT_DIPSETTING(      0x0001, "4" )
12181232   PORT_DIPSETTING(      0x0000, "5" )
1233
1234   PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Demo_Sounds ) )
1235   PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
1236   PORT_DIPSETTING(      0x4000, DEF_STR( On ) )
12191237   PORT_DIPUNUSED( 0x8000, 0x8000 )   // used?
12201238INPUT_PORTS_END
12211239
r4441r4442
12421260   PORT_DIPNAME( 0x0040, 0x0040, "Credits To Continue (Vs)" )
12431261   PORT_DIPSETTING(      0x0040, "1" )
12441262   PORT_DIPSETTING(      0x0000, "2" )
1263
1264   PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Demo_Sounds ) )
1265   PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
1266   PORT_DIPSETTING(      0x4000, DEF_STR( On ) )
12451267   PORT_SERVICE( 0x8000, IP_ACTIVE_LOW )
12461268INPUT_PORTS_END
12471269
src/mame/drivers/royalmah.c
r4441r4442
282889  Mahjong Shinkirou     D210301BL2 + FRM-00? TLCS-90  Dynax
292989  Mahjong Derringer     D2203018L            Z80      Dynax              Larger palette
303090  Mahjong If..?         D2909278L            TLCS-90  Dynax              Larger palette
3191  Mahjong Vegas         D5011308L1 + FRM-00  TLCS-90
3191  Mahjong Vegas         D5011308L1 + FRM-00  TLCS-90  Dynax              Undumped internal rom (mjvegas set)
323292  Mahjong Cafe Time     D6310128L1-1         TLCS-90  Dynax              Larger palette, RTC
333393  Mahjong Cafe Doll     D76052208L-2         TLCS-90  Dynax              Larger palette, RTC, Undumped internal rom
343495  Mahjong Tensinhai     D10010318L1          TLCS-90  Dynax              Larger palette, RTC
r4441r4442
8383- janptr96: in service mode press in sequence N,Ron,Ron,N to access some
8484  hidden options. (thanks bnathan)
8585
862009-03-25 FP: fixed verified DSW and default settings for mjclub (thanks to
87    translation from manual by Yasu)
88
8689****************************************************************************/
8790
8891#include "driver.h"
r4441r4442
10591062ADDRESS_MAP_END
10601063
10611064
1065/****************************************************************************
1066                               Mahjong Vegas
1067****************************************************************************/
10621068
1069static WRITE8_HANDLER( mjvegasa_p4_w )
1070{
1071   rombank = (rombank & 0xf8) | ((data & 0x0e) >> 1);
1072}
1073static WRITE8_HANDLER( mjvegasa_p3_w )
1074{
1075   rombank = (rombank & 0xf7) | ((data & 0x04) << 1);
1076}
1077static WRITE8_HANDLER( mjvegasa_rombank_w )
1078{
1079   rombank = (rombank & 0x0f) | ((data & 0x0f) << 4);
1080}
1081
1082static READ8_HANDLER( mjvegasa_rom_io_r )
1083{
1084   if ((rombank & 0x70) != 0x70)
1085      return memory_region(space->machine, "maincpu")[0x10000 + rombank * 0x8000 + offset];
1086
1087   offset += 0x8000;
1088
1089   switch(offset)
1090   {
1091      case 0x8000:
1092      case 0x8001:
1093      case 0x8002:
1094      case 0x8003:
1095      case 0x8004:
1096      case 0x8005:
1097      case 0x8006:
1098      case 0x8007:
1099      case 0x8008:
1100      case 0x8009:
1101      case 0x800a:
1102      case 0x800b:
1103      case 0x800c:
1104      case 0x800d:
1105      case 0x800e:
1106      case 0x800f:
1107      {
1108         const device_config *rtc = devtag_get_device(space->machine, "rtc");
1109         return msm6242_r(rtc, offset-0x8000);
1110      }
1111   }
1112   logerror("%04X: unmapped IO read at %04X\n", cpu_get_pc(space->cpu), offset);
1113   return 0xff;
1114}
1115
1116static WRITE8_HANDLER( mjvegasa_rom_io_w )
1117{
1118   if ((rombank & 0x70) != 0x70)
1119   {
1120      videoram[offset] = data;
1121      return;
1122   }
1123
1124   offset += 0x8000;
1125
1126   switch(offset)
1127   {
1128      case 0x8000:
1129      case 0x8001:
1130      case 0x8002:
1131      case 0x8003:
1132      case 0x8004:
1133      case 0x8005:
1134      case 0x8006:
1135      case 0x8007:
1136      case 0x8008:
1137      case 0x8009:
1138      case 0x800a:
1139      case 0x800b:
1140      case 0x800c:
1141      case 0x800d:
1142      case 0x800e:
1143      case 0x800f:
1144      {
1145         const device_config *rtc = devtag_get_device(space->machine, "rtc");
1146         msm6242_w(rtc, offset-0x8000, data);
1147         return;
1148      }
1149   }
1150   logerror("%04X: unmapped IO write at %04X = %02X\n", cpu_get_pc(space->cpu), offset,data);
1151}
1152
1153static WRITE8_HANDLER( mjvegasa_coin_counter_w )
1154{
1155   flip_screen_set(space->machine,  data & 4);
1156   coin_counter_w(0,data & 2);   // in
1157   coin_counter_w(1,data & 1);   // out
1158}
1159
1160// hopper?
1161static WRITE8_HANDLER( mjvegasa_12400_w )
1162{
1163   // bits 0 & 1
1164//  popmessage("UNK: %02x",data);
1165}
1166static READ8_HANDLER( mjvegasa_12500_r )
1167{
1168   // bits 0 & 2
1169   return 0xff;
1170}
1171
1172static ADDRESS_MAP_START( mjvegasa_map, ADDRESS_SPACE_PROGRAM, 8 )
1173
1174   AM_RANGE( 0x00000, 0x05fff ) AM_ROM
1175   AM_RANGE( 0x06000, 0x07fff ) AM_RAM AM_BASE(&generic_nvram) AM_SIZE(&generic_nvram_size)
1176   AM_RANGE( 0x08000, 0x0ffff ) AM_READWRITE(mjvegasa_rom_io_r, mjvegasa_rom_io_w) AM_BASE(&videoram)
1177
1178   AM_RANGE( 0x10001, 0x10001 ) AM_DEVREAD( "ay", ay8910_r )
1179   AM_RANGE( 0x10002, 0x10003 ) AM_DEVWRITE( "ay", ay8910_data_address_w )
1180   AM_RANGE( 0x10010, 0x10010 ) AM_WRITE( mjvegasa_coin_counter_w )
1181   AM_RANGE( 0x10011, 0x10011 ) AM_READ_PORT("SYSTEM") AM_WRITE( input_port_select_w )
1182   AM_RANGE( 0x10013, 0x10013 ) AM_WRITE( input_port_select_w )
1183
1184   AM_RANGE( 0x12000, 0x12000 ) AM_WRITE( mjvegasa_rombank_w )
1185   AM_RANGE( 0x12100, 0x12100 ) AM_READ( cafetime_dsw_r )
1186   AM_RANGE( 0x12200, 0x12200 ) AM_WRITE( cafetime_dsw_w )
1187   AM_RANGE( 0x12300, 0x12300 ) AM_WRITE( mjderngr_palbank_w )
1188   AM_RANGE( 0x12400, 0x12400 ) AM_WRITE( mjvegasa_12400_w )
1189   AM_RANGE( 0x12500, 0x12500 ) AM_READ ( mjvegasa_12500_r )
1190
1191ADDRESS_MAP_END
1192
1193static ADDRESS_MAP_START( mjvegasa_iomap, ADDRESS_SPACE_IO, 8 )
1194   AM_RANGE( T90_P3, T90_P3 ) AM_READWRITE( mjtensin_p3_r, mjvegasa_p3_w )
1195   AM_RANGE( T90_P4, T90_P4 ) AM_WRITE( mjvegasa_p4_w )
1196ADDRESS_MAP_END
1197
1198
1199
10631200static INPUT_PORTS_START( mjctrl1 )
10641201   PORT_START("KEY0")   /* P1 IN0 */
10651202   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A )
r4441r4442
16491786   PORT_DIPSETTING(    0x80, DEF_STR( On ) )
16501787INPUT_PORTS_END
16511788
1652/* TODO: check dip-switches */
16531789static INPUT_PORTS_START( mjclub )
16541790   PORT_INCLUDE( mjctrl2 )
16551791
1792   /* On the main board */
16561793   PORT_START("DSW1")
1657   PORT_DIPNAME( 0x0f, 0x0f, "Pay Out Rate" )
1794   PORT_DIPNAME( 0x0f, 0x08, "Pay Out Rate" )   PORT_DIPLOCATION("SW4:1,2,3,4")
16581795   PORT_DIPSETTING(    0x0f, "96%" )
16591796   PORT_DIPSETTING(    0x0e, "93%" )
16601797   PORT_DIPSETTING(    0x0d, "90%" )
r4441r4442
16711808   PORT_DIPSETTING(    0x02, "56%" )
16721809   PORT_DIPSETTING(    0x01, "53%" )
16731810   PORT_DIPSETTING(    0x00, "50%" )
1674   PORT_DIPNAME( 0x30, 0x30, "Maximum Bet" )
1811   PORT_DIPNAME( 0x30, 0x20, "Maximum Bet" )   PORT_DIPLOCATION("SW4:5,6")
16751812   PORT_DIPSETTING(    0x00, "1" )
16761813   PORT_DIPSETTING(    0x10, "5" )
16771814   PORT_DIPSETTING(    0x20, "10" )
16781815   PORT_DIPSETTING(    0x30, "20" )
1679   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
1680   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1681   PORT_DIPSETTING(    0x40, DEF_STR( On ) )
1682   PORT_DIPNAME( 0x80, 0x80, "Debug mode" )
1683   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
1684   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1816   PORT_DIPNAME( 0x40, 0x40, "Note Rate" )      PORT_DIPLOCATION("SW4:7")
1817   PORT_DIPSETTING(    0x00, "5" )
1818   PORT_DIPSETTING(    0x40, "10" )
1819   PORT_DIPNAME( 0x80, 0x80, "Data Display" )   PORT_DIPLOCATION("SW4:8")
1820   PORT_DIPSETTING(    0x80, DEF_STR( No ) )
1821   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
16851822
1823   /* On the subboard */
16861824   PORT_START("DSW3")
1687   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
1688   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
1689   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1690   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
1691   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1692   PORT_DIPSETTING(    0x02, DEF_STR( On ) )
1693   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
1694   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1695   PORT_DIPSETTING(    0x04, DEF_STR( On ) )
1696   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
1697   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1698   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
1699   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
1700   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1701   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
1702   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
1703   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1704   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
1705   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
1706   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1707   PORT_DIPSETTING(    0x40, DEF_STR( On ) )
1708   PORT_DIPNAME( 0x80, 0x00, "Full Tests" )
1825   PORT_DIPNAME( 0x03, 0x00, "Game Type" )                  PORT_DIPLOCATION("SW2:1,2")
1826   PORT_DIPSETTING(    0x00, "A" )
1827   PORT_DIPSETTING(    0x02, "B" )
1828   PORT_DIPSETTING(    0x01, "C" )
1829   PORT_DIPSETTING(    0x03, "D" )
1830   PORT_DIPUNUSED_DIPLOC( 0x0c, 0x08, "SW2:3,4" ) PORT_CONDITION("DSW3", 0x03, PORTCOND_EQUALS, 0x00)
1831   PORT_DIPUNUSED_DIPLOC( 0x0c, 0x08, "SW2:3,4" ) PORT_CONDITION("DSW3", 0x03, PORTCOND_EQUALS, 0x02)
1832   PORT_DIPNAME( 0x0c, 0x08, "Bonus Rate (3renchan bonus)" )   PORT_DIPLOCATION("SW2:3,4")   PORT_CONDITION("DSW3", 0x03, PORTCOND_EQUALS, 0x01)
1833   PORT_DIPSETTING(    0x00, "A (1 2 2 3 pts.)" )
1834   PORT_DIPSETTING(    0x04, "B (1 2 2 5 pts.)" )
1835   PORT_DIPSETTING(    0x08, "C (1 2 3 6 pts.)" )
1836   PORT_DIPSETTING(    0x0c, "D (1 2 6 10 pts.)" )
1837   PORT_DIPNAME( 0x0c, 0x08, "Bonus Rate (5renchan bonus)" )   PORT_DIPLOCATION("SW2:3,4")   PORT_CONDITION("DSW3", 0x03, PORTCOND_EQUALS, 0x03)
1838   PORT_DIPSETTING(    0x00, "A (5 pts.)" )
1839   PORT_DIPSETTING(    0x04, "B (10 pts.)" )
1840   PORT_DIPSETTING(    0x08, "C (15 pts.)" )
1841   PORT_DIPSETTING(    0x0c, "D (20 pts.)" )
1842   PORT_DIPNAME( 0x30, 0x00, "CPU Houjuu Pattern" )         PORT_DIPLOCATION("SW2:5,6")
1843   PORT_DIPSETTING(    0x00, "100% Free" )
1844   PORT_DIPSETTING(    0x10, "75% Free" )
1845   PORT_DIPSETTING(    0x20, "50% Free" )
1846   PORT_DIPSETTING(    0x30, "25% Free" )
1847   PORT_DIPNAME( 0x40, 0x00, "Payout Rate Autochange" )      PORT_DIPLOCATION("SW2:7")
1848   PORT_DIPSETTING(    0x40, DEF_STR( No ) )
1849   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
1850   PORT_DIPNAME( 0x80, 0x80, "Test Mode" )                  PORT_DIPLOCATION("SW2:8")
17091851   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
17101852   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
17111853
1854   /* On the subboard */
17121855   PORT_START("DSW2")
1713   PORT_DIPNAME( 0x01, 0x00, "DSW2" )
1714   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1715   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
1716   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
1717   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1718   PORT_DIPSETTING(    0x02, DEF_STR( On ) )
1719   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
1720   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1721   PORT_DIPSETTING(    0x04, DEF_STR( On ) )
1722   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
1723   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1724   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
1725   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
1726   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1727   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
1728   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
1729   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1730   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
1731   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
1732   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1733   PORT_DIPSETTING(    0x40, DEF_STR( On ) )
1734   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
1735   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1736   PORT_DIPSETTING(    0x80, DEF_STR( On ) )
1856   PORT_DIPNAME( 0x01, 0x00, "Double Odds Bonus" )            PORT_DIPLOCATION("SW3:1")
1857   PORT_DIPSETTING(    0x01, DEF_STR( No ) )
1858   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
1859   PORT_DIPNAME( 0x02, 0x00, "Extra Bet" )                  PORT_DIPLOCATION("SW3:2")
1860   PORT_DIPSETTING(    0x02, DEF_STR( No ) )
1861   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
1862   PORT_DIPNAME( 0x04, 0x00, "Color Hai Bonus" )            PORT_DIPLOCATION("SW3:3")
1863   PORT_DIPSETTING(    0x04, DEF_STR( No ) )
1864   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
1865   PORT_DIPNAME( 0x08, 0x00, "Sangenhai Bonus" )            PORT_DIPLOCATION("SW3:4")
1866   PORT_DIPSETTING(    0x08, DEF_STR( No ) )
1867   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
1868   PORT_DIPUNUSED_DIPLOC( 0x70, 0x00, "SW3:5,6,7" )
1869   PORT_DIPNAME( 0x80, 0x00, "Coin Needed for Last Chance" )   PORT_DIPLOCATION("SW3:8")
1870   PORT_DIPSETTING(    0x80, DEF_STR( No ) )
1871   PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
17371872
1873   /* On the subboard */
17381874   PORT_START("DSW4")
1739   PORT_DIPNAME( 0x01, 0x00, "DSW4" )
1740   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1741   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
1742   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
1743   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1744   PORT_DIPSETTING(    0x02, DEF_STR( On ) )
1745   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
1746   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1747   PORT_DIPSETTING(    0x04, DEF_STR( On ) )
1748   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
1749   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1750   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
1751   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
1752   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1753   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
1754   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
1755   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1756   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
1757   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
1758   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1759   PORT_DIPSETTING(    0x40, DEF_STR( On ) )
1760   PORT_DIPNAME( 0x80, 0x80, "Background Color" )
1761   PORT_DIPSETTING(    0x00, "White" )
1875   PORT_DIPNAME( 0x03, 0x00, "Odds Rate" )            PORT_DIPLOCATION("SW1:1,2")
1876   PORT_DIPSETTING(    0x03, "A (50 30 15 8 5 4 3 2)" )
1877   PORT_DIPSETTING(    0x02, "B (100 40 20 10 5 4 3 2)" )
1878   PORT_DIPSETTING(    0x01, "C (150 70 30 10 5 4 3 2)" )
1879   PORT_DIPSETTING(    0x00, "D (32 24 16 12 8 4 2 1)" )
1880   PORT_DIPNAME( 0x3c, 0x3c, "Bonus Awarded at:" )      PORT_DIPLOCATION("SW1:3,4,5,6")
1881   PORT_DIPSETTING(    0x00, "1st Time Only" )
1882   PORT_DIPSETTING(    0x20, "200 Coins" )
1883   PORT_DIPSETTING(    0x10, "300 Coins" )
1884   PORT_DIPSETTING(    0x30, "400 Coins" )
1885   PORT_DIPSETTING(    0x08, "500 Coins" )
1886   PORT_DIPSETTING(    0x28, "600 Coins" )
1887   PORT_DIPSETTING(    0x18, "700 Coins" )
1888   PORT_DIPSETTING(    0x38, "1000 Coins" )
1889   PORT_DIPSETTING(    0x3c, "Never" )
1890   PORT_DIPNAME( 0x40, 0x40, "Bonus Occurrence" )      PORT_DIPLOCATION("SW1:7")
1891   PORT_DIPSETTING(    0x00, "Once" )
1892   PORT_DIPSETTING(    0x40, "Twice" )
1893   PORT_DIPNAME( 0x80, 0x80, "Background Color" )      PORT_DIPLOCATION("SW1:8")
1894   PORT_DIPSETTING(    0x00, "White" )      // Black according to manual
17621895   PORT_DIPSETTING(    0x80, "Green" )
17631896INPUT_PORTS_END
17641897
r4441r4442
28162949   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
28172950INPUT_PORTS_END
28182951
2952static INPUT_PORTS_START( mjvegasa )
2953   PORT_INCLUDE( mjctrl2 )
28192954
2955   PORT_START("DSW1")   // 6810
2956   PORT_DIPNAME( 0x0f, 0x07, "Pay Out Rate" )
2957   PORT_DIPSETTING(    0x0f, "96%" )
2958   PORT_DIPSETTING(    0x0e, "93%" )
2959   PORT_DIPSETTING(    0x0d, "90%" )
2960   PORT_DIPSETTING(    0x0c, "87%" )
2961   PORT_DIPSETTING(    0x0b, "84%" )
2962   PORT_DIPSETTING(    0x0a, "81%" )
2963   PORT_DIPSETTING(    0x09, "78%" )
2964   PORT_DIPSETTING(    0x08, "75%" )
2965   PORT_DIPSETTING(    0x07, "71%" )
2966   PORT_DIPSETTING(    0x06, "68%" )
2967   PORT_DIPSETTING(    0x05, "65%" )
2968   PORT_DIPSETTING(    0x04, "62%" )
2969   PORT_DIPSETTING(    0x03, "59%" )
2970   PORT_DIPSETTING(    0x02, "56%" )
2971   PORT_DIPSETTING(    0x01, "53%" )
2972   PORT_DIPSETTING(    0x00, "50%" )
2973   PORT_DIPNAME( 0x30, 0x30, "Odds Rate" )
2974   PORT_DIPSETTING(    0x30, "32 24 16 12 8 4 2 1" )
2975   PORT_DIPSETTING(    0x00, "50 30 15 8 5 3 2 1" )
2976   PORT_DIPSETTING(    0x10, "100 50 25 10 5 3 2 1" )
2977   PORT_DIPSETTING(    0x20, "200 100 50 10 5 3 2 1" )
2978   PORT_DIPNAME( 0xc0, 0xc0, "Max Bet" )
2979   PORT_DIPSETTING(    0xc0, "1" )
2980   PORT_DIPSETTING(    0x80, "5" )
2981   PORT_DIPSETTING(    0x40, "10" )
2982   PORT_DIPSETTING(    0x00, "20" )
2983
2984   PORT_START("DSW2")   // 6811
2985   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
2986   PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
2987   PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
2988   PORT_DIPSETTING(    0x01, DEF_STR( 1C_5C ) )
2989   PORT_DIPSETTING(    0x00, "1 Coin/10 Credits" )
2990   PORT_DIPNAME( 0x0c, 0x0c, "YAKUMAN Times" )
2991   PORT_DIPSETTING(    0x0c, "1" )
2992   PORT_DIPSETTING(    0x08, "2" )
2993   PORT_DIPSETTING(    0x04, "3" )
2994   PORT_DIPSETTING(    0x00, "5" )
2995   PORT_DIPNAME( 0x70, 0x70, "YAKUMAN Bonus" )
2996   PORT_DIPSETTING(    0x70, "Cut" )
2997   PORT_DIPSETTING(    0x60, "300" )
2998   PORT_DIPSETTING(    0x50, "500" )
2999   PORT_DIPSETTING(    0x40, "700" )
3000   PORT_DIPSETTING(    0x30, "1000" )
3001   PORT_DIPSETTING(    0x20, "1000?" )
3002   PORT_DIPSETTING(    0x10, "1000?" )
3003   PORT_DIPSETTING(    0x00, "1000?" )
3004   PORT_DIPNAME( 0x80, 0x80, "Unknown 2-7" )
3005   PORT_DIPSETTING(    0x00, "1" )
3006   PORT_DIPSETTING(    0x80, "2" )
3007
3008   PORT_START("DSW3")   // 6812
3009   PORT_DIPNAME( 0x01, 0x01, "Unknown 3-0" )
3010   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
3011   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3012   PORT_DIPNAME( 0x02, 0x02, "Unknown 3-1" )
3013   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
3014   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3015   PORT_DIPNAME( 0x04, 0x04, "3 BAI In YAKUMAN Bonus Chance" )
3016   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
3017   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3018   PORT_DIPNAME( 0x08, 0x08, "Unknown 3-3" )
3019   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
3020   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3021   PORT_DIPNAME( 0x10, 0x10, "Unknown 3-4" )
3022   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
3023   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3024   PORT_DIPNAME( 0x20, 0x20, "Unknown 3-5" )
3025   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
3026   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3027   PORT_DIPNAME( 0x40, 0x40, "Unknown 3-6" )
3028   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
3029   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3030   PORT_DIPNAME( 0x80, 0x80, "Unknown 3-7" )
3031   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
3032   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3033
3034   PORT_START("DSW4")   // 6813
3035   PORT_DIPNAME( 0x01, 0x01, "Unknown 4-0" )
3036   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
3037   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3038   PORT_DIPNAME( 0x02, 0x02, "Unknown 4-1" )
3039   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
3040   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3041   PORT_DIPNAME( 0x04, 0x00, "Girls" )
3042   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
3043   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3044   PORT_DIPNAME( 0x08, 0x00, "Background" )
3045   PORT_DIPSETTING(    0x08, "Black" )
3046   PORT_DIPSETTING(    0x00, "Green" )
3047   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Demo_Sounds ) )
3048   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
3049   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3050   PORT_DIPNAME( 0x20, 0x20, "Unknown 4-5" )
3051   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
3052   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3053   PORT_DIPNAME( 0x40, 0x40, "Unknown 4-6" )
3054   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
3055   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3056   PORT_DIPNAME( 0x80, 0x80, "Unknown 4-7" )
3057   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
3058   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3059
3060   PORT_START("DSWTOP")   // 6814
3061   PORT_DIPNAME( 0x01, 0x01, "Credits Per Note" )
3062   PORT_DIPSETTING(    0x01, "5" )
3063   PORT_DIPSETTING(    0x00, "10" )
3064   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) )
3065   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
3066   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3067   PORT_DIPNAME( 0x04, 0x04, "Unknown 2-8" )
3068   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
3069   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3070   PORT_DIPNAME( 0x08, 0x08, "Unknown 2-9" )
3071   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
3072   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3073   PORT_DIPNAME( 0x10, 0x10, "Flip-Flop Key" )
3074   PORT_DIPSETTING(    0x10, "Flip-Flop" )
3075   PORT_DIPSETTING(    0x00, "Start" )
3076   PORT_DIPNAME( 0x20, 0x20, "Don Den Times" )
3077   PORT_DIPSETTING(    0x20, "5" )
3078   PORT_DIPSETTING(    0x00, "8" )
3079   PORT_DIPNAME( 0x40, 0x40, "Unknown 4-8" )
3080   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
3081   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3082   PORT_DIPNAME( 0x80, 0x80, "Debug Mode" )   // e.g. press start in bet screen
3083   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
3084   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
3085INPUT_PORTS_END
3086
3087
28203088static const ay8910_interface ay8910_config =
28213089{
28223090   AY8910_LEGACY_OUTPUT,
r4441r4442
30483316   MDRV_MSM6242_ADD("rtc")
30493317MACHINE_DRIVER_END
30503318
3319static MACHINE_DRIVER_START( mjvegasa )
3320   MDRV_IMPORT_FROM(mjderngr)
3321   MDRV_CPU_REPLACE("maincpu",TMP90841, XTAL_8MHz)   /* ? */
3322   MDRV_CPU_PROGRAM_MAP(mjvegasa_map,0)
3323   MDRV_CPU_IO_MAP(mjvegasa_iomap,0)
3324   MDRV_CPU_VBLANK_INT_HACK(mjtensin_interrupt,2)
3325
3326   MDRV_SCREEN_MODIFY("screen")
3327   MDRV_SCREEN_VISIBLE_AREA(0, 255, 8, 255-8)
3328
3329   /* devices */
3330   MDRV_MSM6242_ADD("rtc")
3331MACHINE_DRIVER_END
3332
3333
30513334/***************************************************************************
30523335
30533336  Game driver(s)
r4441r4442
38184101   ROM_LOAD( "d50-1_82s147.4g", 0x200, 0x200, CRC(50c0d0ec) SHA1(222899456cd2e15391d8d0f771bbd5e5333d6ba3) )
38194102ROM_END
38204103
4104ROM_START( mjvegasa )
4105   ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASEFF )   // 100 banks
4106   ROM_LOAD( "5040.1b", 0x00000, 0x20000, CRC(c4f03128) SHA1(758567f74de333207dfe6c1cb72b2afffb0c8f4b) )
4107   /* bank switched ROMs follow */
4108   ROM_RELOAD(           0x070000, 0x20000 )   // 0c-0f
4109   ROM_LOAD( "5002.1d",  0x210000, 0x80000, CRC(016c0a32) SHA1(5c5fdd631eacb36a0ee7dba9e070c2d3d3d8fd5b) )   // 40-4f
4110   ROM_LOAD( "5003.1e",  0x2f0000, 0x20000, CRC(5323cc85) SHA1(58b75ba560f05a0568024f52ee89f54713219452) )   // 5c-5f
4111
4112   ROM_REGION( 0x400, "proms", 0 )
4113   ROM_LOAD( "d50-2_82s147.4h", 0x000, 0x200, CRC(3c960ea2) SHA1(65e05e3f129e9e6fcb14b7d44a75a76919c54d52) )
4114   ROM_LOAD( "d50-1_82s147.4g", 0x200, 0x200, CRC(50c0d0ec) SHA1(222899456cd2e15391d8d0f771bbd5e5333d6ba3) )
4115ROM_END
4116
38214117/***************************************************************************
38224118
38234119Mahjong Shinkirou Deja Vu (+ some roms from Jan Oh (Toapan) !?)
r4441r4442
43384634GAME( 1990,  mjifb,    0,        mjifb,    mjifb,    0,        ROT0,   "Dynax",                      "Mahjong If...? [BET]",                  0 )
43394635GAME( 1990,  mjifb2,   mjifb,    mjifb,    mjifb,    0,        ROT0,   "Dynax",                      "Mahjong If...? [BET](2921)",            0 )
43404636GAME( 1990,  mjifb3,   mjifb,    mjifb,    mjifb,    0,        ROT0,   "Dynax",                      "Mahjong If...? [BET](2931)",            0 )
4341GAME( 1991,  mjvegas,  0,        mjifb,    mjifb,    0,        ROT0,   "Dynax",                      "Mahjong Vegas (Japan)",                 GAME_NOT_WORKING )
4637GAME( 1991,  mjvegasa, 0,        mjvegasa, mjvegasa, 0,        ROT0,   "Dynax",                      "Mahjong Vegas (Japan, unprotected)",    0 )
4638GAME( 1991,  mjvegas,  mjvegasa, mjvegasa, mjvegasa, 0,        ROT0,   "Dynax",                      "Mahjong Vegas (Japan)",                 GAME_NOT_WORKING )
43424639GAME( 1992,  cafetime, 0,        cafetime, cafetime, 0,        ROT0,   "Dynax",                      "Mahjong Cafe Time",                     0 )
43434640GAME( 1993,  cafedoll, 0,        mjifb,    mjifb,    0,        ROT0,   "Dynax",                      "Mahjong Cafe Doll (Japan)",             GAME_NOT_WORKING )
43444641GAME( 1995,  mjtensin, 0,        mjtensin, mjtensin, 0,        ROT0,   "Dynax",                      "Mahjong Tensinhai (Japan)",             GAME_NOT_WORKING )
src/emu/cpu/m6805/m6805.c
r4441r4442
310310}
311311#endif
312312
313#if (HAS_M68705)
314313
315314/* Generate interrupt - m68705 version */
316315static void m68705_Interrupt( m6805_Regs *cpustate )
r4441r4442
341340      cpustate->iCount -= 11;
342341   }
343342}
344#endif
345343
346344/* Generate interrupts */
347345static void Interrupt( m6805_Regs *cpustate )
r4441r4442
350348   /* pending_interrupts until the interrupt is taken, no matter what the */
351349   /* external IRQ pin does. */
352350
353#if (HAS_HD63705)
354351   if( (cpustate->pending_interrupts & (1<<HD63705_INT_NMI)) != 0)
355352   {
356353      PUSHWORD(cpustate->pc);
r4441r4442
370367   }
371368   else if( (cpustate->pending_interrupts & ((1<<M6805_IRQ_LINE)|HD63705_INT_MASK)) != 0 ) {
372369      if ( (CC & IFLAG) == 0 ) {
373#else
374   if( (cpustate->pending_interrupts & (1<<M6805_IRQ_LINE)) != 0 ) {
375      if ( (CC & IFLAG) == 0 ) {
376#endif
377370   {
378371        /* standard IRQ */
379372//#if (HAS_HD63705)
r4441r4442
390383         (*cpustate->irq_callback)(cpustate->device, 0);
391384
392385
393#if (HAS_HD63705)
394386      if(SUBTYPE==SUBTYPE_HD63705)
395387      {
396388         /* Need to add emulation of other interrupt sources here KW-2/4/99 */
r4441r4442
438430         }
439431      }
440432      else
441#endif
442433      {
443434         RM16( cpustate, 0xffff - 5, &pPC );
444435      }
r4441r4442
529520   {
530521      if (cpustate->pending_interrupts != 0)
531522      {
532#if (HAS_M68705)
533523         if (SUBTYPE==SUBTYPE_M68705)
534524         {
535525            m68705_Interrupt(cpustate);
536526         }
537527         else
538#endif
539528         {
540529            Interrupt(cpustate);
541530         }
r4441r4442
817806/****************************************************************************
818807 * M68705 section
819808 ****************************************************************************/
820#if (HAS_M68705)
821809static CPU_INIT( m68705 )
822810{
823811   m6805_Regs *cpustate = get_safe_token(device);
r4441r4442
843831   if (state != CLEAR_LINE) cpustate->pending_interrupts |= 1<<irqline;
844832}
845833
846#endif
847834
848835/****************************************************************************
849836 * HD63705 section
850837 ****************************************************************************/
851#if (HAS_HD63705)
852838static CPU_INIT( hd63705 )
853839{
854840   m6805_Regs *cpustate = get_safe_token(device);
r4441r4442
887873      if (state != CLEAR_LINE) cpustate->pending_interrupts |= 1<<irqline;
888874   }
889875}
890#endif
891876
892877
893878
r4441r4442
998983}
999984
1000985
1001#if (HAS_M68705)
1002986/**************************************************************************
1003987 * CPU-specific set_info
1004988 **************************************************************************/
r4441r4442
10351019      default:                                 CPU_GET_INFO_CALL(m6805);   break;
10361020   }
10371021}
1038#endif
10391022
10401023
1041#if (HAS_HD63705)
10421024/**************************************************************************
10431025 * CPU-specific set_info
10441026 **************************************************************************/
r4441r4442
10961078      default:                              CPU_GET_INFO_CALL(m6805);   break;
10971079   }
10981080}
1099#endif
src/emu/cpu/m6805/m6805.h
r4441r4442
1717/****************************************************************************
1818 * 68705 section
1919 ****************************************************************************/
20#if (HAS_M68705)
2120#define M68705_A               M6805_A
2221#define M68705_PC               M6805_PC
2322#define M68705_S               M6805_S
r4441r4442
3130
3231extern CPU_GET_INFO( m68705 );
3332#define CPU_M68705 CPU_GET_INFO_NAME( m68705 )
34#endif
3533
3634/****************************************************************************
3735 * HD63705 section
3836 ****************************************************************************/
39#if (HAS_HD63705)
4037#define HD63705_A               M6805_A
4138#define HD63705_PC               M6805_PC
4239#define HD63705_S               M6805_S
r4441r4442
6158
6259extern CPU_GET_INFO( hd63705 );
6360#define CPU_HD63705 CPU_GET_INFO_NAME( hd63705 )
64#endif
6561
6662CPU_DISASSEMBLE( m6805 );
6763
src/emu/cpu/cpu.mak
r4441r4442
7878# Acorn ARM series
7979#-------------------------------------------------
8080
81CPUDEFS += -DHAS_ARM=$(if $(filter ARM,$(CPUS)),1,0)
82CPUDEFS += -DHAS_ARM7=$(if $(filter ARM7,$(CPUS)),1,0)
83
8481ifneq ($(filter ARM,$(CPUS)),)
8582OBJDIRS += $(CPUOBJ)/arm
8683CPUOBJS += $(CPUOBJ)/arm/arm.o
r4441r4442
107104# Advanced Digital Chips SE3208
108105#-------------------------------------------------
109106
110CPUDEFS += -DHAS_SE3208=$(if $(filter SE3208,$(CPUS)),1,0)
111
112107ifneq ($(filter SE3208,$(CPUS)),)
113108OBJDIRS += $(CPUOBJ)/se3208
114109CPUOBJS += $(CPUOBJ)/se3208/se3208.o
r4441r4442
124119# Alpha 8201
125120#-------------------------------------------------
126121
127CPUDEFS += -DHAS_ALPHA8201=$(if $(filter ALPHA8201,$(CPUS)),1,0)
128CPUDEFS += -DHAS_ALPHA8301=$(if $(filter ALPHA8301,$(CPUS)),1,0)
129
130ifneq ($(filter ALPHA8201 ALPHA8301,$(CPUS)),)
122ifneq ($(filter ALPHA8201,$(CPUS)),)
131123OBJDIRS += $(CPUOBJ)/alph8201
132124CPUOBJS += $(CPUOBJ)/alph8201/alph8201.o
133125DBGOBJS += $(CPUOBJ)/alph8201/8201dasm.o
r4441r4442
142134# Analog Devices ADSP21xx series
143135#-------------------------------------------------
144136
145CPUDEFS += -DHAS_ADSP21XX=$(if $(filter ADSP21XX,$(CPUS)),1,0)
146
147137ifneq ($(filter ADSP21XX,$(CPUS)),)
148138OBJDIRS += $(CPUOBJ)/adsp2100
149139CPUOBJS += $(CPUOBJ)/adsp2100/adsp2100.o
r4441r4442
160150# Analog Devices "Sharc" ADSP21062
161151#-------------------------------------------------
162152
163CPUDEFS += -DHAS_ADSP21062=$(if $(filter ADSP21062,$(CPUS)),1,0)
164
165153ifneq ($(filter ADSP21062,$(CPUS)),)
166154OBJDIRS += $(CPUOBJ)/sharc
167155CPUOBJS += $(CPUOBJ)/sharc/sharc.o
r4441r4442
184172# APEXC
185173#-------------------------------------------------
186174
187CPUDEFS += -DHAS_APEXC=$(if $(filter APEXC,$(CPUS)),1,0)
188
189175ifneq ($(filter APEXC,$(CPUS)),)
190176OBJDIRS += $(CPUOBJ)/apexc
191177CPUOBJS += $(CPUOBJ)/apexc/apexc.o
r4441r4442
201187# AT&T DSP32C
202188#-------------------------------------------------
203189
204CPUDEFS += -DHAS_DSP32C=$(if $(filter DSP32C,$(CPUS)),1,0)
205
206190ifneq ($(filter DSP32C,$(CPUS)),)
207191OBJDIRS += $(CPUOBJ)/dsp32
208192CPUOBJS += $(CPUOBJ)/dsp32/dsp32.o
r4441r4442
218202# Atari custom RISC processor
219203#-------------------------------------------------
220204
221CPUDEFS += -DHAS_ASAP=$(if $(filter ASAP,$(CPUS)),1,0)
222
223205ifneq ($(filter ASAP,$(CPUS)),)
224206OBJDIRS += $(CPUOBJ)/asap
225207CPUOBJS += $(CPUOBJ)/asap/asap.o
r4441r4442
235217# Atari Jaguar custom DSPs
236218#-------------------------------------------------
237219
238CPUDEFS += -DHAS_JAGUAR=$(if $(filter JAGUAR,$(CPUS)),1,0)
239
240220ifneq ($(filter JAGUAR,$(CPUS)),)
241221OBJDIRS += $(CPUOBJ)/jaguar
242222CPUOBJS += $(CPUOBJ)/jaguar/jaguar.o
r4441r4442
252232# Simutrek Cube Quest bit-sliced CPUs
253233#-------------------------------------------------
254234
255CPUDEFS += -DHAS_CUBEQCPU=$(if $(filter CUBEQCPU,$(CPUS)),1,0)
256
257235ifneq ($(filter CUBEQCPU,$(CPUS)),)
258236OBJDIRS += $(CPUOBJ)/cubeqcpu
259237CPUOBJS += $(CPUOBJ)/cubeqcpu/cubeqcpu.o
r4441r4442
269247# Entertainment Sciences AM29116-based RIP
270248#-------------------------------------------------
271249
272CPUDEFS += -DHAS_ESRIP=$(if $(filter ESRIP,$(CPUS)),1,0)
273
274250ifneq ($(filter ESRIP,$(CPUS)),)
275251OBJDIRS += $(CPUOBJ)/esrip
276252CPUOBJS += $(CPUOBJ)/esrip/esrip.o
r4441r4442
286262# RCA CDP1802
287263#-------------------------------------------------
288264
289CPUDEFS += -DHAS_CDP1802=$(if $(filter CDP1802,$(CPUS)),1,0)
290
291265ifneq ($(filter CDP1802,$(CPUS)),)
292266OBJDIRS += $(CPUOBJ)/cdp1802
293267CPUOBJS += $(CPUOBJ)/cdp1802/cdp1802.o
r4441r4442
303277# National Semiconductor COP400 family
304278#-------------------------------------------------
305279
306CPUDEFS += -DHAS_COP400=$(if $(filter COP400,$(CPUS)),1,0)
307
308280ifneq ($(filter COP400,$(CPUS)),)
309281OBJDIRS += $(CPUOBJ)/cop400
310282CPUOBJS += $(CPUOBJ)/cop400/cop400.o
r4441r4442
323295# CP1610
324296#-------------------------------------------------
325297
326CPUDEFS += -DHAS_CP1610=$(if $(filter CP1610,$(CPUS)),1,0)
327
328298ifneq ($(filter CP1610,$(CPUS)),)
329299OBJDIRS += $(CPUOBJ)/cp1610
330300CPUOBJS += $(CPUOBJ)/cp1610/cp1610.o
r4441r4442
340310# Cinematronics vector "CPU"
341311#-------------------------------------------------
342312
343CPUDEFS += -DHAS_CCPU=$(if $(filter CCPU,$(CPUS)),1,0)
344
345313ifneq ($(filter CCPU,$(CPUS)),)
346314OBJDIRS += $(CPUOBJ)/ccpu
347315CPUOBJS += $(CPUOBJ)/ccpu/ccpu.o
r4441r4442
357325# DEC T-11
358326#-------------------------------------------------
359327
360CPUDEFS += -DHAS_T11=$(if $(filter T11,$(CPUS)),1,0)
361
362328ifneq ($(filter T11,$(CPUS)),)
363329OBJDIRS += $(CPUOBJ)/t11
364330CPUOBJS += $(CPUOBJ)/t11/t11.o
r4441r4442
376342# F8
377343#-------------------------------------------------
378344
379CPUDEFS += -DHAS_F8=$(if $(filter F8,$(CPUS)),1,0)
380
381345ifneq ($(filter F8,$(CPUS)),)
382346OBJDIRS += $(CPUOBJ)/f8
383347CPUOBJS += $(CPUOBJ)/f8/f8.o
r4441r4442
393357# G65816
394358#-------------------------------------------------
395359
396CPUDEFS += -DHAS_G65816=$(if $(filter G65816,$(CPUS)),1,0)
397
398360ifneq ($(filter G65816,$(CPUS)),)
399361OBJDIRS += $(CPUOBJ)/g65816
400362CPUOBJS += \
r4441r4442
436398# Hitachi 6309
437399#-------------------------------------------------
438400
439CPUDEFS += -DHAS_HD6309=$(if $(filter HD6309,$(CPUS)),1,0)
440
441401ifneq ($(filter HD6309,$(CPUS)),)
442402OBJDIRS += $(CPUOBJ)/hd6309
443403CPUOBJS += $(CPUOBJ)/hd6309/hd6309.o
r4441r4442
454414# Hitachi H8/30xx (16/32-bit H8/3xx series)
455415#-------------------------------------------------
456416
457CPUDEFS += -DHAS_H83002=$(if $(filter H83002,$(CPUS)),1,0)
458
459417ifneq ($(filter H83002,$(CPUS)),)
460418OBJDIRS += $(CPUOBJ)/h83002
461419CPUOBJS += $(CPUOBJ)/h83002/h8_16.o $(CPUOBJ)/h83002/h8periph.o
r4441r4442
477435# Hitachi H8/3334 (8/16-bit H8/3xx series)
478436#-------------------------------------------------
479437
480CPUDEFS += -DHAS_H83334=$(if $(filter H83334,$(CPUS)),1,0)
481
482438ifneq ($(filter H83334,$(CPUS)),)
483439OBJDIRS += $(CPUOBJ)/h83002
484440CPUOBJS += $(CPUOBJ)/h83002/h8_8.o $(CPUOBJ)/h83002/h8periph.o
r4441r4442
499455# Hitachi SH1/SH2
500456#-------------------------------------------------
501457
502CPUDEFS += -DHAS_SH1=$(if $(filter SH1,$(CPUS)),1,0)
503
504ifneq ($(filter SH1,$(CPUS)),)
505OBJDIRS += $(CPUOBJ)/sh2
506CPUOBJS += $(CPUOBJ)/sh2/sh2.o $(CPUOBJ)/sh2/sh2comn.o $(CPUOBJ)/sh2/sh2drc.o $(CPUOBJ)/sh2/sh2fe.o $(DRCOBJ)
507DBGOBJS += $(CPUOBJ)/sh2/sh2dasm.o
508endif
509
510CPUDEFS += -DHAS_SH2=$(if $(filter SH2,$(CPUS)),1,0)
511
512458ifneq ($(filter SH2,$(CPUS)),)
513459OBJDIRS += $(CPUOBJ)/sh2
514460CPUOBJS += $(CPUOBJ)/sh2/sh2.o $(CPUOBJ)/sh2/sh2comn.o $(CPUOBJ)/sh2/sh2drc.o $(CPUOBJ)/sh2/sh2fe.o $(DRCOBJ)
r4441r4442
535481# Hitachi SH4
536482#-------------------------------------------------
537483
538CPUDEFS += -DHAS_SH4=$(if $(filter SH4,$(CPUS)),1,0)
539
540484ifneq ($(filter SH4,$(CPUS)),)
541485OBJDIRS += $(CPUOBJ)/sh4
542486CPUOBJS += $(CPUOBJ)/sh4/sh4.o $(CPUOBJ)/sh4/sh4comn.o
r4441r4442
557501# Hudsonsoft 6280
558502#-------------------------------------------------
559503
560CPUDEFS += -DHAS_H6280=$(if $(filter H6280,$(CPUS)),1,0)
561
562504ifneq ($(filter H6280,$(CPUS)),)
563505OBJDIRS += $(CPUOBJ)/h6280
564506CPUOBJS += $(CPUOBJ)/h6280/h6280.o
r4441r4442
576518# Hyperstone E1 series
577519#-------------------------------------------------
578520
579CPUDEFS += -DHAS_E116T=$(if $(filter E116T,$(CPUS)),1,0)
580CPUDEFS += -DHAS_E116XT=$(if $(filter E116XT,$(CPUS)),1,0)
581CPUDEFS += -DHAS_E116XS=$(if $(filter E116XS,$(CPUS)),1,0)
582CPUDEFS += -DHAS_E116XSR=$(if $(filter E116XSR,$(CPUS)),1,0)
583CPUDEFS += -DHAS_E132N=$(if $(filter E132N,$(CPUS)),1,0)
584CPUDEFS += -DHAS_E132T=$(if $(filter E132T,$(CPUS)),1,0)
585CPUDEFS += -DHAS_E132XN=$(if $(filter E132XN,$(CPUS)),1,0)
586CPUDEFS += -DHAS_E132XT=$(if $(filter E132XT,$(CPUS)),1,0)
587CPUDEFS += -DHAS_E132XS=$(if $(filter E132XS,$(CPUS)),1,0)
588CPUDEFS += -DHAS_E132XSR=$(if $(filter E132XSR,$(CPUS)),1,0)
589CPUDEFS += -DHAS_GMS30C2116=$(if $(filter GMS30C2116,$(CPUS)),1,0)
590CPUDEFS += -DHAS_GMS30C2132=$(if $(filter GMS30C2132,$(CPUS)),1,0)
591CPUDEFS += -DHAS_GMS30C2216=$(if $(filter GMS30C2216,$(CPUS)),1,0)
592CPUDEFS += -DHAS_GMS30C2232=$(if $(filter GMS30C2232,$(CPUS)),1,0)
593
594ifneq ($(filter E116T E116XT E116XS E116XSR E132N E132T E132XN E132XT E132XS E132XSR GMS30C2116 GMS30C2132 GMS30C2216 GMS30C2232,$(CPUS)),)
521ifneq ($(filter E1,$(CPUS)),)
595522OBJDIRS += $(CPUOBJ)/e132xs
596523CPUOBJS += $(CPUOBJ)/e132xs/e132xs.o
597524DBGOBJS += $(CPUOBJ)/e132xs/32xsdasm.o
r4441r4442
607534# Intel 8080/8085A
608535#-------------------------------------------------
609536
610CPUDEFS += -DHAS_I8085=$(if $(filter I8085,$(CPUS)),1,0)
611
612537ifneq ($(filter I8085,$(CPUS)),)
613538OBJDIRS += $(CPUOBJ)/i8085
614539CPUOBJS += $(CPUOBJ)/i8085/i8085.o
r4441r4442
626551# Intel MCS-48 (8039 and derivatives)
627552#-------------------------------------------------
628553
629CPUDEFS += -DHAS_MCS48=$(if $(filter MCS48,$(CPUS)),1,0)
630
631554ifneq ($(filter MCS48,$(CPUS)),)
632555OBJDIRS += $(CPUOBJ)/mcs48
633556CPUOBJS += $(CPUOBJ)/mcs48/mcs48.o
r4441r4442
643566# Intel 8051 and derivatives
644567#-------------------------------------------------
645568
646CPUDEFS += -DHAS_I8031=$(if $(filter I8031,$(CPUS)),1,0)
647CPUDEFS += -DHAS_I8032=$(if $(filter I8032,$(CPUS)),1,0)
648CPUDEFS += -DHAS_I8051=$(if $(filter I8051,$(CPUS)),1,0)
649CPUDEFS += -DHAS_I8052=$(if $(filter I8052,$(CPUS)),1,0)
650CPUDEFS += -DHAS_I8751=$(if $(filter I8751,$(CPUS)),1,0)
651CPUDEFS += -DHAS_I8752=$(if $(filter I8752,$(CPUS)),1,0)
652CPUDEFS += -DHAS_I80C31=$(if $(filter I80C31,$(CPUS)),1,0)
653CPUDEFS += -DHAS_I80C32=$(if $(filter I80C32,$(CPUS)),1,0)
654CPUDEFS += -DHAS_I80C51=$(if $(filter I80C51,$(CPUS)),1,0)
655CPUDEFS += -DHAS_I80C52=$(if $(filter I80C52,$(CPUS)),1,0)
656CPUDEFS += -DHAS_I87C51=$(if $(filter I87C51,$(CPUS)),1,0)
657CPUDEFS += -DHAS_I87C52=$(if $(filter I87C52,$(CPUS)),1,0)
658CPUDEFS += -DHAS_AT89C4051=$(if $(filter AT89C4051,$(CPUS)),1,0)
659CPUDEFS += -DHAS_DS5002FP=$(if $(filter DS5002FP,$(CPUS)),1,0)
660
661ifneq ($(filter DS5002FP I8031 I8032 I8051 I8052 I8751 I8752 I80C31 I80C32 I80C51 I80C52 I87C51 I87C52 AT89C4051,$(CPUS)),)
569ifneq ($(filter MCS51,$(CPUS)),)
662570OBJDIRS += $(CPUOBJ)/mcs51
663571CPUOBJS += $(CPUOBJ)/mcs51/mcs51.o
664572DBGOBJS += $(CPUOBJ)/mcs51/mcs51dasm.o
r4441r4442
672580# Intel 80x86 series
673581#-------------------------------------------------
674582
675CPUDEFS += -DHAS_I8086=$(if $(filter I8086,$(CPUS)),1,0)
676CPUDEFS += -DHAS_I8088=$(if $(filter I8088,$(CPUS)),1,0)
677CPUDEFS += -DHAS_I80186=$(if $(filter I80186,$(CPUS)),1,0)
678CPUDEFS += -DHAS_I80188=$(if $(filter I80188,$(CPUS)),1,0)
679CPUDEFS += -DHAS_I80286=$(if $(filter I80286,$(CPUS)),1,0)
680CPUDEFS += -DHAS_I386=$(if $(filter I386,$(CPUS)),1,0)
681CPUDEFS += -DHAS_I486=$(if $(filter I486,$(CPUS)),1,0)
682CPUDEFS += -DHAS_PENTIUM=$(if $(filter PENTIUM,$(CPUS)),1,0)
683CPUDEFS += -DHAS_MEDIAGX=$(if $(filter MEDIAGX,$(CPUS)),1,0)
684
685ifneq ($(filter I8086 I8088 I80186 I80188,$(CPUS)),)
583ifneq ($(filter I86,$(CPUS)),)
686584OBJDIRS += $(CPUOBJ)/i86 $(CPUOBJ)/i386
687585CPUOBJS += $(CPUOBJ)/i86/i86.o
688DBGOBJS += $(CPUOBJ)/i386/i386dasm.o
689endif
690
691
692ifneq ($(filter I80286,$(CPUS)),)
693OBJDIRS += $(CPUOBJ)/i86 $(CPUOBJ)/i386
694586CPUOBJS += $(CPUOBJ)/i86/i286.o
695587DBGOBJS += $(CPUOBJ)/i386/i386dasm.o
696588endif
697589
698
699ifneq ($(filter I386 I486 PENTIUM MEDIAGX,$(CPUS)),)
590ifneq ($(filter I386,$(CPUS)),)
700591OBJDIRS += $(CPUOBJ)/i386
701592CPUOBJS += $(CPUOBJ)/i386/i386.o
702593DBGOBJS += $(CPUOBJ)/i386/i386dasm.o
r4441r4442
739630# Intel i860
740631#-------------------------------------------------
741632
742CPUDEFS += -DHAS_I860=$(if $(filter I860,$(CPUS)),1,0)
743
744633ifneq ($(filter I860,$(CPUS)),)
745634OBJDIRS += $(CPUOBJ)/i860
746635CPUOBJS += $(CPUOBJ)/i860/i860.o
r4441r4442
755644# Intel i960
756645#-------------------------------------------------
757646
758CPUDEFS += -DHAS_I960=$(if $(filter I960,$(CPUS)),1,0)
759
760647ifneq ($(filter I960,$(CPUS)),)
761648OBJDIRS += $(CPUOBJ)/i960
762649CPUOBJS += $(CPUOBJ)/i960/i960.o
r4441r4442
772659# Konami custom CPU (6809-based)
773660#-------------------------------------------------
774661
775CPUDEFS += -DHAS_KONAMI=$(if $(filter KONAMI,$(CPUS)),1,0)
776
777662ifneq ($(filter KONAMI,$(CPUS)),)
778663OBJDIRS += $(CPUOBJ)/konami
779664CPUOBJS += $(CPUOBJ)/konami/konami.o
r4441r4442
791676# LH5801
792677#-------------------------------------------------
793678
794CPUDEFS += -DHAS_LH5801=$(if $(filter LH5801,$(CPUS)),1,0)
795
796679ifneq ($(filter LH5801,$(CPUS)),)
797680OBJDIRS += $(CPUOBJ)/lh5801
798681CPUOBJS += $(CPUOBJ)/lh5801/lh5801.o
r4441r4442
809692# Fujitsu MB88xx
810693#-------------------------------------------------
811694
812CPUDEFS += -DHAS_MB8841=$(if $(filter MB8841,$(CPUS)),1,0)
813CPUDEFS += -DHAS_MB8842=$(if $(filter MB8842,$(CPUS)),1,0)
814CPUDEFS += -DHAS_MB8843=$(if $(filter MB8843,$(CPUS)),1,0)
815CPUDEFS += -DHAS_MB8844=$(if $(filter MB8844,$(CPUS)),1,0)
816
817ifneq ($(filter MB8841 MB8842 MB8843 MB8844,$(CPUS)),)
695ifneq ($(filter MB88XX,$(CPUS)),)
818696OBJDIRS += $(CPUOBJ)/mb88xx
819697CPUOBJS += $(CPUOBJ)/mb88xx/mb88xx.o
820698DBGOBJS += $(CPUOBJ)/mb88xx/mb88dasm.o
r4441r4442
829707# Fujitsu MB86233
830708#-------------------------------------------------
831709
832CPUDEFS += -DHAS_MB86233=$(if $(filter MB86233,$(CPUS)),1,0)
833
834710ifneq ($(filter MB86233,$(CPUS)),)
835711OBJDIRS += $(CPUOBJ)/mb86233
836712CPUOBJS += $(CPUOBJ)/mb86233/mb86233.o
r4441r4442
846722# Microchip PIC16C5x
847723#-------------------------------------------------
848724
849CPUDEFS += -DHAS_PIC16C54=$(if $(filter PIC16C54,$(CPUS)),1,0)
850CPUDEFS += -DHAS_PIC16C55=$(if $(filter PIC16C55,$(CPUS)),1,0)
851CPUDEFS += -DHAS_PIC16C56=$(if $(filter PIC16C56,$(CPUS)),1,0)
852CPUDEFS += -DHAS_PIC16C57=$(if $(filter PIC16C57,$(CPUS)),1,0)
853CPUDEFS += -DHAS_PIC16C58=$(if $(filter PIC16C58,$(CPUS)),1,0)
854
855ifneq ($(filter PIC16C54 PIC16C55 PIC16C56 PIC16C57 PIC16C58,$(CPUS)),)
725ifneq ($(filter PIC16C5X,$(CPUS)),)
856726OBJDIRS += $(CPUOBJ)/pic16c5x
857727CPUOBJS += $(CPUOBJ)/pic16c5x/pic16c5x.o
858728DBGOBJS += $(CPUOBJ)/pic16c5x/16c5xdsm.o
r4441r4442
865735
866736#-------------------------------------------------
867737# MIPS R3000 (MIPS I/II) series
738# MIPS R4000 (MIPS III/IV) series
739# Sony PlayStation CPU (R3000-based + GTE)
868740#-------------------------------------------------
869741
870CPUDEFS += -DHAS_R3000=$(if $(filter R3000,$(CPUS)),1,0)
871CPUDEFS += -DHAS_R3041=$(if $(filter R3041,$(CPUS)),1,0)
872
873ifneq ($(filter R3000 R3041,$(CPUS)),)
742ifneq ($(filter MIPS,$(CPUS)),)
874743OBJDIRS += $(CPUOBJ)/mips
875744CPUOBJS += $(CPUOBJ)/mips/r3000.o
745CPUOBJS += $(CPUOBJ)/mips/mips3com.o $(CPUOBJ)/mips/mips3fe.o $(CPUOBJ)/mips/mips3drc.o $(DRCOBJ)
746CPUOBJS += $(CPUOBJ)/mips/psx.o
876747DBGOBJS += $(CPUOBJ)/mips/r3kdasm.o
748DBGOBJS += $(CPUOBJ)/mips/mips3dsm.o
749DBGOBJS += $(CPUOBJ)/mips/psxdasm.o
877750endif
878751
879752$(CPUOBJ)/mips/r3000.o:   $(CPUSRC)/mips/r3000.c \
880753                  $(CPUSRC)/mips/r3000.h
881754
882
883
884#-------------------------------------------------
885# MIPS R4000 (MIPS III/IV) series
886#-------------------------------------------------
887
888CPUDEFS += -DHAS_VR4300=$(if $(filter VR4300,$(CPUS)),1,0)
889CPUDEFS += -DHAS_R4600=$(if $(filter R4600,$(CPUS)),1,0)
890CPUDEFS += -DHAS_R4650=$(if $(filter R4650,$(CPUS)),1,0)
891CPUDEFS += -DHAS_R4700=$(if $(filter R4700,$(CPUS)),1,0)
892CPUDEFS += -DHAS_R5000=$(if $(filter R5000,$(CPUS)),1,0)
893CPUDEFS += -DHAS_QED5271=$(if $(filter QED5271,$(CPUS)),1,0)
894CPUDEFS += -DHAS_RM7000=$(if $(filter RM7000,$(CPUS)),1,0)
895
896ifneq ($(filter VR4300 R4600 R4650 R4700 R5000 QED5271 RM7000,$(CPUS)),)
897OBJDIRS += $(CPUOBJ)/mips
898CPUOBJS += $(CPUOBJ)/mips/mips3com.o $(CPUOBJ)/mips/mips3fe.o $(CPUOBJ)/mips/mips3drc.o $(DRCOBJ)
899DBGOBJS += $(CPUOBJ)/mips/mips3dsm.o
900endif
901
902755$(CPUOBJ)/mips/mips3com.o:   $(CPUSRC)/mips/mips3.h \
903756                        $(CPUSRC)/mips/mips3com.h
904757
r4441r4442
912765                        $(CPUSRC)/mips/mips3fe.h \
913766                        $(DRCDEPS)
914767
768$(CPUOBJ)/mips/psx.o:   $(CPUSRC)/mips/psx.c \
769                  $(CPUSRC)/mips/psx.h
915770
916771
772
917773#-------------------------------------------------
918774# Mitsubishi M37702 and M37710 (based on 65C816)
919775#-------------------------------------------------
920776
921CPUDEFS += -DHAS_M37702=$(if $(filter M37702,$(CPUS)),1,0)
922CPUDEFS += -DHAS_M37710=$(if $(filter M37710,$(CPUS)),1,0)
923
924ifneq ($(filter M37702 M37710,$(CPUS)),)
777ifneq ($(filter M37710,$(CPUS)),)
925778OBJDIRS += $(CPUOBJ)/m37710
926779CPUOBJS += \
927780   $(CPUOBJ)/m37710/m37710.o \
r4441r4442
961814# Mostek 6502 and its many derivatives
962815#-------------------------------------------------
963816
964CPUDEFS += -DHAS_M6502=$(if $(filter M6502,$(CPUS)),1,0)
965CPUDEFS += -DHAS_M65C02=$(if $(filter M65C02,$(CPUS)),1,0)
966CPUDEFS += -DHAS_M65SC02=$(if $(filter M65SC02,$(CPUS)),1,0)
967CPUDEFS += -DHAS_M65CE02=$(if $(filter M65CE02,$(CPUS)),1,0)
968CPUDEFS += -DHAS_M6509=$(if $(filter M6509,$(CPUS)),1,0)
969CPUDEFS += -DHAS_M6510=$(if $(filter M6510 M6510T M7501 M8502,$(CPUS)),1,0)
970CPUDEFS += -DHAS_M6510T=$(if $(filter M6510T,$(CPUS)),1,0)
971CPUDEFS += -DHAS_M7501=$(if $(filter M7501,$(CPUS)),1,0)
972CPUDEFS += -DHAS_M8502=$(if $(filter M8502,$(CPUS)),1,0)
973CPUDEFS += -DHAS_N2A03=$(if $(filter N2A03,$(CPUS)),1,0)
974CPUDEFS += -DHAS_DECO16=$(if $(filter DECO16,$(CPUS)),1,0)
975CPUDEFS += -DHAS_M4510=$(if $(filter M4510,$(CPUS)),1,0)
976
977ifneq ($(filter M6502 M65C02 M65SC02 M6510 M6510T M7501 M8502 N2A03 DECO16,$(CPUS)),)
817ifneq ($(filter M6502,$(CPUS)),)
978818OBJDIRS += $(CPUOBJ)/m6502
979819CPUOBJS += $(CPUOBJ)/m6502/m6502.o
980DBGOBJS += $(CPUOBJ)/m6502/6502dasm.o
981endif
982
983ifneq ($(filter M65CE02,$(CPUS)),)
984OBJDIRS += $(CPUOBJ)/m6502
985CPUOBJS += $(CPUOBJ)/m6502/m65ce02.o
986DBGOBJS += $(CPUOBJ)/m6502/6502dasm.o
987endif
988
989ifneq ($(filter M6509,$(CPUS)),)
990OBJDIRS += $(CPUOBJ)/m6502
991820CPUOBJS += $(CPUOBJ)/m6502/m6509.o
992DBGOBJS += $(CPUOBJ)/m6502/6502dasm.o
993endif
994
995ifneq ($(filter M4510,$(CPUS)),)
996OBJDIRS += $(CPUOBJ)/m6502
821CPUOBJS += $(CPUOBJ)/m6502/m65ce02.o
997822CPUOBJS += $(CPUOBJ)/m6502/m4510.o
998823DBGOBJS += $(CPUOBJ)/m6502/6502dasm.o
999824endif
r4441r4442
1023848# Motorola 680x
1024849#-------------------------------------------------
1025850
1026CPUDEFS += -DHAS_M6800=$(if $(filter M6800,$(CPUS)),1,0)
1027CPUDEFS += -DHAS_M6801=$(if $(filter M6801,$(CPUS)),1,0)
1028CPUDEFS += -DHAS_M6802=$(if $(filter M6802,$(CPUS)),1,0)
1029CPUDEFS += -DHAS_M6803=$(if $(filter M6803,$(CPUS)),1,0)
1030CPUDEFS += -DHAS_M6808=$(if $(filter M6808,$(CPUS)),1,0)
1031CPUDEFS += -DHAS_HD63701=$(if $(filter HD63701,$(CPUS)),1,0)
1032CPUDEFS += -DHAS_NSC8105=$(if $(filter NSC8105,$(CPUS)),1,0)
1033
1034ifneq ($(filter M6800 M6801 M6802 M6803 M6808 HD63701 NSC8105,$(CPUS)),)
851ifneq ($(filter M6800,$(CPUS)),)
1035852OBJDIRS += $(CPUOBJ)/m6800
1036853CPUOBJS += $(CPUOBJ)/m6800/m6800.o
1037854DBGOBJS += $(CPUOBJ)/m6800/6800dasm.o
r4441r4442
1048865# Motorola 6805
1049866#-------------------------------------------------
1050867
1051CPUDEFS += -DHAS_M6805=$(if $(filter M6805,$(CPUS)),1,0)
1052CPUDEFS += -DHAS_M68705=$(if $(filter M68705,$(CPUS)),1,0)
1053CPUDEFS += -DHAS_HD63705=$(if $(filter HD63705,$(CPUS)),1,0)
1054
1055ifneq ($(filter M6805 M68705 HD63705,$(CPUS)),)
868ifneq ($(filter M6805,$(CPUS)),)
1056869OBJDIRS += $(CPUOBJ)/m6805
1057870CPUOBJS += $(CPUOBJ)/m6805/m6805.o
1058871DBGOBJS += $(CPUOBJ)/m6805/6805dasm.o
r4441r4442
1068881# Motorola 6809
1069882#-------------------------------------------------
1070883
1071CPUDEFS += -DHAS_M6809=$(if $(filter M6809,$(CPUS)),1,0)
1072CPUDEFS += -DHAS_M6809E=$(if $(filter M6809E,$(CPUS)),1,0)
1073
1074ifneq ($(filter M6809 M6809E,$(CPUS)),)
884ifneq ($(filter M6809,$(CPUS)),)
1075885OBJDIRS += $(CPUOBJ)/m6809
1076886CPUOBJS += $(CPUOBJ)/m6809/m6809.o
1077887DBGOBJS += $(CPUOBJ)/m6809/6809dasm.o
r4441r4442
1088898# Motorola 68HC11
1089899#-------------------------------------------------
1090900
1091CPUDEFS += -DHAS_MC68HC11=$(if $(filter MC68HC11,$(CPUS)),1,0)
1092
1093901ifneq ($(filter MC68HC11,$(CPUS)),)
1094902OBJDIRS += $(CPUOBJ)/mc68hc11
1095903CPUOBJS += $(CPUOBJ)/mc68hc11/mc68hc11.o
r4441r4442
1105913# Motorola 68000 series
1106914#-------------------------------------------------
1107915
1108CPUDEFS += -DHAS_M680X0=$(if $(filter M680X0,$(CPUS)),1,0)
1109
1110916ifneq ($(filter M680X0,$(CPUS)),)
1111917OBJDIRS += $(CPUOBJ)/m68000
1112918CPUOBJS += $(CPUOBJ)/m68000/m68kcpu.o $(CPUOBJ)/m68000/m68kops.o
r4441r4442
1149955# Motorola/Freescale dsp56k
1150956#-------------------------------------------------
1151957
1152CPUDEFS += -DHAS_DSP56156=$(if $(filter DSP56156,$(CPUS)),1,0)
1153
1154958ifneq ($(filter DSP56156,$(CPUS)),)
1155959OBJDIRS += $(CPUOBJ)/dsp56k
1156960CPUOBJS += $(CPUOBJ)/dsp56k/dsp56k.o
r4441r4442
1165969
1166970#-------------------------------------------------
1167971# PDP-1
972# TX0
1168973#-------------------------------------------------
1169974
1170CPUDEFS += -DHAS_PDP1=$(if $(filter PDP1,$(CPUS)),1,0)
1171
1172975ifneq ($(filter PDP1,$(CPUS)),)
1173976OBJDIRS += $(CPUOBJ)/pdp1
1174977CPUOBJS += $(CPUOBJ)/pdp1/pdp1.o
978CPUOBJS += $(CPUOBJ)/pdp1/tx0.o
1175979DBGOBJS += $(CPUOBJ)/pdp1/pdp1dasm.o
980DBGOBJS += $(CPUOBJ)/pdp1/tx0dasm.o
1176981endif
1177982
1178983$(CPUOBJ)/pdp1/pdp1.o:   $(CPUSRC)/pdp1/pdp1.c \
1179984                  $(CPUSRC)/pdp1/pdp1.h
1180985
986$(CPUOBJ)/pdp1/tx0.o:      $(CPUSRC)/pdp1/tx0.h \
987                     $(CPUSRC)/pdp1/tx0.c
1181988
989$(CPUOBJ)/pdp1/tx0dasm.o:   $(CPUSRC)/pdp1/tx0.h \
990                     $(CPUSRC)/pdp1/tx0dasm.c
1182991
992
1183993#-------------------------------------------------
1184994# Motorola PowerPC series
1185995#-------------------------------------------------
1186996
1187CPUDEFS += -DHAS_POWERPC=$(if $(filter POWERPC,$(CPUS)),1,0)
1188
1189997ifneq ($(filter POWERPC,$(CPUS)),)
1190998OBJDIRS += $(CPUOBJ)/powerpc
1191999CPUOBJS += $(CPUOBJ)/powerpc/ppccom.o $(CPUOBJ)/powerpc/ppcfe.o $(CPUOBJ)/powerpc/ppcdrc.o $(DRCOBJ)
r4441r4442
12111019# NEC V-series Intel-compatible
12121020#-------------------------------------------------
12131021
1214CPUDEFS += -DHAS_V20=$(if $(filter V20,$(CPUS)),1,0)
1215CPUDEFS += -DHAS_V25=$(if $(filter V25,$(CPUS)),1,0)
1216CPUDEFS += -DHAS_V30=$(if $(filter V30,$(CPUS)),1,0)
1217CPUDEFS += -DHAS_V30MZ=$(if $(filter V30MZ,$(CPUS)),1,0)
1218CPUDEFS += -DHAS_V33=$(if $(filter V33,$(CPUS)),1,0)
1219CPUDEFS += -DHAS_V35=$(if $(filter V35,$(CPUS)),1,0)
1220
1221ifneq ($(filter V20 V25 V30 V33 V35,$(CPUS)),)
1022ifneq ($(filter NEC,$(CPUS)),)
12221023OBJDIRS += $(CPUOBJ)/nec
12231024CPUOBJS += $(CPUOBJ)/nec/nec.o
12241025DBGOBJS += $(CPUOBJ)/nec/necdasm.o
r4441r4442
12521053# NEC V60/V70
12531054#-------------------------------------------------
12541055
1255CPUDEFS += -DHAS_V60=$(if $(filter V60,$(CPUS)),1,0)
1256CPUDEFS += -DHAS_V70=$(if $(filter V70,$(CPUS)),1,0)
1257
1258ifneq ($(filter V60 V70,$(CPUS)),)
1056ifneq ($(filter V60,$(CPUS)),)
12591057OBJDIRS += $(CPUOBJ)/v60
12601058CPUOBJS += $(CPUOBJ)/v60/v60.o
12611059DBGOBJS += $(CPUOBJ)/v60/v60d.o
r4441r4442
12831081# NEC V810 (uPD70732)
12841082#-------------------------------------------------
12851083
1286CPUDEFS += -DHAS_V810=$(if $(filter V810,$(CPUS)),1,0)
1287
12881084ifneq ($(filter V810,$(CPUS)),)
12891085OBJDIRS += $(CPUOBJ)/v810
12901086CPUOBJS += $(CPUOBJ)/v810/v810.o
r4441r4442
13001096# NEC uPD7810 series
13011097#-------------------------------------------------
13021098
1303CPUDEFS += -DHAS_UPD7810=$(if $(filter UPD7810,$(CPUS)),1,0)
1304CPUDEFS += -DHAS_UPD7807=$(if $(filter UPD7807,$(CPUS)),1,0)
1305CPUDEFS += -DHAS_UPD7801=$(if $(filter UPD7801,$(CPUS)),1,0)
1306
1307ifneq ($(filter UPD7810 UPD7807 UPD7801,$(CPUS)),)
1099ifneq ($(filter UPD7810,$(CPUS)),)
13081100OBJDIRS += $(CPUOBJ)/upd7810
13091101CPUOBJS += $(CPUOBJ)/upd7810/upd7810.o
13101102DBGOBJS += $(CPUOBJ)/upd7810/7810dasm.o
r4441r4442
13211113# Nintendo Minx
13221114#-------------------------------------------------
13231115
1324CPUDEFS += -DHAS_MINX=$(if $(filter MINX,$(CPUS)),1,0)
1325
13261116ifneq ($(filter MINX,$(CPUS)),)
13271117OBJDIRS += $(CPUOBJ)/minx
13281118CPUOBJS += $(CPUOBJ)/minx/minx.o
r4441r4442
13431133# Nintendo/SGI RSP (R3000-based + vector processing)
13441134#-------------------------------------------------
13451135
1346CPUDEFS += -DHAS_RSP=$(if $(filter RSP,$(CPUS)),1,0)
1347
13481136ifneq ($(filter RSP,$(CPUS)),)
13491137OBJDIRS += $(CPUOBJ)/rsp
13501138CPUOBJS += $(CPUOBJ)/rsp/rsp.o
r4441r4442
13601148# Saturn
13611149#-------------------------------------------------
13621150
1363CPUDEFS += -DHAS_SATURN=$(if $(filter SATURN,$(CPUS)),1,0)
1364
13651151ifneq ($(filter SATURN,$(CPUS)),)
13661152OBJDIRS += $(CPUOBJ)/saturn
13671153CPUOBJS += $(CPUOBJ)/saturn/saturn.o
r4441r4442
13791165# Signetics 2650
13801166#-------------------------------------------------
13811167
1382CPUDEFS += -DHAS_S2650=$(if $(filter S2650,$(CPUS)),1,0)
1383
13841168ifneq ($(filter S2650,$(CPUS)),)
13851169OBJDIRS += $(CPUOBJ)/s2650
13861170CPUOBJS += $(CPUOBJ)/s2650/s2650.o
r4441r4442
13971181# SC61860
13981182#-------------------------------------------------
13991183
1400CPUDEFS += -DHAS_SC61860=$(if $(filter SC61860,$(CPUS)),1,0)
1401
14021184ifneq ($(filter SC61860,$(CPUS)),)
14031185OBJDIRS += $(CPUOBJ)/sc61860
14041186CPUOBJS += $(CPUOBJ)/sc61860/sc61860.o
r4441r4442
14161198# SM8500
14171199#-------------------------------------------------
14181200
1419CPUDEFS += -DHAS_SM8500=$(if $(filter SM8500,$(CPUS)),1,0)
1420
14211201ifneq ($(filter SM8500,$(CPUS)),)
14221202OBJDIRS += $(CPUOBJ)/sm8500
14231203CPUOBJS += $(CPUOBJ)/sm8500/sm8500.o
r4441r4442
14341214# Sony/Nintendo SPC700
14351215#-------------------------------------------------
14361216
1437CPUDEFS += -DHAS_SPC700=$(if $(filter SPC700,$(CPUS)),1,0)
1438
14391217ifneq ($(filter SPC700,$(CPUS)),)
14401218SPCD = cpu/spc700
14411219OBJDIRS += $(CPUOBJ)/spc700
r4441r4442
14491227
14501228
14511229#-------------------------------------------------
1452# Sony PlayStation CPU (R3000-based + GTE)
1453#-------------------------------------------------
1454
1455CPUDEFS += -DHAS_PSXCPU=$(if $(filter PSXCPU,$(CPUS)),1,0)
1456CPUDEFS += -DHAS_CXD8661R=$(if $(filter CXD8661R,$(CPUS)),1,0)
1457
1458ifneq ($(filter PSXCPU CXD8661R,$(CPUS)),)
1459OBJDIRS += $(CPUOBJ)/mips
1460CPUOBJS += $(CPUOBJ)/mips/psx.o
1461DBGOBJS += $(CPUOBJ)/mips/psxdasm.o
1462endif
1463
1464$(CPUOBJ)/mips/psx.o:   $(CPUSRC)/mips/psx.c \
1465                  $(CPUSRC)/mips/psx.h
1466
1467
1468
1469#-------------------------------------------------
14701230# SSP1601
14711231#-------------------------------------------------
14721232
1473CPUDEFS += -DHAS_SSP1601=$(if $(filter SSP1601,$(CPUS)),1,0)
1474
14751233ifneq ($(filter SSP1601,$(CPUS)),)
14761234OBJDIRS += $(CPUOBJ)/ssp1601
14771235CPUOBJS += $(CPUOBJ)/ssp1601/ssp1601.o
r4441r4442
14871245# Texas Instruments TMS7000 series
14881246#-------------------------------------------------
14891247
1490CPUDEFS += -DHAS_TMS7000=$(if $(filter TMS7000,$(CPUS)),1,0)
1491CPUDEFS += -DHAS_TMS7000_EXL=$(if $(filter TMS7000_EXL,$(CPUS)),1,0)
1492
1493ifneq ($(filter TMS7000 TMS7000_EXL,$(CPUS)),)
1248ifneq ($(filter TMS7000,$(CPUS)),)
14941249OBJDIRS += $(CPUOBJ)/tms7000
14951250CPUOBJS += $(CPUOBJ)/tms7000/tms7000.o
14961251DBGOBJS += $(CPUOBJ)/tms7000/7000dasm.o
r4441r4442
15081263# Texas Instruments TMS99xx series
15091264#-------------------------------------------------
15101265
1511CPUDEFS += -DHAS_TMS9900=$(if $(filter TMS9900,$(CPUS)),1,0)
1512CPUDEFS += -DHAS_TMS9940=$(if $(filter TMS9940,$(CPUS)),1,0)
1513CPUDEFS += -DHAS_TMS9980=$(if $(filter TMS9980,$(CPUS)),1,0)
1514CPUDEFS += -DHAS_TMS9985=$(if $(filter TMS9985,$(CPUS)),1,0)
1515CPUDEFS += -DHAS_TMS9989=$(if $(filter TMS9989,$(CPUS)),1,0)
1516CPUDEFS += -DHAS_TMS9995=$(if $(filter TMS9995,$(CPUS)),1,0)
1517CPUDEFS += -DHAS_TMS99105A=$(if $(filter TMS99105A,$(CPUS)),1,0)
1518CPUDEFS += -DHAS_TMS99110A=$(if $(filter TMS99110A,$(CPUS)),1,0)
1519CPUDEFS += -DHAS_TMS99000=$(if $(filter TMS99000,$(CPUS)),1,0)
1520CPUDEFS += -DHAS_TI990_10=$(if $(filter TMS99010,$(CPUS)),1,0)
1521
1522ifneq ($(filter TMS9900 TMS9940 TMS99000,$(CPUS)),)
1266ifneq ($(filter TMS9900,$(CPUS)),)
15231267OBJDIRS += $(CPUOBJ)/tms9900
15241268CPUOBJS += $(CPUOBJ)/tms9900/tms9900.o
1525DBGOBJS += $(CPUOBJ)/tms9900/9900dasm.o
1526endif
1527
1528ifneq ($(filter TMS9980 TMS9985 TMS9989,$(CPUS)),)
1529OBJDIRS += $(CPUOBJ)/tms9900
15301269CPUOBJS += $(CPUOBJ)/tms9900/tms9980a.o
1531DBGOBJS += $(CPUOBJ)/tms9900/9900dasm.o
1532endif
1533
1534ifneq ($(filter TMS9995 TMS99105A TMS99110A,$(CPUS)),)
1535OBJDIRS += $(CPUOBJ)/tms9900
15361270CPUOBJS += $(CPUOBJ)/tms9900/tms9995.o
1537DBGOBJS += $(CPUOBJ)/tms9900/9900dasm.o
1538endif
1539
1540ifneq ($(filter TMS99010,$(CPUS)),)
1541OBJDIRS += $(CPUOBJ)/tms9900
15421271CPUOBJS += $(CPUOBJ)/tms9900/ti990_10.o
15431272DBGOBJS += $(CPUOBJ)/tms9900/9900dasm.o
15441273endif
r4441r4442
15691298# Texas Instruments TMS340x0 graphics controllers
15701299#-------------------------------------------------
15711300
1572CPUDEFS += -DHAS_TMS340X0=$(if $(filter TMS340X0,$(CPUS)),1,0)
1573
15741301ifneq ($(filter TMS340X0,$(CPUS)),)
15751302OBJDIRS += $(CPUOBJ)/tms34010
15761303CPUOBJS += $(CPUOBJ)/tms34010/tms34010.o
r4441r4442
15901317# Texas Instruments TMS3201x DSP
15911318#-------------------------------------------------
15921319
1593CPUDEFS += -DHAS_TMS32010=$(if $(filter TMS32010,$(CPUS)),1,0)
1594
15951320ifneq ($(filter TMS32010,$(CPUS)),)
15961321OBJDIRS += $(CPUOBJ)/tms32010
15971322CPUOBJS += $(CPUOBJ)/tms32010/tms32010.o
r4441r4442
16071332# Texas Instruments TMS3202x DSP
16081333#-------------------------------------------------
16091334
1610CPUDEFS += -DHAS_TMS32025=$(if $(filter TMS32025,$(CPUS)),1,0)
1611CPUDEFS += -DHAS_TMS32026=$(if $(filter TMS32026,$(CPUS)),1,0)
1612
1613ifneq ($(filter TMS32025 TMS32026,$(CPUS)),)
1335ifneq ($(filter TMS32025,$(CPUS)),)
16141336OBJDIRS += $(CPUOBJ)/tms32025
16151337CPUOBJS += $(CPUOBJ)/tms32025/tms32025.o
16161338DBGOBJS += $(CPUOBJ)/tms32025/32025dsm.o
r4441r4442
16251347# Texas Instruments TMS3203x DSP
16261348#-------------------------------------------------
16271349
1628CPUDEFS += -DHAS_TMS32031=$(if $(filter TMS32031,$(CPUS)),1,0)
1629CPUDEFS += -DHAS_TMS32032=$(if $(filter TMS32032,$(CPUS)),1,0)
1630
1631ifneq ($(filter TMS32031 TMS32032,$(CPUS)),)
1350ifneq ($(filter TMS32031,$(CPUS)),)
16321351OBJDIRS += $(CPUOBJ)/tms32031
16331352CPUOBJS += $(CPUOBJ)/tms32031/tms32031.o
16341353DBGOBJS += $(CPUOBJ)/tms32031/dis32031.o
r4441r4442
16441363# Texas Instruments TMS3205x DSP
16451364#-------------------------------------------------
16461365
1647CPUDEFS += -DHAS_TMS32051=$(if $(filter TMS32051,$(CPUS)),1,0)
1648
16491366ifneq ($(filter TMS32051,$(CPUS)),)
16501367OBJDIRS += $(CPUOBJ)/tms32051
16511368CPUOBJS += $(CPUOBJ)/tms32051/tms32051.o
r4441r4442
16611378# Texas Instruments TMS57002 DSP
16621379#-------------------------------------------------
16631380
1664CPUDEFS += -DHAS_TMS57002=$(if $(filter TMS57002,$(CPUS)),1,0)
1665
16661381ifneq ($(filter TMS57002,$(CPUS)),)
16671382OBJDIRS += $(CPUOBJ)/tms57002
16681383CPUOBJS += $(CPUOBJ)/tms57002/tms57002.o
r4441r4442
16941409# Toshiba TLCS-90 Series
16951410#-------------------------------------------------
16961411
1697CPUDEFS += -DHAS_TLCS90=$(if $(filter TLCS90,$(CPUS)),1,0)
1698
16991412ifneq ($(filter TLCS90,$(CPUS)),)
17001413OBJDIRS += $(CPUOBJ)/tlcs90
17011414CPUOBJS += $(CPUOBJ)/tlcs90/tlcs90.o
r4441r4442
17081421
17091422
17101423#-------------------------------------------------
1711# TX0
1712#-------------------------------------------------
1713
1714CPUDEFS += -DHAS_TX0_64KW=$(if $(filter TX0,$(CPUS)),1,0)
1715CPUDEFS += -DHAS_TX0_8KW=$(if $(filter TX0,$(CPUS)),1,0)
1716
1717ifneq ($(filter TX0,$(CPUS)),)
1718OBJDIRS += $(CPUOBJ)/pdp1
1719CPUOBJS += $(CPUOBJ)/pdp1/tx0.o
1720DBGOBJS += $(CPUOBJ)/pdp1/tx0dasm.o
1721endif
1722
1723$(CPUOBJ)/pdp1/tx0.o:      $(CPUSRC)/pdp1/tx0.h \
1724                     $(CPUSRC)/pdp1/tx0.c
1725
1726$(CPUOBJ)/pdp1/tx0dasm.o:   $(CPUSRC)/pdp1/tx0.h \
1727                     $(CPUSRC)/pdp1/tx0dasm.c
1728
1729
1730
1731#-------------------------------------------------
17321424# Zilog Z80
17331425#-------------------------------------------------
17341426
1735CPUDEFS += -DHAS_Z80=$(if $(filter Z80,$(CPUS)),1,0)
1736
17371427ifneq ($(filter Z80,$(CPUS)),)
17381428OBJDIRS += $(CPUOBJ)/z80
17391429CPUOBJS += $(CPUOBJ)/z80/z80.o $(CPUOBJ)/z80/z80daisy.o
r4441r4442
17491439# Sharp LR35902 (Game Boy CPU)
17501440#-------------------------------------------------
17511441
1752CPUDEFS += -DHAS_LR35902=$(if $(filter LR35902,$(CPUS)),1,0)
1753
17541442ifneq ($(filter LR35902,$(CPUS)),)
17551443OBJDIRS += $(CPUOBJ)/lr35902
17561444CPUOBJS += $(CPUOBJ)/lr35902/lr35902.o
r4441r4442
17681456# Zilog Z180
17691457#-------------------------------------------------
17701458
1771CPUDEFS += -DHAS_Z180=$(if $(filter Z180,$(CPUS)),1,0)
1772
17731459ifneq ($(filter Z180,$(CPUS)),)
17741460OBJDIRS += $(CPUOBJ)/z180 $(CPUOBJ)/z80
17751461CPUOBJS += $(CPUOBJ)/z180/z180.o $(CPUOBJ)/z80/z80daisy.o
r4441r4442
17941480# Zilog Z8000
17951481#-------------------------------------------------
17961482
1797CPUDEFS += -DHAS_Z8000=$(if $(filter Z8000,$(CPUS)),1,0)
1798
17991483ifneq ($(filter Z8000,$(CPUS)),)
18001484OBJDIRS += $(CPUOBJ)/z8000
18011485CPUOBJS += $(CPUOBJ)/z8000/z8000.o
src/emu/cpu/sharc/sharc.c
r4441r4442
958958   }
959959}
960960
961#if (HAS_ADSP21062)
962961static CPU_SET_INFO( adsp21062 )
963962{
964963   if (state >= CPUINFO_INT_INPUT_STATE && state <= CPUINFO_INT_INPUT_STATE + 2)
r4441r4442
976975      default:   CPU_SET_INFO_CALL(sharc);      break;
977976   }
978977}
979#endif
980978
981979
982980static CPU_READ( sharc )
r4441r4442
13271325   }
13281326}
13291327
1330#if (HAS_ADSP21062)
13311328CPU_GET_INFO( adsp21062 )
13321329{
13331330   switch(state)
r4441r4442
13411338      default:                              CPU_GET_INFO_CALL(sharc);            break;
13421339   }
13431340}
1344#endif
src/emu/cpu/sharc/sharc.h
r4441r4442
2727extern void sharc_external_iop_write(const device_config *device, UINT32 address, UINT32 data);
2828extern void sharc_external_dma_write(const device_config *device, UINT32 address, UINT64 data);
2929
30#if (HAS_ADSP21062)
3130CPU_GET_INFO( adsp21062 );
3231#define CPU_ADSP21062 CPU_GET_INFO_NAME( adsp21062 )
33#endif
3432
3533extern UINT32 sharc_dasm_one(char *buffer, offs_t pc, UINT64 opcode);
3634
src/emu/cpu/i86/i86mem.c
r4441r4442
33 *****************************************************************************/
44
55#ifdef I8086
6#if (HAS_I8088||HAS_I80188)
76static void configure_memory_8bit(i8086_state *cpustate)
87{
98   cpustate->mem.fetch_xor = 0;
r4441r4442
1413   cpustate->mem.wword = memory_write_word_8le;
1514}
1615#endif
17#endif
1816
1917
2018/*****************************************************************************
src/emu/cpu/i86/i86.c
r4441r4442
226226   configure_memory_16bit(cpustate);
227227}
228228
229#if (HAS_I8088||HAS_I80188)
230229static CPU_INIT( i8088 )
231230{
232231   i8086_state *cpustate = get_safe_token(device);
233232   CPU_INIT_CALL(i8086);
234233   configure_memory_8bit(cpustate);
235234}
236#endif
237235
238236static CPU_RESET( i8086 )
239237{
r4441r4442
334332}
335333
336334
337#if (HAS_I80186 || HAS_I80188)
338335
339336#include "i86.h"
340337
r4441r4442
382379   return cycles - cpustate->icount;
383380}
384381
385#endif
386382
387383
388384
r4441r4442
593589}
594590
595591
596#if (HAS_I8088)
597592/**************************************************************************
598593 * CPU-specific get_info/set_info
599594 **************************************************************************/
r4441r4442
615610      default:                              CPU_GET_INFO_CALL(i8086);            break;
616611   }
617612}
618#endif
619613
620614
621#if (HAS_I80186)
622615/**************************************************************************
623616 * CPU-specific get_info/set_info
624617 **************************************************************************/
r4441r4442
640633      default:                              CPU_GET_INFO_CALL(i8086);            break;
641634   }
642635}
643#endif
644636
645637
646#if (HAS_I80188)
647638/**************************************************************************
648639 * CPU-specific get_info/set_info
649640 **************************************************************************/
r4441r4442
666657      default:                              CPU_GET_INFO_CALL(i8086);            break;
667658   }
668659}
669#endif
src/emu/cpu/v60/v60.h
r4441r4442
8181extern const char *const v60_reg_names[];
8282void v60_stall(const device_config *device);
8383
84#if HAS_V60
8584CPU_GET_INFO( v60 );
8685#define CPU_V60 CPU_GET_INFO_NAME( v60 )
87#endif /* HAS_V60 */
8886
89#if HAS_V70
9087CPU_GET_INFO( v70 );
9188#define CPU_V70 CPU_GET_INFO_NAME( v70 )
92#endif /* HAS_V70 */
9389
9490#endif /* __V60_H__ */
src/emu/cpu/ssp1601/ssp1601.h
r4441r4442
1616   SSP_PR0, SSP_PR1, SSP_PR2, SSP_PR3, SSP_PR4, SSP_PR5, SSP_PR6, SSP_PR7
1717};
1818
19#if (HAS_SSP1601)
2019CPU_GET_INFO( ssp1601 );
2120#define CPU_SSP1601 CPU_GET_INFO_NAME( ssp1601 )
22#endif
2321
2422extern unsigned dasm_ssp1601(char *buffer, unsigned pc, const UINT8 *oprom);
2523
src/emu/cpu/ssp1601/ssp1601.c
r4441r4442
771771   return dasm_ssp1601(buffer, pc, oprom);
772772}
773773
774#if (HAS_SSP1601)
775774
776775static CPU_SET_INFO( ssp1601 )
777776{
r4441r4442
919918      case CPUINFO_STR_REGISTER + SSP_PR7:      sprintf(info->s, "R7  :%02X", ssp1601_state->r[7]);            break;
920919   }
921920}
922#endif
923921
924922// vim:ts=4
925923
src/emu/cpu/tlcs90/tlcs90.c
r4441r4442
13161316      return;
13171317
13181318   for (irq = INT0; irq < INTMAX; irq++)
1319   {
13191320      if ( cpustate->irq_state & cpustate->irq_mask & (1 << irq) )
1321      {
13201322         take_interrupt( cpustate, irq );
1323         return;
1324      }
1325   }
13211326}
13221327
13231328static void set_irq_line(t90_Regs *cpustate, int irq, int state)
src/emu/cpu/e132xs/e132xs.c
r4441r4442
377377#define SAME_SRCF_DST  (decode)->same_srcf_dst
378378
379379// 4Kb IRAM (On-Chip Memory)
380#if (HAS_E116T || HAS_GMS30C2116)
381380
382381static ADDRESS_MAP_START( e116_4k_iram_map, ADDRESS_SPACE_PROGRAM, 16 )
383382   AM_RANGE(0xc0000000, 0xc0000fff) AM_RAM AM_MIRROR(0x1ffff000)
384383ADDRESS_MAP_END
385384
386#endif
387385
388#if (HAS_E132N || HAS_E132T || HAS_GMS30C2132)
389386
390387static ADDRESS_MAP_START( e132_4k_iram_map, ADDRESS_SPACE_PROGRAM, 32 )
391388   AM_RANGE(0xc0000000, 0xc0000fff) AM_RAM AM_MIRROR(0x1ffff000)
392389ADDRESS_MAP_END
393390
394#endif
395391
396392// 8Kb IRAM (On-Chip Memory)
397393
398#if (HAS_E116XT || HAS_GMS30C2216)
399394
400395static ADDRESS_MAP_START( e116_8k_iram_map, ADDRESS_SPACE_PROGRAM, 16 )
401396   AM_RANGE(0xc0000000, 0xc0001fff) AM_RAM AM_MIRROR(0x1fffe000)
402397ADDRESS_MAP_END
403398
404#endif
405399
406#if (HAS_E132XN || HAS_E132XT || HAS_GMS30C2232)
407400
408401static ADDRESS_MAP_START( e132_8k_iram_map, ADDRESS_SPACE_PROGRAM, 32 )
409402   AM_RANGE(0xc0000000, 0xc0001fff) AM_RAM AM_MIRROR(0x1fffe000)
410403ADDRESS_MAP_END
411404
412#endif
413405
414406// 16Kb IRAM (On-Chip Memory)
415407
416#if (HAS_E116XS || HAS_E116XSR)
417408
418409static ADDRESS_MAP_START( e116_16k_iram_map, ADDRESS_SPACE_PROGRAM, 16 )
419410   AM_RANGE(0xc0000000, 0xc0003fff) AM_RAM AM_MIRROR(0x1fffc000)
420411ADDRESS_MAP_END
421412
422#endif
423413
424#if (HAS_E132XS || HAS_E132XSR)
425414
426415static ADDRESS_MAP_START( e132_16k_iram_map, ADDRESS_SPACE_PROGRAM, 32 )
427416   AM_RANGE(0xc0000000, 0xc0003fff) AM_RAM AM_MIRROR(0x1fffc000)
428417ADDRESS_MAP_END
429418
430#endif
431419
432420INLINE hyperstone_state *get_safe_token(const device_config *device)
433421{
r4441r4442
15651553   cpustate->clock_scale_mask = scale_mask;
15661554}
15671555
1568#if (HAS_E116T || HAS_E116XT || HAS_E116XS || HAS_E116XSR || HAS_GMS30C2116 || HAS_GMS30C2216)
15691556static void e116_init(const device_config *device, cpu_irq_callback irqcallback, int scale_mask)
15701557{
15711558   hyperstone_state *cpustate = get_safe_token(device);
15721559   hyperstone_init(device, irqcallback, scale_mask);
15731560   cpustate->opcodexor = 0;
15741561}
1575#endif
15761562
1577#if (HAS_E116T)
15781563static CPU_INIT( e116t )
15791564{
15801565   e116_init(device, irqcallback, 0);
15811566}
1582#endif
15831567
1584#if (HAS_E116XT)
15851568static CPU_INIT( e116xt )
15861569{
15871570   e116_init(device, irqcallback, 3);
15881571}
1589#endif
15901572
1591#if (HAS_E116XS)
15921573static CPU_INIT( e116xs )
15931574{
15941575   e116_init(device, irqcallback, 7);
15951576}
1596#endif
15971577
1598#if (HAS_E116XSR)
15991578static CPU_INIT( e116xsr )
16001579{
16011580   e116_init(device, irqcallback, 7);
16021581}
1603#endif
16041582
1605#if (HAS_GMS30C2116)
16061583static CPU_INIT( gms30c2116 )
16071584{
16081585   e116_init(device, irqcallback, 0);
16091586}
1610#endif
16111587
1612#if (HAS_GMS30C2216)
16131588static CPU_INIT( gms30c2216 )
16141589{
16151590   e116_init(device, irqcallback, 0);
16161591}
1617#endif
16181592
1619#if (HAS_E132N || HAS_E132T || HAS_E132XN || HAS_E132XT || HAS_E132XS || HAS_E132XSR || HAS_GMS30C2132 || HAS_GMS30C2232)
16201593static void e132_init(const device_config *device, cpu_irq_callback irqcallback, int scale_mask)
16211594{
16221595   hyperstone_state *cpustate = get_safe_token(device);
16231596   hyperstone_init(device, irqcallback, scale_mask);
16241597   cpustate->opcodexor = WORD_XOR_BE(0);
16251598}
1626#endif
16271599
1628#if (HAS_E132N)
16291600static CPU_INIT( e132n )
16301601{
16311602   e132_init(device, irqcallback, 0);
16321603}
1633#endif
16341604
1635#if (HAS_E132T)
16361605static CPU_INIT( e132t )
16371606{
16381607   e132_init(device, irqcallback, 0);
16391608}
1640#endif
16411609
1642#if (HAS_E132XN)
16431610static CPU_INIT( e132xn )
16441611{
16451612   e132_init(device, irqcallback, 3);
16461613}
1647#endif
16481614
1649#if (HAS_E132XT)
16501615static CPU_INIT( e132xt )
16511616{
16521617   e132_init(device, irqcallback, 3);
16531618}
1654#endif
16551619
1656#if (HAS_E132XS)
16571620static CPU_INIT( e132xs )
16581621{
16591622   e132_init(device, irqcallback, 7);
16601623}
1661#endif
16621624
1663#if (HAS_E132XSR)
16641625static CPU_INIT( e132xsr )
16651626{
16661627   e132_init(device, irqcallback, 7);
16671628}
1668#endif
16691629
1670#if (HAS_GMS30C2132)
16711630static CPU_INIT( gms30c2132 )
16721631{
16731632   e132_init(device, irqcallback, 0);
16741633}
1675#endif
16761634
1677#if (HAS_GMS30C2232)
16781635static CPU_INIT( gms30c2232 )
16791636{
16801637   e132_init(device, irqcallback, 0);
16811638}
1682#endif
16831639
16841640static CPU_RESET( hyperstone )
16851641{
r4441r4442
51905146}
51915147
51925148
5193#if (HAS_E116T)
51945149CPU_GET_INFO( e116t )
51955150{
51965151   switch (state)
r4441r4442
52115166         CPU_GET_INFO_CALL(hyperstone);
52125167   }
52135168}
5214#endif
52155169
5216#if (HAS_E116XT)
52175170CPU_GET_INFO( e116xt )
52185171{
52195172   switch (state)
r4441r4442
52345187         CPU_GET_INFO_CALL(hyperstone);
52355188   }
52365189}
5237#endif
52385190
5239#if (HAS_E116XS)
52405191CPU_GET_INFO( e116xs )
52415192{
52425193   switch (state)
r4441r4442
52575208         CPU_GET_INFO_CALL(hyperstone);
52585209   }
52595210}
5260#endif
52615211
5262#if (HAS_E116XSR)
52635212CPU_GET_INFO( e116xsr )
52645213{
52655214   switch (state)
r4441r4442
52805229         CPU_GET_INFO_CALL(hyperstone);
52815230   }
52825231}
5283#endif
52845232
5285#if (HAS_E132N)
52865233CPU_GET_INFO( e132n )
52875234{
52885235   switch (state)
r4441r4442
53035250         CPU_GET_INFO_CALL(hyperstone);
53045251   }
53055252}
5306#endif
53075253
5308#if (HAS_E132T)
53095254CPU_GET_INFO( e132t )
53105255{
53115256   switch (state)
r4441r4442
53265271         CPU_GET_INFO_CALL(hyperstone);
53275272   }
53285273}
5329#endif
53305274
5331#if (HAS_E132XN)
53325275CPU_GET_INFO( e132xn )
53335276{
53345277   switch (state)
r4441r4442
53495292         CPU_GET_INFO_CALL(hyperstone);
53505293   }
53515294}
5352#endif
53535295
5354#if (HAS_E132XT)
53555296CPU_GET_INFO( e132xt )
53565297{
53575298   switch (state)
r4441r4442
53725313         CPU_GET_INFO_CALL(hyperstone);
53735314   }
53745315}
5375#endif
53765316
5377#if (HAS_E132XS)
53785317CPU_GET_INFO( e132xs )
53795318{
53805319   switch (state)
r4441r4442
53955334         CPU_GET_INFO_CALL(hyperstone);
53965335   }
53975336}
5398#endif
53995337
5400#if (HAS_E132XSR)
54015338CPU_GET_INFO( e132xsr )
54025339{
54035340   switch (state)
r4441r4442
54185355         CPU_GET_INFO_CALL(hyperstone);
54195356   }
54205357}
5421#endif
54225358
5423#if (HAS_GMS30C2116)
54245359CPU_GET_INFO( gms30c2116 )
54255360{
54265361   switch (state)
r4441r4442
54415376         CPU_GET_INFO_CALL(hyperstone);
54425377   }
54435378}
5444#endif
54455379
5446#if (HAS_GMS30C2132)
54475380CPU_GET_INFO( gms30c2132 )
54485381{
54495382   switch (state)
r4441r4442
54645397         CPU_GET_INFO_CALL(hyperstone);
54655398   }
54665399}
5467#endif
54685400
5469#if (HAS_GMS30C2216)
54705401CPU_GET_INFO( gms30c2216 )
54715402{
54725403   switch (state)
r4441r4442
54875418         CPU_GET_INFO_CALL(hyperstone);
54885419   }
54895420}
5490#endif
54915421
5492#if (HAS_GMS30C2232)
54935422CPU_GET_INFO( gms30c2232 )
54945423{
54955424   switch (state)
r4441r4442
55105439         CPU_GET_INFO_CALL(hyperstone);
55115440   }
55125441}
5513#endif
src/emu/cpu/e132xs/e132xs.h
r4441r4442
2323
2424/* Functions */
2525
26#if (HAS_E116T)
2726CPU_GET_INFO( e116t );
2827#define CPU_E116T CPU_GET_INFO_NAME( e116t )
29#endif
3028
31#if (HAS_E116XT)
3229CPU_GET_INFO( e116xt );
3330#define CPU_E116XT CPU_GET_INFO_NAME( e116xt )
34#endif
3531
36#if (HAS_E116XS)
3732CPU_GET_INFO( e116xs );
3833#define CPU_E116XS CPU_GET_INFO_NAME( e116xs )
39#endif
4034
41#if (HAS_E116XSR)
4235CPU_GET_INFO( e116xsr );
4336#define CPU_E116XSR CPU_GET_INFO_NAME( e116xsr )
44#endif
4537
46#if (HAS_E132N)
4738CPU_GET_INFO( e132n );
4839#define CPU_E132N CPU_GET_INFO_NAME( e132n )
49#endif
5040
51#if (HAS_E132T)
5241CPU_GET_INFO( e132t );
5342#define CPU_E132T CPU_GET_INFO_NAME( e132t )
54#endif
5543
56#if (HAS_E132XN)
5744CPU_GET_INFO( e132xn );
5845#define CPU_E132XN CPU_GET_INFO_NAME( e132xn )
59#endif
6046
61#if (HAS_E132XT)
6247CPU_GET_INFO( e132xt );
6348#define CPU_E132XT CPU_GET_INFO_NAME( e132xt )
64#endif
6549
66#if (HAS_E132XS)
6750CPU_GET_INFO( e132xs );
6851#define CPU_E132XS CPU_GET_INFO_NAME( e132xs )
69#endif
7052
71#if (HAS_E132XSR)
7253CPU_GET_INFO( e132xsr );
7354#define CPU_E132XSR CPU_GET_INFO_NAME( e132xsr )
74#endif
7555
76#if (HAS_GMS30C2116)
7756CPU_GET_INFO( gms30c2116 );
7857#define CPU_GMS30C2116 CPU_GET_INFO_NAME( gms30c2116 )
79#endif
8058
81#if (HAS_GMS30C2132)
8259CPU_GET_INFO( gms30c2132 );
8360#define CPU_GMS30C2132 CPU_GET_INFO_NAME( gms30c2132 )
84#endif
8561
86#if (HAS_GMS30C2216)
8762CPU_GET_INFO( gms30c2216 );
8863#define CPU_GMS30C2216 CPU_GET_INFO_NAME( gms30c2216 )
89#endif
9064
91#if (HAS_GMS30C2232)
9265CPU_GET_INFO( gms30c2232 );
9366#define CPU_GMS30C2232 CPU_GET_INFO_NAME( gms30c2232 )
94#endif
9567
9668extern unsigned dasm_hyperstone(char *buffer, unsigned pc, const UINT8 *oprom, unsigned h_flag, int private_fp);
9769
src/emu/cpu/i386/i386.c
r4441r4442
10621062/*****************************************************************************/
10631063/* Intel 486 */
10641064
1065#if (HAS_I486)
10661065
10671066static CPU_INIT( i486 )
10681067{
r4441r4442
11701169      default:                               CPU_GET_INFO_CALL(i386);             break;
11711170   }
11721171}
1173#endif
11741172
11751173/*****************************************************************************/
11761174/* Pentium */
11771175
1178#if (HAS_PENTIUM)
11791176
11801177static CPU_INIT( pentium )
11811178{
r4441r4442
13031300      default:                               CPU_GET_INFO_CALL(i386);             break;
13041301   }
13051302}
1306#endif
13071303
13081304/*****************************************************************************/
13091305/* Cyrix MediaGX */
13101306
1311#if (HAS_MEDIAGX)
13121307
13131308static CPU_INIT( mediagx )
13141309{
r4441r4442
14361431      default:                               CPU_GET_INFO_CALL(i386);             break;
14371432   }
14381433}
1439#endif
src/emu/cpu/m6502/6502dasm.c
r4441r4442
2929
3030#include "debugger.h"
3131#include "m6502.h"
32#if (HAS_M65CE02)
3332#include "m65ce02.h"
34#endif
35#if (HAS_M6509)
3633#include "m6509.h"
37#endif
38#if (HAS_M4510)
3934#include "m4510.h"
40#endif
4135
4236enum addr_mode {
4337   non,   /* no additional arguments */
r4441r4442
341335   {ill,non},{sbc,abx},{inc,abx},{bbs,zpb}
342336};
343337
344#if (HAS_M65CE02)
345338static const struct op6502_info op65ce02[256] = {
346339   {m6502_brk,imm},{ora,idx},{cle,imp},{see,imp},/* 00 */
347340   {tsb,zpg},{ora,zpg},{asl,zpg},{rmb,zpg},
r4441r4442
408401   {sed,imp},{sbc,aby},{plx,imp},{plz,imp},
409402   {phw,aba},{sbc,abx},{inc,abx},{bbs,zpb}
410403};
411#endif
412404
413#if (HAS_M4510)
414405// only map instead of aug and 20 bit memory management
415406static const struct op6502_info op4510[256] = {
416407   {m6502_brk,imm},{ora,idx},{cle,imp},{see,imp},/* 00 */
r4441r4442
478469   {sed,imp},{sbc,aby},{plx,imp},{plz,imp},
479470   {phw,aba},{sbc,abx},{inc,abx},{bbs,zpb}
480471};
481#endif
482472
483#if (HAS_DECO16)
484473static const struct op6502_info opdeco16[256] =
485474{
486475   {m6502_brk,imp},{ora,idx},{ill,non},{ill,non},/* 00 */
r4441r4442
548537   {sed,imp},{sbc,aby},{ill,non},{ill,non},
549538   {ill,non},{sbc,abx},{inc,abx},{ill,non}
550539};
551#endif
552540
553541/*****************************************************************************
554542 * Disassemble a single opcode starting at pc
r4441r4442
747735   return internal_m6502_dasm(op6502, buffer, pc, oprom, opram);
748736}
749737
750#if (HAS_M65SC02)
751738CPU_DISASSEMBLE( m65sc02 )
752739{
753740   return internal_m6502_dasm(op65sc02, buffer, pc, oprom, opram);
754741}
755#endif
756742
757#if (HAS_M65C02||HAS_M65SC02||HAS_DECO16)
758743CPU_DISASSEMBLE( m65c02 )
759744{
760745   return internal_m6502_dasm(op65c02, buffer, pc, oprom, opram);
761746}
762#endif
763747
764#if (HAS_M65CE02)
765748CPU_DISASSEMBLE( m65ce02 )
766749{
767750   return internal_m6502_dasm(op65ce02, buffer, pc, oprom, opram);
768751}
769#endif
770752
771#if (HAS_M6510)
772753CPU_DISASSEMBLE( m6510 )
773754{
774755   return internal_m6502_dasm(op6502, buffer, pc, oprom, opram);
775756}
776#endif
777757
778#if (HAS_DECO16)
779758CPU_DISASSEMBLE( deco16 )
780759{
781760   return internal_m6502_dasm(opdeco16, buffer, pc, oprom, opram);
782761}
783#endif
784762
785#if (HAS_M4510)
786763CPU_DISASSEMBLE( m4510 )
787764{
788765   return internal_m6502_dasm(op4510, buffer, pc, oprom, opram);
789766}
790#endif
src/emu/cpu/m6502/m6502.c
r4441r4442
2424/* 10.March   2000 PeT added 6502 set overflow input line */
2525/* 13.September 2000 PeT N2A03 jmp indirect */
2626
27#if ((HAS_M65SC02 || HAS_DECO16) && !HAS_M65C02)
28#undef HAS_M65C02
29#define HAS_M65C02 1
30#endif
31
3227#include "debugger.h"
3328#include "m6502.h"
3429#include "ops02.h"
r4441r4442
8277   m6502_read_indexed_func rdmem_id;               /* readmem callback for indexed instructions */
8378   m6502_write_indexed_func wrmem_id;               /* writemem callback for indexed instructions */
8479
85#if (HAS_M6510) || (HAS_M6510T) || (HAS_M8502) || (HAS_M7501)
8680   UINT8    ddr;
8781   UINT8    port;
8882   m6510_port_read_func port_read;
8983   m6510_port_write_func port_write;
90#endif
91
9284};
9385
9486INLINE m6502_Regs *get_safe_token(const device_config *device)
r4441r4442
116108 ***************************************************************/
117109#include "t6502.c"
118110
119#if (HAS_M6510)
120111#include "t6510.c"
121#endif
122112
123113#include "opsn2a03.h"
124114
125#if (HAS_N2A03)
126115#include "tn2a03.c"
127#endif
128116
129117#include "opsc02.h"
130118
131#if (HAS_M65C02)
132119#include "t65c02.c"
133#endif
134120
135#if (HAS_M65SC02)
136121#include "t65sc02.c"
137#endif
138122
139#if (HAS_DECO16)
140123#include "tdeco16.c"
141#endif
142124
143125/*****************************************************************************
144126 *
r4441r4442
170152   state_save_register_device_item(device, 0, cpustate->irq_state);
171153   state_save_register_device_item(device, 0, cpustate->so_state);
172154
173#if (HAS_M6510) || (HAS_M6510T) || (HAS_M8502) || (HAS_M7501)
174155   if (subtype == SUBTYPE_6510)
175156   {
176157      state_save_register_device_item(device, 0, cpustate->port);
177158      state_save_register_device_item(device, 0, cpustate->ddr);
178159   }
179#endif
180160}
181161
182162static CPU_INIT( m6502 )
r4441r4442
325305/****************************************************************************
326306 * 2A03 section
327307 ****************************************************************************/
328#if (HAS_N2A03)
329308
330309static CPU_INIT( n2a03 )
331310{
r4441r4442
342321
343322   m6502_take_irq(cpustate);
344323}
345#endif
346324
347325
348326/****************************************************************************
349327 * 6510 section
350328 ****************************************************************************/
351#if (HAS_M6510)
352329
353330static CPU_INIT( m6510 )
354331{
r4441r4442
410387   AM_RANGE(0x0000, 0x0001) AM_READWRITE(m6510_read_0000, m6510_write_0000)
411388ADDRESS_MAP_END
412389
413#endif
414390
415391
416392/****************************************************************************
417393 * 65C02 section
418394 ****************************************************************************/
419#if (HAS_M65C02)
420395
421396static CPU_INIT( m65c02 )
422397{
r4441r4442
518493   else
519494      m6502_set_irq_line(cpustate, irqline,state);
520495}
521#endif
522496
523497/****************************************************************************
524498 * 65SC02 section
525499 ****************************************************************************/
526#if (HAS_M65SC02)
527500static CPU_INIT( m65sc02 )
528501{
529502   m6502_common_init(device, irqcallback, SUBTYPE_65SC02, insn65sc02, "m65sc02");
530503}
531#endif
532504
533505/****************************************************************************
534506 * DECO16 section
535507 ****************************************************************************/
536#if (HAS_DECO16)
537508
538509static CPU_INIT( deco16 )
539510{
r4441r4442
665636   return cycles - cpustate->icount;
666637}
667638
668#endif
669639
670640
671641
r4441r4442
796766}
797767
798768
799#if (HAS_N2A03)
800769/**************************************************************************
801770 * CPU-specific set_info
802771 **************************************************************************/
r4441r4442
814783      default:                              CPU_GET_INFO_CALL(m6502);         break;
815784   }
816785}
817#endif
818786
819787
820#if (HAS_M6510) || (HAS_M6510T) || (HAS_M8502) || (HAS_M7501)
821788/**************************************************************************
822789 * CPU-specific set_info
823790 **************************************************************************/
r4441r4442
860827      default:                              CPU_GET_INFO_CALL(m6502);         break;
861828   }
862829}
863#endif
864830
865831
866#if (HAS_M6510T)
867832/**************************************************************************
868833 * CPU-specific set_info
869834 **************************************************************************/
r4441r4442
878843      default:                              CPU_GET_INFO_CALL(m6510);         break;
879844   }
880845}
881#endif
882846
883847
884#if (HAS_M7501)
885848/**************************************************************************
886849 * CPU-specific set_info
887850 **************************************************************************/
r4441r4442
896859      default:                              CPU_GET_INFO_CALL(m6510);         break;
897860   }
898861}
899#endif
900862
901863
902#if (HAS_M8502)
903864/**************************************************************************
904865 * CPU-specific set_info
905866 **************************************************************************/
r4441r4442
914875      default:                              CPU_GET_INFO_CALL(m6510);         break;
915876   }
916877}
917#endif
918878
919879
920#if (HAS_M65C02)
921880/**************************************************************************
922881 * CPU-specific set_info
923882 **************************************************************************/
r4441r4442
952911      default:                              CPU_GET_INFO_CALL(m6502);         break;
953912   }
954913}
955#endif
956914
957915
958#if (HAS_M65SC02)
959916/**************************************************************************
960917 * CPU-specific set_info
961918 **************************************************************************/
r4441r4442
978935      default:                              CPU_GET_INFO_CALL(m65c02);         break;
979936   }
980937}
981#endif
982938
983939
984#if (HAS_DECO16)
985940/**************************************************************************
986941 * CPU-specific set_info
987942 **************************************************************************/
r4441r4442
1026981      default:                              CPU_GET_INFO_CALL(m6502);         break;
1027982   }
1028983}
1029#endif
src/emu/cpu/m6502/m6502.h
r4441r4442
3333#define FAST_MEMORY 0
3434
3535#define SUBTYPE_6502   0
36#if (HAS_M65C02)
3736#define SUBTYPE_65C02   1
38#endif
39#if (HAS_M6510)
4037#define SUBTYPE_6510   2
41#endif
42#if (HAS_N2A03)
4338#define SUBTYPE_2A03   3
44#endif
45#if (HAS_M65SC02)
4639#define SUBTYPE_65SC02   4
47#endif
48#if (HAS_DECO16)
4940#define SUBTYPE_DECO16   5
50#endif
5141
5242enum
5343{
r4441r4442
8676/****************************************************************************
8777 * The 6510
8878 ****************************************************************************/
89#if (HAS_M6510)
9079#define M6510_A                   M6502_A
9180#define M6510_X                   M6502_X
9281#define M6510_Y                   M6502_Y
r4441r4442
10594
10695extern CPU_DISASSEMBLE( m6510 );
10796
108#endif
10997
110#if (HAS_M6510T)
11198#define M6510T_A                  M6502_A
11299#define M6510T_X                  M6502_X
113100#define M6510T_Y                  M6502_Y
r4441r4442
124111extern CPU_GET_INFO( m6510t );
125112#define CPU_M6510T CPU_GET_INFO_NAME( m6510t )
126113
127#endif
128114
129#if (HAS_M7501)
130115#define M7501_A                   M6502_A
131116#define M7501_X                   M6502_X
132117#define M7501_Y                   M6502_Y
r4441r4442
142127
143128extern CPU_GET_INFO( m7501 );
144129#define CPU_M7501 CPU_GET_INFO_NAME( m7501 )
145#endif
146130
147#if (HAS_M8502)
148131#define M8502_A                   M6502_A
149132#define M8502_X                   M6502_X
150133#define M8502_Y                   M6502_Y
r4441r4442
160143
161144extern CPU_GET_INFO( m8502 );
162145#define CPU_M8502 CPU_GET_INFO_NAME( m8502 )
163#endif
164146
165147
166148/****************************************************************************
167149 * The 2A03 (NES 6502 without decimal mode ADC/SBC)
168150 ****************************************************************************/
169#if (HAS_N2A03)
170151#define N2A03_A                   M6502_A
171152#define N2A03_X                   M6502_X
172153#define N2A03_Y                   M6502_Y
r4441r4442
190171   causes an IRQ to be generated.  This function allows the IRQ to be called
191172   from the PSG core when such an occasion arises. */
192173extern void n2a03_irq(const device_config *device);
193#endif
194174
195175
196176/****************************************************************************
197177 * The 65C02
198178 ****************************************************************************/
199#if (HAS_M65C02)
200179#define M65C02_A                  M6502_A
201180#define M65C02_X                  M6502_X
202181#define M65C02_Y                  M6502_Y
r4441r4442
215194
216195extern CPU_DISASSEMBLE( m65c02 );
217196
218#endif
219197
220198/****************************************************************************
221199 * The 65SC02
222200 ****************************************************************************/
223#if (HAS_M65SC02)
224201#define M65SC02_A                  M6502_A
225202#define M65SC02_X                  M6502_X
226203#define M65SC02_Y                  M6502_Y
r4441r4442
238215#define CPU_M65SC02 CPU_GET_INFO_NAME( m65sc02 )
239216
240217extern CPU_DISASSEMBLE( m65sc02 );
241#endif
242218
243219/****************************************************************************
244220 * The DECO CPU16
245221 ****************************************************************************/
246#if (HAS_DECO16)
247222#define DECO16_A                  M6502_A
248223#define DECO16_X                  M6502_X
249224#define DECO16_Y                  M6502_Y
r4441r4442
259234
260235extern CPU_GET_INFO( deco16 );
261236#define CPU_DECO16 CPU_GET_INFO_NAME( deco16 )
262#endif
263237
264238extern CPU_DISASSEMBLE( deco16 );
265239
src/emu/cpu/sh4/sh4.c
r4441r4442
15461546/*  SLEEP */
15471547INLINE void SLEEP(SH4 *sh4)
15481548{
1549   sh4->pc -= 2;
1549   /* 0 = normal mode */
1550   /* 1 = enters into power-down mode */
1551   /* 2 = go out the power-down mode after an exception */
1552   if(sh4->sleep_mode != 2)
1553      sh4->pc -= 2;
15501554   sh4->sh4_icount -= 2;
15511555   /* Wait_for_exception; */
1556   if(sh4->sleep_mode == 0)
1557      sh4->sleep_mode = 1;
1558   else if(sh4->sleep_mode == 2)
1559      sh4->sleep_mode = 0;
15521560}
15531561
15541562/*  STC     SR,Rn */
r4441r4442
20702078   sh4->spc = sh4->r[m];
20712079}
20722080
2081UINT32 sh4_getsqremap(SH4 *sh4, UINT32 address)
2082{
2083   if (!sh4->sh4_mmu_enabled)
2084      return address;
2085   else
2086   {
2087      int i;
2088      UINT32 topaddr = address&0xfff00000;
2089
2090      for (i=0;i<64;i++)
2091      {
2092         UINT32 topcmp = sh4->sh4_tlb_address[i]&0xfff00000;
2093         if (topcmp==topaddr)
2094            return (address&0x000fffff) | ((sh4->sh4_tlb_data[i])&0xfff00000);
2095      }
2096
2097   }
2098
2099   return address;
2100}
2101
20732102/*  PREF     @Rn */
20742103INLINE void PREFM(SH4 *sh4, UINT32 n)
20752104{
2076int a;
2077UINT32 addr,dest,sq;
2105   int a;
2106   UINT32 addr,dest,sq;
20782107
20792108   addr = sh4->r[n]; // address
20802109   if ((addr >= 0xE0000000) && (addr <= 0xE3FFFFFF))
20812110   {
2082      sq = (addr & 0x20) >> 5;
2083      dest = addr & 0x03FFFFE0;
2084      if (sq == 0)
2085         dest |= (sh4->m[QACR0] & 0x1C) << 24;
2111      if (sh4->sh4_mmu_enabled)
2112      {
2113         addr = addr & 0xFFFFFFE0;
2114         dest = sh4_getsqremap(sh4, addr); // good enough for naomi-gd rom, probably not much else
2115
2116      }
20862117      else
2087         dest |= (sh4->m[QACR1] & 0x1C) << 24;
2088      addr = addr & 0xFFFFFFE0;
2118      {
2119         sq = (addr & 0x20) >> 5;
2120         dest = addr & 0x03FFFFE0;
2121         if (sq == 0)
2122            dest |= (sh4->m[QACR0] & 0x1C) << 24;
2123         else
2124            dest |= (sh4->m[QACR1] & 0x1C) << 24;
2125         addr = addr & 0xFFFFFFE0;
2126      }
2127
20892128      for (a = 0;a < 4;a++)
20902129      {
2130         // shouldn't be causing a memory read, should store sq writes in registers.
20912131         memory_write_qword_64le(sh4->program, dest, memory_read_qword_64le(sh4->program, addr));
20922132         addr += 8;
20932133         dest += 8;
r4441r4442
33173357
33183358   sh4->internal_irq_level = -1;
33193359   sh4->irln = 15;
3360   sh4->sleep_mode = 0;
3361
3362   sh4->sh4_mmu_enabled = 0;
33203363}
33213364
33223365/* Execute cycles - returns number of cycles actually run */
r4441r4442
36223665ADDRESS_MAP_END
36233666#endif
36243667
3668
3669READ64_HANDLER( sh4_tlb_r )
3670{
3671   SH4 *sh4 = get_safe_token(space->cpu);
3672
3673   int offs = offset*8;
3674
3675   if (offs >= 0x01000000)
3676   {
3677      UINT8 i = (offs>>8)&63;
3678      return sh4->sh4_tlb_data[i];
3679   }
3680   else
3681   {
3682      UINT8 i = (offs>>8)&63;
3683      return sh4->sh4_tlb_address[i];
3684   }
3685}
3686
3687WRITE64_HANDLER( sh4_tlb_w )
3688{
3689   SH4 *sh4 = get_safe_token(space->cpu);
3690
3691   int offs = offset*8;
3692
3693   if (offs >= 0x01000000)
3694   {
3695      UINT8 i = (offs>>8)&63;
3696      sh4->sh4_tlb_data[i]  = data&0xffffffff;
3697   }
3698   else
3699   {
3700      UINT8 i = (offs>>8)&63;
3701      sh4->sh4_tlb_address[i] = data&0xffffffff;
3702   }
3703}
3704
36253705/*When OC index mode is on (CCR.OIX = 1)*/
36263706static ADDRESS_MAP_START( sh4_internal_map, ADDRESS_SPACE_PROGRAM, 64 )
36273707   AM_RANGE(0x1C000000, 0x1C000FFF) AM_RAM AM_MIRROR(0x01FFF000)
36283708   AM_RANGE(0x1E000000, 0x1E000FFF) AM_RAM AM_MIRROR(0x01FFF000)
3629   AM_RANGE(0xE0000000, 0xE000003F) AM_RAM AM_MIRROR(0x03FFFFC0)
3709   AM_RANGE(0xE0000000, 0xE000003F) AM_RAM AM_MIRROR(0x03FFFFC0) // todo: store queues should be write only on DC's SH4, executing PREFM shouldn't cause an actual memory read access!
3710   AM_RANGE(0xF6000000, 0xF7FFFFFF) AM_READWRITE(sh4_tlb_r,sh4_tlb_w)
36303711ADDRESS_MAP_END
36313712
36323713
src/emu/cpu/sh4/sh4comn.h
r4441r4442
3737#define FP_XFS2(r) *( (float  *)(sh4->xf+((r) ^ sh4->fpu_pr)) )
3838#endif
3939
40
4041typedef struct
4142{
4243   UINT32   ppc;
r4441r4442
6869   UINT32   *m;
6970   INT8   nmi_line_state;
7071
72   UINT8 sleep_mode;
73
7174   int      frt_input;
7275   int      irln;
7376   int    internal_irq_level;
r4441r4442
8891   int      ioport4_pullup, ioport4_direction;
8992
9093   void   (*ftcsr_read_callback)(UINT32 data);
94
95
96   /* This MMU simulation is good for the simple remap used on Naomi GD-ROM SQ access *ONLY* */
97   UINT32 sh4_tlb_address[64];
98   UINT32 sh4_tlb_data[64];
99   UINT8 sh4_mmu_enabled;
100
91101} SH4;
92102
93103enum
src/emu/cpu/sh4/sh4comn.c
r4441r4442
212212
213213   /* fetch PC */
214214   sh4->pc = sh4->vbr + vector;
215   /* wake up if a sleep opcode is triggered */
216   if(sh4->sleep_mode == 1) { sh4->sleep_mode = 2; }
215217}
216218
217219static UINT32 compute_ticks_refresh_timer(emu_timer *timer, int hertz, int base, int divisor)
r4441r4442
641643
642644   switch( offset )
643645   {
646   case MMUCR: // MMU Control
647      if (data & 1)
648      {
649         printf("SH4 MMU Enabled\n");
650         printf("If you're seeing this, but running something other than a Naomi GD-ROM game then chances are it won't work\n");
651         printf("The MMU emulation is a hack specific to that system\n");
652         sh4->sh4_mmu_enabled = 1;
653
654         // should be a different bit!
655         {
656            int i;
657            for (i=0;i<64;i++)
658            {
659               sh4->sh4_tlb_address[i] = 0;
660               sh4->sh4_tlb_data[i] = 0;
661            }
662
663         }
664      }
665      else
666      {
667         sh4->sh4_mmu_enabled = 0;
668      }
669
670      break;
671
644672      // Memory refresh
645673   case RTCSR:
646674      sh4->m[RTCSR] &= 255;
src/emu/cpu/tms32051/tms32051.c
r4441r4442
679679   }
680680}
681681
682#if (HAS_TMS32051)
683682static CPU_SET_INFO( tms32051 )
684683{
685684   tms32051_state *cpustate = get_safe_token(device);
r4441r4442
732731      default:                              CPU_GET_INFO_CALL(tms);            break;
733732   }
734733}
735#endif
src/emu/cpu/tms32051/tms32051.h
r4441r4442
33#ifndef __TMS32051_H__
44#define __TMS32051_H__
55
6#if (HAS_TMS32051)
76CPU_GET_INFO( tms32051 );
87#define CPU_TMS32051 CPU_GET_INFO_NAME( tms32051 )
9#endif
108
119CPU_DISASSEMBLE( tms32051 );
1210
src/emu/cpu/alph8201/alph8201.c
r4441r4442
525525static void jc(alpha8201_state *cpustate)   { UINT8 i=M_RDMEM_OPCODE(cpustate); if ( cpustate->cf) M_JMP(cpustate, i);}
526526static void jmp(alpha8201_state *cpustate)   { M_JMP(cpustate,  M_RDMEM_OPCODE(cpustate) ); }
527527
528#if (HAS_ALPHA8201)
529528static const s_opcode opcode_8201[256]=
530529{
531530   {C1, nop        },{C1,rora      },{C1, rola      },{C1,inc_b     },{C1,dec_b     },{C1, inc_a    },{C1, dec_a    },{C1, cpl      },
r4441r4442
566565   {C1, undefined   },{C1, undefined},{C1, undefined},{C1, undefined},{C1, undefined},{C1, undefined},{C1, undefined},{C1, undefined},
567566   {C1, undefined   },{C1, undefined},{C1, undefined},{C1, undefined},{C1, undefined},{C1, undefined},{C1, undefined},{C1, undefined }
568567};
569#endif
570568
571#if (HAS_ALPHA8301)
572569
573570/* ALPHA 8301 : added instruction */
574571static void exg_a_ix0(alpha8201_state *cpustate)  { UINT8 t=cpustate->A; cpustate->A = cpustate->IX0; cpustate->IX0 = t; }
r4441r4442
663660   {C1,exg_ix0_ix1},{C1,exg_ix0_ix2},{C1,op_rep_ld_ix2_b},{C1, op_rep_ld_b_ix0},{C1, save_zc},{C1, rest_zc},{C1, ld_rxb_a },{C1, ld_a_rxb },
664661   {C1, cmp_a_rxb },{C1, xor_a_rxb},{C1, add_a_cf },{C1, sub_a_cf },{C1, tst_a    },{C1, clr_a    },{C1, ld_a_ix0_a},{C1, ret     }
665662};
666#endif
667663
668664/****************************************************************************
669665 * Initialize emulation
r4441r4442
814810   return cycles - cpustate->icount;
815811}
816812
817#if (HAS_ALPHA8201)
818813static CPU_EXECUTE( alpha8201 ) { return alpha8xxx_execute(device,opcode_8201,cycles); }
819#endif
820814
821#if (HAS_ALPHA8301)
822815static CPU_EXECUTE( ALPHA8301 ) { return alpha8xxx_execute(device,opcode_8301,cycles); }
823#endif
824816
825817/****************************************************************************
826818 * Set IRQ line state
r4441r4442
980972      case CPUINFO_STR_REGISTER + ALPHA8201_R7:      sprintf(info->s, "R7:%02X", RD_REG(7));      break;
981973   }
982974}
983#if (HAS_ALPHA8201)
984975CPU_GET_INFO( alpha8201 )
985976{
986977   switch (state)
r4441r4442
992983      CPU_GET_INFO_CALL(alpha8xxx);
993984   }
994985}
995#endif
996986
997#if (HAS_ALPHA8301)
998987CPU_GET_INFO( alpha8301 )
999988{
1000989   switch (state)
r4441r4442
1006995      CPU_GET_INFO_CALL(alpha8xxx);
1007996   }
1008997}
1009#endif
src/emu/cpu/nec/nec.c
r4441r4442
11391139    8-bit memory accessors
11401140 *****************************************************************************/
11411141
1142#if (HAS_V20||HAS_V25)
11431142static void configure_memory_8bit(nec_state_t *nec_state)
11441143{
11451144   nec_state->mem.fetch_xor = 0;
r4441r4442
11491148   nec_state->mem.wbyte = memory_write_byte_8le;
11501149   nec_state->mem.wword = memory_write_word_8le;
11511150}
1152#endif
11531151
11541152
11551153/*****************************************************************************
11561154    16-bit memory accessors
11571155 *****************************************************************************/
11581156
1159#if (HAS_V30||HAS_V33||HAS_V35)
11601157static UINT16 read_word_16le(const address_space *space, offs_t addr)
11611158{
11621159   if (!(addr & 1))
r4441r4442
11881185   nec_state->mem.wbyte = memory_write_byte_16le;
11891186   nec_state->mem.wword = write_word_16le;
11901187}
1191#endif
11921188
11931189static CPU_EXECUTE( necv )
11941190{
r4441r4442
12201216}
12211217
12221218/* Wrappers for the different CPU types */
1223#if (HAS_V20||HAS_V25)
12241219static CPU_INIT( v20 )
12251220{
12261221   nec_state_t *nec_state = get_safe_token(device);
r4441r4442
12311226   nec_state->prefetch_size = 4;      /* 3 words */
12321227   nec_state->prefetch_cycles = 4;      /* four cycles per byte */
12331228}
1234#endif
12351229
1236#if (HAS_V30||HAS_V35)
12371230static CPU_INIT( v30 )
12381231{
12391232   nec_state_t *nec_state = get_safe_token(device);
r4441r4442
12451238   nec_state->prefetch_cycles = 2;      /* two cycles per byte / four per word */
12461239
12471240}
1248#endif
12491241
1250#if (HAS_V33)
12511242static CPU_INIT( v33 )
12521243{
12531244   nec_state_t *nec_state = get_safe_token(device);
r4441r4442
12621253
12631254   configure_memory_16bit(nec_state);
12641255}
1265#endif
12661256
12671257
12681258
r4441r4442
14411431}
14421432
14431433
1444#if (HAS_V20)
14451434/**************************************************************************
14461435 * CPU-specific set_info
14471436 **************************************************************************/
r4441r4442
14631452      default:                              CPU_GET_INFO_CALL(nec);            break;
14641453   }
14651454}
1466#endif
14671455
14681456
1469#if (HAS_V25)
14701457/**************************************************************************
14711458 * CPU-specific set_info
14721459 **************************************************************************/
r4441r4442
14881475      default:                              CPU_GET_INFO_CALL(nec);            break;
14891476   }
14901477}
1491#endif
14921478
14931479
1494#if (HAS_V30)
14951480/**************************************************************************
14961481 * CPU-specific set_info
14971482 **************************************************************************/
r4441r4442
15091494      default:                              CPU_GET_INFO_CALL(nec);            break;
15101495   }
15111496}
1512#endif
15131497
15141498
1515#if (HAS_V33)
15161499/**************************************************************************
15171500 * CPU-specific set_info
15181501 **************************************************************************/
r4441r4442
15301513      default:                              CPU_GET_INFO_CALL(nec);            break;
15311514   }
15321515}
1533#endif
15341516
15351517
1536#if (HAS_V35)
15371518/**************************************************************************
15381519 * CPU-specific set_info
15391520 **************************************************************************/
r4441r4442
15511532      default:                              CPU_GET_INFO_CALL(nec);            break;
15521533   }
15531534}
1554#endif
src/emu/cpu/mips/mips3.h
r4441r4442
229229void mips3drc_add_fastram(const device_config *device, offs_t start, offs_t end, UINT8 readonly, void *base);
230230void mips3drc_add_hotspot(const device_config *device, offs_t pc, UINT32 opcode, UINT32 cycles);
231231
232#if (HAS_VR4300)
233232CPU_GET_INFO( vr4300be );
234233CPU_GET_INFO( vr4300le );
235234#define CPU_VR4300BE CPU_GET_INFO_NAME( vr4300be )
r4441r4442
238237CPU_GET_INFO( vr4310le );
239238#define CPU_VR4310BE CPU_GET_INFO_NAME( vr4310be )
240239#define CPU_VR4310LE CPU_GET_INFO_NAME( vr4310le )
241#endif
242240
243#if (HAS_R4600)
244241CPU_GET_INFO( r4600be );
245242#define CPU_R4600BE CPU_GET_INFO_NAME( r4600be )
246243CPU_GET_INFO( r4600le );
247244#define CPU_R4600LE CPU_GET_INFO_NAME( r4600le )
248#endif
249245
250#if (HAS_R4650)
251246CPU_GET_INFO( r4650be);
252247#define CPU_R4650BE CPU_GET_INFO_NAME( r4650be )
253248CPU_GET_INFO( r4650le);
254249#define CPU_R4650LE CPU_GET_INFO_NAME( r4650le )
255#endif
256250
257#if (HAS_R4700)
258251CPU_GET_INFO( r4700be );
259252#define CPU_R4700BE CPU_GET_INFO_NAME( r4700be )
260253CPU_GET_INFO( r4700le );
261254#define CPU_R4700LE CPU_GET_INFO_NAME( r4700le )
262#endif
263255
264#if (HAS_R5000)
265256CPU_GET_INFO( r5000be );
266257#define CPU_R5000BE CPU_GET_INFO_NAME( r5000be )
267258CPU_GET_INFO( r5000le );
268259#define CPU_R5000LE CPU_GET_INFO_NAME( r5000le )
269#endif
270260
271#if (HAS_QED5271)
272261CPU_GET_INFO( qed5271be );
273262#define CPU_QED5271BE CPU_GET_INFO_NAME( qed5271be )
274263CPU_GET_INFO( qed5271le );
275264#define CPU_QED5271LE CPU_GET_INFO_NAME( qed5271le )
276#endif
277265
278#if (HAS_RM7000)
279266CPU_GET_INFO( rm7000be );
280267#define CPU_RM7000BE CPU_GET_INFO_NAME( rm7000be )
281268CPU_GET_INFO( rm7000le );
282269#define CPU_RM7000LE CPU_GET_INFO_NAME( rm7000le )
283#endif
284270
285271
286272
src/emu/cpu/mips/psx.c
r4441r4442
64156415}
64166416
64176417
6418#if (HAS_CXD8661R)
64196418
64206419CPU_GET_INFO( cxd8661r )
64216420{
r4441r4442
64326431   }
64336432}
64346433
6435#endif
src/emu/cpu/mips/mips3drc.c
r4441r4442
36763676***************************************************************************/
36773677
36783678// NEC VR4300 series is MIPS III with 32-bit address bus and slightly custom COP0/TLB
3679#if (HAS_VR4300)
36803679static CPU_INIT( vr4300be )
36813680{
36823681   mips3_init(MIPS3_TYPE_VR4300, TRUE, device, irqcallback);
r4441r4442
37593758      default:                              CPU_GET_INFO_CALL(mips3);         break;
37603759   }
37613760}
3762#endif
37633761
37643762
37653763/***************************************************************************
37663764    R4600 VARIANTS
37673765***************************************************************************/
37683766
3769#if (HAS_R4600)
37703767static CPU_INIT( r4600be )
37713768{
37723769   mips3_init(MIPS3_TYPE_R4600, TRUE, device, irqcallback);
r4441r4442
38123809      default:                              CPU_GET_INFO_CALL(mips3);         break;
38133810   }
38143811}
3815#endif
38163812
38173813
38183814
r4441r4442
38203816    R4650 VARIANTS
38213817***************************************************************************/
38223818
3823#if (HAS_R4650)
38243819static CPU_INIT( r4650be )
38253820{
38263821   mips3_init(MIPS3_TYPE_R4650, TRUE, device, irqcallback);
r4441r4442
38663861      default:                              CPU_GET_INFO_CALL(mips3);         break;
38673862   }
38683863}
3869#endif
38703864
38713865
38723866
r4441r4442
38743868    R4700 VARIANTS
38753869***************************************************************************/
38763870
3877#if (HAS_R4700)
38783871static CPU_INIT( r4700be )
38793872{
38803873   mips3_init(MIPS3_TYPE_R4700, TRUE, device, irqcallback);
r4441r4442
39203913      default:                              CPU_GET_INFO_CALL(mips3);         break;
39213914   }
39223915}
3923#endif
39243916
39253917
39263918
r4441r4442
39283920    R5000 VARIANTS
39293921***************************************************************************/
39303922
3931#if (HAS_R5000)
39323923static CPU_INIT( r5000be )
39333924{
39343925   mips3_init(MIPS3_TYPE_R5000, TRUE, device, irqcallback);
r4441r4442
39743965      default:                              CPU_GET_INFO_CALL(mips3);         break;
39753966   }
39763967}
3977#endif
39783968
39793969
39803970
r4441r4442
39823972    QED5271 VARIANTS
39833973***************************************************************************/
39843974
3985#if (HAS_QED5271)
39863975static CPU_INIT( qed5271be )
39873976{
39883977   mips3_init(MIPS3_TYPE_QED5271, TRUE, device, irqcallback);
r4441r4442
40284017      default:                              CPU_GET_INFO_CALL(mips3);         break;
40294018   }
40304019}
4031#endif
40324020
40334021
40344022
r4441r4442
40364024    RM7000 VARIANTS
40374025***************************************************************************/
40384026
4039#if (HAS_RM7000)
40404027static CPU_INIT( rm7000be )
40414028{
40424029   mips3_init(MIPS3_TYPE_RM7000, TRUE, device, irqcallback);
r4441r4442
40824069      default:                              CPU_GET_INFO_CALL(mips3);         break;
40834070   }
40844071}
4085#endif
src/emu/cpu/mips/mips3.c
r4441r4442
21342134    R4600 VARIANTS
21352135***************************************************************************/
21362136
2137#if (HAS_R4600)
21382137static CPU_INIT( r4600be )
21392138{
21402139   size_t memsize = mips3com_init(&mips3.core, MIPS3_TYPE_R4600, TRUE, device, index, clock, irqcallback, NULL);
r4441r4442
21842183      default:                              CPU_GET_INFO_CALL(mips3);         break;
21852184   }
21862185}
2187#endif
21882186
21892187
21902188
r4441r4442
21922190    R4650 VARIANTS
21932191***************************************************************************/
21942192
2195#if (HAS_R4650)
21962193static CPU_INIT( r4650be )
21972194{
21982195   size_t memsize = mips3com_init(&mips3.core, MIPS3_TYPE_R4650, TRUE, device, index, clock, irqcallback, NULL);
r4441r4442
22422239      default:                              CPU_GET_INFO_CALL(mips3);         break;
22432240   }
22442241}
2245#endif
22462242
22472243
22482244
r4441r4442
22502246    R4700 VARIANTS
22512247***************************************************************************/
22522248
2253#if (HAS_R4700)
22542249static CPU_INIT( r4700be )
22552250{
22562251   size_t memsize = mips3com_init(&mips3.core, MIPS3_TYPE_R4700, TRUE, device, index, clock, irqcallback, NULL);
r4441r4442
23012296      default:                              CPU_GET_INFO_CALL(mips3);         break;
23022297   }
23032298}
2304#endif
23052299
23062300
23072301
r4441r4442
23092303    R5000 VARIANTS
23102304***************************************************************************/
23112305
2312#if (HAS_R5000)
23132306static CPU_INIT( r5000be )
23142307{
23152308   size_t memsize = mips3com_init(&mips3.core, MIPS3_TYPE_R5000, TRUE, device, index, clock, irqcallback, NULL);
r4441r4442
23592352      default:                              CPU_GET_INFO_CALL(mips3);         break;
23602353   }
23612354}
2362#endif
23632355
23642356
23652357
r4441r4442
23672359    QED5271 VARIANTS
23682360***************************************************************************/
23692361
2370#if (HAS_QED5271)
23712362static CPU_INIT( qed5271be )
23722363{
23732364   size_t memsize = mips3com_init(&mips3.core, MIPS3_TYPE_QED5271, TRUE, device, index, clock, irqcallback, NULL);
r4441r4442
24172408      default:                              CPU_GET_INFO_CALL(mips3);         break;
24182409   }
24192410}
2420#endif
24212411
24222412
24232413
r4441r4442
24252415    RM7000 VARIANTS
24262416***************************************************************************/
24272417
2428#if (HAS_RM7000)
24292418static CPU_INIT( rm7000be )
24302419{
24312420   size_t memsize = mips3com_init(&mips3.core, MIPS3_TYPE_RM7000, TRUE, device, index, clock, irqcallback, NULL);
r4441r4442
24752464      default:                              CPU_GET_INFO_CALL(mips3);         break;
24762465   }
24772466}
2478#endif
src/emu/cpu/tms9900/tms9900.h
r4441r4442
5252typedef void (*ti99xx_ckon_ckof_func)(const device_config *device, int state);
5353typedef void (*ti99xx_error_interrupt_func)(const device_config *device, int state);
5454
55#if (HAS_TI990_10)
5655
5756extern CPU_GET_INFO( ti990_10 );
5857#define CPU_TI990_10 CPU_GET_INFO_NAME( ti990_10 )
r4441r4442
8079extern READ8_HANDLER(ti990_10_eir_cru_r);
8180extern WRITE8_HANDLER(ti990_10_eir_cru_w);
8281
83#endif
8482
85#if (HAS_TMS9900)
8683
8784extern CPU_GET_INFO( tms9900 );
8885#define CPU_TMS9900 CPU_GET_INFO_NAME( tms9900 )
r4441r4442
9592   ti99xx_idle_func   idle_callback;
9693} tms9900reset_param;
9794
98#endif
9995
100#if (HAS_TMS9940)
10196
10297extern CPU_GET_INFO( tms9940 );
10398#define CPU_TMS9940 CPU_GET_INFO_NAME( tms9940 )
r4441r4442
110105   ti99xx_idle_func   idle_callback;
111106} tms9940reset_param;
112107
113#endif
114108
115#if (HAS_TMS9980)
116109
117110extern CPU_GET_INFO( tms9980a );
118111#define CPU_TMS9980 CPU_GET_INFO_NAME( tms9980a )
r4441r4442
125118   ti99xx_idle_func   idle_callback;
126119} tms9980areset_param;
127120
128#endif
129121
130#if (HAS_TMS9985)
131122
132123extern CPU_GET_INFO( tms9985 );
133124#define CPU_TMS9986 CPU_GET_INFO_NAME( tms9985 )
r4441r4442
140131   ti99xx_idle_func   idle_callback;
141132} tms9985reset_param;
142133
143#endif
144134
145#if (HAS_TMS9989)
146135
147136extern CPU_GET_INFO( tms9989 );
148137#define CPU_TMS9989 CPU_GET_INFO_NAME( tms9989 )
r4441r4442
155144   ti99xx_idle_func   idle_callback;
156145} tms9989reset_param;
157146
158#endif
159147
160#if (HAS_TMS9995)
161148
162149extern CPU_GET_INFO( tms9995 );
163150#define CPU_TMS9995 CPU_GET_INFO_NAME( tms9995 )
r4441r4442
186173extern READ8_HANDLER(tms9995_internal2_r);
187174extern WRITE8_HANDLER(tms9995_internal2_w);
188175
189#endif
190176
191#if (HAS_TMS99000)
192177
193178extern CPU_GET_INFO( tms99000 );
194179#define CPU_TMS99000 CPU_GET_INFO_NAME( tms99000 )
r4441r4442
201186   ti99xx_idle_func   idle_callback;
202187} tms99000reset_param;
203188
204#endif
205189
206#if (HAS_TMS99105A)
207190
208191extern CPU_GET_INFO( tms99105a );
209192#define CPU_TMS99105A CPU_GET_INFO_NAME( tms99105a )
r4441r4442
216199   ti99xx_idle_func   idle_callback;
217200} tms99105areset_param;
218201
219#endif
220202
221#if (HAS_TMS99110A)
222203
223204extern CPU_GET_INFO( tms99110a );
224205#define CPU_TMS99110A CPU_GET_INFO_NAME( tms99110a )
r4441r4442
231212   ti99xx_idle_func   idle_callback;
232213} tms99110areset_param;
233214
234#endif
235215
236216unsigned Dasm9900 (char *buffer, unsigned pc, int model_id, const UINT8 *oprom, const UINT8 *opram);
237217
src/emu/cpu/tms32025/tms32025.c
r4441r4442
5858 #  Support for the built in Serial Port
5959 #  Support for the Global memory register
6060 #  Support for the switch for RAM block 0 banking between RAM and ROM space
61 #  Correct the mulit-cycle instruction cycle counts
61 #  Correct the multi-cycle instruction cycle counts
6262 #  Add support to set ROM & RAM as Internal/External in order to correctly
6363    compute cycle timings
6464 #  Check (read) Hold signal level during execution loop ?
r4441r4442
170170   UINT32   memaccess;
171171   int      icount;
172172   int      mHackIgnoreARP;          /* special handling for lst, lst1 instructions */
173   int      waiting_for_serial_frame;
173174
174175   const device_config *device;
175176   const address_space *program;
r4441r4442
350351   UINT16 *ram;
351352   addr &= 0xffff;
352353   ram = cpustate->datamap[addr >> 7];
353   if (ram) { ram[addr & 0x7f] = data; }
354   if (ram) {
355      ram[addr & 0x7f] = data;
356      if(addr == 1 && ram == cpustate->intRAM && TXM) {
357         if(FSM)
358            cpustate->waiting_for_serial_frame = 1;
359         else
360            cpustate->IFR |= 0x20;
361      }
362   }
354363   else memory_write_word_16be(cpustate->data, addr << 1, data);
355364}
356365
r4441r4442
17961805   cpustate->datamap[7] = &cpustate->intRAM[0x380];         /* B1 */
17971806}
17981807
1799#if (HAS_TMS32026)
18001808static CPU_RESET( tms32026 )
18011809{
18021810   tms32025_state *cpustate = get_safe_token(device);
r4441r4442
18211829   cpustate->datamap[14] = &cpustate->intRAM[0x700];         /* B3 */
18221830   cpustate->datamap[15] = &cpustate->intRAM[0x780];         /* B3 */
18231831}
1824#endif
18251832
18261833
18271834/****************************************************************************
r4441r4442
19081915   return cpustate->tms32025_irq_cycles;
19091916}
19101917
1918void set_fsx_line(tms32025_state *cpustate, int state)
1919{
1920   if (state != CLEAR_LINE && cpustate->waiting_for_serial_frame)
1921   {
1922      cpustate->waiting_for_serial_frame = 0;
1923      cpustate->IFR = 0x20;
1924   }
1925}
1926
19111927INLINE void process_timer(tms32025_state *cpustate, int clocks)
19121928{
19131929   int preclocks, ticks;
r4441r4442
19771993      cpustate->hold = 0;
19781994   }
19791995
1980   /**** If idling, update timer and/or exit execution */
1996   /**** If idling, update timer and/or exit execution, but test for irqs first */
1997   if (cpustate->idle && cpustate->IFR && cpustate->icount > 0)
1998      cpustate->icount += process_IRQs(cpustate);
1999
19812000   while (cpustate->idle && cpustate->icount > 0)
19822001      process_timer(cpustate, cpustate->icount);
19832002
r4441r4442
20012020
20022021      if (cpustate->opcode.b.h == 0xCE)   /* Opcode 0xCExx has many sub-opcodes in its minor byte */
20032022      {
2004         cpustate->tms32025_dec_cycles = opcode_CE_subset[cpustate->opcode.b.l].cycles;
2023         cpustate->tms32025_dec_cycles += opcode_CE_subset[cpustate->opcode.b.l].cycles;
20052024         (*opcode_CE_subset[cpustate->opcode.b.l].function)(cpustate);
20062025      }
20072026      else if ((cpustate->opcode.w.l & 0xf0f8) == 0xd000)   /* Opcode 0xDxxx has many sub-opcodes in its minor byte */
20082027      {
2009         cpustate->tms32025_dec_cycles = opcode_Dx_subset[cpustate->opcode.b.l].cycles;
2028         cpustate->tms32025_dec_cycles += opcode_Dx_subset[cpustate->opcode.b.l].cycles;
20102029         (*opcode_Dx_subset[cpustate->opcode.b.l].function)(cpustate);
20112030      }
20122031      else         /* Do all opcodes except the CExx and Dxxx ones */
20132032      {
2014         cpustate->tms32025_dec_cycles = opcode_main[cpustate->opcode.b.h].cycles;
2033         cpustate->tms32025_dec_cycles += opcode_main[cpustate->opcode.b.h].cycles;
20152034         (*opcode_main[cpustate->opcode.b.h].function)(cpustate);
20162035      }
20172036
r4441r4442
22232242         CPU_WRITE_NAME(tms32025)(device, space, offset + 4, 4, value);
22242243         break;
22252244   }
2245
22262246   return 1;
22272247}
22282248
r4441r4442
22442264      case CPUINFO_INT_INPUT_STATE + TMS32025_TINT:      set_irq_line(cpustate, TMS32025_TINT, info->i);   break;
22452265      case CPUINFO_INT_INPUT_STATE + TMS32025_RINT:      set_irq_line(cpustate, TMS32025_RINT, info->i);   break;
22462266      case CPUINFO_INT_INPUT_STATE + TMS32025_XINT:      set_irq_line(cpustate, TMS32025_XINT, info->i);   break;
2267      case CPUINFO_INT_INPUT_STATE + TMS32025_FSX:      set_fsx_line(cpustate, info->i); break;
22472268
22482269      case CPUINFO_INT_PC:
22492270      case CPUINFO_INT_REGISTER + TMS32025_PC:      cpustate->PC = info->i;                     break;
r4441r4442
24362457}
24372458
24382459
2439#if (HAS_TMS32026)
24402460/**************************************************************************
24412461 * CPU-specific set_info
24422462 **************************************************************************/
r4441r4442
24542474      default:                              CPU_GET_INFO_CALL(tms32025);         break;
24552475   }
24562476}
2457#endif
src/emu/cpu/tms32025/tms32025.h
r4441r4442
3131#define TMS32025_XF         0x10002      /* XF output  */
3232#define TMS32025_DR         0x10003      /* Serial Data  Receive  input  */
3333#define TMS32025_DX         0x10003      /* Serial Data  Transmit output */
34#define TMS32025_CLKR      0x10004      /* Serial Clock Receive  input  */
35#define TMS32025_CLKX      0x10004      /* Serial Clock Transmit output */
36#define TMS32025_FSR      0x10005      /* Serial Frame Receive  pulse input  */
37#define TMS32025_FSX      0x10005      /* Serial Frame Transmit pulse output */
3834
3935
4036
r4441r4442
5147#define TMS32025_TRAP           6         /* Trap instruction */
5248#define TMS32025_INT_NONE        -1
5349
50/* Non-irq line */
51#define TMS32025_FSX           7         /* Frame synchronisation */
5452
5553enum
5654{
src/emu/cpu/pic16c5x/pic16c5x.c
r4441r4442
11101110
11111111
11121112
1113#if (HAS_PIC16C54)
11141113/****************************************************************************
11151114 *  Internal Memory Map
11161115 ****************************************************************************/
r4441r4442
11611160      default:                              CPU_GET_INFO_CALL(pic16c5x);         break;
11621161   }
11631162}
1164#endif
11651163
11661164
1167#if (HAS_PIC16C55)
11681165/****************************************************************************
11691166 *  Internal Memory Map
11701167 ****************************************************************************/
r4441r4442
12151212      default:                              CPU_GET_INFO_CALL(pic16c5x);         break;
12161213   }
12171214}
1218#endif
12191215
12201216
1221#if (HAS_PIC16C56)
12221217/****************************************************************************
12231218 *  Internal Memory Map
12241219 ****************************************************************************/
r4441r4442
12711266      default:                              CPU_GET_INFO_CALL(pic16c5x);         break;
12721267   }
12731268}
1274#endif
12751269
12761270
1277#if (HAS_PIC16C57)
12781271/****************************************************************************
12791272 *  Internal Memory Map
12801273 ****************************************************************************/
r4441r4442
13311324      default:                              CPU_GET_INFO_CALL(pic16c5x);         break;
13321325   }
13331326}
1334#endif
13351327
13361328
1337#if (HAS_PIC16C58)
13381329/****************************************************************************
13391330 *  Internal Memory Map
13401331 ****************************************************************************/
r4441r4442
13911382      default:                              CPU_GET_INFO_CALL(pic16c5x);         break;
13921383   }
13931384}
1394#endif
src/emu/cpu/pic16c5x/pic16c5x.h
r4441r4442
4848
4949
5050
51#if (HAS_PIC16C54)
5251CPU_GET_INFO( pic16c54 );
5352#define CPU_PIC16C54 CPU_GET_INFO_NAME( pic16c54 )
54#endif
5553
5654
57#if (HAS_PIC16C55)
5855CPU_GET_INFO( pic16c55 );
5956#define CPU_PIC16C55 CPU_GET_INFO_NAME( pic16c55 )
60#endif
6157
6258
63#if (HAS_PIC16C56)
6459CPU_GET_INFO( pic16c56 );
6560#define CPU_PIC16C56 CPU_GET_INFO_NAME( pic16c56 )
66#endif
6761
6862
69#if (HAS_PIC16C57)
7063CPU_GET_INFO( pic16c57 );
7164#define CPU_PIC16C57 CPU_GET_INFO_NAME( pic16c57 )
72#endif
7365
7466
75#if (HAS_PIC16C58)
7667CPU_GET_INFO( pic16c58 );
7768#define CPU_PIC16C58 CPU_GET_INFO_NAME( pic16c58 )
78#endif
7969
8070
81#if (HAS_PIC16C54) || (HAS_PIC16C55) || (HAS_PIC16C56) || (HAS_PIC16C57) || (HAS_PIC16C58)
8271CPU_DISASSEMBLE( pic16c5x );
83#endif
8472
8573
8674#endif   /* __PIC16C5X_H__ */
src/emu/cpu/m6800/6800ops.c
r4441r4442
2222}
2323
2424/* HD63701 only */
25#if (HAS_HD63701)
2625//OP_HANDLER( trap )
2726OP_HANDLER( trap )
2827{
2928   logerror("m6800: illegal opcode: address %04X, op %02X\n",PC,(int) M_RDOP_ARG(PC)&0xFF);
3029   TAKE_TRAP;
3130}
32#endif
3331
3432/* $00 ILLEGAL */
3533
r4441r4442
201199
202200/* $1a ILLEGAL */
203201
204#if (HAS_HD63701)
205202/* $1a SLP */ /* HD63701YO only */
206203OP_HANDLER( slp )
207204{
r4441r4442
209206   cpustate->wai_state |= M6800_SLP;
210207   EAT_CYCLES;
211208}
212#endif
213209
214210/* $1b ABA inherent ***** */
215211OP_HANDLER( aba )
src/emu/cpu/m6800/6800tbl.c
r4441r4442
188188INLINE void sec(m6800_state *cpustate);
189189INLINE void sei(m6800_state *cpustate);
190190INLINE void sev(m6800_state *cpustate);
191#if (HAS_HD63701)
192191INLINE void slp(m6800_state *cpustate);
193#endif
194192INLINE void sta_di(m6800_state *cpustate);
195193INLINE void sta_ex(m6800_state *cpustate);
196194INLINE void sta_im(m6800_state *cpustate);
r4441r4442
245243INLINE void cpx_ex(m6800_state *cpustate);
246244INLINE void cpx_im(m6800_state *cpustate);
247245INLINE void cpx_ix(m6800_state *cpustate);
248#if (HAS_HD63701)
249246INLINE void trap(m6800_state *cpustate);
250#endif
251247
252248static void (*const m6800_insn[0x100])(m6800_state *cpustate) = {
253249illegal,nop,   illegal,illegal,illegal,illegal,tap,   tpa,
r4441r4442
284280eorb_ex,adcb_ex,orb_ex, addb_ex,illegal,illegal,ldx_ex, stx_ex
285281};
286282
287#if (HAS_M6801||HAS_M6803)
288283static void (*const m6803_insn[0x100])(m6800_state *cpustate) = {
289284illegal,nop,   illegal,illegal,lsrd,   asld,   tap,   tpa,
290285inx,   dex,   clv,   sev,   clc,   sec,   cli,   sei,
r4441r4442
319314subb_ex,cmpb_ex,sbcb_ex,addd_ex,andb_ex,bitb_ex,ldb_ex, stb_ex,
320315eorb_ex,adcb_ex,orb_ex, addb_ex,ldd_ex, std_ex, ldx_ex, stx_ex
321316};
322#endif
323317
324#if (HAS_HD63701)
325318static void (*const hd63701_insn[0x100])(m6800_state *cpustate) = {
326319trap   ,nop,   trap   ,trap   ,lsrd,   asld,   tap,   tpa,
327320inx,   dex,   clv,   sev,   clc,   sec,   cli,   sei,
r4441r4442
356349subb_ex,cmpb_ex,sbcb_ex,addd_ex,andb_ex,bitb_ex,ldb_ex, stb_ex,
357350eorb_ex,adcb_ex,orb_ex, addb_ex,ldd_ex, std_ex, ldx_ex, stx_ex
358351};
359#endif
360352
361#if (HAS_NSC8105)
362353static void (*const nsc8105_insn[0x100])(m6800_state *cpustate) = {
363354illegal,illegal,nop,   illegal,illegal,tap,   illegal,tpa,
364355inx,   clv,   dex,   sev,   clc,   cli,   sec,   sei,
r4441r4442
393384subb_ex,sbcb_ex,cmpb_ex,illegal,andb_ex,ldb_ex, bitb_ex,stb_ex,
394385eorb_ex,orb_ex, adcb_ex,addb_ex,addx_ex,ldx_ex, illegal,stx_ex
395386};
396#endif
src/emu/cpu/m6800/m6800.h
r4441r4442
2323                           /* it is usuali to use PULSE_LINE state         */
2424};
2525
26#if (HAS_M6801||HAS_M6803||HAS_HD63701)
2726/* By default, on a port write port bits which are not set as output in the DDR */
2827/* are set to the value returned by a read from the same port. If you need to */
2928/* know the DDR for e.g. port 1, do m6803_internal_registers_r(M6801_DDR1) */
r4441r4442
4342   M6803_PORT3,
4443   M6803_PORT4
4544};
46#endif
4745
4846CPU_GET_INFO( m6800 );
4947#define CPU_M6800 CPU_GET_INFO_NAME( m6800 )
5048
51#if (HAS_M6801)
5249CPU_GET_INFO( m6801 );
5350#define CPU_M6801 CPU_GET_INFO_NAME( m6801 )
54#endif
5551
56#if (HAS_M6802)
5752CPU_GET_INFO( m6802 );
5853#define CPU_M6802 CPU_GET_INFO_NAME( m6802 )
59#endif
6054
61#if (HAS_M6803)
6255CPU_GET_INFO( m6803 );
6356#define CPU_M6803 CPU_GET_INFO_NAME( m6803 )
64#endif
6557
66#if (HAS_M6808)
6758CPU_GET_INFO( m6808 );
6859#define CPU_M6808 CPU_GET_INFO_NAME( m6808 )
69#endif
7060
71#if (HAS_HD63701)
7261CPU_GET_INFO( hd63701 );
7362#define CPU_HD63701 CPU_GET_INFO_NAME( hd63701 )
7463
r4441r4442
8675READ8_HANDLER( hd63701_internal_registers_r );
8776WRITE8_HANDLER( hd63701_internal_registers_w );
8877
89#endif
9078
91#if (HAS_NSC8105)
9279CPU_GET_INFO( nsc8105 );
9380#define CPU_NSC8105 CPU_GET_INFO_NAME( nsc8105 )
94#endif
9581
9682
9783CPU_DISASSEMBLE( m6800 );
r4441r4442
10894/****************************************************************************
10995 * For now make the 6801 using the m6800 variables and functions
11096 ****************************************************************************/
111#if (HAS_M6801)
11297#define M6801_A                M6800_A
11398#define M6801_B                M6800_B
11499#define M6801_PC               M6800_PC
r4441r4442
123108#define M6801_IRQ_LINE            M6800_IRQ_LINE
124109
125110extern CPU_GET_INFO( m6801 );
126#endif
127111
128112/****************************************************************************
129113 * For now make the 6802 using the m6800 variables and functions
130114 ****************************************************************************/
131#if (HAS_M6802)
132115#define M6802_A                M6800_A
133116#define M6802_B                M6800_B
134117#define M6802_PC               M6800_PC
r4441r4442
143126#define M6802_IRQ_LINE            M6800_IRQ_LINE
144127
145128extern CPU_GET_INFO( m6802 );
146#endif
147129
148130/****************************************************************************
149131 * For now make the 6803 using the m6800 variables and functions
150132 ****************************************************************************/
151#if (HAS_M6803)
152133#define M6803_A                M6800_A
153134#define M6803_B                M6800_B
154135#define M6803_PC               M6800_PC
r4441r4442
164145#define M6803_TIN_LINE            M6800_TIN_LINE
165146
166147extern CPU_GET_INFO( m6803 );
167#endif
168148
169#if (HAS_M6801||HAS_M6803||HAS_HD63701)
170149/* By default, on a port write port bits which are not set as output in the DDR */
171150/* are set to the value returned by a read from the same port. If you need to */
172151/* know the DDR for e.g. port 1, do m6803_internal_registers_r(M6801_DDR1) */
r4441r4442
180159#define M6803_PORT2 0x101
181160#define M6803_PORT3 0x102
182161#define M6803_PORT4 0x103
183#endif
184162
185163/****************************************************************************
186164 * For now make the 6808 using the m6800 variables and functions
187165 ****************************************************************************/
188#if (HAS_M6808)
189166#define M6808_A                M6800_A
190167#define M6808_B                M6800_B
191168#define M6808_PC               M6800_PC
r4441r4442
200177#define M6808_IRQ_LINE              M6800_IRQ_LINE
201178
202179extern CPU_GET_INFO( m6808 );
203#endif
204180
205181/****************************************************************************
206182 * For now make the HD63701 using the m6800 variables and functions
207183 ****************************************************************************/
208#if (HAS_HD63701)
209184#define HD63701_A                M6800_A
210185#define HD63701_B                M6800_B
211186#define HD63701_PC                M6800_PC
r4441r4442
236211READ8_HANDLER( hd63701_internal_registers_r );
237212WRITE8_HANDLER( hd63701_internal_registers_w );
238213
239#endif
240214
241215/****************************************************************************
242216 * For now make the NSC8105 using the m6800 variables and functions
243217 ****************************************************************************/
244#if (HAS_NSC8105)
245218#define NSC8105_A                M6800_A
246219#define NSC8105_B                M6800_B
247220#define NSC8105_PC                M6800_PC
r4441r4442
257230#define NSC8105_TIN_LINE          M6800_TIN_LINE
258231
259232extern CPU_GET_INFO( nsc8105 );
260#endif
261233
262234#endif
263235#endif /* __M6800_H__ */
src/emu/cpu/m6800/m6800.c
r4441r4442
657657/* include the opcode functions */
658658#include "6800ops.c"
659659
660#if (HAS_M6801||HAS_M6803||HAS_HD63701)
661660static void m6800_tx(m6800_state *cpustate, int value)
662661{
663662   cpustate->port2_data = (cpustate->port2_data & 0xef) | (value << 4);
r4441r4442
844843      }
845844   }
846845}
847#endif
848846
849847/****************************************************************************
850848 * Reset registers to their initial values
r4441r4442
12861284/****************************************************************************
12871285 * M6801 almost (fully?) equal to the M6803
12881286 ****************************************************************************/
1289#if (HAS_M6801)
12901287static CPU_INIT( m6801 )
12911288{
12921289   m6800_state *cpustate = get_safe_token(device);
r4441r4442
13061303
13071304   state_register(cpustate, "m6801");
13081305}
1309#endif
13101306
13111307/****************************************************************************
13121308 * M6802 almost (fully?) equal to the M6800
13131309 ****************************************************************************/
1314#if (HAS_M6802)
13151310static CPU_INIT( m6802 )
13161311{
13171312   m6800_state *cpustate = get_safe_token(device);
r4441r4442
13271322
13281323   state_register(cpustate, "m6802");
13291324}
1330#endif
13311325
13321326/****************************************************************************
13331327 * M6803 almost (fully?) equal to the M6801
13341328 ****************************************************************************/
1335#if (HAS_M6803)
13361329static CPU_INIT( m6803 )
13371330{
13381331   m6800_state *cpustate = get_safe_token(device);
r4441r4442
13521345
13531346   state_register(cpustate, "m6803");
13541347}
1355#endif
13561348
13571349/****************************************************************************
13581350 * Execute one instruction
r4441r4442
16241616/****************************************************************************
16251617 * Execute cycles CPU cycles. Return number of cycles really executed
16261618 ****************************************************************************/
1627#if (HAS_M6803||HAS_M6801)
16281619static CPU_EXECUTE( m6803 )
16291620{
16301621   m6800_state *cpustate = get_safe_token(device);
r4441r4442
16541645
16551646   return cycles - cpustate->icount;
16561647}
1657#endif
16581648
1659#if (HAS_M6803)
16601649
16611650static READ8_HANDLER( m6803_internal_registers_r );
16621651static WRITE8_HANDLER( m6803_internal_registers_w );
r4441r4442
16671656   AM_RANGE(0x0080, 0x00ff) AM_RAM        /* 6803 internal RAM */
16681657ADDRESS_MAP_END
16691658
1670#endif
16711659
16721660/****************************************************************************
16731661 * M6808 almost (fully?) equal to the M6800
16741662 ****************************************************************************/
1675#if (HAS_M6808)
16761663static CPU_INIT( m6808 )
16771664{
16781665   m6800_state *cpustate = get_safe_token(device);
r4441r4442
16881675
16891676   state_register(cpustate, "m6808");
16901677}
1691#endif
16921678
16931679/****************************************************************************
16941680 * HD63701 similiar to the M6800
16951681 ****************************************************************************/
1696#if (HAS_HD63701)
16971682
16981683static CPU_INIT( hd63701 )
16991684{
r4441r4442
20412026{
20422027   m6803_internal_registers_w(space, offset,data);
20432028}
2044#endif
20452029
20462030/****************************************************************************
20472031 * NSC-8105 similiar to the M6800, but the opcodes are scrambled and there
20482032 * is at least one new opcode ($fc)
20492033 ****************************************************************************/
2050#if (HAS_NSC8105)
20512034static CPU_INIT( nsc8105 )
20522035{
20532036   m6800_state *cpustate = get_safe_token(device);
r4441r4442
23622345
23632346   return cycles - cpustate->icount;
23642347}
2365#endif
23662348
23672349
2368#if (HAS_M6803||HAS_HD63701)
23692350
23702351static READ8_HANDLER( m6803_internal_registers_r )
23712352{
r4441r4442
26542635         break;
26552636   }
26562637}
2657#endif
26582638
26592639
26602640/**************************************************************************
r4441r4442
27722752}
27732753
27742754
2775#if (HAS_M6801)
27762755/**************************************************************************
27772756 * CPU-specific set_info
27782757 **************************************************************************/
r4441r4442
27972776      default:                              CPU_GET_INFO_CALL(m6800);            break;
27982777   }
27992778}
2800#endif
28012779
28022780
2803#if (HAS_M6802)
28042781/**************************************************************************
28052782 * CPU-specific set_info
28062783 **************************************************************************/
r4441r4442
28222799      default:                              CPU_GET_INFO_CALL(m6800);            break;
28232800   }
28242801}
2825#endif
28262802
28272803
2828#if (HAS_M6803)
28292804/**************************************************************************
28302805 * CPU-specific set_info
28312806 **************************************************************************/
r4441r4442
28522827      default:                              CPU_GET_INFO_CALL(m6800);            break;
28532828   }
28542829}
2855#endif
28562830
28572831
2858#if (HAS_M6808)
28592832/**************************************************************************
28602833 * CPU-specific set_info
28612834 **************************************************************************/
r4441r4442
28772850      default:                              CPU_GET_INFO_CALL(m6800);            break;
28782851   }
28792852}
2880#endif
28812853
28822854
2883#if (HAS_HD63701)
28842855/**************************************************************************
28852856 * CPU-specific set_info
28862857 **************************************************************************/
r4441r4442
29052876      default:                              CPU_GET_INFO_CALL(m6800);            break;
29062877   }
29072878}
2908#endif
29092879
29102880
2911#if (HAS_NSC8105)
29122881/**************************************************************************
29132882 * CPU-specific set_info
29142883 **************************************************************************/
r4441r4442
29312900      default:                              CPU_GET_INFO_CALL(m6800);            break;
29322901   }
29332902}
2934#endif
src/emu/sound/ay8910.c
r4441r4442
1111
1212  Games using ADSR: gyruss
1313
14  A list with more games using ADSR can be found here:
15        http://mametesters.org/mantis/view.php?id=3043
16
1417  TODO:
1518  * The AY8930 has an extended mode which is currently
1619    not emulated.
src/emu/sound/okim6295.c
r4441r4442
520520      stream_update(info->stream);
521521
522522      /* determine which voice(s) (voice is set by a 1 bit in bits 3-6 of the command */
523      for (i = 0; i < 4; i++, temp >>= 1)
523      for (i = 0; i < OKIM6295_VOICES; i++, temp >>= 1)
524524      {
525525         if (temp & 1)
526526         {
src/emu/cheat.c
r4441r4442
500500   {
501501      if (cheat->state == SCRIPT_STATE_OFF)
502502      {
503         *state = is_oneshot_parameter_cheat(cheat) ? "Set" : "Off";
503         if (state != NULL)
504            *state = is_oneshot_parameter_cheat(cheat) ? "Set" : "Off";
504505         if (flags != NULL)
505506            *flags = MENU_FLAG_RIGHT_ARROW;
506507      }
src/lib/util/chd.h
r4441r4442
7676    [100] UINT8  parentsha1[20];// SHA1 checksum of parent file
7777    [120] (V3 header length)
7878
79    Proposed V4 header:
79    V4 header:
8080
8181    [  0] char   tag[8];        // 'MComprHD'
8282    [  8] UINT32 length;        // length of header (including tag and length fields)
src/lib/util/corestr.c
r4441r4442
5151
5252/*-------------------------------------------------
5353    core_strwildcmp - case-insensitive wildcard
54    string compare (up to 8 characters at the
54    string compare (up to 16 characters at the
5555    moment)
5656-------------------------------------------------*/
5757
5858int core_strwildcmp(const char *sp1, const char *sp2)
5959{
60   char s1[9], s2[9];
60   char s1[17], s2[17];
6161   int i, l1, l2;
6262   char *p;
6363
64   strncpy(s1, sp1, 8); s1[8] = 0; if (s1[0] == 0) strcpy(s1, "*");
64   strncpy(s1, sp1, 16); s1[16] = 0; if (s1[0] == 0) strcpy(s1, "*");
6565
66   strncpy(s2, sp2, 8); s2[8] = 0; if (s2[0] == 0) strcpy(s2, "*");
66   strncpy(s2, sp2, 16); s2[16] = 0; if (s2[0] == 0) strcpy(s2, "*");
6767
6868   p = strchr(s1, '*');
6969   if (p)
7070   {
71      for (i = p - s1; i < 8; i++) s1[i] = '?';
72      s1[8] = 0;
71      for (i = p - s1; i < 16; i++) s1[i] = '?';
72      s1[16] = 0;
7373   }
7474
7575   p = strchr(s2, '*');
7676   if (p)
7777   {
78      for (i = p - s2; i < 8; i++) s2[i] = '?';
79      s2[8] = 0;
78      for (i = p - s2; i < 16; i++) s2[i] = '?';
79      s2[16] = 0;
8080   }
8181
8282   l1 = (int)strlen(s1);
83   if (l1 < 8)
83   if (l1 < 16)
8484   {
85      for (i = l1 + 1; i < 8; i++) s1[i] = ' ';
86      s1[8] = 0;
85      for (i = l1 + 1; i < 16; i++) s1[i] = ' ';
86      s1[16] = 0;
8787   }
8888
8989   l2 = (int)strlen(s2);
90   if (l2 < 8)
90   if (l2 < 16)
9191   {
92      for (i = l2 + 1; i < 8; i++) s2[i] = ' ';
93      s2[8] = 0;
92      for (i = l2 + 1; i < 16; i++) s2[i] = ' ';
93      s2[16] = 0;
9494   }
9595
96   for (i = 0; i < 8; i++)
96   for (i = 0; i < 16; i++)
9797   {
9898      if (s1[i] == '?' && s2[i] != '?') s1[i] = s2[i];
9999      if (s2[i] == '?' && s1[i] != '?') s2[i] = s1[i];
src/mess/mess.mak
r4441r4442
4747#CPUS += Z180
4848CPUS += I8085
4949CPUS += M6502
50CPUS += M65C02
51CPUS += M65SC02
52#CPUS += M65CE02
53CPUS += M6509
54CPUS += M6510
55CPUS += M6510T
56CPUS += M7501
57CPUS += M8502
58CPUS += N2A03
59#CPUS += DECO16
60CPUS += M4510
6150CPUS += H6280
62CPUS += I8086
63CPUS += I8088
64CPUS += I80186
65CPUS += I80188
66CPUS += I80286
51CPUS += I86
6752CPUS += I386
68CPUS += I486
69CPUS += PENTIUM
70#CPUS += MEDIAGX
71CPUS += V20
72#CPUS += V25
73#CPUS += V30
53CPUS += NEC
7454CPUS += V30MZ
75#CPUS += V33
76#CPUS += V35
7755#CPUS += V60
78#CPUS += V70
7956CPUS += MCS48
80#CPUS += I8031
81#CPUS += I8032
82CPUS += I8051
83#CPUS += I8052
84#CPUS += I8751
85#CPUS += I8752
86#CPUS += I80C31
87#CPUS += I80C32
88#CPUS += I80C51
89#CPUS += I80C52
90#CPUS += I87C51
91#CPUS += I87C52
92#CPUS += AT89C4051
93#CPUS += DS5002FP
57CPUS += MCS51
9458CPUS += M6800
95#CPUS += M6801
96#CPUS += M6802
97CPUS += M6803
98#CPUS += M6808
99CPUS += HD63701
100#CPUS += NSC8105
10159CPUS += M6805
102#CPUS += M68705
103#CPUS += HD63705
10460CPUS += HD6309
10561CPUS += M6809
106CPUS += M6809E
10762#CPUS += KONAMI
10863CPUS += M680X0
10964CPUS += T11
11065CPUS += S2650
11166#CPUS += TMS340X0
11267CPUS += TMS9900
113#CPUS += TMS9940
114CPUS += TMS9980
115#CPUS += TMS9985
116#CPUS += TMS9989
117CPUS += TMS9995
118#CPUS += TMS99105A
119#CPUS += TMS99110A
120#CPUS += TMS99000
121CPUS += TMS99010
12268#CPUS += Z8000
12369#CPUS += TMS32010
12470#CPUS += TMS32025
125#CPUS += TMS32026
12671#CPUS += TMS32031
127#CPUS += TMS32032
12872#CPUS += TMS32051
12973#CPUS += TMS57002
13074#CPUS += CCPU
13175#CPUS += ADSP21XX
132CPUS += PSXCPU
133#CPUS += CXD8661R
13476#CPUS += ASAP
13577CPUS += UPD7810
136#CPUS += UPD7807
137CPUS += UPD7801
13878CPUS += ARM
13979CPUS += ARM7
14080CPUS += JAGUAR
14181#CPUS += CUBEQCPU
14282#CPUS += ESRIP
143CPUS += R3000
144#CPUS += R3041
145#CPUS += VR4300
146CPUS += R4600
147#CPUS += R4650
148#CPUS += R4700
149CPUS += R5000
150#CPUS += QED5271
151#CPUS += RM7000
152#CPUS += SH1
83CPUS += MIPS
15384CPUS += SH2
15485CPUS += SH4
15586#CPUS += DSP32C
156#CPUS += PIC16C54
157#CPUS += PIC16C55
158#CPUS += PIC16C56
159#CPUS += PIC16C57
160#CPUS += PIC16C58
87#CPUS += PIC16C5X
16188CPUS += G65816
16289CPUS += SPC700
163#CPUS += E116T
164#CPUS += E116XT
165#CPUS += E116XS
166#CPUS += E116XSR
167#CPUS += E132N
168#CPUS += E132T
169#CPUS += E132XN
170#CPUS += E132XT
171#CPUS += E132XS
172#CPUS += E132XSR
173#CPUS += GMS30C2116
174#CPUS += GMS30C2132
175#CPUS += GMS30C2216
176#CPUS += GMS30C2232
90#CPUS += E1
17791#CPUS += I860
17892#CPUS += I960
17993#CPUS += H83002
18094#CPUS += H83334
18195CPUS += V810
182#CPUS += M37702
18396#CPUS += M37710
18497CPUS += POWERPC
18598#CPUS += SE3208
r4441r4442
188101#CPUS += DSP56156
189102CPUS += RSP
190103#CPUS += ALPHA8201
191#CPUS += ALPHA8301
192104CPUS += CDP1802
193105CPUS += COP400
194106#CPUS += TLCS90
195#CPUS += MB8841
196#CPUS += MB8842
197#CPUS += MB8843
198#CPUS += MB8844
107#CPUS += MB88XX
199108#CPUS += MB86233
200109CPUS += SSP1601
201110CPUS += APEXC
r4441r4442
205114CPUS += PDP1
206115CPUS += SATURN
207116CPUS += SC61860
208CPUS += TX0
209117CPUS += LR35902
210118CPUS += TMS7000
211CPUS += TMS7000_EXL
212119CPUS += SM8500
213120CPUS += MINX
214CPUS += I8035
215#CPUS += I8041
216CPUS += I8048
217#CPUS += I8648
218CPUS += I8748
219#CPUS += MB8884
220CPUS += I8039
221CPUS += I8049
222CPUS += I8749
223#CPUS += N7751
224#CPUS += M58715
225#CPUS += I8741
226CPUS += I8042
227#CPUS += I8242
228#CPUS += I8742
229#CPUS += PPC403GA
230#CPUS += PPC403GCX
231#CPUS += PPC601
232CPUS += PPC602
233CPUS += PPC603
234CPUS += PPC603E
235#CPUS += PPC603R
236#CPUS += PPC604
237#CPUS += MPC8240
238CPUS += 8080
239CPUS += 8085A
240#CPUS += ADSP2100
241#CPUS += ADSP2101
242#CPUS += ADSP2104
243#CPUS += ADSP2105
244#CPUS += ADSP2115
245#CPUS += ADSP2181
246CPUS += I8X41
247#CPUS += M68000
248#CPUS += M68008
249#CPUS += M68010
250#CPUS += M68EC020
251#CPUS += M68020
252#CPUS += M68040
253#CPUS += TMS34010
254#CPUS += TMS34020
255121
256122
257123
r4441r4442
636502
637503$(MESSOBJ)/amiga.a: \
638504   $(MAME_VIDEO)/amiga.o      \
505   $(MAME_VIDEO)/amigaaga.o   \
639506   $(MAME_MACHINE)/amiga.o      \
640507   $(MAME_AUDIO)/amiga.o      \
641508   $(MESS_MACHINE)/amigafdc.o   \
r4441r4442
14831350# MESS special OSD rules
14841351#-------------------------------------------------
14851352
1486include $(SRC)/mess/osd/$(OSD)/$(OSD).mak
1353include $(SRC)/mess/osd/$(OSD)/$(OSD).mak
docs/messnew.txt
r4441r4442
2929
3030Source Changes:
3131----------------
32- The core is based on MAME 0.130u1.  This incorporates all features of the
32- The core is based on MAME 0.130u2.  This incorporates all features of the
3333  update to this core.  [MAME team]
3434
3535- New tool added (castool) for cassette to wav conversion [Miodrag Milanovic]
3636
37
38
37390.130
3840
3941New System Drivers Supported (in no particular order):
makefile
r4441r4442
492492include $(SRC)/tools/tools.mak
493493
494494# combine the various definitions to one
495CDEFS = $(DEFS) $(COREDEFS) $(CPUDEFS) $(SOUNDDEFS)
495CDEFS = $(DEFS) $(COREDEFS) $(SOUNDDEFS)
496496
497497
498498

Previous 15994 Revisions Next


© 1998-2018 The MESS Team