Previous 15994 Revisions Next

r7773 Saturday 10th April, 2010 at 12:22:38 UTC by Nathan Woods
Updated to MAME 0.137u2 core
[ROOT]makefile
[docs]messnew.txt
[src/emu]emu.mak input.c mame.c mame.h render.c
[src/emu/cpu]cpu.mak
[src/emu/cpu/i386]i386.c i386dasm.c i386ops.c i386ops.h i386priv.h i486ops.c
[src/emu/cpu/i86]i86.c
[src/emu/cpu/m68000]m68kcpu.h m68kdasm.c m68kfpu.c
[src/emu/cpu/nec]nec.c necdasm.c
[src/emu/cpu/rsp]rsp.c
[src/emu/sound]rf5c68.c tms5110.c tms5110.h tms5110r.c
[src/emu/video]poly.c
[src/lib/util]corestr.c
[src/mame]mame.mak mamedriv.c
[src/mame/audio]atarijsa.c mcr.c wow.c
[src/mame/drivers]1943.c 8080bw.c aleck64.c balsente.c cb2001.c champbwl.c chihiro.c dlair.c galaxian.c galdrvr.c goldstar.c hng64.c konamigx.c megadriv.c midtunit.c midyunit.c missb2.c mpu4drvr.c namcos2.c namcos22.c namcos23.c neodrvr.c nss.c nwk-tr.c othunder.c pgm.c poker72.c* qix.c segaybd.c seta.c sf.c skimaxx.c skyarmy.c snesb.c stv.c subsino.c supdrapo.c tmaster.c vaportra.c zn.c
[src/mame/machine]dc.c konamigx.c midwunit.c midyunit.c model1.c n64.c snes.c snes7110.c
[src/mame/video]atarirle.c carpolo.c deco_mlc.c dynax.c f1gp.c galastrm.c gijoe.c groundfx.c hnayayoi.c konamigx.c lemmings.c mexico86.c model3.c moo.c n64.c n64.h oneshot.c ppu2c0x.c rastan.c rdpblend.h rdpfrect.h rdptpipe.c rdptpipe.h rdptrect.h snes.c st0016.c suprnova.c taito_f3.c tetrisp2.c tmnt.c vendetta.c wgp.c
[src/osd]osdcore.h
[src/tools]tools.mak unidasm.c

src/mame/audio/atarijsa.c
r7772r7773
840840   MDRV_SOUND_ROUTE(0, "mono", 0.60)
841841   MDRV_SOUND_ROUTE(1, "mono", 0.60)
842842
843   MDRV_SOUND_ADD("tms", TMS5220, JSA_MASTER_CLOCK*2/11) /* potentially JSA_MASTER_CLOCK/9 as well */
843   MDRV_SOUND_ADD("tms", TMS5220C, JSA_MASTER_CLOCK*2/11) /* potentially JSA_MASTER_CLOCK/9 as well */
844844   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
845845MACHINE_DRIVER_END
846846
src/mame/audio/wow.c
r7772r7773
109109READ8_HANDLER( wow_speech_r )
110110{
111111   running_device *samples = devtag_get_device(space->machine, "samples");
112   int Phoneme,Intonation;
112   int Phoneme/*, Intonation*/;
113113   int i = 0;
114114
115115   UINT8 data = offset >> 8;
r7772r7773
118118   totalword_ptr = totalword;
119119
120120   Phoneme = data & 0x3F;
121   Intonation = data >> 6;
121//  Intonation = data >> 6;
122122
123123//  logerror("Data : %d Speech : %s at intonation %d\n",Phoneme, PhonemeTable[Phoneme],Intonation);
124124
src/mame/audio/mcr.c
r7772r7773
103103
104104void mcr_sound_init(running_machine *machine, UINT8 config)
105105{
106   int sound_cpu = 1;
107
108106   mcr_sound_config = config;
109107
110108   /* SSIO */
r7772r7773
151149
152150   /* Advanced Audio */
153151   if (mcr_sound_config & MCR_WILLIAMS_SOUND)
154   {
155152      williams_cvsd_init(machine);
156      sound_cpu++;
157   }
158153}
159154
160155
src/mame/machine/snes7110.c
r7772r7773
976976   snes_spc7110.r4815 = addr >> 8;
977977}
978978
979// FIXME: SPC7110 RTC is capable of rounding/adding/zero-ing seconds, so
980// we should probably keep track internally of the time rather than updating
979// FIXME: SPC7110 RTC is capable of rounding/adding/zero-ing seconds, so
980// we should probably keep track internally of the time rather than updating
981981// to the system time at each call with a "offset" tracking as we do now...
982982// (and indeed current code fails to pass Tengai Makyou Zero tests)
983983static void spc7110_update_time(running_machine *machine, UINT8 offset)
r7772r7773
12211221   //real-time clock unit
12221222   //====================
12231223   case 0x4840: return snes_spc7110.r4840;
1224   case 0x4841:
1224   case 0x4841:
12251225      {
12261226         UINT8 data = 0;
1227         if (snes_spc7110.rtc_state == RTCS_Inactive || snes_spc7110.rtc_state == RTCS_ModeSelect)
1227         if (snes_spc7110.rtc_state == RTCS_Inactive || snes_spc7110.rtc_state == RTCS_ModeSelect)
12281228            return 0x00;
12291229
12301230         snes_spc7110.r4842 = 0x80;
r7772r7773
12321232         snes_spc7110.rtc_index = (snes_spc7110.rtc_index + 1) & 15;
12331233         return data;
12341234      }
1235   case 0x4842:
1235   case 0x4842:
12361236      {
12371237         UINT8 status = snes_spc7110.r4842;
12381238         snes_spc7110.r4842 &= 0x7f;
r7772r7773
13721372   case 0x4817: snes_spc7110.r4817 = data; break;
13731373   case 0x4818:
13741374      {
1375             if(snes_spc7110.r481x != 0x07)
1375             if(snes_spc7110.r481x != 0x07)
13761376            break;
13771377
13781378             snes_spc7110.r4818 = data;
r7772r7773
13931393      {
13941394             snes_spc7110.r4825 = data;
13951395
1396             if(snes_spc7110.r482e & 1)
1396             if(snes_spc7110.r482e & 1)
13971397         {
13981398                //signed 16-bit x 16-bit multiplication
13991399                INT16 r0 = (INT16)(snes_spc7110.r4824 + (snes_spc7110.r4825 << 8));
r7772r7773
14041404                snes_spc7110.r4829 = result >> 8;
14051405                snes_spc7110.r482a = result >> 16;
14061406                snes_spc7110.r482b = result >> 24;
1407         }
1408         else
1407         }
1408         else
14091409         {
14101410                //unsigned 16-bit x 16-bit multiplication
14111411                UINT16 r0 = (UINT16)(snes_spc7110.r4824 + (snes_spc7110.r4825 << 8));
r7772r7773
15351535   //real-time clock unit
15361536   //====================
15371537
1538   case 0x4840:
1538   case 0x4840:
15391539      {
15401540         snes_spc7110.r4840 = data;
15411541
1542         if (!(snes_spc7110.r4840 & 1))
1542         if (!(snes_spc7110.r4840 & 1))
15431543         {
15441544            //disable RTC
15451545            snes_spc7110.rtc_state = RTCS_Inactive;
15461546            spc7110_update_time(machine, 0);
1547         }
1548         else
1547         }
1548         else
15491549         {
15501550            //enable RTC
15511551            snes_spc7110.r4842 = 0x80;
15521552            snes_spc7110.rtc_state = RTCS_ModeSelect;
15531553         }
1554      }
1554      }
15551555      break;
15561556
1557   case 0x4841:
1557   case 0x4841:
15581558      {
15591559         snes_spc7110.r4841 = data;
15601560
1561         switch (snes_spc7110.rtc_state)
1561         switch (snes_spc7110.rtc_state)
15621562         {
1563         case RTCS_ModeSelect:
1563         case RTCS_ModeSelect:
15641564            if (data == RTCM_Linear || data == RTCM_Indexed)
15651565            {
15661566               snes_spc7110.r4842 = 0x80;
r7772r7773
15731573         case RTCS_IndexSelect:
15741574            snes_spc7110.r4842 = 0x80;
15751575            snes_spc7110.rtc_index = data & 15;
1576            if (snes_spc7110.rtc_mode == RTCM_Linear)
1576            if (snes_spc7110.rtc_mode == RTCM_Linear)
15771577               snes_spc7110.rtc_state = RTCS_Write;
15781578            break;
15791579
r7772r7773
15811581            snes_spc7110.r4842 = 0x80;
15821582
15831583            //control register 0
1584            if (snes_spc7110.rtc_index == 13)
1584            if (snes_spc7110.rtc_index == 13)
15851585            {
15861586               //increment second counter
1587               if (data & 2)
1587               if (data & 2)
15881588                  spc7110_update_time(machine, 1);
15891589
15901590               //round minute counter
1591               if (data & 8)
1591               if (data & 8)
15921592               {
15931593                  spc7110_update_time(machine, 0);
15941594
r7772r7773
15971597                  snes_spc7110.rtc_ram[0] = 0;
15981598                  snes_spc7110.rtc_ram[1] = 0;
15991599
1600                  if (second >= 30)
1600                  if (second >= 30)
16011601                     spc7110_update_time(machine, 60);
16021602               }
16031603            }
16041604
16051605            //control register 2
1606            if (snes_spc7110.rtc_index == 15)
1606            if (snes_spc7110.rtc_index == 15)
16071607            {
16081608               //disable timer and clear second counter
1609               if ((data & 1) && !(snes_spc7110.rtc_ram[15]  & 1))
1609               if ((data & 1) && !(snes_spc7110.rtc_ram[15]  & 1))
16101610               {
16111611                  spc7110_update_time(machine, 0);
16121612
r7772r7773
16241624            snes_spc7110.rtc_index = (snes_spc7110.rtc_index + 1) & 15;
16251625            break;
16261626         }
1627      }
1627      }
16281628      break;
16291629   }
16301630}
src/mame/machine/midyunit.c
r7772r7773
172172
173173static WRITE16_HANDLER( term2_sound_w )
174174{
175   /* Flash Lamp Output Data */
176   if  ( ((data & 0x800) != 0x800) && ((data & 0x400) == 0x400 ) )
177   {
178   output_set_value("Left_Flash_1", data & 0x1);
179   output_set_value("Left_Flash_2", (data & 0x2) >> 1);
180   output_set_value("Left_Flash_3", (data & 0x4) >> 2);
181   output_set_value("Left_Flash_4", (data & 0x8) >> 3);
182   output_set_value("Right_Flash_1", (data & 0x10) >> 4);
183   output_set_value("Right_Flash_2", (data & 0x20) >> 5);
184   output_set_value("Right_Flash_3", (data & 0x40) >> 6);
185   output_set_value("Right_Flash_4", (data & 0x80) >> 7);
186   }
187
188   /* Gun Output Data */
189   if  ( ((data & 0x800) == 0x800) && ((data & 0x400) != 0x400 ) )
190   {
191   output_set_value("Left_Gun_Recoil", data & 0x1);
192   output_set_value("Right_Gun_Recoil", (data & 0x2) >> 1);
193   output_set_value("Left_Gun_Green_Led", (~data & 0x20) >> 5);
194   output_set_value("Left_Gun_Red_Led", (~data & 0x10) >> 4);
195   output_set_value("Right_Gun_Green_Led", (~data & 0x80) >> 7);
196   output_set_value("Right_Gun_Red_Led", (~data & 0x40) >> 6);
197   }
198
175199   if (offset == 0)
176200      term2_analog_select = (data >> 12) & 3;
177201
src/mame/machine/konamigx.c
r7772r7773
150150WRITE16_HANDLER( K053990_martchmp_word_w )
151151{
152152   int src_addr, src_count, src_skip;
153   int dst_addr, dst_count, dst_skip;
153   int dst_addr, /*dst_count,*/ dst_skip;
154154   int mod_addr, mod_count, mod_skip, mod_offs;
155155   int mode, i, element_size = 1;
156156   UINT16 mod_val, mod_data;
r7772r7773
171171            dst_addr  = prot_data[0x2];
172172            dst_addr |= prot_data[0x3]<<16 & 0xff0000;
173173            src_count = prot_data[0x8]>>8;
174            dst_count = prot_data[0x9]>>8;
174            //dst_count = prot_data[0x9]>>8;
175175            src_skip  = prot_data[0xa] & 0xff;
176176            dst_skip  = prot_data[0xb] & 0xff;
177177
src/mame/machine/dc.c
r7772r7773
564564   static int jvs_command = 0,jvs_address = 0;
565565   int chk;
566566   int a;
567   int off,len,func;
567   int off,len/*,func*/;
568568
569569   reg = decode_reg32_64(space->machine, offset, mem_mask, &shift);
570570   dat = (UINT32)(data >> shift);
r7772r7773
609609               command=buff[2] & 255;
610610               dap=(buff[2] >> 8) & 255;
611611               sap=(buff[2] >> 16) & 255;
612               func = buff[3];
612               //func = buff[3];
613613               //buff[0]=0;
614614               //if(buff[1] == 0x700)
615615               //  printf("%08x %08x",buff[0],buff[2]);
src/mame/machine/n64.c
r7772r7773
16731673      case 0x03:
16741674      {
16751675         UINT32 address, checksum;
1676         int i;
16761677         /*mame_printf_debug("Write to mempack, rlength = %d, slength = %d\n", rlength, slength);
16771678            for (i=0; i < slength; i++)
16781679            {
r7772r7773
20102011   /* configure fast RAM regions for DRC */
20112012   mips3drc_add_fastram(devtag_get_device(machine, "maincpu"), 0x00000000, 0x007fffff, FALSE, rdram);
20122013
2013   //rspdrc_set_options(devtag_get_device(machine, "rsp"), 0);
2014   //rspdrc_add_imem(devtag_get_device(machine, "rsp"), rsp_imem);
2015   //rspdrc_add_dmem(devtag_get_device(machine, "rsp"), rsp_dmem);
2016   //rspdrc_flush_drc_cache(devtag_get_device(machine, "rsp"));
2014   rspdrc_set_options(devtag_get_device(machine, "rsp"), 0);
2015   rspdrc_add_imem(devtag_get_device(machine, "rsp"), rsp_imem);
2016   rspdrc_add_dmem(devtag_get_device(machine, "rsp"), rsp_dmem);
2017   rspdrc_flush_drc_cache(devtag_get_device(machine, "rsp"));
20172018
20182019   audio_timer = timer_alloc(machine, audio_timer_callback, NULL);
20192020}
src/mame/machine/snes.c
r7772r7773
955955   else
956956      value = snes_ram[offset];
957957
958   if(!space->debugger_access)
959      cpu_adjust_icount(space->cpu, -snes_bank_0x00_0x3f_cycles(space->machine, offset));
960
958   cpu_adjust_icount(space->cpu, -snes_bank_0x00_0x3f_cycles(space->machine, offset));
961959   return value;
962960}
963961
r7772r7773
10141012   else
10151013      value = snes_ram[0x300000 + offset];
10161014
1017   if(!space->debugger_access)
1018      cpu_adjust_icount(space->cpu, -snes_bank_0x00_0x3f_cycles(space->machine, offset));
1015   cpu_adjust_icount(space->cpu, -snes_bank_0x00_0x3f_cycles(space->machine, offset));
10191016
10201017   return value;
10211018}
r7772r7773
10551052   else                                 /* Mode 21 & 25 + SuperFX games */
10561053      value = snes_ram[0x400000 + offset];
10571054
1058   if(!space->debugger_access)
1059      cpu_adjust_icount(space->cpu, -8);
1060
1055   cpu_adjust_icount(space->cpu, -8);
10611056   return value;
10621057}
10631058
r7772r7773
10931088   else if (snes_cart.mode & 0x0a)               /* Mode 21 & 25 */
10941089      value = snes_ram[0x600000 + offset];
10951090
1096   if(!space->debugger_access)
1097      cpu_adjust_icount(space->cpu, -8);
1098
1091   cpu_adjust_icount(space->cpu, -8);
10991092   return value;
11001093}
11011094
r7772r7773
11291122   else
11301123      value = snes_ram[0x700000 + offset];
11311124
1132   if(!space->debugger_access)
1133      cpu_adjust_icount(space->cpu, -8);
1134
1125   cpu_adjust_icount(space->cpu, -8);
11351126   return value;
11361127}
11371128
r7772r7773
11771168   else
11781169      value = snes_ram[0x800000 + offset];
11791170
1180   if(!space->debugger_access)
1181      cpu_adjust_icount(space->cpu, -snes_bank_0x80_0xbf_cycles(space->machine, offset));
1182
1171   cpu_adjust_icount(space->cpu, -snes_bank_0x80_0xbf_cycles(space->machine, offset));
11831172   return value;
11841173}
11851174
r7772r7773
12301219   else                        /* Mode 21 & 25 + SuperFX Games */
12311220      value = snes_ram[0xc00000 + offset];
12321221
1233   if(!space->debugger_access)
1234      cpu_adjust_icount(space->cpu, -((snes_ram[MEMSEL] & 1) ? 6 : 8));
1222   cpu_adjust_icount(space->cpu, -((snes_ram[MEMSEL] & 1) ? 6 : 8));
12351223
12361224   return value;
12371225}
r7772r7773
12781266   else
12791267      logerror( "(PC=%06x) Attempt to write to ROM address: %X\n",cpu_get_pc(space->cpu),offset );
12801268
1281   if(!space->debugger_access)
1282      cpu_adjust_icount(space->cpu, -snes_bank_0x00_0x3f_cycles(space->machine, offset));
1269   cpu_adjust_icount(space->cpu, -snes_bank_0x00_0x3f_cycles(space->machine, offset));
12831270}
12841271
12851272/* 0x300000 - 0x3fffff */
r7772r7773
13301317   else
13311318      logerror("(PC=%06x) Attempt to write to ROM address: %X\n",cpu_get_pc(space->cpu),offset + 0x300000);
13321319
1333   if(!space->debugger_access)
1334      cpu_adjust_icount(space->cpu, -snes_bank_0x00_0x3f_cycles(space->machine, offset));
1320   cpu_adjust_icount(space->cpu, -snes_bank_0x00_0x3f_cycles(space->machine, offset));
13351321}
13361322
13371323/* 0x600000 - 0x6fffff */
r7772r7773
13551341   else if (snes_cart.mode & 0x0a)
13561342      logerror("(PC=%06x) Attempt to write to ROM address: %X\n",cpu_get_pc(space->cpu),offset + 0x600000);
13571343
1358   if(!space->debugger_access)
1359      cpu_adjust_icount(space->cpu, -8);
1344   cpu_adjust_icount(space->cpu, -8);
13601345}
13611346
13621347/* 0x700000 - 0x7dffff */
r7772r7773
13791364   else if (snes_cart.mode & 0x0a)
13801365      logerror("(PC=%06x) Attempt to write to ROM address: %X\n",cpu_get_pc(space->cpu),offset + 0x700000);
13811366
1382   if(!space->debugger_access)
1383      cpu_adjust_icount(space->cpu, -8);
1367   cpu_adjust_icount(space->cpu, -8);
13841368}
13851369
13861370
r7772r7773
14271411   else
14281412      logerror("(PC=%06x) Attempt to write to ROM address: %X\n",cpu_get_pc(space->cpu),offset + 0x800000);
14291413
1430   if(!space->debugger_access)
1431      cpu_adjust_icount(space->cpu, -snes_bank_0x80_0xbf_cycles(space->machine, offset));
1414   cpu_adjust_icount(space->cpu, -snes_bank_0x80_0xbf_cycles(space->machine, offset));
14321415}
14331416
14341417
r7772r7773
14661449   else if (snes_cart.mode & 0x0a)
14671450      logerror("(PC=%06x) Attempt to write to ROM address: %X\n",cpu_get_pc(space->cpu),offset + 0xc00000);
14681451
1469   if(!space->debugger_access)
1470      cpu_adjust_icount(space->cpu, -((snes_ram[MEMSEL] & 1) ? 6 : 8));
1452   cpu_adjust_icount(space->cpu, -((snes_ram[MEMSEL] & 1) ? 6 : 8));
14711453}
14721454
14731455
r7772r7773
17211703   snes_ram[WRDIVL] = 0xff;
17221704   snes_ram[WRDIVH] = 0xff;
17231705
1724   /* init DMA regs to be 0xff */
1725   {
1726      int i;
1727
1728      for(i=0;i<8;i++)
1729      {
1730         state->dma_channel[i].dmap = 0xff;
1731         state->dma_channel[i].dest_addr = 0xff;
1732         state->dma_channel[i].src_addr = 0xffff;
1733         state->dma_channel[i].bank = 0xff;
1734         state->dma_channel[i].trans_size = 0xffff;
1735         state->dma_channel[i].ibank = 0xff;
1736         state->dma_channel[i].hdma_addr = 0xffff;
1737         state->dma_channel[i].hdma_line_counter = 0xff;
1738         state->dma_channel[i].unk = 0xff;
1739      }
1740   }
1741
17421706   switch (snes_has_addon_chip)
17431707   {
17441708      case HAS_SDD1:
r7772r7773
20712035
20722036            bbus = state->dma_channel[i].dest_addr + 0x2100;
20732037
2074
2075
20762038            switch (state->dma_channel[i].dmap & 0x07)
20772039            {
20782040            case 0:      /* 1 register write once             (1 byte:  p               ) */
src/mame/machine/midwunit.c
r7772r7773
149149         break;
150150
151151      default:
152         /* Gun Outputs for RevX */
153         /* Note: The Gun for the Coin slot you use is supposed to rumble when you insert coins, and it doesn't for P3 */
154         /* Perhaps an Input is hooked up wrong??? */
155         output_set_value("Player1_Gun_Recoil", data & 0x1 );
156         output_set_value("Player2_Gun_Recoil", (data & 0x2) >> 1 );
157         output_set_value("Player3_Gun_Recoil", (data & 0x4) >> 2 );
158         output_set_value("Player1_Gun_LED", (~data & 0x10) >> 4 );
159         output_set_value("Player2_Gun_LED", (~data & 0x20) >> 5 );
160         output_set_value("Player3_Gun_LED", (~data & 0x40) >> 6 );
161
152162         logerror("%08X:I/O write to %d = %04X\n", cpu_get_pc(space->cpu), offset, data);
153163//          logerror("%08X:Unknown I/O write to %d = %04X\n", cpu_get_pc(space->cpu), offset, data);
154164         break;
src/mame/machine/model1.c
r7772r7773
13901390static TGP_FUNCTION( groundbox_test )
13911391{
13921392   int out_x, out_y, out_z;
1393   float x, y, z;
1393   float x, /*y,*/ z;
13941394   float a = fifoin_pop_f();
13951395   float b = fifoin_pop_f();
13961396   float c = fifoin_pop_f();
13971397
13981398   logerror("TGP groundbox_test %f, %f, %f (%x)\n", a, b, c, pushpc);
13991399   x = cmat[0]*a+cmat[3]*b+cmat[6]*c+cmat[9];
1400   y = cmat[1]*a+cmat[4]*b+cmat[7]*c+cmat[10];
1400   //y = cmat[1]*a+cmat[4]*b+cmat[7]*c+cmat[10];
14011401   z = cmat[2]*a+cmat[5]*b+cmat[8]*c+cmat[11];
14021402
14031403   out_x = x < tgp_vf_xmin || x > tgp_vf_xmax;
src/mame/mamedriv.c
r7772r7773
903903   DRIVER( ridgeracb )   /* (c) 1993 */
904904   DRIVER( ridgeracj )   /* (c) 1993 */
905905   DRIVER( ridgerac3 )   /* (c) 1993 */
906   DRIVER( rrf )      /* (c) 1993 */
906907   DRIVER( acedrvrw )   /* (c) 1994 */
907908   DRIVER( alpinerd )   /* (c) 1994 */
908909   DRIVER( alpinerc )   /* (c) 1994 */
r7772r7773
12551256   DRIVER( invadpt2 )   /* 852 [1980] Taito */
12561257   DRIVER( invaddlx )   /* 852 [1980] Midway */
12571258   DRIVER( vortex )   /* 852 [1980] Zilec Electronics Ltd. */
1258   DRIVER( moonbase )   /* Zeta - Nichibutsu */
1259   DRIVER( moonbase )   /* Taito */
1260   DRIVER( moonbasea )   /* Zeta - Nichibutsu */
12591261                  /* 870 - Space Invaders Deluxe cocktail */
12601262   DRIVER( searthin )   /* bootleg */
12611263   DRIVER( searthina )   /* bootleg */
r7772r7773
25722574   DRIVER( blkdrgon )   /*  8/1987 (c) 1987 (Japan) */
25732575   DRIVER( blkdrgonb )   /* bootleg, hacked to say Black Tiger */
25742576   DRIVER( sf )      /*  8/1987 (c) 1987 (World) */
2575   DRIVER( sfus )      /*  8/1987 (c) 1987 (US) */
2577   DRIVER( sfu )      /*  8/1987 (c) 1987 (US) */
2578   DRIVER( sfua )      /*  8/1987 (c) 1987 (US) */
25762579   DRIVER( sfj )      /*  8/1987 (c) 1987 (Japan) */
25772580   DRIVER( sfp )      /*  8/1987 (c) 1987 */
25782581   DRIVER( tigeroad )   /* 11/1987 (c) 1987 + Romstar (US) */
r7772r7773
31123115
31133116   /* Taito FX1a */
31143117   DRIVER( taitofx1 )
3115   DRIVER( sfchamp )   /* Super Football Champ (Ver 2.5J) */
3118   DRIVER( sfchamp )   /* Super Football Champ (Ver 2.5O) */
3119   DRIVER( sfchamp24o )/* Super Football Champ (Ver 2.4O) */
31163120   DRIVER( sfchampj )   /* Super Football Champ (Ver 2.4J) */
31173121   DRIVER( psyforce )   /* Psychic Force (Ver 2.4O) */
31183122   DRIVER( psyforcej )   /* Psychic Force (Ver 2.4J) */
r7772r7773
40304034                  /* 1990.05 G-LOC Air Battle (Japan) */
40314035   DRIVER( glocr360 )   /* 1990.?? G-LOC (R360, World?) */
40324036   DRIVER( strkfgtr )   /* 1991.06 Strike Fighter (Japan) */
4033   DRIVER( rchase )   /* 1991.09 Rail Chase (Japan) */
4037   DRIVER( rchase )   /* 1991.09 Rail Chase (World) */
4038   DRIVER( rchasej )   /* 1991.09 Rail Chase (Japan) */
40344039                  /* 1991.09 Rail Chase (US) */
40354040
40364041   /* Sega System 24 games */
r7772r7773
42024207   DRIVER( sanjeon )   /* 1999.04 Sanjun Sujun (Sega / Deniam) */
42034208   DRIVER( danchih )   /* 1999.06 Danchi de Hanafuda Okusan Komeya Desuyo! (Altron (Tecmo License)) */
42044209   DRIVER( ffreveng )   /* 1999.09 Final Fight Revenge (Capcom) */
4210   DRIVER( pclubpok )  /* 1999.11 Print Club Pokemon */
42054211   DRIVER( danchiq )   /* 2000.12 Danchi de Quiz Okusan Yontaku Desuyo! (Altron) */
42064212
42074213   /* Sega Model 2 Games */
r7772r7773
50485054   DRIVER( madmotor )   /* (c) [1989] Mitchell */
50495055      /* All these games have a unique code stamped on the mask roms */
50505056   DRIVER( vaportra )   /* MAA (c) 1989 Data East Corporation (World) */
5057   DRIVER( vaportra3 )   /* MAA (c) 1989 Data East Corporation (World) */
50515058   DRIVER( vaportrau )   /* MAA (c) 1989 Data East Corporation (US) */
50525059   DRIVER( kuhga )      /* MAA (c) 1989 Data East Corporation (Japan) */
50535060   DRIVER( cbuster )   /* MAB (c) 1990 Data East Corporation (World) */
r7772r7773
57175724   DRIVER( sscope2 )   /* GX931 (c)2000 */
57185725   DRIVER( racingj )   /* GX676 (c)1998 */
57195726   DRIVER( racingj2 )   /* GX888 (c)1999 */
5720   DRIVER( thrilld )   /* GX713 (c)1998 */
5727   DRIVER( thrilld )   /* GX713 (c)1998 Japan JAE */
5728   DRIVER( thrilldb )   /* GX713 (c)1998 Japan JAB */
57215729   DRIVER( midnrun )   /* GX476 (c)1995 */
57225730   DRIVER( windheat )   /* GX677 (c)1996 */
57235731   DRIVER( windheatu )   /* GX677 (c)1996 */
r7772r7773
67856793   DRIVER( greatgun )   /* (c) 1983 */
67866794
67876795   /* Other Stern */
6788   DRIVER( supdrapo )   /* (c) 1983 */
67896796   DRIVER( cliffhgr )   /* (c) 1983 */
67906797   DRIVER( cliffhgra )   /* (c) 1983 */
67916798   DRIVER( goaltogo )   /* (c) 1983 */
r7772r7773
69246931   DRIVER( hiimpact )   /* (c) 1990 Williams */
69256932   DRIVER( hiimpact4 )   /* (c) 1990 Williams */
69266933   DRIVER( hiimpact3 )   /* (c) 1990 Williams */
6934   DRIVER( hiimpact2 )   /* (c) 1990 Williams */
69276935   DRIVER( hiimpact1 )   /* (c) 1990 Williams */
69286936   DRIVER( hiimpactp )   /* (c) 1990 Williams */
69296937   DRIVER( shimpact )   /* (c) 1991 Midway */
r7772r7773
70567064   DRIVER( tm7ka )      /* (c) 1999 Midway Games */
70577065   DRIVER( tm7keval )   /* (c) 1999 Midway Games */
70587066   DRIVER( tm8k )      /* (c) 2000 Midway Games */
7067   DRIVER( tm8k902 )   /* (c) 2000 Midway Games */
70597068   DRIVER( galgbios )   /* (c) 1998 Creative Electronics & Software (CES) */
70607069   DRIVER( galgame2 )   /* (c) 1998 Creative Electronics & Software (CES) / Namco */
70617070
r7772r7773
71457154   DRIVER( bagnarda )   /* (c) 1982 */
71467155   DRIVER( bagmans )   /* (c) 1982 + Stern license */
71477156   DRIVER( bagmans2 )   /* (c) 1982 + Stern license */
7157   DRIVER( pickin )   /* (c) 1983 */
7158   DRIVER( supdrapo )   /* (c) 1983 + Stern license */
7159   DRIVER( supdrapoa )   /* (c) 1983 + Jeutel license? */
71487160   DRIVER( sbagman )   /* (c) 1984 */
71497161   DRIVER( sbagmans )   /* (c) 1984 + Stern license */
7150   DRIVER( pickin )   /* (c) 1983 */
71517162   DRIVER( botanic )   /* (c) 1985 */
71527163   DRIVER( squaitsa )   /* (c) 1985 */
71537164   DRIVER( tankbust )   /* (c) 1985 */
r7772r7773
83448355
83458356   /* IGS PGM System Games */
83468357   DRIVER( pgm )
8347   DRIVER( orlegend )    /* (c) 1997 */
8348   DRIVER( orlegende )    /* (c) 1997 */
8349   DRIVER( orlegendc )    /* (c) 1997 */
8350   DRIVER( orlegend111c )    /* (c) 1997 */
8351   DRIVER( orlegend105k )    /* (c) 1997 */
8352   DRIVER( drgw2 )        /* (c) 1997 */
8353   DRIVER( drgw2c )    /* (c) 1997 */
8354   DRIVER( drgw2j )    /* (c) 1997 */
8355   DRIVER( drgw3 )        /* (c) 1998 */
8356   DRIVER( drgw3k )    /* (c) 1998 */
8357   DRIVER( kov )        /* (c) 1999 */
8358   DRIVER( kovplus )    /* (c) 1999 */
8359   DRIVER( kovplusa )    /* (c) 1999 */
8360   DRIVER( kov115 )    /* (c) 1999 */
8361   DRIVER( kov100 )    /* (c) 1999 */
8362   DRIVER( kovsh )        /* (c) 1999 */
8363   DRIVER( photoy2k )    /* (c) 1999 */
8364   DRIVER( photoy2k102 )/* (c) 1999 */
8365   DRIVER( killbld )    /* (c) 1998 */
8366   DRIVER( killbld104 )/* (c) 1998 */
8367   DRIVER( puzlstar )    /* (c) 1999 */
8368   DRIVER( olds )        /* (c) 1999 */
8369   DRIVER( olds100 )    /* (c) 1999 */
8370   DRIVER( olds100a )    /* (c) 1999 */
8371   DRIVER( kov2 )        /* (c) 2000 */
8372   DRIVER( kov2106 )    /* (c) 2000 */
8373   DRIVER( kov2103 )    /* (c) 2000 */
8374   DRIVER( kov2102 )    /* (c) 2000 */
8375   DRIVER( kov2100 )    /* (c) 2000 */
8376   DRIVER( kov2p )        /* (c) 2000 */
8377   DRIVER( kov2p205 )    /* (c) 2000 */
8378   DRIVER( ddp2 )        /* (c) 2001 */
8379   DRIVER( ddp2a )        /* (c) 2001 */
8380   DRIVER( puzzli2 )    /* (c) 2001 */
8381   DRIVER( martmast )    /* (c) 2001 */
8382   DRIVER( martmastc )    /* (c) 2001 */
8383   DRIVER( theglad )    /* (c) 2001 */
8384   DRIVER( theglada )    /* (c) 2001 */
8385   DRIVER( dmnfrnt )    /* (c) 2002 */
8386   DRIVER( dmnfrnta )    /* (c) 2002 */
8358   DRIVER( orlegend )      /* (c) 1997 */
8359   DRIVER( orlegende )      /* (c) 1997 */
8360   DRIVER( orlegendc )      /* (c) 1997 */
8361   DRIVER( orlegendca )   /* (c) 1997 */
8362   DRIVER( orlegend111c )   /* (c) 1997 */
8363   DRIVER( orlegend105k )   /* (c) 1997 */
8364   DRIVER( drgw2 )         /* (c) 1997 */
8365   DRIVER( drgw2c )      /* (c) 1997 */
8366   DRIVER( drgw2j )      /* (c) 1997 */
8367   DRIVER( drgw3 )         /* (c) 1998 */
8368   DRIVER( drgw3k )      /* (c) 1998 */
8369   DRIVER( kov )         /* (c) 1999 */
8370   DRIVER( kovplus )      /* (c) 1999 */
8371   DRIVER( kovplusa )      /* (c) 1999 */
8372   DRIVER( kov115 )      /* (c) 1999 */
8373   DRIVER( kov100 )      /* (c) 1999 */
8374   DRIVER( kovsh )         /* (c) 1999 */
8375   DRIVER( kovsh103 )      /* (c) 1999 */
8376   DRIVER( photoy2k )      /* (c) 1999 */
8377   DRIVER( photoy2k102 )   /* (c) 1999 */
8378   DRIVER( killbld )      /* (c) 1998 */
8379   DRIVER( killbld104 )   /* (c) 1998 */
8380   DRIVER( puzlstar )      /* (c) 1999 */
8381   DRIVER( olds )         /* (c) 1999 */
8382   DRIVER( olds100 )      /* (c) 1999 */
8383   DRIVER( olds100a )      /* (c) 1999 */
8384   DRIVER( kov2 )         /* (c) 2000 */
8385   DRIVER( kov2106 )      /* (c) 2000 */
8386   DRIVER( kov2103 )      /* (c) 2000 */
8387   DRIVER( kov2102 )      /* (c) 2000 */
8388   DRIVER( kov2100 )      /* (c) 2000 */
8389   DRIVER( kov2p )         /* (c) 2000 */
8390   DRIVER( kov2p205 )      /* (c) 2000 */
8391   DRIVER( ddp2 )         /* (c) 2001 */
8392   DRIVER( ddp2a )         /* (c) 2001 */
8393   DRIVER( puzzli2 )      /* (c) 2001 */
8394   DRIVER( martmast )      /* (c) 2001 */
8395   DRIVER( martmastc )      /* (c) 2001 */
8396   DRIVER( martmastc102 )   /* (c) 2001 */
8397   DRIVER( theglad )      /* (c) 2001 */
8398   DRIVER( theglada )      /* (c) 2001 */
8399   DRIVER( dmnfrnt )      /* (c) 2002 */
8400   DRIVER( dmnfrnta )      /* (c) 2002 */
83878401   DRIVER( kovshp )
83888402   DRIVER( oldsplus )
83898403   DRIVER( killbldp )
r7772r7773
92009214   DRIVER( victor21 )   /* (c) 1990 Subsino */
92019215   DRIVER( crsbingo )   /* (c) 1991 Subsino */
92029216   DRIVER( tisub )      /* (c) 1991 Subsino */
9203   DRIVER( sharkpy )   /* (c) 1993 Subsino */
9204   DRIVER( sharkpya )   /* (c) 1993 Subsino */
9217   DRIVER( sharkpy )   /* (c) 1996 Subsino */
9218   DRIVER( sharkpya )   /* (c) 1996 Subsino */
9219   DRIVER( sharkpye )   /* (c) 1996 Subsino */
92059220   DRIVER( smoto20 )   /* (c) 1996 Subsino */
92069221   DRIVER( smoto16 )   /* (c) 1996 Subsino */
92079222   DRIVER( saklove )   /* (c) 1998 Subsino */
r7772r7773
94889503   DRIVER( cb3a )      /* (c) 199? Dyna Electronics */
94899504   DRIVER( cb3 )      /* (c) 199? Dyna Electronics */
94909505   DRIVER( cb3b )      /* (c) 199? Dyna Electronics */
9506   DRIVER( cb3c )      /* (c) 199? Dyna Electronics */
94919507   DRIVER( cmv801 )   /* (c) 198? Corsica */
94929508   DRIVER( cmv4 )      /* (c) 1992 Dyna Electronics */
94939509   DRIVER( cmv4a )      /* (c) 1992 Dyna Electronics */
r7772r7773
1008610102   /* Diatec */
1008710103   DRIVER( unclepoo )
1008810104
10105   /* Extrema Systems International Ltd. */
10106   DRIVER( poker72 )
10107
1008910108#endif   /* DRIVER_RECURSIVE */
src/mame/mame.mak
r7772r7773
11931193   $(DRIVERS)/feversoc.o \
11941194
11951195$(MAMEOBJ)/seta.a: \
1196   $(DRIVERS)/aleck64.o $(MACHINE)/n64.o $(VIDEO)/n64.o \
1196   $(DRIVERS)/aleck64.o $(MACHINE)/n64.o $(VIDEO)/n64.o $(VIDEO)/rdpblend.o $(VIDEO)/rdpfb.o $(VIDEO)/rdpspn16.o $(VIDEO)/rdptrect.o $(VIDEO)/rdpfrect.o $(VIDEO)/rdpfetch.o $(VIDEO)/rdptpipe.o \
11971197   $(DRIVERS)/darkhors.o \
11981198   $(DRIVERS)/hanaawas.o $(VIDEO)/hanaawas.o \
11991199   $(DRIVERS)/macs.o \
r7772r7773
16061606   $(DRIVERS)/pntnpuzl.o \
16071607   $(DRIVERS)/policetr.o $(VIDEO)/policetr.o \
16081608   $(DRIVERS)/polyplay.o $(AUDIO)/polyplay.o $(VIDEO)/polyplay.o \
1609   $(DRIVERS)/poker72.o \
16091610   $(DRIVERS)/poo.o \
16101611   $(DRIVERS)/quakeat.o \
16111612   $(DRIVERS)/queen.o \
src/mame/video/deco_mlc.c
r7772r7773
228228{
229229   UINT32 *index_ptr=0;
230230   int offs,fx=0,fy=0,x,y,color,colorOffset,sprite,indx,h,w,bx,by,fx1,fy1;
231   int xmult,ymult,xoffs,yoffs;
231   int xoffs,yoffs;
232232   UINT8 *rom = memory_region(machine, "gfx2") + 0x20000, *index_ptr8;
233233   UINT8 *rawrom = memory_region(machine, "gfx2");
234234   int blockIsTilemapIndex=0;
r7772r7773
403403      if(fx1&1) fx^=0x8000;
404404      if(fy1&1) fy^=0x4000;
405405
406      if (fx) xmult=-1; else xmult=1;
407      if (fy) ymult=-1; else ymult=1;
408
409406      ybase=y<<16;
410407      if (fy)
411408         ybase+=(yoffs-15) * (yscale<<8);
src/mame/video/rdpfrect.h
r7772r7773
3636      UINT16 m_yh;   // 10.2 fixed-point
3737
3838   private:
39      void             Draw1Cycle();
40      void             Draw2Cycle();
41      void             DrawFill();
39      void            Draw1Cycle();
40      void            Draw2Cycle();
41      void            DrawFill();
4242
4343      running_machine*   m_machine;
4444      Processor*         m_rdp;
src/mame/video/carpolo.c
r7772r7773
102102   for (i = 0; i < machine->config->total_colors; i++)
103103   {
104104      UINT8 pen, r, g, b;
105      int bit0, bit1, bit2;
106105
107106      if (i < 0x18)
108107         /* sprites */
r7772r7773
131130         pen = ((i - 0x38) & 0x01) ? ALPHA_COLOR_BASE   + ((i - 0x38) >> 1) : 0;
132131
133132      /* red component */
134      bit0 = (color_prom[pen] >> 7) & 0x01;
135      bit1 = (color_prom[pen] >> 6) & 0x01;
136      bit2 = (color_prom[pen] >> 5) & 0x01;
137133      r = ((r_voltage[(color_prom[pen] >> 5) & 0x07] - MIN_VOLTAGE) / (MAX_VOLTAGE - MIN_VOLTAGE)) * 255.;
138134
139135      /* green component */
140      bit0 = (color_prom[pen] >> 4) & 0x01;
141      bit1 = (color_prom[pen] >> 3) & 0x01;
142      bit2 = (color_prom[pen] >> 2) & 0x01;
143136      g = ((g_voltage[(color_prom[pen] >> 2) & 0x07] - MIN_VOLTAGE) / (MAX_VOLTAGE - MIN_VOLTAGE)) * 255.;
144137
145138      /* blue component */
146      bit0 = (color_prom[pen] >> 1) & 0x01;
147      bit1 = (color_prom[pen] >> 0) & 0x01;
148139      b = ((b_voltage[(color_prom[pen] >> 0) & 0x03] - MIN_VOLTAGE) / (MAX_VOLTAGE - MIN_VOLTAGE)) * 255.;
149140
150141      palette_set_color(machine, i, MAKE_RGB(r, g, b));
src/mame/video/suprnova.c
r7772r7773
220220WRITE32_HANDLER ( skns_palette_ram_w )
221221{
222222   int r,g,b;
223   int brightness_r, brightness_g, brightness_b, alpha;
223   int brightness_r, brightness_g, brightness_b/*, alpha*/;
224224   int use_bright;
225225
226226   COMBINE_DATA(&skns_palette_ram[offset]);
r7772r7773
229229   g = ((skns_palette_ram[offset] >> 5  ) & 0x1f);
230230   r = ((skns_palette_ram[offset] >> 10  ) & 0x1f);
231231
232   alpha = ((skns_palette_ram[offset] >> 15  ) & 0x1);
232   //alpha = ((skns_palette_ram[offset] >> 15  ) & 0x1);
233233
234234   if(offset<(0x40*256)) { // 1st half is for Sprites
235235      use_bright = use_spc_bright;
r7772r7773
262262
263263static void palette_set_rgb_brightness (running_machine *machine, int offset, UINT8 brightness_r, UINT8 brightness_g, UINT8 brightness_b)
264264{
265   int use_bright, r, g, b, alpha;
265   int use_bright, r, g, b/*, alpha*/;
266266
267267   b = ((skns_palette_ram[offset] >> 0  ) & 0x1f);
268268   g = ((skns_palette_ram[offset] >> 5  ) & 0x1f);
269269   r = ((skns_palette_ram[offset] >> 10  ) & 0x1f);
270270
271   alpha = ((skns_palette_ram[offset] >> 15  ) & 0x1);
271   //alpha = ((skns_palette_ram[offset] >> 15  ) & 0x1);
272272
273273   if(offset<(0x40*256)) { // 1st half is for Sprites
274274      use_bright = use_spc_bright;
src/mame/video/dynax.c
r7772r7773
10271027   }
10281028
10291029   {
1030      int dy, length, pen, offs;
1030      int dy, length, pen;
10311031      UINT8 *src1 = state->pixmap[i][1];
10321032      UINT8 *src2 = state->pixmap[i][0];
10331033
10341034      int palbase = 16 * color;
1035      offs = 0;
10361035
10371036      for (dy = 0; dy < 256; dy++)
10381037      {
r7772r7773
10951094   }
10961095
10971096   {
1098      int dy, length, pen, offs;
1097      int dy, length, pen;
10991098      UINT8 *src1 = state->pixmap[i][1];
11001099      UINT8 *src2 = state->pixmap[i][0];
11011100
11021101      int palbase = 16 * color;
1103      offs = 0;
11041102
11051103      for (dy = 0; dy < 256; dy++)
11061104      {
r7772r7773
11601158   scrolly = state->blit_scroll_y;
11611159
11621160   {
1163      int dy, length, pen, offs;
1161      int dy, length, pen;
11641162      UINT8 *src = state->pixmap[i][0];
11651163
11661164      int palbase = 16 * color;
1167      offs = 0;
11681165
11691166      for (dy = 0; dy < 256; dy++)
11701167      {
src/mame/video/mexico86.c
r7772r7773
104104   mexico86_state *state = (mexico86_state *)screen->machine->driver_data;
105105   int offs;
106106   int sx, sy, yc;
107   int gfx_num, gfx_attr, gfx_offs;
107   int gfx_num, /*gfx_attr,*/ gfx_offs;
108108   int height;
109109   int goffs, code, color, y;
110110   int tx, ty;
r7772r7773
119119      ty = state->objectram[offs];
120120      gfx_num = state->objectram[offs + 1];
121121      tx = state->objectram[offs + 2];
122      gfx_attr = state->objectram[offs + 3];
122      //gfx_attr = state->objectram[offs + 3];
123123
124124      if (gfx_num & 0x80)
125125      {
src/mame/video/rdptpipe.c
r7772r7773
88namespace RDP
99{
1010
11#define RELATIVE(x, y)    ((((x) >> 3) - (y)) << 3) | (x & 7);
11#define RELATIVE(x, y)   ((((x) >> 3) - (y)) << 3) | (x & 7);
1212
1313void TexturePipe::SetMachine(running_machine *machine)
1414{
src/mame/video/rdptpipe.h
r7772r7773
2828      }
2929
3030      UINT32            Fetch(INT32 SSS, INT32 SST, Tile* tile);
31      void             CalculateClampDiffs(UINT32 prim_tile);
31      void            CalculateClampDiffs(UINT32 prim_tile);
3232
3333      void            SetMachine(running_machine* machine);
3434
3535   private:
36      void             Mask(INT32* S, INT32* T, Tile* tile);
37      void             TexShift(INT32* S, INT32* T, bool* maxs, bool* maxt, Tile *tile);
38      void             Clamp(INT32* S, INT32* T, INT32* SFRAC, INT32* TFRAC, bool maxs, bool maxt, Tile* tile);
39      void             ClampLight(INT32* S, INT32* T, bool maxs, bool maxt, Tile* tile);
36      void            Mask(INT32* S, INT32* T, Tile* tile);
37      void            TexShift(INT32* S, INT32* T, bool* maxs, bool* maxt, Tile *tile);
38      void            Clamp(INT32* S, INT32* T, INT32* SFRAC, INT32* TFRAC, bool maxs, bool maxt, Tile* tile);
39      void            ClampLight(INT32* S, INT32* T, bool maxs, bool maxt, Tile* tile);
4040
4141      running_machine*   m_machine;
4242      OtherModes*         m_other_modes;
4343      Processor*         m_rdp;
4444      TexFetch         m_tex_fetch;
4545
46      INT32             m_maskbits_table[16];
47      INT32             m_clamp_t_diff[8];
48      INT32             m_clamp_s_diff[8];
46      INT32            m_maskbits_table[16];
47      INT32            m_clamp_t_diff[8];
48      INT32            m_clamp_s_diff[8];
4949};
5050
5151} // namespace RDP
src/mame/video/lemmings.c
r7772r7773
139139WRITE16_HANDLER( lemmings_pixel_1_w )
140140{
141141   lemmings_state *state = (lemmings_state *)space->machine->driver_data;
142   int sx, sy, src, old, tile;
142   int sx, sy, src, /*old,*/ tile;
143143
144   old = state->pixel_1_data[offset];
144//  old = state->pixel_1_data[offset];
145145   COMBINE_DATA(&state->pixel_1_data[offset]);
146146   src = state->pixel_1_data[offset];
147147//  if (old == src)
src/mame/video/hnayayoi.c
r7772r7773
230230static void draw_layer_interleaved( running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int left_pixmap, int right_pixmap, int palbase, int transp )
231231{
232232   hnayayoi_state *state = (hnayayoi_state *)machine->driver_data;
233   int county, countx, pen, offs;
233   int county, countx, pen;
234234   UINT8 *src1 = state->pixmap[left_pixmap];
235235   UINT8 *src2 = state->pixmap[right_pixmap];
236236   UINT16 *dstbase = (UINT16 *)bitmap->base;
237237
238238   palbase *= 16;
239   offs = 0;
240239
241240   for (county = 255; county >= 0; county--, dstbase += bitmap->rowpixels)
242241   {
src/mame/video/tmnt.c
r7772r7773
608608VIDEO_UPDATE( punkshot )
609609{
610610   tmnt_state *state = (tmnt_state *)screen->machine->driver_data;
611   int bg_colorbase;
612611
613   bg_colorbase = k053251_get_palette_index(state->k053251, K053251_CI0);
614612   state->sprite_colorbase = k053251_get_palette_index(state->k053251, K053251_CI1);
615613   state->layer_colorbase[0] = k053251_get_palette_index(state->k053251, K053251_CI2);
616614   state->layer_colorbase[1] = k053251_get_palette_index(state->k053251, K053251_CI4);
src/mame/video/model3.c
r7772r7773
739739      for(x=xpos; x < xpos+width; x+=8)
740740      {
741741         UINT16 *texture = &texture_ram[page][y*2048+x];
742         int b = 0;
743742         for(j=y; j < y+4; j++) {
744743            for(i=x; i < x+8; i++) {
745744               *texture = color;
746745               texture++;
747               ++b;
748746            }
749747            texture += 2048-8;
750748         }
r7772r7773
11301128   poly_vertex prev_vertex[4];
11311129   poly_vertex clip_vert[10];
11321130
1133   int polynum = 0;
11341131   MATRIX transform_matrix;
11351132   float center_x, center_y;
11361133
r7772r7773
13071304            render_one(machine, &tri);
13081305         }
13091306      }
1310
1311      ++polynum;
13121307   };
13131308}
13141309
r7772r7773
14601455   const UINT32 *node = get_memory_pointer(address);
14611456   UINT32 link_address;
14621457   float viewport_left, viewport_right, viewport_top, viewport_bottom;
1463   float fov_x, fov_y;
1458   float /*fov_x,*/ fov_y;
14641459
14651460   link_address = node[1];
14661461   if (link_address == 0)
r7772r7773
14951490   clip_plane[4].x = 0.0f;      clip_plane[4].y = 0.0f;      clip_plane[4].z = 1.0f;      clip_plane[4].d = 1.0f;
14961491
14971492   /* compute field of view */
1498   fov_x = viewport_left + viewport_right;
1493   //fov_x = viewport_left + viewport_right;
14991494   fov_y = viewport_top + viewport_bottom;
15001495   viewport_focal_length = (viewport_region_height / 2) / tan( (fov_y * M_PI / 180.0f) / 2.0f );
15011496
src/mame/video/st0016.c
r7772r7773
263263    */
264264
265265   gfx_element *gfx = machine->gfx[st0016_ramgfx];
266   int i,j,lx,ly,x,y,code,offset,length,sx,sy,color,flipx,flipy,scrollx,scrolly,plx,ply;
266   int i,j,lx,ly,x,y,code,offset,length,sx,sy,color,flipx,flipy,scrollx,scrolly/*,plx,ply*/;
267267
268268
269269   for(i=0;i<ST0016_SPR_BANK_SIZE*ST0016_MAX_SPR_BANK;i+=8)
r7772r7773
308308
309309      length=st0016_spriteram[i+0]+1+256*(st0016_spriteram[i+1]&1);
310310
311      plx=(st0016_spriteram[i+5]>>2)&0x3;
312      ply=(st0016_spriteram[i+7]>>2)&0x3;
311      //plx=(st0016_spriteram[i+5]>>2)&0x3;
312      //ply=(st0016_spriteram[i+7]>>2)&0x3;
313313
314314      if(offset<ST0016_SPR_BANK_SIZE*ST0016_MAX_SPR_BANK)
315315      {
src/mame/video/atarirle.c
r7772r7773
670670      while (entry_count-- && base < end)
671671      {
672672         int word = *base++;
673         int count, value;
673         int count/*, value*/;
674674
675675         /* decode the low byte first */
676676         count = table[word & 0xff];
677         value = count & 0xff;
677         //value = count & 0xff;
678678         tempwidth += count >> 8;
679679
680680         /* decode the upper byte second */
681681         count = table[word >> 8];
682         value = count & 0xff;
682         //value = count & 0xff;
683683         tempwidth += count >> 8;
684684      }
685685
r7772r7773
796796
797797if (hilite)
798798{
799   int scale, code, which;
799   int scale, code/*, which*/;
800800
801801   /* extract scale and code */
802802   obj = hilite;
803803   scale = EXTRACT_DATA(obj, mo->scalemask);
804804   code = EXTRACT_DATA(obj, mo->codemask);
805   which = EXTRACT_DATA(obj, mo->vrammask);
805   //which = EXTRACT_DATA(obj, mo->vrammask);
806806
807807   /* make sure they are in range */
808808   if (scale > 0 && code < mo->objectcount)
r7772r7773
841841         const rectangle *visarea = video_screen_get_visible_area(machine->primary_screen);
842842         int scaled_width = (scale * info->width + 0x7fff) >> 12;
843843         int scaled_height = (scale * info->height + 0x7fff) >> 12;
844         int dx, dy, ex, ey, sx = x, sy = y, tx, ty;
844         int ex, ey, sx = x, sy = y, tx, ty;
845845
846846         /* make sure we didn't end up with 0 */
847847         if (scaled_width == 0) scaled_width = 1;
848848         if (scaled_height == 0) scaled_height = 1;
849849
850850         /* compute the remaining parameters */
851         dx = (info->width << 12) / scaled_width;
852         dy = (info->height << 12) / scaled_height;
853851         ex = sx + scaled_width - 1;
854852         ey = sy + scaled_height - 1;
855853
src/mame/video/snes.c
r7772r7773
157157 * snes_set_scanline_pixel()
158158 *
159159 * Store pixel color, priority, layer and
160 * color math exception (for OAM) in the
160 * color math exception (for OAM) in the
161161 * proper scanline
162162 *****************************************/
163163
r7772r7773
188188 * copy it to the scanline buffer when
189189 * appropriate. The actual way to perform
190190 * such operations depends on the source
191 * (BG or OAM) and on the resolution (hires
191 * (BG or OAM) and on the resolution (hires
192192 * or lores)
193193 *****************************************/
194194
r7772r7773
239239         if (scanlines[screen].priority[ii >> 1] <= priority)
240240         {
241241            UINT8 clr = colour;
242            UINT8 clipmask = snes_ppu.clipmasks[layer][ii >> 1];
242            UINT8 clipmask = snes_ppu.clipmasks[layer][ii];
243243
244244#ifdef SNES_LAYER_DEBUG
245245            if (debug_options.windows_disabled)
r7772r7773
341341         snes_draw_oamtile(ii, colour, pal, priority);
342342      else if (!hires)
343343      {
344         if (mosaic)   
344         if (mosaic)
345345         {
346346            for (x_mos = 0; x_mos < (snes_ppu.mosaic_size + 1); x_mos++)
347347               snes_draw_bgtile_lores(layer, ii + x_mos, colour, pal, direct_colors, priority);
r7772r7773
352352      }
353353      else /* hires */
354354      {
355         if (mosaic)   
355         if (mosaic)
356356         {
357357            for (x_mos = 0; x_mos < (snes_ppu.mosaic_size + 1); x_mos++)
358358               snes_draw_bgtile_hires(layer, ii + x_mos, colour, pal, direct_colors, priority);
r7772r7773
748748            if (scanlines[screen].priority[xpos] <= priority && clr > 0)
749749            {
750750               /* Direct select, but only outside EXTBG! */
751               // Direct color format is: 0 | BB000 | GGG00 | RRR00, HW confirms that the data is zero padded.
751               // Direct color format is: 0 | BB000 | GGG00 | RRR00, HW confirms that the data is zero padded.
752752               // In other words, like normal direct color, with pal = 0
753753               c = snes_get_bgcolor(snes_ppu.direct_color && layer == SNES_BG1, 0, clr);
754754               snes_set_scanline_pixel(screen, xpos, c, priority, layer, 0);
r7772r7773
13201320            switch (snes_ppu.layer[jj].wlog_mask)
13211321            {
13221322               case 0x00:   /* OR */
1323                  snes_ppu.clipmasks[jj][ii] = (w1 | w2) ? 0x00 : 0xff;
1323                  snes_ppu.clipmasks[jj][ii] = w1 | w2 ? 0x00 : 0xff;
13241324                  break;
13251325               case 0x01:   /* AND */
1326                  snes_ppu.clipmasks[jj][ii] = (w1 & w2) ? 0x00 : 0xff;
1326                  snes_ppu.clipmasks[jj][ii] = w1 & w2 ? 0x00 : 0xff;
13271327                  break;
13281328               case 0x02:   /* XOR */
1329                  snes_ppu.clipmasks[jj][ii] = (w1 ^ w2) ? 0x00 : 0xff;
1329                  snes_ppu.clipmasks[jj][ii] = w1 ^ w2 ? 0x00 : 0xff;
13301330                  break;
13311331               case 0x03:   /* XNOR */
13321332                  snes_ppu.clipmasks[jj][ii] = !(w1 ^ w2) ? 0x00 : 0xff;
r7772r7773
17261726
17271727 SNES VRAM accesses:
17281728
1729 VRAM accesses during active display are invalid.
1730 Unlike OAM and CGRAM, they will not be written
1731 anywhere at all. Thanks to byuu's researches,
1732 the ranges where writes are invalid have been
1733 validated on hardware, as has the edge case where
1734 the S-CPU open bus can be written if the write
1735 occurs during the very last clock cycle of
1729 VRAM accesses during active display are invalid.
1730 Unlike OAM and CGRAM, they will not be written
1731 anywhere at all. Thanks to byuu's researches,
1732 the ranges where writes are invalid have been
1733 validated on hardware, as has the edge case where
1734 the S-CPU open bus can be written if the write
1735 occurs during the very last clock cycle of
17361736 vblank.
17371737 Our implementation could be not 100% accurate
17381738 when interlace is active.
r7772r7773
17551755
17561756static READ8_HANDLER( snes_vram_read )
17571757{
1758   UINT8 res = 0;
1758   UINT8 res = 0;
17591759   offset &= 0x1ffff;
17601760
17611761   if (snes_ppu.screen_disabled)
r7772r7773
17691769      if (snes_ppu.interlace == 2)
17701770         ls++;
17711771
1772      if (v == ls && h == 1362)
1772      if (v == ls && h == 1362)
17731773         res = 0;
1774      else if (v < snes_ppu.beam.last_visible_line - 1)
1774      else if (v < snes_ppu.beam.last_visible_line - 1)
17751775         res = 0;
1776      else if (v == snes_ppu.beam.last_visible_line - 1)
1776      else if (v == snes_ppu.beam.last_visible_line - 1)
17771777      {
1778         if (h == 1362)
1778         if (h == 1362)
17791779            res = snes_vram[offset];
1780         else
1780         else
17811781            res = 0;
1782      }
1783      else
1782      }
1783      else
17841784         res = snes_vram[offset];
17851785   }
17861786   return res;
r7772r7773
17961796   {
17971797      UINT16 v = video_screen_get_vpos(space->machine->primary_screen);
17981798      UINT16 h = video_screen_get_hpos(space->machine->primary_screen);
1799      if (v == 0)
1799      if (v == 0)
18001800      {
1801         if (h <= 4)
1801         if (h <= 4)
18021802            snes_vram[offset] = data;
1803         else if (h == 6)
1803         else if (h == 6)
18041804            snes_vram[offset] = snes_open_bus_r(space, 0);
1805         else
1805         else
18061806         {
18071807            //no write
18081808         }
1809      }
1810      else if (v < snes_ppu.beam.last_visible_line)
1809      }
1810      else if (v < snes_ppu.beam.last_visible_line)
18111811      {
18121812         //no write
1813      }
1814      else if (v == snes_ppu.beam.last_visible_line)
1813      }
1814      else if (v == snes_ppu.beam.last_visible_line)
18151815      {
1816         if (h <= 4)
1816         if (h <= 4)
18171817         {
18181818            //no write
1819         }
1820         else
1819         }
1820         else
18211821            snes_vram[offset] = data;
18221822      }
1823      else
1823      else
18241824         snes_vram[offset] = data;
18251825   }
18261826}
r7772r7773
18301830 SNES OAM accesses:
18311831
18321832 OAM accesses during active display are allowed.
1833 The actual address varies during rendering, as the
1834 PPU reads in data itself for processing.
1835 Unfortunately, no one has been able (yet) to
1836 determine how this works. The only known game to
1837 actually access OAM during active display is
1838 Uniracers and it expects accesses to map to
1833 The actual address varies during rendering, as the
1834 PPU reads in data itself for processing.
1835 Unfortunately, no one has been able (yet) to
1836 determine how this works. The only known game to
1837 actually access OAM during active display is
1838 Uniracers and it expects accesses to map to
18391839 offset 0x0218. Hence, following byuu's choice
1840 we rerouted OAM accesses during active display
1841 to 0x0218 (0x010c in our snes_oam).
1842 This is a hack, but it is more accurate than
1843 writing to the 'expected' address set by
1840 we rerouted OAM accesses during active display
1841 to 0x0218 (0x010c in our snes_oam).
1842 This is a hack, but it is more accurate than
1843 writing to the 'expected' address set by
18441844 $2102,$2103.
18451845
18461846 Notice that, since snes_ram[OAMDATA] is never
r7772r7773
18591859   {
18601860      UINT16 v = video_screen_get_vpos(space->machine->primary_screen);
18611861
1862      if (v < snes_ppu.beam.last_visible_line)
1862      if (v < snes_ppu.beam.last_visible_line)
18631863         offset = 0x010c;
18641864   }
18651865
r7772r7773
18771877   {
18781878      UINT16 v = video_screen_get_vpos(space->machine->primary_screen);
18791879
1880      if (v < snes_ppu.beam.last_visible_line)
1880      if (v < snes_ppu.beam.last_visible_line)
18811881         offset = 0x010c;
18821882   }
18831883
r7772r7773
18891889
18901890/*************************************************
18911891
1892 SNES CGRAM accesses:
1892 SNES CGRAM accesses:
18931893
1894 CGRAM writes during hblank are valid. During
1895 active display, the actual address the data
1896 is written to varies, as the PPU itself changes
1897 the address. Like OAM, it is not known the exact
1894 CGRAM writes during hblank are valid. During
1895 active display, the actual address the data
1896 is written to varies, as the PPU itself changes
1897 the address. Like OAM, it is not known the exact
18981898 algorithm used, but no commercial software seems
1899 to attempt this. While byuu, in his emu, maps
1899 to attempt this. While byuu, in his emu, maps
19001900 those accesses to 0x01ff, because it is more
1901 accurate to invalidate the 'expected' address
1901 accurate to invalidate the 'expected' address
19021902 than not, MESS has issues if we don't write to
19031903 the expected address (see e.g. Tokimeki Memorial).
19041904 This is because writes should work during hblank
19051905 (so that the game can produce color fading), but
1906 ends up not working with the conditions below.
1907 Hence, for the moment, we only document the
1906 ends up not working with the conditions below.
1907 Hence, for the moment, we only document the
19081908 solution adopted by BSNES without enabling it.
19091909*************************************************/
19101910
19111911static READ8_HANDLER( snes_cgram_read )
19121912{
1913   UINT8 res = 0;
1913   UINT8 res = 0;
19141914   offset &= 0x1ff;
19151915
19161916#if 0
r7772r7773
19191919      UINT16 v = video_screen_get_vpos(space->machine->primary_screen);
19201920      UINT16 h = video_screen_get_hpos(space->machine->primary_screen);
19211921
1922      if (v < snes_ppu.beam.last_visible_line && h >= 128 && h < 1096)
1922      if (v < snes_ppu.beam.last_visible_line && h >= 128 && h < 1096)
19231923         offset = 0x1ff;
19241924   }
19251925#endif
19261926
1927   res = ((UINT8 *)snes_cgram)[offset];
1927   res = ((UINT8 *)snes_cgram)[offset];
19281928
1929   // CGRAM palette data format is 15-bits (0,bbbbb,ggggg,rrrrr).
1929   // CGRAM palette data format is 15-bits (0,bbbbb,ggggg,rrrrr).
19301930   // Highest bit is simply ignored.
19311931   if (offset & 0x01)
19321932      res &= 0x7f;
r7772r7773
19471947      UINT16 v = video_screen_get_vpos(space->machine->primary_screen);
19481948      UINT16 h = video_screen_get_hpos(space->machine->primary_screen);
19491949
1950      if (v < snes_ppu.beam.last_visible_line && h >= 128 && h < 1096)
1950      if (v < snes_ppu.beam.last_visible_line && h >= 128 && h < 1096)
19511951         offset = 0x1ff;
19521952   }
19531953#endif
19541954
1955   // CGRAM palette data format is 15-bits (0,bbbbb,ggggg,rrrrr).
1955   // CGRAM palette data format is 15-bits (0,bbbbb,ggggg,rrrrr).
19561956   // Highest bit is simply ignored.
19571957   if (offset & 0x01)
19581958      data &= 0x7f;
r7772r7773
21522152               snes_ppu.oam.write_latch = data;
21532153            else
21542154            {
2155               // in this case, we not only write data to the upper byte of the word,
2155               // in this case, we not only write data to the upper byte of the word,
21562156               // but also snes_ppu.oam.write_latch to the lower byte (recall that
21572157               // snes_ram[OAMDATA] is used to select high/low byte)
21582158               snes_oam_write(space, snes_ppu.oam.address, data);
src/mame/video/rdpblend.h
r7772r7773
3232      MiscState*         m_misc_state;
3333      Processor*         m_rdp;
3434
35      bool             Blend16Bit(UINT16* fb, UINT8* hb, RDP::Color c1, RDP::Color c2, int dith);
36      bool             Blend16Bit1Cycle(UINT16* fb, UINT8* hb, RDP::Color c, int dith);
37      bool             Blend16Bit2Cycle(UINT16* fb, UINT8* hb, RDP::Color c1, RDP::Color c2, int dith);
38      bool             Blend32Bit(UINT32* fb, RDP::Color c1, RDP::Color c2);
39      bool             Blend32Bit1Cycle(UINT32* fb, RDP::Color c);
40      bool             Blend32Bit2Cycle(UINT32* fb, RDP::Color c1, RDP::Color c2);
35      bool            Blend16Bit(UINT16* fb, UINT8* hb, RDP::Color c1, RDP::Color c2, int dith);
36      bool            Blend16Bit1Cycle(UINT16* fb, UINT8* hb, RDP::Color c, int dith);
37      bool            Blend16Bit2Cycle(UINT16* fb, UINT8* hb, RDP::Color c1, RDP::Color c2, int dith);
38      bool            Blend32Bit(UINT32* fb, RDP::Color c1, RDP::Color c2);
39      bool            Blend32Bit1Cycle(UINT32* fb, RDP::Color c);
40      bool            Blend32Bit2Cycle(UINT32* fb, RDP::Color c1, RDP::Color c2);
4141      bool            AlphaCompare(UINT8 alpha);
4242
43      void             BlendEquation0Force(INT32* r, INT32* g, INT32* b, int bsel_special);
44      void             BlendEquation0NoForce(INT32* r, INT32* g, INT32* b, int bsel_special);
45      void             BlendEquation1Force(INT32* r, INT32* g, INT32* b, int bsel_special);
46      void             BlendEquation1NoForce(INT32* r, INT32* g, INT32* b, int bsel_special);
43      void            BlendEquation0Force(INT32* r, INT32* g, INT32* b, int bsel_special);
44      void            BlendEquation0NoForce(INT32* r, INT32* g, INT32* b, int bsel_special);
45      void            BlendEquation1Force(INT32* r, INT32* g, INT32* b, int bsel_special);
46      void            BlendEquation1NoForce(INT32* r, INT32* g, INT32* b, int bsel_special);
4747
48      void             DitherRGB(INT32* r, INT32* g, INT32* b, int dith);
48      void            DitherRGB(INT32* r, INT32* g, INT32* b, int dith);
4949};
5050
5151} // namespace RDP
src/mame/video/galastrm.c
r7772r7773
269269   const int ly  = srcbitmap->height;
270270
271271   static int rsxb=0, rsyb=0, rsxoffs=0, rsyoffs=0;
272   int sx, sy, yx, yy, zx, zy, pxx, pxy, pyx, pyy;
273   float ssn, scs, ysn, ycs, zsn, zcs;
272   int yx, /*yy,*/ zx, zy, pxx, pxy, pyx, pyy;
273   float /*ssn, scs, ysn, ycs,*/ zsn, zcs;
274274
275275
276276   pxx = 0;
r7772r7773
347347   pxy = 0;
348348   pyx = 0;
349349   pyy = 0;
350   sx  = 0;
351   sy  = 0;
352350   yx  = 0;
353   yy  = 0;
354   ssn = 0.0;
355   scs = 0.0;
356   ysn = 0.0;
357   ycs = 0.0;
351   //yy  = 0;
352   //ssn = 0.0;
353   //scs = 0.0;
354   //ysn = 0.0;
355   //ycs = 0.0;
358356
359357   if (galastrm_tc0610_ctrl_reg[1][7])
360358   {
r7772r7773
371369         {
372370            pyy += ryx;
373371            pyx += -ryy;
374            yy++;
372            //yy++;
375373         }
376374         if (yx >= 0.0)
377375         {
378376            yx = (int)((8.0 - log((double)yx) / log(2.0)) * 6.0);
379            ysn = sin(DEGREE_TO_RADIAN(yx));
380            ycs = 1.0 - ysn*ysn;
377            //ysn = sin(DEGREE_TO_RADIAN(yx));
378            //ycs = 1.0 - ysn*ysn;
381379         }
382380      }
383381
r7772r7773
392390         {
393391            pxx += rsx;
394392            pxy += rsy;
395            sx++;
396393         }
397394         while (sqrt(pow((float)pyy/65536.0, 2.0) + pow((float)pyx/65536.0, 2.0)) < (float)(ly / 2))
398395         {
399396            pyy += rsx;
400397            pyx += -rsy;
401            sy++;
402398         }
403399      }
404      ssn = ((float)pxy/65536.0) / (float)(lx / 2);
405      scs = ((float)pyy/65536.0) / (float)(ly / 2);
400      //ssn = ((float)pxy/65536.0) / (float)(lx / 2);
401      //scs = ((float)pyy/65536.0) / (float)(ly / 2);
406402   }
407403
408404
src/mame/video/tetrisp2.c
r7772r7773
383383   int tx, ty, sx, sy, flipx, flipy;
384384   int xsize, ysize;
385385   int code, attr, color, size;
386   int flipscreen;
387386   int pri;
388387   int xzoom, yzoom;
389388   UINT32 primask;
r7772r7773
393392   UINT16      *source   =   sprram_top;
394393   UINT16   *finish   =   sprram_top + (sprram_size - 0x10) / 2;
395394
396   flipscreen = flip;
397
398395   if (reverseorder == 1)
399396   {
400397      source   = sprram_top + (sprram_size - 0x10) / 2;
src/mame/video/wgp.c
r7772r7773
530530
531531   /* I have a fairly strong feeling these should be UINT32's, x_index is
532532       falling through from max +ve to max -ve quite a lot in this routine */
533   int sx, x_index, x_step, x_max;
533   int sx, x_index, x_step;
534534
535535   UINT32 zoomx, zoomy;
536536   UINT16 scanline[512];
r7772r7773
604604         x_step += (((0x7f - row_zoom) << 8) & 0xffff);
605605      }
606606
607      x_max = x_index + screen_width * x_step;
608607      src16 = BITMAP_ADDR16(srcbitmap, src_y_index, 0);
609608      tsrc  = BITMAP_ADDR8(flagsbitmap, src_y_index, 0);
610609      dst16 = scanline;
src/mame/video/f1gp.c
r7772r7773
188188   for (attr_start = 0x0200 - 8; attr_start >= first; attr_start -= 4)
189189   {
190190      int map_start;
191      int ox, oy, x, y, xsize, ysize, zoomx, zoomy, flipx, flipy, color, pri;
191      int ox, oy, x, y, xsize, ysize, zoomx, zoomy, flipx, flipy, color/*, pri*/;
192192      /* table hand made by looking at the ship explosion in attract mode */
193193      /* it's almost a logarithmic scale but not exactly */
194194      static const int zoomtable[16] = { 0,7,14,20,25,30,34,38,42,46,49,52,54,57,59,61 };
r7772r7773
204204      flipx = spram[attr_start + 2] & 0x0800;
205205      flipy = spram[attr_start + 2] & 0x8000;
206206      color = (spram[attr_start + 2] & 0x000f);// + 16 * spritepalettebank;
207      pri = 0;//spram[attr_start + 2] & 0x0010;
207      //pri = spram[attr_start + 2] & 0x0010;
208208      map_start = spram[attr_start + 3];
209209
210210      zoomx = 16 - zoomtable[zoomx] / 8;
src/mame/video/oneshot.c
r7772r7773
6969static void draw_crosshairs( running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect )
7070{
7171   oneshot_state *state = (oneshot_state *)machine->driver_data;
72   int xpos,ypos;
72   //int xpos,ypos;
7373
7474   /* get gun raw coordinates (player 1) */
7575   state->gun_x_p1 = (input_port_read(machine, "LIGHT0_X") & 0xff) * 320 / 256;
7676   state->gun_y_p1 = (input_port_read(machine, "LIGHT0_Y") & 0xff) * 240 / 256;
7777
7878   /* compute the coordinates for drawing (from routine at 0x009ab0) */
79   xpos = state->gun_x_p1;
80   ypos = state->gun_y_p1;
79   //xpos = state->gun_x_p1;
80   //ypos = state->gun_y_p1;
8181
8282   state->gun_x_p1 += state->gun_x_shift;
8383
r7772r7773
9191   state->gun_y_p2 = (input_port_read(machine, "LIGHT1_Y") & 0xff) * 240 / 256;
9292
9393   /* compute the coordinates for drawing (from routine at 0x009b6e) */
94   xpos = state->gun_x_p2;
95   ypos = state->gun_y_p2;
94   //xpos = state->gun_x_p2;
95   //ypos = state->gun_y_p2;
9696
9797   state->gun_x_p2 += state->gun_x_shift - 0x0a;
9898   if (state->gun_x_p2 < 0)
src/mame/video/rdptrect.h
r7772r7773
4141      int m_flip;
4242
4343   private:
44      void             DrawDefault();
45      void             DrawCopy();
44      void            DrawDefault();
45      void            DrawCopy();
4646
4747      running_machine*   m_machine;
4848      Processor*         m_rdp;
src/mame/video/rastan.c
r7772r7773
7575      /* other bits unknown */
7676
7777      pc090oj_set_sprite_ctrl(state->pc090oj, (data & 0xe0) >> 5);
78
79      /* If data = 4, the Piston Motor is off, otherwise it's on. */
80      if (data == 4)
81      {
82         output_set_value("Player1_Recoil_Piston", 0);
83      }
84      else
85      {
86         output_set_value("Player1_Recoil_Piston", 1);
87      }
7888   }
7989}
8090
src/mame/video/gijoe.c
r7772r7773
8080   gijoe_state *state = (gijoe_state *)screen->machine->driver_data;
8181   static const int K053251_CI[4] = { K053251_CI1, K053251_CI2, K053251_CI3, K053251_CI4 };
8282   int layer[4];
83   int vrc_mode, vrc_new, colorbase_new, primode, dirty, i;
83   int vrc_mode, vrc_new, colorbase_new, /*primode,*/ dirty, i;
8484   int mask = 0;
8585
8686   // update tile offsets
r7772r7773
145145   }
146146
147147   // seems to switch the K053251 between different priority modes, detail unknown
148   primode = k053251_get_priority(state->k053251, K053251_CI1);
148   // primode = k053251_get_priority(state->k053251, K053251_CI1);
149149
150150   layer[0] = 0;
151151   state->layer_pri[0] = 0; // not sure
src/mame/video/konamigx.c
r7772r7773
11741174   int shadowon[3], shdpri[3], layerid[6], layerpri[6];
11751175
11761176   struct GX_OBJ *objpool, *objptr;
1177   int wrapsize, xwraplim, ywraplim, cltc_shdpri, prflp, disp;
1177   int wrapsize, xwraplim, ywraplim, cltc_shdpri, /*prflp,*/ disp;
11781178   int xa,ya,ox,oy,zw,zh,flipx,flipy,mirrorx,mirrory,zoomx,zoomy,scalex,scaley,nozoom;
11791179   int screenwidth, flipscreenx, flipscreeny, offx, offy;
11801180   int nobj, i, j, k, l, temp, temp1, temp2, temp3, temp4, count;
r7772r7773
12381238   }
12391239
12401240   // invert layer priority when this flag is set (not used by any GX game?)
1241   prflp = K055555_read_register(K55_CONTROL) & K55_CTL_FLIPPRI;
1241   //prflp = K055555_read_register(K55_CONTROL) & K55_CTL_FLIPPRI;
12421242
12431243   layerpri[0] = K055555_read_register(K55_PRIINP_0);
12441244   layerpri[1] = K055555_read_register(K55_PRIINP_3);
src/mame/video/ppu2c0x.c
r7772r7773
492492   int *ppu_regs = &ppu2c0x->regs[0];
493493
494494   int sprite_xpos, sprite_ypos, sprite_index;
495   int tile, index1, page;
495   int tile, index1;
496496   int pri;
497497
498498   int flipx, flipy, color;
r7772r7773
551551            tile &= ~0x01;
552552            tile |= 0x100;
553553         }
554         /* note that the sprite page value has no effect on 8x16 sprites */
555         page = tile >> 6;
556554      }
557      else
558         page = (tile >> 6) | sprite_page;
559555
560556      if (ppu_latch)
561557         (*ppu_latch)(device, (sprite_page << 10) | ((tile & 0xff) << 4));
r7772r7773
737733static void update_scanline( running_device *device )
738734{
739735   ppu2c0x_state *ppu2c0x = get_token(device);
740   int scanline = ppu2c0x->scanline;
736   const int scanline = ppu2c0x->scanline;
741737   int *ppu_regs = &ppu2c0x->regs[0];
742738
743739   if (scanline <= PPU_BOTTOM_VISIBLE_SCANLINE)
r7772r7773
756752      else
757753      {
758754         bitmap_t *bitmap = ppu2c0x->bitmap;
759         const int scanline = ppu2c0x->scanline;
760755         UINT8 color_mask;
761756         UINT16 back_pen;
762757         int i;
src/mame/video/n64.c
r7772r7773
424424      case 11:   *input_r = &m_shade_color.i.a;      *input_g = &m_shade_color.i.a;      *input_b = &m_shade_color.i.a;      break;
425425      case 12:   *input_r = &m_env_color.i.a;      *input_g = &m_env_color.i.a;      *input_b = &m_env_color.i.a;      break;
426426      case 13:   *input_r = &m_lod_frac;            *input_g = &m_lod_frac;            *input_b = &m_lod_frac;            break;
427      case 14:   *input_r = &m_prim_lod_frac;      *input_g = &m_prim_lod_frac;      *input_b = &m_prim_lod_frac;       break;
427      case 14:   *input_r = &m_prim_lod_frac;      *input_g = &m_prim_lod_frac;      *input_b = &m_prim_lod_frac;      break;
428428      case 15:   *input_r = (UINT8*)&m_k5;         *input_g = (UINT8*)&m_k5;         *input_b = (UINT8*)&m_k5;         break;
429429      case 16: case 17: case 18: case 19: case 20: case 21: case 22: case 23:
430430      case 24: case 25: case 26: case 27: case 28: case 29: case 30: case 31:
r7772r7773
19841984
19851985   switch (m_misc_state.m_ti_size) // slindwords Neededby Vigilante 8
19861986   {
1987      case PIXEL_SIZE_4BIT:   ti_width2 >>= 1;    slindwords >>= 3;    width >>= 1;   break;
1988      case PIXEL_SIZE_8BIT:                   slindwords >>= 2;               break;
1987      case PIXEL_SIZE_4BIT:   ti_width2 >>= 1;   slindwords >>= 3;   width >>= 1;   break;
1988      case PIXEL_SIZE_8BIT:                  slindwords >>= 2;               break;
19891989      case PIXEL_SIZE_16BIT:   ti_width2 <<= 1;   slindwords >>= 1;   width <<= 1;   break;
1990      case PIXEL_SIZE_32BIT:   ti_width2 <<= 2;                   width <<= 2;   break;
1990      case PIXEL_SIZE_32BIT:   ti_width2 <<= 2;                  width <<= 2;   break;
19911991   }
19921992
19931993   if ((tb + (width >> 2)) > 0x400)
src/mame/video/n64.h
r7772r7773
347347
348348      ~Processor() { }
349349
350      void    Dasm(char *buffer);
350      void   Dasm(char *buffer);
351351
352      void    ProcessList();
353      UINT32    ReadData(UINT32 address);
352      void   ProcessList();
353      UINT32   ReadData(UINT32 address);
354354
355      void    InitInternalState()
355      void   InitInternalState()
356356      {
357357         if(m_machine)
358358         {
r7772r7773
374374
375375      // CPU-visible registers
376376      void      SetStartReg(UINT32 val) { m_start = val; }
377      UINT32      GetStartReg() { return m_start; }
377      UINT32      GetStartReg() const { return m_start; }
378378
379379      void      SetEndReg(UINT32 val) { m_end = val; }
380      UINT32      GetEndReg() { return m_end; }
380      UINT32      GetEndReg() const { return m_end; }
381381
382382      void      SetCurrentReg(UINT32 val) { m_current = val; }
383      UINT32      GetCurrentReg() { return m_current; }
383      UINT32      GetCurrentReg() const { return m_current; }
384384
385385      void      SetStatusReg(UINT32 val) { m_status = val; }
386      UINT32      GetStatusReg() { return m_status; }
386      UINT32      GetStatusReg() const { return m_status; }
387387
388388      // Functional blocks
389389      Blender*      GetBlender() { return &m_blender; }
r7772r7773
449449      void      SetPrimLODFrac(UINT8 prim_lod_frac) { m_prim_lod_frac = prim_lod_frac; }
450450
451451      // Color Combiner
452      void       SetSubAInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code);
453      void       SetSubBInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code);
454      void       SetMulInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code);
455      void       SetAddInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code);
456      void       SetSubInputAlpha(UINT8 **input, int code);
457      void       SetMulInputAlpha(UINT8 **input, int code);
452      void      SetSubAInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code);
453      void      SetSubBInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code);
454      void      SetMulInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code);
455      void      SetAddInputRGB(UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, int code);
456      void      SetSubInputAlpha(UINT8 **input, int code);
457      void      SetMulInputAlpha(UINT8 **input, int code);
458458
459459      // Texture memory
460460      UINT8*      GetTMEM() { return m_tmem; }
r7772r7773
464464      Tile*      GetTiles(){ return m_tiles; }
465465
466466      // Emulation Accelerators
467      UINT32      LookUp16To32(UINT16 in) { return m_rgb16_to_rgb32_lut[in]; }
468      UINT32      LookUpIA8To32(UINT16 in) { return m_ia8_to_rgb32_lut[in]; }
467      UINT32      LookUp16To32(UINT16 in) const { return m_rgb16_to_rgb32_lut[in]; }
468      UINT32      LookUpIA8To32(UINT16 in) const { return m_ia8_to_rgb32_lut[in]; }
469469      UINT16*      GetCCLUT1() { return m_cc_lut1; }
470470      UINT8*      GetCCLUT2() { return m_cc_lut2; }
471471      UINT8      GetRandom() { return m_misc_state.m_random_seed += 0x13; }
472472
473473      // YUV Factors
474474      void      SetYUVFactors(INT32 k0, INT32 k1, INT32 k2, INT32 k3, INT32 k4, INT32 k5) { m_k0 = k0; m_k1 = k1; m_k2 = k2; m_k3 = k3; m_k4 = k4; m_k5 = k5; }
475      INT32      GetK0() { return m_k0; }
476      INT32      GetK1() { return m_k1; }
477      INT32      GetK2() { return m_k2; }
478      INT32      GetK3() { return m_k3; }
475      INT32      GetK0() const { return m_k0; }
476      INT32      GetK1() const { return m_k1; }
477      INT32      GetK2() const { return m_k2; }
478      INT32      GetK3() const { return m_k3; }
479479      INT32*      GetK4() { return &m_k4; }
480480      INT32*      GetK5() { return &m_k5; }
481481
482482      // Blender-related (move into RDP::Blender)
483      void       SetBlenderInput(int cycle, int which, UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, UINT8 **input_a, int a, int b);
483      void      SetBlenderInput(int cycle, int which, UINT8 **input_r, UINT8 **input_g, UINT8 **input_b, UINT8 **input_a, int a, int b);
484484
485485      // Render-related (move into eventual drawing-related classes?)
486486      Rectangle*      GetScissor() { return &m_scissor; }
487      void          TCDiv(INT32 ss, INT32 st, INT32 sw, INT32* sss, INT32* sst);
487      void         TCDiv(INT32 ss, INT32 st, INT32 sw, INT32* sss, INT32* sst);
488488      UINT32         GetLog2(UINT32 lod_clamp);
489      void          RenderSpans(int start, int end, int tilenum, bool shade, bool texture, bool zbuffer, bool flip);
489      void         RenderSpans(int start, int end, int tilenum, bool shade, bool texture, bool zbuffer, bool flip);
490490      UINT8*         GetHiddenBits() { return m_hidden_bits; }
491491      void         GetAlphaCvg(UINT8 *comb_alpha);
492      const UINT8*   GetBayerMatrix() { return s_bayer_matrix; }
493      const UINT8*   GetMagicMatrix() { return s_magic_matrix; }
492      const UINT8*   GetBayerMatrix() const { return s_bayer_matrix; }
493      const UINT8*   GetMagicMatrix() const { return s_magic_matrix; }
494494      Span*         GetSpans() { return m_span; }
495      int            GetCurrFIFOIndex() { return m_cmd_cur; }
496      UINT32         GetFillColor32() { return m_fill_color; }
495      int            GetCurrFIFOIndex() const { return m_cmd_cur; }
496      UINT32         GetFillColor32() const { return m_fill_color; }
497497
498498      void         ZStore(UINT16* zb, UINT8* zhb, UINT32 z, UINT32 deltaz);
499      UINT32          DecompressZ(UINT16 *zb);
500      UINT16          DecompressDZ(UINT16* zb, UINT8* zhb);
501      INT32          NormalizeDZPix(INT32 sum);
499      UINT32         DecompressZ(UINT16 *zb);
500      UINT16         DecompressDZ(UINT16* zb, UINT8* zhb);
501      INT32         NormalizeDZPix(INT32 sum);
502502      bool         ZCompare(void* fb, UINT8* hb, UINT16* zb, UINT8* zhb, UINT32 sz, UINT16 dzpix);
503503
504504      // Fullscreen update-related
505505      void         VideoUpdate(bitmap_t *bitmap);
506506
507507      // Commands
508      void       CmdInvalid(UINT32 w1, UINT32 w2);
508      void      CmdInvalid(UINT32 w1, UINT32 w2);
509509      void      CmdNoOp(UINT32 w1, UINT32 w2);
510510      void      CmdTriangle(UINT32 w1, UINT32 w2);
511511      void      CmdTriangleZ(UINT32 w1, UINT32 w2);
r7772r7773
515515      void      CmdTriangleSZ(UINT32 w1, UINT32 w2);
516516      void      CmdTriangleST(UINT32 w1, UINT32 w2);
517517      void      CmdTriangleSTZ(UINT32 w1, UINT32 w2);
518      void       CmdTexRect(UINT32 w1, UINT32 w2);
519      void       CmdTexRectFlip(UINT32 w1, UINT32 w2);
520      void       CmdSyncLoad(UINT32 w1, UINT32 w2);
521      void       CmdSyncPipe(UINT32 w1, UINT32 w2);
522      void       CmdSyncTile(UINT32 w1, UINT32 w2);
523      void       CmdSyncFull(UINT32 w1, UINT32 w2);
524      void       CmdSetKeyGB(UINT32 w1, UINT32 w2);
525      void       CmdSetKeyR(UINT32 w1, UINT32 w2);
526      void       CmdSetFillColor32(UINT32 w1, UINT32 w2);
527      void       CmdSetConvert(UINT32 w1, UINT32 w2);
528      void       CmdSetScissor(UINT32 w1, UINT32 w2);
529      void       CmdSetPrimDepth(UINT32 w1, UINT32 w2);
530      void       CmdSetOtherModes(UINT32 w1, UINT32 w2);
518      void      CmdTexRect(UINT32 w1, UINT32 w2);
519      void      CmdTexRectFlip(UINT32 w1, UINT32 w2);
520      void      CmdSyncLoad(UINT32 w1, UINT32 w2);
521      void      CmdSyncPipe(UINT32 w1, UINT32 w2);
522      void      CmdSyncTile(UINT32 w1, UINT32 w2);
523      void      CmdSyncFull(UINT32 w1, UINT32 w2);
524      void      CmdSetKeyGB(UINT32 w1, UINT32 w2);
525      void      CmdSetKeyR(UINT32 w1, UINT32 w2);
526      void      CmdSetFillColor32(UINT32 w1, UINT32 w2);
527      void      CmdSetConvert(UINT32 w1, UINT32 w2);
528      void      CmdSetScissor(UINT32 w1, UINT32 w2);
529      void      CmdSetPrimDepth(UINT32 w1, UINT32 w2);
530      void      CmdSetOtherModes(UINT32 w1, UINT32 w2);
531531      void      CmdLoadTLUT(UINT32 w1, UINT32 w2);
532532      void      CmdSetTileSize(UINT32 w1, UINT32 w2);
533      void       CmdLoadBlock(UINT32 w1, UINT32 w2);
534      void       CmdLoadTile(UINT32 w1, UINT32 w2);
533      void      CmdLoadBlock(UINT32 w1, UINT32 w2);
534      void      CmdLoadTile(UINT32 w1, UINT32 w2);
535535      void      CmdFillRect(UINT32 w1, UINT32 w2);
536      void       CmdSetTile(UINT32 w1, UINT32 w2);
537      void       CmdSetFogColor(UINT32 w1, UINT32 w2);
538      void       CmdSetBlendColor(UINT32 w1, UINT32 w2);
539      void       CmdSetPrimColor(UINT32 w1, UINT32 w2);
540      void       CmdSetEnvColor(UINT32 w1, UINT32 w2);
541      void       CmdSetCombine(UINT32 w1, UINT32 w2);
542      void       CmdSetTextureImage(UINT32 w1, UINT32 w2);
543      void       CmdSetMaskImage(UINT32 w1, UINT32 w2);
544      void       CmdSetColorImage(UINT32 w1, UINT32 w2);
536      void      CmdSetTile(UINT32 w1, UINT32 w2);
537      void      CmdSetFogColor(UINT32 w1, UINT32 w2);
538      void      CmdSetBlendColor(UINT32 w1, UINT32 w2);
539      void      CmdSetPrimColor(UINT32 w1, UINT32 w2);
540      void      CmdSetEnvColor(UINT32 w1, UINT32 w2);
541      void      CmdSetCombine(UINT32 w1, UINT32 w2);
542      void      CmdSetTextureImage(UINT32 w1, UINT32 w2);
543      void      CmdSetMaskImage(UINT32 w1, UINT32 w2);
544      void      CmdSetColorImage(UINT32 w1, UINT32 w2);
545545
546546      void      Triangle(bool shade, bool texture, bool zbuffer);
547      UINT32       AddRightCvg(UINT32 x, UINT32 k);
548      UINT32       AddLeftCvg(UINT32 x, UINT32 k);
547      UINT32      AddRightCvg(UINT32 x, UINT32 k);
548      UINT32      AddLeftCvg(UINT32 x, UINT32 k);
549549
550550      UINT32*      GetCommandData() { return m_cmd_data; }
551551
r7772r7773
554554      Framebuffer      m_framebuffer;
555555      TexturePipe      m_tex_pipe;
556556
557      OtherModes       m_other_modes;
557      OtherModes      m_other_modes;
558558      MiscState      m_misc_state;
559559      ColorInputs      m_color_inputs;
560560      CombineModes   m_combine;
561561
562      Color       m_pixel_color;
563      Color       m_inv_pixel_color;
564      Color       m_blended_pixel_color;
565      Color       m_memory_color;
562      Color      m_pixel_color;
563      Color      m_inv_pixel_color;
564      Color      m_blended_pixel_color;
565      Color      m_memory_color;
566566      Color      m_blend_color;
567567
568568      Color      m_prim_color;
r7772r7773
577577      UINT8      m_lod_frac;
578578      UINT8      m_prim_lod_frac;
579579
580      Color       m_one_color;
581      Color       m_zero_color;
580      Color      m_one_color;
581      Color      m_zero_color;
582582
583583      UINT32      m_fill_color;
584584
585      UINT16       m_cc_lut1[(1<<24)];
586      UINT8       m_cc_lut2[(1<<24)];
587      UINT32       m_rgb16_to_rgb32_lut[(1 << 16)];
585      UINT16      m_cc_lut1[(1<<24)];
586      UINT8      m_cc_lut2[(1<<24)];
587      UINT32      m_rgb16_to_rgb32_lut[(1 << 16)];
588588      UINT32      m_ia8_to_rgb32_lut[(1 << 16)];
589589
590590      UINT32      m_cmd_data[0x1000];
r7772r7773
651651
652652} // namespace N64
653653
654#endif // _VIDEO_N64_H_
No newline at end of file
654#endif // _VIDEO_N64_H_
src/mame/video/moo.c
r7772r7773
6868   moo_state *state = (moo_state *)screen->machine->driver_data;
6969   static const int K053251_CI[4] = { K053251_CI1, K053251_CI2, K053251_CI3, K053251_CI4 };
7070   int layers[3];
71   int bg_colorbase, new_colorbase, plane, dirty, alpha;
71   int new_colorbase, plane, dirty, alpha;
7272
73   bg_colorbase = k053251_get_palette_index(state->k053251, K053251_CI1);
7473   state->sprite_colorbase = k053251_get_palette_index(state->k053251, K053251_CI0);
7574   state->layer_colorbase[0] = 0x70;
7675
src/mame/video/groundfx.c
r7772r7773
8484   int sprites_flipscreen = 0;
8585   int zoomx, zoomy, zx, zy;
8686   int sprite_chunk,map_offset,code,j,k,px,py;
87   int dimension,total_chunks,bad_chunks;
87   int dimension,total_chunks;
8888   static const int primasks[4] = {0xffff, 0xfffc, 0xfff0, 0xff00 };
8989
9090   /* pdrawgfx() needs us to draw sprites front to back, so we have to build a list
r7772r7773
128128
129129      x -= x_offs;
130130
131      bad_chunks = 0;
132131      dimension = ((dblsize*2) + 2);   // 2 or 4
133132      total_chunks = ((dblsize*3) + 1) << 2;   // 4 or 16
134133      map_offset = tilenum << 2;
r7772r7773
149148
150149            if (code==0xffff)
151150            {
152               bad_chunks += 1;
153151               continue;
154152            }
155153
src/mame/video/vendetta.c
r7772r7773
5555VIDEO_UPDATE( vendetta )
5656{
5757   vendetta_state *state = (vendetta_state *)screen->machine->driver_data;
58   int layer[3], bg_colorbase;
58   int layer[3];
5959
60   bg_colorbase = k053251_get_palette_index(state->k053251, K053251_CI0);
6160   state->sprite_colorbase = k053251_get_palette_index(state->k053251, K053251_CI1);
6261   state->layer_colorbase[0] = k053251_get_palette_index(state->k053251, K053251_CI2);
6362   state->layer_colorbase[1] = k053251_get_palette_index(state->k053251, K053251_CI3);
src/mame/video/taito_f3.c
r7772r7773
29222922   const rectangle *visarea = video_screen_get_visible_area(machine->primary_screen);
29232923   const int min_x=visarea->min_x,max_x=visarea->max_x;
29242924   const int min_y=visarea->min_y,max_y=visarea->max_y;
2925   int offs,spritecont,flipx,flipy,old_x,old_y,color,x,y;
2925   int offs,spritecont,flipx,flipy,old_x,color,x,y;
29262926   int sprite,global_x=0,global_y=0,subglobal_x=0,subglobal_y=0;
29272927   int block_x=0, block_y=0;
29282928   int last_color=0,last_x=0,last_y=0,block_zoom_x=0,block_zoom_y=0;
r7772r7773
29382938   int total_sprites=0;
29392939
29402940   color=0;
2941    flipx=flipy=0;
2942    old_y=old_x=0;
2943    y=x=0;
2941   flipx=flipy=0;
2942   old_x=0;
2943   y=x=0;
29442944
29452945   sprite_top=0x1000;
29462946   for (offs = 0; offs < sprite_top && (total_sprites < 0x400); offs += 4)
src/mame/drivers/skimaxx.c
r7772r7773
177177      UINT16 *fg = &fg_buffer[rowaddr << 8];
178178      UINT32 *bg = &skimaxx_bg_buffer_front[rowaddr/2 * 1024/2];
179179      UINT16 *dest = BITMAP_ADDR16(bitmap, scanline, 0);
180      int coladdr = params->coladdr;
180      //int coladdr = params->coladdr;
181181      int x;
182      coladdr = 0;
182      //coladdr = 0;
183183
184184      dest += params->heblnk;
185185      for (x = params->heblnk; x < params->hsblnk; x+=2)
src/mame/drivers/zn.c
r7772r7773
168168   { "tecmowcm", mg01, mg13 }, /* OK */
169169   { "mfjump",   mg01, mg14 }, /* OK */
170170   { "sfchamp",  tt01, tt02 }, /* OK */
171   {"sfchamp24o",tt01, tt02 }, /* OK */
171172   { "sfchampj", tt01, tt02 }, /* OK */
172173   { "psyforce", tt01, tt03 }, /* OK */
173174   { "psyforcej",tt01, tt03 }, /* OK */
r7772r7773
40844085   ROM_LOAD( "e18-01.15",           0x0000000, 0x200000, CRC(dbd1408c) SHA1(ef81064f2f95e5ae25eb1f10d1e78f27f9e294f5) )
40854086ROM_END
40864087
4088ROM_START( sfchamp24o )
4089   TAITOFX1_BIOS
4090
4091   ROM_REGION32_LE( 0x01000000, "user2", 0 )
4092   ROM_LOAD16_BYTE( "e18-11.2",     0x0000001, 0x080000, CRC(f5462f30) SHA1(44eb03a9b51e2d8dd14fe2ed36dbcf17035a22c7) )
4093   ROM_LOAD16_BYTE( "e18-08.7",     0x0000000, 0x080000, CRC(6a5558cd) SHA1(75b26bcaaa213283e7e0dace69ee58f305b4572d) )
4094   ROM_LOAD( "e18-02.12",           0x0600000, 0x200000, CRC(c7b4fe29) SHA1(7f823bd61abf2b15d3ba62bca829a5b1acacfd09) )
4095   ROM_LOAD( "e18-03.16",           0x0800000, 0x200000, CRC(76392346) SHA1(2c5b70c4708208f866feea0472fcc72333061124) )
4096   ROM_LOAD( "e18-04.19",           0x0a00000, 0x200000, CRC(fc3731da) SHA1(58948aad8d7bb7a8449d2bf12e9d5e6d7b4426b5) )
4097   ROM_LOAD( "e18-05.21",           0x0c00000, 0x200000, CRC(2e984c50) SHA1(6d8255e38c67d68bf489c9885663ed2edf148188) )
4098
4099   ROM_REGION( 0x2c000, "audiocpu", 0 )     /* 64k for Z80 code */
4100   ROM_LOAD( "e18-09.22",           0x0000000, 0x004000, CRC(bb5a5319) SHA1(0bb700cafc157d3af663cc9bebb8167487ff2852) )
4101   ROM_CONTINUE(                    0x0010000, 0x01c000 ) /* banked stuff */
4102
4103   ROM_REGION( 0x200000, "ymsnd", 0 )
4104   ROM_LOAD( "e18-01.15",           0x0000000, 0x200000, CRC(dbd1408c) SHA1(ef81064f2f95e5ae25eb1f10d1e78f27f9e294f5) )
4105ROM_END
4106
40874107ROM_START( sfchampj )
40884108   TAITOFX1_BIOS
40894109
r7772r7773
41034123   ROM_LOAD( "e18-01.15",           0x0000000, 0x200000, CRC(dbd1408c) SHA1(ef81064f2f95e5ae25eb1f10d1e78f27f9e294f5) )
41044124ROM_END
41054125
4106/* Eighteen Raizing */
4126/* Eighting/Raizing */
41074127
41084128#define PSARC95_BIOS \
41094129   ROM_REGION32_LE( 0x080000, "user1", 0 ) \
r7772r7773
45364556GAME( 1995, taitofx1, 0,        coh1000ta,zn, coh1000ta, ROT0, "Sony/Taito", "Taito FX1", GAME_IS_BIOS_ROOT )
45374557
45384558GAME( 1995, sfchamp,   taitofx1, coh1000ta,zn, coh1000ta, ROT0, "Taito", "Super Football Champ (Ver 2.5O)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
4559GAME( 1995, sfchamp24o,sfchamp,  coh1000ta,zn, coh1000ta, ROT0, "Taito", "Super Football Champ (Ver 2.4O)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
45394560GAME( 1995, sfchampj,  sfchamp,  coh1000ta,zn, coh1000ta, ROT0, "Taito", "Super Football Champ (Ver 2.4J)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
45404561GAME( 1995, psyforce,  taitofx1, coh1000ta,zn, coh1000ta, ROT0, "Taito", "Psychic Force (Ver 2.4O)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
45414562GAME( 1995, psyforcej, psyforce, coh1000ta,zn, coh1000ta, ROT0, "Taito", "Psychic Force (Ver 2.4J)", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
src/mame/drivers/balsente.c
r7772r7773
12871287   ROM_REGION( 0x10000, "gfx1", 0 )      /* up to 64k of sprites */
12881288   ROM_LOAD( "sdiaggr0.bin", 0x00000, 0x2000, CRC(5e0ff62a) SHA1(3f0ebebb2f58530af7fac57a4780dfb37ef1ee1d) )
12891289
1290    MOTHERBOARD_PALS
1290   MOTHERBOARD_PALS
12911291ROM_END
12921292
12931293
r7772r7773
13121312   ROM_LOAD( "cs-gr3.bin", 0x06000, 0x2000, CRC(b43916a2) SHA1(8d42fb6ae7cf8b2d94eb0c14e00bb115f8ef01b4) )
13131313   ROM_LOAD( "cs-gr4.bin", 0x08000, 0x2000, CRC(a94cd35b) SHA1(0ca0497a1b055ff1ae6b7bc36ae45749dff50caa) )
13141314
1315    MOTHERBOARD_PALS
1315   MOTHERBOARD_PALS
13161316ROM_END
13171317
13181318
r7772r7773
13381338   ROM_LOAD( "ggh-gr4.bin", 0x08000, 0x2000, CRC(b4293435) SHA1(5e2b96c19c4f5c63a5afa2de504d29fe64a4c908) )
13391339   ROM_LOAD( "ggh-gr5.bin", 0x0a000, 0x2000, CRC(d3da0093) SHA1(7474901b089ea62abad0a2f657fd8c4a1be09bf0) )
13401340
1341    MOTHERBOARD_PALS
1341   MOTHERBOARD_PALS
13421342ROM_END
13431343
13441344
1345/*
1346    The Hat Trick cartridge does not have any PAL's.
1347*/
1348
13491345ROM_START( hattrick )
13501346   ROM_REGION( 0x40000, "maincpu", 0 )     /* 64k for code for the first CPU, plus 128k of banked ROMs */
1351   ROM_LOAD( "rom-ab0.u9a", 0x10000, 0x2000, CRC(f25c1b99) SHA1(43b2334be7cfb8091eea963e10547295362372d3) )
1347   ROM_LOAD( "rom-ab0.u9a", 0x10000, 0x2000, CRC(f25c1b99) SHA1(43b2334be7cfb8091eea963e10547295362372d3) ) /* The Hat Trick cartridge does not have any PAL's */
13521348   ROM_LOAD( "rom-ab1.u8a", 0x12000, 0x2000, CRC(c1df3d1f) SHA1(754f537d12efe8891638fd11a2ee8a5b234fb079) )
13531349   ROM_LOAD( "rom-ab2.u7a", 0x14000, 0x2000, CRC(f6c41257) SHA1(05f5e71d08241c559da3bfc286c76cbb22710586) )
13541350   ROM_LOAD( "rom-cd.u3a",  0x2c000, 0x2000, CRC(fc44f36c) SHA1(227d0c93c579d743b615b1fa6da56128e8202e51) )
r7772r7773
13611357   ROM_LOAD( "rom-gr0.u9b", 0x00000, 0x2000, CRC(9f41baba) SHA1(fa817a8e4d2f7b86a2294132e3991f7b6d8cb11a) )
13621358   ROM_LOAD( "rom-gr1.u8b", 0x02000, 0x2000, CRC(951f08c9) SHA1(059a575dd35cd8e822e12ac2606b47b6272bbb41) )
13631359
1364    MOTHERBOARD_PALS
1360   MOTHERBOARD_PALS
13651361ROM_END
13661362
13671363
r7772r7773
13871383   ROM_LOAD( "otw-gr4.bin", 0x08000, 0x2000, CRC(15985c8c) SHA1(94f21c348bfbe4db6d0cfa5b5e35d2df4b8f936d) )
13881384   ROM_LOAD( "otw-gr5.bin", 0x0a000, 0x2000, CRC(448f7e3c) SHA1(505724e90f17b05ccf0137dbed0d33e39db1d5ab) )
13891385
1390    MOTHERBOARD_PALS
1386   MOTHERBOARD_PALS
13911387ROM_END
13921388
13931389
r7772r7773
14131409   ROM_LOAD( "spit-gr4.bin", 0x08000, 0x2000, CRC(b4293435) SHA1(5e2b96c19c4f5c63a5afa2de504d29fe64a4c908) )
14141410   ROM_LOAD( "spit-gr5.bin", 0x0a000, 0x2000, CRC(dc27c970) SHA1(291ef10a8c330ef8e47622246b6301d2e5171df7) )
14151411
1416    MOTHERBOARD_PALS
1412   MOTHERBOARD_PALS
14171413ROM_END
14181414
14191415
r7772r7773
14391435   ROM_LOAD( "rom-gr4.u5b", 0x08000, 0x2000, CRC(3fbfa686) SHA1(6c137d177c7aa2701497ac3ac922fdb8cd9f52b3) )
14401436   ROM_LOAD( "rom-gr5.u4b", 0x0a000, 0x2000, CRC(345f94fb) SHA1(0af24f4e1a797efe5272f64b8a34483fe6002436) )
14411437
1442    /* From a picture in an eBay auction the board appears to have a PAL that needs to be dumped. */
1438   /* From a picture in an eBay auction the board appears to have a PAL that needs to be dumped. */
14431439
1444    MOTHERBOARD_PALS
1440   MOTHERBOARD_PALS
14451441ROM_END
14461442
14471443
14481444ROM_START( stocker )
14491445   ROM_REGION( 0x40000, "maincpu", 0 )     /* 64k for code for the first CPU, plus 128k of banked ROMs */
1446   ROM_LOAD( "ab01.u8a", 0x10000, 0x4000, CRC(6a914d99) SHA1(0df23fcdcb3743d84ce0363424b7c5dd249c6dcf) )
1447   ROM_LOAD( "ab23.u7a", 0x14000, 0x4000, CRC(48e432c2) SHA1(af87009089a3e83fab5c935696edbbf2a15215f9) )
1448   ROM_LOAD( "cd6ef.u1a",0x2c000, 0x4000, CRC(83e6e5c9) SHA1(f0e38a95cb2ea385a587f330c48fc787db0cc65e) )
1449
1450   ROM_REGION( 0x10000, "audiocpu", 0 )      /* 64k for Z80 */
1451   ROM_LOAD( "sentesnd",    0x00000, 0x2000, CRC(4dd0a525) SHA1(f0c447adc5b67917851a9df978df851247e75c43) )
1452
1453   ROM_REGION( 0x10000, "gfx1", 0 )      /* up to 64k of sprites */
1454   ROM_LOAD( "gr01.u6b", 0x00000, 0x4000, CRC(2e66ac35) SHA1(c65b4991a88f8359c85f904f66a7fe73330aface) )
1455   ROM_LOAD( "gr23.u5b", 0x04000, 0x4000, CRC(6fa43631) SHA1(7000907b914bf851b09811e3736af8c02e1aeda9) )
1456
1457   ROM_REGION( 0x00001, "cart_pals", 0) /* PAL's located on the cartridge */
1458   ROM_LOAD( "pal10l8.u1c", 0x0000, 0x0001, NO_DUMP ) /* PAL10L8CN */
1459
1460   MOTHERBOARD_PALS
1461ROM_END
1462
1463// the old dump for reference, it had a different cart layout.
1464#if 0
1465ROM_START( stocker )
1466   ROM_REGION( 0x40000, "maincpu", 0 )     /* 64k for code for the first CPU, plus 128k of banked ROMs */
14501467   ROM_LOAD( "stkr-ab0.bin", 0x10000, 0x2000, CRC(784a00ad) SHA1(33e76be44207bc24dbb9c2f04204df22ba5154ff) )
14511468   ROM_LOAD( "stkr-ab1.bin", 0x12000, 0x2000, CRC(cdae01dc) SHA1(7c2956acae639fd2f2cf061d1c32ae9edabe9270) )
14521469   ROM_LOAD( "stkr-ab2.bin", 0x14000, 0x2000, CRC(18527d57) SHA1(cbb85f9e0b6169f4c2e03dc54b4937043535fc42) )
14531470   ROM_LOAD( "stkr-ab3.bin", 0x16000, 0x2000, CRC(028f6c06) SHA1(f1d30efcd7e967b0390f441848bb655111fdde65) )
1454   ROM_LOAD( "stkr-cd.bin",  0x2c000, 0x2000, CRC(53dbc4e5) SHA1(e389978b5472174681fa180c6a2edf49903a6514) )
1455   ROM_LOAD( "stkr-ef.bin",  0x2e000, 0x2000, CRC(cdcf46bc) SHA1(8b1e801dab1efed002d484135264998d255dc041) )
1471   ROM_LOAD( "stkr-cd.bin",  0x2c000, 0x2000, BAD_DUMP CRC(53dbc4e5) SHA1(e389978b5472174681fa180c6a2edf49903a6514) ) // 1 bad byte
1472   ROM_LOAD( "stkr-ef.bin",  0x2e000, 0x2000, BAD_DUMP CRC(cdcf46bc) SHA1(8b1e801dab1efed002d484135264998d255dc041) ) // 1 bad byte
14561473
14571474   ROM_REGION( 0x10000, "audiocpu", 0 )      /* 64k for Z80 */
14581475   ROM_LOAD( "sentesnd",    0x00000, 0x2000, CRC(4dd0a525) SHA1(f0c447adc5b67917851a9df978df851247e75c43) )
r7772r7773
14611478   ROM_LOAD( "stkr-gr0.bin", 0x00000, 0x2000, CRC(76d5694c) SHA1(e2b155fc7178886eb37a532d961b99b8c864397c) )
14621479   ROM_LOAD( "stkr-gr1.bin", 0x02000, 0x2000, CRC(4a5cc00b) SHA1(9ce46ed94e715a5997998aee6377baf2869ab3a6) )
14631480   ROM_LOAD( "stkr-gr2.bin", 0x04000, 0x2000, CRC(70002382) SHA1(c151ad3df2714a2f9f8b047894e7585ca16bd29e) )
1464   ROM_LOAD( "stkr-gr3.bin", 0x06000, 0x2000, CRC(68c862d8) SHA1(302ce10e23d17af9aa7fa13d18c602656a262eaa) )
1481   ROM_LOAD( "stkr-gr3.bin", 0x06000, 0x2000, CRC(68c862d8) SHA1(302ce10e23d17af9aa7fa13d18c602656a262eaa) ) // the data here also differs from the good set, although the change is meaningless (data at the end blanked out here)
14651482
1466    ROM_REGION( 0x00001, "cart_pals", 0) /* PAL's located on the cartridge */
1467    ROM_LOAD( "pal10l8.u1c", 0x0000, 0x0001, NO_DUMP ) /* PAL10L8CN */
1483   ROM_REGION( 0x00001, "cart_pals", 0) /* PAL's located on the cartridge */
1484   ROM_LOAD( "pal10l8.u1c", 0x0000, 0x0001, NO_DUMP ) /* PAL10L8CN */
14681485
1469    MOTHERBOARD_PALS
1486   MOTHERBOARD_PALS
14701487ROM_END
1488#endif
14711489
1472
14731490ROM_START( triviag1 )
14741491   ROM_REGION( 0x40000, "maincpu", 0 )     /* 64k for code for the first CPU, plus 128k of banked ROMs */
14751492   ROM_LOAD( "tpg1-ab0.bin", 0x10000, 0x2000, CRC(79fd3ac3) SHA1(52db0ba445f9a953f6ceb43c3d173b73c71af192) )
r7772r7773
14921509   ROM_LOAD( "tpg1-gr4.bin", 0x08000, 0x2000, CRC(673acf42) SHA1(7b36a86441732ba14576f9c1dd14fe0da575d4bf) )
14931510   ROM_LOAD( "tpg1-gr5.bin", 0x0a000, 0x2000, CRC(067bfd66) SHA1(32f5973f2f0aed67c8f9b5886f52b9dc516a611e) )
14941511
1495    MOTHERBOARD_PALS
1512   MOTHERBOARD_PALS
14961513ROM_END
14971514
14981515ROM_START( trivia12 )
r7772r7773
15171534   ROM_LOAD( "gr4.u5b", 0x08000, 0x2000, CRC(673acf42) SHA1(7b36a86441732ba14576f9c1dd14fe0da575d4bf) )
15181535   ROM_LOAD( "gr5.u4b", 0x0a000, 0x2000, CRC(d17d5431) SHA1(b92741f6eda01f2e360e73a9f4df728fc44d7e1b) )
15191536
1520    MOTHERBOARD_PALS
1537   MOTHERBOARD_PALS
15211538ROM_END
15221539
15231540
r7772r7773
15381555   ROM_LOAD( "gr23.bin",  0x04000, 0x4000, CRC(89398700) SHA1(771ee04baa9a31d435a6234490105878713e7845) )
15391556   ROM_LOAD( "gr45.bin",  0x08000, 0x4000, CRC(1e870293) SHA1(32149c9c8047854f2b2ad8844c4bd00a8ded588e) )
15401557
1541    MOTHERBOARD_PALS
1558   MOTHERBOARD_PALS
15421559ROM_END
15431560
15441561
r7772r7773
15591576   ROM_LOAD( "gr23.bin",    0x04000, 0x4000, CRC(89398700) SHA1(771ee04baa9a31d435a6234490105878713e7845) )
15601577   ROM_LOAD( "allsport.3b", 0x08000, 0x4000, CRC(7415a7fc) SHA1(93d832434f359ce7b02aef276c89456b16438979) )
15611578
1562    MOTHERBOARD_PALS
1579   MOTHERBOARD_PALS
15631580ROM_END
15641581
15651582
r7772r7773
15801597   ROM_LOAD( "gr23.bin", 0x04000, 0x4000, CRC(89398700) SHA1(771ee04baa9a31d435a6234490105878713e7845) )
15811598   ROM_LOAD( "gr45.bin", 0x08000, 0x4000, CRC(1242033e) SHA1(1a3fe186bb261e2c7d9fbbb2a3103b39bf029b35) )
15821599
1583    MOTHERBOARD_PALS
1600   MOTHERBOARD_PALS
15841601ROM_END
15851602
15861603
r7772r7773
16011618   ROM_LOAD( "gr23.bin", 0x04000, 0x4000, CRC(89398700) SHA1(771ee04baa9a31d435a6234490105878713e7845) )
16021619   ROM_LOAD( "gr45.bin", 0x08000, 0x4000, CRC(92fb6fb1) SHA1(1a322bd3cfacdf82d4fcc4b4d47f78a701411919) )
16031620
1604    ROM_REGION( 0x00001, "cart_pals", 0) /* PAL's located on the cartridge */
1605    ROM_LOAD( "pal10l8.u1c", 0x0000, 0x0001, NO_DUMP ) /* PAL10L8CN */
1621   ROM_REGION( 0x00001, "cart_pals", 0) /* PAL's located on the cartridge */
1622   ROM_LOAD( "pal10l8.u1c", 0x0000, 0x0001, NO_DUMP ) /* PAL10L8CN */
16061623
1607    MOTHERBOARD_PALS
1624   MOTHERBOARD_PALS
16081625ROM_END
16091626
16101627ROM_START( triviaes )
r7772r7773
16261643   ROM_LOAD( "tp_gr2.bin", 0x04000, 0x4000, CRC(89398700) SHA1(771ee04baa9a31d435a6234490105878713e7845) )
16271644   ROM_LOAD( "tp_gr1.bin", 0x08000, 0x4000, CRC(1242033e) SHA1(1a3fe186bb261e2c7d9fbbb2a3103b39bf029b35) )
16281645
1629    MOTHERBOARD_PALS
1646   MOTHERBOARD_PALS
16301647ROM_END
16311648
16321649
r7772r7773
16441661   ROM_LOAD( "gr01.u6b", 0x00000, 0x4000, CRC(e3cdc476) SHA1(2f17c3f84767850d45192dfb507dd2716ecadc20) )
16451662   ROM_LOAD( "gr23.u5b", 0x04000, 0x4000, CRC(0555d9c0) SHA1(da0d1f207ad056b2d82a5ad6382372066883d161) )
16461663
1647    ROM_REGION( 0x00001, "cart_pals", 0) /* PAL's located on the cartridge */
1648    ROM_LOAD( "pal10l8.u1c", 0x0000, 0x0001, NO_DUMP ) /* PAL10L8CN */
1664   ROM_REGION( 0x00001, "cart_pals", 0) /* PAL's located on the cartridge */
1665   ROM_LOAD( "pal10l8.u1c", 0x0000, 0x0001, NO_DUMP ) /* PAL10L8CN */
16491666
1650    MOTHERBOARD_PALS
1667   MOTHERBOARD_PALS
16511668ROM_END
16521669
16531670
r7772r7773
16671684   ROM_LOAD( "gr23.u5b", 0x04000, 0x4000, CRC(3bf355ef) SHA1(691df25b35b00e21ad09d17a21fe98a353aa3dda) )
16681685   ROM_LOAD( "gr45.u4b", 0x08000, 0x4000, CRC(8eb14921) SHA1(fda8b8f8e801360310f7cb1aa4c6aea1fa0a4b25) )
16691686
1670    ROM_REGION( 0x00001, "cart_pals", 0) /* PAL's located on the cartridge */
1671    ROM_LOAD( "pal10l8.u1c", 0x0000, 0x0001, NO_DUMP ) /* PAL10L8CN */
1687   ROM_REGION( 0x00001, "cart_pals", 0) /* PAL's located on the cartridge */
1688   ROM_LOAD( "pal10l8.u1c", 0x0000, 0x0001, NO_DUMP ) /* PAL10L8CN */
16721689
1673    MOTHERBOARD_PALS
1690   MOTHERBOARD_PALS
16741691ROM_END
16751692
16761693
16771694ROM_START( minigolf2 )
16781695   ROM_REGION( 0x40000, "maincpu", 0 )     /* 64k for code for the first CPU, plus 128k of banked ROMs */
1679   ROM_LOAD( "ab01.u8a",  0x10000, 0x4000, CRC(348f827f) SHA1(a013ef3068e14e0738bcfa4de26c0c2df4c0a7f6) )
1696   ROM_LOAD( "ab01.u8a",  0x10000, 0x4000, CRC(348f827f) SHA1(a013ef3068e14e0738bcfa4de26c0c2df4c0a7f6) ) /* Labeled as MINI GOLF UR, then name (like AB01) & dated 11/25/85 */
16801697   ROM_LOAD( "ab23.u7a",  0x14000, 0x4000, CRC(19a6ff47) SHA1(70b6da3b4186e5b9463f2ea0fefefad21ec80637) )
16811698   ROM_LOAD( "ab45.u6a",  0x18000, 0x4000, CRC(925d76eb) SHA1(29d2d7b26d2e81817c4d135935dab70a5aa2d146) )
16821699   ROM_LOAD( "ab67.u5a",  0x1c000, 0x4000, CRC(6a311c9a) SHA1(b0409e5f4bd3bf898b8701561aac6dbbc28417bd) )
r7772r7773
16911708   ROM_LOAD( "gr23.u5b", 0x04000, 0x4000, CRC(3bf355ef) SHA1(691df25b35b00e21ad09d17a21fe98a353aa3dda) )
16921709   ROM_LOAD( "gr45.u4b", 0x08000, 0x4000, CRC(8eb14921) SHA1(fda8b8f8e801360310f7cb1aa4c6aea1fa0a4b25) )
16931710
1694    ROM_REGION( 0x00001, "cart_pals", 0) /* PAL's located on the cartridge */
1695    ROM_LOAD( "pal10l8.u1c", 0x0000, 0x0001, NO_DUMP ) /* PAL10L8CN */
1711   ROM_REGION( 0x00001, "cart_pals", 0) /* PAL's located on the cartridge */
1712   ROM_LOAD( "pal10l8.u1c", 0x0000, 0x0001, NO_DUMP ) /* PAL10L8CN */
16961713
1697    MOTHERBOARD_PALS
1714   MOTHERBOARD_PALS
16981715ROM_END
16991716
17001717
r7772r7773
17161733   ROM_LOAD( "tgle-gr0.bin", 0x00000, 0x2000, CRC(0e0e5d0e) SHA1(363858ce08767f8a9b8eaec56405377cdd74b178) )
17171734   ROM_LOAD( "tgle-gr1.bin", 0x02000, 0x2000, CRC(3b141ad2) SHA1(72430fd616adbc72d86a5f10672572a31bed0b5d) )
17181735
1719    MOTHERBOARD_PALS
1736   MOTHERBOARD_PALS
17201737ROM_END
17211738
17221739
r7772r7773
17451762   ROM_REGION( 0x10000, "gfx1", 0 )      /* up to 64k of sprites */
17461763   ROM_LOAD( "nttgr0.bin",  0x00000, 0x8000, CRC(6b75bb4b) SHA1(e7131d112fb0b36985c5b6383700f55728a1c4fd) )
17471764
1748    MOTHERBOARD_PALS
1765   MOTHERBOARD_PALS
17491766ROM_END
17501767
17511768ROM_START( nametune2 )
r7772r7773
17731790   ROM_REGION( 0x10000, "gfx1", 0 )      /* up to 64k of sprites */
17741791   ROM_LOAD( "nmetneur_gr_0.u3c", 0x00000, 0x8000, CRC(a0121b80) SHA1(ba38e9b738baac85fa33ae3751d02cb223fa3e65) )
17751792
1776    ROM_REGION( 0x00001, "cart_pals", 0) /* PAL's located on the cartridge */
1777    ROM_LOAD( "pal16r8.u7c", 0x0000, 0x0001, NO_DUMP )  /* PAL16R8ANC */
1793   ROM_REGION( 0x00001, "cart_pals", 0) /* PAL's located on the cartridge */
1794   ROM_LOAD( "pal16r8.u7c", 0x0000, 0x0001, NO_DUMP )  /* PAL16R8ANC */
17781795
1779    MOTHERBOARD_PALS
1796   MOTHERBOARD_PALS
17801797ROM_END
17811798
17821799/*
r7772r7773
18061823   ROM_LOAD( "gr45.u2c", 0x08000, 0x4000, CRC(734b858a) SHA1(71763789807021938b840a88af34aad7f4751298) )
18071824   ROM_LOAD( "gr67.u1c", 0x0c000, 0x4000, CRC(3311f9c0) SHA1(63b185c761b258113c31cc269ce0b1462bf37f40) )
18081825
1809    ROM_REGION( 0x00001, "cart_pals", 0) /* PAL's located on the cartridge */
1810    ROM_LOAD( "pal16r8.u7c", 0x0000, 0x0001, NO_DUMP ) /* PAL16R8 */
1826   ROM_REGION( 0x00001, "cart_pals", 0) /* PAL's located on the cartridge */
1827   ROM_LOAD( "pal16r8.u7c", 0x0000, 0x0001, NO_DUMP ) /* PAL16R8 */
18111828
1812    ROM_REGION( 0x00004, "gun_io_bd_pals", 0) /* Gun I/O Board PALs */
1813    ROM_LOAD( "pal16r8acn.u6", 0x0000, 0x0001, NO_DUMP ) /* PAL16R8 */
1814    ROM_LOAD( "pal16r8acn.u7", 0x0000, 0x0001, NO_DUMP ) /* PAL16R8 */
1815    ROM_LOAD( "pal16r8acn.u8", 0x0000, 0x0001, NO_DUMP ) /* PAL16R8 */
1816    ROM_LOAD( "pal16r8acn.u9", 0x0000, 0x0001, NO_DUMP ) /* PAL16R8 */
1829   ROM_REGION( 0x00004, "gun_io_bd_pals", 0) /* Gun I/O Board PALs */
1830   ROM_LOAD( "pal16r8acn.u6", 0x0000, 0x0001, NO_DUMP ) /* PAL16R8 */
1831   ROM_LOAD( "pal16r8acn.u7", 0x0000, 0x0001, NO_DUMP ) /* PAL16R8 */
1832   ROM_LOAD( "pal16r8acn.u8", 0x0000, 0x0001, NO_DUMP ) /* PAL16R8 */
1833   ROM_LOAD( "pal16r8acn.u9", 0x0000, 0x0001, NO_DUMP ) /* PAL16R8 */
18171834
1818    MOTHERBOARD_PALS
1835   MOTHERBOARD_PALS
18191836ROM_END
18201837
18211838ROM_START( nstocker2 )
r7772r7773
18381855   ROM_LOAD( "gr45.u2c", 0x08000, 0x4000, CRC(734b858a) SHA1(71763789807021938b840a88af34aad7f4751298) )
18391856   ROM_LOAD( "gr67.u1c", 0x0c000, 0x4000, CRC(3311f9c0) SHA1(63b185c761b258113c31cc269ce0b1462bf37f40) )
18401857
1841    ROM_REGION( 0x00001, "cart_pals", 0) /* PAL's located on the cartridge */
1842    ROM_LOAD( "pal16r8.u7c", 0x0000, 0x0001, NO_DUMP ) /* PAL16R8 */
1858   ROM_REGION( 0x00001, "cart_pals", 0) /* PAL's located on the cartridge */
1859   ROM_LOAD( "pal16r8.u7c", 0x0000, 0x0001, NO_DUMP ) /* PAL16R8 */
18431860
1844    ROM_REGION( 0x00004, "gun_io_bd_pals", 0) /* Gun I/O Board PALs */
1845    ROM_LOAD( "pal16r8acn.u6", 0x0000, 0x0001, NO_DUMP )
1846    ROM_LOAD( "pal16r8acn.u7", 0x0000, 0x0001, NO_DUMP )
1847    ROM_LOAD( "pal16r8acn.u8", 0x0000, 0x0001, NO_DUMP )
1848    ROM_LOAD( "pal16r8acn.u9", 0x0000, 0x0001, NO_DUMP )
1861   ROM_REGION( 0x00004, "gun_io_bd_pals", 0) /* Gun I/O Board PALs */
1862   ROM_LOAD( "pal16r8acn.u6", 0x0000, 0x0001, NO_DUMP ) /* PAL16R8 */
1863   ROM_LOAD( "pal16r8acn.u7", 0x0000, 0x0001, NO_DUMP ) /* PAL16R8 */
1864   ROM_LOAD( "pal16r8acn.u8", 0x0000, 0x0001, NO_DUMP ) /* PAL16R8 */
1865   ROM_LOAD( "pal16r8acn.u9", 0x0000, 0x0001, NO_DUMP ) /* PAL16R8 */
18491866
1850    MOTHERBOARD_PALS
1867   MOTHERBOARD_PALS
18511868ROM_END
18521869
18531870
r7772r7773
18671884   ROM_LOAD( "sfbgr45.bin", 0x08000, 0x4000, CRC(e767251e) SHA1(3c05295317a673fb1de5924f27de276d2846d805) )
18681885   ROM_LOAD( "sfbgr67.bin", 0x0c000, 0x4000, CRC(42452a7a) SHA1(37479d6e9071ac775215a6815dbaf280b3c6a57f) )
18691886
1870    ROM_REGION( 0x00001, "cart_pals", 0) /* PAL's located on the cartridge */
1871    ROM_LOAD( "pal16r8.u7c", 0x0000, 0x0001, NO_DUMP ) /* PAL16R8ANC */
1887   ROM_REGION( 0x00001, "cart_pals", 0) /* PAL's located on the cartridge */
1888   ROM_LOAD( "pal16r8.u7c", 0x0000, 0x0001, NO_DUMP ) /* PAL16R8ANC */
18721889
1873    MOTHERBOARD_PALS
1890   MOTHERBOARD_PALS
18741891ROM_END
18751892
18761893
r7772r7773
18881905   ROM_LOAD( "gr23.u3c", 0x04000, 0x4000, CRC(970c81f6) SHA1(f22189e172a795d115597feb48ccbc04be3859b9) )
18891906   ROM_LOAD( "gr45.u2c", 0x08000, 0x4000, CRC(90ddd737) SHA1(8e1dde2f42e9bf755dedeef218745d1fc54faac7) )
18901907
1891    ROM_REGION( 0x00001, "cart_pals", 0) /* PAL's located on the cartridge */
1892    ROM_LOAD( "pal16r8.u7c", 0x0000, 0x0001, NO_DUMP ) /* PAL16R8ANC */
1908   ROM_REGION( 0x00001, "cart_pals", 0) /* PAL's located on the cartridge */
1909   ROM_LOAD( "pal16r8.u7c", 0x0000, 0x0001, NO_DUMP ) /* PAL16R8ANC */
18931910
1894    MOTHERBOARD_PALS
1911   MOTHERBOARD_PALS
18951912ROM_END
18961913
18971914
r7772r7773
19131930   ROM_LOAD( "gr45.u2c", 0x08000, 0x4000, CRC(0d2cf2e6) SHA1(beccb1342127e79a845c4b6b20f20052097ebb98) )
19141931   ROM_LOAD( "gr67.u2c", 0x0c000, 0x4000, CRC(2bab2784) SHA1(a4020fd8f5ca2fdb37efd37cbccf86cae0468eb0) )
19151932
1916    MOTHERBOARD_PALS
1933   MOTHERBOARD_PALS
19171934ROM_END
19181935
19191936
r7772r7773
19311948   ROM_LOAD( "gr0.a5",    0x00000, 0x8000, CRC(e0dfc133) SHA1(0b120b4410098d8db26b5819043d4fe7c426b948) )
19321949   ROM_LOAD( "gr4.a7",    0x08000, 0x8000, CRC(952ade30) SHA1(f065368f645616d6d84be469ba45a9afa8788eda) )
19331950
1934    MOTHERBOARD_PALS
1951   MOTHERBOARD_PALS
19351952ROM_END
19361953
19371954
r7772r7773
19481965   ROM_REGION( 0x10000, "gfx1", 0 )      /* up to 64k of sprites */
19491966   ROM_LOAD( "gr0.a5",    0x00000, 0x8000, CRC(e0dfc133) SHA1(0b120b4410098d8db26b5819043d4fe7c426b948) )
19501967   ROM_LOAD( "gr4.a7",    0x08000, 0x8000, CRC(952ade30) SHA1(f065368f645616d6d84be469ba45a9afa8788eda) )
1968
1969   MOTHERBOARD_PALS
19511970ROM_END
19521971
19531972
r7772r7773
19641983   ROM_REGION( 0x8000, "gfx1", 0 )      /* up to 64k of sprites */
19651984   ROM_LOAD( "grudge.gr0", 0x00000, 0x8000, CRC(b9681f53) SHA1(bb0c516408f1769e018f0ec8707786d4d1e9ef7e) )
19661985
1967    MOTHERBOARD_PALS
1986   MOTHERBOARD_PALS
19681987ROM_END
19691988
19701989
r7772r7773
20042023   ROM_LOAD( "savgu12.bin", 0x18000, 0x2000, CRC(ccdfedb1) SHA1(b87e885df46e814626f46102f323ccd8396bcf8f) )
20052024   ROM_LOAD( "savgu11.bin", 0x1a000, 0x2000, CRC(db11ff4c) SHA1(cd85486cd08ec4392421e9b94d380b81a575c811) )
20062025   ROM_LOAD( "savgu10.bin", 0x1c000, 0x2000, CRC(6f3d9aa1) SHA1(7616dd016f5c8990b4972cf6edf758e27857aa1e) )
2026
2027   MOTHERBOARD_PALS
20072028ROM_END
20082029
20092030
r7772r7773
21822203GAME( 1984, snakjack, 0,        balsente, snakjack, snakjack, ROT0, "Bally/Sente",  "Snacks'n Jaxson", GAME_SUPPORTS_SAVE )
21832204
21842205/* Board: 006-8025-01-0B Rev B */
2185GAMEL(1984, stocker,  0,        balsente, stocker,  stocker,  ROT0, "Bally/Sente",  "Stocker", GAME_SUPPORTS_SAVE, layout_stocker )
2206GAMEL(1984, stocker,  0,        balsente, stocker,  stocker,  ROT0, "Bally/Sente",  "Stocker (3/19/85)", GAME_SUPPORTS_SAVE, layout_stocker ) // date from ROM chips
21862207GAME( 1985, gimeabrk, 0,        balsente, gimeabrk, gimeabrk, ROT0, "Bally/Sente",  "Gimme A Break", GAME_SUPPORTS_SAVE )
21872208GAME( 1985, minigolf, 0,        balsente, minigolf, minigolf, ROT0, "Bally/Sente",  "Mini Golf (set 1)", GAME_SUPPORTS_SAVE )
21882209GAME( 1985, minigolf2,minigolf, balsente, minigolf2,minigolf2,ROT0, "Bally/Sente",  "Mini Golf (set 2)", GAME_SUPPORTS_SAVE )
src/mame/drivers/segaybd.c
r7772r7773
16941694/**************************************************************************************************************************
16951695 **************************************************************************************************************************
16961696 **************************************************************************************************************************
1697    Rail Chase, Sega Y-board
1697    Rail Chase World, Sega Y-board
16981698    CPU: 68000 (317-????)
1699    CPU BD      837-8073-05
1700    VIDEO BD    837-8074-01
1701    GAME BD     834-8072-05
16991702*/
17001703ROM_START( rchase )
17011704   ROM_REGION( 0x080000, "maincpu", 0 ) // M
1702   ROM_LOAD16_BYTE( "ic25.bin",  0x000000, 0x20000, CRC(388b2365) SHA1(0f006f9120b96b8d8be968878ce1d6dd853cd977) )
1703   ROM_LOAD16_BYTE( "ic24.bin",  0x000001, 0x20000, CRC(14dba5d4) SHA1(ad09c55273ab1105630f2f76019aedc234fb9292) )
1704   ROM_LOAD16_BYTE( "ic27.bin",  0x040000, 0x20000, CRC(dc1cd5a4) SHA1(3b2b6afbeb7daa7c0cc75279bc495221c2508e25) )
1705   ROM_LOAD16_BYTE( "ic26.bin",  0x040001, 0x20000, BAD_DUMP CRC(969fdb3a) SHA1(2d98f1bab2c20cad3d4c20ee2c4022d04fa9ffce) ) //fails ROM checksum in service mode
1705   ROM_LOAD16_BYTE( "epr-13986.25",  0x000000, 0x20000, CRC(388b2365) SHA1(0f006f9120b96b8d8be968878ce1d6dd853cd977) )
1706   ROM_LOAD16_BYTE( "epr-13985.24",  0x000001, 0x20000, CRC(14dba5d4) SHA1(ad09c55273ab1105630f2f76019aedc234fb9292) )
1707   ROM_LOAD16_BYTE( "epr-13988.27",  0x040000, 0x20000, CRC(dc1cd5a4) SHA1(3b2b6afbeb7daa7c0cc75279bc495221c2508e25) )
1708   ROM_LOAD16_BYTE( "epr-13987.26",  0x040001, 0x20000, CRC(43be9e60) SHA1(107a9c126c2bff9030fe621f6b4ab8f29c994ef2) )
17061709
17071710   ROM_REGION( 0x040000, "subx", 0 ) // X
1708   ROM_LOAD16_BYTE( "ic81.bin",  0x000000, 0x20000, CRC(c5d525b6) SHA1(1fab7f761be67b67ee346a1af1f1fe12aef87dc5) )
1709   ROM_LOAD16_BYTE( "ic80.bin",  0x000001, 0x20000, CRC(299e3c7c) SHA1(e4903816ec364e9352abd1180e8a609fed75e1a7) )
1711   ROM_LOAD16_BYTE( "epr-13992a.81",  0x000000, 0x20000, CRC(c5d525b6) SHA1(1fab7f761be67b67ee346a1af1f1fe12aef87dc5) )
1712   ROM_LOAD16_BYTE( "epr-13991a.80",  0x000001, 0x20000, CRC(299e3c7c) SHA1(e4903816ec364e9352abd1180e8a609fed75e1a7) )
17101713
17111714   ROM_REGION( 0x040000, "suby", 0 ) // Y
1712   ROM_LOAD16_BYTE( "ic54.bin",  0x000000, 0x20000, CRC(18eb23c5) SHA1(53e5681c7450a3879ed80c1680168d6295caa887) )
1713   ROM_LOAD16_BYTE( "ic53.bin",  0x000001, 0x20000, CRC(8f4f824e) SHA1(d470f23ce2dca4e75b7b714175d47338c41bb721) )
1715   ROM_LOAD16_BYTE( "epr-14092.54",  0x000000, 0x20000, CRC(18eb23c5) SHA1(53e5681c7450a3879ed80c1680168d6295caa887) )
1716   ROM_LOAD16_BYTE( "epr-14091.53",  0x000001, 0x20000, CRC(72a56f71) SHA1(d45d3072ea92b5dde5c70138e56e7f0ca248880e) )
17141717
17151718   ROM_REGION16_BE( 0x080000, "gfx2", 0 )
1716   ROM_LOAD16_BYTE( "vic16.bin", 0x000000, 0x40000, CRC(9a1dd53c) SHA1(cb01f2c64554914ea693879dfcb498181a1e7a9a) )
1717   ROM_LOAD16_BYTE( "vic14.bin", 0x000001, 0x40000, CRC(1fdf1b87) SHA1(ed46af0f72081d545015b73a8d12240664f29506) )
1719   ROM_LOAD16_BYTE( "mpr-13999.16", 0x000000, 0x40000, CRC(9a1dd53c) SHA1(cb01f2c64554914ea693879dfcb498181a1e7a9a) )
1720   ROM_LOAD16_BYTE( "mpr-13997.14", 0x000001, 0x40000, CRC(1fdf1b87) SHA1(ed46af0f72081d545015b73a8d12240664f29506) )
17181721
17191722   ROM_REGION64_BE( 0xc00000, "gfx1", 0)
1720   ROMX_LOAD( "vic67.bin",  0x000000, 0x80000, CRC(9fa88781) SHA1(a035fd0fe1d37a589adf3a5029c20d237d5cc827), ROM_SKIP(7) )
1721   ROMX_LOAD( "vic75.bin",  0x000001, 0x80000, CRC(49e824bb) SHA1(c1330719b5718aa664b5788244d8cb7b7103a57c), ROM_SKIP(7) )
1722   ROMX_LOAD( "vic63.bin",  0x000002, 0x80000, CRC(35b5187e) SHA1(6f0f6471c4135d07a2c852cdc50322b99176712e), ROM_SKIP(7) )
1723   ROMX_LOAD( "vic71.bin",  0x000003, 0x80000, CRC(9a538b9b) SHA1(cd84a39bd3858fa6c1d8eb4a349d939261cea6b6), ROM_SKIP(7) )
1724   ROMX_LOAD( "vic86.bin",  0x000004, 0x80000, CRC(e11c6c67) SHA1(839e71690e75e47d11b758f5b525452bcc75b823), ROM_SKIP(7) )
1725   ROMX_LOAD( "vic114.bin", 0x000005, 0x80000, CRC(16344535) SHA1(a9bd101ae93c24a2e8002ad6a111cf0d0d3b1a64), ROM_SKIP(7) )
1726   ROMX_LOAD( "vic82.bin",  0x000006, 0x80000, CRC(78e9983b) SHA1(c0f6577b55acda2cc8cdf0884d5c0517f79de4e9), ROM_SKIP(7) )
1727   ROMX_LOAD( "vic110.bin", 0x000007, 0x80000, CRC(e9daa1a4) SHA1(24ad782e88a586fbb31f7ad86be4cdeb38823102), ROM_SKIP(7) )
1723   ROMX_LOAD( "mpr-14021.67",  0x000000, 0x80000, CRC(9fa88781) SHA1(a035fd0fe1d37a589adf3a5029c20d237d5cc827), ROM_SKIP(7) )
1724   ROMX_LOAD( "mpr-14022.75",  0x000001, 0x80000, CRC(49e824bb) SHA1(c1330719b5718aa664b5788244d8cb7b7103a57c), ROM_SKIP(7) )
1725   ROMX_LOAD( "mpr-14009.63",  0x000002, 0x80000, CRC(35b5187e) SHA1(6f0f6471c4135d07a2c852cdc50322b99176712e), ROM_SKIP(7) )
1726   ROMX_LOAD( "mpr-14010.71",  0x000003, 0x80000, CRC(9a538b9b) SHA1(cd84a39bd3858fa6c1d8eb4a349d939261cea6b6), ROM_SKIP(7) )
1727   ROMX_LOAD( "mpr-14023.86",  0x000004, 0x80000, CRC(e11c6c67) SHA1(839e71690e75e47d11b758f5b525452bcc75b823), ROM_SKIP(7) )
1728   ROMX_LOAD( "mpr-14024.114", 0x000005, 0x80000, CRC(16344535) SHA1(a9bd101ae93c24a2e8002ad6a111cf0d0d3b1a64), ROM_SKIP(7) )
1729   ROMX_LOAD( "mpr-14011.82",  0x000006, 0x80000, CRC(78e9983b) SHA1(c0f6577b55acda2cc8cdf0884d5c0517f79de4e9), ROM_SKIP(7) )
1730   ROMX_LOAD( "mpr-14012.110", 0x000007, 0x80000, CRC(e9daa1a4) SHA1(24ad782e88a586fbb31f7ad86be4cdeb38823102), ROM_SKIP(7) )
17281731
1729   ROMX_LOAD( "vic66.bin",  0x400000, 0x80000, CRC(b83df159) SHA1(f0cf99e6ddae1d26fd68240a731f3e28e9c6073b), ROM_SKIP(7) )
1730   ROMX_LOAD( "vic74.bin",  0x400001, 0x80000, CRC(76dbe9ce) SHA1(2f5af8d015cf8fb90a0862bc37235bc20d4dac0d), ROM_SKIP(7) )
1731   ROMX_LOAD( "vic62.bin",  0x400002, 0x80000, CRC(9e998209) SHA1(c0d39d11d554fd6a43db77ccf96ac04dd634edff), ROM_SKIP(7) )
1732   ROMX_LOAD( "vic70.bin",  0x400003, 0x80000, CRC(2caddf1a) SHA1(a2e891e65c7cd156a3131a084ff51ae9b1663bc0), ROM_SKIP(7) )
1733   ROMX_LOAD( "vic85.bin",  0x400004, 0x80000, CRC(b15e19ff) SHA1(947c35301875b4842835f2ba6aca216f087a3fc7), ROM_SKIP(7) )
1734   ROMX_LOAD( "vic113.bin", 0x400005, 0x80000, CRC(84c7008f) SHA1(b92f3c636c5d91c5b1c6090a48be7bb1be6b927e), ROM_SKIP(7) )
1735   ROMX_LOAD( "vic81.bin",  0x400006, 0x80000, CRC(c3cf5faa) SHA1(02bca1b248fcb6313cd529ca2aa0f7516177166b), ROM_SKIP(7) )
1736   ROMX_LOAD( "vic109.bin", 0x400007, 0x80000, CRC(7e91beb2) SHA1(bc1a7ce68d6b825daf93ca437dda803857cee0a2), ROM_SKIP(7) )
1732   ROMX_LOAD( "mpr-14017.66",  0x400000, 0x80000, CRC(b83df159) SHA1(f0cf99e6ddae1d26fd68240a731f3e28e9c6073b), ROM_SKIP(7) )
1733   ROMX_LOAD( "mpr-14018.74",  0x400001, 0x80000, CRC(76dbe9ce) SHA1(2f5af8d015cf8fb90a0862bc37235bc20d4dac0d), ROM_SKIP(7) )
1734   ROMX_LOAD( "mpr-14005.62",  0x400002, 0x80000, CRC(9e998209) SHA1(c0d39d11d554fd6a43db77ccf96ac04dd634edff), ROM_SKIP(7) )
1735   ROMX_LOAD( "mpr-14006.70",  0x400003, 0x80000, CRC(2caddf1a) SHA1(a2e891e65c7cd156a3131a084ff51ae9b1663bc0), ROM_SKIP(7) )
1736   ROMX_LOAD( "mpr-14019.85",  0x400004, 0x80000, CRC(b15e19ff) SHA1(947c35301875b4842835f2ba6aca216f087a3fc7), ROM_SKIP(7) )
1737   ROMX_LOAD( "mpr-14020.113", 0x400005, 0x80000, CRC(84c7008f) SHA1(b92f3c636c5d91c5b1c6090a48be7bb1be6b927e), ROM_SKIP(7) )
1738   ROMX_LOAD( "mpr-14007.81",  0x400006, 0x80000, CRC(c3cf5faa) SHA1(02bca1b248fcb6313cd529ca2aa0f7516177166b), ROM_SKIP(7) )
1739   ROMX_LOAD( "mpr-14008.109", 0x400007, 0x80000, CRC(7e91beb2) SHA1(bc1a7ce68d6b825daf93ca437dda803857cee0a2), ROM_SKIP(7) )
17371740
1738   ROMX_LOAD( "vic65.bin",  0x800000, 0x80000, CRC(31dbb2c3) SHA1(3efeff785d78056e2615dc2267f7bb80a6d4c663), ROM_SKIP(7) )
1739   ROMX_LOAD( "vic73.bin",  0x800001, 0x80000, CRC(7e68257d) SHA1(600d1066cfa83f5df46e240a473a8f04179e70f8), ROM_SKIP(7) )
1740   ROMX_LOAD( "vic61.bin",  0x800002, 0x80000, CRC(71031ad0) SHA1(02b6240461d66907199f846310e72d37faa5fb50), ROM_SKIP(7) )
1741   ROMX_LOAD( "vic69.bin",  0x800003, 0x80000, CRC(27e70a5e) SHA1(fa767f6cc8e46c0e804c37666a8499376c09b025), ROM_SKIP(7) )
1742   ROMX_LOAD( "vic84.bin",  0x800004, 0x80000, CRC(7540bf85) SHA1(e8f9208aea6ecedb6ae810a362476cdf1d424319), ROM_SKIP(7) )
1743   ROMX_LOAD( "vic112.bin", 0x800005, 0x80000, CRC(7d87b94d) SHA1(4ef5b7b114c25b9e274e3f3dd7e3d7bd29d2d8b9), ROM_SKIP(7) )
1744   ROMX_LOAD( "vic80.bin",  0x800006, 0x80000, CRC(87725d74) SHA1(d284512ad15362a886072aaa1a3af98f7a0bddf9), ROM_SKIP(7) )
1745   ROMX_LOAD( "vic108.bin", 0x800007, 0x80000, CRC(73477291) SHA1(1fe9d7666d89ee55a0178dceb7cfea7ce94b9e18), ROM_SKIP(7) )
1741   ROMX_LOAD( "mpr-14013.65",  0x800000, 0x80000, CRC(31dbb2c3) SHA1(3efeff785d78056e2615dc2267f7bb80a6d4c663), ROM_SKIP(7) )
1742   ROMX_LOAD( "mpr-14014.73",  0x800001, 0x80000, CRC(7e68257d) SHA1(600d1066cfa83f5df46e240a473a8f04179e70f8), ROM_SKIP(7) )
1743   ROMX_LOAD( "mpr-14001.61",  0x800002, 0x80000, CRC(71031ad0) SHA1(02b6240461d66907199f846310e72d37faa5fb50), ROM_SKIP(7) )
1744   ROMX_LOAD( "mpr-14002.69",  0x800003, 0x80000, CRC(27e70a5e) SHA1(fa767f6cc8e46c0e804c37666a8499376c09b025), ROM_SKIP(7) )
1745   ROMX_LOAD( "mpr-14015.84",  0x800004, 0x80000, CRC(7540bf85) SHA1(e8f9208aea6ecedb6ae810a362476cdf1d424319), ROM_SKIP(7) )
1746   ROMX_LOAD( "mpr-14016.112", 0x800005, 0x80000, CRC(7d87b94d) SHA1(4ef5b7b114c25b9e274e3f3dd7e3d7bd29d2d8b9), ROM_SKIP(7) )
1747   ROMX_LOAD( "mpr-14003.80",  0x800006, 0x80000, CRC(87725d74) SHA1(d284512ad15362a886072aaa1a3af98f7a0bddf9), ROM_SKIP(7) )
1748   ROMX_LOAD( "mpr-14004.108", 0x800007, 0x80000, CRC(73477291) SHA1(1fe9d7666d89ee55a0178dceb7cfea7ce94b9e18), ROM_SKIP(7) )
17461749
17471750   ROM_REGION( 0x10000, "soundcpu", 0 )      /* Z80 sound CPU */
1748   ROM_LOAD( "ic102.bin", 0x000000, 0x10000,  CRC(7cc3b543) SHA1(c5e6a2dca891d0b6528e6d66ccd18b24ed4a9464) )
1751   ROM_LOAD( "epr-13993.102", 0x000000, 0x10000,  CRC(7cc3b543) SHA1(c5e6a2dca891d0b6528e6d66ccd18b24ed4a9464) )
17491752
17501753   ROM_REGION( 0x200000, "pcm", ROMREGION_ERASEFF )   /* SegaPCM samples */
1751   ROM_LOAD( "ic107.bin", 0x000000, 0x80000, CRC(345f5a41) SHA1(d414c3485ba31863c2b36282756709e06a41d262) )
1752   ROM_LOAD( "ic106.bin", 0x080000, 0x80000, CRC(f604c270) SHA1(02023786fec2f2702c2f19f51aff5b7e4928ae91) )
1753   ROM_LOAD( "ic105.bin", 0x100000, 0x80000, CRC(76095538) SHA1(aab830e3675116c475fe69e0e991118c045b131b) )
1754   ROM_LOAD( "mpr-13996.107", 0x000000, 0x80000, CRC(345f5a41) SHA1(d414c3485ba31863c2b36282756709e06a41d262) )
1755   ROM_LOAD( "mpr-13995.106", 0x080000, 0x80000, CRC(f604c270) SHA1(02023786fec2f2702c2f19f51aff5b7e4928ae91) )
1756   ROM_LOAD( "mpr-13994.105", 0x100000, 0x80000, CRC(76095538) SHA1(aab830e3675116c475fe69e0e991118c045b131b) )
17541757ROM_END
17551758
1759/**************************************************************************************************************************
1760 **************************************************************************************************************************
1761 **************************************************************************************************************************
1762    Rail Chase Japan, Sega Y-board
1763    CPU: 68000 (317-????)
1764*/
17561765
1766ROM_START( rchasej )
1767   ROM_REGION( 0x080000, "maincpu", 0 ) // M
1768   ROM_LOAD16_BYTE( "epr-13986.25",  0x000000, 0x20000, CRC(388b2365) SHA1(0f006f9120b96b8d8be968878ce1d6dd853cd977) )
1769   ROM_LOAD16_BYTE( "epr-13985.24",  0x000001, 0x20000, CRC(14dba5d4) SHA1(ad09c55273ab1105630f2f76019aedc234fb9292) )
1770   ROM_LOAD16_BYTE( "epr-13988.27",  0x040000, 0x20000, CRC(dc1cd5a4) SHA1(3b2b6afbeb7daa7c0cc75279bc495221c2508e25) )
1771   ROM_LOAD16_BYTE( "epr-13987.26",  0x040001, 0x20000, CRC(43be9e60) SHA1(107a9c126c2bff9030fe621f6b4ab8f29c994ef2) )
17571772
1773   ROM_REGION( 0x040000, "subx", 0 ) // X
1774   ROM_LOAD16_BYTE( "epr-13992a.81",  0x000000, 0x20000, CRC(c5d525b6) SHA1(1fab7f761be67b67ee346a1af1f1fe12aef87dc5) )
1775   ROM_LOAD16_BYTE( "epr-13991a.80",  0x000001, 0x20000, CRC(299e3c7c) SHA1(e4903816ec364e9352abd1180e8a609fed75e1a7) )
1776
1777   ROM_REGION( 0x040000, "suby", 0 ) // Y
1778   ROM_LOAD16_BYTE( "epr-13990.54.verify",  0x000000, 0x20000, CRC(18eb23c5) SHA1(53e5681c7450a3879ed80c1680168d6295caa887) ) /* Need to verify EPR #, same as epr-14092.54 above */
1779   ROM_LOAD16_BYTE( "epr-13989.53.verify",  0x000001, 0x20000, CRC(8f4f824e) SHA1(d470f23ce2dca4e75b7b714175d47338c41bb721) ) /* Need to verify EPR # */
1780
1781   ROM_REGION16_BE( 0x080000, "gfx2", 0 )
1782   ROM_LOAD16_BYTE( "mpr-13999.16", 0x000000, 0x40000, CRC(9a1dd53c) SHA1(cb01f2c64554914ea693879dfcb498181a1e7a9a) )
1783   ROM_LOAD16_BYTE( "mpr-13997.14", 0x000001, 0x40000, CRC(1fdf1b87) SHA1(ed46af0f72081d545015b73a8d12240664f29506) )
1784
1785   ROM_REGION64_BE( 0xc00000, "gfx1", 0)
1786   ROMX_LOAD( "mpr-14021.67",  0x000000, 0x80000, CRC(9fa88781) SHA1(a035fd0fe1d37a589adf3a5029c20d237d5cc827), ROM_SKIP(7) )
1787   ROMX_LOAD( "mpr-14022.75",  0x000001, 0x80000, CRC(49e824bb) SHA1(c1330719b5718aa664b5788244d8cb7b7103a57c), ROM_SKIP(7) )
1788   ROMX_LOAD( "mpr-14009.63",  0x000002, 0x80000, CRC(35b5187e) SHA1(6f0f6471c4135d07a2c852cdc50322b99176712e), ROM_SKIP(7) )
1789   ROMX_LOAD( "mpr-14010.71",  0x000003, 0x80000, CRC(9a538b9b) SHA1(cd84a39bd3858fa6c1d8eb4a349d939261cea6b6), ROM_SKIP(7) )
1790   ROMX_LOAD( "mpr-14023.86",  0x000004, 0x80000, CRC(e11c6c67) SHA1(839e71690e75e47d11b758f5b525452bcc75b823), ROM_SKIP(7) )
1791   ROMX_LOAD( "mpr-14024.114", 0x000005, 0x80000, CRC(16344535) SHA1(a9bd101ae93c24a2e8002ad6a111cf0d0d3b1a64), ROM_SKIP(7) )
1792   ROMX_LOAD( "mpr-14011.82",  0x000006, 0x80000, CRC(78e9983b) SHA1(c0f6577b55acda2cc8cdf0884d5c0517f79de4e9), ROM_SKIP(7) )
1793   ROMX_LOAD( "mpr-14012.110", 0x000007, 0x80000, CRC(e9daa1a4) SHA1(24ad782e88a586fbb31f7ad86be4cdeb38823102), ROM_SKIP(7) )
1794
1795   ROMX_LOAD( "mpr-14017.66",  0x400000, 0x80000, CRC(b83df159) SHA1(f0cf99e6ddae1d26fd68240a731f3e28e9c6073b), ROM_SKIP(7) )
1796   ROMX_LOAD( "mpr-14018.74",  0x400001, 0x80000, CRC(76dbe9ce) SHA1(2f5af8d015cf8fb90a0862bc37235bc20d4dac0d), ROM_SKIP(7) )
1797   ROMX_LOAD( "mpr-14005.62",  0x400002, 0x80000, CRC(9e998209) SHA1(c0d39d11d554fd6a43db77ccf96ac04dd634edff), ROM_SKIP(7) )
1798   ROMX_LOAD( "mpr-14006.70",  0x400003, 0x80000, CRC(2caddf1a) SHA1(a2e891e65c7cd156a3131a084ff51ae9b1663bc0), ROM_SKIP(7) )
1799   ROMX_LOAD( "mpr-14019.85",  0x400004, 0x80000, CRC(b15e19ff) SHA1(947c35301875b4842835f2ba6aca216f087a3fc7), ROM_SKIP(7) )
1800   ROMX_LOAD( "mpr-14020.113", 0x400005, 0x80000, CRC(84c7008f) SHA1(b92f3c636c5d91c5b1c6090a48be7bb1be6b927e), ROM_SKIP(7) )
1801   ROMX_LOAD( "mpr-14007.81",  0x400006, 0x80000, CRC(c3cf5faa) SHA1(02bca1b248fcb6313cd529ca2aa0f7516177166b), ROM_SKIP(7) )
1802   ROMX_LOAD( "mpr-14008.109", 0x400007, 0x80000, CRC(7e91beb2) SHA1(bc1a7ce68d6b825daf93ca437dda803857cee0a2), ROM_SKIP(7) )
1803
1804   ROMX_LOAD( "mpr-14013.65",  0x800000, 0x80000, CRC(31dbb2c3) SHA1(3efeff785d78056e2615dc2267f7bb80a6d4c663), ROM_SKIP(7) )
1805   ROMX_LOAD( "mpr-14014.73",  0x800001, 0x80000, CRC(7e68257d) SHA1(600d1066cfa83f5df46e240a473a8f04179e70f8), ROM_SKIP(7) )
1806   ROMX_LOAD( "mpr-14001.61",  0x800002, 0x80000, CRC(71031ad0) SHA1(02b6240461d66907199f846310e72d37faa5fb50), ROM_SKIP(7) )
1807   ROMX_LOAD( "mpr-14002.69",  0x800003, 0x80000, CRC(27e70a5e) SHA1(fa767f6cc8e46c0e804c37666a8499376c09b025), ROM_SKIP(7) )
1808   ROMX_LOAD( "mpr-14015.84",  0x800004, 0x80000, CRC(7540bf85) SHA1(e8f9208aea6ecedb6ae810a362476cdf1d424319), ROM_SKIP(7) )
1809   ROMX_LOAD( "mpr-14016.112", 0x800005, 0x80000, CRC(7d87b94d) SHA1(4ef5b7b114c25b9e274e3f3dd7e3d7bd29d2d8b9), ROM_SKIP(7) )
1810   ROMX_LOAD( "mpr-14003.80",  0x800006, 0x80000, CRC(87725d74) SHA1(d284512ad15362a886072aaa1a3af98f7a0bddf9), ROM_SKIP(7) )
1811   ROMX_LOAD( "mpr-14004.108", 0x800007, 0x80000, CRC(73477291) SHA1(1fe9d7666d89ee55a0178dceb7cfea7ce94b9e18), ROM_SKIP(7) )
1812
1813   ROM_REGION( 0x10000, "soundcpu", 0 )      /* Z80 sound CPU */
1814   ROM_LOAD( "epr-13993.102", 0x000000, 0x10000,  CRC(7cc3b543) SHA1(c5e6a2dca891d0b6528e6d66ccd18b24ed4a9464) )
1815
1816   ROM_REGION( 0x200000, "pcm", ROMREGION_ERASEFF )   /* SegaPCM samples */
1817   ROM_LOAD( "mpr-13996.107", 0x000000, 0x80000, CRC(345f5a41) SHA1(d414c3485ba31863c2b36282756709e06a41d262) )
1818   ROM_LOAD( "mpr-13995.106", 0x080000, 0x80000, CRC(f604c270) SHA1(02023786fec2f2702c2f19f51aff5b7e4928ae91) )
1819   ROM_LOAD( "mpr-13994.105", 0x100000, 0x80000, CRC(76095538) SHA1(aab830e3675116c475fe69e0e991118c045b131b) )
1820ROM_END
1821
1822
1823
17581824/**************************************************************************************************************************
17591825 **************************************************************************************************************************
17601826 **************************************************************************************************************************
r7772r7773
18571923GAMEL(1988, pdrifta,  pdrift,  yboard, pdrift,   generic_yboard, ROT0, "Sega", "Power Drift (World)", GAME_SUPPORTS_SAVE, layout_pdrift )
18581924GAMEL(1988, pdrifte,  pdrift,  yboard, pdrifte,  generic_yboard, ROT0, "Sega", "Power Drift (World, Earlier)", GAME_SUPPORTS_SAVE, layout_pdrift )
18591925GAMEL(1988, pdriftj,  pdrift,  yboard, pdriftj,  generic_yboard, ROT0, "Sega", "Power Drift (Japan)", GAME_SUPPORTS_SAVE, layout_pdrift )
1860GAME( 1991, rchase,   0,       yboard, rchase,   generic_yboard, ROT0, "Sega", "Rail Chase (Japan)", GAME_SUPPORTS_SAVE )
1926GAME( 1991, rchase,   0,       yboard, rchase,   generic_yboard, ROT0, "Sega", "Rail Chase (World)", GAME_SUPPORTS_SAVE )
1927GAME( 1991, rchasej,  rchase,  yboard, rchase,   generic_yboard, ROT0, "Sega", "Rail Chase (Japan)", GAME_SUPPORTS_SAVE )
18611928GAME( 1991, strkfgtr, 0,       yboard, strkfgtr, generic_yboard, ROT0, "Sega", "Strike Fighter (Japan)", GAME_SUPPORTS_SAVE )
src/mame/drivers/vaportra.c
r7772r7773
341341   ROM_LOAD( "pal16l8b.14h", 0x0800, 0x0104, CRC(bf421fce) SHA1(e8b0895b1fe99a3d5b3dcca004a7bfd1a09766b2) )
342342ROM_END
343343
344ROM_START( vaportra3 ) // 74 bytes of 68k code have been changed compared to vaportra set
345   ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */
346   ROM_LOAD16_BYTE( "fl02-3.bin", 0x00000, 0x20000, CRC(6c59be54) SHA1(ce60be53fb2cc3a26a28e8632c8638771d3db3c9) ) // == fl_02-1.bin (99.973297%)
347   ROM_LOAD16_BYTE( "fl00-3.bin", 0x00001, 0x20000, CRC(69f8bef4) SHA1(7249d097c33adac9b42dd98d1328ad1c496ff927) ) // == fl_00-1.bin (99.970245%)
348   ROM_LOAD16_BYTE( "fl_03.bin",   0x40000, 0x20000, CRC(80bd2844) SHA1(3fcaa409c7134388fa9458df8e8aaecc93f085e6) )
349   ROM_LOAD16_BYTE( "fl_01.bin",   0x40001, 0x20000, CRC(9474b085) SHA1(5510309ddab5fbf1dbb0a7b1e424a5dff5ec263d) )
350
351   ROM_REGION( 0x10000, "audiocpu", 0 )   /* Sound CPU */
352   ROM_LOAD( "fj04",    0x00000, 0x10000, CRC(e9aedf9b) SHA1(f7bcf8f666015140aaad8ee5cf619636934b7066) )
353
354   ROM_REGION( 0x080000, "gfx1", 0 ) // original DE board with mask rom split into 4 roms
355   ROM_LOAD16_BYTE( "fl23",   0x00000, 0x20000, CRC(6089f9e7) SHA1(a036068398a8e72c8fcf29fadaaad5a8930c2bfe) )
356   ROM_LOAD16_BYTE( "fl25",   0x00001, 0x20000, CRC(3989290a) SHA1(7d2d8a334d4c206298d806eac4f2cd46e7d4f918) )
357   ROM_LOAD16_BYTE( "fl24",   0x40000, 0x20000, CRC(41551bfa) SHA1(bc636fec6d610f651101656d6e9ad06656ce516a) )
358   ROM_LOAD16_BYTE( "fl26",   0x40001, 0x20000, CRC(dc67fa5c) SHA1(459a1ee059d6bb2fb2c6744fffeb25b915b29e67) )
359
360   ROM_REGION( 0x100000, "gfx2", 0 )
361   ROM_LOAD( "vtmaa02.bin",   0x000000, 0x80000, CRC(091ff98e) SHA1(814dc08c055bad5368955a4b1fe6a706b58adc02) ) /* tiles 3 */
362   ROM_LOAD( "vtmaa01.bin",   0x080000, 0x80000, CRC(c217a31b) SHA1(e259d48190d6890781fb0338e17e14822876babb) ) /* tiles 2 */
363
364   ROM_REGION( 0x100000, "gfx3", 0 )
365   ROM_LOAD( "vtmaa03.bin",   0x000000, 0x80000, CRC(1a30bf81) SHA1(00e6c713e12133a99d64ca80638c9cbc8e26b2c8) ) /* sprites */
366   ROM_LOAD( "vtmaa04.bin",   0x080000, 0x80000, CRC(b713e9cc) SHA1(af33943d75d2ee3a7385f624537008dca9e1d5d8) )
367
368   ROM_REGION( 0x40000, "oki1", 0 )   /* ADPCM samples */
369   ROM_LOAD( "fj06",    0x00000, 0x20000, CRC(6e98a235) SHA1(374564b4e494d03cd1330c06e321b9452c22a075) )
370
371   ROM_REGION( 0x40000, "oki2", 0 )   /* ADPCM samples */
372   ROM_LOAD( "fj05",    0x00000, 0x20000, CRC(39cda2b5) SHA1(f5c5a305025d451ab48f84cd63e36a3bbdefda96) )
373
374   ROM_REGION( 0x200, "proms", 0 )
375   ROM_LOAD( "fj-27.bin",    0x00000, 0x00200, CRC(65045742) SHA1(5dfb6c85a70b208cd16d3bf8ec1897e77f4a9b7d) )
376
377   ROM_REGION( 0x0a00, "plds", 0 )
378   ROM_LOAD( "pal16l8a.6l",  0x0000, 0x0104, CRC(ee748e8f) SHA1(6ffe8b11f076305e82f64e0a12b76ffe725ce345) )
379   ROM_LOAD( "pal16l8b.13g", 0x0200, 0x0104, CRC(6da13bda) SHA1(d7bade089d87015e1e95fbf3f292db4688ee4624) )
380   ROM_LOAD( "pal16l8b.13h", 0x0400, 0x0104, CRC(62a9e098) SHA1(7b7c371c040d250d41fde021d191d62ce95bfc20) )
381   ROM_LOAD( "pal16l8b.14g", 0x0600, 0x0104, CRC(036768aa) SHA1(96185989031e0a9b38ff29bf4cf6162482d33964) )
382   ROM_LOAD( "pal16l8b.14h", 0x0800, 0x0104, CRC(bf421fce) SHA1(e8b0895b1fe99a3d5b3dcca004a7bfd1a09766b2) )
383ROM_END
384
344385ROM_START( vaportrau )
345386   ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */
346387   ROM_LOAD16_BYTE( "fj02",   0x00000, 0x20000, CRC(a2affb73) SHA1(0d49397cc9891047a0b92e92e2e3d0e7fcaf8db9) )
r7772r7773
813854/******************************************************************************/
814855
815856GAME( 1989, vaportra, 0,        vaportra, vaportra, vaportra, ROT270, "Data East Corporation", "Vapor Trail - Hyper Offence Formation (World revision 1)", GAME_SUPPORTS_SAVE )
857GAME( 1989, vaportra3,vaportra, vaportra, vaportra, vaportra, ROT270, "Data East Corporation", "Vapor Trail - Hyper Offence Formation (World revision 3?)", GAME_SUPPORTS_SAVE )
816858GAME( 1989, vaportrau,vaportra, vaportra, vaportra, vaportra, ROT270, "Data East USA", "Vapor Trail - Hyper Offence Formation (US)", GAME_SUPPORTS_SAVE )
817859GAME( 1989, kuhga,    vaportra, vaportra, vaportra, vaportra, ROT270, "Data East Corporation", "Kuhga - Operation Code 'Vapor Trail' (Japan revision 3)", GAME_SUPPORTS_SAVE )
src/mame/drivers/missb2.c
r7772r7773
8686
8787         for (xc = 0; xc < 2; xc++)
8888         {
89            int goffs, code, color, flipx, flipy, x, y;
89            int goffs, code, /*color,*/ flipx, flipy, x, y;
9090
9191            goffs = gfx_offs + xc * 0x40 + (yc & 7) * 0x02 +
9292                  (prom_line[yc/2] & 0x03) * 0x10;
9393            code = state->videoram[goffs] + 256 * (state->videoram[goffs + 1] & 0x03) + 1024 * (gfx_attr & 0x0f);
94            color = (state->videoram[goffs + 1] & 0x3c) >> 2;
94            //color = (state->videoram[goffs + 1] & 0x3c) >> 2;
9595            flipx = state->videoram[goffs + 1] & 0x40;
9696            flipy = state->videoram[goffs + 1] & 0x80;
9797            x = sx + xc * 8;
src/mame/drivers/pgm.c
r7772r7773
10711071   PORT_START("Region")
10721072   PORT_DIPNAME( 0x0003, 0x0000, DEF_STR( Region ) )
10731073   PORT_DIPSETTING(      0x0000, DEF_STR( World ) )
1074//  PORT_DIPSETTING(      0x0001, DEF_STR( World ) ) // again?
1074    PORT_DIPSETTING(      0x0001, "World (duplicate)" ) // again?
10751075   PORT_DIPSETTING(      0x0002, "Korea" )
10761076   PORT_DIPSETTING(      0x0003, "China" )
10771077INPUT_PORTS_END
r7772r7773
15751575   ROM_LOAD( "m0100.rom",    0x400000, 0x200000, CRC(e5c36c83) SHA1(50c6f66770e8faa3df349f7d68c407a7ad021716) )
15761576ROM_END
15771577
1578ROM_START( orlegendca )
1579   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code  */
1580   ROM_LOAD16_WORD_SWAP( "pgm_p01s.rom", 0x000000, 0x020000, CRC(e42b166e) SHA1(2a9df9ec746b14b74fae48b1a438da14973702ea) )// (BIOS)
1581   ROM_LOAD16_WORD_SWAP( "p0101.102",    0x100000, 0x200000, CRC(7a22e1cb) SHA1(4fe0fde00521b0915146334ea7213f3eb7e2affc) )
1582
1583   /* CPU2 = Z80, romless, code uploaded by 68k */
1584
1585   ROM_REGION( 0x800000, "gfx1",  0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
1586   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
1587   ROM_LOAD( "t0100.rom",    0x400000, 0x400000, CRC(61425e1e) SHA1(20753b86fc12003cfd763d903f034dbba8010b32) )
1588
1589   ROM_REGION( 0x800000/5*8, "gfx2", ROMREGION_ERASEFF ) /* Region for 32x32 BG Tiles */
1590   /* 32x32 Tile Data is put here for easier Decoding */
1591
1592   ROM_REGION( 0x1800000, "gfx3", 0 ) /* Sprite Colour Data */
1593   ROM_LOAD( "a0100.rom",    0x0000000, 0x400000, CRC(8b3bd88a) SHA1(42db3a60c6ba9d83ebe2008c8047d094027f65a7) )
1594   ROM_LOAD( "a0101.rom",    0x0400000, 0x400000, CRC(3b9e9644) SHA1(5b95ec1d25c3bc3504c93547f5adb5ce24376405) )
1595   ROM_LOAD( "a0102.rom",    0x0800000, 0x400000, CRC(069e2c38) SHA1(9bddca8c2f5bd80f4abe4e1f062751736dc151dd) )
1596   ROM_LOAD( "a0103.rom",    0x0c00000, 0x400000, CRC(4460a3fd) SHA1(cbebdb65c17605853f7d0b298018dd8801a25a58) )
1597   ROM_LOAD( "a0104.rom",    0x1000000, 0x400000, CRC(5f8abb56) SHA1(6c1ddc0309862a141aa0c0f63b641aec9257aaee) )
1598   ROM_LOAD( "a0105.rom",    0x1400000, 0x400000, CRC(a17a7147) SHA1(44eeb43c6b0ebb829559a20ae357383fbdeecd82) )
1599
1600   ROM_REGION( 0x1000000, "gfx4", 0 ) /* Sprite Masks + Colour Indexes */
1601   ROM_LOAD( "b0100.rom",    0x0000000, 0x400000, CRC(69d2e48c) SHA1(5b5f759007264c07b3b39be8e03a713698e1fc2a) )
1602   ROM_LOAD( "b0101.rom",    0x0400000, 0x400000, CRC(0d587bf3) SHA1(5347828b0a6e4ddd7a263663d2c2604407e4d49c) )
1603   ROM_LOAD( "b0102.rom",    0x0800000, 0x400000, CRC(43823c1e) SHA1(e10a1a9a81b51b11044934ff702e35d8d7ab1b08) )
1604
1605   ROM_REGION( 0x600000, "ics", 0 ) /* Samples - (8 bit mono 11025Hz) - */
1606   ROM_LOAD( "pgm_m01s.rom", 0x000000, 0x200000, CRC(45ae7159) SHA1(d3ed3ff3464557fd0df6b069b2e431528b0ebfa8) ) // (BIOS)
1607   ROM_LOAD( "m0100.rom",    0x400000, 0x200000, CRC(e5c36c83) SHA1(50c6f66770e8faa3df349f7d68c407a7ad021716) )
1608ROM_END
1609
1610
15781611/*
15791612
15801613Oriental Legend / Xi You Shi E Zhuan (CHINA 111 Ver.)
r7772r7773
22162249   ROM_LOAD( "m0600.rom",    0x400000, 0x400000, CRC(3ada4fd6) SHA1(4c87adb25d31cbd41f04fbffe31f7bc37173da76) )
22172250ROM_END
22182251
2252
2253ROM_START( kovsh103 )
2254   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
2255   ROM_LOAD16_WORD_SWAP( "pgm_p01s.rom", 0x000000, 0x020000, CRC(e42b166e) SHA1(2a9df9ec746b14b74fae48b1a438da14973702ea) )  // (BIOS)
2256   ROM_LOAD16_WORD_SWAP( "p0600.103",    0x100000, 0x400000, CRC(f0b3da82) SHA1(4067beb69c049b51bce6154f4cf880600ca4de11) )
2257
2258   /* CPU2 = Z80, romless, code uploaded by 68k */
2259
2260   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
2261   ROM_LOAD( "kovsh_v100_china.asic", 0x000000, 0x04000,  CRC(0f09a5c1) SHA1(621b38c05f33277608d58b49822aebc930ae4870) )
2262
2263   ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
2264   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
2265   ROM_LOAD( "t0600.rom",    0x400000, 0x800000, CRC(4acc1ad6) SHA1(0668dbd5e856c2406910c6b7382548b37c631780) )
2266
2267   ROM_REGION( 0xc00000/5*8, "gfx2", ROMREGION_ERASEFF ) /* Region for 32x32 BG Tiles */
2268   /* 32x32 Tile Data is put here for easier Decoding */
2269
2270   /* all roms below need checking to see if they're the same on this board */
2271   ROM_REGION( 0x1e00000, "gfx3", 0 ) /* Sprite Colour Data */
2272   ROM_LOAD( "a0600.rom",    0x0000000, 0x0800000, CRC(d8167834) SHA1(fa55a99629d03b2ea253392352f70d2c8639a991) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
2273   ROM_LOAD( "a0601.rom",    0x0800000, 0x0800000, CRC(ff7a4373) SHA1(7def9fca7513ad5a117da230bebd2e3c78679041) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
2274   ROM_LOAD( "a0602.rom",    0x1000000, 0x0800000, CRC(e7a32959) SHA1(3d0ed684dc5b269238890836b2ce7ef46aa5265b) ) // FIXED BITS (xxxxxxxx1xxxxxxx)
2275   ROM_LOAD( "a0603.rom",    0x1800000, 0x0400000, CRC(ec31abda) SHA1(ee526655369bae63b0ef0730e9768b765c9950fc) )
2276   ROM_LOAD( "a0604.rom",    0x1a00000, 0x0400000, CRC(26b59fd3) SHA1(53219376056f4766dc5236735599d982ceb56b84) )
2277
2278   ROM_REGION( 0x1000000, "gfx4", 0 ) /* Sprite Masks + Colour Indexes */
2279   ROM_LOAD( "b0600.rom",    0x0000000, 0x0800000, CRC(7d3cd059) SHA1(00cf994b63337e0e4ebe96453daf45f24192af1c) )
2280   ROM_LOAD( "b0601.rom",    0x0800000, 0x0400000, CRC(a0bb1c2f) SHA1(0542348c6e27779e0a98de16f04f9c18158f2b28) )
2281   ROM_LOAD( "b0602.rom",    0x0c00000, 0x0100000, CRC(9df77934) SHA1(99a3fe337c13702c9aa2373bcd1bb1befd0e2a13) ) // tis dump had the same rom 4x bigger but with the data duplicated 4x, which is correct?
2282
2283   ROM_REGION( 0x800000, "ics", 0 ) /* Samples - (8 bit mono 11025Hz) - */
2284   ROM_LOAD( "pgm_m01s.rom", 0x000000, 0x200000, CRC(45ae7159) SHA1(d3ed3ff3464557fd0df6b069b2e431528b0ebfa8) ) // (BIOS)
2285   ROM_LOAD( "m0600.rom",    0x400000, 0x400000, CRC(3ada4fd6) SHA1(4c87adb25d31cbd41f04fbffe31f7bc37173da76) )
2286ROM_END
2287
2288
22192289ROM_START( photoy2k )
22202290   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
22212291   ROM_LOAD16_WORD_SWAP( "pgm_p01s.rom", 0x000000, 0x020000, CRC(e42b166e) SHA1(2a9df9ec746b14b74fae48b1a438da14973702ea) )  // (BIOS)
r7772r7773
32363306   /* CPU2 = Z80, romless, code uploaded by 68k */
32373307
32383308   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
3239   ROM_LOAD( "martial_masters_v102_usa.asic", 0x000000, 0x04000, BAD_DUMP CRC(a6c0828c) SHA1(0a5bda56dca264c3c7ff7698b8f699563f203c4d) ) // not verified, could be bad
3309   ROM_LOAD( "martial_masters_v102_usa.asic", 0x000000, 0x04000, CRC(a6c0828c) SHA1(0a5bda56dca264c3c7ff7698b8f699563f203c4d) ) // not verified, could be bad
32403310
32413311   ROM_REGION32_LE( 0x400000, "user1", 0 ) /* Protection Data (encrypted external ARM data) */
32423312   ROM_LOAD( "v102_16m.u10", 0x000000, 0x200000,  CRC(18b745e6) SHA1(7bcb58dd3a2d6072f492cf0dd7181cb061c1f49d) )
r7772r7773
32733343   /* CPU2 = Z80, romless, code uploaded by 68k */
32743344
32753345   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
3276   ROM_LOAD( "martial_masters_v101_cn.asic", 0x000000, 0x04000, BAD_DUMP CRC(b3e25b7d) SHA1(6147d7ee2e11636521df1bb96ed5da8ad21b2a57) ) // not verified, could be bad
3346   ROM_LOAD( "martial_masters_v101_cn.asic", 0x000000, 0x04000, CRC(b3e25b7d) SHA1(6147d7ee2e11636521df1bb96ed5da8ad21b2a57) ) // not verified, could be bad
32773347
32783348   ROM_REGION32_LE( 0x400000, "user1", 0 ) /* Protection Data (encrypted external ARM data) */
32793349   ROM_LOAD( "v102_16m.u10", 0x000000, 0x200000,  CRC(18b745e6) SHA1(7bcb58dd3a2d6072f492cf0dd7181cb061c1f49d) )
r7772r7773
33023372   ROM_LOAD( "m1001.u7",    0xc00000, 0x400000, CRC(662d2d48) SHA1(2fcc3099d9c04456cae3b13035fb28eaf709e7d8) )
33033373ROM_END
33043374
3375ROM_START( martmastc102 )
3376   ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */
3377   ROM_LOAD16_WORD_SWAP( "pgm_p01s.rom", 0x000000, 0x020000, CRC(e42b166e) SHA1(2a9df9ec746b14b74fae48b1a438da14973702ea) )  // (BIOS)
3378   ROM_LOAD16_WORD_SWAP( "martmast_u9-v102.322",    0x100000, 0x400000, CRC(bb24b92a) SHA1(442cb9e3f51727be82f71c078c5c3e49dc1a23f0) )
3379
3380   /* CPU2 = Z80, romless, code uploaded by 68k */
3381
3382   ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
3383   ROM_LOAD( "martial_masters_v101_cn.asic", 0x000000, 0x04000, CRC(b3e25b7d) SHA1(6147d7ee2e11636521df1bb96ed5da8ad21b2a57) ) // not verified, could be bad
3384
3385   ROM_REGION32_LE( 0x400000, "user1", 0 ) /* Protection Data (encrypted external ARM data) */
3386   ROM_LOAD( "martmast_u10-v101.160", 0x000000, 0x200000,   CRC(d5d93294) SHA1(58d0a99749f7dc05814892b508ce21b160410947) )
3387
3388   ROM_REGION( 0xc00000, "gfx1", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */
3389   ROM_LOAD( "pgm_t01s.rom", 0x000000, 0x200000, CRC(1a7123a0) SHA1(cc567f577bfbf45427b54d6695b11b74f2578af3) ) // (BIOS)
3390   ROM_LOAD( "t1000.u3",    0x400000, 0x800000, CRC(bbf879b5) SHA1(bd9a6aea34ad4001e89e62ff4b7a2292eb833c00) )
3391
3392   ROM_REGION( 0xc00000/5*8, "gfx2", ROMREGION_ERASEFF ) /* Region for 32x32 BG Tiles */
3393   /* 32x32 Tile Data is put here for easier Decoding */
3394
3395   ROM_REGION( 0x2800000, "gfx3", 0 ) /* Sprite Colour Data */
3396   ROM_LOAD( "a1000.u3",    0x0000000, 0x0800000, CRC(43577ac8) SHA1(6eea8b455985d5bac74dcc9943cdc3c0902de6cc) )
3397   ROM_LOAD( "a1001.u4",    0x0800000, 0x0800000, CRC(fe7a476f) SHA1(a8c7f1f0dd3e53141aed6d927eb88a3ceebb81e4) )
3398   ROM_LOAD( "a1002.u6",    0x1000000, 0x0800000, CRC(62e33d38) SHA1(96163d583e25073594f8413ce263e56b66bd69a1) )
3399   ROM_LOAD( "a1003.u8",    0x1800000, 0x0800000, CRC(b2c4945a) SHA1(7b18287a2db56db3651cfd4deb607af53522fefd) )
3400   ROM_LOAD( "a1004.u10",   0x2000000, 0x0400000, CRC(9fd3f5fd) SHA1(057531f91062be51589c6cf8f4170089b9be6380) )
3401
3402   ROM_REGION( 0x1000000, "gfx4", 0 ) /* Sprite Masks + Colour Indexes */
3403   ROM_LOAD( "b1000.u9",    0x0000000, 0x0800000,  CRC(c5961f6f) SHA1(a68060b10edbd084cbde79d2ed1c9084777beb10) )
3404   ROM_LOAD( "b1001.u11",   0x0800000, 0x0800000,  CRC(0b7e1c06) SHA1(545e15e0087f8621d593fecd8b4013f7ca311686) )
3405
3406   ROM_REGION( 0x1000000, "ics", 0 ) /* Samples - (8 bit mono 11025Hz) - */
3407   ROM_LOAD( "pgm_m01s.rom", 0x000000, 0x200000, CRC(45ae7159) SHA1(d3ed3ff3464557fd0df6b069b2e431528b0ebfa8) ) // (BIOS)
3408   ROM_LOAD( "m1000.u5",    0x400000, 0x800000, CRC(ed407ae8) SHA1(a6e9c09b39c13e8fb7fbc89fa9f823cbeb66e901) )
3409   ROM_LOAD( "m1001.u7",    0xc00000, 0x400000, CRC(662d2d48) SHA1(2fcc3099d9c04456cae3b13035fb28eaf709e7d8) )
3410ROM_END
3411
3412
33053413/*
33063414
33073415Demon Front
r7772r7773
44914599   Working (at least one set of the game is fully working)
44924600   -----------------------------------------------------------------------------------------------------------------------*/
44934601
4494GAME( 1997, orlegend,     pgm,       pgm,     pgm,      orlegend,   ROT0,   "IGS", "Oriental Legend / Xi You Shi E Zhuan (ver. 126)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
4495GAME( 1997, orlegende,    orlegend,  pgm,     pgm,      orlegend,   ROT0,   "IGS", "Oriental Legend / Xi You Shi E Zhuan (ver. 112)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
4496GAME( 1997, orlegendc,    orlegend,  pgm,     pgm,      orlegend,   ROT0,   "IGS", "Oriental Legend / Xi You Shi E Zhuan (ver. 112, Chinese Board)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
4497GAME( 1997, orlegend111c, orlegend,  pgm,     pgm,      orlegend,   ROT0,   "IGS", "Oriental Legend / Xi You Shi E Zhuan (ver. 111, Chinese Board)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
4498GAME( 1997, orlegend105k, orlegend,  pgm,     orld105k, orlegend,   ROT0,   "IGS", "Oriental Legend / Xi You Shi E Zhuan (ver. 105, Korean Board)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
4602// the version numbering on these is a mess... date srings from ROM (and in some cases even those are missing..)
4603GAME( 1997, orlegend,     pgm,       pgm,     pgm,      orlegend,   ROT0,   "IGS", "Oriental Legend / Xi You Shi E Zhuan (ver. 126)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )                // V0001 01/14/98 18:16:38 - runs as World
4604GAME( 1997, orlegende,    orlegend,  pgm,     pgm,      orlegend,   ROT0,   "IGS", "Oriental Legend / Xi You Shi E Zhuan (ver. 112)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )                // V0001 07/14/97 11:19:45 - runs as World
4605GAME( 1997, orlegendc,    orlegend,  pgm,     pgm,      orlegend,   ROT0,   "IGS", "Oriental Legend / Xi You Shi E Zhuan (ver. 112, Chinese Board)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // V0001 05/05/97 10:08:21 - runs as World, Korea, China
4606GAME( 1997, orlegendca,   orlegend,  pgm,     pgm,      orlegend,   ROT0,   "IGS", "Oriental Legend / Xi You Shi E Zhuan (ver. ???, Chinese Board)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // V0001 04/02/97 13:35:43 - runs as HongKong, China, China
4607GAME( 1997, orlegend111c, orlegend,  pgm,     pgm,      orlegend,   ROT0,   "IGS", "Oriental Legend / Xi You Shi E Zhuan (ver. 111, Chinese Board)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // V0001 no date!          - runs as HongKong, China, China
4608GAME( 1997, orlegend105k, orlegend,  pgm,     orld105k, orlegend,   ROT0,   "IGS", "Oriental Legend / Xi You Shi E Zhuan (ver. 105, Korean Board)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )  // V0000 no date!          - runs as Korea
44994609
45004610GAME( 1997, drgw2,        pgm,       drgw2,   pgm,      drgw2,      ROT0,   "IGS", "Dragon World II (ver. 110X, Export)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // This set still has protection issues!
45014611GAME( 1997, drgw2j,       drgw2,     drgw2,   pgm,      drgw2j,     ROT0,   "IGS", "Chuugokuryuu II (ver. 100J, Japan)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // This set still has protection issues!
r7772r7773
45044614GAME( 1999, photoy2k,     pgm,       kov,     photoy2k, djlzz,      ROT0,   "IGS", "Photo Y2K (ver. 104)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) /* region provided by protection device */
45054615GAME( 1999, photoy2k102,  photoy2k,  kov,     photoy2k, djlzz,      ROT0,   "IGS", "Photo Y2K (ver. 102, Japanese Board)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) /* region provided by protection device */
45064616
4507GAME( 1999, kovsh,        pgm,       kov,     sango,    kovsh,      ROT0,   "IGS", "Knights of Valour Super Heroes / Sangoku Senki Super Heroes (ver. 104)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
4617GAME( 1999, kovsh,        pgm,       kov,     sango,    kovsh,      ROT0,   "IGS", "Knights of Valour Super Heroes / Sangoku Senki Super Heroes (ver. 104, CN)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 68k V104, China internal ROM
4618GAME( 1999, kovsh103,     kovsh,     kov,     sango,    kovsh,      ROT0,   "IGS", "Knights of Valour Super Heroes / Sangoku Senki Super Heroes (ver. 103, CN)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 68k V103, China internal ROM
45084619
4509GAME( 2000, kov2,         pgm,       kov2,    sango,    kov2,       ROT0,   "IGS", "Knights of Valour 2 / Sangoku Senki 2 (ver. 107)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 05/10/01 14:24:08 V107 (Ext. Arm V102, Int. Arm V100HK)
4510GAME( 2000, kov2106,      kov2,      kov2,    sango,    kov2,       ROT0,   "IGS", "Knights of Valour 2 / Sangoku Senki 2 (ver. 106)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 02/27/01 13:26:46 V106 (Ext. Arm V102, Int. Arm V100HK)
4511GAME( 2000, kov2103,      kov2,      kov2,    sango,    kov2,       ROT0,   "IGS", "Knights of Valour 2 / Sangoku Senki 2 (ver. 103)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 12/28/00 15:09:31 V103 (Ext. Arm V101, Int. Arm V100HK)
4512GAME( 2000, kov2102,      kov2,      kov2,    sango,    kov2,       ROT0,   "IGS", "Knights of Valour 2 / Sangoku Senki 2 (ver. 102)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 12/14/00 10:33:36 V102 (Ext. Arm V101, Int. Arm V100HK)
4513GAME( 2000, kov2100,      kov2,      kov2,    sango,    kov2,       ROT0,   "IGS", "Knights of Valour 2 / Sangoku Senki 2 (ver. 100)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 11/29/00 11:03:08 V100 (Ext. Arm V100, Int. Arm V100HK)
4620GAME( 2000, kov2,         pgm,       kov2,    sango,    kov2,       ROT0,   "IGS", "Knights of Valour 2 / Sangoku Senki 2 (ver. 107, 102, 100HK)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 05/10/01 14:24:08 V107 (Ext. Arm V102, Int. Arm V100HK)
4621GAME( 2000, kov2106,      kov2,      kov2,    sango,    kov2,       ROT0,   "IGS", "Knights of Valour 2 / Sangoku Senki 2 (ver. 106, 102, 100KH)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 02/27/01 13:26:46 V106 (Ext. Arm V102, Int. Arm V100HK)
4622GAME( 2000, kov2103,      kov2,      kov2,    sango,    kov2,       ROT0,   "IGS", "Knights of Valour 2 / Sangoku Senki 2 (ver. 103, 101, 100HK)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 12/28/00 15:09:31 V103 (Ext. Arm V101, Int. Arm V100HK)
4623GAME( 2000, kov2102,      kov2,      kov2,    sango,    kov2,       ROT0,   "IGS", "Knights of Valour 2 / Sangoku Senki 2 (ver. 102, 101, 100HK)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 12/14/00 10:33:36 V102 (Ext. Arm V101, Int. Arm V100HK)
4624GAME( 2000, kov2100,      kov2,      kov2,    sango,    kov2,       ROT0,   "IGS", "Knights of Valour 2 / Sangoku Senki 2 (ver. 100, 100, 100HK)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 11/29/00 11:03:08 V100 (Ext. Arm V100, Int. Arm V100HK)
45144625
4515GAME( 2001, martmast,     pgm,       kov2,    sango,    martmast,   ROT0,   "IGS", "Martial Masters (ver. 102)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
4516GAME( 2001, martmastc,    martmast,  kov2,    sango,    martmast,   ROT0,   "IGS", "Martial Masters (ver. 101, Chinese Board)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
4626GAME( 2001, martmast,     pgm,       kov2,    sango,    martmast,   ROT0,   "IGS", "Martial Masters (ver. 104, 102, 102US)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 68k V104, Ext Arm 102, Int Arm 102US
4627GAME( 2001, martmastc,    martmast,  kov2,    sango,    martmast,   ROT0,   "IGS", "Martial Masters (ver. 104, 102, 101CN)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 68k V104, Ext Arm 102, Int Arm 101CN
4628GAME( 2001, martmastc102, martmast,  kov2,    sango,    martmast,   ROT0,   "IGS", "Martial Masters (ver. 102, 101, 101CN)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // 68k V102, Ext Arm 101, Int Arm 101CN
45174629
45184630/* -----------------------------------------------------------------------------------------------------------------------
45194631   Partially Working, playable, but some imperfections
45204632   -----------------------------------------------------------------------------------------------------------------------*/
45214633
4522GAME( 1998, killbld,      0,         killbld, killbld,  killbld,    ROT0,   "IGS", "The Killing Blade (ver. 109, Chinese Board)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // it's playable, but there are some things unclear about the protection
4634GAME( 1998, killbld,      pgm,       killbld, killbld,  killbld,    ROT0,   "IGS", "The Killing Blade (ver. 109, Chinese Board)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // it's playable, but there are some things unclear about the protection
45234635GAME( 1998, killbld104,   killbld,   killbld, killbld,  killbld,    ROT0,   "IGS", "The Killing Blade (ver. 104)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // this set doesn't work, needs the DMA device emulating properly rather than using extracted data
45244636
45254637GAME( 1998, olds,         pgm,       olds,    olds,     olds,       ROT0,   "IGS", "Oriental Legend Special / Xi You Shi E Zhuan Super (ver. 101, Korean Board)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
45264638GAME( 1998, olds100,      olds,      olds,    olds,     olds,       ROT0,   "IGS", "Oriental Legend Special / Xi You Shi E Zhuan Super (ver. 100)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
4527GAME( 1998, olds100a,     olds,      olds,    olds,     olds,       ROT0,   "IGS", "Oriental Legend Special / Xi You Shi E Zhuan Super (alt ver. 100)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // grashes on some bosses, high score table etc.
4639GAME( 1998, olds100a,     olds,      olds,    olds,     olds,       ROT0,   "IGS", "Oriental Legend Special / Xi You Shi E Zhuan Super (alt ver. 100)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) // crashes on some bosses, high score table etc.
45284640
45294641/* -----------------------------------------------------------------------------------------------------------------------
45304642   NOT Working (mostly due to needing internal protection roms dumped)
r7772r7773
45324644GAME( 1998, drgw3,        pgm,       pgm,     sango,    dw3,        ROT0,   "IGS", "Dragon World 3 (ver. 100)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
45334645GAME( 1998, drgw3k,       drgw3,     pgm,     sango,    dw3,        ROT0,   "IGS", "Dragon World 3 (ver. 106, Korean Board)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
45344646
4535GAME( 1999, kov,          pgm,       kov,     sango,    kov,        ROT0,   "IGS", "Knights of Valour / Sangoku Senki (ver. 117)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
4536GAME( 1999, kov115,       kov,       kov,     sango,    kov,        ROT0,   "IGS", "Knights of Valour / Sangoku Senki (ver. 115)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
4537GAME( 1999, kov100,       kov,       kov,     sango,    kov,        ROT0,   "IGS", "Knights of Valour / Sangoku Senki (ver. 100, Japanese Board)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
4647GAME( 1999, kov,          pgm,       kov,     sango,    kov,        ROT0,   "IGS", "Knights of Valour / Sangoku Senki (ver. 117)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */                 // V0008 04/27/99 10:33:33
4648GAME( 1999, kov115,       kov,       kov,     sango,    kov,        ROT0,   "IGS", "Knights of Valour / Sangoku Senki (ver. 115)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */                 // V0006 02/22/99 11:53:18
4649GAME( 1999, kov100,       kov,       kov,     sango,    kov,        ROT0,   "IGS", "Knights of Valour / Sangoku Senki (ver. 100, Japanese Board)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // V0002 01/31/99 01:54:16
45384650
45394651GAME( 1999, kovplus,      pgm,       kov,     sango,    kov,        ROT0,   "IGS", "Knights of Valour Plus / Sangoku Senki Plus (ver. 119)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
45404652GAME( 1999, kovplusa,     kovplus,   kov,     sango,    kov,        ROT0,   "IGS", "Knights of Valour Plus / Sangoku Senki Plus (alt ver. 119)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
r7772r7773
45574669
45584670GAME( 2004, oldsplus,     pgm,       kov,     olds,     oldsplus,   ROT0,   "IGS", "Oriental Legend Special Plus / Xi You Shi E Zhuan Super Plus", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
45594671
4560GAME( 2004, kovshp,       kov,       kov,     sango,    kovshp,     ROT0,   "IGS", "Knights of Valour Super Heroes Plus / Sangoku Senki Super Heroes Plus (ver. 100)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
4672GAME( 2004, kovshp,       pgm,       kov,     sango,    kovshp,     ROT0,   "IGS", "Knights of Valour Super Heroes Plus / Sangoku Senki Super Heroes Plus (ver. 100)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
45614673
45624674GAME( 2005, killbldp,     pgm,       svg,     sango,    killbldp,   ROT0,   "IGS", "The Killing Blade Plus (ver. 300)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */
45634675
src/mame/drivers/skyarmy.c
r7772r7773
11/*
2 2010.04.05. stephh
3
4    - Fixed Dip Switches and Inputs (after verification of the Z80 code)
5    - Updated memory map to partially handle screen flipping
6
27 05/01/2003  MooglyGuy/Ryan Holtz
38    - Corrected second AY (shouldn't have been there)
49    - Added first AY's status read
r7772r7773
3944   int nmi;
4045};
4146
47WRITE8_HANDLER( skyarmy_flip_screen_x_w )
48{
49   flip_screen_x_set(space->machine, data & 0x01);
50}
51
52WRITE8_HANDLER( skyarmy_flip_screen_y_w )
53{
54   flip_screen_y_set(space->machine, data & 0x01);
55}
56
4257static TILE_GET_INFO( get_skyarmy_tile_info )
4358{
4459   skyarmy_state *state = (skyarmy_state *)machine->driver_data;
r7772r7773
144159{
145160   skyarmy_state *state = (skyarmy_state *)space->machine->driver_data;
146161
147   state->nmi=data&1;
162   state->nmi=data & 1;
148163}
149164
150165
r7772r7773
160175   AM_RANGE(0xa002, 0xa002) AM_READ_PORT("P2")
161176   AM_RANGE(0xa003, 0xa003) AM_READ_PORT("SYSTEM")
162177   AM_RANGE(0xa004, 0xa004) AM_WRITE(nmi_enable_w) // ???
163   AM_RANGE(0xa005, 0xa005) AM_WRITENOP
164   AM_RANGE(0xa006, 0xa006) AM_WRITENOP
178   AM_RANGE(0xa005, 0xa005) AM_WRITE(skyarmy_flip_screen_x_w)
179   AM_RANGE(0xa006, 0xa006) AM_WRITE(skyarmy_flip_screen_y_w)
165180   AM_RANGE(0xa007, 0xa007) AM_WRITENOP
166181ADDRESS_MAP_END
167182
r7772r7773
171186   AM_RANGE(0x06, 0x06) AM_DEVREAD("aysnd", ay8910_r)
172187ADDRESS_MAP_END
173188
189
190/* verified from Z80 code */
174191static INPUT_PORTS_START( skyarmy )
175192   PORT_START("DSW")
176   PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) )
193   PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) )
177194   PORT_DIPSETTING(    0x00, "2" )
178195   PORT_DIPSETTING(    0x01, "3" )
179196   PORT_DIPSETTING(    0x02, "4" )
180   PORT_DIPSETTING(    0x03, DEF_STR (Free_Play ))
181   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Coinage ) )
197   PORT_DIPSETTING(    0x03, DEF_STR ( Infinite ) )
198   PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )
199   PORT_DIPSETTING(    0x00, "10000" )
200   PORT_DIPSETTING(    0x04, "20000" )
201   PORT_DIPSETTING(    0x08, "30000" )
202   PORT_DIPSETTING(    0x0c, "40000" )
203   PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coinage ) )
204   PORT_DIPSETTING(    0x30, DEF_STR( 3C_1C ) )
205   PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
182206   PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
183   PORT_DIPSETTING(    0x01, DEF_STR( 1C_2C ) )
184   /* coinage - bits 4-7 ? */
207   PORT_DIPSETTING(    0x10, DEF_STR( 1C_2C ) )
208   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Flip_Screen ) )
209   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
210   PORT_DIPSETTING(    0x40, DEF_STR( On ) )
211   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )
212   PORT_DIPSETTING(    0x80, DEF_STR( Upright ) )
213   PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
185214
186215   PORT_START("P1")
187   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
188   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
189   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
190   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
216   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )    PORT_8WAY
217   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )  PORT_8WAY
218   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )  PORT_8WAY
219   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
191220   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
192221   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1)
193   PORT_BIT( 0xC0, IP_ACTIVE_HIGH, IPT_UNUSED )
222   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
223   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
194224
195225   PORT_START("P2")
196   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
197   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
198   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
199   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
200   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
201   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2)
202   PORT_BIT( 0xC0, IP_ACTIVE_HIGH, IPT_UNUSED )
226   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )    PORT_8WAY PORT_COCKTAIL
227   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_COCKTAIL
228   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_COCKTAIL
229   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
230   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
231   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL
232   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
233   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
203234
204235   PORT_START("SYSTEM")
205236   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
206237   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 )
207238   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START2 )
208   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON3 )
209   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON4 )
210   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON5 )
211   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON6 )
212   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON7 )
239   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
240   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
241   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
242   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
243   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
213244INPUT_PORTS_END
214245
215246static const gfx_layout charlayout =
r7772r7773
292323   ROM_LOAD( "a6.bin",  0x0000, 0x0020, CRC(c721220b) SHA1(61b3320fb616c0600d56840cb6438616c7e0c6eb) )
293324ROM_END
294325
295GAME( 1982, skyarmy, 0, skyarmy, skyarmy, 0, ROT90, "Shoei", "Sky Army", 0 )
296
326GAME( 1982, skyarmy, 0, skyarmy, skyarmy, 0, ROT90, "Shoei", "Sky Army", GAME_NO_COCKTAIL )
src/mame/drivers/qix.c
r7772r7773
12661266   const address_space *videospace = cputag_get_address_space(machine, "videocpu", ADDRESS_SPACE_PROGRAM);
12671267   const UINT8 *patch;
12681268   UINT8 *rom, *decrypted;
1269   int i, size;
1269   int i;
12701270
12711271   /********************************
12721272
r7772r7773
12971297
12981298   i = 0;
12991299   patch = memory_region(machine, "user2");
1300   size = memory_region_length(machine, "user2");
13011300   rom = memory_region(machine, "videocpu");
13021301   decrypted = auto_alloc_array(machine, UINT8, 0x6000);
13031302
src/mame/drivers/snesb.c
r7772r7773
351351   PORT_CONFSETTING(    0x80, "BG4A (higher) only" )
352352
353353   PORT_START("DEBUG2")
354   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle BG 1") PORT_CODE(KEYCODE_1_PAD)
355   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle BG 2") PORT_CODE(KEYCODE_2_PAD)
356   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle BG 3") PORT_CODE(KEYCODE_3_PAD)
357   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle BG 4") PORT_CODE(KEYCODE_4_PAD)
358   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Objects") PORT_CODE(KEYCODE_5_PAD)
359   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Main/Sub") PORT_CODE(KEYCODE_6_PAD)
360   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Color Math") PORT_CODE(KEYCODE_7_PAD)
361   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Windows") PORT_CODE(KEYCODE_8_PAD)
354   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle BG 1") PORT_CODE(KEYCODE_1_PAD) PORT_TOGGLE
355   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle BG 2") PORT_CODE(KEYCODE_2_PAD) PORT_TOGGLE
356   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle BG 3") PORT_CODE(KEYCODE_3_PAD) PORT_TOGGLE
357   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle BG 4") PORT_CODE(KEYCODE_4_PAD) PORT_TOGGLE
358   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Objects") PORT_CODE(KEYCODE_5_PAD) PORT_TOGGLE
359   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Main/Sub") PORT_CODE(KEYCODE_6_PAD) PORT_TOGGLE
360   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Color Math") PORT_CODE(KEYCODE_7_PAD) PORT_TOGGLE
361   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Windows") PORT_CODE(KEYCODE_8_PAD) PORT_TOGGLE
362362
363363   PORT_START("DEBUG3")
364   PORT_BIT( 0x4, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mosaic") PORT_CODE(KEYCODE_9_PAD)
364   PORT_BIT( 0x4, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mosaic") PORT_CODE(KEYCODE_9_PAD) PORT_TOGGLE
365365   PORT_CONFNAME( 0x70, 0x00, "Select OAM priority" )
366366   PORT_CONFSETTING(    0x00, "All" )
367367   PORT_CONFSETTING(    0x10, "OAM0 only" )
r7772r7773
373373   PORT_CONFSETTING(    0x80, DEF_STR( On ) )
374374
375375   PORT_START("DEBUG4")
376   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 0 draw")
377   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 1 draw")
378   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 2 draw")
379   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 3 draw")
380   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 4 draw")
381   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 5 draw")
382   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 6 draw")
383   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 7 draw")
376   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 0 draw") PORT_TOGGLE
377   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 1 draw") PORT_TOGGLE
378   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 2 draw") PORT_TOGGLE
379   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 3 draw") PORT_TOGGLE
380   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 4 draw") PORT_TOGGLE
381   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 5 draw") PORT_TOGGLE
382   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 6 draw") PORT_TOGGLE
383   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 7 draw") PORT_TOGGLE
384384#endif
385385INPUT_PORTS_END
386386
src/mame/drivers/namcos23.c
r7772r7773
2121    - Text layer is (almost?) identical to System 22 & Super System 22.
2222
2323    TODO:
24    - Palette is not right.
25
2624    - Hook up gun inputs (?) via the 2 serial latches at d00004 and d00006.
2725      Works like this: write to d00004, then read d00004 12 times.  Ditto at
2826      d00006.  This gives 24 bits of inputs (?) from the I/O board (?) or guns (?)
2927
30    - The entire 3D subsystem.  Is there a DSP living down there?
31
3228    - There are currently no differences seen between System 23 (Time Crisis 2) and
3329      Super System 23 (GP500, Final Furlong 2).  These will presumably appear when
3430      the 3D hardware is emulated.
r7772r7773
3632    - Serial number data is at offset 0x201 in the BIOS.  Until the games are running
3733      and displaying it I'm not going to meddle with it though.
3834
39    - Ok, it's the "mt" roms, which the game calls data roms.  One pair is
40      at a8000000, the other at aa000000.  Point roms are accessed for
41      checksumming through a port at a200000x:
35    - Point roms are accessed for checksumming through a port at a200000x:
4236      - reset the port by writing 0000 to a2000006
4337      - write offset >> 16  to a2000004
4438      - write offset & ffff to a2000004 (yes, same address, hence the reset)
r7772r7773
11661160*/
11671161
11681162#include "emu.h"
1163#include <float.h>
1164#include "video/poly.h"
11691165#include "cpu/mips/mips3.h"
11701166#include "cpu/h83002/h8.h"
11711167#include "cpu/sh2/sh2.h"
r7772r7773
11771173#define S23_HSYNC   (16666150)
11781174#define S23_MODECLOCK   (130205)
11791175
1180//static int ss23_vstat = 0, hstat = 0, vstate = 0;
11811176static tilemap_t *bgtilemap;
11821177static UINT32 *namcos23_textram, *namcos23_shared_ram, *gmen_sh2_shared;
11831178static UINT32 *namcos23_charram;
r7772r7773
11901185
11911186static UINT16 c417_ram[0x10000], c417_adr = 0;
11921187
1193static UINT16 c412_sdram_a[0x100000];
1188static UINT16 c412_sdram_a[0x100000]; // Framebuffers, probably
11941189static UINT16 c412_sdram_b[0x100000];
1195static UINT16 c412_sram[0x20000];
1196static UINT16 c412_pczram[0x200];
1190static UINT16 c412_sram[0x20000];     // Ram-based tiles for rendering
1191static UINT16 c412_pczram[0x200];     // Ram-based tilemap for rendering, or something else
11971192static UINT32 c412_adr = 0;
11981193
11991194static UINT16 c421_dram_a[0x40000];
r7772r7773
12041199static INT16 s23_c422_regs[0x10];
12051200static int s23_subcpu_running;
12061201
1202static emu_timer *c361_timer;
1203
12071204static UINT32 p3d_address, p3d_size;
12081205
1206static const UINT32 *ptrom;
1207static const UINT16 *tmlrom;
1208static const UINT8  *tmhrom, *texrom;
1209static UINT32 tileid_mask, tile_mask, ptrom_limit;
1210
1211// It may only be 128
1212// At 0x1e bytes per slot, rounded up to 0x20, that's 0x1000 to 0x2000 bytes.
1213// That fits pretty much anywhere, including inside a IC
1214// No idea at that point if it's CPU-reachable.  DMA's probably more efficient anyway.
1215
1216// Matrices are stored in signed 2.14 fixed point
1217// Vectors are stored in signed 10.14 fixed point
1218
1219static INT16 matrices[256][9];
1220static INT32 vectors[256][3];
1221static INT32 light_vector[3];
1222static UINT16 scaling;
1223
1224
12091225static UINT16 nthword( const UINT32 *pSource, int offs )
12101226{
12111227   pSource += offs/2;
r7772r7773
12311247   tilemap_mark_tile_dirty(bgtilemap, (offset*2)+1);
12321248}
12331249
1234static VIDEO_START( ss23 )
1235{
1236   gfx_element_set_source(machine->gfx[0], (UINT8 *)namcos23_charram);
1237   bgtilemap = tilemap_create(machine, TextTilemapGetInfo, tilemap_scan_rows, 16, 16, 64, 64);
1238   tilemap_set_transparent_pen(bgtilemap, 0xf);
1239}
1240
1241static VIDEO_UPDATE( ss23 )
1242{
1243   bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine));
1244   bitmap_fill(screen->machine->priority_bitmap, cliprect, 0);
1245
1246   gfx_element *gfx = screen->machine->gfx[0];
1247   memset(gfx->dirty, 1, gfx->total_elements);
1248
1249   tilemap_draw( bitmap, cliprect, bgtilemap, 0/*flags*/, 0/*priority*/ ); /* opaque */
1250   return 0;
1251}
1252
12531250static WRITE32_HANDLER( s23_txtchar_w )
12541251{
12551252   COMBINE_DATA(&namcos23_charram[offset]);
r7772r7773
13721369    switch(offset) {
13731370   case 8: c412_adr = (data & mem_mask) | (c412_adr & (0xffffffff ^ mem_mask)); break;
13741371   case 9: c412_adr = ((data & mem_mask) << 16) | (c412_adr & (0xffffffff ^ (mem_mask << 16))); break;
1375   case 10: s23_c412_ram_w(space, c412_adr, data, mem_mask); break;
1372   case 10: s23_c412_ram_w(space, c412_adr, data, mem_mask); c412_adr += 2; break;
13761373    default:
13771374        logerror("c412_w %x, %04x @ %04x (%08x, %08x)\n", offset, data, mem_mask, cpu_get_pc(space->cpu), (unsigned int)cpu_get_reg(space->cpu, MIPS3_R31));
13781375        break;
r7772r7773
14181415static WRITE16_HANDLER(s23_c421_w)
14191416{
14201417    switch(offset) {
1421   case 0: s23_c421_ram_w(space, c421_adr & 0xfffff, data, mem_mask); break;
1418   case 0: s23_c421_ram_w(space, c421_adr & 0xfffff, data, mem_mask); c421_adr += 2; break;
14221419   case 2: c421_adr = ((data & mem_mask) << 16) | (c421_adr & (0xffffffff ^ (mem_mask << 16))); break;
14231420   case 3: c421_adr = (data & mem_mask) | (c421_adr & (0xffffffff ^ mem_mask)); break;
14241421    default:
r7772r7773
14821479   return 0xffff;
14831480}
14841481
1482// raster timer.  TC2 indicates it's probably one-shot since it resets it each VBL...
1483static int c361_scanline;
1484static TIMER_CALLBACK( c361_timer_cb )
1485{
1486   if (c361_scanline != 511)
1487   {
1488      cputag_set_input_line(machine, "maincpu", MIPS3_IRQ1, ASSERT_LINE);
1489      timer_adjust_oneshot(c361_timer, attotime_never, 0);
1490   }
1491}
1492
14851493static WRITE16_HANDLER(s23_c361_w)
14861494{
14871495   switch(offset) {
1496   case 0:
1497      tilemap_set_scrollx(bgtilemap, 0, data&0xfff);
1498      break;
1499
1500   case 1:
1501      tilemap_set_scrolly(bgtilemap, 0, data&0xfff);
1502      break;
1503
14881504   case 4:   // interrupt control
1489      if (data == 0xc8)
1505      c361_scanline = data;
1506      if (data == 0x1ff)
14901507      {
1491         logerror("c361_w: raise IRQ 1\n");
1492         cputag_set_input_line(space->machine, "maincpu", MIPS3_IRQ1, ASSERT_LINE);
1493      }
1494      else if (data == 0x1ff)
1495      {
1496         logerror("c361_w: ack IRQ 1\n");
14971508         cputag_set_input_line(space->machine, "maincpu", MIPS3_IRQ1, CLEAR_LINE);
1509         timer_adjust_oneshot(c361_timer, attotime_never, 0);
14981510      }
14991511      else
15001512      {
1501         logerror("c361_w %x, %04x @ %04x (%08x, %08x)\n", offset, data, mem_mask, cpu_get_pc(space->cpu), (unsigned int)cpu_get_reg(space->cpu, MIPS3_R31));
1513         timer_adjust_oneshot(c361_timer, video_screen_get_time_until_pos(space->machine->primary_screen, c361_scanline, 0), 0);
15021514      }
15031515      break;
15041516
r7772r7773
15101522static READ16_HANDLER(s23_c361_r)
15111523{
15121524   switch(offset) {
1513   case 5: return video_screen_get_vpos(space->machine->primary_screen);
1525   case 5: return video_screen_get_vpos(space->machine->primary_screen)*2;
15141526   case 6: return video_screen_get_vblank(space->machine->primary_screen);
15151527   }
15161528   logerror("c361_r %x @ %04x (%08x, %08x)\n", offset, mem_mask, cpu_get_pc(space->cpu), (unsigned int)cpu_get_reg(space->cpu, MIPS3_R31));
r7772r7773
15481560   COMBINE_DATA(&s23_c422_regs[offset]);
15491561}
15501562
1551static INTERRUPT_GEN(s23_interrupt)
1552{
1553   if(!ctl_vbl_active) {
1554      ctl_vbl_active = true;
1555      cpu_set_input_line(device, MIPS3_IRQ0, ASSERT_LINE);
1556   }
1557}
1558
1559
15601563// as with System 22, we need to halt the MCU while checking shared RAM
15611564static WRITE32_HANDLER( s23_mcuen_w )
15621565{
r7772r7773
16141617   return 0x00020002;
16151618}
16161619
1617static void p3d_packet(const address_space *space, UINT32 adr, UINT32 size)
1620
1621// 3D hardware, to throw at least in part in video/namcos23.c
1622
1623enum { MODEL, FLUSH };
1624
1625struct namcos23_render_entry {
1626   int type;
1627
1628   union {
1629      struct {
1630         UINT16 model;
1631         INT16 m[9];
1632         INT32 v[3];
1633         float scaling;
1634      } model;
1635   };
1636};
1637
1638struct namcos23_render_data {
1639   const pen_t *pens;
1640   UINT32 (*texture_lookup)(const pen_t *pens, float x, float y);
1641};
1642
1643struct namcos23_poly_entry {
1644   namcos23_render_data rd;
1645   float zkey;
1646   int front;
1647   int vertex_count;
1648   poly_vertex pv[16];
1649};
1650
1651enum { RENDER_MAX_ENTRIES = 1000, POLY_MAX_ENTRIES = 10000 };
1652static namcos23_render_entry render_entries[2][RENDER_MAX_ENTRIES];
1653static namcos23_poly_entry render_polys[POLY_MAX_ENTRIES];
1654static int render_poly_order[POLY_MAX_ENTRIES];
1655static int render_count[2], render_cur, render_poly_count;
1656static poly_manager *polymgr;
1657
1658static inline INT32 u32_to_s24(UINT32 v)
16181659{
1619   logerror("p3d dma %08x %08x [%08x]\n", adr, size, (unsigned int)cpu_get_reg(space->cpu, MIPS3_R31));
1660  return v & 0x800000 ? v | 0xff000000 : v & 0xffffff;
16201661}
16211662
1663static inline INT32 u32_to_s10(UINT32 v)
1664{
1665   return v & 0x200 ? v | 0xfffffe00 : v & 0x1ff;
1666}
1667
1668
1669static inline UINT8 light(UINT8 c, float l)
1670{
1671  if(l < 1)
1672    l = l*c;
1673  else
1674    l = 255 - (255-c)/l;
1675  return UINT8(l);
1676}
1677
1678static UINT32 texture_lookup_nocache_point(const pen_t *pens, float x, float y)
1679{
1680   UINT32 xx = UINT32(x);
1681   UINT32 yy = UINT32(y);
1682   UINT32 tileid = ((xx >> 4) & 0xff) | ((yy << 4) & tileid_mask);
1683   UINT8 attr = tmhrom[tileid >> 1];
1684   if(tileid & 1)
1685      attr &= 15;
1686   else
1687      attr >>= 4;
1688   UINT32 tile = (tmlrom[tileid] | (attr << 16)) & tile_mask;
1689
1690   // Probably swapx/swapy to add on bits 2-3 of attr
1691   // Bits used by motoxgo at least
1692   UINT8 color = texrom[(tile << 8) | ((yy << 4) & 0xf0) | (xx & 0x0f)];
1693   return pens[color];
1694}
1695
1696static void render_scanline(void *dest, INT32 scanline, const poly_extent *extent, const void *extradata, int threadid)
1697{
1698   const namcos23_render_data *rd = (const namcos23_render_data *)extradata;
1699
1700   float w = extent->param[0].start;
1701   float u = extent->param[1].start;
1702   float v = extent->param[2].start;
1703   float l = extent->param[3].start;
1704   float dw = extent->param[0].dpdx;
1705   float du = extent->param[1].dpdx;
1706   float dv = extent->param[2].dpdx;
1707   float dl = extent->param[3].dpdx;
1708   bitmap_t *bitmap = (bitmap_t *)dest;
1709   UINT32 *img = BITMAP_ADDR32(bitmap, scanline, extent->startx);
1710
1711   for(int x = extent->startx; x < extent->stopx; x++) {
1712      float z = w ? 1/w : 0;
1713      UINT32 pcol = rd->texture_lookup(rd->pens, u*z, v*z);
1714      float ll = l*z;
1715      *img = (light(pcol >> 16, ll) << 16) | (light(pcol >> 8, ll) << 8) | light(pcol, ll);
1716
1717      w += dw;
1718      u += du;
1719      v += dv;
1720      l += dl;
1721      img++;
1722   }
1723}
1724
1725static INT32 *p3d_getv(UINT16 id)
1726{
1727   static INT32 sp[3];
1728   if(id == 0x8000)
1729      return light_vector;
1730   if(id >= 0x100) {
1731      memset(sp, 0, sizeof(sp));
1732      return sp;
1733   }
1734   return vectors[id];
1735}
1736
1737static INT16 *p3d_getm(UINT16 id)
1738{
1739   static INT16 sp[3];
1740   if(id >= 0x100) {
1741      memset(sp, 0, sizeof(sp));
1742      return sp;
1743   }
1744   return matrices[id];
1745}
1746
1747static void p3d_matrix_set(const UINT16 *p, int size)
1748{
1749   if(size != 10) {
1750      logerror("WARNING: p3d_matrix_set with size %d\n", size);
1751      return;
1752   }
1753   INT16 *t = p3d_getm(*p++);
1754   for(int i=0; i<9; i++)
1755      t[i] = *p++;
1756}
1757
1758static void p3d_vector_set(const UINT16 *p, int size)
1759{
1760   if(size != 7) {
1761      logerror("WARNING: p3d_vector_set with size %d\n", size);
1762      return;
1763   }
1764   INT32 *t = p3d_getv(*p++);
1765   for(int i=0; i<3; i++) {
1766      t[i] = u32_to_s24((p[0] << 16) | p[1]);
1767      p += 2;
1768   }
1769}
1770
1771static void p3d_scaling_set(const UINT16 *p, int size)
1772{
1773   if(size != 1) {
1774      logerror("WARNING: p3d_scaling_set with size %d\n", size);
1775      return;
1776   }
1777   scaling = *p;
1778}
1779
1780static void p3d_vector_matrix_mul(const UINT16 *p, int size)
1781{
1782   if(size != 4) {
1783      logerror("WARNING: p3d_vector_matrix_mul with size %d\n", size);
1784      return;
1785   }
1786   if(p[2] != 0xffff)
1787      logerror("WARNING: p3d_vector_matrix_mul with +2=%04x\n", p[2]);
1788
1789   INT32 *t       = p3d_getv(p[0]);
1790   const INT16 *m = p3d_getm(p[1]);
1791   const INT32 *v = p3d_getv(p[3]);
1792
1793   t[0] = INT32((m[0]*INT64(v[0]) + m[3]*INT64(v[1]) + m[6]*INT64(v[2])) >> 14);
1794   t[1] = INT32((m[1]*INT64(v[0]) + m[4]*INT64(v[1]) + m[7]*INT64(v[2])) >> 14);
1795   t[2] = INT32((m[2]*INT64(v[0]) + m[5]*INT64(v[1]) + m[8]*INT64(v[2])) >> 14);
1796}
1797
1798static void p3d_matrix_vector_mul(const UINT16 *p, int size)
1799{
1800   if(size != 4) {
1801      logerror("WARNING: p3d_matrix_vector_mul with size %d\n", size);
1802      return;
1803   }
1804   if(p[2] != 0xffff)
1805      logerror("WARNING: p3d_matrix_vector_mul with +2=%04x\n", p[2]);
1806
1807   INT32 *t       = p3d_getv(p[0]);
1808   const INT16 *m = p3d_getm(p[1]);
1809   const INT32 *v = p3d_getv(p[3]);
1810
1811   t[0] = INT32((m[0]*INT64(v[0]) + m[1]*INT64(v[1]) + m[2]*INT64(v[2])) >> 14);
1812   t[1] = INT32((m[3]*INT64(v[0]) + m[4]*INT64(v[1]) + m[7]*INT64(v[2])) >> 14);
1813   t[2] = INT32((m[6]*INT64(v[0]) + m[7]*INT64(v[1]) + m[8]*INT64(v[2])) >> 14);
1814}
1815
1816
1817static void p3d_matrix_matrix_mul(const UINT16 *p, int size)
1818{
1819   if(size != 4) {
1820      logerror("WARNING: p3d_matrix_matrix_mul with size %d\n", size);
1821      return;
1822   }
1823   if(p[2] != 0xffff)
1824      logerror("WARNING: p3d_matrix_matrix_mul with +2=%04x\n", p[2]);
1825
1826   INT16 *t        = p3d_getm(p[0]);
1827   const INT16 *m1 = p3d_getm(p[1]);
1828   const INT16 *m2 = p3d_getm(p[3]);
1829
1830   t[0] = INT16((m1[0]*m2[0] + m1[1]*m2[3] + m1[2]*m2[6]) >> 14);
1831   t[1] = INT16((m1[0]*m2[1] + m1[1]*m2[4] + m1[2]*m2[7]) >> 14);
1832   t[2] = INT16((m1[0]*m2[2] + m1[1]*m2[5] + m1[2]*m2[8]) >> 14);
1833   t[3] = INT16((m1[3]*m2[0] + m1[4]*m2[3] + m1[5]*m2[6]) >> 14);
1834   t[4] = INT16((m1[3]*m2[1] + m1[4]*m2[4] + m1[5]*m2[7]) >> 14);
1835   t[5] = INT16((m1[3]*m2[2] + m1[4]*m2[5] + m1[5]*m2[8]) >> 14);
1836   t[6] = INT16((m1[6]*m2[0] + m1[7]*m2[3] + m1[8]*m2[6]) >> 14);
1837   t[7] = INT16((m1[6]*m2[1] + m1[7]*m2[4] + m1[8]*m2[7]) >> 14);
1838   t[8] = INT16((m1[6]*m2[2] + m1[7]*m2[5] + m1[8]*m2[8]) >> 14);
1839}
1840
1841static void p3d_render(const UINT16 *p, int size, bool use_scaling)
1842{
1843   if(size != 3) {
1844      logerror("WARNING: p3d_render with size %d\n", size);
1845      return;
1846   }
1847
1848   logerror("render model %x %swith matrix %x and vector %x\n", p[0], use_scaling ? "scaled " : "", p[1], p[2]);
1849
1850   // Temporary gross hack for timecrs2
1851   if(p[0] == 0xd96)
1852      return;
1853
1854   if(render_count[render_cur] >= RENDER_MAX_ENTRIES) {
1855      logerror("WARNING: render buffer full\n");
1856      return;
1857   }
1858
1859   // Vector and matrix may be inverted
1860   const INT16 *m = p3d_getm(p[1]);
1861   const INT32 *v = p3d_getv(p[2]);
1862
1863   namcos23_render_entry *re = render_entries[render_cur] + render_count[render_cur];
1864   re->type = MODEL;
1865   re->model.model = p[0];
1866   re->model.scaling = use_scaling ? scaling / 16384.0 : 1.0;
1867   memcpy(re->model.m, m, sizeof(re->model.m));
1868   memcpy(re->model.v, v, sizeof(re->model.v));
1869   if(0)
1870      fprintf(stderr, "Render %04x (%f %f %f %f %f %f %f %f %f) (%f %f %f)\n",
1871            re->model.model,
1872            re->model.m[0]/16384.0, re->model.m[1]/16384.0, re->model.m[2]/16384.0,
1873            re->model.m[3]/16384.0, re->model.m[4]/16384.0, re->model.m[5]/16384.0,
1874            re->model.m[6]/16384.0, re->model.m[7]/16384.0, re->model.m[8]/16384.0,
1875            re->model.v[0]/16384.0, re->model.v[1]/16384.0, re->model.v[2]/16384.0);
1876
1877   render_count[render_cur]++;
1878}
1879
1880
1881static void p3d_flush(const UINT16 *p, int size)
1882{
1883   if(size != 0) {
1884      logerror("WARNING: p3d_flush with size %d\n", size);
1885      return;
1886   }
1887
1888   namcos23_render_entry *re = render_entries[render_cur] + render_count[render_cur];
1889   re->type = FLUSH;
1890   render_count[render_cur]++;
1891}
1892
1893static void p3d_dma(const address_space *space, UINT32 adr, UINT32 size)
1894{
1895   adr &= 0x1fffffff;
1896   UINT16 buffer[256];
1897   int pos = 0;
1898   while(pos < size) {
1899      UINT16 h = memory_read_word(space, adr+pos);
1900
1901      pos += 2;
1902
1903      UINT16 h1;
1904      int psize;
1905      if(h & 0x4000) {
1906         h1 = h & 0xff00;
1907         psize = h & 0xff;
1908      } else {
1909         h1 = h & 0xfff0;
1910         psize = h & 0xf;
1911      }
1912
1913      if(size-pos < psize*2) {
1914         logerror("WARNING: short packet (header %04x, remaining %x)\n", h, (size-pos)/2);
1915         return;
1916      }
1917
1918      for(int i=0; i < psize; i++) {
1919         buffer[i] = memory_read_word(space, adr+pos);
1920         pos += 2;
1921      }
1922
1923      switch(h1) {
1924      case 0x0040: p3d_matrix_set(buffer, psize); break;
1925      case 0x0050: p3d_vector_set(buffer, psize); break;
1926      case 0x0000: p3d_matrix_matrix_mul(buffer, psize); break;
1927      case 0x0810: p3d_matrix_vector_mul(buffer, psize); break;
1928      case 0x1010: p3d_vector_matrix_mul(buffer, psize); break;
1929      case 0x4400: p3d_scaling_set(buffer, psize); break;
1930      case 0x8000: p3d_render(buffer, psize, false); break;
1931      case 0x8080: p3d_render(buffer, psize, true); break;
1932      case 0xc000: p3d_flush(buffer, psize); break;
1933      default: {
1934         if(0) {
1935            logerror("p3d - [%04x] %04x", h1, h);
1936            for(int i=0; i<psize; i++)
1937               logerror(" %04x", buffer[i]);
1938            logerror("\n");
1939         }
1940         break;
1941      }
1942      }
1943   }
1944}
1945
16221946static READ32_HANDLER( p3d_r )
16231947{
16241948   switch(offset) {
r7772r7773
16361960   case 0x8: COMBINE_DATA(&p3d_size); return;
16371961   case 0x9:
16381962      if(data & 1)
1639         p3d_packet(space, p3d_address, p3d_size);
1963         p3d_dma(space, p3d_address, p3d_size);
16401964      return;
1641   case 0x17: return;
1965   case 0x17:
1966      cputag_set_input_line(space->machine, "maincpu", MIPS3_IRQ1, CLEAR_LINE);
1967      timer_adjust_oneshot(c361_timer, attotime_never, 0);
1968      return;
16421969   }
16431970   logerror("p3d_w %02x, %08x @ %08x (%08x, %08x)\n", offset, data, mem_mask, cpu_get_pc(space->cpu), (unsigned int)cpu_get_reg(space->cpu, MIPS3_R31));
16441971}
16451972
1973static void render_apply_transform(INT32 xi, INT32 yi, INT32 zi, const namcos23_render_entry *re, poly_vertex &pv)
1974{
1975   pv.x =    (INT32((re->model.m[0]*INT64(xi) + re->model.m[3]*INT64(yi) + re->model.m[6]*INT64(zi)) >> 14)*re->model.scaling + re->model.v[0])/16384.0;
1976   pv.y =    (INT32((re->model.m[1]*INT64(xi) + re->model.m[4]*INT64(yi) + re->model.m[7]*INT64(zi)) >> 14)*re->model.scaling + re->model.v[1])/16384.0;
1977   pv.p[0] = (INT32((re->model.m[2]*INT64(xi) + re->model.m[5]*INT64(yi) + re->model.m[8]*INT64(zi)) >> 14)*re->model.scaling + re->model.v[2])/16384.0;
1978}
1979
1980static void render_apply_matrot(INT32 xi, INT32 yi, INT32 zi, const namcos23_render_entry *re, INT32 &x, INT32 &y, INT32 &z)
1981{
1982   x = (re->model.m[0]*xi + re->model.m[3]*yi + re->model.m[6]*zi) >> 14;
1983   y = (re->model.m[1]*xi + re->model.m[4]*yi + re->model.m[7]*zi) >> 14;
1984   z = (re->model.m[2]*xi + re->model.m[5]*yi + re->model.m[8]*zi) >> 14;
1985}
1986
1987static void render_project(poly_vertex &pv)
1988{
1989   // 768 validated by the title screen size on tc2:
1990   // texture is 640x480, x range is 3.125, y range is 2.34375, z is 3.75
1991   // 640/(3.125/3.75) = 768
1992   // 480/(2.34375/3.75) = 768
1993
1994   float w = pv.p[0] ? 1/pv.p[0] : 0;
1995   pv.x = 320 + 768*w*pv.x;
1996   pv.y = 240 - 768*w*pv.y;
1997   pv.p[0] = w;
1998}
1999
2000static void render_one_model(running_machine *machine, const namcos23_render_entry *re)
2001{
2002   UINT32 adr = ptrom[re->model.model];
2003   if(adr >= ptrom_limit) {
2004      logerror("WARNING: model %04x base address %08x out-of-bounds - pointram?\n", re->model.model, adr);
2005      return;
2006   }
2007
2008   while(adr < ptrom_limit) {
2009      poly_vertex pv[15];
2010
2011      UINT32 type = ptrom[adr++];
2012      UINT32 h    = ptrom[adr++];
2013
2014
2015      float tbase = (type >> 24) << 12;
2016      UINT8 color = (h >> 24) & 0x7f;
2017      int lmode = (type >> 19) & 3;
2018      int ne = (type >> 8) & 15;
2019
2020      // Something to do with Z-sorting at least?
2021      if(type & 0x00001000)
2022         adr++;
2023
2024      UINT32 light = 0;
2025      UINT32 extptr = 0;
2026
2027      if(lmode == 3) {
2028         extptr = adr;
2029         adr += ne;
2030      } else
2031         light = ptrom[adr++];
2032
2033      float minz = FLT_MAX;
2034      float maxz = FLT_MIN;
2035
2036      for(int i=0; i<ne; i++) {
2037         UINT32 v1 = ptrom[adr++];
2038         UINT32 v2 = ptrom[adr++];
2039         UINT32 v3 = ptrom[adr++];
2040
2041         render_apply_transform(u32_to_s24(v1), u32_to_s24(v2), u32_to_s24(v3), re, pv[i]);
2042         pv[i].p[1] = (((v1 >> 20) & 0xf00) | ((v2 >> 24 & 0xff))) + 0.5;
2043         pv[i].p[2] = (((v1 >> 16) & 0xf00) | ((v3 >> 24 & 0xff))) + 0.5 + tbase;
2044
2045         if(pv[i].p[0] > maxz)
2046            maxz = pv[i].p[0];
2047         if(pv[i].p[0] < minz)
2048            minz = pv[i].p[0];
2049
2050         switch(lmode) {
2051         case 0: case 1:
2052            pv[i].p[3] = ((light >> (8*(3-i))) & 0xff) / 64.0;
2053            break;
2054         case 2:
2055            pv[i].p[3] = 1.0;
2056            break;
2057         case 3: {
2058            UINT32 norm = ptrom[extptr++];
2059            INT32 nx = u32_to_s10(norm >> 20);
2060            INT32 ny = u32_to_s10(norm >> 10);
2061            INT32 nz = u32_to_s10(norm);
2062            INT32 nrx, nry, nrz;
2063            render_apply_matrot(nx, ny, nz, re, nrx, nry, nrz);
2064
2065            float lsi = float(nrx*light_vector[0] + nry*light_vector[1] + nrz*light_vector[2])/4194304.0;
2066            if(lsi < 0)
2067               lsi = 0;
2068
2069            // Mapping taken out of a hat
2070            pv[i].p[3] = 0.5+lsi;
2071            break;
2072         }
2073         }
2074      }
2075
2076      namcos23_poly_entry *p = render_polys + render_poly_count;
2077
2078      p->vertex_count = poly_zclip_if_less(ne, pv, p->pv, 4, 0.001);
2079
2080      if(p->vertex_count >= 3) {
2081         for(int i=0; i<p->vertex_count; i++) {
2082            render_project(p->pv[i]);
2083            float w = p->pv[i].p[0];
2084            p->pv[i].p[1] *= w;
2085            p->pv[i].p[2] *= w;
2086            p->pv[i].p[3] *= w;
2087         }
2088         p->zkey = 0.5*(minz+maxz);
2089         p->front = !(h & 0x00000001);
2090         p->rd.texture_lookup = texture_lookup_nocache_point;
2091         p->rd.pens = machine->pens + (color << 8);
2092         render_poly_count++;
2093      }
2094
2095      if(type & 0x000010000)
2096         break;
2097   }
2098}
2099
2100static int render_poly_compare(const void *i1, const void *i2)
2101{
2102   const namcos23_poly_entry *p1 = render_polys + *(const int *)i1;
2103   const namcos23_poly_entry *p2 = render_polys + *(const int *)i2;
2104
2105   if(p1->front != p2->front)
2106      return p1->front ? 1 : -1;
2107
2108   return p1->zkey < p2->zkey ? 1 : p1->zkey > p2->zkey ? -1 : 0;
2109}
2110
2111static void render_flush(running_machine *machine, bitmap_t *bitmap)
2112{
2113   if(!render_poly_count)
2114      return;
2115
2116   for(int i=0; i<render_poly_count; i++)
2117      render_poly_order[i] = i;
2118
2119   qsort(render_poly_order, render_poly_count, sizeof(int), render_poly_compare);
2120
2121   const static rectangle scissor = { 0, 639, 0, 479 };
2122
2123   for(int i=0; i<render_poly_count; i++) {
2124      const namcos23_poly_entry *p = render_polys + render_poly_order[i];
2125      namcos23_render_data *rd = (namcos23_render_data *)poly_get_extra_data(polymgr);
2126      *rd = p->rd;
2127      poly_render_triangle_fan(polymgr, bitmap, &scissor, render_scanline, 4, p->vertex_count, p->pv);
2128   }
2129   render_poly_count = 0;
2130}
2131
2132static void render_run(running_machine *machine, bitmap_t *bitmap)
2133{
2134   render_poly_count = 0;
2135   const namcos23_render_entry *re = render_entries[!render_cur];
2136   for(int i=0; i<render_count[!render_cur]; i++) {
2137      switch(re->type) {
2138      case MODEL:
2139         render_one_model(machine, re);
2140         break;
2141      case FLUSH:
2142         render_flush(machine, bitmap);
2143         break;
2144      }
2145      re++;
2146   }
2147   render_flush(machine, bitmap);
2148
2149   poly_wait(polymgr, "render_run");
2150}
2151
2152
2153static VIDEO_START( ss23 )
2154{
2155   gfx_element_set_source(machine->gfx[0], (UINT8 *)namcos23_charram);
2156   bgtilemap = tilemap_create(machine, TextTilemapGetInfo, tilemap_scan_rows, 16, 16, 64, 64);
2157   tilemap_set_transparent_pen(bgtilemap, 0xf);
2158
2159   // Gorgon's tilemap offset is 0, S23/SS23's is 860
2160   if ((!strcmp(machine->gamedrv->name, "rapidrvr")) ||
2161       (!strcmp(machine->gamedrv->name, "rapidrvr2")) ||
2162       (!strcmp(machine->gamedrv->name, "finlflng")))
2163   {
2164      tilemap_set_scrolldx(bgtilemap, 0, 0);
2165   }
2166   else
2167   {
2168      tilemap_set_scrolldx(bgtilemap, 860, 860);
2169   }
2170   polymgr = poly_alloc(machine, 10000, sizeof(namcos23_render_data), POLYFLAG_NO_WORK_QUEUE);
2171}
2172
2173static VIDEO_UPDATE( ss23 )
2174{
2175   bitmap_fill(bitmap, cliprect, get_black_pen(screen->machine));
2176
2177   render_run( screen->machine, bitmap );
2178
2179   gfx_element *gfx = screen->machine->gfx[0];
2180   memset(gfx->dirty, 1, gfx->total_elements);
2181
2182   tilemap_draw( bitmap, cliprect, bgtilemap, 0/*flags*/, 0/*priority*/ ); /* opaque */
2183   return 0;
2184}
2185
2186static INTERRUPT_GEN(s23_interrupt)
2187{
2188   if(!ctl_vbl_active) {
2189      ctl_vbl_active = true;
2190      cpu_set_input_line(device, MIPS3_IRQ0, ASSERT_LINE);
2191   }
2192
2193   render_cur = !render_cur;
2194   render_count[render_cur] = 0;
2195}
2196
2197static MACHINE_START( s23 )
2198{
2199   c361_timer = timer_alloc(machine, c361_timer_cb, 0);
2200   timer_adjust_oneshot(c361_timer, attotime_never, 0);
2201}
16462202static ADDRESS_MAP_START( gorgon_map, ADDRESS_SPACE_PROGRAM, 32 )
16472203   AM_RANGE(0x00000000, 0x003fffff) AM_RAM
16482204   AM_RANGE(0x01000000, 0x010000ff) AM_READWRITE( p3d_r, p3d_w )
r7772r7773
22232779
22242780static DRIVER_INIT(ss23)
22252781{
2782   ptrom  = (const UINT32 *)memory_region(machine, "pointrom");
2783   tmlrom = (const UINT16 *)memory_region(machine, "textilemapl");
2784   tmhrom = memory_region(machine, "textilemaph");
2785   texrom = memory_region(machine, "textile");
2786
2787   tileid_mask = (memory_region_length(machine, "textilemapl")/2 - 1) & ~0xff; // Used for y masking
2788   tile_mask = memory_region_length(machine, "textile")/256 - 1;
2789   ptrom_limit = memory_region_length(machine, "pointrom")/4;
2790
22262791   mi_rd = mi_wr = im_rd = im_wr = 0;
22272792   namcos23_jvssense = 1;
22282793   ctl_vbl_active = false;
r7772r7773
22332798   s23_tssio_port_4 = 0;
22342799   s23_porta = 0, s23_rtcstate = 0;
22352800   s23_subcpu_running = 1;
2801   render_count[0] = render_count[1] = 0;
2802   render_cur = 0;
22362803
22372804   if ((!strcmp(machine->gamedrv->name, "motoxgo")) ||
22382805       (!strcmp(machine->gamedrv->name, "panicprk")) ||
r7772r7773
23012868   MDRV_SCREEN_ADD("screen", RASTER)
23022869   MDRV_SCREEN_REFRESH_RATE(S23_VSYNC1)
23032870   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // Not in any way accurate
2304   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
2871   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
23052872   MDRV_SCREEN_SIZE(640, 480)
23062873   MDRV_SCREEN_VISIBLE_AREA(0, 639, 0, 479)
23072874
r7772r7773
23142881   MDRV_VIDEO_START(ss23)
23152882   MDRV_VIDEO_UPDATE(ss23)
23162883
2884   MDRV_MACHINE_START(s23)
2885
23172886   /* sound hardware */
23182887   MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
23192888
r7772r7773
23452914   MDRV_SCREEN_ADD("screen", RASTER)
23462915   MDRV_SCREEN_REFRESH_RATE(S23_VSYNC1)
23472916   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // Not in any way accurate
2348   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
2917   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
23492918   MDRV_SCREEN_SIZE(640, 480)
23502919   MDRV_SCREEN_VISIBLE_AREA(0, 639, 0, 479)
23512920
r7772r7773
23582927   MDRV_VIDEO_START(ss23)
23592928   MDRV_VIDEO_UPDATE(ss23)
23602929
2930   MDRV_MACHINE_START(s23)
2931
23612932   /* sound hardware */
23622933   MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
23632934
r7772r7773
23852956   MDRV_SCREEN_ADD("screen", RASTER)
23862957   MDRV_SCREEN_REFRESH_RATE(S23_VSYNC1)
23872958   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) // Not in any way accurate
2388   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
2959   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_RGB32)
23892960   MDRV_SCREEN_SIZE(640, 480)
23902961   MDRV_SCREEN_VISIBLE_AREA(0, 639, 0, 479)
23912962
r7772r7773
23982969   MDRV_VIDEO_START(ss23)
23992970   MDRV_VIDEO_UPDATE(ss23)
24002971
2972   MDRV_MACHINE_START(s23)
2973
24012974   /* sound hardware */
24022975   MDRV_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
24032976
src/mame/drivers/chihiro.c
r7772r7773
3838#include "cpu/i386/i386.h"
3939#include "includes/naomibd.h"
4040
41/*
42St.     Instr.       Comment
430x02    PEEK         ACC := MEM[OP1]
440x03    POKE         MEM[OP1] := OP2
450x04    POKEPCI      PCICONF[OP1] := OP2
460x05    PEEKPCI      ACC := PCICONF[OP1]
470x06    AND/OR       ACC := (ACC & OP1) | OP2
480x07    (prefix)     execute the instruction code in OP1 with OP1 := OP2, OP2 := ACC
490x08    BNE          IF ACC = OP1 THEN PC := PC + OP2
500x09    BRA          PC := PC + OP2
510x10    AND/OR ACC2  (unused/defunct) ACC2 := (ACC2 & OP1) | OP2
520x11    OUTB         PORT[OP1] := OP2
530x12    INB          ACC := PORT(OP1)
540xEE    END
55*/
56static READ32_HANDLER( chihiro_jamtable )
57{
58   return 0xEEEEEEEE;
59}
60
61
4162static ADDRESS_MAP_START( xbox_map, ADDRESS_SPACE_PROGRAM, 32 )
42   AM_RANGE(0x00000000, 0x0007ffff) AM_RAM
43   AM_RANGE(0xfff80000, 0xffffffff) AM_ROM AM_REGION("bios", 0)
63   AM_RANGE(0x00000000, 0x004fffff) AM_RAM
64   AM_RANGE(0xff000080, 0xff000083) AM_READ( chihiro_jamtable )
65   AM_RANGE(0xfff00000, 0xfff7ffff) AM_ROM AM_SHARE("biosflash")
66   AM_RANGE(0xfff80000, 0xffffffff) AM_ROM AM_REGION("bios", 0) AM_SHARE("biosflash")
4467ADDRESS_MAP_END
4568
4669
src/mame/drivers/seta.c
r7772r7773
18871887            gun_input_src = (gun_input_src&1) | (data&2);
18881888            break;
18891889         default:
1890            /* Gun Recoils */
1891            /* Note:  In debug menu recoil solenoids strobe when held down.  Is this correct?? */
1892            output_set_value("Player1_Gun_Recoil", (data & 0x10)>>4 );
1893            output_set_value("Player2_Gun_Recoil", (data & 0x8)>>3 );
1894
18901895            gun_input_bit = bit_count - 4;
18911896            gun_input_bit = 8 - gun_input_bit; // Reverse order
18921897            break;
src/mame/drivers/stv.c
r7772r7773
38923892   ROM_LOAD( "pclub2v3.nv", 0x0000, 0x0080, CRC(a8a2d30c) SHA1(bdde3d62ff21190a23698058ff66e476a75a09aa) )
38933893ROM_END
38943894
3895ROM_START( pclubpok ) // set to 1p / runs with the USA bios
3896   STV_BIOS
3897   ROM_DEFAULT_BIOS( "us" )
3898
3899   ROM_REGION32_BE( 0x3000000, "user1", ROMREGION_ERASE00 ) /* SH2 code */
3900
3901   ROM_LOAD16_WORD_SWAP( "ic22",    0x0200000, 0x0200000, CRC(48ab8371) SHA1(1c2124afad6bc1f4de2619e6b915f78e91addf05) ) // OK
3902   ROM_LOAD16_WORD_SWAP( "ic24",    0x0400000, 0x0200000, CRC(9915faea) SHA1(b96f64a8cbb1b9496bb566d0469975fddb4fbe98) ) // OK
3903   ROM_LOAD16_WORD_SWAP( "ic26",    0x0600000, 0x0200000, CRC(054ad120) SHA1(987e812af099bb0aa5d43a4c10ae8345370a2606) ) // OK
3904   ROM_LOAD16_WORD_SWAP( "ic28",    0x0800000, 0x0200000, CRC(3a654b2a) SHA1(7398e25836bfbdeab6350759f25c420c3b496172) ) // OK
3905   ROM_LOAD16_WORD_SWAP( "ic30",    0x0a00000, 0x0200000, CRC(98747bef) SHA1(8d452507a9842a48cd1a7db8fde11a070a6f068b) ) // OK
3906
3907   ROM_REGION16_BE( 0x80, "eeprom", 0 ) // preconfigured to 1 player
3908   ROM_LOAD( "pclubpok.nv", 0x0000, 0x0080, CRC(4ba3f21a) SHA1(898a393fb2fc1961b68b7d4f383d5447e6c010e8) )
3909ROM_END
3910
38953911/*
38963912country codes:
38973913J = Japan
r7772r7773
39924008GAME( 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 )
39934009GAME( 1997, pclub2,    stvbios, stv, stv,      stv,       ROT0,   "Atlus",                   "Print Club 2 (U 970921 V1.000)", GAME_NOT_WORKING )
39944010GAME( 1999, pclub2v3,  pclub2,  stv, stv,      stv,       ROT0,   "Atlus",                   "Print Club 2 Vol. 3 (U 990310 V1.000)", GAME_NOT_WORKING )
4011GAME( 1999, pclubpok,  stvbios, stv, stv,       stv,        ROT0,   "Atlus",                        "Print Club Pokemon B (U 991126 V1.000)", GAME_NOT_WORKING )
39954012
39964013/* Doing something.. but not enough yet */
39974014GAME( 1995, vfremix,   stvbios, stv, stv,      vfremix,   ROT0,   "Sega",                    "Virtua Fighter Remix (JUETBKAL 950428 V1.000)", GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
src/mame/drivers/champbwl.c
r7772r7773
408408   ROM_LOAD( "ab001009.u27", 0x0200, 0x0200, CRC(3bbd4bcd) SHA1(8c87ccc42ece2432b8ad25f8679cdf886e12a43c) )
409409
410410   ROM_REGION( 0x100000, "x1snd", 0 )   /* Samples */
411   ROM_LOAD( "ab003003.3-3", 0x00000, 0x40000, CRC(ad40ad10) SHA1(db0e5744ea3fcda87345b545031f82fcb3fec175) )
412   ROM_LOAD( "ab003002.3-2", 0x40000, 0x40000, CRC(7ede8f28) SHA1(b5519c09b4f0019dc76cadca725da1d581912540) )
413   ROM_LOAD( "ab002003.2-3", 0x80000, 0x40000, CRC(3051b8c3) SHA1(5f53596d7af1c79db1dde4bdca3878e07c67b5d1) )
414   ROM_LOAD( "ab002002.2-2", 0xc0000, 0x40000, CRC(42ebe997) SHA1(1808b9e5e996a395c1d48ac001067f736f96feec) )
411   ROM_LOAD( "ab002002.2-2", 0x00000, 0x40000, CRC(42ebe997) SHA1(1808b9e5e996a395c1d48ac001067f736f96feec) ) // jingles (for strike, spare etc.)
412   ROM_LOAD( "ab003002.3-2", 0x40000, 0x40000, CRC(7ede8f28) SHA1(b5519c09b4f0019dc76cadca725da1d581912540) ) // basic coin + ball sounds
413   ROM_LOAD( "ab002003.2-3", 0x80000, 0x40000, CRC(3051b8c3) SHA1(5f53596d7af1c79db1dde4bdca3878e07c67b5d1) ) // 'welcome to.. , strike' speech etc.
414   ROM_LOAD( "ab003003.3-3", 0xc0000, 0x40000, CRC(ad40ad10) SHA1(db0e5744ea3fcda87345b545031f82fcb3fec175) ) // 'spare' speech etc.
415
416   ROM_REGION( 0x800, "nvram", 0 ) /* default settings, allows game to boot first time without having to reset it */
417   ROM_LOAD( "champbwl.nv",  0x000, 0x800, CRC(1d46aa8e) SHA1(a733cf86cfb26d98fb4c491d7f779a7a1c8ff228) )
415418ROM_END
416419
417420GAME( 1989, champbwl, 0, champbwl, champbwl, 0, ROT270, "Seta / Romstar Inc.", "Championship Bowling", GAME_SUPPORTS_SAVE )
src/mame/drivers/galdrvr.c
r7772r7773
11591159INPUT_PORTS_END
11601160
11611161
1162static INPUT_PORTS_START( tdpgal )
1163   PORT_START("IN0")
1164   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
1165   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
1166   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
1167   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
1168   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
1169   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
1170   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
1171   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
1172   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1173   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
1174
1175   PORT_START("IN1")
1176   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
1177   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
1178   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
1179   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
1180   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1181   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
1182   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
1183   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1184   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
1185   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
1186   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1187   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
1188   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
1189   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1190   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
1191   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
1192   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1193   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
1194   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
1195   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1196
1197   PORT_START("IN2")
1198   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
1199   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
1200   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1201   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
1202   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
1203   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1204   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
1205   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
1206   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1207   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
1208   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
1209   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1210   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
1211   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
1212   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1213   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
1214   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
1215   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1216   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
1217   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
1218   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1219   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
1220   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
1221   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
1222INPUT_PORTS_END
1223
1224
11621225static INPUT_PORTS_START( skybase )
11631226   PORT_INCLUDE(mooncrst)
11641227
r7772r7773
22302293INPUT_PORTS_END
22312294
22322295
2296/* verified from Z80 code */
22332297static INPUT_PORTS_START( scobra )
22342298   PORT_START("IN0")
2235   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
2299   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_COCKTAIL
22362300   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 )
2237   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
2301   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )                     /* see notes */
22382302   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 )
22392303   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
2240   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
2304   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
22412305   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
22422306   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
22432307
22442308   PORT_START("IN1")
2245   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Allow_Continue ) )
2309   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Allow_Continue ) )
22462310   PORT_DIPSETTING(    0x00, DEF_STR( No ) )
2247   PORT_DIPSETTING(    0x01, DEF_STR( Yes ) )
2311   PORT_DIPSETTING(    0x01, "4 Times" )
22482312   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) )
22492313   PORT_DIPSETTING(    0x00, "3" )
22502314   PORT_DIPSETTING(    0x02, "4" )
22512315   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
22522316   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
22532317   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
2254   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
2318   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
22552319   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
22562320   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
22572321
22582322   PORT_START("IN2")
2259   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
2260   PORT_DIPNAME( 0x06, 0x02, DEF_STR( Coinage ) )
2323   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_COCKTAIL
2324   PORT_DIPNAME( 0x06, 0x02, DEF_STR( Coinage ) )                    /* see notes */
22612325   PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
22622326   PORT_DIPSETTING(    0x06, DEF_STR( 4C_3C ) )
22632327   PORT_DIPSETTING(    0x02, DEF_STR( 1C_1C ) )
2264   PORT_DIPSETTING(    0x00, "1 Coin/99 Credits" )
2328   PORT_DIPSETTING(    0x00, "99 Credits" )
22652329   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) )
22662330   PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
22672331   PORT_DIPSETTING(    0x08, DEF_STR( Cocktail ) )
2268   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
2269   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
2270   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
2271   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
2332   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY
2333   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
2334   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY
2335   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
22722336
22732337   PORT_START("IN3")   /* need for some PPI accesses */
22742338   PORT_BIT( 0xff, 0x00, IPT_UNUSED )
22752339INPUT_PORTS_END
22762340
2277
2341/* verified from Z80 code */
22782342static INPUT_PORTS_START( scobras )
22792343   PORT_INCLUDE(scobra)
22802344
22812345   PORT_MODIFY("IN1")
2346   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Allow_Continue ) )
2347   PORT_DIPSETTING(    0x00, DEF_STR( No ) )
2348   PORT_DIPSETTING(    0x01, "255 Times" )
22822349   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) )
22832350   PORT_DIPSETTING(    0x00, "3" )
22842351   PORT_DIPSETTING(    0x02, "5" )
22852352INPUT_PORTS_END
22862353
22872354
2288static INPUT_PORTS_START( spdcoin )
2289   PORT_START("IN0")
2290   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
2291   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 )
2292   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
2293   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
2294   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
2295   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
2296   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
2297   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
2355static CUSTOM_INPUT( moonwar_dial_r )
2356{
2357   static const char *const dialname[2] = { "P1_DIAL", "P2_DIAL" };
2358   int p = (~moonwar_port_select >> 4) & 1;
22982359
2299   PORT_START("IN1")
2300   PORT_DIPNAME( 0x01, 0x00, "Freeze" )         /* Dip Sw #2 */
2301   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
2302   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
2303   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Free_Play ) )   /* Dip Sw #1 */
2304   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
2305   PORT_DIPSETTING(    0x02, DEF_STR( On ) )
2306   PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED )
2360   // see http://www.cityofberwyn.com/schematics/stern/MoonWar_opto.tiff for schematic
2361   // I.e. a 74ls161 counts from 0 to 15 which is the absolute number of bars passed on the quadrature
23072362
2308   PORT_START("IN2")
2309   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
2310   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )      /* Dip Sw #5 - Check code at 0x0569 */
2311   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
2312   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2313   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Difficulty ) )   /* Dip Sw #4 */
2314   PORT_DIPSETTING(    0x00, DEF_STR( Easy ) )
2315   PORT_DIPSETTING(    0x04, DEF_STR( Hard ) )
2316   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) )      /* Dip Sw #3 */
2317   PORT_DIPSETTING(    0x08, "3" )
2318   PORT_DIPSETTING(    0x00, "5" )
2319   PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
2363   static int counter_74ls161[2] = {0, 0};
2364   static int direction[2] = {0, 0};
2365   signed char dialread = input_port_read(field->port->machine, dialname[p]);
23202366
2321   PORT_START("IN3")   /* need for some PPI accesses */
2322   PORT_BIT( 0xff, 0x00, IPT_UNUSED )
2323INPUT_PORTS_END
2367   UINT8 ret;
23242368
2325/* cocktail mode is N/A */
2326static INPUT_PORTS_START( superbon )
2369   if (dialread < 0) direction[p] = 0x00;
2370   else if (dialread > 0) direction[p] = 0x10;
2371
2372   counter_74ls161[p] += abs(dialread);
2373   counter_74ls161[p] &= 0xf;
2374
2375   ret = counter_74ls161[p] | direction[p];
2376   //fprintf(stderr, "dialread1: %02x, counter_74ls161: %02x, spinner ret is %02x\n", dialread, counter_74ls161[p], ret);
2377
2378   return ret;
2379}
2380
2381/* verified from Z80 code */
2382static INPUT_PORTS_START( moonwar )
23272383   PORT_START("IN0")
2328   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 )
2329   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 )
2330   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
2331   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
2332   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_8WAY
2333   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
2384   PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(moonwar_dial_r, (void *)0)
2385   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL // cocktail: p2 shield
23342386   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
23352387   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
23362388
23372389   PORT_START("IN1")
2338   PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) )
2339   PORT_DIPSETTING(    0x01, "3" )
2390   PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
2391   PORT_DIPSETTING(    0x00, "3" )
2392   PORT_DIPSETTING(    0x01, "4" )
23402393   PORT_DIPSETTING(    0x02, "5" )
2341   PORT_DIPSETTING(    0x03, DEF_STR( Free_Play ) )
2342   PORT_DIPSETTING(    0x00, "Invulnerability (Cheat)")
2343   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
2344   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
2345   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2346   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 )
2347   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
2348   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
2349   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2350   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
2351   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
2352   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2353   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
2354   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
2355   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
2356   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2394   PORT_DIPSETTING(    0x03, DEF_STR( Free_Play ) )                  /* see notes */
2395   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
2396   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
2397   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL PORT_CONDITION("IN2", 0x08, PORTCOND_EQUALS, 0x08) // cocktail: p2 thrust
2398   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CONDITION("IN2", 0x08, PORTCOND_EQUALS, 0x00) // upright: p1&p2 hyperflip
2399   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) // both: p1(upright: &p2) shield
2400   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) // both: p1(upright: &p2) thrust
2401   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) // both: p1(upright: &p2) fire
23572402
23582403   PORT_START("IN2")
2359   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
2360   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
2361   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2404   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL // cocktail: p2 fire
23622405   PORT_DIPNAME( 0x06, 0x02, DEF_STR( Coinage ) )
2363   PORT_DIPSETTING(    0x02, DEF_STR( 1C_1C ) )
2364   PORT_DIPSETTING(    0x00, "A 1/2 B 2/1" )
2365   PORT_DIPSETTING(    0x04, "A 1/3 B 3/1" )
2366   PORT_DIPSETTING(    0x06, "A 1/4 B 4/1" )
2367   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
2368   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
2369   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2370   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
2371   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
2372   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2373   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
2374   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
2375   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2376   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
2377   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
2378   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2379   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
2380   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
2381   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2406   PORT_DIPSETTING(    0x02, "A 1/1  B 1/1" )
2407   PORT_DIPSETTING(    0x00, "A 1/2  B 2/1" )
2408   PORT_DIPSETTING(    0x04, "A 1/3  B 3/1" )
2409   PORT_DIPSETTING(    0x06, "A 1/4  B 4/1" )
2410   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) )
2411   PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
2412   PORT_DIPSETTING(    0x08, DEF_STR( Cocktail ) )
2413   PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )                       /* output bits */
23822414
23832415   PORT_START("IN3")   /* need for some PPI accesses */
2384   PORT_BIT( 0xff, 0x00, IPT_UNUSED )
2416   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
2417
2418   PORT_START("P1_DIAL")
2419   PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(4) PORT_REVERSE PORT_RESET PORT_CONDITION("IN2", 0x08, PORTCOND_EQUALS, 0x08) // cocktail: dial is reversed
2420   PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(4) PORT_RESET PORT_CONDITION("IN2", 0x08, PORTCOND_EQUALS, 0x00) // upright: dial works normally
2421
2422   PORT_START("P2_DIAL")
2423   PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(4) PORT_RESET PORT_COCKTAIL PORT_REVERSE // cocktail: dial is reversed
23852424INPUT_PORTS_END
23862425
2426/* verified from Z80 code */
2427static INPUT_PORTS_START( moonwara )
2428   PORT_INCLUDE(moonwar)
23872429
2388/* cocktail mode is N/A */
2389static INPUT_PORTS_START( losttomb )
2390   PORT_START("IN0")
2391   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 )
2392   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 )
2393   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_8WAY
2394   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_8WAY
2395   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT) PORT_8WAY
2396   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT ) PORT_8WAY
2397   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
2398   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
2430   PORT_MODIFY("IN2")
2431   PORT_DIPNAME( 0x06, 0x00, DEF_STR( Coinage ) )
2432   PORT_DIPSETTING(    0x00, "A 1/1  B 4/1" )
2433   PORT_DIPSETTING(    0x02, "A 1/2  B 3/1" )
2434   PORT_DIPSETTING(    0x04, "A 1/3  B 1/1" )
2435   PORT_DIPSETTING(    0x06, "A 1/4  B 2/1" )
23992436
2400   PORT_START("IN1")
2401   PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) )
2402   PORT_DIPSETTING(    0x01, "3" )
2403   PORT_DIPSETTING(    0x02, "5" )
2404   PORT_DIPSETTING(    0x03, DEF_STR( Free_Play ) )
2405   PORT_DIPSETTING(    0x00, "Invulnerability (Cheat)")
2406   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP ) PORT_8WAY
2407   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN ) PORT_8WAY
2408   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT) PORT_8WAY
2409   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT ) PORT_8WAY
2410   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 )
2411   PORT_DIPUNKNOWN( 0x80, 0x00 )
2437   PORT_MODIFY("P1_DIAL")
2438   PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(4) PORT_RESET // both: p1 dial works normally, p2 dial is reversed, both share same port
24122439
2413   PORT_START("IN2")
2414   PORT_DIPUNKNOWN( 0x01, 0x00 )
2415   PORT_DIPNAME( 0x06, 0x02, DEF_STR( Coinage ) )
2416   PORT_DIPSETTING(    0x02, DEF_STR( 1C_1C ) )
2417   PORT_DIPSETTING(    0x00, "A 1/2 B 2/1" )
2418   PORT_DIPSETTING(    0x04, "A 1/3 B 3/1" )
2419   PORT_DIPSETTING(    0x06, "A 1/4 B 4/1" )
2420   PORT_DIPUNKNOWN( 0x08, 0x00 )
2421   PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN )
2422
2423   PORT_START("IN3")   /* need for some PPI accesses */
2424   PORT_BIT( 0xff, 0x00, IPT_UNUSED )
2440   PORT_MODIFY("P2_DIAL")       /* doesn't actually work due to bug in game code */
2441   PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(4) PORT_RESET PORT_COCKTAIL
24252442INPUT_PORTS_END
24262443
24272444
2445/* verified from Z80 code */
24282446static INPUT_PORTS_START( armorcar )
24292447   PORT_START("IN0")
2430   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
2448   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_4WAY PORT_COCKTAIL
24312449   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 )
2432   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
2450   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
24332451   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 )
24342452   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
2435   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
2453   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
24362454   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
24372455   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
24382456
r7772r7773
24462464   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
24472465   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
24482466   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
2449   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
2467   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
24502468   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
24512469   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
24522470
24532471   PORT_START("IN2")
2454   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
2472   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
24552473   PORT_DIPNAME( 0x06, 0x02, DEF_STR( Coinage ) )
2456   PORT_DIPSETTING(    0x02, DEF_STR( 1C_1C ) )
2457   PORT_DIPSETTING(    0x00, "Coin A 1/2 Coin B 2/1" )
2458   PORT_DIPSETTING(    0x04, "Coin A 1/3 Coin B 3/1" )
2459   PORT_DIPSETTING(    0x06, "Coin A 1/4 Coin B 4/1" )
2474   PORT_DIPSETTING(    0x02, "A 1/1  B 1/1" )
2475   PORT_DIPSETTING(    0x00, "A 1/2  B 2/1" )
2476   PORT_DIPSETTING(    0x04, "A 1/3  B 3/1" )
2477   PORT_DIPSETTING(    0x06, "A 1/4  B 4/1" )
24602478   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
24612479   PORT_DIPSETTING(    0x08, DEF_STR( Upright ) )
24622480   PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
2463   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY
2464   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
2465   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY
2466   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
2481   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_4WAY
2482   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
2483   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_4WAY
2484   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
24672485
24682486   PORT_START("IN3")   /* need for some PPI accesses */
2469   PORT_BIT( 0xff, 0x00, IPT_UNUSED )
2487   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
24702488INPUT_PORTS_END
24712489
2490/* verified from Z80 code */
2491static INPUT_PORTS_START( armorcar2 )
2492   PORT_INCLUDE(armorcar)
24722493
2494   PORT_MODIFY("IN0")
2495   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )                       /* see notes */
2496
2497   PORT_MODIFY("IN1")
2498   PORT_BIT( 0x3c, IP_ACTIVE_LOW, IPT_UNUSED )                       /* see notes */
2499
2500   PORT_MODIFY("IN2")
2501   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )                       /* see notes */
2502   PORT_DIPUNUSED( 0x08, IP_ACTIVE_LOW )                             /* see notes */
2503INPUT_PORTS_END
2504
2505
2506/* verified from Z80 code */
24732507static INPUT_PORTS_START( tazmania )
24742508   PORT_START("IN0")
24752509   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 )
24762510   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 )
2477   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
2478   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
2511   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY
2512   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY
24792513   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
2480   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
2514   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
24812515   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
24822516   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
24832517
r7772r7773
24882522   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
24892523   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
24902524   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2491   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
2492   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
2525   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_COCKTAIL
2526   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_COCKTAIL
24932527   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
2494   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
2528   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
24952529   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
24962530   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
24972531
24982532   PORT_START("IN2")
24992533   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
25002534   PORT_DIPNAME( 0x06, 0x02, DEF_STR( Coinage ) )
2501   PORT_DIPSETTING(    0x02, DEF_STR( 1C_1C ) )
2502   PORT_DIPSETTING(    0x00, "Coin A 1/2 Coin B 2/1" )
2503   PORT_DIPSETTING(    0x04, "Coin A 1/3 Coin B 3/1" )
2504   PORT_DIPSETTING(    0x06, "Coin A 1/4 Coin B 4/1" )
2535   PORT_DIPSETTING(    0x02, "A 1/1  B 1/1" )
2536   PORT_DIPSETTING(    0x00, "A 1/2  B 2/1" )
2537   PORT_DIPSETTING(    0x04, "A 1/3  B 3/1" )
2538   PORT_DIPSETTING(    0x06, "A 1/4  B 4/1" )
25052539   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
25062540   PORT_DIPSETTING(    0x08, DEF_STR( Upright ) )
25072541   PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
r7772r7773
25112545   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
25122546
25132547   PORT_START("IN3")   /* need for some PPI accesses */
2514   PORT_BIT( 0xff, 0x00, IPT_UNUSED )
2548   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
25152549INPUT_PORTS_END
25162550
25172551
2518/* cocktail mode not working due to bug in game code */
2552/* verified from Z80 code */
25192553static INPUT_PORTS_START( anteater )
25202554   PORT_START("IN0")
25212555   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )
2522   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
2523   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY
2524   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY
2556   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
2557   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_4WAY
2558   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_4WAY
25252559   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
2526   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
2560   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
25272561   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
25282562   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
25292563
r7772r7773
25342568   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
25352569   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
25362570   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2537   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
2538   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
2539   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
2540   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
2541   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
2542   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
2571//  PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_4WAY PORT_COCKTAIL
2572//  PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_4WAY PORT_COCKTAIL
2573//  PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
2574//  PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_4WAY PORT_COCKTAIL
2575//  PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
2576   PORT_BIT( 0x7c, IP_ACTIVE_LOW, IPT_UNUSED )                       /* see notes */
2577   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
25432578
25442579   PORT_START("IN2")
25452580   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
25462581   PORT_DIPNAME( 0x06, 0x02, DEF_STR( Coinage ) )
2547   PORT_DIPSETTING(    0x02, DEF_STR( 1C_1C ) )
2548   PORT_DIPSETTING(    0x00, "Coin A 1/2 Coin B 2/1" )
2549   PORT_DIPSETTING(    0x04, "Coin A 1/3 Coin B 3/1" )
2550   PORT_DIPSETTING(    0x06, "Coin A 1/4 Coin B 4/1" )
2551   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
2552   PORT_DIPSETTING(    0x08, DEF_STR( Upright ) )
2553   PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
2554   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
2555   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
2582   PORT_DIPSETTING(    0x02, "A 1/1  B 1/1" )
2583   PORT_DIPSETTING(    0x00, "A 1/2  B 2/1" )
2584   PORT_DIPSETTING(    0x04, "A 1/3  B 3/1" )
2585   PORT_DIPSETTING(    0x06, "A 1/4  B 4/1" )
2586//  PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
2587//  PORT_DIPSETTING(    0x08, DEF_STR( Upright ) )
2588//  PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
2589   PORT_DIPUNUSED( 0x08, IP_ACTIVE_LOW )                             /* see notes */
25562590   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
2557   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
2591   PORT_BIT( 0xb0, IP_ACTIVE_LOW, IPT_UNUSED )
25582592
25592593   PORT_START("IN3")   /* need for some PPI accesses */
2560   PORT_BIT( 0xff, 0x00, IPT_UNUSED )
2594   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
25612595INPUT_PORTS_END
25622596
25632597
2564/* cocktail mode is N/A */
2598/* verified from Z80 code */
25652599static INPUT_PORTS_START( calipso )
25662600   PORT_START("IN0")
2567   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
2568   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
2569   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
2570   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
2571   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
2572   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
2601   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)      /* also START2 - see notes */
2602   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
2603   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(1)
2604   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(1)
2605   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
2606   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(1)
25732607   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
25742608   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
25752609
r7772r7773
25802614   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) )
25812615   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
25822616   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2583   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
2584   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
2617   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(2)
2618   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(2)
25852619   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
2586   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
2587   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
2588   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
2620   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(2)
2621   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
2622   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
25892623
25902624   PORT_START("IN2")
2591   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )
2625   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )  PORT_PLAYER(1)      /* also START1 - see notes */
25922626   PORT_DIPNAME( 0x06, 0x02, DEF_STR( Coinage ) )
2593   PORT_DIPSETTING(    0x02, DEF_STR( 1C_1C ) )
2594   PORT_DIPSETTING(    0x00, DEF_STR( 1C_2C ) )
2595   PORT_DIPSETTING(    0x04, DEF_STR( 1C_3C ) )
2596   PORT_DIPSETTING(    0x06, DEF_STR( 1C_4C ) )
2597   PORT_DIPNAME( 0x08, 0x08, "Cabinet (Not Supported)" )
2598   PORT_DIPSETTING(    0x08, DEF_STR( Upright ) )
2599   PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
2600   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
2601   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
2602   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
2603   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
2627   PORT_DIPSETTING(    0x02, "A 1/1  B 1/1" )
2628   PORT_DIPSETTING(    0x00, "A 1/2  B 2/1" )
2629   PORT_DIPSETTING(    0x04, "A 1/3  B 3/1" )
2630   PORT_DIPSETTING(    0x06, "A 1/4  B 4/1" )
2631//  PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
2632//  PORT_DIPSETTING(    0x08, DEF_STR( Upright ) )
2633//  PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
2634   PORT_DIPUNUSED( 0x08, IP_ACTIVE_LOW )                             /* see notes */
2635   PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
26042636
26052637   PORT_START("IN3")   /* need for some PPI accesses */
2606   PORT_BIT( 0xff, 0x00, IPT_UNUSED )
2638   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
26072639INPUT_PORTS_END
26082640
2609// Note that in moon war, when in cocktail mode, NEITHER player seems to have a hyperflip button? Can someone check the code to see if this is true?
2610static INPUT_PORTS_START( moonwar_common )
2641
2642/* verified from Z80 code */
2643static INPUT_PORTS_START( losttomb )
26112644   PORT_START("IN0")
2612   PORT_BIT( 0x1f, IP_ACTIVE_LOW, IPT_SPECIAL ) /* the spinner */
2613   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL // cocktail: p2 shield
2645   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 )
2646   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 )
2647   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP )     PORT_8WAY
2648   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN )   PORT_8WAY
2649   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT )  PORT_8WAY
2650   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_LEFT )   PORT_8WAY
26142651   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
26152652   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
26162653
26172654   PORT_START("IN1")
2618   PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
2619   PORT_DIPSETTING(    0x00, "3" )
2620   PORT_DIPSETTING(    0x01, "4" )
2655   PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) )
2656   PORT_DIPSETTING(    0x01, "3" )
26212657   PORT_DIPSETTING(    0x02, "5" )
2622   PORT_DIPSETTING(    0x03, DEF_STR( Free_Play ) )
2623   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
2624   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
2625   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL PORT_CONDITION("IN2", 0x08, PORTCOND_EQUALS, 0x08) // cocktail: p2 thrust
2626   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CONDITION("IN2", 0x08, PORTCOND_EQUALS, 0x00) // upright: p1&p2 hyperflip
2627   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) // both: p1(upright: &p2) shield
2628   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) // both: p1(upright: &p2) thrust
2629   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) // both: p1(upright: &p2) fire
2630INPUT_PORTS_END
2658   PORT_DIPSETTING(    0x03, DEF_STR( Free_Play ) )                  /* see notes */
2659   PORT_DIPSETTING(    0x00, "Invulnerability (Cheat)")
2660   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP )    PORT_8WAY
2661   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_DOWN )  PORT_8WAY
2662   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_RIGHT ) PORT_8WAY
2663   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_LEFT )  PORT_8WAY
2664   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 )                      /* "WHIP" */
2665   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
26312666
2632
2633static INPUT_PORTS_START( moonwar )
2634   PORT_INCLUDE( moonwar_common )
2635
26362667   PORT_START("IN2")
2637   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL // cocktail: p2 fire
2668   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
26382669   PORT_DIPNAME( 0x06, 0x02, DEF_STR( Coinage ) )
2639   PORT_DIPSETTING(    0x02, DEF_STR( 1C_1C ) )
2640   PORT_DIPSETTING(    0x00, DEF_STR( 1C_2C ) )
2641   PORT_DIPSETTING(    0x04, DEF_STR( 1C_3C ) )
2642   PORT_DIPSETTING(    0x06, DEF_STR( 1C_4C ) )
2643   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) )
2644   PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
2645   PORT_DIPSETTING(    0x08, DEF_STR( Cocktail ) )
2646   PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )   /* output bits */
2670   PORT_DIPSETTING(    0x02, "A 1/1  B 1/1" )
2671   PORT_DIPSETTING(    0x00, "A 1/2  B 2/1" )
2672   PORT_DIPSETTING(    0x04, "A 1/3  B 3/1" )
2673   PORT_DIPSETTING(    0x06, "A 1/4  B 4/1" )
2674   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )                /* see notes */
2675   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
2676   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2677   PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
26472678
2648   PORT_START("IN3")      /* IN3/4 - dummy ports for the dial */
2649
2650   PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(4) PORT_REVERSE PORT_RESET PORT_CONDITION("IN2", 0x08, PORTCOND_EQUALS, 0x08) // cocktail: dial is reversed
2651   PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(4) PORT_RESET PORT_CONDITION("IN2", 0x08, PORTCOND_EQUALS, 0x00) // upright: dial works normally
2652
2653   PORT_START("IN4")
2654   PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(4) PORT_RESET PORT_COCKTAIL PORT_REVERSE // cocktail: dial is reversed
2679   PORT_START("IN3")   /* need for some PPI accesses */
2680   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
26552681INPUT_PORTS_END
26562682
2657/* same as above, but coinage is different */
2658static INPUT_PORTS_START( moonwara )
2659   PORT_INCLUDE( moonwar_common )
26602683
2661   PORT_START("IN2")
2662   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL // cocktail: p2 fire
2663   PORT_DIPNAME( 0x06, 0x00, DEF_STR( Coinage ) )
2664   PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
2665   PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
2666   PORT_DIPSETTING(    0x04, DEF_STR( 1C_3C ) )
2667   PORT_DIPSETTING(    0x06, DEF_STR( 1C_4C ) )
2668   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) )
2669   PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
2670   PORT_DIPSETTING(    0x08, DEF_STR( Cocktail ) )
2671   PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )   /* output bits */
2672
2673   PORT_START("IN3")      /* IN3/4 - dummy ports for the dial */
2674   PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(4) PORT_RESET // both: p1 dial works normally, p2 dial is reversed, both share same port
2675
2676   PORT_START("IN4")      /* doesn't actually work due to bug in game code */
2677   PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(4) PORT_RESET PORT_COCKTAIL
2678INPUT_PORTS_END
2679
2680static INPUT_PORTS_START( tdpgal )
2684/* verified from Z80 code - IN2 bit 1 still needs to be understood */
2685static INPUT_PORTS_START( spdcoin )
26812686   PORT_START("IN0")
2682   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
2683   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
2684   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
2685   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
2686   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
2687   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
2688   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
2689   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
2690   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2691   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
2687   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
2688   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 )
2689   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
2690   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
2691   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
2692   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
2693   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
2694   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
26922695
26932696   PORT_START("IN1")
2694   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
2695   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
2696   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
2697   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
2698   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2699   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
2700   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
2701   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2702   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
2703   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
2704   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2705   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
2706   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
2707   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2708   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
2709   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
2710   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2711   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
2712   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
2713   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2697   PORT_DIPNAME( 0x01, 0x00, "Freeze" )                              /* Dip Sw #2 */
2698   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
2699   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
2700   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Free_Play ) )                  /* Dip Sw #1 */
2701   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
2702   PORT_DIPSETTING(    0x02, DEF_STR( On ) )
2703   PORT_BIT( 0xfc, IP_ACTIVE_LOW, IPT_UNUSED )
27142704
27152705   PORT_START("IN2")
2716   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
2717   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
2718   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2719   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
2706   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
2707   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )                    /* Dip Sw #5 - Check code at 0x0569 */
27202708   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
27212709   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2722   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
2723   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
2724   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2725   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
2726   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
2727   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2728   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
2729   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
2730   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2731   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
2732   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
2733   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2734   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
2735   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
2736   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2737   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
2738   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
2739   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
2710   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Difficulty ) )                 /* Dip Sw #4 */
2711   PORT_DIPSETTING(    0x00, DEF_STR( Easy ) )
2712   PORT_DIPSETTING(    0x04, DEF_STR( Hard ) )
2713   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) )                      /* Dip Sw #3 */
2714   PORT_DIPSETTING(    0x08, "3" )
2715   PORT_DIPSETTING(    0x00, "5" )
2716   PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
2717
2718   PORT_START("IN3")   /* need for some PPI accesses */
2719   PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
27402720INPUT_PORTS_END
27412721
2722/* verified from Z80 code */
2723static INPUT_PORTS_START( superbon )
2724   PORT_INCLUDE(losttomb)
2725
2726   PORT_MODIFY("IN0")
2727   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY
2728   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY
2729   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
2730   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY
2731
2732   PORT_MODIFY("IN1")
2733   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 )                      /* "HOLD" */
2734   PORT_BIT( 0x34, IP_ACTIVE_LOW, IPT_UNUSED )
2735INPUT_PORTS_END
2736
2737
27422738/*************************************
27432739 *
27442740 *  ROM definitions
r7772r7773
32053201   ROM_LOAD( "l06_prom.bin", 0x0000, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) )
32063202ROM_END
32073203
3204ROM_START( tdpgal )
3205   ROM_REGION( 0x10000, "maincpu", 0 )
3206   ROM_LOAD( "1.bin",  0x0000, 0x0800, CRC(7be819fe) SHA1(ab5a332914546692f9976e243daf3040f0d9952e) )
3207   ROM_LOAD( "2.bin",  0x0800, 0x0800, CRC(70c83a5e) SHA1(7b781b027c73d6c3901c6d27901f97fae61a352d) )
3208   ROM_LOAD( "3.bin",  0x1000, 0x0800, CRC(475eb5a0) SHA1(b7436873fd74aff3577540474420a1abaa2babcb) )
3209   ROM_LOAD( "4.bin",  0x1800, 0x0800, CRC(20a71943) SHA1(e196eea20bd0518545dcde61f2697a1d6f61568b) )
3210   ROM_LOAD( "5.bin",  0x2000, 0x0800, CRC(72c4f2dc) SHA1(30a9c69afd2c4da4a14363fc0b17b1e0da188927) )
3211   ROM_LOAD( "6.bin",  0x2800, 0x0800, CRC(fa4e2be4) SHA1(a30d43189660f8a1437faf87064fce28c9c760ad) )
32083212
3213   ROM_REGION( 0x1000, "gfx1", 0 )
3214   ROM_LOAD( "8.bin",         0x0000, 0x0800, CRC(d701b1d4) SHA1(8f23ba3c9f42fedd8b8f38d321118a86889f00dc) )
3215   ROM_LOAD( "7.bin",         0x0800, 0x0800, CRC(3113bcfd) SHA1(e2792e5fe7d7f27bb329e3104dee3ca29d72ef48) )
3216
3217   ROM_REGION( 0x0020, "proms", 0 )
3218   ROM_LOAD( "bprom.bin",       0x0000, 0x0020, CRC(2b4cf53f) SHA1(8d7eb0453173b9821eea32419b67559bfb4578d0) )
3219ROM_END
3220
3221
32093222ROM_START( azurian )
32103223   ROM_REGION( 0x10000, "maincpu", 0 )
32113224   ROM_LOAD( "pgm.1",        0x0000, 0x1000, CRC(17a0fca7) SHA1(0ffb80d433fbaa0631d0d982a453f9e6cccab297) )
r7772r7773
43554368ROM_END
43564369
43574370
4371/*
4372
4373The Pit (on Moon Quasar hardware)
4374^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4375
4376Dumped by Andrew Welburn
4377on the sunny morning of 2/03/10
4378
4379http://www.andys-arcade.com
4380
4381*************************************************
4382**Do not seperate this text file from the roms.**
4383*************************************************
4384
4385Nichibutsu Moon Quasar pcb largely unhacked, but
4386with an odd looking set of roms. One gfx rom
4387identifies itself as 'The Pit' so that is my only
4388guess at what the game actually is.
4389
4390Roms 1 through 8 read well in-circuit in the right
4391places in the memory map for moon cresta,
4392(through the fluke 9100) but the game does not
4393currently run. Roms dumped adn verified with no
4394anomolies.
4395
4396Rom 9 was placed on the through-socket and has
4397pins 20 and 18 (/E and A11 respectively) tied to
4398pin 5 of 8E (A14/A15/MREQ demux). This demux has
4399some patches, the trace to pin 13 is cut, and is
4400instead wired to pin 3.
4401
4402*/
4403
4404ROM_START( thepitm )
4405   ROM_REGION( 0x10000, "maincpu", 0 )
4406   ROM_LOAD( "1.bin",          0x0000, 0x0800, CRC(0f78d6ea) SHA1(e224b2fb9b4a26295b03af720fa647d4488a1287) )
4407   ROM_LOAD( "2.bin",          0x0800, 0x0800, CRC(ebacc6eb) SHA1(8b73d96ebe8070fbbb16434aa6a30ec8985ddec6) )
4408   ROM_LOAD( "3.bin",          0x1000, 0x0800, CRC(14fd0706) SHA1(5d905d8272731c307dc9f96caf4973b28413198e) )
4409   ROM_LOAD( "4.bin",          0x1800, 0x0800, CRC(613e920f) SHA1(078c7f36ba0145fbbd24bdae4cb6b03c5c27c1cc) )
4410   ROM_LOAD( "5.bin",          0x2000, 0x0800, CRC(5a791f3f) SHA1(166f07f7fe260e53e611784976792638a25485c1) )
4411   ROM_LOAD( "6.bin",          0x2800, 0x0800, CRC(0bb37f51) SHA1(32e31678388bad048c829bd43a18dc4e24869840) )
4412   ROM_LOAD( "7.bin",          0x3000, 0x0800, CRC(4dfdec6f) SHA1(eb88a278860998c343f94e27c8c6c723cffb2dd9) )
4413   ROM_LOAD( "8.bin",          0x3800, 0x0800, CRC(a39a9189) SHA1(aacd54edca6bc7f7feacd651a0de57b3d9592aad) )
4414   ROM_LOAD( "9.bin",          0x4000, 0x0800, CRC(2eb90e07) SHA1(92678fc5cfeb7119ce27f042571daa831fa1dad5) )
4415
4416   ROM_REGION( 0x2000, "gfx1", 0 )
4417   ROM_LOAD( "1h.bin",      0x0000, 0x0800, CRC(00dce65f) SHA1(ba0cce484d1f8693a85b85e0689d107588df9043) )
4418   ROM_LOAD( "1k.bin",      0x1000, 0x0800, CRC(3ec0056e) SHA1(1dd19e7535ab9abd62b4b32663437f8e8acb91b5) )
4419
4420   ROM_REGION( 0x0020, "proms", 0 )
4421   ROM_LOAD( "6l.bin",   0x0000, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) )
4422ROM_END
4423
4424
43584425ROM_START( skybase )
43594426   ROM_REGION( 0x10000, "maincpu", 0 )
43604427   ROM_LOAD( "skybase.9a",   0x0000, 0x1000, CRC(845b87a5) SHA1(8a249c1ec921532cb1bb85ed7fec11396634ca38) )
r7772r7773
54125479   ROM_LOAD( "82s123.6e",    0x0000, 0x0020, CRC(9b87f90d) SHA1(d11ac5e4a6057301ea2a9cbb404c2b978eb4c1dc) )
54135480ROM_END
54145481
5415ROM_START( scobras )
5482ROM_START( scobrase )
54165483   ROM_REGION( 0x10000, "maincpu", 0 )
5417   ROM_LOAD( "scobra2c.bin", 0x0000, 0x1000, CRC(e15ade38) SHA1(21cf26d1781d133fa336d275d8a61d3f95d10b77) )
5418   ROM_LOAD( "scobra2e.bin", 0x1000, 0x1000, CRC(a270e44d) SHA1(8b7307af458b9cd3c45bb72b35e682d6d109ed01) )
5419   ROM_LOAD( "scobra2f.bin", 0x2000, 0x1000, CRC(bdd70346) SHA1(bda0dc5777233a86a3a0aceb6eded45145057ba8) )
5420   ROM_LOAD( "scobra2h.bin", 0x3000, 0x1000, CRC(dca5ec31) SHA1(50073d44ccef76a3c36c73a6ed4479127f2c98ee) )
5421   ROM_LOAD( "scobra2j.bin", 0x4000, 0x1000, CRC(0d8f6b6e) SHA1(0ca0096cd55cdb87d14cb7f4c7c7b853ec1661c7) )
5422   ROM_LOAD( "scobra2l.bin", 0x5000, 0x1000, CRC(6f80f3a9) SHA1(817d212454c5eb16c5d7471d2ccefc4f8708d57f) )
5484   ROM_LOAD( "epr1265.2c",   0x0000, 0x1000, CRC(a0744b3f) SHA1(8949298a04f8ba8a82d5d84a7b012a0e7cff11df) )
5485   ROM_LOAD( "epr1266.2e",   0x1000, 0x1000, CRC(65306279) SHA1(f6e10d57c9b88e3fcd7333f76708e190a97b4faa) )
5486   ROM_LOAD( "epr1267.2f",   0x2000, 0x1000, CRC(47a4e6fb) SHA1(01775ad11dc23469649539ee8fb8a5800df031c6) )
5487   ROM_LOAD( "epr1268.2h",   0x3000, 0x1000, CRC(53eecaf2) SHA1(08ca34097f63af8ab69b1d836a12a8bd4d42e4a2) )
5488   ROM_LOAD( "epr1269.2j",   0x4000, 0x1000, CRC(e1f8a801) SHA1(2add8270352d6596052d3ff22c891ceccaa92071) )
5489   ROM_LOAD( "epr1270.2l",   0x5000, 0x1000, CRC(f7709710) SHA1(dff9ae72ba00a98d4f5acdd6d506e3d7add6b2c6) )
54235490
54245491   ROM_REGION( 0x10000, "audiocpu", 0 )
54255492   ROM_LOAD( "epr1275.5c",   0x0000, 0x0800, CRC(deeb0dd3) SHA1(b815a586f05361b75078d58f1fddfdb36f9d8fae) )
r7772r7773
54315498   ROM_LOAD( "epr1273.5f",   0x0800, 0x0800, CRC(a96316d3) SHA1(9de0e94932e91dc34aea7c81880bde6a486d103b) )
54325499
54335500   ROM_REGION( 0x0020, "proms", 0 )
5434   ROM_LOAD( "82s123.6e",    0x0000, 0x0020, CRC(9b87f90d) SHA1(d11ac5e4a6057301ea2a9cbb404c2b978eb4c1dc) )
5501   ROM_LOAD( "pr1278.6e",    0x0000, 0x0020, CRC(fd35c561) SHA1(590f60beb443dd689c890c37cc100e0b936bf8c9) )
54355502ROM_END
54365503
5437ROM_START( scobrase )
5504ROM_START( scobras )
54385505   ROM_REGION( 0x10000, "maincpu", 0 )
5439   ROM_LOAD( "epr1265.2c",   0x0000, 0x1000, CRC(a0744b3f) SHA1(8949298a04f8ba8a82d5d84a7b012a0e7cff11df) )
5440   ROM_LOAD( "epr1266.2e",   0x1000, 0x1000, CRC(65306279) SHA1(f6e10d57c9b88e3fcd7333f76708e190a97b4faa) )
5441   ROM_LOAD( "epr1267.2f",   0x2000, 0x1000, CRC(47a4e6fb) SHA1(01775ad11dc23469649539ee8fb8a5800df031c6) )
5442   ROM_LOAD( "epr1268.2h",   0x3000, 0x1000, CRC(53eecaf2) SHA1(08ca34097f63af8ab69b1d836a12a8bd4d42e4a2) )
5443   ROM_LOAD( "epr1269.2j",   0x4000, 0x1000, CRC(e1f8a801) SHA1(2add8270352d6596052d3ff22c891ceccaa92071) )
5444   ROM_LOAD( "epr1270.2l",   0x5000, 0x1000, CRC(f7709710) SHA1(dff9ae72ba00a98d4f5acdd6d506e3d7add6b2c6) )
5506   ROM_LOAD( "scobra2c.bin", 0x0000, 0x1000, CRC(e15ade38) SHA1(21cf26d1781d133fa336d275d8a61d3f95d10b77) )
5507   ROM_LOAD( "scobra2e.bin", 0x1000, 0x1000, CRC(a270e44d) SHA1(8b7307af458b9cd3c45bb72b35e682d6d109ed01) )
5508   ROM_LOAD( "scobra2f.bin", 0x2000, 0x1000, CRC(bdd70346) SHA1(bda0dc5777233a86a3a0aceb6eded45145057ba8) )
5509   ROM_LOAD( "scobra2h.bin", 0x3000, 0x1000, CRC(dca5ec31) SHA1(50073d44ccef76a3c36c73a6ed4479127f2c98ee) )
5510   ROM_LOAD( "scobra2j.bin", 0x4000, 0x1000, CRC(0d8f6b6e) SHA1(0ca0096cd55cdb87d14cb7f4c7c7b853ec1661c7) )
5511   ROM_LOAD( "scobra2l.bin", 0x5000, 0x1000, CRC(6f80f3a9) SHA1(817d212454c5eb16c5d7471d2ccefc4f8708d57f) )
54455512
54465513   ROM_REGION( 0x10000, "audiocpu", 0 )
54475514   ROM_LOAD( "epr1275.5c",   0x0000, 0x0800, CRC(deeb0dd3) SHA1(b815a586f05361b75078d58f1fddfdb36f9d8fae) )
r7772r7773
54535520   ROM_LOAD( "epr1273.5f",   0x0800, 0x0800, CRC(a96316d3) SHA1(9de0e94932e91dc34aea7c81880bde6a486d103b) )
54545521
54555522   ROM_REGION( 0x0020, "proms", 0 )
5456   ROM_LOAD( "pr1278.6e",    0x0000, 0x0020, CRC(fd35c561) SHA1(590f60beb443dd689c890c37cc100e0b936bf8c9) )
5523   ROM_LOAD( "82s123.6e",    0x0000, 0x0020, CRC(9b87f90d) SHA1(d11ac5e4a6057301ea2a9cbb404c2b978eb4c1dc) )
54575524ROM_END
54585525
54595526ROM_START( scobrab )
r7772r7773
54675534   ROM_LOAD( "scobra2l.bin", 0x5000, 0x1000, CRC(6f80f3a9) SHA1(817d212454c5eb16c5d7471d2ccefc4f8708d57f) )
54685535
54695536   ROM_REGION( 0x10000, "audiocpu", 0 )
5470   ROM_LOAD( "snd_5c.bin",   0x0000, 0x0800, CRC(deeb0dd3) SHA1(b815a586f05361b75078d58f1fddfdb36f9d8fae) )
5471   ROM_LOAD( "snd_5d.bin",   0x0800, 0x0800, CRC(872c1a74) SHA1(20f05bf398ad2690f5ba4e4158ad62aeec226413) )
5472   ROM_LOAD( "snd_5e.bin",   0x1000, 0x0800, CRC(ccd7a110) SHA1(5a247e360530be0f94c90fcc7d0ce628d460449f) )
5537   ROM_LOAD( "epr1275.5c",   0x0000, 0x0800, CRC(deeb0dd3) SHA1(b815a586f05361b75078d58f1fddfdb36f9d8fae) ) /* snd_5c.bin */
5538   ROM_LOAD( "epr1276.5d",   0x0800, 0x0800, CRC(872c1a74) SHA1(20f05bf398ad2690f5ba4e4158ad62aeec226413) ) /* snd_5d.bin */
5539   ROM_LOAD( "epr1277.5e",   0x1000, 0x0800, CRC(ccd7a110) SHA1(5a247e360530be0f94c90fcc7d0ce628d460449f) ) /* snd_5e.bin */
54735540
54745541   ROM_REGION( 0x1000, "gfx1", 0 )
54755542   ROM_LOAD( "epr1274.5h",   0x0000, 0x0800, CRC(64d113b4) SHA1(7b439bb74d5ecc792e0ca8964bcca8c6b7a51262) )
r7772r7773
55025569   ROM_LOAD( "k.6e",         0x0000, 0x0020, CRC(fd35c561) SHA1(590f60beb443dd689c890c37cc100e0b936bf8c9) ) /* this dump matches the prom from scobrase, it was labeled "K" with a marker here at 6E */
55035570ROM_END
55045571
5505/*
5506    Lost Tomb
55075572
5508    CPU/Sound Board: A969
5509    Video Board:     A2048
5510*/
5511
5512ROM_START( losttomb )
5573ROM_START( moonwar )
55135574   ROM_REGION( 0x10000, "maincpu", 0 )
5514   ROM_LOAD( "2c",           0x0000, 0x1000, CRC(d6176d2c) SHA1(bc2bf63ee8d3e376f155d218704ceb5adcdf8e54) )
5515   ROM_LOAD( "2e",           0x1000, 0x1000, CRC(a5f55f4a) SHA1(3609fc2b15b6856e81738bbd370250735dba694d) )
5516   ROM_LOAD( "2f",           0x2000, 0x1000, CRC(0169fa3c) SHA1(2c06b1deca6c80d067032bfc2386da6ab0111e5f) )
5517   ROM_LOAD( "2h-easy",      0x3000, 0x1000, CRC(054481b6) SHA1(b0f5d19af0336883e4d9813e58a75c176a63a987) )
5518   ROM_LOAD( "2j",           0x4000, 0x1000, CRC(249ee040) SHA1(7297039e95e67220fa3e75fc50635f4df4c46a86) )
5519   ROM_LOAD( "2l",           0x5000, 0x1000, CRC(c7d2e608) SHA1(8aabecabd1dcd6833fb581e4571d71a680e6563a) )
5520   ROM_LOAD( "2m",           0x6000, 0x1000, CRC(bc4bc5b1) SHA1(95ffa72e57d1da10ddeda4d9333c9e0a2fb33e82) )
5575   ROM_LOAD( "mw2.2c",       0x0000, 0x1000, CRC(7c11b4d9) SHA1(a27bdff6ce728647ec811df843ac235c32c293d6) )
5576   ROM_LOAD( "mw2.2e",       0x1000, 0x1000, CRC(1b6362be) SHA1(2fbd95869146adcc0c8be1df653251fda8849e8e) )
5577   ROM_LOAD( "mw2.2f",       0x2000, 0x1000, CRC(4fd8ba4b) SHA1(3da784267a96d05f66b00626a22cb3f06211d202) )
5578   ROM_LOAD( "mw2.2h",       0x3000, 0x1000, CRC(56879f0d) SHA1(d1e9932863aebc5761e71fca8d24f3c400e1250d) )
55215579
55225580   ROM_REGION( 0x10000, "audiocpu", 0 )
5523   ROM_LOAD( "5c",           0x0000, 0x0800, CRC(b899be2a) SHA1(9b343a682531255104db61177a43ad933c3af34e) )
5524   ROM_LOAD( "5d",           0x0800, 0x0800, CRC(6907af31) SHA1(8496c8db5342129d81381eec196facbca45bca77) )
5581   ROM_LOAD( "mw2.5c",       0x0000, 0x0800, CRC(c26231eb) SHA1(5b19edfaefe1a535059311d067ea53405879d627) )
5582   ROM_LOAD( "mw2.5d",       0x0800, 0x0800, CRC(bb48a646) SHA1(cf51202d16b03bbed12ff24501be68683f28c992) )
55255583
55265584   ROM_REGION( 0x1000, "gfx1", 0 )
5527   ROM_LOAD( "5f",           0x0000, 0x0800, CRC(61f137e7) SHA1(8bff09bc29fa829e21e6b36f7b3f67f19f6bbb26) )
5528   ROM_LOAD( "5h",           0x0800, 0x0800, CRC(5581de5f) SHA1(763dacb0d2183c159e7f1f04c7ecb1182da18abf) )
5585   ROM_LOAD( "mw2.5f",       0x0000, 0x0800, CRC(c5fa1aa0) SHA1(6c6b5b2ce5de278ff436d3e7252ece5b086cc41d) )
5586   ROM_LOAD( "mw2.5h",       0x0800, 0x0800, CRC(a6ccc652) SHA1(286b3dc1f3a7da3ac66664e774b441ef075745f1) )
55295587
55305588   ROM_REGION( 0x0020, "proms", 0 )
5531   ROM_LOAD( "ltprom",      0x0000, 0x0020, CRC(1108b816) SHA1(49fdb08f8f31fefa2f3dca3d3455318cb21847a3) )
5589   ROM_LOAD( "mw2.clr",      0x0000, 0x0020, CRC(99614c6c) SHA1(f068985f3c5e0cd88551a02c32f9baeabfd50241) )
55325590ROM_END
55335591
5534ROM_START( losttombh )
5592ROM_START( moonwara )
55355593   ROM_REGION( 0x10000, "maincpu", 0 )
5536   ROM_LOAD( "2c",           0x0000, 0x1000, CRC(d6176d2c) SHA1(bc2bf63ee8d3e376f155d218704ceb5adcdf8e54) )
5537   ROM_LOAD( "2e",           0x1000, 0x1000, CRC(a5f55f4a) SHA1(3609fc2b15b6856e81738bbd370250735dba694d) )
5538   ROM_LOAD( "2f",           0x2000, 0x1000, CRC(0169fa3c) SHA1(2c06b1deca6c80d067032bfc2386da6ab0111e5f) )
5539   ROM_LOAD( "lthard",       0x3000, 0x1000, CRC(e32cbf0e) SHA1(c4a63e01fad7bd450def5c4412690d4bb8d12691) )
5540   ROM_LOAD( "2j",           0x4000, 0x1000, CRC(249ee040) SHA1(7297039e95e67220fa3e75fc50635f4df4c46a86) )
5541   ROM_LOAD( "2l",           0x5000, 0x1000, CRC(c7d2e608) SHA1(8aabecabd1dcd6833fb581e4571d71a680e6563a) )
5542   ROM_LOAD( "2m",           0x6000, 0x1000, CRC(bc4bc5b1) SHA1(95ffa72e57d1da10ddeda4d9333c9e0a2fb33e82) )
5594   ROM_LOAD( "2c",           0x0000, 0x1000, CRC(bc20b734) SHA1(c6fe550987d0052979aad43c67aa1b9248049669) )
5595   ROM_LOAD( "2e",           0x1000, 0x1000, CRC(db6ffec2) SHA1(0fcd55b1e415e2e7041d10778052a235251f85fe) )
5596   ROM_LOAD( "2f",           0x2000, 0x1000, CRC(378931b8) SHA1(663f1eea9b0e8dc38de818df66c5211dac41c33b) )
5597   ROM_LOAD( "2h",           0x3000, 0x1000, CRC(031dbc2c) SHA1(5f2ca8b8763398bf161ee0c2c748a12d36cb40ec) )
55435598
55445599   ROM_REGION( 0x10000, "audiocpu", 0 )
5545   ROM_LOAD( "5c",           0x0000, 0x0800, CRC(b899be2a) SHA1(9b343a682531255104db61177a43ad933c3af34e) )
5546   ROM_LOAD( "5d",           0x0800, 0x0800, CRC(6907af31) SHA1(8496c8db5342129d81381eec196facbca45bca77) )
5600   ROM_LOAD( "mw2.5c",       0x0000, 0x0800, CRC(c26231eb) SHA1(5b19edfaefe1a535059311d067ea53405879d627) )
5601   ROM_LOAD( "mw2.5d",       0x0800, 0x0800, CRC(bb48a646) SHA1(cf51202d16b03bbed12ff24501be68683f28c992) )
55475602
55485603   ROM_REGION( 0x1000, "gfx1", 0 )
5549   ROM_LOAD( "5f",           0x0000, 0x0800, CRC(61f137e7) SHA1(8bff09bc29fa829e21e6b36f7b3f67f19f6bbb26) )
5550   ROM_LOAD( "5h",           0x0800, 0x0800, CRC(5581de5f) SHA1(763dacb0d2183c159e7f1f04c7ecb1182da18abf) )
5604   ROM_LOAD( "mw2.5f",       0x0000, 0x0800, CRC(c5fa1aa0) SHA1(6c6b5b2ce5de278ff436d3e7252ece5b086cc41d) )
5605   ROM_LOAD( "mw2.5h",       0x0800, 0x0800, CRC(a6ccc652) SHA1(286b3dc1f3a7da3ac66664e774b441ef075745f1) )
55515606
55525607   ROM_REGION( 0x0020, "proms", 0 )
5553   ROM_LOAD( "ltprom",       0x0000, 0x0020, CRC(1108b816) SHA1(49fdb08f8f31fefa2f3dca3d3455318cb21847a3) )
5608   ROM_LOAD( "moonwara.clr", 0x0000, 0x0020, CRC(f58d4f58) SHA1(12a80d1edf3c80dafa0e1e3622d2a03224b62f14) )   /* olive, instead of white */
55545609ROM_END
55555610
55565611
r7772r7773
56365691ROM_END
56375692
56385693
5639ROM_START( spdcoin )
5640   ROM_REGION( 0x10000, "maincpu", 0 )
5641   ROM_LOAD( "spdcoin.2c",   0x0000, 0x1000, CRC(65cf1e49) SHA1(a4570f0d7868fcdd378de3fd9e5346780afcf427) )
5642   ROM_LOAD( "spdcoin.2e",   0x1000, 0x1000, CRC(1ee59232) SHA1(b58c1de69d33cf80432012b9b6d8b1e3d8b00662) )
5643
5644   ROM_REGION( 0x10000, "audiocpu", 0 )
5645   ROM_LOAD( "spdcoin.5c",   0x0000, 0x0800, CRC(b4cf64b7) SHA1(a95d94be2e374b78b4ba49b6931f0c214ff9d033) )
5646   ROM_LOAD( "spdcoin.5d",   0x0800, 0x0800, CRC(92304df0) SHA1(01471bf7cbea0090933a253b1b46f80c8f240df5) )
5647
5648   ROM_REGION( 0x1000, "gfx1", 0 )
5649   ROM_LOAD( "spdcoin.5f",   0x0000, 0x0800, CRC(dd5f1dbc) SHA1(e7c40972a7530cac19ce04de3272244959d337ab) )
5650   ROM_LOAD( "spdcoin.5h",   0x0800, 0x0800, CRC(ab1fe81b) SHA1(98057932cb5faad60d425b547590ab22bfc67ff6) )
5651
5652   ROM_REGION( 0x0020, "proms", 0 )
5653   ROM_LOAD( "spdcoin.clr",  0x0000, 0x0020, CRC(1a2ccc56) SHA1(58bedaa8b3e21e916295603b38529084b6c0099a) )
5654ROM_END
5655
5656
5657ROM_START( superbon )
5658   ROM_REGION( 0x10000, "maincpu", 0 )
5659   ROM_LOAD( "2d.cpu",       0x0000, 0x1000, CRC(60c0ba18) SHA1(6ad09e01dd3c86c8d9c465916227c9b00f38e025) )
5660   ROM_LOAD( "2e.cpu",       0x1000, 0x1000, CRC(ddcf44bf) SHA1(b862622f4aa8af6da568b4f82ef043359ece530f) )
5661   ROM_LOAD( "2f.cpu",       0x2000, 0x1000, CRC(bb66c2d5) SHA1(cbb7f4279ae48460790cb8abf976b978ae6a1a25) )
5662   ROM_LOAD( "2h.cpu",       0x3000, 0x1000, CRC(74f4f04d) SHA1(d51c5d2c21453ee0dab60253c3124b6112d1f859) )
5663   ROM_LOAD( "2j.cpu",       0x4000, 0x1000, CRC(78effb08) SHA1(64f211b34c2f37c25a36200b393f145b39ae67b5) )
5664   ROM_LOAD( "2l.cpu",       0x5000, 0x1000, CRC(e9dcecbd) SHA1(ec61cec2b66c041872a2ca29cf724a89c73fc9a3) )
5665   ROM_LOAD( "2m.cpu",       0x6000, 0x1000, CRC(3ed0337e) SHA1(975b93aee851867e335614419aa6db16fbf8063f) )
5666
5667   ROM_REGION( 0x10000, "audiocpu", 0 )
5668   ROM_LOAD( "5c",          0x0000, 0x0800, CRC(b899be2a) SHA1(9b343a682531255104db61177a43ad933c3af34e) )
5669   ROM_LOAD( "5d.snd",       0x0800, 0x0800, CRC(80640a04) SHA1(83f2bafcfa5737441194d3058a76b2582317cfcb) )
5670
5671   ROM_REGION( 0x1000, "gfx1", 0 )
5672   ROM_LOAD( "5f.cpu",       0x0000, 0x0800, CRC(5b9d4686) SHA1(c7814aefaccab9c8a3a0b015447d366cd2e43c3a) )
5673   ROM_LOAD( "5h.cpu",       0x0800, 0x0800, CRC(58c29927) SHA1(b88515d9c3108d2ad59f30fed5d74877b1636280) )
5674
5675   /* conversion instructions do not mention color proms                        */
5676   /* http://www.arcadeflyers.com/?page=flyer&db=videodb&id=5353&image=2        */
5677   /* however, pages may be missing. In addition, it is mentioned that the      */
5678   /* conversion kit may be used for scramble, amidar and frogger as well.      */
5679   /* They all have different color proms.                                      */
5680   ROM_REGION( 0x0020, "proms", 0 )
5681   ROM_LOAD( "superbon.clr", 0x0000, 0x0020, NO_DUMP )
5682
5683ROM_END
5684
56855694ROM_START( calipso )
56865695   ROM_REGION( 0x10000, "maincpu", 0 )
56875696   ROM_LOAD( "calipso.2c",   0x0000, 0x1000, CRC(0fcb703c) SHA1(2bb096f114911973afdf3088c860c9566df06f60) )
r7772r7773
57045713ROM_END
57055714
57065715
5707ROM_START( moonwar )
5716/*
5717    Lost Tomb
5718
5719    CPU/Sound Board: A969
5720    Video Board:     A2048
5721*/
5722
5723ROM_START( losttomb )
57085724   ROM_REGION( 0x10000, "maincpu", 0 )
5709   ROM_LOAD( "mw2.2c",       0x0000, 0x1000, CRC(7c11b4d9) SHA1(a27bdff6ce728647ec811df843ac235c32c293d6) )
5710   ROM_LOAD( "mw2.2e",       0x1000, 0x1000, CRC(1b6362be) SHA1(2fbd95869146adcc0c8be1df653251fda8849e8e) )
5711   ROM_LOAD( "mw2.2f",       0x2000, 0x1000, CRC(4fd8ba4b) SHA1(3da784267a96d05f66b00626a22cb3f06211d202) )
5712   ROM_LOAD( "mw2.2h",       0x3000, 0x1000, CRC(56879f0d) SHA1(d1e9932863aebc5761e71fca8d24f3c400e1250d) )
5725   ROM_LOAD( "2c",           0x0000, 0x1000, CRC(d6176d2c) SHA1(bc2bf63ee8d3e376f155d218704ceb5adcdf8e54) )
5726   ROM_LOAD( "2e",           0x1000, 0x1000, CRC(a5f55f4a) SHA1(3609fc2b15b6856e81738bbd370250735dba694d) )
5727   ROM_LOAD( "2f",           0x2000, 0x1000, CRC(0169fa3c) SHA1(2c06b1deca6c80d067032bfc2386da6ab0111e5f) )
5728   ROM_LOAD( "2h-easy",      0x3000, 0x1000, CRC(054481b6) SHA1(b0f5d19af0336883e4d9813e58a75c176a63a987) )
5729   ROM_LOAD( "2j",           0x4000, 0x1000, CRC(249ee040) SHA1(7297039e95e67220fa3e75fc50635f4df4c46a86) )
5730   ROM_LOAD( "2l",           0x5000, 0x1000, CRC(c7d2e608) SHA1(8aabecabd1dcd6833fb581e4571d71a680e6563a) )
5731   ROM_LOAD( "2m",           0x6000, 0x1000, CRC(bc4bc5b1) SHA1(95ffa72e57d1da10ddeda4d9333c9e0a2fb33e82) )
57135732
57145733   ROM_REGION( 0x10000, "audiocpu", 0 )
5715   ROM_LOAD( "mw2.5c",       0x0000, 0x0800, CRC(c26231eb) SHA1(5b19edfaefe1a535059311d067ea53405879d627) )
5716   ROM_LOAD( "mw2.5d",       0x0800, 0x0800, CRC(bb48a646) SHA1(cf51202d16b03bbed12ff24501be68683f28c992) )
5734   ROM_LOAD( "5c",           0x0000, 0x0800, CRC(b899be2a) SHA1(9b343a682531255104db61177a43ad933c3af34e) )
5735   ROM_LOAD( "5d",           0x0800, 0x0800, CRC(6907af31) SHA1(8496c8db5342129d81381eec196facbca45bca77) )
57175736
57185737   ROM_REGION( 0x1000, "gfx1", 0 )
5719   ROM_LOAD( "mw2.5f",       0x0000, 0x0800, CRC(c5fa1aa0) SHA1(6c6b5b2ce5de278ff436d3e7252ece5b086cc41d) )
5720   ROM_LOAD( "mw2.5h",       0x0800, 0x0800, CRC(a6ccc652) SHA1(286b3dc1f3a7da3ac66664e774b441ef075745f1) )
5738   ROM_LOAD( "5f",           0x0000, 0x0800, CRC(61f137e7) SHA1(8bff09bc29fa829e21e6b36f7b3f67f19f6bbb26) )
5739   ROM_LOAD( "5h",           0x0800, 0x0800, CRC(5581de5f) SHA1(763dacb0d2183c159e7f1f04c7ecb1182da18abf) )
57215740
57225741   ROM_REGION( 0x0020, "proms", 0 )
5723   ROM_LOAD( "mw2.clr",      0x0000, 0x0020, CRC(99614c6c) SHA1(f068985f3c5e0cd88551a02c32f9baeabfd50241) )
5742   ROM_LOAD( "ltprom",      0x0000, 0x0020, CRC(1108b816) SHA1(49fdb08f8f31fefa2f3dca3d3455318cb21847a3) )
57245743ROM_END
57255744
5726ROM_START( moonwara )
5745ROM_START( losttombh )
57275746   ROM_REGION( 0x10000, "maincpu", 0 )
5728   ROM_LOAD( "2c",           0x0000, 0x1000, CRC(bc20b734) SHA1(c6fe550987d0052979aad43c67aa1b9248049669) )
5729   ROM_LOAD( "2e",           0x1000, 0x1000, CRC(db6ffec2) SHA1(0fcd55b1e415e2e7041d10778052a235251f85fe) )
5730   ROM_LOAD( "2f",           0x2000, 0x1000, CRC(378931b8) SHA1(663f1eea9b0e8dc38de818df66c5211dac41c33b) )
5731   ROM_LOAD( "2h",           0x3000, 0x1000, CRC(031dbc2c) SHA1(5f2ca8b8763398bf161ee0c2c748a12d36cb40ec) )
5747   ROM_LOAD( "2c",           0x0000, 0x1000, CRC(d6176d2c) SHA1(bc2bf63ee8d3e376f155d218704ceb5adcdf8e54) )
5748   ROM_LOAD( "2e",           0x1000, 0x1000, CRC(a5f55f4a) SHA1(3609fc2b15b6856e81738bbd370250735dba694d) )
5749   ROM_LOAD( "2f",           0x2000, 0x1000, CRC(0169fa3c) SHA1(2c06b1deca6c80d067032bfc2386da6ab0111e5f) )
5750   ROM_LOAD( "lthard",       0x3000, 0x1000, CRC(e32cbf0e) SHA1(c4a63e01fad7bd450def5c4412690d4bb8d12691) )
5751   ROM_LOAD( "2j",           0x4000, 0x1000, CRC(249ee040) SHA1(7297039e95e67220fa3e75fc50635f4df4c46a86) )
5752   ROM_LOAD( "2l",           0x5000, 0x1000, CRC(c7d2e608) SHA1(8aabecabd1dcd6833fb581e4571d71a680e6563a) )
5753   ROM_LOAD( "2m",           0x6000, 0x1000, CRC(bc4bc5b1) SHA1(95ffa72e57d1da10ddeda4d9333c9e0a2fb33e82) )
57325754
57335755   ROM_REGION( 0x10000, "audiocpu", 0 )
5734   ROM_LOAD( "mw2.5c",       0x0000, 0x0800, CRC(c26231eb) SHA1(5b19edfaefe1a535059311d067ea53405879d627) )
5735   ROM_LOAD( "mw2.5d",       0x0800, 0x0800, CRC(bb48a646) SHA1(cf51202d16b03bbed12ff24501be68683f28c992) )
5756   ROM_LOAD( "5c",           0x0000, 0x0800, CRC(b899be2a) SHA1(9b343a682531255104db61177a43ad933c3af34e) )
5757   ROM_LOAD( "5d",           0x0800, 0x0800, CRC(6907af31) SHA1(8496c8db5342129d81381eec196facbca45bca77) )
57365758
57375759   ROM_REGION( 0x1000, "gfx1", 0 )
5738   ROM_LOAD( "mw2.5f",       0x0000, 0x0800, CRC(c5fa1aa0) SHA1(6c6b5b2ce5de278ff436d3e7252ece5b086cc41d) )
5739   ROM_LOAD( "mw2.5h",       0x0800, 0x0800, CRC(a6ccc652) SHA1(286b3dc1f3a7da3ac66664e774b441ef075745f1) )
5760   ROM_LOAD( "5f",           0x0000, 0x0800, CRC(61f137e7) SHA1(8bff09bc29fa829e21e6b36f7b3f67f19f6bbb26) )
5761   ROM_LOAD( "5h",           0x0800, 0x0800, CRC(5581de5f) SHA1(763dacb0d2183c159e7f1f04c7ecb1182da18abf) )
57405762
57415763   ROM_REGION( 0x0020, "proms", 0 )
5742   ROM_LOAD( "moonwara.clr", 0x0000, 0x0020, CRC(f58d4f58) SHA1(12a80d1edf3c80dafa0e1e3622d2a03224b62f14) )   /* olive, instead of white */
5764   ROM_LOAD( "ltprom",       0x0000, 0x0020, CRC(1108b816) SHA1(49fdb08f8f31fefa2f3dca3d3455318cb21847a3) )
57435765ROM_END
57445766
57455767
5746ROM_START( tdpgal )
5768ROM_START( spdcoin )
57475769   ROM_REGION( 0x10000, "maincpu", 0 )
5748   ROM_LOAD( "1.bin",  0x0000, 0x0800, CRC(7be819fe) SHA1(ab5a332914546692f9976e243daf3040f0d9952e) )
5749   ROM_LOAD( "2.bin",  0x0800, 0x0800, CRC(70c83a5e) SHA1(7b781b027c73d6c3901c6d27901f97fae61a352d) )
5750   ROM_LOAD( "3.bin",  0x1000, 0x0800, CRC(475eb5a0) SHA1(b7436873fd74aff3577540474420a1abaa2babcb) )
5751   ROM_LOAD( "4.bin",  0x1800, 0x0800, CRC(20a71943) SHA1(e196eea20bd0518545dcde61f2697a1d6f61568b) )
5752   ROM_LOAD( "5.bin",  0x2000, 0x0800, CRC(72c4f2dc) SHA1(30a9c69afd2c4da4a14363fc0b17b1e0da188927) )
5753   ROM_LOAD( "6.bin",  0x2800, 0x0800, CRC(fa4e2be4) SHA1(a30d43189660f8a1437faf87064fce28c9c760ad) )
5770   ROM_LOAD( "spdcoin.2c",   0x0000, 0x1000, CRC(65cf1e49) SHA1(a4570f0d7868fcdd378de3fd9e5346780afcf427) )
5771   ROM_LOAD( "spdcoin.2e",   0x1000, 0x1000, CRC(1ee59232) SHA1(b58c1de69d33cf80432012b9b6d8b1e3d8b00662) )
57545772
5773   ROM_REGION( 0x10000, "audiocpu", 0 )
5774   ROM_LOAD( "spdcoin.5c",   0x0000, 0x0800, CRC(b4cf64b7) SHA1(a95d94be2e374b78b4ba49b6931f0c214ff9d033) )
5775   ROM_LOAD( "spdcoin.5d",   0x0800, 0x0800, CRC(92304df0) SHA1(01471bf7cbea0090933a253b1b46f80c8f240df5) )
5776
57555777   ROM_REGION( 0x1000, "gfx1", 0 )
5756   ROM_LOAD( "8.bin",         0x0000, 0x0800, CRC(d701b1d4) SHA1(8f23ba3c9f42fedd8b8f38d321118a86889f00dc) )
5757   ROM_LOAD( "7.bin",         0x0800, 0x0800, CRC(3113bcfd) SHA1(e2792e5fe7d7f27bb329e3104dee3ca29d72ef48) )
5778   ROM_LOAD( "spdcoin.5f",   0x0000, 0x0800, CRC(dd5f1dbc) SHA1(e7c40972a7530cac19ce04de3272244959d337ab) )
5779   ROM_LOAD( "spdcoin.5h",   0x0800, 0x0800, CRC(ab1fe81b) SHA1(98057932cb5faad60d425b547590ab22bfc67ff6) )
57585780
57595781   ROM_REGION( 0x0020, "proms", 0 )
5760   ROM_LOAD( "bprom.bin",       0x0000, 0x0020, CRC(2b4cf53f) SHA1(8d7eb0453173b9821eea32419b67559bfb4578d0) )
5782   ROM_LOAD( "spdcoin.clr",  0x0000, 0x0020, CRC(1a2ccc56) SHA1(58bedaa8b3e21e916295603b38529084b6c0099a) )
57615783ROM_END
57625784
5763/*
57645785
5765The Pit (on Moon Quasar hardware)
5766^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5786ROM_START( superbon )
5787   ROM_REGION( 0x10000, "maincpu", 0 )
5788   ROM_LOAD( "2d.cpu",       0x0000, 0x1000, CRC(60c0ba18) SHA1(6ad09e01dd3c86c8d9c465916227c9b00f38e025) )
5789   ROM_LOAD( "2e.cpu",       0x1000, 0x1000, CRC(ddcf44bf) SHA1(b862622f4aa8af6da568b4f82ef043359ece530f) )
5790   ROM_LOAD( "2f.cpu",       0x2000, 0x1000, CRC(bb66c2d5) SHA1(cbb7f4279ae48460790cb8abf976b978ae6a1a25) )
5791   ROM_LOAD( "2h.cpu",       0x3000, 0x1000, CRC(74f4f04d) SHA1(d51c5d2c21453ee0dab60253c3124b6112d1f859) )
5792   ROM_LOAD( "2j.cpu",       0x4000, 0x1000, CRC(78effb08) SHA1(64f211b34c2f37c25a36200b393f145b39ae67b5) )
5793   ROM_LOAD( "2l.cpu",       0x5000, 0x1000, CRC(e9dcecbd) SHA1(ec61cec2b66c041872a2ca29cf724a89c73fc9a3) )
5794   ROM_LOAD( "2m.cpu",       0x6000, 0x1000, CRC(3ed0337e) SHA1(975b93aee851867e335614419aa6db16fbf8063f) )
57675795
5768Dumped by Andrew Welburn
5769on the sunny morning of 2/03/10
5796   ROM_REGION( 0x10000, "audiocpu", 0 )
5797   ROM_LOAD( "5c",          0x0000, 0x0800, CRC(b899be2a) SHA1(9b343a682531255104db61177a43ad933c3af34e) )
5798   ROM_LOAD( "5d.snd",       0x0800, 0x0800, CRC(80640a04) SHA1(83f2bafcfa5737441194d3058a76b2582317cfcb) )
57705799
5771http://www.andys-arcade.com
5800   ROM_REGION( 0x1000, "gfx1", 0 )
5801   ROM_LOAD( "5f.cpu",       0x0000, 0x0800, CRC(5b9d4686) SHA1(c7814aefaccab9c8a3a0b015447d366cd2e43c3a) )
5802   ROM_LOAD( "5h.cpu",       0x0800, 0x0800, CRC(58c29927) SHA1(b88515d9c3108d2ad59f30fed5d74877b1636280) )
57725803
5773*************************************************
5774**Do not seperate this text file from the roms.**
5775*************************************************
5804   /* conversion instructions do not mention color proms                        */
5805   /* http://www.arcadeflyers.com/?page=flyer&db=videodb&id=5353&image=2        */
5806   /* however, pages may be missing. In addition, it is mentioned that the      */
5807   /* conversion kit may be used for scramble, amidar and frogger as well.      */
5808   /* They all have different color proms.                                      */
5809   ROM_REGION( 0x0020, "proms", 0 )
5810   ROM_LOAD( "superbon.clr", 0x0000, 0x0020, NO_DUMP )
57765811
5777Nichibutsu Moon Quasar pcb largely unhacked, but
5778with an odd looking set of roms. One gfx rom
5779identifies itself as 'The Pit' so that is my only
5780guess at what the game actually is.
5812ROM_END
57815813
5782Roms 1 through 8 read well in-circuit in the right
5783places in the memory map for moon cresta,
5784(through the fluke 9100) but the game does not
5785currently run. Roms dumped adn verified with no
5786anomolies.
57875814
5788Rom 9 was placed on the through-socket and has
5789pins 20 and 18 (/E and A11 respectively) tied to
5790pin 5 of 8E (A14/A15/MREQ demux). This demux has
5791some patches, the trace to pin 13 is cut, and is
5792instead wired to pin 3.
5793
5794*/
5795
5796ROM_START( thepitm )
5797   ROM_REGION( 0x10000, "maincpu", 0 )
5798   ROM_LOAD( "1.bin",          0x0000, 0x0800, CRC(0f78d6ea) SHA1(e224b2fb9b4a26295b03af720fa647d4488a1287) )
5799   ROM_LOAD( "2.bin",          0x0800, 0x0800, CRC(ebacc6eb) SHA1(8b73d96ebe8070fbbb16434aa6a30ec8985ddec6) )
5800   ROM_LOAD( "3.bin",          0x1000, 0x0800, CRC(14fd0706) SHA1(5d905d8272731c307dc9f96caf4973b28413198e) )
5801   ROM_LOAD( "4.bin",          0x1800, 0x0800, CRC(613e920f) SHA1(078c7f36ba0145fbbd24bdae4cb6b03c5c27c1cc) )
5802   ROM_LOAD( "5.bin",          0x2000, 0x0800, CRC(5a791f3f) SHA1(166f07f7fe260e53e611784976792638a25485c1) )
5803   ROM_LOAD( "6.bin",          0x2800, 0x0800, CRC(0bb37f51) SHA1(32e31678388bad048c829bd43a18dc4e24869840) )
5804   ROM_LOAD( "7.bin",          0x3000, 0x0800, CRC(4dfdec6f) SHA1(eb88a278860998c343f94e27c8c6c723cffb2dd9) )
5805   ROM_LOAD( "8.bin",          0x3800, 0x0800, CRC(a39a9189) SHA1(aacd54edca6bc7f7feacd651a0de57b3d9592aad) )
5806   ROM_LOAD( "9.bin",          0x4000, 0x0800, CRC(2eb90e07) SHA1(92678fc5cfeb7119ce27f042571daa831fa1dad5) )
5807
5808   ROM_REGION( 0x2000, "gfx1", 0 )
5809   ROM_LOAD( "1h.bin",      0x0000, 0x0800, CRC(00dce65f) SHA1(ba0cce484d1f8693a85b85e0689d107588df9043) )
5810   ROM_LOAD( "1k.bin",      0x1000, 0x0800, CRC(3ec0056e) SHA1(1dd19e7535ab9abd62b4b32663437f8e8acb91b5) )
5811
5812   ROM_REGION( 0x0020, "proms", 0 )
5813   ROM_LOAD( "6l.bin",   0x0000, 0x0020, CRC(6a0c7d87) SHA1(140335d85c67c75b65689d4e76d29863c209cf32) )
5814ROM_END
5815
58165815/*************************************
58175816 *
58185817 *  Game drivers
r7772r7773
60216020
60226021
60236022/* scobra */
6024GAME( 1981, scobra,   0,        scobra,   scobra,   scobra,   ROT90,  "Konami", "Super Cobra", GAME_SUPPORTS_SAVE )
6025GAME( 1981, scobras,  scobra,   scobra,   scobras,  scobra,   ROT90,  "[Konami] (Stern license)", "Super Cobra (Stern)", GAME_SUPPORTS_SAVE )
6026GAME( 1981, scobrase, scobra,   scobra,   scobras,  scobra,   ROT90,  "[Konami] (Sega license)", "Super Cobra (Sega)", GAME_SUPPORTS_SAVE )
6027GAME( 1981, scobrab,  scobra,   scobra,   scobras,  scobra,   ROT90,  "bootleg", "Super Cobra (bootleg)", GAME_SUPPORTS_SAVE )
6028GAME( 1981, suprheli, scobra,   scobra,   scobras,  scobra,   ROT90,  "bootleg", "Super Heli (Super Cobra bootleg)", GAME_SUPPORTS_SAVE )
6023GAME( 1981, scobra,    0,        scobra,   scobra,    scobra,   ROT90,  "Konami", "Super Cobra", GAME_SUPPORTS_SAVE )
6024GAME( 1981, scobrase,  scobra,   scobra,   scobra,    scobra,   ROT90,  "[Konami] (Sega license)", "Super Cobra (Sega)", GAME_SUPPORTS_SAVE )
6025GAME( 1981, scobras,   scobra,   scobra,   scobras,   scobra,   ROT90,  "[Konami] (Stern license)", "Super Cobra (Stern)", GAME_SUPPORTS_SAVE )
6026GAME( 1981, scobrab,   scobra,   scobra,   scobras,   scobra,   ROT90,  "bootleg", "Super Cobra (bootleg)", GAME_SUPPORTS_SAVE )
6027GAME( 1981, suprheli,  scobra,   scobra,   scobras,   scobra,   ROT90,  "bootleg", "Super Heli (Super Cobra bootleg)", GAME_SUPPORTS_SAVE )
60296028
6030GAME( 1982, losttomb, 0,        scobra,   losttomb, losttomb, ROT90,  "Stern", "Lost Tomb (easy)", GAME_SUPPORTS_SAVE )
6031GAME( 1982, losttombh,losttomb, scobra,   losttomb, losttomb, ROT90,  "Stern", "Lost Tomb (hard)", GAME_SUPPORTS_SAVE )
6029GAME( 1981, moonwar,   0,        moonwar,  moonwar,   moonwar,  ROT90,  "Stern", "Moonwar", GAME_SUPPORTS_SAVE )
6030GAME( 1981, moonwara,  moonwar,  moonwar,  moonwara,  moonwar,  ROT90,  "Stern", "Moonwar (older)", GAME_SUPPORTS_SAVE )
60326031
6033GAME( 1981, armorcar, 0,        scobra,   armorcar, scobra,   ROT90,  "Stern", "Armored Car (set 1)", GAME_SUPPORTS_SAVE )
6034GAME( 1981, armorcar2,armorcar, scobra,   armorcar, scobra,   ROT90,  "Stern", "Armored Car (set 2)", GAME_SUPPORTS_SAVE )
6032GAME( 1981, armorcar,  0,        scobra,   armorcar,  scobra,   ROT90,  "Stern", "Armored Car (set 1)", GAME_SUPPORTS_SAVE )
6033GAME( 1981, armorcar2, armorcar, scobra,   armorcar2, scobra,   ROT90,  "Stern", "Armored Car (set 2)", GAME_SUPPORTS_SAVE )
60356034
6036GAME( 1982, tazmania, 0,        scobra,   tazmania, scobra,   ROT90,  "Stern", "Tazz-Mania (set 1)", GAME_SUPPORTS_SAVE )
6035GAME( 1982, tazmania, 0,        scobra,   tazmania, scobra,   ROT90,  "Stern", "Tazz-Mania (set 1)", GAME_SUPPORTS_SAVE )
60376036
6038GAME( 1982, anteater, 0,        anteater, anteater, anteater, ROT90,  "[Stern] (Tago license)", "Anteater", GAME_SUPPORTS_SAVE )
6037GAME( 1982, anteater, 0,        anteater, anteater, anteater, ROT90,  "[Stern] (Tago license)", "Anteater", GAME_SUPPORTS_SAVE )
60396038
6040GAME( 1984, spdcoin,  0,        scobra,   spdcoin,  scobra,   ROT90,  "Stern", "Speed Coin (prototype)", GAME_SUPPORTS_SAVE )
6041GAME( 1985, superbon, 0,        scobra,   superbon, superbon, ROT90,  "Signatron USA", "Agent Super Bond (Scobra Hardware)", GAME_WRONG_COLORS | GAME_SUPPORTS_SAVE )
6039GAME( 1982, calipso,   0,        scobra,   calipso,   calipso,  ROT90,  "[Stern] (Tago license)", "Calipso", GAME_SUPPORTS_SAVE )
60426040
6043GAME( 1982, calipso,  0,        scobra,   calipso,  calipso,  ROT90,  "[Stern] (Tago license)", "Calipso", GAME_SUPPORTS_SAVE )
6041GAME( 1982, losttomb,  0,        scobra,   losttomb,  losttomb, ROT90,  "Stern", "Lost Tomb (easy)", GAME_SUPPORTS_SAVE )
6042GAME( 1982, losttombh, losttomb, scobra,   losttomb,  losttomb, ROT90,  "Stern", "Lost Tomb (hard)", GAME_SUPPORTS_SAVE )
60446043
6045GAME( 1981, moonwar,  0,        moonwar,  moonwar,  moonwar,  ROT90,  "Stern", "Moonwar", GAME_SUPPORTS_SAVE )
6046GAME( 1981, moonwara, moonwar,  moonwar,  moonwara, moonwar,  ROT90,  "Stern", "Moonwar (older)", GAME_SUPPORTS_SAVE )
6044GAME( 1984, spdcoin,   0,        scobra,   spdcoin,   scobra,   ROT90,  "Stern", "Speed Coin (prototype)", GAME_SUPPORTS_SAVE )
60476045
6046GAME( 1985, superbon,  0,        scobra,   superbon,  superbon, ROT90,  "Signatron USA", "Agent Super Bond (Scobra Hardware)", GAME_WRONG_COLORS | GAME_SUPPORTS_SAVE )
60486047
60496048
6049
60506050/* currently in galaxold.c and should be moved here */
60516051//GAME( 1981, 4in1,     0,        4in1,     4in1,     4in1,     ROT90,  "Armenia / Food and Fun", "4 Fun in 1", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
60526052//GAME( 1982, bagmanmc, bagman,   bagmanmc, bagmanmc, galaxian, ROT90,  "bootleg", "Bagman (Moon Cresta hardware)", GAME_WRONG_COLORS | GAME_SUPPORTS_SAVE )
src/mame/drivers/neodrvr.c
r7772r7773
79577957GAME( 2004, kof2k4se,  kof2002,  neogeo,   neogeo,   kof2k4se, ROT0, "bootleg", "The King of Fighters Special Edition 2004 (The King of Fighters 2002 bootleg)", GAME_SUPPORTS_SAVE ) /* Hack / Bootleg of kof2002 */
79587958GAME( 2003, mslug5,    neogeo,   neogeo,   neogeo,   mslug5,   ROT0, "SNK Playmore", "Metal Slug 5", GAME_SUPPORTS_SAVE )
79597959GAME( 2003, mslug5h,   mslug5,   neogeo,   neogeo,   mslug5,   ROT0, "SNK Playmore", "Metal Slug 5 (AES Cart)", GAME_SUPPORTS_SAVE ) /* Also found in later MVS carts */
7960GAME( 2003, ms5pcb,    0,        neogeo,   ms5pcb,   ms5pcb,   ROT0, "SNK Playmore", "Metal Slug 5 (JAMMA PCB)", GAME_SUPPORTS_SAVE )
7960GAME( 2003, ms5pcb,    0,        neogeo,   ms5pcb,   ms5pcb,   ROT0, "SNK Playmore", "Metal Slug 5 (JAMMA PCB)", GAME_NOT_WORKING | GAME_SUPPORTS_SAVE )
79617961GAME( 2003, ms5plus,   mslug5,   neogeo,   neogeo,   ms5plus,  ROT0, "bootleg", "Metal Slug 5 Plus (bootleg)", GAME_SUPPORTS_SAVE )
79627962GAME( 2003, svcpcb,    0,        neogeo,   svcpcb,   svcpcb,   ROT0, "SNK Playmore", "SNK vs. CAPCOM SVC CHAOS (JAMMA PCB, set 1)", GAME_SUPPORTS_SAVE ) // not a clone of neogeo because it's NOT a neogeo cart.
79637963GAME( 2003, svcpcba,   svcpcb,   neogeo,   svcpcb,   svcpcb,   ROT0, "SNK Playmore", "SNK vs. CAPCOM SVC CHAOS (JAMMA PCB, set 2)" , GAME_SUPPORTS_SAVE ) /* Encrypted Code */
src/mame/drivers/midyunit.c
r7772r7773
18481848ROM_END
18491849
18501850
1851ROM_START( hiimpact2 )
1852   ROM_REGION( 0x90000, "cvsdcpu", 0 )   /* sound CPU */
1853   ROM_LOAD (  "sl1u4.bin", 0x10000, 0x20000, CRC(28effd6a) SHA1(4a839f15e1b453a22fdef7b1801b8cc5cfdf3c29) )
1854   ROM_LOAD ( "sl1u19.bin", 0x30000, 0x20000, CRC(0ea22c89) SHA1(6d4579f6b10cac685be01348451b3537a0626034) )
1855   ROM_LOAD ( "sl1u20.bin", 0x50000, 0x20000, CRC(4e747ab5) SHA1(82040f40aac7dae577376a742eadaaa9644500c1) )
1856
1857   ROM_REGION16_LE( 0x100000, "user1", 0 )   /* 34010 code */
1858   ROM_LOAD16_BYTE( "u105-la2",  0xc0000, 0x20000, CRC(25d83ba1) SHA1(4422a34b2957aabb3f0a26ca129e290dfc062933) )
1859   ROM_LOAD16_BYTE( "u89-la2",   0xc0001, 0x20000, CRC(811f1253) SHA1(125a6cca26d37fae343b78046774f54ee6e8d996) )
1860
1861   ROM_REGION( 0x800000, "gfx1", 0 )
1862   ROM_LOAD ( "la1u111.bin",  0x000000, 0x20000, CRC(49560560) SHA1(03d51e6019afa9a396c91a484969be4922fa4c99) )
1863   ROM_LOAD ( "la1u112.bin",  0x020000, 0x20000, CRC(4dd879dc) SHA1(ac4f02fcb933df38f1ebf51b109092b77563b684) )
1864   ROM_LOAD ( "la1u113.bin",  0x040000, 0x20000, CRC(b67aeb70) SHA1(dd1512329c46da4254712712b6f847544f4487bd) )
1865   ROM_LOAD ( "la1u114.bin",  0x060000, 0x20000, CRC(9a4bc44b) SHA1(309eb5214fe5e1fe64d724d515190a31fc524aae) )
1866
1867   ROM_LOAD (  "la1u95.bin",  0x200000, 0x20000, CRC(e1352dc0) SHA1(7faa2cfa9ebaf2d99b243232316221b672869703) )
1868   ROM_LOAD (  "la1u96.bin",  0x220000, 0x20000, CRC(197d0f34) SHA1(2d544588c3241423188ac7fb7aff87043fdd063d) )
1869   ROM_LOAD (  "la1u97.bin",  0x240000, 0x20000, CRC(908ea575) SHA1(79802d8df4e016d178be98333d2b1d047a27eccc) )
1870   ROM_LOAD (  "la1u98.bin",  0x260000, 0x20000, CRC(6dcbab11) SHA1(7432172810fd4b922b61769c68d86f24769a42cf) )
1871
1872   ROM_LOAD ( "la1u106.bin",  0x400000, 0x20000, CRC(7d0ead0d) SHA1(1e65b6e7e629021d70603df37db5fa89cfe93175) )
1873   ROM_LOAD ( "la1u107.bin",  0x420000, 0x20000, CRC(ef48e8fa) SHA1(538de37cd8342085ec27f67292a7eeb1007e3b1f) )
1874   ROM_LOAD ( "la1u108.bin",  0x440000, 0x20000, CRC(5f363e12) SHA1(da398c0204f785aad4c52007d2f25031ecc1c63f) )
1875   ROM_LOAD ( "la1u109.bin",  0x460000, 0x20000, CRC(3689fbbc) SHA1(d95c0a2e3abf977ba7a899e419c22d004020c560) )
1876
1877   ROM_REGION( 0x1100, "plds", 0 )
1878   ROM_LOAD( "ep610.u8",    0x0000, 0x032f, NO_DUMP ) /* PAL is read protected */
1879   ROM_LOAD( "pls153a.u40", 0x0400, 0x00eb, CRC(69e5143f) SHA1(1a1e7b3233f7d5a1c161564710e8e984a9b0a16c) )
1880   ROM_LOAD( "ep610.u51",   0x0500, 0x032f, NO_DUMP ) /* PAL is read protected */
1881   ROM_LOAD( "ep610.u52",   0x0900, 0x032f, NO_DUMP ) /* PAL is read protected */
1882   ROM_LOAD( "ep610.u65",   0x0d00, 0x032f, NO_DUMP ) /* PAL is read protected */
1883ROM_END
1884
1885
18511886ROM_START( hiimpact1 )
18521887   ROM_REGION( 0x90000, "cvsdcpu", 0 )   /* sound CPU */
18531888   ROM_LOAD (  "sl1u4.bin", 0x10000, 0x20000, CRC(28effd6a) SHA1(4a839f15e1b453a22fdef7b1801b8cc5cfdf3c29) )
r7772r7773
24022437
24032438   ROM_REGION16_LE( 0x100000, "user1", 0 ) /* 34010 code */
24042439   ROM_LOAD16_BYTE( "t2-la1.105", 0x00000, 0x80000, CRC(ca52a8b0) SHA1(20b91bdd9fe8e7be6a3c3cb9684769733d66d401) )
2405   ROM_LOAD16_BYTE( "t2-la1.89", 0x00001, 0x80000, CRC(08535210) SHA1(a7986541bc504294bd6523ce691e19e496f8be7c) )
2440   ROM_LOAD16_BYTE( "t2-la1.89", 0x00001, 0x80000, CRC(08535210) SHA1(a7986541bc504294bd6523ce691e19e496f8be7c) )
24062441
24072442   ROM_REGION( 0x800000, "gfx1", 0 )
24082443   ROM_LOAD ( "t2.111", 0x000000, 0x80000, CRC(916d0197) SHA1(3b53d3770955b10cc6002e3d3bf0f71429667af0) )
r7772r7773
25152550GAME( 1990, hiimpact,   0,        yunit_cvsd_6bit_slow,  trog,     hiimpact, ROT0, "Williams", "High Impact Football (rev LA5 02/15/91)", GAME_SUPPORTS_SAVE )
25162551GAME( 1990, hiimpact4,  hiimpact, yunit_cvsd_6bit_slow,  trog,     hiimpact, ROT0, "Williams", "High Impact Football (rev LA4 02/04/91)", GAME_SUPPORTS_SAVE )
25172552GAME( 1990, hiimpact3,  hiimpact, yunit_cvsd_6bit_slow,  trog,     hiimpact, ROT0, "Williams", "High Impact Football (rev LA3 12/27/90)", GAME_SUPPORTS_SAVE )
2553GAME( 1990, hiimpact2,  hiimpact, yunit_cvsd_6bit_slow,  trog,     hiimpact, ROT0, "Williams", "High Impact Football (rev LA2 12/26/90)", GAME_SUPPORTS_SAVE )
25182554GAME( 1990, hiimpact1,  hiimpact, yunit_cvsd_6bit_slow,  trog,     hiimpact, ROT0, "Williams", "High Impact Football (rev LA1 12/16/90)", GAME_SUPPORTS_SAVE )
25192555GAME( 1990, hiimpactp,  hiimpact, yunit_cvsd_6bit_slow,  trog,     hiimpact, ROT0, "Williams", "High Impact Football (prototype, rev 8.6 12/09/90)", GAME_SUPPORTS_SAVE )
25202556
src/mame/drivers/midtunit.c
r7772r7773
416416   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(4)
417417   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4)
418418   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4)
419   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4)
419      PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4)
420420   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4)
421421   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
422422   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
r7772r7773
615615
616616   MDRV_SCREEN_ADD("screen", RASTER)
617617   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
618   MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, 505, 0, 399, 289, 0, 253)
618   MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK * 2, 505, 0, 399, 289, 0, 253)
619619
620620   MDRV_VIDEO_START(midtunit)
621621   MDRV_VIDEO_UPDATE(tms340x0)
src/mame/drivers/megadriv.c
r7772r7773
39863986      int spritenum;
39873987      int ypos,xpos,addr;
39883988      int drawypos;
3989      int drawwidth,drawheight;
3989      int /*drawwidth,*/ drawheight;
39903990      int spritemask = 0;
39913991      UINT8 height,width=0,link=0,xflip,yflip,colour,pri;
39923992
r7772r7773
40424042               addr &=0x7ff;
40434043            }
40444044
4045            drawwidth = (width+1)*8;
4045            //drawwidth = (width+1)*8;
40464046            if (pri==1) pri = 0x80;
40474047            else pri = 0x40;
40484048
src/mame/drivers/aleck64.c
r7772r7773
568568}
569569
570570static MACHINE_DRIVER_START( aleck64 )
571
572   MDRV_DRIVER_DATA(_n64_state)
573
571574   /* basic machine hardware */
572575   MDRV_CPU_ADD("maincpu", VR4300BE, 93750000)
573576   MDRV_CPU_CONFIG(config)
src/mame/drivers/goldstar.c
r7772r7773
49284928};
49294929#endif
49304930
4931static const gfx_layout cb3c_tiles8x8_layout =
4932{
4933   8,8,
4934   RGN_FRAC(1,1),
4935   4,
4936   { 0,1,2,3 },
4937   { 4,0,12,8,20,16,28,24 },
4938   { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
4939   8*32
4940};
4941
4942
4943static const gfx_layout cb3c_tiles8x32_layout =
4944{
4945   8,32,
4946   RGN_FRAC(1,1),
4947   4,
4948   { 0,1,2,3 },
4949   { 4,0,12,8,20,16,28,24 },
4950   { 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,16*32,17*32,18*32,19*32,20*32,21*32,22*32,23*32,24*32,25*32,26*32,27*32,28*32,29*32,30*32,31*32 },
4951   32*32
4952};
4953
4954
49314955static GFXDECODE_START( goldstar )
49324956   GFXDECODE_ENTRY( "gfx1", 0, charlayout,   0, 16 )
49334957   GFXDECODE_ENTRY( "gfx2", 0, tilelayout, 128,  8 )
r7772r7773
49484972   GFXDECODE_ENTRY( "gfx2", 0, tilelayout_chry10, 128,  8 )
49494973GFXDECODE_END
49504974
4975static GFXDECODE_START( cb3c )
4976   GFXDECODE_ENTRY( "gfx1", 0, cb3c_tiles8x8_layout,   0, 16 )
4977   GFXDECODE_ENTRY( "gfx2", 0, cb3c_tiles8x32_layout, 128,  8 )
4978GFXDECODE_END
4979
49514980static GFXDECODE_START( ncb3 )
49524981   GFXDECODE_ENTRY( "gfx1", 0, tiles8x8x3_layout, 0, 16 )
49534982   GFXDECODE_ENTRY( "gfx2", 0, tiles8x32x4_layout, 128, 4 )
r7772r7773
55225551
55235552
55245553
5554static MACHINE_DRIVER_START( cb3c )
5555
5556   MDRV_DRIVER_DATA(goldstar_state)
5557
5558   /* basic machine hardware */
5559   MDRV_CPU_ADD("maincpu", Z80, CPU_CLOCK)
5560   MDRV_CPU_PROGRAM_MAP(ncb3_map)
5561   MDRV_CPU_IO_MAP(ncb3_readwriteport)
5562   MDRV_CPU_VBLANK_INT("screen", irq0_line_hold)
5563
5564   /* 3x 8255 */
5565   MDRV_PPI8255_ADD( "ppi8255_0", ncb3_ppi8255_intf[0] )
5566   MDRV_PPI8255_ADD( "ppi8255_1", ncb3_ppi8255_intf[1] )
5567   MDRV_PPI8255_ADD( "ppi8255_2", ncb3_ppi8255_intf[2] )
5568
5569   /* video hardware */
5570   MDRV_SCREEN_ADD("screen", RASTER)
5571   MDRV_SCREEN_REFRESH_RATE(60)
5572//  MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
5573   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
5574   MDRV_SCREEN_SIZE(64*8, 32*8)
5575   MDRV_SCREEN_VISIBLE_AREA(0*8, 64*8-1, 2*8, 30*8-1)
5576
5577   MDRV_GFXDECODE(cb3c)
5578   MDRV_PALETTE_LENGTH(256)
5579   MDRV_PALETTE_INIT(cm)
5580   MDRV_NVRAM_HANDLER(goldstar)
5581
5582   MDRV_VIDEO_START(goldstar)
5583   MDRV_VIDEO_UPDATE(goldstar)
5584
5585   /* sound hardware */
5586   MDRV_SPEAKER_STANDARD_MONO("mono")
5587
5588   MDRV_SOUND_ADD("snsnd", SN76489, PSG_CLOCK)
5589   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
5590
5591   MDRV_SOUND_ADD("aysnd", AY8910, AY_CLOCK)
5592   MDRV_SOUND_CONFIG(ay8910_config)
5593   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
5594MACHINE_DRIVER_END
5595
5596
55255597static MACHINE_DRIVER_START( ncb3 )
55265598
55275599   MDRV_DRIVER_DATA(goldstar_state)
r7772r7773
63066378ROM_END
63076379
63086380
6381
63096382ROM_START( moonlght )
63106383   ROM_REGION( 0x20000, "maincpu", 0 )
63116384   ROM_LOAD( "4.bin",       0x0000, 0x20000, CRC(ecb06cfb) SHA1(e32613cac5583a0fecf04fca98796b91698e530c) )
r7772r7773
64246497   ROM_LOAD( "adatabin_0.bin",      0x00000, 0x100, CRC(f566e5e0) SHA1(754f04521b9eb73b34fe3de07e8f3679d1034870) )
64256498ROM_END
64266499
6500ROM_START( cb3c )
6501   ROM_REGION( 0x10000, "maincpu", 0 )
6502   ROM_LOAD( "27c512.bin", 0x00000, 0x10000, CRC(c42533cd) SHA1(d55b54b31c910d97418f400fc1ba78460c7183a9) )
64276503
6504   ROM_REGION( 0x20000, "gfx1", 0 )
6505   ROM_LOAD( "cbt1grk.bin", 0x00000, 0x20000, BAD_DUMP CRC(c6fdebc7) SHA1(736bbe5ae7b148e529f7cb80e9ae8903203c7869) )
64286506
6507   ROM_REGION( 0x08000, "gfx2", 0 )
6508   ROM_LOAD( "rbt1grb.bin", 0x00000, 0x8000, CRC(ed635dd7) SHA1(350a4b10ccfddcd6f3aaf748c15d585f0b9dc09b) )
6509
6510   ROM_REGION( 0x0200, "proms", 0 ) // wasn't in this set..
6511   ROM_LOAD( "82s147.u2",      0x00000, 0x0200, CRC(5c8f2b8f) SHA1(67d2121e75813dd85d83858c5fc5ec6ad9cc2a7d) )
6512ROM_END
6513
6514
64296515ROM_START( cmv801 )
64306516   ROM_REGION( 0x10000, "maincpu", 0 )
64316517   ROM_LOAD( "prg512",   0x0000, 0x10000, CRC(2f6e3fe9) SHA1(c5ffa51478a0dc2d8ff6a0f286cfb461011bb55d) )
r7772r7773
95639649GAME( 199?, cb3a,      ncb3,     ncb3,     cb3a,     0,         ROT0, "Dyna",              "Cherry Bonus III (ver.1.40, set 2)",          0 )
95649650GAME( 199?, cb3,       ncb3,     ncb3,     ncb3,     cb3,       ROT0, "Dyna",              "Cherry Bonus III (ver.1.40, encrypted)",      0 )
95659651GAME( 199?, cb3b,      ncb3,     cherrys,  ncb3,     cherrys,   ROT0, "Dyna",              "Cherry Bonus III (alt)",           0 )
9652GAME( 199?, cb3c,      ncb3,     cb3c,     chrygld,  cb3,       ROT0, "bootleg",           "Cherry Bonus III (alt, set 2)", GAME_NOT_WORKING)
95669653
95679654// cherry master hardware has a rather different mem map, but is basically the same
95689655GAME( 198?, cmv801,    0,        cm,       cmv801,   cm,        ROT0, "Corsica",           "Cherry Master (Corsica, ver.8.01)",           0 ) /* says ED-96 where the manufacturer is on some games.. */
src/mame/drivers/galaxian.c
r7772r7773
145145  bit 5 of IN1 is tested if "Cabinet" Dip Switch is set to "Cocktail".
146146
147147
148Notes about 'calipso' :
149---------------------
150
151  Calipso was apperantly redesigned for two player simultanious play.
152  There is code at $298a to flip the screen, but location $8669 has to be
153  set to 2. It's set to 1 no matter how many players are playing.
154  It's possible that there is a cocktail version of the game.
155
156
157Notes about 'moonwar' :
158---------------------
159
160  Moonwar: 8255 Port C bit 4 was originally designed so when bit4=0, 1P spinner
161  is selected, and when bit4=1, 2P spinner gets selected.  But they forgot to
162  change the 8255 initialization value and Port C was set to input, setting the
163  spinner select bit to HI regardless what was written to it. This bug has been
164  corrected in the newer set, but, to maintain hardware compatibility with
165  older PCB's, they had to reverse to active status of the select bit.  So in the
166  newer set, Bit4=1 selects the 1P spinner and Bit4=0 selects the 2P spinner.
167
168
169148Galaxian Bootleg Single Board Layout:
170149-------------------------------------
171150
r7772r7773
207186                                                                                            0
208187
209188
189Stephh's notes (based on the games Z80 code and some tests) for games based on 'scobra' MACHINE_DRIVER :
190
1911) 'scobra' and clones
192
1931a) 'scobra'
194
195  - Player 2 controls are used for player 2 regardless of the "Cabinet" Dip Switch.
196  - COIN1 and SERVICE1 share the same coinage while COIN2 always awards 3 credits per coin;
197    when "Coinage" is set to "99 Credits", credits are always set to 99 when pressing COIN1 (code at 0x037d).
198  - There is an unused coinage routine at 0x0159 with the following settings :
199
200    PORT_DIPNAME( 0x06, 0x00, DEF_STR( Coinage ) )
201    PORT_DIPSETTING(    0x00, "A 2/1  B 99" )
202    PORT_DIPSETTING(    0x06, "A 1/2  B 1/1" )
203    PORT_DIPSETTING(    0x04, "A 1/5  B 1/1" )
204    PORT_DIPSETTING(    0x02, "A 1/7  B 1/1" )
205
206    I can't tell at the moment if it's a leftover from another Konami game on similar hardware.
207  - You can have 3 or 4 lives at start, and you can only continue 4 times (code at 0x0ebf).
208
2091b) 'scobrase'
210
211  - The only difference in main CPU with 'scobra' is not in code but in data :
212      * data at 0x1323+ and 0x1575+ displays " (c) SEGA   1981 " instead of "(c) KONAMI   1981".
213      * data from 0x3d0c to 0x3fff has an unknown effect (this area is filled with 0xff in 'scobra').
214      * data from 0x5b62 to 0x5b6f displays "SEGA" instead of "OSAKA" on the first building in the "BASE"
215        (last) level ("KONAMI" is always still displayed on other buildings).
216    As the code is the same, comments from 'scobra' also apply to this set.
217  - Audio CPU is different than the one in 'scobra'. More investigation is needed !
218
2191c) 'scobras'
220
221  - Main CPU is different than the one in 'scobra', but audio CPU is the same as 'scobrase' !
222  - Player 2 controls are used for player 2 regardless of the "Cabinet" Dip Switch.
223  - COIN1 and SERVICE1 share the same coinage while COIN2 always awards 3 credits per coin;
224    when "Coinage" is set to "99 Credits", credits are always set to 99 when pressing COIN1 (code at 0x0bec).
225  - There is NO unused coinage routine.
226  - You can have 3 or 5 lives at start, and you can only continue 255 times (code at 0x00e3).
227  - On the first building in the "BASE" (last) level is written "STERN" instead of "OSAKA".
228
2291d) 'scobrab'
230
231  - The only difference in main CPU with 'scobras' is not in code but in data :
232      * data from 0x0434 to 0x043e affects the addresses in ROM area of the strings to display.
233      * data from 0x0456 to 0x07a0 affects the strings which are displayed (almost all of them).
234  - Audio CPU is the same as the one in 'scobra' (with different ROM names though).
235
2361e) 'suprheli'
237
238  - The only difference in main CPU with 'scobras' is not in code but in data :
239      * data at 0x0522+ displays "- SUPER HELI - " instead of "- SUPER COBRA -".
240      * data at 0x0547+ and 0x0799+ displays "                 " instead of "(c) STERN  1981  ".
241      * data from 0x5b26 to 0x5b32 displays "APPLE" instead of "STERN" on the first building in the "BASE"
242        (last) level.
243      * data from 0x5bbb to 0x5bc9 displays "ORANGE" instead of "KONAMI" on the other buildings in the "BASE"
244        (last) level.
245    As the code is the same, comments from 'scobras' also apply to this set.
246  - There is only ONE byte of difference with audio CPU in 'scobrase' :
247
248      Z:\MAME\data>fc /B epr1277.5e 9.9d
249      Comparaison des fichiers epr1277.5e et 9.9D
250      00001332: FD FF
251
252    Could it be a rotten bit ? As I have no evidence of this, I don't flag the ROM as BAD_DUMP.
253
2542) 'moonwar' and clones
255
256  - "8255 Port C bit 4 was originally designed so when bit4=0, 1P spinner is selected, and when bit4=1,
257    2P spinner gets selected.  But they forgot to change the 8255 initialization value and Port C was set
258    to input, setting the spinner select bit to HI regardless what was written to it. This bug has been
259    corrected in the newer set, but, to maintain hardware compatibility with older PCB's, they had to reverse
260    to active status of the select bit.  So in the newer set, Bit4=1 selects the 1P spinner and Bit4=0 selects
261    the 2P spinner".
262
2632a) 'moonwar'
264
265  - Press START1 when reseting the game to enter sort of inputs "test mode".
266  - "Hyperflip" button is ignored when "Cabinet" is set to "Cocktail" (code at 0x108d).
267  - When in "Free Play" mode, you only 3 lives at start.
268
2692b) 'moonwara'
270
271  - Press START1 when reseting the game to enter sort of inputs "test mode".
272  - "Hyperflip" button is ignored when "Cabinet" is set to "Cocktail" (code at 0x107f).
273  - Besides the spinner bug, coinage is very weird in this set (no correlation between COIN1 and COIN2).
274
2753) 'armorcar' and clones
276
2773a) 'armorcar'
278
279  - Press P2 BUTTON2 when reseting the game to enter sort of inputs "test mode".
280    You'll notice that there is some leftover code from 'moonwar' as you can see 2 (muxed) PORT A
281    (and there are still writes to PORT C bit 4). This has no effect in the game though.
282  - After the 3 ports are read, when "Cabinet" is set to "Cocktail" and its player 2 turn, player 2 inputs
283    are "copied" into player 1 ones (code at 0x0fd2 : start reading inputs).
284
2853b) 'armorcar2'
286
287  - When IN1 bit 2 is ON when reseting the game, you enter sort of inputs "test mode".
288    You'll notice that there is some leftover code from 'moonwar' as you can see 2 (muxed) PORT A
289    (and there are still writes to IN2 bit 4). This has no effect in the game though.
290    As this bit is marked as "unused" (see below why), you can never access to this "test mode".
291  - IN2 bit 3 has no real effect in this set : even if contents of 0x8627 is updated each time player changes,
292    screen flipping (0xa806 and 0xa807) is always set to "normal" (0x00 * 2) due to code at 0x0598, there is a
293    missing call to 0x0abf at 0x0a8c (there is even a 'ret' for call from 0x15aa), and there is no code to "copy"
294    player 2 inputs into player 1 ones (code at 0x0fb2 : start reading inputs).
295    There is still a leftover from 'armorcar' code, so this bit affects display (how ?) when IN2 bit 3 is ON
296    and it is player 2 turn (code at 0x0b66 is the same as the one at 0x0b87 in 'armorcar').
297
2984) 'tazmania'
299
300  - Press P1 BUTTON2 when reseting the game to enter sort of inputs "test mode".
301  - After the 3 ports are read, when "Cabinet" is set to "Cocktail" and its player 2 turn, player 2 inputs
302    are "copied" into player 1 ones (code at 0x124e : start reading inputs).
303  - When "Cabinet" is set to "Upright", press any player 2 joystick direction to end current level
304    (code at 0x38dd). This trick does NOT work in bonus rooms though.
305
3065) 'anteater'
307
308  - Press P1 BUTTON1 when reseting the game to enter sort of inputs "test mode".
309  - IN2 bit 3 has no effect in this set : even if contents of 0x86c4 is updated each time player changes,
310    screen flipping (0xa806 and 0xa807) is always reset to "normal" (0x00 * 2) after possible screen inversion
311    due to code at 0x05c7, and there is no code to "copy" player 2 inputs into player 1 ones (code at 0x0f7a :
312    start reading inputs).
313
3146) 'calipso'
315
316  - Press P1 BUTTON1 when reseting the game to enter sort of inputs "test mode".
317  - Press P1 BUTTON1 to start a 1 player game or press P2 BUTTON1 to start a 2 players game ("Team-Play").
318  - IN2 bit 3 has no effect in this set : even if there is code to "copy" player 2 inputs into player 1 ones
319    (code at 0x1448 : start reading inputs), contents of 0x8669 is always set to 0x01 regardless of number players
320    and is NEVER updated (there is even no code for this). Furthermore, the screen flipping routine forces the
321    screen to be "normal" ([0xa806] = [0xa807] = 0x00) because of the 'jr' instruction at 0x2988.
322    It's possible that there is a cocktail version of the game, but I'm not really convinced about it.
323
3247) 'losttomb' and clones
325
3267a) 'losttomb'
327
328  - Press P1 right joystick UP when reseting the game to enter sort of inputs "test mode".
329  - There is no "Cabinet" Dip Switch for this game and no possible muxed input for a 2nd player.
330    Furthermore, the routine at 0x254b is NEVER called, so the screen NEVER flips !
331  - The routine that reads inputs (code at 0x0ef4) behaves differently if you are in "attract mode" or not :
332      * when playing ([0x865f] = 0x00), it reads the 3 inputs ports
333      * when in "attract mode" ([0x865f] = 0xff), it only reads IN0 (to get status of COINn and STARTn)
334        and IN1 (to get the status of the "Lives" Dip Switch), and IN2 is completely ignored
335    The side effect of such thing is that the status of the "Demo Sounds" Dip Switch will be taken into
336    consideration only after a game has been played (for example, the game will always be silenced in
337    "attract mode" after resetting the machine because 0x00 is stored at 0x8613 during initialisation).
338  - When in "Free Play" mode, you only 3 lives at start.
339
3407b) 'losttombh'
341
342  - The only difference with 'losttomb' is not in code but in data :
343
344      Z:\MAME\data>fc /B 2h-easy lthard
345      Comparaison des fichiers 2h-easy et LTHARD
346      00000399: 0A 0B
347      0000039E: 0D 11
348      000003A3: 0F 14
349      000003A8: 13 19
350      000003AD: 15 1A
351      000003B2: 18 1B
352      000003B7: 1A 1C
353      000003BC: 1B 1D
354      000003C1: 1C 1E
355      000003C6: 1D 1F
356      000003CB: 1E 20
357      000003D0: 1F 21
358      000003D5: 20 22
359      000003D9: 03 05
360      000003E6: 0E 10
361      000003F0: 12 15
362      000003FD: 14 17
363      00000409: 0E 10
364      00000415: 0E 10
365      0000099B: AA 76    altered value to please the checksum routine
366
367    So the game is harder, but it has the same ingame bugs as 'losttomb'.
368
3698) 'spdcoin'
370
371  - Press START1 or START2 when reseting the game to enter sort of inputs "test mode" (in fact, only IN0 is tested).
372    Press BOTH START1 and START2 to exit from it.
373  - Press START1 + START2 + P1 joystick LEFT when reseting the game to display some statistics (code at 0x0226).
374    Release BOTH START1 and START2 to exit this screen.
375
3769) 'superbon'
377
378  - This game is heavily based on 'losttomb', so not surprisingly is the code similar.
379  - The main difference in terms of gameplay is that you only have 1 joystick to control your character
380    and that you shoot in the direction you are running unless you press the "HOLD" button.
381  - There are no tests at startup and it's not possible to enter sort of inputs "test mode" (even if code exists)
382    by pressing P1 joystick UP because of 'jump' instruction at 0x007d. If you try to check the ROMS, you'll
383    notice that they have the same name as in 'losttomb' and that they fail the checksum routines.
384  - There is no "Cabinet" Dip Switch for this game and no possible muxed input for a 2nd player.
385    Furthermore, the routine at 0x2a48 is NEVER called, so the screen NEVER flips !
386  - The routine that reads inputs (code at 0x0eb7) behaves differently if you are in "attract mode" or not :
387      * when playing ([0x8667] = 0x00), it reads the 3 inputs ports
388      * when in "attract mode" ([0x8667] = 0xff), it only reads IN0 (to get status of COINn and STARTn)
389        and IN1 (to get the status of the "Lives" Dip Switch), and IN2 is completely ignored
390    The side effect of such thing is that the status of the "Demo Sounds" Dip Switch will be taken into
391    consideration only after a game has been played (for example, the game will always be silenced in
392    "attract mode" after resetting the machine because 0x00 is stored at 0x8613 during initialisation).
393  - When in "Free Play" mode, you only 3 lives at start.
394
395
396
397
210398TO DO :
211399-------
212400
r7772r7773
10911279}
10921280
10931281
1094static READ8_DEVICE_HANDLER( moonwar_input_port_0_r )
1095{
1096   // see http://www.cityofberwyn.com/schematics/stern/MoonWar_opto.tiff for schematic
1097   // I.e. a 74ls161 counts from 0 to 15 which is the absolute number of bars passed on the quadrature
1098   signed char dialread = (moonwar_port_select ? input_port_read(device->machine, "IN3") : input_port_read(device->machine, "IN4"));
1099   static int counter_74ls161 = 0;
1100   static int direction = 0;
1101   UINT8 ret;
1102   UINT8 buttons = (input_port_read(device->machine,"IN0")&0xe0);
1103   if (dialread < 0) direction = 0;
1104   else if (dialread > 0) direction = 0x10;
1105   counter_74ls161 += abs(dialread);
1106   counter_74ls161 &= 0xf;
1107   ret = counter_74ls161 | direction | buttons;
1108   //fprintf(stderr, "dialread1: %02x, counter_74ls161: %02x, spinner ret is %02x\n", dialread, counter_74ls161, ret);
1109   return ret;
1110}
1111
1112
11131282static const ppi8255_interface moonwar_ppi8255_0_intf =
11141283{
1115   DEVCB_HANDLER(moonwar_input_port_0_r),   /* Port A read */
1284   DEVCB_INPUT_PORT("IN0"),            /* Port A read */
11161285   DEVCB_INPUT_PORT("IN1"),            /* Port B read */
11171286   DEVCB_INPUT_PORT("IN2"),            /* Port C read */
11181287   DEVCB_NULL,                        /* Port A write */
src/mame/drivers/cb2001.c
r7772r7773
4646#define xxxx 0x90 /* Unknown */
4747
4848static const UINT8 cb2001_decryption_table[256] = {
49   0xe8,xxxx,xxxx,xxxx,0x80,xxxx,0x12,0x27, 0x3c,xxxx,xxxx,0x23,xxxx,xxxx,xxxx,0x5f, /* 00 */
50//    pppp                pppp      pppp p?p?  pppp           pppp                pppp
49   0xe8,xxxx,xxxx,xxxx,0x80,0xe4,0x12,0x27, 0x3c,xxxx,xxxx,0x23,xxxx,xxxx,xxxx,0x5f, /* 00 */
50//    pppp                pppp ???? pppp p?p?  pppp           pppp                pppp
5151   xxxx,xxxx,xxxx,0x27,0x1c,xxxx,xxxx,xxxx, 0x32,xxxx,0xa0,0xd3,0x3a,0x14,0x89,0x1f, /* 10 */
5252//                   p?p? pppp                 pppp      pppp pppp pppp pppp pppp pppp
5353   xxxx,0x8e,xxxx,0x0f,xxxx,0x49,0xb5,xxxx, 0x56,xxxx,xxxx,0x75,0x33,0xb6,xxxx,xxxx, /* 20 */
5454//         !!!!      pppp      pppp pppp       pppp           pppp pppp pppp
55   xxxx,xxxx,xxxx,xxxx,xxxx,0x0a,0x5b,xxxx, xxxx,xxxx,0x74,xxxx,xxxx,0xa6,xxxx,0x74, /* 30 */
55   xxxx,xxxx,xxxx,xxxx,xxxx,0x22,0x5b,xxxx, xxxx,xxxx,0x74,xxxx,xxxx,0xa6,xxxx,0x74, /* 30 */
5656//                             ???? pppp                 ????           pppp      pppp
5757   xxxx,0xea,xxxx,xxxx,0xd0,0xb0,0x5e,xxxx, xxxx,0xa2,xxxx,xxxx,0xa3,xxxx,xxxx,0xb3, /* 40 */
5858//         !!!!           ???? gggg pppp            pppp           pppp           pppp
5959   0x2b,xxxx,0x2c,xxxx,0x9d,xxxx,0x42,0xc0, xxxx,xxxx,xxxx,xxxx,0xeb,0xab,xxxx,xxxx, /* 50 */
6060//    ????      pppp      ????      pppp pppp                      pppp pppp
61   xxxx,xxxx,xxxx,xxxx,0x22,xxxx,xxxx,xxxx, 0xa1,0xa5,xxxx,xxxx,xxxx,0xbb,0xba,xxxx, /* 60 */
61   xxxx,xxxx,xxxx,xxxx,0x0a,xxxx,xxxx,xxxx, 0xa1,0xa5,xxxx,xxxx,xxxx,0xbb,0xba,xxxx, /* 60 */
6262//                        pppp                 pppp pppp                pppp gggg
6363   0xc3,0x53,0x02,0x58,xxxx,xxxx,0x24,xxxx, 0x72,xxxx,0xf3,xxxx,xxxx,0x43,xxxx,xxxx, /* 70 */
6464//    pppp pppp pppp pppp           pppp       pppp      pppp           pppp
r7772r7773
6666//    pppp                     pppp ???? pppp            pppp      pppp      ????
6767   xxxx,xxxx,0xe9,xxxx,xxxx,0xbe,xxxx,xxxx, xxxx,xxxx,0x57,xxxx,0xb9,xxxx,0xbf,xxxx, /* 90 */
6868//              pppp           pppp                      pppp      pppp      pppp
69   0xc1,xxxx,0xe6,0x06,0xaa,0x9c,0xad,0xb8, 0x4e,xxxx,0xdb,0x50,0x51,0xa4,xxxx,0x1a, /* A0 */
70//    ????      pppp pppp pppp ???? pppp !!!!  pppp      vvvv pppp pppp pppp      pppp
71   0xac,xxxx,0xb4,xxxx,xxxx,0x83,xxxx,xxxx, xxxx,xxxx,0x03,xxxx,0x1e,xxxx,0x07,0xcf, /* B0 */
72//    pppp      pppp           pppp                      pppp      pppp      pppp pppp
69   0xc1,xxxx,0xe6,0x06,0xaa,0x9c,0xad,0xb8, 0x4e,xxxx,0x8d,0x50,0x51,0xa4,xxxx,0x1a, /* A0 */
70//    ????      pppp pppp pppp ???? pppp !!!!  pppp      pppp pppp pppp pppp      pppp
71   0xac,xxxx,0xb4,xxxx,xxxx,0x83,xxxx,xxxx, xxxx,0x13,0x03,xxxx,0x1e,xxxx,0x07,0xcf, /* B0 */
72//    pppp      pppp           pppp                 ???? pppp      pppp      pppp pppp
7373   xxxx,0xec,0xee,xxxx,xxxx,0xe2,0x87,xxxx, xxxx,xxxx,0x76,0x61,xxxx,xxxx,0x2e,xxxx, /* C0 */
7474//         pppp pppp           pppp pppp                 pppp ????           pppp
75   xxxx,xxxx,0x46,xxxx,0x60,xxxx,0x4f,0x47, 0x88,xxxx,xxxx,xxxx,xxxx,0xfa,0xc7,0x8b, /* D0 */
76//              pppp      ????      pppp pppp  pppp                     ???? !!!! pppp
75   xxxx,0xf3,0x46,xxxx,0x60,xxxx,0x4f,0x47, 0x88,xxxx,xxxx,xxxx,xxxx,0xfa,0xc7,0x8b, /* D0 */
76//         ???? pppp      ????      pppp pppp  pppp                     ???? !!!! pppp
7777   0x8a,0xb1,xxxx,0xc6,xxxx,0x5a,xxxx,xxxx, xxxx,0x52,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, /* E0 */
7878//    pppp gggg      !!!!      ????            pppp ????
79   xxxx,xxxx,0xfe,xxxx,xxxx,xxxx,xxxx,0x2a, xxxx,xxxx,xxxx,xxxx,0x81,xxxx,xxxx,xxxx, /* F0 */
80//              pppp                     ????                      ????
79   xxxx,0xae,0xfe,xxxx,xxxx,xxxx,xxxx,0x2a, xxxx,xxxx,0x1c,xxxx,0x81,xxxx,xxxx,xxxx, /* F0 */
80//         ???? pppp                     ????            ????      ????
8181};
8282
8383/* robiza's notes:
r7772r7773
9494e0091 23 26             cmp4s
9595e0093 78 03             bc e0098
9696
97probably "aa" is an undocumented opcode
97aa -> 8d
9898
99991) aa 1e ## ## -> bb mov bw,####
100100_     1e ## ## -> 89 mov
src/mame/drivers/subsino.c
r7772r7773
20592059   ROM_LOAD( "sn82s129an.u13", 0x200, 0x100, CRC(0ef5f218) SHA1(a02cf266661385aa078563bd83240d36549c1cf0) )
20602060ROM_END
20612061
2062
2063ROM_START( sharkpye )
2064   ROM_REGION( 0x14000, "maincpu", 0 )
2065   ROM_LOAD( "sharkpye.u18", 0x0a000, 0x6000, CRC(12473814) SHA1(9c24ed41781aefee0161add912e730ba0d4f4d3e) )
2066   ROM_CONTINUE(0x0000, 0xa000)
2067
2068
2069   ROM_REGION( 0x40000, "tilemap", 0 )
2070   ROM_LOAD( "sharkpye.u16", 0x00000, 0x08000, CRC(90862185) SHA1(9d632bfa707d3449a87d7f370eb2b5c36e61aadd) )
2071   ROM_CONTINUE(              0x10000, 0x08000 )
2072   ROM_CONTINUE(              0x08000, 0x08000 )
2073   ROM_CONTINUE(              0x18000, 0x08000 )
2074   ROM_LOAD( "sharkpye.u17", 0x20000, 0x08000, CRC(b7b6119a) SHA1(b61c77d2170d96fcb39ea31c4136387441b9037f) )
2075   ROM_CONTINUE(              0x30000, 0x08000 )
2076   ROM_CONTINUE(              0x28000, 0x08000 )
2077   ROM_CONTINUE(              0x38000, 0x08000 )
2078
2079   ROM_REGION( 0x40000, "oki", 0 )
2080   ROM_LOAD( "sharkpye.u54", 0x00000, 0x20000, CRC(9f384c59) SHA1(d2b087b8370b40b6f0944de661ea6aebaebea06f) )
2081
2082   ROM_REGION( 0x300, "proms", 0 )
2083   ROM_LOAD( "n82s129an.u11", 0x000, 0x100, CRC(daf3657a) SHA1(93005938e2d60d54e7bbf1e234bba3802ee1af21) )
2084   ROM_LOAD( "n82s129an.u12", 0x100, 0x100, CRC(5a7a25ed) SHA1(eebd679195e6ea50f64f3c46cd06ee21a1550491) )
2085   ROM_LOAD( "n82s129an.u13", 0x200, 0x100, CRC(0ef5f218) SHA1(a02cf266661385aa078563bd83240d36549c1cf0) )
2086ROM_END
2087
20622088/***************************************************************************
20632089
20642090Super Rider (Italy Ver 1.6)
r7772r7773
22112237}
22122238#endif
22132239
2240unsigned char victor5_xors[8] =  { 0x99, 0x99, 0x33, 0x44, 0xbb, 0x88, 0x88, 0xbb };
2241unsigned char victor21_xors[8] = { 0x44, 0xbb, 0x66, 0x44, 0xaa, 0x55, 0x88, 0x22 };
2242unsigned char crsbingo_xors[8] = { 0xbb, 0xcc, 0xcc, 0xdd, 0xaa, 0x11, 0x44, 0xee };
2243unsigned char sharkpy_xors[8] =  { 0xcc, 0xaa, 0x66, 0xaa, 0xee, 0x33, 0xff, 0xff };
22142244
2215static DRIVER_INIT( victor5 )
2245
2246void victor5_bitswaps(UINT8* decrypt, int i)
22162247{
2217   unsigned char xors[8] = { 0x99, 0x99, 0x33, 0x44, 0xBB, 0x88, 0x88, 0xBB };
2218   int i;
2219   UINT8 *decrypt = auto_alloc_array(machine, UINT8, 0x10000);
2220   UINT8* region = memory_region(machine,"maincpu");
2248   if ((i&7) == 0) decrypt[i] = BITSWAP8(decrypt[i],7,2,5,4,3,6,1,0);
2249   if ((i&7) == 1) decrypt[i] = BITSWAP8(decrypt[i],7,6,5,0,3,2,1,4);
2250   if ((i&7) == 2) decrypt[i] = BITSWAP8(decrypt[i],7,2,1,0,3,6,5,4);
2251   if ((i&7) == 3) decrypt[i] = BITSWAP8(decrypt[i],7,2,1,0,3,6,5,4);
2252   if ((i&7) == 4) decrypt[i] = BITSWAP8(decrypt[i],3,2,1,0,7,6,5,4);
2253   if ((i&7) == 5) decrypt[i] = BITSWAP8(decrypt[i],7,6,5,0,3,2,1,4);
2254   if ((i&7) == 6) decrypt[i] = BITSWAP8(decrypt[i],3,6,1,0,7,2,5,4);
2255   if ((i&7) == 7) decrypt[i] = BITSWAP8(decrypt[i],7,2,1,4,3,6,5,0);
2256}
22212257
2222   for (i=0;i<0x10000;i++)
2223   {
2224      if (i<0xc000)
2225      {
2226         decrypt[i] = region[i]^xors[i&7];
22272258
2228         if ((i&7) == 0) decrypt[i] = BITSWAP8(decrypt[i],7,2,5,4,3,6,1,0);
2229         if ((i&7) == 1) decrypt[i] = BITSWAP8(decrypt[i],7,6,5,0,3,2,1,4);
2230         if ((i&7) == 2) decrypt[i] = BITSWAP8(decrypt[i],7,2,1,0,3,6,5,4);
2231         if ((i&7) == 3) decrypt[i] = BITSWAP8(decrypt[i],7,2,1,0,3,6,5,4);
2232         if ((i&7) == 4) decrypt[i] = BITSWAP8(decrypt[i],3,2,1,0,7,6,5,4);
2233         if ((i&7) == 5) decrypt[i] = BITSWAP8(decrypt[i],7,6,5,0,3,2,1,4);
2234         if ((i&7) == 6) decrypt[i] = BITSWAP8(decrypt[i],3,6,1,0,7,2,5,4);
2235         if ((i&7) == 7) decrypt[i] = BITSWAP8(decrypt[i],7,2,1,4,3,6,5,0);
2236      }
2237      else
2238      {
2239         decrypt[i] = region[i];
2240      }
2241   }
2259void victor21_bitswaps(UINT8* decrypt, int i)
2260{
2261   if ((i&7) == 0) decrypt[i] = BITSWAP8(decrypt[i],7,2,1,0,3,6,5,4);
2262   if ((i&7) == 1) decrypt[i] = BITSWAP8(decrypt[i],3,6,1,4,7,2,5,0);
2263   if ((i&7) == 2) decrypt[i] = BITSWAP8(decrypt[i],3,2,1,4,7,6,5,0);
2264   if ((i&7) == 3) decrypt[i] = BITSWAP8(decrypt[i],7,2,5,4,3,6,1,0);
2265   if ((i&7) == 4) decrypt[i] = BITSWAP8(decrypt[i],7,2,5,4,3,6,1,0);
2266   if ((i&7) == 5) decrypt[i] = BITSWAP8(decrypt[i],3,6,5,0,7,2,1,4);
2267   if ((i&7) == 6) decrypt[i] = BITSWAP8(decrypt[i],7,6,5,4,3,2,1,0);
2268   if ((i&7) == 7) decrypt[i] = BITSWAP8(decrypt[i],3,2,1,4,7,6,5,0);
2269}
22422270
2243//  dump_decrypted(machine, decrypt);
2271void crsbingo_bitswaps(UINT8* decrypt, int i)
2272{
2273   if ((i&7) == 0) decrypt[i] = BITSWAP8(decrypt[i],7,2,5,4,3,6,1,0);
2274   if ((i&7) == 1) decrypt[i] = BITSWAP8(decrypt[i],7,2,1,0,3,6,5,4);
2275   if ((i&7) == 2) decrypt[i] = BITSWAP8(decrypt[i],3,2,5,0,7,6,1,4);
2276   if ((i&7) == 3) decrypt[i] = BITSWAP8(decrypt[i],7,2,5,0,3,6,1,4);
2277   if ((i&7) == 4) decrypt[i] = BITSWAP8(decrypt[i],7,6,5,0,3,2,1,4);
2278   if ((i&7) == 5) decrypt[i] = BITSWAP8(decrypt[i],7,2,1,4,3,6,5,0);
2279   if ((i&7) == 6) decrypt[i] = BITSWAP8(decrypt[i],7,2,1,0,3,6,5,4);
2280   if ((i&7) == 7) decrypt[i] = BITSWAP8(decrypt[i],3,2,1,0,7,6,5,4);
2281}
22442282
2245   memcpy(region, decrypt, 0x10000);
2283void sharkpy_bitswaps(UINT8* decrypt, int i)
2284{
2285   if ((i&7) == 0) decrypt[i] = BITSWAP8(decrypt[i],3,2,1,0,7,6,5,4);
2286   if ((i&7) == 1) decrypt[i] = BITSWAP8(decrypt[i],7,2,5,4,3,6,1,0);
2287   if ((i&7) == 2) decrypt[i] = BITSWAP8(decrypt[i],7,2,1,4,3,6,5,0);
2288   if ((i&7) == 3) decrypt[i] = BITSWAP8(decrypt[i],3,6,1,0,7,2,5,4);
2289   if ((i&7) == 4) decrypt[i] = BITSWAP8(decrypt[i],7,2,5,4,3,6,1,0);
2290   if ((i&7) == 5) decrypt[i] = BITSWAP8(decrypt[i],3,2,5,4,7,6,1,0);
2291   if ((i&7) == 6) decrypt[i] = BITSWAP8(decrypt[i],7,6,1,4,3,2,5,0);
2292   if ((i&7) == 7) decrypt[i] = BITSWAP8(decrypt[i],3,6,1,4,7,2,5,0);
22462293}
22472294
2248static DRIVER_INIT( victor21 )
2295void subsino_decrypt(running_machine* machine, void (*bitswaps)(UINT8* decrypt, int i), UINT8* xors, int size)
22492296{
2250   unsigned char xors[8] = { 0x44, 0xBB, 0x66, 0x44, 0xAA, 0x55, 0x88, 0x22 };
22512297   int i;
22522298   UINT8 *decrypt = auto_alloc_array(machine, UINT8, 0x10000);
22532299   UINT8* region = memory_region(machine,"maincpu");
22542300
22552301   for (i=0;i<0x10000;i++)
22562302   {
2257      if (i<0xc000)
2303      if (i<size)
22582304      {
22592305         decrypt[i] = region[i]^xors[i&7];
2260
2261         if ((i&7) == 0) decrypt[i] = BITSWAP8(decrypt[i],7,2,1,0,3,6,5,4);
2262         if ((i&7) == 1) decrypt[i] = BITSWAP8(decrypt[i],3,6,1,4,7,2,5,0);
2263         if ((i&7) == 2) decrypt[i] = BITSWAP8(decrypt[i],3,2,1,4,7,6,5,0);
2264         if ((i&7) == 3) decrypt[i] = BITSWAP8(decrypt[i],7,2,5,4,3,6,1,0);
2265         if ((i&7) == 4) decrypt[i] = BITSWAP8(decrypt[i],7,2,5,4,3,6,1,0);
2266         if ((i&7) == 5) decrypt[i] = BITSWAP8(decrypt[i],3,6,5,0,7,2,1,4);
2267         if ((i&7) == 6) decrypt[i] = BITSWAP8(decrypt[i],7,6,5,4,3,2,1,0);
2268         if ((i&7) == 7) decrypt[i] = BITSWAP8(decrypt[i],3,2,1,4,7,6,5,0);
2306         bitswaps(decrypt, i);
22692307      }
22702308      else
22712309      {
22722310         decrypt[i] = region[i];
22732311      }
22742312   }
2275
22762313//  dump_decrypted(machine, decrypt);
2277
22782314   memcpy(region, decrypt, 0x10000);
22792315}
22802316
2281static DRIVER_INIT( crsbingo )
2282{
2283   unsigned char xors[8] = { 0x44, 0x33, 0x33, 0x22, 0x55, 0xEE, 0xBB, 0x11 };
2284   int i;
2285   UINT8 *decrypt = auto_alloc_array(machine, UINT8, 0x10000);
2286   UINT8* region = memory_region(machine,"maincpu");
22872317
2288   for (i=0;i<0x10000;i++)
2289   {
2290      if (i<0xc000)
2291      {
2292         decrypt[i] = region[i]^xors[i&7]^0xff;
22932318
2294         if ((i&7) == 0) decrypt[i] = BITSWAP8(decrypt[i],7,2,5,4,3,6,1,0);
2295         if ((i&7) == 1) decrypt[i] = BITSWAP8(decrypt[i],7,2,1,0,3,6,5,4);
2296         if ((i&7) == 2) decrypt[i] = BITSWAP8(decrypt[i],3,2,5,0,7,6,1,4);
2297         if ((i&7) == 3) decrypt[i] = BITSWAP8(decrypt[i],7,2,5,0,3,6,1,4);
2298         if ((i&7) == 4) decrypt[i] = BITSWAP8(decrypt[i],7,6,5,0,3,2,1,4);
2299         if ((i&7) == 5) decrypt[i] = BITSWAP8(decrypt[i],7,2,1,4,3,6,5,0);
2300         if ((i&7) == 6) decrypt[i] = BITSWAP8(decrypt[i],7,2,1,0,3,6,5,4);
2301         if ((i&7) == 7) decrypt[i] = BITSWAP8(decrypt[i],3,2,1,0,7,6,5,4);
2302      }
2303      else
2304      {
2305         decrypt[i] = region[i];
2306      }
2307   }
2319static DRIVER_INIT( victor5 )
2320{
2321   subsino_decrypt(machine, victor5_bitswaps, victor5_xors, 0xc000);
2322}
23082323
2309//  dump_decrypted(machine, decrypt);
2324static DRIVER_INIT( victor21 )
2325{
2326   subsino_decrypt(machine, victor21_bitswaps, victor21_xors, 0xc000);
2327}
23102328
2311   memcpy(region, decrypt, 0x10000);
2329static DRIVER_INIT( crsbingo )
2330{
2331   subsino_decrypt(machine, crsbingo_bitswaps, crsbingo_xors, 0xc000);
23122332}
23132333
23142334static DRIVER_INIT( sharkpy )
23152335{
2316   unsigned char xors[8] = { 0x33, 0x55, 0x99, 0x55, 0x11, 0xCC, 0x00, 0x00 };
2317   int i;
2318   UINT8 *decrypt = auto_alloc_array(machine, UINT8, 0x10000);
2319   UINT8* region = memory_region(machine,"maincpu");
2336   subsino_decrypt(machine, sharkpy_bitswaps, sharkpy_xors, 0xa000);
2337}
23202338
2321   for (i=0;i<0x10000;i++)
2322   {
2323      if (i<0xa000)
2324      {
2325         decrypt[i] = region[i]^xors[i&7]^0xff;
2326         if ((i&7) == 0) decrypt[i] = BITSWAP8(decrypt[i],3,2,1,0,7,6,5,4);
2327         if ((i&7) == 1) decrypt[i] = BITSWAP8(decrypt[i],7,2,5,4,3,6,1,0);
2328         if ((i&7) == 2) decrypt[i] = BITSWAP8(decrypt[i],7,2,1,4,3,6,5,0);
2329         if ((i&7) == 3) decrypt[i] = BITSWAP8(decrypt[i],3,6,1,0,7,2,5,4);
2330         if ((i&7) == 4) decrypt[i] = BITSWAP8(decrypt[i],7,2,5,4,3,6,1,0);
2331         if ((i&7) == 5) decrypt[i] = BITSWAP8(decrypt[i],3,2,5,4,7,6,1,0);
2332         if ((i&7) == 6) decrypt[i] = BITSWAP8(decrypt[i],7,6,1,4,3,2,5,0);
2333         if ((i&7) == 7) decrypt[i] = BITSWAP8(decrypt[i],3,6,1,4,7,2,5,0);
2334      }
2335      else
2336      {
2337         decrypt[i] = region[i];
2338      }
2339   }
2340
2341//  dump_decrypted(machine, decrypt);
2342
2343   memcpy(region, decrypt, 0x10000);
2339static DRIVER_INIT( sharkpye )
2340{
2341   subsino_decrypt(machine, victor5_bitswaps, victor5_xors, 0xa000);
23442342}
23452343
23462344static DRIVER_INIT( smoto20 )
r7772r7773
23712369
23722370/*     YEAR  NAME      PARENT    MACHINE   INPUT     INIT      ROT    COMPANY            FULLNAME                    FLAGS              LAYOUT      */
23732371GAMEL( 1990, victor21, 0,        victor21, victor21, victor21, ROT0, "Subsino / Buffy", "Victor 21",                 0,                 layout_victor21 )
2374GAMEL( 1991, victor5,  0,        victor5,  victor5,  victor5,  ROT0, "Subsino",         "Victor 5",                  0,                 layout_victor5 ) // board sticker says Victor 5, in-game says G.E.A with no manufacturer info?
2372GAMEL( 1991, victor5,  0,        victor5,  victor5,  victor5,  ROT0, "Subsino",         "G.E.A.",                  0,                 layout_victor5 ) // PCB black-box was marked 'victor 5' - in-game says G.E.A with no manufacturer info?
23752373GAMEL( 1991, tisub,    0,        tisub,    tisub,    tisub,    ROT0, "Subsino",         "Treasure Island (Subsino)", GAME_WRONG_COLORS, layout_tisub )
2376GAMEL( 1991, crsbingo, 0,        crsbingo, crsbingo, crsbingo, ROT0, "Subsino",         "Poker Carnival",            0,                 layout_crsbingo ) // alt version of Cross Bingo?
2374GAMEL( 1991, crsbingo, 0,        crsbingo, crsbingo, crsbingo, ROT0, "Subsino",         "Poker Carnival",            0,                 layout_crsbingo )
23772375GAMEL( 1996, sharkpy,  0,        sharkpy,  sharkpy,  sharkpy,  ROT0, "Subsino",         "Shark Party (Italy, v1.3)", 0,                 layout_sharkpy ) // missing POST messages?
23782376GAMEL( 1996, sharkpya, sharkpy,  sharkpy,  sharkpy,  sharkpy,  ROT0, "Subsino",         "Shark Party (Italy, v1.6)", 0,                 layout_sharkpy ) // missing POST messages?
2377GAMEL( 1995, sharkpye, sharkpy,  sharkpy,  sharkpy,  sharkpye,  ROT0, "Alpha",           "Shark Party (English, Alpha license)", 0,                     layout_sharkpy ) // PCB black-box was marked 'victor 6'
23792378GAMEL( 1996, smoto20,  0,        srider,   smoto20,  smoto20,  ROT0, "Subsino",         "Super Rider (Italy, v2.0)", 0,                 layout_smoto )
23802379GAMEL( 1996, smoto16,  smoto20,  srider,   smoto16,  smoto16,  ROT0, "Subsino",         "Super Moto (Italy, v1.6)",  0,                 layout_smoto )
src/mame/drivers/tmaster.c
r7772r7773
14101410
14111411***************************************************************************/
14121412
1413// " According to the Distributor notice from Midway, the only thing updated was the "Power Cell" game to 'improve the performance'. "
14131414ROM_START( tm8k )
14141415   ROM_REGION( 0x200000, "maincpu", 0 ) // 68000 Code
14151416   ROM_LOAD16_BYTE( "tm8k_v904.u51", 0x000000, 0x100000, CRC(28864ec8) SHA1(e703f9ee350dd915102e784bbd04445a95b7d0a5) ) /* TOUCHMASTER 8000 U51 DOMESTIC 9.04 (Standard 04/25/00) */
r7772r7773
14271428   ROM_LOAD( "tm8k_sound.u8", 0x00000, 0x100000, CRC(c6070a60) SHA1(2dc20bf2217a36374b5a691133ad43f53dbe29ca) ) /* Mask rom labeled 5341-16513-03 U8 SOUND */
14281429ROM_END
14291430
1431ROM_START( tm8k902 )
1432   ROM_REGION( 0x200000, "maincpu", 0 ) // 68000 Code
1433   ROM_LOAD16_BYTE( "tm8k_v902.u51", 0x000000, 0x100000, CRC(c0d95b2c) SHA1(2240d969047ada856ec2fac6cdf72db722753a6d) ) /* TOUCHMASTER 8000 U51 DOMESTIC 9.02 (Standard 03/17/00) */
1434   ROM_LOAD16_BYTE( "tm8k_v902.u52", 0x000001, 0x100000, CRC(5194c1b5) SHA1(28a91d12a022927bfe96afd62b30b268c0ced3ea) ) /* TOUCHMASTER 8000 U52 DOMESTIC 9.02 (Standard 03/17/00) */
1435
1436   ROM_REGION( 0x600000, "blitter", 0 )   // Blitter gfx
1437   ROM_LOAD16_BYTE( "tm8k_graphic.u38", 0x000000, 0x100000, CRC(2a971d46) SHA1(6ca4067e9fa40053df415e670b2e853915319dbb) ) /* Mask rom labeled 5341-16513-07 U38 VIDEO IMAGE */
1438   ROM_LOAD16_BYTE( "tm8k_graphic.u36", 0x000001, 0x100000, CRC(3bde285e) SHA1(87bf60034665542fb0240b7479adfffb7ba9fad7) ) /* Mask rom labeled 5341-16513-06 U36 VIDEO IMAGE */
1439   ROM_LOAD16_BYTE( "tm8k_graphic.u39", 0x200000, 0x100000, CRC(58c6c1d8) SHA1(cc11863c4ea46bde7ea4775075f4328be6d6c6d1) ) /* Mask rom labeled 5341-16513-05 U39 VIDEO IMAGE */
1440   ROM_LOAD16_BYTE( "tm8k_graphic.u37", 0x200001, 0x100000, CRC(c0992f7a) SHA1(e4e1ef2414f2f0a784c775f39123122c08950403) ) /* Mask rom labeled 5341-16513-04 U37 VIDEO IMAGE */
1441   ROM_LOAD16_BYTE( "tm8k_graphic.u41", 0x400000, 0x100000, CRC(d8bdb82e) SHA1(9bdee261591ccff8a57c5454644f84f8992f614f) ) /* Mask rom labeled 5341-16513-09 U41 VIDEO IMAGE */
1442   ROM_LOAD16_BYTE( "tm8k_graphic.u40", 0x400001, 0x100000, CRC(0c3d6347) SHA1(7ef19018c180abf412a8ff9f278b00c2b4321cc2) ) /* Mask rom labeled 5341-16513-08 U40 VIDEO IMAGE */
1443
1444   ROM_REGION( 0x100000, "oki", 0 ) // Samples
1445   ROM_LOAD( "tm8k_sound.u8", 0x00000, 0x100000, CRC(c6070a60) SHA1(2dc20bf2217a36374b5a691133ad43f53dbe29ca) ) /* Mask rom labeled 5341-16513-03 U8 SOUND */
1446ROM_END
1447
14301448/***************************************************************************
14311449
14321450Galaxy Games BIOS v. 1.90
r7772r7773
17841802GAME( 1999, tm7ka,    tm7k,     tm3k,     tmaster,  tm7ka,    ROT0, "Midway Games Inc.",                       "Touchmaster 7000 (v8.00 Standard)",   0 )
17851803GAME( 1999, tm7keval, tm7k,     tm3k,     tmaster,  tm7keval, ROT0, "Midway Games Inc.",                       "Touchmaster 7000 (v8.1X Evaluation)", 0 )
17861804GAME( 2000, tm8k,     0,        tm3k,     tmaster,  tm8k,     ROT0, "Midway Games Inc.",                       "Touchmaster 8000 (v9.04 Standard)",   0 )
1805GAME( 2000, tm8k902,  tm8k,     tm3k,     tmaster,  tm8k,     ROT0, "Midway Games Inc.",                       "Touchmaster 8000 (v9.02 Standard)",   0 )
17871806GAME( 1998, galgbios, 0,        galgames, galgames, galgames, ROT0, "Creative Electronics & Software",         "Galaxy Games (BIOS v1.90)",           GAME_IS_BIOS_ROOT )
17881807GAME( 1998, galgame2, galgbios, galgame2, galgames, galgame2, ROT0, "Creative Electronics & Software / Namco", "Galaxy Games StarPak 2",              0 )
src/mame/drivers/namcos22.c
r7772r7773
43294329   ROM_REGION( 0x2000, "user2", ROMREGION_ERASE00 )
43304330ROM_END
43314331
4332
4333
43324334ROM_START( ridgeracb )
43334335   ROM_REGION( 0x200000, "maincpu", 0 ) /* main program */
43344336   ROM_LOAD32_BYTE( "rr1prll.4d", 0x00003, 0x80000, CRC(4bb7fc86) SHA1(8291375b8ec4d37e0d9e3bf38da2d5907b0f31bd) )
r7772r7773
44824484   ROM_REGION( 0x2000, "user2", ROMREGION_ERASE00 )
44834485ROM_END
44844486
4487
4488ROM_START( rrf )
4489   ROM_REGION( 0x200000, "maincpu", 0 ) /* main program */
4490   ROM_LOAD32_BYTE( "rrf2prgll.4d", 0x00003, 0x80000, CRC(23c6144d) SHA1(99f70e2c60fba7551cafdce12b07da1f8ab8aad6) )
4491   ROM_LOAD32_BYTE( "rrf2prglm.2d", 0x00002, 0x80000, CRC(1ad638a1) SHA1(505a7f4ba60bbc4e735865fbc5d664311b6045d9) )
4492   ROM_LOAD32_BYTE( "rrf2prgum.8d", 0x00001, 0x80000, CRC(d7e0aa16) SHA1(cab4578cdd3af84b865114be4105cfdc2e7abf36) )
4493   ROM_LOAD32_BYTE( "rrf2prguu.6d", 0x00000, 0x80000, CRC(12c808bb) SHA1(64e84686d4ceb8145b9a59b75d0dced830884c9d) )
4494
4495   ROM_REGION( 0x10000*2, "master", 0 ) /* Master DSP */
4496   ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) )
4497
4498   ROM_REGION( 0x10000*2, "slave", 0 ) /* Slave DSP */
4499   ROM_LOAD16_WORD( "c71.bin", 0,0x1000*2, CRC(47c623ab) SHA1(e363ac50f5556f83308d4cc191b455e9b62bcfc8) )
4500
4501   ROM_REGION( 0x080000, "mcu", 0 ) /* BIOS */
4502   ROM_LOAD( "c74.bin", 0x0000, 0x4000, CRC(a3dce360) SHA1(8f3248b1890abb2e649927240ae46f73bb171e3b) )
4503
4504   ROM_REGION( 0x100000, "user4", 0 ) /* sound data */
4505   ROM_LOAD( "rrf1data.6r", 0, 0x080000, CRC(ce3c6ed6) SHA1(23e033364bc967c10c49fd1d5413dda837670633) )
4506
4507
4508   ROM_REGION( 0x80000*6, "pointrom", 0 ) /* 3d model data */
4509   ROM_LOAD( "rrf2potl0.l0", 0x80000*0, 0x80000, CRC(9b762e60) SHA1(50b67ff6678bacba140bad3aedda75c30851fa7a) )
4510   ROM_LOAD( "rrf2potl1.l1", 0x80000*1, 0x80000, CRC(ab4d66b0) SHA1(59020b3dc2efff99cd528752ca7168b64ae96ac4) )
4511   ROM_LOAD( "rrf2potm0.m0", 0x80000*2, 0x80000, CRC(02d4daa3) SHA1(9b4e48d3234cb91146b5d31ffcf42ad199ccb903) )
4512   ROM_LOAD( "rrf2potm1.m1", 0x80000*3, 0x80000, CRC(37e005c2) SHA1(036ae1c44aaa6a6904e6d4938572035ccc6854ed) )
4513   ROM_LOAD( "rrf2potu0.u0", 0x80000*4, 0x80000, CRC(86b3fe98) SHA1(f242d33f7488e233ccdc0b5d309c64510d7a622d) )
4514   ROM_LOAD( "rrf2potu1.u1", 0x80000*5, 0x80000, CRC(e0c6ce3d) SHA1(cc559a2237ccb753cb1397fecba64733455a8c43) )
4515
4516   ROM_REGION( 0x800000, "c352", 0 ) /* sound samples */
4517   ROM_LOAD( "rrf1wave0.10r", 0x100000*0, 0x100000,CRC(a8e85bde) SHA1(b56677e9f6c98f7b600043f5dcfef3a482ca7455) )
4518   ROM_LOAD( "rrf1wave1.10p", 0x100000*2, 0x100000,CRC(35f47c8e) SHA1(7c3f9e942f532af8008fbead2a96fee6084bcde6) )
4519   ROM_LOAD( "rrf1wave2.10n", 0x100000*1, 0x100000,CRC(4ceeae12) SHA1(ae3a6583f8912bc784c7bc63d32448228cf217ba) ) // differs from normal sets
4520   ROM_LOAD( "rrf1wave3.10l", 0x100000*3, 0x100000,CRC(c4cda1a7) SHA1(60bc96880ec79efdff3cc70c09e848692a40bea4) )
4521
4522   ROM_REGION( 0x2000, "user2", ROMREGION_ERASE00 )
4523
4524   /* this stuff was missing from this version, and shouldn't be the same (bad textures if we use these roms) */
4525   ROM_REGION( 0x300, "user1", 0 )
4526   ROM_LOAD( "rrf1gam.2d",   0x0000, 0x0100, BAD_DUMP CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) )
4527   ROM_LOAD( "rrf1gam.3d",   0x0100, 0x0100, BAD_DUMP CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) )
4528   ROM_LOAD( "rrf1gam.4d",   0x0200, 0x0100, BAD_DUMP CRC(b2161bce) SHA1(d2681cc0cf8e68df0d942d392b4eb4458c4bb356) )
4529
4530   ROM_REGION( 0x200000*8, "textile", 0) /* 16x16x8bpp texture tiles */
4531   ROM_LOAD( "rrf1cg0.bin", 0x200000*0x4, 0x200000, BAD_DUMP CRC(b557a795) SHA1(f345486ffbe797246ad80a55d3c4a332ed6e2888) )
4532   ROM_LOAD( "rrf1cg1.bin", 0x200000*0x5, 0x200000, BAD_DUMP CRC(0fa212d9) SHA1(a1311de0a504e2d399044fa8ac32ec6c56ec965f) )
4533   ROM_LOAD( "rrf1cg2.bin", 0x200000*0x6, 0x200000, BAD_DUMP CRC(18e2d2bd) SHA1(69c2ea62eeb255f27d3c69373f6716b0a34683cc) )
4534   ROM_LOAD( "rrf1cg3.bin", 0x200000*0x7, 0x200000, BAD_DUMP CRC(9564488b) SHA1(6b27d1aea75d6be747c62e165cfa49ecc5d9e767) )
4535
4536   ROM_REGION16_LE( 0x280000, "textilemap", 0 ) /* texture tilemap */
4537   ROM_LOAD( "rrf1ccrl.bin",0x000000, 0x200000, BAD_DUMP CRC(6092d181) SHA1(52c0e3ac20aa23059a87d1a985d24ae641577310) )
4538   ROM_LOAD( "rrf1ccrh.bin",0x200000, 0x080000, BAD_DUMP CRC(dd332fd5) SHA1(a7d9c1d6b5a8e3a937b525c1363880e404dcd147) )
4539ROM_END
4540
44854541ROM_START( timecris )
44864542   ROM_REGION( 0x400000, "maincpu", 0 ) /* main program */
44874543   ROM_LOAD32_BYTE( "ts2ver-b.1", 0x00003, 0x100000, CRC(29b377f7) SHA1(21864ba964602115c1268fd5edd8006a13a86cfc) )
r7772r7773
54525508   DRIVING_ANALOG_PORTS
54535509INPUT_PORTS_END /* Ridge Racer */
54545510
5511
5512static INPUT_PORTS_START( rrf )
5513   PORT_START("DSW0")   /* 0: DIP2 and DIP3 */
5514   PORT_DIPNAME( 0x0001, 0x0000, "DIP2-1" )
5515   PORT_DIPSETTING(    0x0001, DEF_STR( Off ) )
5516   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
5517   PORT_DIPNAME( 0x0002, 0x0000, "DIP2-2" )
5518   PORT_DIPSETTING(    0x0002, DEF_STR( Off ) )
5519   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
5520   PORT_DIPNAME( 0x0004, 0x0004, "DIP2-3" )
5521   PORT_DIPSETTING(    0x0004, DEF_STR( Off ) )
5522   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
5523   PORT_DIPNAME( 0x0008, 0x0008, "DIP2-4" )
5524   PORT_DIPSETTING(    0x0008, DEF_STR( Off ) )
5525   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
5526   PORT_DIPNAME( 0x0010, 0x0010, "DIP2-5" )
5527   PORT_DIPSETTING(    0x0010, DEF_STR( Off ) )
5528   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
5529   PORT_DIPNAME( 0x0020, 0x0020, "DIP2-6" )
5530   PORT_DIPSETTING(    0x0020, DEF_STR( Off ) )
5531   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
5532   PORT_DIPNAME( 0x0040, 0x0040, "DIP2-7" )
5533   PORT_DIPSETTING(    0x0040, DEF_STR( Off ) )
5534   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
5535   PORT_DIPNAME( 0x0080, 0x0080, "DIP2-8" )
5536   PORT_DIPSETTING(    0x0080, DEF_STR( Off ) )
5537   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
5538   PORT_DIPNAME( 0x0100, 0x0100, "DIP3-1" )
5539   PORT_DIPSETTING(    0x0100, DEF_STR( Off ) )
5540   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
5541   PORT_DIPNAME( 0x0200, 0x0200, "DIP3-2" )
5542   PORT_DIPSETTING(    0x0200, DEF_STR( Off ) )
5543   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
5544   PORT_DIPNAME( 0x0400, 0x0400, "DIP3-3" )
5545   PORT_DIPSETTING(    0x0400, DEF_STR( Off ) )
5546   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
5547   PORT_DIPNAME( 0x0800, 0x0800, "DIP3-4" )
5548   PORT_DIPSETTING(    0x0800, DEF_STR( Off ) )
5549   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
5550   PORT_DIPNAME( 0x1000, 0x1000, "DIP3-5" )
5551   PORT_DIPSETTING(    0x1000, DEF_STR( Off ) )
5552   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
5553   PORT_DIPNAME( 0x2000, 0x2000, "DIP3-6" )
5554   PORT_DIPSETTING(    0x2000, DEF_STR( Off ) )
5555   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
5556   PORT_DIPNAME( 0x4000, 0x4000, "DIP3-7 (TEST MODE)" )
5557   PORT_DIPSETTING(    0x4000, DEF_STR( Off ) )
5558   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
5559   PORT_DIPNAME( 0x8000, 0x8000, "DIP3-8" )
5560   PORT_DIPSETTING(    0x8000, DEF_STR( Off ) )
5561   PORT_DIPSETTING(    0x0000, DEF_STR( On ) )
5562
5563   PORT_START("INPUTS")   /* 1 */
5564   PORT_DIPNAME( 0x000f, 0x000a, "Stick Shift" )
5565   PORT_DIPSETTING( 0xa, "1" )
5566   PORT_DIPSETTING( 0x9, "2" )
5567   PORT_DIPSETTING( 0xe, "3" )
5568   PORT_DIPSETTING( 0xd, "4" )
5569   PORT_DIPSETTING( 0x6, "5" )
5570   PORT_DIPSETTING( 0x5, "6" )
5571   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* CLUTCH */
5572   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
5573   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
5574   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
5575   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
5576   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN2 )
5577   PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
5578   PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE1 )
5579   PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_COIN1 )
5580   PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
5581   PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
5582   PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* MOTION STOP? */
5583
5584   DRIVING_ANALOG_PORTS
5585INPUT_PORTS_END /* Ridge Racer */
5586
5587
54555588static INPUT_PORTS_START( raveracw )
54565589   PORT_START("DSW0")
54575590   PORT_DIPNAME( 0x0001, 0x0001, "DIP2-1 (test mode)" )
r7772r7773
57805913GAME( 1993, ridgeracb, ridgerac, namcos22,  ridgera,  ridgeraj, ROT0, "Namco", "Ridge Racer (Rev. RR2, World)"             , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) /* 1993-10-07 */
57815914GAME( 1993, ridgeracj, ridgerac, namcos22,  ridgera,  ridgeraj, ROT0, "Namco", "Ridge Racer (Rev. RR1, Japan)"             , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) /* 1993-10-07 */
57825915GAME( 1993, ridgerac3, ridgerac, namcos22,  ridgera,  ridgeraj, ROT0, "Namco", "Ridge Racer (3 Screen? Rev. RR2, World)"   , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS ) /* 1993-10-28 */
5916GAME( 1993, rrf      , ridgerac, namcos22,  rrf,      ridgeraj, ROT0, "Namco", "Ridge Racer (Full Scale, 1993-12-13, World)"   , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING ) // very different version, incomplete dump.
57835917GAME( 1994, ridgera2,  0,        namcos22,  ridgera,  ridger2j, ROT0, "Namco", "Ridge Racer 2 (Rev. RRS2, US)"             , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING ) /* POSTs but doesn's start */
57845918GAME( 1994, ridgera2j, ridgera2, namcos22,  ridgera,  ridger2j, ROT0, "Namco", "Ridge Racer 2 (Rev. RRS1, Ver.B, Japan)"   , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING )
57855919GAME( 1994, ridgera2ja,ridgera2, namcos22,  ridgera,  ridger2j, ROT0, "Namco", "Ridge Racer 2 (Rev. RRS1, Japan)"          , GAME_IMPERFECT_SOUND|GAME_IMPERFECT_GRAPHICS|GAME_NOT_WORKING )
src/mame/drivers/mpu4drvr.c
r7772r7773
495495{
496496   int i;
497497
498   int x,y,count = 0;
498   int x, y/*, count = 0*/;
499499
500500   bitmap_fill(bitmap,cliprect,0);
501501
r7772r7773
526526
527527         drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[gfxregion],tiledat,colattr,0,0,x*8,y*8);
528528
529         count++;
529         //count++;
530530      }
531531
532532      if (dbl_size&2) y++; /* skip a row? */
src/mame/drivers/8080bw.c
r7772r7773
22482248   ROM_LOAD( "6.t31",        0x4800, 0x0800, CRC(271085d0) SHA1(a772cec8135bc746f6c56aa294eb22c0604e16f9) )
22492249ROM_END
22502250
2251
22512252ROM_START( moonbase )
22522253   ROM_REGION( 0x10000, "maincpu", 0 )
22532254   ROM_LOAD( "ze3-1.a4",     0x0000, 0x0400, CRC(82dbf2c7) SHA1(c767d8b866db4a5059bd79f962a90ce3a962e1e6) )
22542255   ROM_LOAD( "ze3-2.c4",     0x0400, 0x0400, CRC(c867f5b4) SHA1(686318fda6edde297aecaf33f480bfa075fa6eca) )
22552256   ROM_LOAD( "ze3-3.e4",     0x0800, 0x0400, CRC(cb23ccc1) SHA1(86be2d14d52b3404e1a25c573bd25b97729d82a1) )
2256   ROM_LOAD( "ze3-4.f4",     0x0c00, 0x0400, CRC(9a11abe2) SHA1(f5337183c7f279d75ddeeab24f4f132aa2ee103b) )
2257   ROM_LOAD( "ze3-4.f4",     0x0c00, 0x0400, CRC(9a11abe2) SHA1(f5337183c7f279d75ddeeab24f4f132aa2ee103b) ) // 'Taito Corp' string hidden in ROM
22572258   ROM_LOAD( "ze3-5.h4",     0x1000, 0x0400, CRC(2b105ed3) SHA1(fa0767089b3aaec25be39e950e7163ecbdc2f39f) )
22582259   ROM_LOAD( "ze3-6.l4",     0x1400, 0x0400, CRC(cb3d6dcb) SHA1(b4923b12a141c76b7d50274f19a3224db26a5669) )
22592260   ROM_LOAD( "ze3-7.a5",     0x1800, 0x0400, CRC(774b52c9) SHA1(ddbbba874ac069fb930b364a890c45675ec389f7) )
r7772r7773
22662267   ROM_LOAD( "cv01.g7",      0x0400, 0x0400, CRC(aac24f34) SHA1(ad110e776547fb48baac568bb50d61854537ca34) ) /* NEC B406 or compatible BPROM, like the 82S137 */
22672268ROM_END
22682269
2270ROM_START( moonbasea )
2271   ROM_REGION( 0x10000, "maincpu", 0 )
2272   ROM_LOAD( "ze3-1.a4",     0x0000, 0x0400, CRC(82dbf2c7) SHA1(c767d8b866db4a5059bd79f962a90ce3a962e1e6) )
2273   ROM_LOAD( "ze3-2.c4",     0x0400, 0x0400, CRC(c867f5b4) SHA1(686318fda6edde297aecaf33f480bfa075fa6eca) )
2274   ROM_LOAD( "ze3-3.e4",     0x0800, 0x0400, CRC(cb23ccc1) SHA1(86be2d14d52b3404e1a25c573bd25b97729d82a1) )
2275   ROM_LOAD( "ze3-4_alt.f4", 0x0c00, 0x0400, CRC(86a00411) SHA1(f518f5098512d6d23a8887605707844c1b32e54f) ) // 'Nichibutsu' string hidden in ROM
2276   ROM_LOAD( "ze3-5.h4",     0x1000, 0x0400, CRC(2b105ed3) SHA1(fa0767089b3aaec25be39e950e7163ecbdc2f39f) )
2277   ROM_LOAD( "ze3-6.l4",     0x1400, 0x0400, CRC(cb3d6dcb) SHA1(b4923b12a141c76b7d50274f19a3224db26a5669) )
2278   ROM_LOAD( "ze3-7.a5",     0x1800, 0x0400, CRC(774b52c9) SHA1(ddbbba874ac069fb930b364a890c45675ec389f7) )
2279   ROM_LOAD( "ze3-8.c5",     0x1c00, 0x0400, CRC(e88ea83b) SHA1(ef05be4783c860369ee5ecd4844837207e99ad9f) )
2280   ROM_LOAD( "ze3-9.e5",     0x4000, 0x0400, CRC(2dd5adfa) SHA1(62cb98cad1e48de0e0cbf30392d35834b38dadbd) )
2281   ROM_LOAD( "ze3-10.f5",    0x4400, 0x0400, CRC(1e7c22a4) SHA1(b34173375494ffbf5400dd4014a683a9807f4f08) )
2282
2283   ROM_REGION( 0x0800, "proms", 0 )      /* color maps player 1/player 2 */
2284   ROM_LOAD( "cv02.h7",      0x0000, 0x0400, CRC(2bdf83a0) SHA1(01ffbd43964c41987e7d44816271308f9a70802b) ) /* NEC B406 or compatible BPROM, like the 82S137 */
2285   ROM_LOAD( "cv01.g7",      0x0400, 0x0400, CRC(aac24f34) SHA1(ad110e776547fb48baac568bb50d61854537ca34) ) /* NEC B406 or compatible BPROM, like the 82S137 */
2286ROM_END
2287
2288
22692289ROM_START( invrvnge )
22702290   ROM_REGION( 0x10000, "maincpu", 0 )
22712291   ROM_LOAD( "invrvnge.h",   0x0000, 0x0800, CRC(aca41bbb) SHA1(ca71f792abd6d9a44d15b19d2ccf678e82ccba4f) )
r7772r7773
29562976GAMEL(19??, invasionrz,invaders,invaders, invasion, 0, ROT270, "bootleg", "Invasion (bootleg, set 3, R Z SRL BOLOGNA)", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING, layout_invaders )
29572977GAMEL(19??, invasionrza,invaders,invaders,invasion, 0, ROT270, "bootleg", "Invasion (bootleg, set 4, R Z SRL BOLOGNA)", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING, layout_invaders )
29582978GAME( 19??, darthvdr, invaders, darthvdr, darthvdr, 0, ROT270, "bootleg", "Darth Vader", GAME_SUPPORTS_SAVE | GAME_NO_SOUND )
2959GAME( 1979, moonbase, invadpt2, invadpt2, invadpt2, 0, ROT270, "Nichibutsu", "Moon Base", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )
2979GAME( 1979, moonbase, invadpt2, invadpt2, invadpt2, 0, ROT270, "Nichibutsu (Taito license?)", "Moon Base (set 1)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND ) // this has a 'Taito Corp' string hidden away in the rom - how do you get it to display?
2980GAME( 1979, moonbasea,invadpt2, invadpt2, invadpt2, 0, ROT270, "Nichibutsu", "Moon Base (set 2)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND )                  // this has the same string replaced with Nichibutsu, no other differences
29602981GAMEL(19??, invrvnge, 0,        invrvnge, invrvnge, 0, ROT270, "Zenitone-Microsec Ltd.", "Invader's Revenge",  GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND, layout_invrvnge )
29612982GAMEL(19??, invrvngea,invrvnge, invrvnge, invrvnge, 0, ROT270, "Zenitone-Microsec Ltd. (Dutchford license)", "Invader's Revenge (Dutchford)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND, layout_invrvnge )
29622983GAME( 1980, spclaser, 0,        invaders, spclaser, 0, ROT270, "Taito", "Space Laser", GAME_SUPPORTS_SAVE )
src/mame/drivers/othunder.c
r7772r7773
155155  Possible values are: 111 (max) 011 (high) -01 (med) --0 (low). It's a
156156  rotary control so only one bit is supposed to be low.
157157
158- The keyboard leds I'm turning on are actually the gun solenoid outputs, which
158(Changed set led output to proper output port.  --HowardC)
159- The outputs I'm turning on are actually the gun solenoid outputs, which
159160  would rattle the gun while firing.
160161
162
161163- BM, 060108 - The original flyer for this game has screenshots which clearly
162164  show the background is 4 pixels to the left on several game stages (you can
163165  see the edge of sprites overlapping past the right edge).  Therefore I
r7772r7773
327329                0x000000    eeprom in data
328330                x0000000    eeprom out data  */
329331
330            set_led_status(space->machine, 0, data & 1);
331            set_led_status(space->machine, 1, data & 2);
332            /* Recoil Piston Motor Status */
333            output_set_value("Player1_Recoil_Piston", data & 0x1 );
334            output_set_value("Player2_Recoil_Piston", (data & 0x2) >>1 );
332335
333336            if (data & 4)
334337               popmessage("OBPRI SET!");
src/mame/drivers/1943.c
r7772r7773
2424    TODO:
2525
2626    - use priority PROM for drawing sprites
27    - dump / decap the C8751H-88 MCU and use it's code to emulate the protection
2728
2829*/
2930
r7772r7773
305306
306307ROM_START( 1943 )
307308   ROM_REGION( 0x30000, "maincpu", 0 )   /* 64k for code + 128k for the banked ROMs images */
308   ROM_LOAD( "1943.01",      0x00000, 0x08000, CRC(c686cc5c) SHA1(5efb2d9df737564d599f71b71a6438f7624b27c3) )
309   ROM_LOAD( "1943.02",      0x10000, 0x10000, CRC(d8880a41) SHA1(2f9b6a3922efa05eed66c63284bace5f337304ac) )
310   ROM_LOAD( "1943.03",      0x20000, 0x10000, CRC(3f0ee26c) SHA1(8da74fe91a6be3f23fc625f2a433f1f79c424994) )
309   ROM_LOAD( "bmu01c.12d", 0x00000, 0x08000, CRC(c686cc5c) SHA1(5efb2d9df737564d599f71b71a6438f7624b27c3) )
310   ROM_LOAD( "bmu02c.13d", 0x10000, 0x10000, CRC(d8880a41) SHA1(2f9b6a3922efa05eed66c63284bace5f337304ac) )
311   ROM_LOAD( "bmu03c.14d", 0x20000, 0x10000, CRC(3f0ee26c) SHA1(8da74fe91a6be3f23fc625f2a433f1f79c424994) )
311312
312313   ROM_REGION( 0x10000, "audiocpu", 0 )
313   ROM_LOAD( "1943.05",      0x00000, 0x8000, CRC(ee2bd2d7) SHA1(4d2d019a9f8452fbbb247e893280568a2e86073e) )
314   ROM_LOAD( "bm04.5h", 0x00000, 0x8000, CRC(ee2bd2d7) SHA1(4d2d019a9f8452fbbb247e893280568a2e86073e) )
314315
316   ROM_REGION( 0x10000, "mcu", 0 ) /*  C8751H-88 MCU Code */
317   ROM_LOAD( "bm.7k", 0x00000, 0x10000 , NO_DUMP ) /* can't be dumped */
318
315319   ROM_REGION( 0x8000, "gfx1", 0 )
316   ROM_LOAD( "1943.04",      0x00000, 0x8000, CRC(46cb9d3d) SHA1(96fd0e714b91fe13a2ca0d185ada9e4b4baa0c0b) )   /* characters */
320   ROM_LOAD( "bm05.4k", 0x00000, 0x8000, CRC(46cb9d3d) SHA1(96fd0e714b91fe13a2ca0d185ada9e4b4baa0c0b) )   /* characters */
317321
318322   ROM_REGION( 0x40000, "gfx2", 0 )
319   ROM_LOAD( "1943.15",      0x00000, 0x8000, CRC(6b1a0443) SHA1(32337c840ccd6815fd5844c194365c58d708f6dc) )   /* bg tiles */
320   ROM_LOAD( "1943.16",      0x08000, 0x8000, CRC(23c908c2) SHA1(42b83ff5781be9181802a21ff1b23c17ab1bc5a2) )
321   ROM_LOAD( "1943.17",      0x10000, 0x8000, CRC(46bcdd07) SHA1(38feda668be25d1adc04aa36afc73b07c1545f89) )
322   ROM_LOAD( "1943.18",      0x18000, 0x8000, CRC(e6ae7ba0) SHA1(959c306dc28b9be2adc54b3d46312d26764c7b8b) )
323   ROM_LOAD( "1943.19",      0x20000, 0x8000, CRC(868ababc) SHA1(1c7be905f53c63bad25fbbd9b3cf82d2c7749bc3) )
324   ROM_LOAD( "1943.20",      0x28000, 0x8000, CRC(0917e5d4) SHA1(62dd277bc1fa54cfe168ae2380bc147bd17f4205) )
325   ROM_LOAD( "1943.21",      0x30000, 0x8000, CRC(9bfb0d89) SHA1(f1bae7ec46edcf46c7af84c054e89b322f8c8972) )
326   ROM_LOAD( "1943.22",      0x38000, 0x8000, CRC(04f3c274) SHA1(932780c04abe285e1ec67b726b145175f73eafe0) )
323   ROM_LOAD( "bm15.10f", 0x00000, 0x8000, CRC(6b1a0443) SHA1(32337c840ccd6815fd5844c194365c58d708f6dc) )   /* bg tiles */
324   ROM_LOAD( "bm16.11f", 0x08000, 0x8000, CRC(23c908c2) SHA1(42b83ff5781be9181802a21ff1b23c17ab1bc5a2) )
325   ROM_LOAD( "bm17.12f", 0x10000, 0x8000, CRC(46bcdd07) SHA1(38feda668be25d1adc04aa36afc73b07c1545f89) )
326   ROM_LOAD( "bm18.14f", 0x18000, 0x8000, CRC(e6ae7ba0) SHA1(959c306dc28b9be2adc54b3d46312d26764c7b8b) )
327   ROM_LOAD( "bm19.10j", 0x20000, 0x8000, CRC(868ababc) SHA1(1c7be905f53c63bad25fbbd9b3cf82d2c7749bc3) )
328   ROM_LOAD( "bm20.11j", 0x28000, 0x8000, CRC(0917e5d4) SHA1(62dd277bc1fa54cfe168ae2380bc147bd17f4205) )
329   ROM_LOAD( "bm21.12j", 0x30000, 0x8000, CRC(9bfb0d89) SHA1(f1bae7ec46edcf46c7af84c054e89b322f8c8972) )
330   ROM_LOAD( "bm22.14j", 0x38000, 0x8000, CRC(04f3c274) SHA1(932780c04abe285e1ec67b726b145175f73eafe0) )
327331
328332   ROM_REGION( 0x10000, "gfx3", 0 )
329   ROM_LOAD( "1943.24",      0x00000, 0x8000, CRC(11134036) SHA1(88da112ab9fc7e0d8f0e901f273715b950ae588c) )   /* fg tiles */
330   ROM_LOAD( "1943.25",      0x08000, 0x8000, CRC(092cf9c1) SHA1(19fe3c714b1d52cbb21dea25cdee5af841f525db) )
333   ROM_LOAD( "bm24.14k", 0x00000, 0x8000, CRC(11134036) SHA1(88da112ab9fc7e0d8f0e901f273715b950ae588c) )   /* fg tiles */
334   ROM_LOAD( "bm25.14l", 0x08000, 0x8000, CRC(092cf9c1) SHA1(19fe3c714b1d52cbb21dea25cdee5af841f525db) )
331335
332336   ROM_REGION( 0x40000, "gfx4", 0 )
333   ROM_LOAD( "1943.06",      0x00000, 0x8000, CRC(97acc8af) SHA1(c9fa07cb61f6905408b355edabfe453fb652ff0d) )   /* sprites */
334   ROM_LOAD( "1943.07",      0x08000, 0x8000, CRC(d78f7197) SHA1(6367c7e80e80d4a0d33d7840b5c843c63c80123e) )
335   ROM_LOAD( "1943.08",      0x10000, 0x8000, CRC(1a626608) SHA1(755c27a07728fd686168e9d9e4dee3d8f274892a) )
336   ROM_LOAD( "1943.09",      0x18000, 0x8000, CRC(92408400) SHA1(3ab299bad1ba115efead53ebd92254abe7a092ba) )
337   ROM_LOAD( "1943.10",      0x20000, 0x8000, CRC(8438a44a) SHA1(873629b00cf3f6d8976a7fdafe63cd16e47b7491) )
338   ROM_LOAD( "1943.11",      0x28000, 0x8000, CRC(6c69351d) SHA1(c213d5c3e76a5749bc32539604716dcef6dcb694) )
339   ROM_LOAD( "1943.12",      0x30000, 0x8000, CRC(5e7efdb7) SHA1(fef271a38dc1a9e45a0c6e27e28e713c77c8f8c9) )
340   ROM_LOAD( "1943.13",      0x38000, 0x8000, CRC(1143829a) SHA1(2b3a65e354a205c05a87f783e9938b64bc62396f) )
337   ROM_LOAD( "bm06.10a", 0x00000, 0x8000, CRC(97acc8af) SHA1(c9fa07cb61f6905408b355edabfe453fb652ff0d) )   /* sprites */
338   ROM_LOAD( "bm07.11a", 0x08000, 0x8000, CRC(d78f7197) SHA1(6367c7e80e80d4a0d33d7840b5c843c63c80123e) )
339   ROM_LOAD( "bm08.12a", 0x10000, 0x8000, CRC(1a626608) SHA1(755c27a07728fd686168e9d9e4dee3d8f274892a) )
340   ROM_LOAD( "bm09.14a", 0x18000, 0x8000, CRC(92408400) SHA1(3ab299bad1ba115efead53ebd92254abe7a092ba) )
341   ROM_LOAD( "bm10.10c", 0x20000, 0x8000, CRC(8438a44a) SHA1(873629b00cf3f6d8976a7fdafe63cd16e47b7491) )
342   ROM_LOAD( "bm11.11c", 0x28000, 0x8000, CRC(6c69351d) SHA1(c213d5c3e76a5749bc32539604716dcef6dcb694) )
343   ROM_LOAD( "bm12.12c", 0x30000, 0x8000, CRC(5e7efdb7) SHA1(fef271a38dc1a9e45a0c6e27e28e713c77c8f8c9) )
344   ROM_LOAD( "bm13.14c", 0x38000, 0x8000, CRC(1143829a) SHA1(2b3a65e354a205c05a87f783e9938b64bc62396f) )
341345
342346   ROM_REGION( 0x10000, "gfx5", 0 )   /* tilemaps */
343   ROM_LOAD( "1943.14",      0x0000, 0x8000, CRC(4d3c6401) SHA1(ce4f6dbf8fa030ad45cbb5afd58df27fed2d4618) )   /* front background */
344   ROM_LOAD( "1943.23",      0x8000, 0x8000, CRC(a52aecbd) SHA1(45b0283d84d394c16c35802463ca95d70d1062d4) )   /* back background */
347   ROM_LOAD( "bm14.5f", 0x0000, 0x8000, CRC(4d3c6401) SHA1(ce4f6dbf8fa030ad45cbb5afd58df27fed2d4618) )   /* front background */
348   ROM_LOAD( "bm23.8k", 0x8000, 0x8000, CRC(a52aecbd) SHA1(45b0283d84d394c16c35802463ca95d70d1062d4) )   /* back background */
345349
346350   ROM_REGION( 0x0c00, "proms", 0 )
347   ROM_LOAD( "bmprom.01",    0x0000, 0x0100, CRC(74421f18) SHA1(5b8b59f6f4e5ad358611de50608f47f41a5b0e51) )   /* red component */
348   ROM_LOAD( "bmprom.02",    0x0100, 0x0100, CRC(ac27541f) SHA1(1796c4c9041dfe28e6319576f21df1dbcb8d12bf) )   /* green component */
349   ROM_LOAD( "bmprom.03",    0x0200, 0x0100, CRC(251fb6ff) SHA1(d1118159b3d429d841e4efa938728ebedadd7ec5) )   /* blue component */
350   ROM_LOAD( "bmprom.05",    0x0300, 0x0100, CRC(206713d0) SHA1(fa609f6d675af18c379838583505724d28bcff0e) )   /* char lookup table */
351   ROM_LOAD( "bmprom.10",    0x0400, 0x0100, CRC(33c2491c) SHA1(13da924e4b182759c4aae49034f3a7cbe556ea65) )   /* foreground lookup table */
352   ROM_LOAD( "bmprom.09",    0x0500, 0x0100, CRC(aeea4af7) SHA1(98f4570ee061e9aa58d8ed2d2f8ae59ce2ec5795) )   /* foreground palette bank */
353   ROM_LOAD( "bmprom.12",    0x0600, 0x0100, CRC(c18aa136) SHA1(684f04d9a5b94ae1db5fb95763e65271f4cf8e01) )   /* background lookup table */
354   ROM_LOAD( "bmprom.11",    0x0700, 0x0100, CRC(405aae37) SHA1(94a06f81b775c4e49d57d42fc064d3072a253bbd) )   /* background palette bank */
355   ROM_LOAD( "bmprom.08",    0x0800, 0x0100, CRC(c2010a9e) SHA1(be9852500209066e2f0ff2770e0c217d1636a0b5) )   /* sprite lookup table */
356   ROM_LOAD( "bmprom.07",    0x0900, 0x0100, CRC(b56f30c3) SHA1(9f5e6db464d21457a33ec8bdfdff069632b791db) )   /* sprite palette bank */
357   ROM_LOAD( "bmprom.04",    0x0a00, 0x0100, CRC(91a8a2e1) SHA1(9583c87eff876f04bc2ccf7218cd8081f1bcdb94) )   /* priority encoder / palette selector (not used) */
358   ROM_LOAD( "bmprom.06",    0x0b00, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) )   /* video timing (not used) */
351   ROM_LOAD( "bm1.12a",  0x0000, 0x0100, CRC(74421f18) SHA1(5b8b59f6f4e5ad358611de50608f47f41a5b0e51) )   /* red component */
352   ROM_LOAD( "bm2.13a",  0x0100, 0x0100, CRC(ac27541f) SHA1(1796c4c9041dfe28e6319576f21df1dbcb8d12bf) )   /* green component */
353   ROM_LOAD( "bm3.14a",  0x0200, 0x0100, CRC(251fb6ff) SHA1(d1118159b3d429d841e4efa938728ebedadd7ec5) )   /* blue component */
354   ROM_LOAD( "bm5.7f",   0x0300, 0x0100, CRC(206713d0) SHA1(fa609f6d675af18c379838583505724d28bcff0e) )   /* char lookup table */
355   ROM_LOAD( "bm10.7l",  0x0400, 0x0100, CRC(33c2491c) SHA1(13da924e4b182759c4aae49034f3a7cbe556ea65) )   /* foreground lookup table */
356   ROM_LOAD( "bm9.6l",   0x0500, 0x0100, CRC(aeea4af7) SHA1(98f4570ee061e9aa58d8ed2d2f8ae59ce2ec5795) )   /* foreground palette bank */
357   ROM_LOAD( "bm12.12m", 0x0600, 0x0100, CRC(c18aa136) SHA1(684f04d9a5b94ae1db5fb95763e65271f4cf8e01) )   /* background lookup table */
358   ROM_LOAD( "bm11.12l", 0x0700, 0x0100, CRC(405aae37) SHA1(94a06f81b775c4e49d57d42fc064d3072a253bbd) )   /* background palette bank */
359   ROM_LOAD( "bm8.8c",   0x0800, 0x0100, CRC(c2010a9e) SHA1(be9852500209066e2f0ff2770e0c217d1636a0b5) )   /* sprite lookup table */
360   ROM_LOAD( "bm7.7c",   0x0900, 0x0100, CRC(b56f30c3) SHA1(9f5e6db464d21457a33ec8bdfdff069632b791db) )   /* sprite palette bank */
361   ROM_LOAD( "bm4.12c",  0x0a00, 0x0100, CRC(91a8a2e1) SHA1(9583c87eff876f04bc2ccf7218cd8081f1bcdb94) )   /* priority encoder / palette selector (not used) */
362   ROM_LOAD( "bm6.4b",   0x0b00, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) )   /* video timing (not used) */
359363ROM_END
360364
361365ROM_START( 1943j )
362366   ROM_REGION( 0x30000, "maincpu", 0 )   /* 64k for code + 128k for the banked ROMs images */
363   ROM_LOAD( "1943jap.001",  0x00000, 0x08000, CRC(f6935937) SHA1(6fe8885d734447c2a667cf80dd545200aad6c767) )
364   ROM_LOAD( "1943jap.002",  0x10000, 0x10000, CRC(af971575) SHA1(af1d8ce73e8671b7b41248ce6486c9b5aaf6a233) )
365   ROM_LOAD( "1943jap.003",  0x20000, 0x10000, CRC(300ec713) SHA1(f66d2356b413a418c887b4085a5315475c7a8bba) )
367   ROM_LOAD( "bmj01.12d", 0x00000, 0x08000, CRC(f6935937) SHA1(6fe8885d734447c2a667cf80dd545200aad6c767) ) /* Rom labels/names + revision needs to be verified */
368   ROM_LOAD( "bmj02.13d", 0x10000, 0x10000, CRC(af971575) SHA1(af1d8ce73e8671b7b41248ce6486c9b5aaf6a233) )
369   ROM_LOAD( "bmj03.14d", 0x20000, 0x10000, CRC(300ec713) SHA1(f66d2356b413a418c887b4085a5315475c7a8bba) )
366370
367371   ROM_REGION( 0x10000, "audiocpu", 0 )
368   ROM_LOAD( "1943.05",      0x00000, 0x8000, CRC(ee2bd2d7) SHA1(4d2d019a9f8452fbbb247e893280568a2e86073e) )
372   ROM_LOAD( "bm04.5h", 0x00000, 0x8000, CRC(ee2bd2d7) SHA1(4d2d019a9f8452fbbb247e893280568a2e86073e) )
369373
374   ROM_REGION( 0x10000, "mcu", 0 ) /*  C8751H-88 MCU Code */
375   ROM_LOAD( "bm.7k", 0x00000, 0x10000 , NO_DUMP ) /* can't be dumped */
376
370377   ROM_REGION( 0x8000, "gfx1", 0 )
371   ROM_LOAD( "1943.04",      0x00000, 0x8000, CRC(46cb9d3d) SHA1(96fd0e714b91fe13a2ca0d185ada9e4b4baa0c0b) )   /* characters */
378   ROM_LOAD( "bm05.4k", 0x00000, 0x8000, CRC(46cb9d3d) SHA1(96fd0e714b91fe13a2ca0d185ada9e4b4baa0c0b) )   /* characters */
372379
373380   ROM_REGION( 0x40000, "gfx2", 0 )
374   ROM_LOAD( "1943.15",      0x00000, 0x8000, CRC(6b1a0443) SHA1(32337c840ccd6815fd5844c194365c58d708f6dc) )   /* bg tiles */
375   ROM_LOAD( "1943.16",      0x08000, 0x8000, CRC(23c908c2) SHA1(42b83ff5781be9181802a21ff1b23c17ab1bc5a2) )
376   ROM_LOAD( "1943.17",      0x10000, 0x8000, CRC(46bcdd07) SHA1(38feda668be25d1adc04aa36afc73b07c1545f89) )
377   ROM_LOAD( "1943.18",      0x18000, 0x8000, CRC(e6ae7ba0) SHA1(959c306dc28b9be2adc54b3d46312d26764c7b8b) )
378   ROM_LOAD( "1943.19",      0x20000, 0x8000, CRC(868ababc) SHA1(1c7be905f53c63bad25fbbd9b3cf82d2c7749bc3) )
379   ROM_LOAD( "1943.20",      0x28000, 0x8000, CRC(0917e5d4) SHA1(62dd277bc1fa54cfe168ae2380bc147bd17f4205) )
380   ROM_LOAD( "1943.21",      0x30000, 0x8000, CRC(9bfb0d89) SHA1(f1bae7ec46edcf46c7af84c054e89b322f8c8972) )
381   ROM_LOAD( "1943.22",      0x38000, 0x8000, CRC(04f3c274) SHA1(932780c04abe285e1ec67b726b145175f73eafe0) )
381   ROM_LOAD( "bm15.10f", 0x00000, 0x8000, CRC(6b1a0443) SHA1(32337c840ccd6815fd5844c194365c58d708f6dc) )   /* bg tiles */
382   ROM_LOAD( "bm16.11f", 0x08000, 0x8000, CRC(23c908c2) SHA1(42b83ff5781be9181802a21ff1b23c17ab1bc5a2) )
383   ROM_LOAD( "bm17.12f", 0x10000, 0x8000, CRC(46bcdd07) SHA1(38feda668be25d1adc04aa36afc73b07c1545f89) )
384   ROM_LOAD( "bm18.14f", 0x18000, 0x8000, CRC(e6ae7ba0) SHA1(959c306dc28b9be2adc54b3d46312d26764c7b8b) )
385   ROM_LOAD( "bm19.10j", 0x20000, 0x8000, CRC(868ababc) SHA1(1c7be905f53c63bad25fbbd9b3cf82d2c7749bc3) )
386   ROM_LOAD( "bm20.11j", 0x28000, 0x8000, CRC(0917e5d4) SHA1(62dd277bc1fa54cfe168ae2380bc147bd17f4205) )
387   ROM_LOAD( "bm21.12j", 0x30000, 0x8000, CRC(9bfb0d89) SHA1(f1bae7ec46edcf46c7af84c054e89b322f8c8972) )
388   ROM_LOAD( "bm22.14j", 0x38000, 0x8000, CRC(04f3c274) SHA1(932780c04abe285e1ec67b726b145175f73eafe0) )
382389
383390   ROM_REGION( 0x10000, "gfx3", 0 )
384   ROM_LOAD( "1943.24",      0x00000, 0x8000, CRC(11134036) SHA1(88da112ab9fc7e0d8f0e901f273715b950ae588c) )   /* fg tiles */
385   ROM_LOAD( "1943.25",      0x08000, 0x8000, CRC(092cf9c1) SHA1(19fe3c714b1d52cbb21dea25cdee5af841f525db) )
391   ROM_LOAD( "bm24.14k", 0x00000, 0x8000, CRC(11134036) SHA1(88da112ab9fc7e0d8f0e901f273715b950ae588c) )   /* fg tiles */
392   ROM_LOAD( "bm25.14l", 0x08000, 0x8000, CRC(092cf9c1) SHA1(19fe3c714b1d52cbb21dea25cdee5af841f525db) )
386393
387394   ROM_REGION( 0x40000, "gfx4", 0 )
388   ROM_LOAD( "1943.06",      0x00000, 0x8000, CRC(97acc8af) SHA1(c9fa07cb61f6905408b355edabfe453fb652ff0d) )   /* sprites */
389   ROM_LOAD( "1943.07",      0x08000, 0x8000, CRC(d78f7197) SHA1(6367c7e80e80d4a0d33d7840b5c843c63c80123e) )
390   ROM_LOAD( "1943.08",      0x10000, 0x8000, CRC(1a626608) SHA1(755c27a07728fd686168e9d9e4dee3d8f274892a) )
391   ROM_LOAD( "1943.09",      0x18000, 0x8000, CRC(92408400) SHA1(3ab299bad1ba115efead53ebd92254abe7a092ba) )
392   ROM_LOAD( "1943.10",      0x20000, 0x8000, CRC(8438a44a) SHA1(873629b00cf3f6d8976a7fdafe63cd16e47b7491) )
393   ROM_LOAD( "1943.11",      0x28000, 0x8000, CRC(6c69351d) SHA1(c213d5c3e76a5749bc32539604716dcef6dcb694) )
394   ROM_LOAD( "1943.12",      0x30000, 0x8000, CRC(5e7efdb7) SHA1(fef271a38dc1a9e45a0c6e27e28e713c77c8f8c9) )
395   ROM_LOAD( "1943.13",      0x38000, 0x8000, CRC(1143829a) SHA1(2b3a65e354a205c05a87f783e9938b64bc62396f) )
395   ROM_LOAD( "bm06.10a", 0x00000, 0x8000, CRC(97acc8af) SHA1(c9fa07cb61f6905408b355edabfe453fb652ff0d) )   /* sprites */
396   ROM_LOAD( "bm07.11a", 0x08000, 0x8000, CRC(d78f7197) SHA1(6367c7e80e80d4a0d33d7840b5c843c63c80123e) )
397   ROM_LOAD( "bm08.12a", 0x10000, 0x8000, CRC(1a626608) SHA1(755c27a07728fd686168e9d9e4dee3d8f274892a) )
398   ROM_LOAD( "bm09.14a", 0x18000, 0x8000, CRC(92408400) SHA1(3ab299bad1ba115efead53ebd92254abe7a092ba) )
399   ROM_LOAD( "bm10.10c", 0x20000, 0x8000, CRC(8438a44a) SHA1(873629b00cf3f6d8976a7fdafe63cd16e47b7491) )
400   ROM_LOAD( "bm11.11c", 0x28000, 0x8000, CRC(6c69351d) SHA1(c213d5c3e76a5749bc32539604716dcef6dcb694) )
401   ROM_LOAD( "bm12.12c", 0x30000, 0x8000, CRC(5e7efdb7) SHA1(fef271a38dc1a9e45a0c6e27e28e713c77c8f8c9) )
402   ROM_LOAD( "bm13.14c", 0x38000, 0x8000, CRC(1143829a) SHA1(2b3a65e354a205c05a87f783e9938b64bc62396f) )
396403
397404   ROM_REGION( 0x10000, "gfx5", 0 )   /* tilemaps */
398   ROM_LOAD( "1943.14",      0x0000, 0x8000, CRC(4d3c6401) SHA1(ce4f6dbf8fa030ad45cbb5afd58df27fed2d4618) )   /* front background */
399   ROM_LOAD( "1943.23",      0x8000, 0x8000, CRC(a52aecbd) SHA1(45b0283d84d394c16c35802463ca95d70d1062d4) )   /* back background */
405   ROM_LOAD( "bm14.5f", 0x0000, 0x8000, CRC(4d3c6401) SHA1(ce4f6dbf8fa030ad45cbb5afd58df27fed2d4618) )   /* front background */
406   ROM_LOAD( "bm23.8k", 0x8000, 0x8000, CRC(a52aecbd) SHA1(45b0283d84d394c16c35802463ca95d70d1062d4) )   /* back background */
400407
401408   ROM_REGION( 0x0c00, "proms", 0 )
402   ROM_LOAD( "bmprom.01",    0x0000, 0x0100, CRC(74421f18) SHA1(5b8b59f6f4e5ad358611de50608f47f41a5b0e51) )   /* red component */
403   ROM_LOAD( "bmprom.02",    0x0100, 0x0100, CRC(ac27541f) SHA1(1796c4c9041dfe28e6319576f21df1dbcb8d12bf) )   /* green component */
404   ROM_LOAD( "bmprom.03",    0x0200, 0x0100, CRC(251fb6ff) SHA1(d1118159b3d429d841e4efa938728ebedadd7ec5) )   /* blue component */
405   ROM_LOAD( "bmprom.05",    0x0300, 0x0100, CRC(206713d0) SHA1(fa609f6d675af18c379838583505724d28bcff0e) )   /* char lookup table */
406   ROM_LOAD( "bmprom.10",    0x0400, 0x0100, CRC(33c2491c) SHA1(13da924e4b182759c4aae49034f3a7cbe556ea65) )   /* foreground lookup table */
407   ROM_LOAD( "bmprom.09",    0x0500, 0x0100, CRC(aeea4af7) SHA1(98f4570ee061e9aa58d8ed2d2f8ae59ce2ec5795) )   /* foreground palette bank */
408   ROM_LOAD( "bmprom.12",    0x0600, 0x0100, CRC(c18aa136) SHA1(684f04d9a5b94ae1db5fb95763e65271f4cf8e01) )   /* background lookup table */
409   ROM_LOAD( "bmprom.11",    0x0700, 0x0100, CRC(405aae37) SHA1(94a06f81b775c4e49d57d42fc064d3072a253bbd) )   /* background palette bank */
410   ROM_LOAD( "bmprom.08",    0x0800, 0x0100, CRC(c2010a9e) SHA1(be9852500209066e2f0ff2770e0c217d1636a0b5) )   /* sprite lookup table */
411   ROM_LOAD( "bmprom.07",    0x0900, 0x0100, CRC(b56f30c3) SHA1(9f5e6db464d21457a33ec8bdfdff069632b791db) )   /* sprite palette bank */
412   ROM_LOAD( "bmprom.04",    0x0a00, 0x0100, CRC(91a8a2e1) SHA1(9583c87eff876f04bc2ccf7218cd8081f1bcdb94) )   /* priority encoder / palette selector (not used) */
413   ROM_LOAD( "bmprom.06",    0x0b00, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) )   /* video timing (not used) */
409   ROM_LOAD( "bm1.12a",  0x0000, 0x0100, CRC(74421f18) SHA1(5b8b59f6f4e5ad358611de50608f47f41a5b0e51) )   /* red component */
410   ROM_LOAD( "bm2.13a",  0x0100, 0x0100, CRC(ac27541f) SHA1(1796c4c9041dfe28e6319576f21df1dbcb8d12bf) )   /* green component */
411   ROM_LOAD( "bm3.14a",  0x0200, 0x0100, CRC(251fb6ff) SHA1(d1118159b3d429d841e4efa938728ebedadd7ec5) )   /* blue component */
412   ROM_LOAD( "bm5.7f",   0x0300, 0x0100, CRC(206713d0) SHA1(fa609f6d675af18c379838583505724d28bcff0e) )   /* char lookup table */
413   ROM_LOAD( "bm10.7l",  0x0400, 0x0100, CRC(33c2491c) SHA1(13da924e4b182759c4aae49034f3a7cbe556ea65) )   /* foreground lookup table */
414   ROM_LOAD( "bm9.6l",   0x0500, 0x0100, CRC(aeea4af7) SHA1(98f4570ee061e9aa58d8ed2d2f8ae59ce2ec5795) )   /* foreground palette bank */
415   ROM_LOAD( "bm12.12m", 0x0600, 0x0100, CRC(c18aa136) SHA1(684f04d9a5b94ae1db5fb95763e65271f4cf8e01) )   /* background lookup table */
416   ROM_LOAD( "bm11.12l", 0x0700, 0x0100, CRC(405aae37) SHA1(94a06f81b775c4e49d57d42fc064d3072a253bbd) )   /* background palette bank */
417   ROM_LOAD( "bm8.8c",   0x0800, 0x0100, CRC(c2010a9e) SHA1(be9852500209066e2f0ff2770e0c217d1636a0b5) )   /* sprite lookup table */
418   ROM_LOAD( "bm7.7c",   0x0900, 0x0100, CRC(b56f30c3) SHA1(9f5e6db464d21457a33ec8bdfdff069632b791db) )   /* sprite palette bank */
419   ROM_LOAD( "bm4.12c",  0x0a00, 0x0100, CRC(91a8a2e1) SHA1(9583c87eff876f04bc2ccf7218cd8081f1bcdb94) )   /* priority encoder / palette selector (not used) */
420   ROM_LOAD( "bm6.4b",   0x0b00, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) )   /* video timing (not used) */
414421ROM_END
415422
416423ROM_START( 1943kai )
417424   ROM_REGION( 0x30000, "maincpu", 0 )   /* 64k for code + 128k for the banked ROMs images */
418   ROM_LOAD( "1943kai.01",   0x00000, 0x08000, CRC(7d2211db) SHA1(b02a0b3daf7e1e224b7cad8fbe93439bd5ec9f0b) )
419   ROM_LOAD( "1943kai.02",   0x10000, 0x10000, CRC(2ebbc8c5) SHA1(3be5ad061411642723e3f2bcb7b3c3caa11ee15f) )
420   ROM_LOAD( "1943kai.03",   0x20000, 0x10000, CRC(475a6ac5) SHA1(fa07a855ba9173b6f81641c806ec7d938b0c282e) )
425   ROM_LOAD( "bmk01.12d", 0x00000, 0x08000, CRC(7d2211db) SHA1(b02a0b3daf7e1e224b7cad8fbe93439bd5ec9f0b) ) /* Rom labels/names + revision needs to be verified */
426   ROM_LOAD( "bmk02.13d", 0x10000, 0x10000, CRC(2ebbc8c5) SHA1(3be5ad061411642723e3f2bcb7b3c3caa11ee15f) )
427   ROM_LOAD( "bmk03.14d", 0x20000, 0x10000, CRC(475a6ac5) SHA1(fa07a855ba9173b6f81641c806ec7d938b0c282e) )
421428
422429   ROM_REGION( 0x10000, "audiocpu", 0 )
423   ROM_LOAD( "1943kai.05",  0x00000, 0x8000, CRC(25f37957) SHA1(1e50c2a920eb3b5c881843686db857e9fee5ba1d) )
430   ROM_LOAD( "bmk04.5h", 0x00000, 0x8000, CRC(25f37957) SHA1(1e50c2a920eb3b5c881843686db857e9fee5ba1d) )
424431
432   ROM_REGION( 0x10000, "mcu", 0 ) /*  C8751H-88 MCU Code */
433   ROM_LOAD( "bm.7k", 0x00000, 0x10000 , NO_DUMP ) /* can't be dumped */
434
425435   ROM_REGION( 0x8000, "gfx1", 0 )
426   ROM_LOAD( "1943kai.04",  0x00000, 0x8000, CRC(884a8692) SHA1(027aa8c868dc07ccd9e27705031107881aef4b91) )   /* characters */
436   ROM_LOAD( "bmk05.4k", 0x00000, 0x8000, CRC(884a8692) SHA1(027aa8c868dc07ccd9e27705031107881aef4b91) )   /* characters */
427437
428438   ROM_REGION( 0x40000, "gfx2", 0 )
429   ROM_LOAD( "1943kai.15",   0x00000, 0x8000, CRC(6b1a0443) SHA1(32337c840ccd6815fd5844c194365c58d708f6dc) )   /* bg tiles */
430   ROM_LOAD( "1943kai.16",   0x08000, 0x8000, CRC(9416fe0d) SHA1(92fbc8fffa4497747ab80abe20eef361f6525114) )
431   ROM_LOAD( "1943kai.17",   0x10000, 0x8000, CRC(3d5acab9) SHA1(887d45b648fda952ae2137579f383ab8ede1facd) )
432   ROM_LOAD( "1943kai.18",   0x18000, 0x8000, CRC(7b62da1d) SHA1(1926109a2ab2f550ca87b0d2af73abd2b4a7498d) )
433   ROM_LOAD( "1943kai.19",   0x20000, 0x8000, CRC(868ababc) SHA1(1c7be905f53c63bad25fbbd9b3cf82d2c7749bc3) )
434   ROM_LOAD( "1943kai.20",   0x28000, 0x8000, CRC(b90364c1) SHA1(104bc02237eeead84c7f35462186d0a1af8761bc) )
435   ROM_LOAD( "1943kai.21",   0x30000, 0x8000, CRC(8c7fe74a) SHA1(8846b57d7f47c10ab1f505c359ecf36dcbacb011) )
436   ROM_LOAD( "1943kai.22",   0x38000, 0x8000, CRC(d5ef8a0e) SHA1(2e42b1fbbfe823a33740a56d1334657db56d24d2) )
439   ROM_LOAD( "bmk15.10f", 0x00000, 0x8000, CRC(6b1a0443) SHA1(32337c840ccd6815fd5844c194365c58d708f6dc) )   /* bg tiles */
440   ROM_LOAD( "bmk16.11f", 0x08000, 0x8000, CRC(9416fe0d) SHA1(92fbc8fffa4497747ab80abe20eef361f6525114) )
441   ROM_LOAD( "bmk17.12f", 0x10000, 0x8000, CRC(3d5acab9) SHA1(887d45b648fda952ae2137579f383ab8ede1facd) )
442   ROM_LOAD( "bmk18.14f", 0x18000, 0x8000, CRC(7b62da1d) SHA1(1926109a2ab2f550ca87b0d2af73abd2b4a7498d) )
443   ROM_LOAD( "bmk19.10j", 0x20000, 0x8000, CRC(868ababc) SHA1(1c7be905f53c63bad25fbbd9b3cf82d2c7749bc3) )
444   ROM_LOAD( "bmk20.11j", 0x28000, 0x8000, CRC(b90364c1) SHA1(104bc02237eeead84c7f35462186d0a1af8761bc) )
445   ROM_LOAD( "bmk21.12j", 0x30000, 0x8000, CRC(8c7fe74a) SHA1(8846b57d7f47c10ab1f505c359ecf36dcbacb011) )
446   ROM_LOAD( "bmk22.14j", 0x38000, 0x8000, CRC(d5ef8a0e) SHA1(2e42b1fbbfe823a33740a56d1334657db56d24d2) )
437447
438448   ROM_REGION( 0x10000, "gfx3", 0 )
439   ROM_LOAD( "1943kai.24",   0x00000, 0x8000, CRC(bf186ef2) SHA1(cacbb8a61f8a64c3ba4ffde5ca6f07fe120b9a7e) )   /* fg tiles */
440   ROM_LOAD( "1943kai.25",   0x08000, 0x8000, CRC(a755faf1) SHA1(8ee286d6ad7454ae34971f5891ddba4b76c244b0) )
449   ROM_LOAD( "bmk24.14k", 0x00000, 0x8000, CRC(bf186ef2) SHA1(cacbb8a61f8a64c3ba4ffde5ca6f07fe120b9a7e) )   /* fg tiles */
450   ROM_LOAD( "bmk25.14l", 0x08000, 0x8000, CRC(a755faf1) SHA1(8ee286d6ad7454ae34971f5891ddba4b76c244b0) )
441451
442452   ROM_REGION( 0x40000, "gfx4", 0 )
443   ROM_LOAD( "1943kai.06",   0x00000, 0x8000, CRC(5f7e38b3) SHA1(33f69ebe91a0ee45d9107171fed26da475aaab3a) )   /* sprites */
444   ROM_LOAD( "1943kai.07",   0x08000, 0x8000, CRC(ff3751fd) SHA1(bc942ddd46e7b147115e8ac22d24c2d018a7c373) )
445   ROM_LOAD( "1943kai.08",   0x10000, 0x8000, CRC(159d51bd) SHA1(746aa49b18aff0eaf2fb875c573d455416d45a1d) )
446   ROM_LOAD( "1943kai.09",   0x18000, 0x8000, CRC(8683e3d2) SHA1(591dc4811b226fe11cd5441ecb51aa3e95e68ac5) )
447   ROM_LOAD( "1943kai.10",   0x20000, 0x8000, CRC(1e0d9571) SHA1(44ea9603020e9ab717e3e506f7ecf288506c0502) )
448   ROM_LOAD( "1943kai.11",   0x28000, 0x8000, CRC(f1fc5ee1) SHA1(4ffc8e57734d3b59df695b86070511f1c447b992) )
449   ROM_LOAD( "1943kai.12",   0x30000, 0x8000, CRC(0f50c001) SHA1(0e6367d3f0ba39a00ee0fa6e42ae9d43d12da23d) )
450   ROM_LOAD( "1943kai.13",   0x38000, 0x8000, CRC(fd1acf8e) SHA1(88477ff1e5fbbca251d8cd4f241b42618ba64a80) )
453   ROM_LOAD( "bmk06.10a", 0x00000, 0x8000, CRC(5f7e38b3) SHA1(33f69ebe91a0ee45d9107171fed26da475aaab3a) )   /* sprites */
454   ROM_LOAD( "bmk07.11a", 0x08000, 0x8000, CRC(ff3751fd) SHA1(bc942ddd46e7b147115e8ac22d24c2d018a7c373) )
455   ROM_LOAD( "bmk08.12a", 0x10000, 0x8000, CRC(159d51bd) SHA1(746aa49b18aff0eaf2fb875c573d455416d45a1d) )
456   ROM_LOAD( "bmk09.14a", 0x18000, 0x8000, CRC(8683e3d2) SHA1(591dc4811b226fe11cd5441ecb51aa3e95e68ac5) )
457   ROM_LOAD( "bmk10.10c", 0x20000, 0x8000, CRC(1e0d9571) SHA1(44ea9603020e9ab717e3e506f7ecf288506c0502) )
458   ROM_LOAD( "bmk11.11c", 0x28000, 0x8000, CRC(f1fc5ee1) SHA1(4ffc8e57734d3b59df695b86070511f1c447b992) )
459   ROM_LOAD( "bmk12.12c", 0x30000, 0x8000, CRC(0f50c001) SHA1(0e6367d3f0ba39a00ee0fa6e42ae9d43d12da23d) )
460   ROM_LOAD( "bmk13.14c", 0x38000, 0x8000, CRC(fd1acf8e) SHA1(88477ff1e5fbbca251d8cd4f241b42618ba64a80) )
451461
452462   ROM_REGION( 0x10000, "gfx5", 0 )   /* tilemaps */
453   ROM_LOAD( "1943kai.14",   0x0000, 0x8000, CRC(cf0f5a53) SHA1(dc50f3f937f52910dbd0cedbc232acfed0aa6a42) )   /* front background */
454   ROM_LOAD( "1943kai.23",   0x8000, 0x8000, CRC(17f77ef9) SHA1(8ebb4b440042436ec2db52bad808cced832db77c) )   /* back background */
463   ROM_LOAD( "bmk14.5f", 0x0000, 0x8000, CRC(cf0f5a53) SHA1(dc50f3f937f52910dbd0cedbc232acfed0aa6a42) )   /* front background */
464   ROM_LOAD( "bmk23.8k", 0x8000, 0x8000, CRC(17f77ef9) SHA1(8ebb4b440042436ec2db52bad808cced832db77c) )   /* back background */
455465
456466   ROM_REGION( 0x0c00, "proms", 0 )
457   ROM_LOAD( "bmk01.bin",    0x0000, 0x0100, CRC(e001ea33) SHA1(4204bdf87820ac84bab2a1b5571a2ee28c4cdfc5) )   /* red component */
458   ROM_LOAD( "bmk02.bin",    0x0100, 0x0100, CRC(af34d91a) SHA1(94bc6514c980fdd1cb013ff0819d6f32464c581c) )   /* green component */
459   ROM_LOAD( "bmk03.bin",    0x0200, 0x0100, CRC(43e9f6ef) SHA1(e1f58368fe0bd9b53f6c286ce5009b218a5197dc) )   /* blue component */
460   ROM_LOAD( "bmk05.bin",    0x0300, 0x0100, CRC(41878934) SHA1(8f28210ab1d409c89600169a136b74a706001cdf) )   /* char lookup table */
461   ROM_LOAD( "bmk10.bin",    0x0400, 0x0100, CRC(de44b748) SHA1(0694fb19d98ccda728424436fc7350da7b5bd05e) )   /* foreground lookup table */
462   ROM_LOAD( "bmk09.bin",    0x0500, 0x0100, CRC(59ea57c0) SHA1(f961c7e9981cc819c2adf4efdc977841d284a3a2) )   /* foreground palette bank */
463   ROM_LOAD( "bmk12.bin",    0x0600, 0x0100, CRC(8765f8b0) SHA1(f32bab8e3587434b864fe97da9423f2335ccba2e) )   /* background lookup table */
464   ROM_LOAD( "bmk11.bin",    0x0700, 0x0100, CRC(87a8854e) SHA1(0cbc601b736d566d625867d65e0f7b2abb535c65) )   /* background palette bank */
465   ROM_LOAD( "bmk08.bin",    0x0800, 0x0100, CRC(dad17e2d) SHA1(fdb18ddc7574153bb7e27ba08b04b9dc87061c02) )   /* sprite lookup table */
466   ROM_LOAD( "bmk07.bin",    0x0900, 0x0100, CRC(76307f8d) SHA1(8d655e2a5c50541795316d924b2f18b55f4b9571) )   /* sprite palette bank */
467   ROM_LOAD( "bmprom.04",    0x0a00, 0x0100, CRC(91a8a2e1) SHA1(9583c87eff876f04bc2ccf7218cd8081f1bcdb94) )   /* priority encoder / palette selector (not used) */
468   ROM_LOAD( "bmprom.06",    0x0b00, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) )   /* video timing (not used) */
467   ROM_LOAD( "bmk1.12a",  0x0000, 0x0100, CRC(e001ea33) SHA1(4204bdf87820ac84bab2a1b5571a2ee28c4cdfc5) )   /* red component */
468   ROM_LOAD( "bmk2.13a",  0x0100, 0x0100, CRC(af34d91a) SHA1(94bc6514c980fdd1cb013ff0819d6f32464c581c) )   /* green component */
469   ROM_LOAD( "bmk3.14a",  0x0200, 0x0100, CRC(43e9f6ef) SHA1(e1f58368fe0bd9b53f6c286ce5009b218a5197dc) )   /* blue component */
470   ROM_LOAD( "bmk5.7f",   0x0300, 0x0100, CRC(41878934) SHA1(8f28210ab1d409c89600169a136b74a706001cdf) )   /* char lookup table */
471   ROM_LOAD( "bmk10.7l",  0x0400, 0x0100, CRC(de44b748) SHA1(0694fb19d98ccda728424436fc7350da7b5bd05e) )   /* foreground lookup table */
472   ROM_LOAD( "bmk9.6l",   0x0500, 0x0100, CRC(59ea57c0) SHA1(f961c7e9981cc819c2adf4efdc977841d284a3a2) )   /* foreground palette bank */
473   ROM_LOAD( "bmk12.12m", 0x0600, 0x0100, CRC(8765f8b0) SHA1(f32bab8e3587434b864fe97da9423f2335ccba2e) )   /* background lookup table */
474   ROM_LOAD( "bmk11.12l", 0x0700, 0x0100, CRC(87a8854e) SHA1(0cbc601b736d566d625867d65e0f7b2abb535c65) )   /* background palette bank */
475   ROM_LOAD( "bmk8.8c",   0x0800, 0x0100, CRC(dad17e2d) SHA1(fdb18ddc7574153bb7e27ba08b04b9dc87061c02) )   /* sprite lookup table */
476   ROM_LOAD( "bmk7.7c",   0x0900, 0x0100, CRC(76307f8d) SHA1(8d655e2a5c50541795316d924b2f18b55f4b9571) )   /* sprite palette bank */
477   ROM_LOAD( "bm4.12c",   0x0a00, 0x0100, CRC(91a8a2e1) SHA1(9583c87eff876f04bc2ccf7218cd8081f1bcdb94) )   /* priority encoder / palette selector (not used) */
478   ROM_LOAD( "bm6.4b",    0x0b00, 0x0100, CRC(0eaf5158) SHA1(bafd4108708f66cd7b280e47152b108f3e254fc9) )   /* video timing (not used) */
469479ROM_END
470480
471481static DRIVER_INIT( 1943 )
src/mame/drivers/nss.c
r7772r7773
410410   PORT_CONFSETTING(    0x80, "BG4A (higher) only" )
411411
412412   PORT_START("DEBUG2")
413   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle BG 1") PORT_CODE(KEYCODE_1_PAD)
414   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle BG 2") PORT_CODE(KEYCODE_2_PAD)
415   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle BG 3") PORT_CODE(KEYCODE_3_PAD)
416   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle BG 4") PORT_CODE(KEYCODE_4_PAD)
417   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Objects") PORT_CODE(KEYCODE_5_PAD)
418   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Main/Sub") PORT_CODE(KEYCODE_6_PAD)
419   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Color Math") PORT_CODE(KEYCODE_7_PAD)
420   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Windows") PORT_CODE(KEYCODE_8_PAD)
413   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle BG 1") PORT_CODE(KEYCODE_1_PAD) PORT_TOGGLE
414   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle BG 2") PORT_CODE(KEYCODE_2_PAD) PORT_TOGGLE
415   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle BG 3") PORT_CODE(KEYCODE_3_PAD) PORT_TOGGLE
416   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle BG 4") PORT_CODE(KEYCODE_4_PAD) PORT_TOGGLE
417   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Objects") PORT_CODE(KEYCODE_5_PAD) PORT_TOGGLE
418   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Main/Sub") PORT_CODE(KEYCODE_6_PAD) PORT_TOGGLE
419   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Color Math") PORT_CODE(KEYCODE_7_PAD) PORT_TOGGLE
420   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Windows") PORT_CODE(KEYCODE_8_PAD) PORT_TOGGLE
421421
422422   PORT_START("DEBUG3")
423   PORT_BIT( 0x4, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mosaic") PORT_CODE(KEYCODE_9_PAD)
423   PORT_BIT( 0x4, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mosaic") PORT_CODE(KEYCODE_9_PAD) PORT_TOGGLE
424424   PORT_CONFNAME( 0x70, 0x00, "Select OAM priority" )
425425   PORT_CONFSETTING(    0x00, "All" )
426426   PORT_CONFSETTING(    0x10, "OAM0 only" )
r7772r7773
432432   PORT_CONFSETTING(    0x80, DEF_STR( On ) )
433433
434434   PORT_START("DEBUG4")
435   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 0 draw")
436   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 1 draw")
437   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 2 draw")
438   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 3 draw")
439   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 4 draw")
440   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 5 draw")
441   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 6 draw")
442   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 7 draw")
435   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 0 draw") PORT_TOGGLE
436   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 1 draw") PORT_TOGGLE
437   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 2 draw") PORT_TOGGLE
438   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 3 draw") PORT_TOGGLE
439   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 4 draw") PORT_TOGGLE
440   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 5 draw") PORT_TOGGLE
441   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 6 draw") PORT_TOGGLE
442   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Toggle Mode 7 draw") PORT_TOGGLE
443443#endif
444444INPUT_PORTS_END
445445
src/mame/drivers/supdrapo.c
r7772r7773
1/*
2 Super Draw Poker (c) Stern 1983
1/************************************************************************
32
4 driver by Pierpaolo Prazzoli
3  Super Draw Poker (c) Stern 1983
54
5  Driver by Pierpaolo Prazzoli.
6  Additional work by Angelo Salese & Roberto Fresca.
67
7A2-1C   8910
8A2-1D   Z80
9A1-1E
10A1-1H
11A3-1J
8*************************************************************************
129
13        A1-4K
14        A1-4L
15        A1-4N
16        A1-4P           A1-9N (6301)
17                        A1-9P
10  Notes:
1811
19 Notes:
20 - According to some original screenshots floating around the net, this game uses a weird coloring scheme for
21   the char text that dynamically changes the color of an entire column. For now I can only guess about how
22   it truly works.
23   An original snap of these can be seen at -> http://mamedev.emulab.it/kale/fast/files/A00000211628-007.jpg
12  - According to some original screenshots floating around the net, this game
13    uses a weird coloring scheme for the char text that dynamically changes
14    the color of an entire column. For now I can only guess about how it
15    truly works.
2416
25 To do:
26 - Needs schematics to check if the current implementation of the "global column coloring" is correct.
27 - Check unknown read/writes, too many of them.
17  - An original snap of these can be seen at:
18    http://mamedev.emulab.it/kale/fast/files/A00000211628-007.jpg
2819
29*/
3020
21*************************************************************************
22
23
24  Updates:
25
26  - Reworked inputs to match the standard poker inputs names/layout.
27  - Hooked the payout switch.
28  - Hooked a watchdog circuitery, that seems intended to reset
29     the game and/or an external device.
30  - Added machine start & reset.
31  - All clocks pre defined.
32  - Added ay8910 interfase as a preliminary attempt to analyze the unknown
33     port writes when these ports are set as input.
34  - Figured out the following DIP switches:
35     Auto Bet (No, Yes).
36     Allow Raise (No, Yes).
37     Double-Up (No, Yes).
38     Minimal Winner Hand (Jacks or Better, Two Pair).
39     Deal Speed (Slow, Fast).
40     Aces Type (Normal Aces, Number 1).
41     Cards Deck Type (english cards, french cards).
42     Max Bet (5, 10, 15, 20).
43  - Added NVRAM support.
44  - Reorganized and cleaned-up the driver.
45
46
47  To do:
48
49  - Needs schematics to check if the current implementation of the
50    "global column coloring" is correct.
51  - Check unknown read/writes, too many of them.
52  - Check the correct CPU and AY8910 clocks from PCB.
53  - A workaround for writes to ay8910 ports when these are set as input.
54
55
56************************************************************************/
57
58
59#define MASTER_CLOCK   XTAL_12MHz
60#define CPU_CLOCK      MASTER_CLOCK/4   /* guess */
61#define SND_CLOCK      MASTER_CLOCK/8   /* guess */
62
3163#include "emu.h"
3264#include "cpu/z80/z80.h"
3365#include "sound/ay8910.h"
3466
67UINT8 wdog;
3568
3669class supdrapo_state
3770{
r7772r7773
4578   UINT8 *videoram;
4679};
4780
81
82/*********************************************************************
83                           Video Hardware
84**********************************************************************/
85
86static VIDEO_START( supdrapo )
87{
88}
89
90
91static VIDEO_UPDATE( supdrapo )
92{
93   supdrapo_state *state = (supdrapo_state *)screen->machine->driver_data;
94   int x, y;
95   int count;
96   int color;
97
98   count = 0;
99
100   for(y = 0; y < 32; y++)
101   {
102      for(x = 0; x < 32; x++)
103      {
104         int tile = state->videoram[count] + state->char_bank[count] * 0x100;
105         /* Global Column Coloring, GUESS! */
106         color = state->col_line[(x*2) + 1] ? (state->col_line[(x*2) + 1] - 1) & 7 : 0;
107
108         drawgfx_opaque(bitmap, cliprect, screen->machine->gfx[0], tile,color, 0, 0, x*8, y*8);
109
110         count++;
111      }
112   }
113
114   return 0;
115}
116
117
118/*Maybe bit 2 & 3 of the second color prom are intensity bits? */
119static PALETTE_INIT( sdpoker )
120{
121   int   bit0, bit1, bit2 , r, g, b;
122   int   i;
123
124   for (i = 0; i < 0x100; ++i)
125   {
126      bit0 = 0;//(color_prom[0] >> 0) & 0x01;
127      bit1 = (color_prom[0] >> 0) & 0x01;
128      bit2 = (color_prom[0] >> 1) & 0x01;
129      g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
130
131      bit0 = 0;//(color_prom[0] >> 3) & 0x01;
132      bit1 = (color_prom[0] >> 2) & 0x01;
133      bit2 = (color_prom[0] >> 3) & 0x01;
134      b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
135
136      bit0 = 0;//(color_prom[0] >> 0) & 0x01;
137      bit1 = (color_prom[0x100] >> 0) & 0x01;
138      bit2 = (color_prom[0x100] >> 1) & 0x01;
139      r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
140
141      palette_set_color(machine, i, MAKE_RGB(r, g, b));
142      color_prom++;
143   }
144}
145
146
147/*********************************************************************
148                            R/W Handlers
149**********************************************************************/
150
48151static READ8_HANDLER( sdpoker_rng_r )
49152{
50153   return mame_rand(space->machine);
51154}
52155
156static WRITE8_HANDLER( wdog8000_w )
157{
158/*  Kind of state watchdog alternating 0x00 & 0x01 writes.
159    Used when exit the test mode (writes 2 consecutive 0's).
160    Seems to be intended to reset some external device.
161
162  Watchdog: 01
163  Watchdog: 00
164  Watchdog: 01
165  Watchdog: 00
166  Watchdog: 01
167  Watchdog: 00
168  Watchdog: 00 ---> Exit from test mode.
169
170  Debug3: 00
171  Watchdog: 00
172  Watchdog: 00
173
174  Debug3: 00
175  Watchdog: 01
176  Watchdog: 00
177  Watchdog: 01
178  Watchdog: 00
179  Watchdog: 01
180  Watchdog: 00
181
182*/
183   if (wdog == data)
184   {
185      watchdog_reset_w(space, 0, 0);   /* Reset */
186   }
187
188   wdog = data;
189//  logerror("Watchdog: %02X\n", data);
190}
191
192
193static WRITE8_HANDLER( debug8004_w )
194{
195/*  Writes 0x00 each time the machine is initialized */
196
197   logerror("debug8004: %02X\n", data);
198//  popmessage("written : %02X", data);
199}
200
201static WRITE8_HANDLER( debug7c00_w )
202{
203/*  This one write 0's constantly when the input test mode is running */
204   logerror("debug7c00: %02X\n", data);
205}
206
207
208/*********************************************************************
209                         Coin I/O Counters
210**********************************************************************/
211
212static WRITE8_HANDLER( coinin_w )
213{
214   coin_counter_w(space->machine, 0, data & 0x01);   /* Coin In */
215}
216
217static WRITE8_HANDLER( payout_w )
218{
219   coin_counter_w(space->machine, 1, data & 0x01);   /* Payout */
220}
221
222
223/*********************************************************************
224                        Machine Start & Reset
225**********************************************************************/
226
227static MACHINE_START( supdrapo )
228{
229   wdog = 1;
230}
231
232
233static MACHINE_RESET( supdrapo )
234{
235   wdog = 1;
236}
237
238
239/*********************************************************************
240                              Memory Map
241**********************************************************************/
242
53243static ADDRESS_MAP_START( sdpoker_mem, ADDRESS_SPACE_PROGRAM, 8 )
54244   AM_RANGE(0x0000, 0x4fff) AM_ROM
55245   AM_RANGE(0x5000, 0x50ff) AM_RAM AM_SHARE("share1")
r7772r7773
59249   AM_RANGE(0x6800, 0x6bff) AM_RAM AM_BASE_MEMBER(supdrapo_state,videoram)
60250   AM_RANGE(0x6c00, 0x6fff) AM_RAM AM_BASE_MEMBER(supdrapo_state,char_bank)
61251   AM_RANGE(0x7000, 0x7bff) AM_RAM //$7600 seems watchdog
62   AM_RANGE(0x7c00, 0x7c00) AM_WRITENOP //?
63   AM_RANGE(0x8000, 0x8000) AM_READ_PORT("IN4") AM_WRITENOP
252   AM_RANGE(0x7c00, 0x7c00) AM_WRITE(debug7c00_w)
253   AM_RANGE(0x8000, 0x8000) AM_READ_PORT("IN4") AM_WRITE(wdog8000_w)
64254   AM_RANGE(0x8001, 0x8001) AM_READ_PORT("IN0")
65   AM_RANGE(0x8002, 0x8002) AM_READ_PORT("IN1")
66   AM_RANGE(0x8003, 0x8003) AM_READ_PORT("IN2") AM_WRITENOP
67   AM_RANGE(0x8004, 0x8004) AM_READ_PORT("IN3") AM_WRITENOP
68   AM_RANGE(0x8005, 0x8005) AM_READ_PORT("IN6")
69   AM_RANGE(0x8006, 0x8006) AM_READ_PORT("IN5") //dips?
70   AM_RANGE(0x9000, 0x90ff) AM_RAM
255   AM_RANGE(0x8002, 0x8002) AM_READ_PORT("IN1") AM_WRITE(payout_w)
256   AM_RANGE(0x8003, 0x8003) AM_READ_PORT("IN2") AM_WRITE(coinin_w)
257   AM_RANGE(0x8004, 0x8004) AM_READ_PORT("IN3") AM_WRITE(debug8004_w)
258   AM_RANGE(0x8005, 0x8005) AM_READ_PORT("SW2")
259   AM_RANGE(0x8006, 0x8006) AM_READ_PORT("SW1")
260   AM_RANGE(0x9000, 0x90ff) AM_RAM AM_BASE_SIZE_GENERIC(nvram)
71261   AM_RANGE(0x9400, 0x9400) AM_READ(sdpoker_rng_r)
72262   AM_RANGE(0x9800, 0x9801) AM_DEVWRITE("aysnd", ay8910_data_address_w)
73263ADDRESS_MAP_END
74264
265
266/*********************************************************************
267                             Input Ports
268**********************************************************************/
269
75270static INPUT_PORTS_START( supdrapo )
76271   PORT_START("IN0")
77   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("P1 Win") PORT_CODE(KEYCODE_D) PORT_PLAYER(1)
78   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("P1 Cancel") PORT_CODE(KEYCODE_S) PORT_PLAYER(1)
79   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
80   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON11 ) PORT_NAME("P1 Bet") PORT_CODE(KEYCODE_A) PORT_PLAYER(1)
81   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN4 ) PORT_NAME("Coin : 10")
82   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN3 ) PORT_NAME("Coin :  5")
83   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_NAME("Coin :  2")
84   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_NAME("Coin :  1")
272   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON9 ) PORT_NAME("P1 Win/Take") PORT_CODE(KEYCODE_4) PORT_PLAYER(1)
273   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON8 ) PORT_NAME("P1 Cancel") PORT_CODE(KEYCODE_N) PORT_PLAYER(1)
274   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )  PORT_NAME("P1 Deal") PORT_CODE(KEYCODE_2) PORT_PLAYER(1)
275   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON11 ) PORT_NAME("P1 Bet/Play") PORT_CODE(KEYCODE_1) PORT_PLAYER(1)
276   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN4 ) PORT_NAME("Coin 4: 10")
277   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN3 ) PORT_NAME("Coin 3:  5")
278   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_NAME("Coin 2:  2")
279   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_NAME("Coin 1:  1")
85280
86281   PORT_START("IN1")
87282   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("P1 Hold 5") PORT_CODE(KEYCODE_B) PORT_PLAYER(1)
r7772r7773
89284   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("P1 Hold 3") PORT_CODE(KEYCODE_C) PORT_PLAYER(1)
90285   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("P1 Hold 2") PORT_CODE(KEYCODE_X) PORT_PLAYER(1)
91286   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("P1 Hold 1") PORT_CODE(KEYCODE_Z) PORT_PLAYER(1)
92   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("P1 Black") PORT_CODE(KEYCODE_Q) PORT_PLAYER(1)
93   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P1 Red") PORT_CODE(KEYCODE_W) PORT_PLAYER(1)
94   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON10 ) PORT_NAME("P1 Double Up") PORT_CODE(KEYCODE_E) PORT_PLAYER(1)
287   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("P1 Black") PORT_CODE(KEYCODE_A) PORT_PLAYER(1)
288   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("P1 Red") PORT_CODE(KEYCODE_S) PORT_PLAYER(1)
289   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON10 ) PORT_NAME("P1 Double Up") PORT_CODE(KEYCODE_3) PORT_PLAYER(1)
95290
96291   PORT_START("IN2")
97   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P2 Win") PORT_PLAYER(2)
292   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P2 Win/Take") PORT_PLAYER(2)
98293   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P2 Cancel") PORT_PLAYER(2)
99   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START2 )
100   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P2 Bet") PORT_PLAYER(2)
294   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P2 Deal") PORT_PLAYER(2)
295   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P2 Bet/Play") PORT_PLAYER(2)
101296   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P2 Coin : 10")
102297   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P2 Coin :  5")
103298   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("P2 Coin :  2")
r7772r7773
125320   PORT_DIPNAME( 0x10, 0x00, "4-5" )
126321   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
127322   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
128   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Credit Clear")
323   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Payout") PORT_CODE(KEYCODE_W)
129324   PORT_SERVICE_NO_TOGGLE( 0x40, IP_ACTIVE_HIGH )
130325   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )
131326   PORT_DIPSETTING(    0x00, "1 Player" )
132327   PORT_DIPSETTING(    0x80, "2 Players" )
133328
134   PORT_START("IN5")
135   PORT_DIPNAME( 0x01, 0x00, "5-1" )
136   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
137   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
138   PORT_DIPNAME( 0x02, 0x00, "5-2" )
139   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
140   PORT_DIPSETTING(    0x02, DEF_STR( On ) )
141   PORT_DIPNAME( 0x04, 0x00, "5-3" )
142   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
143   PORT_DIPSETTING(    0x04, DEF_STR( On ) )
144   PORT_DIPNAME( 0x08, 0x00, "5-4" )
145   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
146   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
147   PORT_DIPNAME( 0x10, 0x00, "5-5" )
148   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
149   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
150   PORT_DIPNAME( 0x20, 0x00, "5-6" )
151   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
152   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
329   PORT_START("SW1")
330   PORT_DIPNAME( 0x01, 0x01, "Auto Bet" )
331   PORT_DIPSETTING(    0x00, DEF_STR( No ) )
332   PORT_DIPSETTING(    0x01, DEF_STR( Yes ) )
333   PORT_DIPNAME( 0x02, 0x02, "Allow Raise" )
334   PORT_DIPSETTING(    0x00, DEF_STR( No ) )
335   PORT_DIPSETTING(    0x02, DEF_STR( Yes ) )
336   PORT_DIPNAME( 0x04, 0x04, "Double-Up" )
337   PORT_DIPSETTING(    0x00, DEF_STR( No ) )
338   PORT_DIPSETTING(    0x04, DEF_STR( Yes ) )
339   PORT_DIPNAME( 0x08, 0x08, "Minimal Winner Hand" )
340   PORT_DIPSETTING(    0x08, "Jacks or Better" )
341   PORT_DIPSETTING(    0x00, "Two Pair" )
342   PORT_DIPNAME( 0x10, 0x00, "Deal Speed" )
343   PORT_DIPSETTING(    0x00, "Slow" )
344   PORT_DIPSETTING(    0x10, "Fast" )
345   PORT_DIPNAME( 0x20, 0x00, "Aces Type" )
346   PORT_DIPSETTING(    0x00, "Normal Aces" )
347   PORT_DIPSETTING(    0x20, "Number 1" )
153348   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Language ) )
154349   PORT_DIPSETTING(    0x00, DEF_STR( English ) )
155350   PORT_DIPSETTING(    0x40, DEF_STR( French ) )
156   PORT_DIPNAME( 0x80, 0x00, "5-8" )
157   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
158   PORT_DIPSETTING(    0x80, DEF_STR( On ) )
351   PORT_DIPNAME( 0x80, 0x00, "Cards Deck Type" )
352   PORT_DIPSETTING(    0x00, "English Cards" )
353   PORT_DIPSETTING(    0x80, "French Cards" )
159354
160   PORT_START("IN6")
355   PORT_START("SW2")
161356   PORT_DIPNAME( 0x01, 0x00, "6-1" )
162357   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
163358   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
r7772r7773
176371   PORT_DIPNAME( 0x20, 0x00, "6-6" )
177372   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
178373   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
179   PORT_DIPNAME( 0x40, 0x00, "6-7" )
180   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
181   PORT_DIPSETTING(    0x40, DEF_STR( On ) )
182   PORT_DIPNAME( 0x80, 0x00, "6-8" )
183   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
184   PORT_DIPSETTING(    0x80, DEF_STR( On ) )
374   PORT_DIPNAME( 0xc0, 0xc0, "Max Bet" )
375   PORT_DIPSETTING(    0x00, "5" )
376   PORT_DIPSETTING(    0x40, "10" )
377   PORT_DIPSETTING(    0x80, "15" )
378   PORT_DIPSETTING(    0xc0, "30" )
185379INPUT_PORTS_END
186380
381
382/*********************************************************************
383                      Graphics Decode / Layout
384**********************************************************************/
385
187386static const gfx_layout charlayout =
188387{
189388   8,8,
r7772r7773
199398   GFXDECODE_ENTRY( "gfx1", 0, charlayout,   0, 16 )
200399GFXDECODE_END
201400
202static VIDEO_START( supdrapo )
401
402/*********************************************************************
403                         Sound Interface
404**********************************************************************/
405
406static WRITE8_DEVICE_HANDLER( ay8910_outputa_w )
203407{
408//  popmessage("ay8910_outputa_w %02x",data);
204409}
205410
206static VIDEO_UPDATE( supdrapo )
411static WRITE8_DEVICE_HANDLER( ay8910_outputb_w )
207412{
208   supdrapo_state *state = (supdrapo_state *)screen->machine->driver_data;
209   int x,y;
210   int count;
211   int color;
212
213   count = 0;
214
215   for(y=0;y<32;y++)
216   {
217      for(x=0;x<32;x++)
218      {
219         int tile = state->videoram[count] + state->char_bank[count] * 0x100;
220         /* Global Column Coloring, GUESS! */
221         color = state->col_line[(x*2)+1] ? (state->col_line[(x*2)+1]-1) & 0x7 : 0;
222
223         drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0],tile,color,0,0,x*8,y*8);
224
225         count++;
226      }
227   }
228
229   return 0;
413//  popmessage("ay8910_outputb_w %02x",data);
230414}
231415
232416
233/*Maybe bit 2 & 3 of the second color prom are intensity bits? */
234static PALETTE_INIT( sdpoker )
417static const ay8910_interface ay8910_config =
235418{
236   int   bit0, bit1, bit2 , r, g, b;
237   int   i;
419   AY8910_LEGACY_OUTPUT,
420   AY8910_DEFAULT_LOADS,
421   DEVCB_NULL,
422   DEVCB_NULL,
423   DEVCB_HANDLER(ay8910_outputa_w),
424   DEVCB_HANDLER(ay8910_outputb_w)
425};
238426
239   for (i = 0; i < 0x100; ++i)
240   {
241      bit0 = 0;//(color_prom[0] >> 0) & 0x01;
242      bit1 = (color_prom[0] >> 0) & 0x01;
243      bit2 = (color_prom[0] >> 1) & 0x01;
244      g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
245      bit0 = 0;//(color_prom[0] >> 3) & 0x01;
246      bit1 = (color_prom[0] >> 2) & 0x01;
247      bit2 = (color_prom[0] >> 3) & 0x01;
248      b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
249      bit0 = 0;//(color_prom[0] >> 0) & 0x01;
250      bit1 = (color_prom[0x100] >> 0) & 0x01;
251      bit2 = (color_prom[0x100] >> 1) & 0x01;
252      r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
253427
254      palette_set_color(machine, i, MAKE_RGB(r, g, b));
255      color_prom++;
256   }
257}
428/*********************************************************************
429                           Machine Driver
430**********************************************************************/
258431
259432static MACHINE_DRIVER_START( supdrapo )
260433
261434   MDRV_DRIVER_DATA( supdrapo_state )
262435
263   MDRV_CPU_ADD("maincpu", Z80,8000000/2) /* ??? */
436   MDRV_CPU_ADD("maincpu", Z80, CPU_CLOCK)   /* guess */
264437   MDRV_CPU_PROGRAM_MAP(sdpoker_mem)
265438   MDRV_CPU_VBLANK_INT("screen", irq0_line_hold)
266439
440   MDRV_MACHINE_START(supdrapo)
441   MDRV_MACHINE_RESET(supdrapo)
442
443   MDRV_NVRAM_HANDLER(generic_0fill)
444
267445   /* video hardware */
268446   MDRV_SCREEN_ADD("screen", RASTER)
269447   MDRV_SCREEN_REFRESH_RATE(60)
r7772r7773
281459
282460   MDRV_SPEAKER_STANDARD_MONO("mono")
283461
284   MDRV_SOUND_ADD("aysnd", AY8910, 8000000/2) /* ??? */
462   MDRV_SOUND_ADD("aysnd", AY8910, SND_CLOCK)   /* guess */
463   MDRV_SOUND_CONFIG(ay8910_config)
285464   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
286465MACHINE_DRIVER_END
287466
467
468/*********************************************************************
469                            ROMs Load
470**********************************************************************/
471
472/*
473A2-1C   8910
474A2-1D   Z80
475A1-1E
476A1-1H
477A3-1J
478
479        A1-4K
480        A1-4L
481        A1-4N
482        A1-4P           A1-9N (6301)
483                        A1-9P
484*/
288485ROM_START( supdrapo )
289486   ROM_REGION( 0x010000, "maincpu", 0 )
290487   ROM_LOAD( "a2-1c",        0x0000, 0x1000, CRC(b65af689) SHA1(b45cd15ca8f9c931d83a90f3cdbebf218070b195) )
r7772r7773
304501   ROM_LOAD( "a1-9p",        0x0100, 0x0100, CRC(a0547746) SHA1(747c8aef5afa26124fe0763e7f96c4ff6be31863) )
305502ROM_END
306503
504/*
505------------------------------------------
307506
308GAME( 1983, supdrapo, 0, supdrapo, supdrapo, 0, ROT90, "Valadon Automation (Stern license)", "Super Draw Poker", 0 )
507  Jeutel (bootleg?)
508
509  1x MOSTEK 8236 / MK3880N-IRL / Z80-CPU
510  1x SOUND AY-3-8910
511  1x X-TAL 12,000
512  2x 8 DIP switches banks.
513
514------------------------------------------
515*/
516ROM_START( supdrapoa )
517   ROM_REGION( 0x10000, "maincpu", 0 )
518   ROM_LOAD( "0.c1",   0x0000, 0x1000, CRC(63e2775a) SHA1(742e8db5378631fd93a22d2131f9523ee74c03a5) )
519   ROM_LOAD( "1.d1",   0x1000, 0x1000, CRC(aa1578de) SHA1(8f1a33864b2c8e09a25c7603522ebfc7e0757d56) )
520   ROM_LOAD( "2.e1",   0x2000, 0x1000, CRC(ffe0415c) SHA1(0233d192814ced0b32abd4b7d2e93431a339732f) )
521   ROM_LOAD( "3.h1",   0x3000, 0x1000, CRC(1bae52fa) SHA1(f89d48d67e52d0fca51eb23fee2d5cb94afcf7f4) )
522   ROM_LOAD( "4.j1",   0x4000, 0x1000, CRC(7af26f63) SHA1(aeeca69ef1c21acae4283183e4b073ec0d303f4a) )
523
524   ROM_REGION( 0x4000, "gfx1", 0 )
525   ROM_LOAD( "8.p4",   0x0000, 0x1000, CRC(ef0700c5) SHA1(53f49d99f310fdf675e3b7339bdca1115e4a1935) )
526   ROM_LOAD( "7.n4",   0x1000, 0x1000, CRC(3f77031b) SHA1(2d282d39ea568aa44af8b56228b6e096c2713a15) )
527   ROM_LOAD( "6.l4",   0x2000, 0x1000, CRC(d70cd50e) SHA1(c3e3dcf79f8a25df5b878ef8734a6d0dc22004ba) )
528   ROM_LOAD( "5.k4",   0x3000, 0x1000, CRC(34564917) SHA1(90b49fe8a5371159388839d42913352cf58c60e6) )
529
530   ROM_REGION( 0x00200, "proms", 0 )   /* using the color PROMs from the parent set */
531   ROM_LOAD( "a1-9n",        0x0000, 0x0100, BAD_DUMP CRC(e62529e3) SHA1(176f2069b0c06c1d088909e81658652af06c8eec) )
532   ROM_LOAD( "a1-9p",        0x0100, 0x0100, BAD_DUMP CRC(a0547746) SHA1(747c8aef5afa26124fe0763e7f96c4ff6be31863) )
533ROM_END
534
535
536/*********************************************************************
537                           Games Drivers
538**********************************************************************/
539
540/*    YEAR  NAME       PARENT    MACHINE   INPUT     INIT  ROT     COMPANY                               FULLNAME                   FLAGS... */
541GAME( 1983, supdrapo,  0,        supdrapo, supdrapo, 0,    ROT90, "Valadon Automation (Stern license)", "Super Draw Poker (set 1)", 0 )
542GAME( 1983, supdrapoa, supdrapo, supdrapo, supdrapo, 0,    ROT90, "Valadon Automation / Jeutel",        "Super Draw Poker (set 2)", 0 )
src/mame/drivers/namcos2.c
r7772r7773
46504650
46514651   ROM_REGION( 0x100000, "c140", 0 ) /* Sound voices */
46524652   ROM_LOAD( "gl1voi1.3m",  0x000000, 0x080000, CRC(0eca0efb) SHA1(4e8e1b3118ee0b76c34dd6631047080ba1fcf576) )
4653
4654   ROM_REGION( 0x2000, "nvram", 0 ) /* default settings, including calibration */
4655   ROM_LOAD( "gollygho.nv",  0x000000, 0x2000, CRC(b7e67b9d) SHA1(bb6e2d2cac1a2f3c26fa1327db0eb53b521005a3) )
46534656ROM_END
46544657
46554658/* BUBBLE TROUBLE */
r7772r7773
46974700
46984701   ROM_REGION( 0x100000, "c140", 0 ) /* Sound voices */
46994702   ROM_LOAD( "bt1-voi1.bin",  0x000000, 0x080000,  CRC(08b3a089) SHA1(5023c2c0d0a94f0a2f98605d9b93d2d6ce626aa8) )
4703
4704   ROM_REGION( 0x2000, "nvram", 0 ) /* default settings, including calibration */
4705   ROM_LOAD( "bubbletr.nv",  0x000000, 0x2000, CRC(75ace624) SHA1(1acd2af0c825e50c542db975e1fbda8cbb009f1d) )
47004706ROM_END
47014707
47024708
src/mame/drivers/dlair.c
r7772r7773
853853
854854ROM_START( dlital )      /* Italian Sidam version */
855855   ROM_REGION( 0x10000, "maincpu", 0 )
856   ROM_LOAD( "dlita45.bin", 0x0000, 0x2000, CRC(4d3a9eac) SHA1(e6cd274b4a0f92b1fb1f013f80f6fd2db3212431) )
857   ROM_LOAD( "dlita46.bin", 0x2000, 0x2000, CRC(8479612b) SHA1(b5543a06928274bde0e1bdda0747d936feaff177) )
858   ROM_LOAD( "dlita47.bin", 0x4000, 0x2000, CRC(6a66f6b4) SHA1(2bee981870e61977565439c34568952043656cfa) )
859   ROM_LOAD( "dlita48.bin", 0x6000, 0x2000, CRC(36575106) SHA1(178e26e7d5c7f879bc55c2fb170f3bb47a709610) )
856   ROM_LOAD( "dlita45.bin", 0x0000, 0x2000, CRC(2ed85958) SHA1(9651989775d215b279716b8c3e30d8e799d91b37) ) /* Label: ELU 45 SID */
857   ROM_LOAD( "dlita46.bin", 0x2000, 0x2000, CRC(8479612b) SHA1(b5543a06928274bde0e1bdda0747d936feaff177) ) /* Label: ELU 46 REV.B */
858   ROM_LOAD( "dlita47.bin", 0x4000, 0x2000, CRC(6a66f6b4) SHA1(2bee981870e61977565439c34568952043656cfa) ) /* Label: ELU 47 REV.B */
859   ROM_LOAD( "dlita48.bin", 0x6000, 0x2000, CRC(0c0b3011) SHA1(c3ac7bf870dd4ef12609c9cf25a7da68204b2889) ) /* Label: ELU 48 SID */
860860
861861   ROM_REGION( 0x2000, "gfx1", 0 )
862   ROM_LOAD( "dlita33.bin", 0x0000, 0x2000, CRC(e7506d96) SHA1(610ae25bd8db13b18b9e681e855ffa978043255b) )
862   ROM_LOAD( "dlita33.bin", 0x0000, 0x2000, CRC(e7506d96) SHA1(610ae25bd8db13b18b9e681e855ffa978043255b) ) /* Label: ELU 33 REV.B */
863863
864864   DISK_REGION( "laserdisc" )
865865   DISK_IMAGE_READONLY( "dleuro", 0, NO_DUMP )
src/mame/drivers/konamigx.c
r7772r7773
811811         if (cpu_get_pc(space->cpu) == 0x0236740)  rv = 0xffffffff;
812812         if (cpu_get_pc(space->cpu) == 0x023674e)  rv = 0xffffffff;
813813         break;
814      case 16: // Dragoon Might ver. JAA
815         {
816            UINT32 cur_pc;
817
818            cur_pc = cpu_get_pc(space->cpu);
819
820            switch(cur_pc)
821            {
822               case 0x203534: break; //ffc0, OK
823               case 0x20358a: rv = 0; break; // != ffc0
824               case 0x2035e4: rv = 0xffffffff; break; // != 0
825               case 0x2036e4: rv = 0x0000ff00; break; // 00ff
826               case 0x203766: rv = 0x5500aa00; break; // 00ff
827               case 0x2037e8: rv = 0xaa005500; break; // 00ff
828               case 0x20386a: rv = 0xff000000; break;
829               case 0x203960: rv = 0; break;
830               case 0x2039f2: rv = 0x0100ff00; break;
831               //default:
832               //  if(cur_pc != 0x20358a && cur_pc != 0x2038aa && cur_pc != 0x2038d4)
833               //      printf("Read 68k @ %x (PC=%x)\n", reg, cur_pc);
834            }
835         }
836         break;
814837   }
815838
816839   return(rv);
r7772r7773
36813704   { "puzldama",  7, 0, 0, BPP5 },
36823705   { "tbyahhoo",  7, 0, 8, BPP5 },
36833706   { "tkmmpzdm",  7, 0, 2, BPP6 },
3684   { "dragoonj",  7, 0, 3, BPP4 },
3685   { "dragoona",  7, 0, 3, BPP4 },
3707   { "dragoonj",  7, 16, 3, BPP4 },
3708   { "dragoona",  7, 16, 3, BPP4 },
36863709   { "sexyparo",  7, 0, 4, BPP5 },
36873710   { "daiskiss",  7, 0, 5, BPP5 },
36883711   { "tokkae",    7, 0, 0, BPP5 },
src/mame/drivers/hng64.c
r7772r7773
77Notes:
88  * The top board is likely identical for all revisions and all "versions" of the hardware.
99    It contains the main MIPS CPU and a secondary communications KL5C80.
10
1011  * The bottom board is what changes between hardware "versions".  It has a Toshiba MCU with
1112    a protected internal ROM.  This MCU controls (at least) the inputs per game and communicates
1213    with the main board through dualport RAM.
14
1315  * I believe that this secondary board is used as a protection device.
1416    The "board type" code comes from it in dualport RAM, and each game reads its inputs differently through dualport.
1517    It's capable of changing the input ports dynamically (maybe explaining Roads Edge's "do not touch" quote below).
1618    It probably has a lot to do with the network (Roads Edge network connectors are on this board).
17    And since it can return any value at any time, it may be responsible for fatfurwa's missing palette.
19
1820  * The Toshiba CPU datasheet is here : http://www.semicon.toshiba.co.jp/openb2b/websearch/productDetails.jsp?partKey=TMP87CH40N
1921
2022  * From the Roads Edge manual : "The Network Check screen will be displayed for about 40 seconds whether
r7772r7773
2830
2931ToDo:
3032  * Buriki One / Xrally and Roads Edge doesn't coin it up, irq issue?
31  * sprite garbage in Beast Busters 2nd Nightmare, another irq issue?
33  * Sprite garbage in Beast Busters 2nd Nightmare, another irq issue?
3234  * Samurai Shodown 64 2 puts "Press 1p & 2p button" msg in gameplay, known to be a MCU simulation issue, i/o port 4 doesn't
3335    seem to be just an input port but controls program flow too.
34  * work out the purpose of the interrupts and how many are needed
35  * correct game speed (seems too fast)
36  * Work out the purpose of the interrupts and how many are needed.
37  * Correct game speed (seems too fast).
3638
3739  2d:
38  * scroll (base registers?)
39  * roz (4th tilemap in fatal fury should be floor [in progress], background should zoom)
40  * find registers to control tilemap mode (4bpp/8bpp, 8x8, 16x16)
41  * fix zooming sprites (zoom registers not understood, center versus edge pivot)
42  * priorities
43  * still some bad sprites/tiles (waterfall level 'splash' - health bar at 50% - intro top and bottom - fatfurwa test mode)
44  * is all the bitmap decoding right?
45  * upgrade to modern video timing.
40  * Scroll (base registers?)
41  * ROZ (4th tilemap in fatal fury should be floor [in progress], background should zoom)
42  * Find registers to control tilemap mode (4bpp/8bpp, 8x8, 16x16)
43  * Fix zooming sprites (zoom registers not understood, center versus edge pivot)
44  * Priorities
45  * Is all the bitmap decoding right?
46  * Upgrade to modern video timing.
4647
4748  3d:
4849  * Find where the remainder of the 3d display list information is 'hiding'
r7772r7773
5354
5455  Other:
5556  * Translate KL5C80 docs and finish up the implementation
56  * figure out what IO $54 & $72 are on the communications CPU
57  * hook up CPU2 (v30 based?) no rom? (maybe its the 'sound driver' the game uploads?)
58  * add sound
59  * backup ram etc.
60  * correct cpu speed and find idle skips
57  * Figure out what IO $54 & $72 are on the communications CPU
58  * Hook up CPU2 (v30 based?) no rom? (maybe its the 'sound driver' the game uploads?)
59  * Add sound
60  * Backup ram etc.
61  * Correct cpu speed
6162  * What is ROM1?  Data for the KL5C80?  There's plenty of physical space to map it to.
6263*/
6364
r7772r7773
200201
201202
202203
203
204204Hyper Neo Geo game cartridges
205205-----------------------------
206206
r7772r7773
284284
285285Bottom
286286------
287
288287LVS-DG1
289288|----------------------------------------------------------------------------|
290289|                         |----------------------|                           |
r7772r7773
424423
425424info from Daemon
426425
427(MACHINE CODE ERROR):
428Is given when you try to put a "RACING GAME" on a "FIGHTING" board.
429
430426There are various types of neogeo64 boards:
431FIGHTING (revision 1 and 2)
432RACING
433SHOOTING
434and
435SAMURAI SHODOWN ONLY (Korean)
427FIGHTING (revision 1 & 2), RACING, SHOOTING, and SAMURAI SHODOWN ONLY (Korean)
428(MACHINE CODE ERROR): Is given when you try to put a "RACING GAME" on a "FIGHTING" board.
436429
437430FIGHTING boards will ONLY play fighting games.
438431
r7772r7773
480473VIDEO_UPDATE( hng64 );
481474
482475static UINT32 activeBuffer;
483
484
485476static UINT32 no_machine_error_code;
486477static int hng64_interrupt_level_request;
487478
r7772r7773
493484
494485/* Communications stuff */
495486static UINT32 *hng64_com_ram;
487static UINT8  *hng64_com_op_base;
488static UINT8  *hng64_com_mmu_mem;
489static UINT8  *hng64_com_virtual_mem;
496490
497static UINT8 *hng64_com_virtual_mem;
498static UINT8 *hng64_com_op_base;
499491
500static UINT8 *hng64_com_mmu_mem;
501
502
503492#ifdef UNUSED_FUNCTION
504493WRITE32_HANDLER( trap_write )
505494{
506495    logerror("Remapped write... %08x %08x\n",offset,data);
507496}
508#endif
509497
510
511
512#if 0
513498static READ32_HANDLER( hng64_random_read )
514499{
515500   return mame_rand(space->machine)&0xffffffff;
r7772r7773
522507   return hng64_com_ram[offset];
523508}
524509
525
526510static WRITE32_HANDLER( hng64_com_w )
527511{
528512   logerror("com write (PC=%08x): %08x %08x = %08x\n", cpu_get_pc(space->cpu), (offset*4)+0xc0000000, mem_mask, data);
r7772r7773
554538   return 0x00;
555539}
556540
557
558
559541static WRITE32_HANDLER( hng64_pal_w )
560542{
561   int r,g,b,a;
543   int r, g, b/*, a*/;
562544   COMBINE_DATA(&space->machine->generic.paletteram.u32[offset]);
563545
564546   b = ((space->machine->generic.paletteram.u32[offset] & 0x000000ff) >>0);
565547   g = ((space->machine->generic.paletteram.u32[offset] & 0x0000ff00) >>8);
566548   r = ((space->machine->generic.paletteram.u32[offset] & 0x00ff0000) >>16);
567   a = ((space->machine->generic.paletteram.u32[offset] & 0xff000000) >>24);
568
569   // a sure ain't alpha.
570   // mame_printf_debug("Alpha : %d %d %d %d\n", a, b, g, r);
571
572   //if (a != 0)
573   //  popmessage("Alpha is not zero!");
574
549   //a = ((space->machine->generic.paletteram.u32[offset] & 0xff000000) >>24);
575550   palette_set_color(space->machine,offset,MAKE_RGB(r,g,b));
576551}
577552
r7772r7773
581556   mame_get_base_datetime(space->machine, &systime);
582557
583558//  if((offset*4) != 0x1084)
584//    printf("HNG64 port read (PC=%08x) 0x%08x\n", cpu_get_pc(space->cpu),offset*4);
559//      printf("HNG64 port read (PC=%08x) 0x%08x\n", cpu_get_pc(space->cpu),offset*4);
585560
586561   switch(offset*4)
587562   {
r7772r7773
614589
615590//  printf("%08x\n",offset*4);
616591
617   //return mame_rand(space->machine)&0xffffffff;
592//  return mame_rand(space->machine)&0xffffffff;
618593   return hng64_sysregs[offset];
619594}
620595
r7772r7773
623598
624599static void hng64_do_dma(const address_space *space)
625600{
626   //printf("Performing DMA Start %08x Len %08x Dst %08x\n",hng_dma_start, hng_dma_len, hng_dma_dst);
601//  printf("Performing DMA Start %08x Len %08x Dst %08x\n",hng_dma_start, hng_dma_len, hng_dma_dst);
627602
628603   while (hng_dma_len>=0)
629604   {
r7772r7773
647622//  AM_RANGE(0x1F70124C, 0x1F70124F) AM_WRITENOP        // dma related?
648623//  AM_RANGE(0x1F70125C, 0x1F70125F) AM_WRITENOP        // dma related?
649624//  AM_RANGE(0x1F7021C4, 0x1F7021C7) AM_WRITENOP        // ?? often
650
651625*/
652626
653627static WRITE32_HANDLER( hng64_sysregs_w )
r7772r7773
655629   COMBINE_DATA (&hng64_sysregs[offset]);
656630
657631//  if(((offset*4) & 0x1200) == 0x1200)
658//  printf("HNG64 writing to SYSTEM Registers 0x%08x == 0x%08x. (PC=%08x)\n", offset*4, hng64_sysregs[offset], cpu_get_pc(space->cpu));
632//      printf("HNG64 writing to SYSTEM Registers 0x%08x == 0x%08x. (PC=%08x)\n", offset*4, hng64_sysregs[offset], cpu_get_pc(space->cpu));
659633
660634   switch(offset*4)
661635   {
662      //case 0x100c: Extremely likely to be involved with the ROZ groundplane.
663      //             Probably tells the groundplane which scanline to start drawing at.
636      //case 0x100c: *DOCUMENT*
664637
665638      case 0x1084: //MIPS->MCU latch port
666639         hng_mcu_en = (data & 0xff); //command-based, i.e. doesn't control halt line and such?
r7772r7773
744717      {
745718         static UINT32 p1_trig;
746719
747         /* quick kludge for use the input test items */
720         /* Quick kludge for use the input test items */
748721         if(input_port_read(space->machine, "D_IN") & 0x01000000)
749722            p1_trig = mame_rand(space->machine) & 0x01000000;
750723
r7772r7773
841814   COMBINE_DATA (&hng64_dualport[offset]);
842815}
843816
817
844818// Hardware calls these '3d buffers'
845819//   They're only read during the startup check of fatfurwa.  Z-buffer memory?  Front buffer, back buffer?
846820//   They're definitely mirrored in the startup test.  Elsemi says:
r7772r7773
870844   COMBINE_DATA (&hng64_3d_2[offset]);
871845}
872846
873
874
875// The 3d 'display list' - is it a fifo?
876// sams64 / sams64_2 access it in a very different way to fatal fury...
847// The 3d 'display list'
877848static WRITE32_HANDLER( dl_w )
878849{
879850   int i;
r7772r7773
908879#if 0
909880static READ32_HANDLER( dl_r )
910881{
911//  mame_printf_debug("dl R (%08x) : %x %x\n", cpu_get_pc(space->cpu), offset, hng64_dl[offset]);
912//  usrintf_showmessage("dl R (%08x) : %x %x", cpu_get_pc(space->cpu), offset, hng64_dl[offset]);
882   //mame_printf_debug("dl R (%08x) : %x %x\n", cpu_get_pc(space->cpu), offset, hng64_dl[offset]);
883   //usrintf_showmessage("dl R (%08x) : %x %x", cpu_get_pc(space->cpu), offset, hng64_dl[offset]);
913884   return hng64_dl[offset];
914885}
915886#endif
916887
917
918// A read at 0x20300217 ONLY happens if there are more display lists than what are readily available.
919
920888// Some kind of buffering of the display lists, or 'render current buffer' write?
921889static WRITE32_HANDLER( dl_control_w )
922890{
923   //printf("\n");   // Debug - ajg
891//  printf("\n");   // Debug - ajg
924892   // TODO: put this back in.
925893   /*
926894    if (activeBuffer==0 || activeBuffer==1)
r7772r7773
957925      max_x = (hng64_tcram[2] & 0xffff0000) >> 16;
958926      max_y = (hng64_tcram[2] & 0x0000ffff) >> 0;
959927
960      if(max_x == 0 || max_y == 0) //bail out if values are invalid, Fatal Fury WA sets this to disable the screen.
928      if(max_x == 0 || max_y == 0) // bail out if values are invalid, Fatal Fury WA sets this to disable the screen.
961929      {
962930         hng64_screen_dis = 1;
963931         return;
r7772r7773
975943
976944static READ32_HANDLER( tcram_r )
977945{
978//      printf("Q1 R : %.8x %.8x\n", offset, hng64_tcram[offset]);
979
946//  printf("Q1 R : %.8x %.8x\n", offset, hng64_tcram[offset]);
980947   if(offset == 0x12)
981948      return input_port_read(space->machine, "VBLANK");
982949
r7772r7773
992959}
993960
994961
995/*
996<ElSemi> 0xE0000000 sound
997<ElSemi> 0xD0100000 3D bank A
998<ElSemi> 0xD0200000 3D bank B
999<ElSemi> 0xC0000000-0xC000C000 Sprite
1000<ElSemi> 0xC0200000-0xC0204000 palette
1001<ElSemi> 0xC0100000-0xC0180000 Tilemap
1002<ElSemi> 0xBF808000-0xBF808800 Dualport ram
1003<ElSemi> 0xBF800000-0xBF808000 S-RAM
1004<ElSemi> 0x60000000-0x60001000 Comm dualport ram
1005*/
1006
1007962static WRITE32_HANDLER( hng64_soundram_w )
1008963{
1009964   UINT32 mem_mask32 = mem_mask;
1010965   UINT32 data32 = data;
1011966
1012   /* swap data around.. keep the v30 happy;-) */
967   /* swap data around.. keep the v55 happy */
1013968   data = data32 >> 16;
1014969   data = FLIPENDIAN_INT16(data);
1015970   mem_mask = mem_mask32 >> 16;
r7772r7773
10761031   }
10771032}
10781033
1034/*
1035<ElSemi> 0xE0000000 sound
1036<ElSemi> 0xD0100000 3D bank A
1037<ElSemi> 0xD0200000 3D bank B
1038<ElSemi> 0xC0000000-0xC000C000 Sprite
1039<ElSemi> 0xC0200000-0xC0204000 palette
1040<ElSemi> 0xC0100000-0xC0180000 Tilemap
1041<ElSemi> 0xBF808000-0xBF808800 Dualport ram
1042<ElSemi> 0xBF800000-0xBF808000 S-RAM
1043<ElSemi> 0x60000000-0x60001000 Comm dualport ram
1044*/
10791045static ADDRESS_MAP_START( hng_map, ADDRESS_SPACE_PROGRAM, 32 )
10801046
10811047   AM_RANGE(0x00000000, 0x00ffffff) AM_RAM AM_BASE(&hng_mainram)
r7772r7773
11341100   /* a0000000-a3ffffff */
11351101ADDRESS_MAP_END
11361102
1137/*
1138roadedge_full:
1139index=00000000  pagesize=01000000  vaddr=00000000C0000000  paddr=0000000020000000  asid=00  r=0  c=2  dvg=dvg
1140index=00000000  pagesize=01000000  vaddr=00000000C1000000  paddr=0000000021000000  asid=00  r=0  c=2  dvg=dvg
1141index=00000001  pagesize=01000000  vaddr=00000000D0000000  paddr=0000000030000000  asid=00  r=0  c=2  dvg=dvg
1142index=00000001  pagesize=01000000  vaddr=00000000D1000000  paddr=0000000031000000  asid=00  r=0  c=2  dvg=dvg
1143index=00000002  pagesize=01000000  vaddr=00000000D2000000  paddr=0000000032000000  asid=00  r=0  c=2  dvg=dvg
1144index=00000002  pagesize=01000000  vaddr=00000000D3000000  paddr=0000000033000000  asid=00  r=0  c=2  dvg=dvg
1145index=00000003  pagesize=01000000  vaddr=00000000D4000000  paddr=0000000034000000  asid=00  r=0  c=2  dvg=dvg
1146index=00000003  pagesize=01000000  vaddr=00000000D5000000  paddr=0000000035000000  asid=00  r=0  c=2  dvg=dvg
1147index=00000004  pagesize=01000000  vaddr=00000000E0000000  paddr=0000000060000000  asid=00  r=0  c=2  dvg=dvg
1148index=00000004  pagesize=01000000  vaddr=00000000E1000000  paddr=0000000061000000  asid=00  r=0  c=2  dvg=dvg
1149index=00000005  pagesize=01000000  vaddr=00000000E8000000  paddr=0000000068000000  asid=00  r=0  c=2  dvg=dvg
1150index=00000005  pagesize=01000000  vaddr=00000000E9000000  paddr=0000000069000000  asid=00  r=0  c=2  dvg=dvg
1151index=00000006  pagesize=01000000  vaddr=00000000EE000000  paddr=000000006E000000  asid=00  r=0  c=2  dvg=dvg
1152index=00000006  pagesize=01000000  vaddr=00000000EF000000  paddr=000000006F000000  asid=00  r=0  c=2  dvg=dvg
1153index=00000007  pagesize=01000000  vaddr=0000000060000000  paddr=00000000C0000000  asid=00  r=0  c=2  dvg=dvg
1154index=00000007  pagesize=01000000  vaddr=0000000061000000  paddr=00000000C1000000  asid=00  r=0  c=2  dvg=dvg
1155index=00000008  pagesize=01000000  vaddr=0000000000000000  paddr=0000000004000000  asid=00  r=0  c=2  dvg=dvg
1156index=00000008  pagesize=01000000  vaddr=0000000001000000  paddr=0000000004000000  asid=00  r=0  c=2  dvg=dvg
1157index=00000009  pagesize=01000000  vaddr=0000000010000000  paddr=0000000080000000  asid=00  r=0  c=2  dvg=dvg
1158index=00000009  pagesize=01000000  vaddr=0000000011000000  paddr=0000000081000000  asid=00  r=0  c=2  dvg=dvg
1159index=0000000A  pagesize=01000000  vaddr=0000000020000000  paddr=0000000088000000  asid=00  r=0  c=2  dvg=dvg
1160index=0000000A  pagesize=01000000  vaddr=0000000021000000  paddr=0000000089000000  asid=00  r=0  c=2  dvg=dvg
1161index=0000000B  pagesize=01000000  vaddr=0000000030000000  paddr=0000000090000000  asid=00  r=0  c=2  dvg=dvg
1162index=0000000B  pagesize=01000000  vaddr=0000000031000000  paddr=0000000091000000  asid=00  r=0  c=2  dvg=dvg
1163index=0000000C  pagesize=01000000  vaddr=0000000032000000  paddr=0000000092000000  asid=00  r=0  c=2  dvg=dvg
1164index=0000000C  pagesize=01000000  vaddr=0000000033000000  paddr=0000000093000000  asid=00  r=0  c=2  dvg=dvg
1165index=0000000D  pagesize=01000000  vaddr=0000000034000000  paddr=0000000094000000  asid=00  r=0  c=2  dvg=dvg
1166index=0000000D  pagesize=01000000  vaddr=0000000035000000  paddr=0000000095000000  asid=00  r=0  c=2  dvg=dvg
1167index=0000000E  pagesize=01000000  vaddr=0000000036000000  paddr=0000000096000000  asid=00  r=0  c=2  dvg=dvg
1168index=0000000E  pagesize=01000000  vaddr=0000000037000000  paddr=0000000097000000  asid=00  r=0  c=2  dvg=dvg
1169index=0000000F  pagesize=01000000  vaddr=0000000040000000  paddr=0000000098000000  asid=00  r=0  c=2  dvg=dvg
1170index=0000000F  pagesize=01000000  vaddr=0000000041000000  paddr=0000000099000000  asid=00  r=0  c=2  dvg=dvg
1171index=00000010  pagesize=01000000  vaddr=0000000042000000  paddr=000000009A000000  asid=00  r=0  c=2  dvg=dvg
1172index=00000010  pagesize=01000000  vaddr=0000000043000000  paddr=000000009B000000  asid=00  r=0  c=2  dvg=dvg
1173index=00000011  pagesize=01000000  vaddr=0000000050000000  paddr=00000000A0000000  asid=00  r=0  c=2  dvg=dvg
1174index=00000011  pagesize=01000000  vaddr=0000000051000000  paddr=00000000A1000000  asid=00  r=0  c=2  dvg=dvg
1175index=00000012  pagesize=01000000  vaddr=0000000052000000  paddr=00000000A2000000  asid=00  r=0  c=2  dvg=dvg
1176index=00000012  pagesize=01000000  vaddr=0000000053000000  paddr=00000000A3000000  asid=00  r=0  c=2  dvg=dvg
1177
1178fatfurwa_full:
1179index=00000000  pagesize=01000000  vaddr=00000000C0000000  paddr=0000000020000000  asid=00  r=0  c=2  dvg=dvg
1180index=00000000  pagesize=01000000  vaddr=00000000C1000000  paddr=0000000021000000  asid=00  r=0  c=2  dvg=dvg
1181index=00000001  pagesize=01000000  vaddr=00000000D0000000  paddr=0000000030000000  asid=00  r=0  c=2  dvg=dvg
1182index=00000001  pagesize=01000000  vaddr=00000000D1000000  paddr=0000000031000000  asid=00  r=0  c=2  dvg=dvg
1183index=00000002  pagesize=01000000  vaddr=00000000D2000000  paddr=0000000032000000  asid=00  r=0  c=2  dvg=dvg
1184index=00000002  pagesize=01000000  vaddr=00000000D3000000  paddr=0000000033000000  asid=00  r=0  c=2  dvg=dvg
1185index=00000003  pagesize=01000000  vaddr=00000000D4000000  paddr=0000000034000000  asid=00  r=0  c=2  dvg=dvg
1186index=00000003  pagesize=01000000  vaddr=00000000D5000000  paddr=0000000035000000  asid=00  r=0  c=2  dvg=dvg
1187index=00000004  pagesize=01000000  vaddr=00000000E0000000  paddr=0000000060000000  asid=00  r=0  c=2  dvg=dvg
1188index=00000004  pagesize=01000000  vaddr=00000000E1000000  paddr=0000000061000000  asid=00  r=0  c=2  dvg=dvg
1189index=00000006  pagesize=01000000  vaddr=00000000E8000000  paddr=0000000068000000  asid=00  r=0  c=2  dvg=dvg
1190index=00000006  pagesize=01000000  vaddr=00000000E9000000  paddr=0000000069000000  asid=00  r=0  c=2  dvg=dvg
1191index=00000009  pagesize=01000000  vaddr=00000000EE000000  paddr=000000006E000000  asid=00  r=0  c=2  dvg=dvg
1192index=00000009  pagesize=01000000  vaddr=00000000EF000000  paddr=000000006F000000  asid=00  r=0  c=2  dvg=dvg
1193index=0000000B  pagesize=01000000  vaddr=0000000000000000  paddr=0000000004000000  asid=00  r=0  c=2  dvg=dvg
1194index=0000000B  pagesize=01000000  vaddr=0000000001000000  paddr=0000000004000000  asid=00  r=0  c=2  dvg=dvg
1195index=0000000C  pagesize=01000000  vaddr=0000000010000000  paddr=0000000080000000  asid=00  r=0  c=2  dvg=dvg
1196index=0000000C  pagesize=01000000  vaddr=0000000011000000  paddr=0000000081000000  asid=00  r=0  c=2  dvg=dvg
1197index=0000000D  pagesize=01000000  vaddr=0000000020000000  paddr=0000000088000000  asid=00  r=0  c=2  dvg=dvg
1198index=0000000D  pagesize=01000000  vaddr=0000000021000000  paddr=0000000089000000  asid=00  r=0  c=2  dvg=dvg
1199index=0000000E  pagesize=01000000  vaddr=0000000030000000  paddr=0000000090000000  asid=00  r=0  c=2  dvg=dvg
1200index=0000000E  pagesize=01000000  vaddr=0000000031000000  paddr=0000000091000000  asid=00  r=0  c=2  dvg=dvg
1201index=0000000F  pagesize=01000000  vaddr=0000000032000000  paddr=0000000092000000  asid=00  r=0  c=2  dvg=dvg
1202index=0000000F  pagesize=01000000  vaddr=0000000033000000  paddr=0000000093000000  asid=00  r=0  c=2  dvg=dvg
1203index=00000010  pagesize=01000000  vaddr=0000000034000000  paddr=0000000094000000  asid=00  r=0  c=2  dvg=dvg
1204index=00000010  pagesize=01000000  vaddr=0000000035000000  paddr=0000000095000000  asid=00  r=0  c=2  dvg=dvg
1205index=00000011  pagesize=01000000  vaddr=0000000036000000  paddr=0000000096000000  asid=00  r=0  c=2  dvg=dvg
1206index=00000011  pagesize=01000000  vaddr=0000000037000000  paddr=0000000097000000  asid=00  r=0  c=2  dvg=dvg
1207index=00000012  pagesize=01000000  vaddr=0000000040000000  paddr=0000000098000000  asid=00  r=0  c=2  dvg=dvg
1208index=00000012  pagesize=01000000  vaddr=0000000041000000  paddr=0000000099000000  asid=00  r=0  c=2  dvg=dvg
1209index=00000013  pagesize=01000000  vaddr=0000000042000000  paddr=000000009A000000  asid=00  r=0  c=2  dvg=dvg
1210index=00000013  pagesize=01000000  vaddr=0000000043000000  paddr=000000009B000000  asid=00  r=0  c=2  dvg=dvg
1211index=00000014  pagesize=01000000  vaddr=0000000050000000  paddr=00000000A0000000  asid=00  r=0  c=2  dvg=dvg
1212index=00000014  pagesize=01000000  vaddr=0000000051000000  paddr=00000000A1000000  asid=00  r=0  c=2  dvg=dvg
1213index=00000015  pagesize=01000000  vaddr=0000000052000000  paddr=00000000A2000000  asid=00  r=0  c=2  dvg=dvg
1214index=00000015  pagesize=01000000  vaddr=0000000053000000  paddr=00000000A3000000  asid=00  r=0  c=2  dvg=dvg
1215index=00000016  pagesize=01000000  vaddr=0000000060000000  paddr=00000000C0000000  asid=00  r=0  c=2  dvg=dvg
1216index=00000016  pagesize=01000000  vaddr=0000000061000000  paddr=00000000C1000000  asid=00  r=0  c=2  dvg=dvg
1217
1218
1219roadedge/fatfurwa/buriki:
1220index=00000000  pagesize=01000000  vaddr=00000000C0000000  paddr=0000000020000000  asid=00  r=0  c=2  dvg=dvg
1221index=00000000  pagesize=01000000  vaddr=00000000C1000000  paddr=0000000021000000  asid=00  r=0  c=2  dvg=dvg
1222index=00000001  pagesize=01000000  vaddr=00000000D0000000  paddr=0000000030000000  asid=00  r=0  c=2  dvg=dvg
1223index=00000001  pagesize=01000000  vaddr=00000000D1000000  paddr=0000000031000000  asid=00  r=0  c=2  dvg=dvg
1224index=00000004  pagesize=01000000  vaddr=00000000E0000000  paddr=0000000060000000  asid=00  r=0  c=2  dvg=dvg
1225index=00000004  pagesize=01000000  vaddr=00000000E1000000  paddr=0000000061000000  asid=00  r=0  c=2  dvg=dvg
1226index=00000007  pagesize=01000000  vaddr=0000000060000000  paddr=00000000C0000000  asid=00  r=0  c=2  dvg=dvg
1227index=00000007  pagesize=01000000  vaddr=0000000061000000  paddr=00000000C1000000  asid=00  r=0  c=2  dvg=dvg
1228
1229sams64_2:
1230index=00000000  pagesize=01000000  vaddr=00000000C0000000  paddr=0000000020000000  asid=00  r=0  c=2  dvg=dvg
1231index=00000000  pagesize=01000000  vaddr=00000000C1000000  paddr=0000000021000000  asid=00  r=0  c=2  dvg=dvg
1232index=00000001  pagesize=01000000  vaddr=00000000C2000000  paddr=0000000030000000  asid=00  r=0  c=2  dvg=dvg
1233index=00000001  pagesize=01000000  vaddr=00000000C3000000  paddr=0000000031000000  asid=00  r=0  c=2  dvg=dvg
1234index=00000002  pagesize=01000000  vaddr=00000000C4000000  paddr=0000000060000000  asid=00  r=0  c=2  dvg=dvg
1235index=00000002  pagesize=01000000  vaddr=00000000C5000000  paddr=0000000061000000  asid=00  r=0  c=2  dvg=dvg
1236index=00000003  pagesize=01000000  vaddr=00000000C6000000  paddr=000000006E000000  asid=00  r=0  c=2  dvg=dvg
1237index=00000003  pagesize=01000000  vaddr=00000000C7000000  paddr=000000006F000000  asid=00  r=0  c=2  dvg=dvg
1238index=00000004  pagesize=01000000  vaddr=00000000C8000000  paddr=0000000068000000  asid=00  r=0  c=2  dvg=dvg
1239index=00000004  pagesize=01000000  vaddr=00000000C9000000  paddr=0000000069000000  asid=00  r=0  c=2  dvg=dvg
1240*/
1241
1242
1243/* COMM CPU */
1103/**************/
1104/** COMM CPU **/
1105/**************/
12441106#define KL5C_MMU_A(xxx) ( (xxx==0) ? 0x0000 : (hng64_com_mmu_mem[((xxx-1)*2)+1] << 2) | ((hng64_com_mmu_mem[(xxx-1)*2] & 0xc0) >> 6) )
12451107#define KL5C_MMU_B(xxx) ( (xxx==0) ? 0x0000 : (hng64_com_mmu_mem[(xxx-1)*2] & 0x3f) )
12461108
r7772r7773
13361198
13371199static WRITE8_HANDLER( hng64_comm_memory_w )
13381200{
1201   // Write to both virtual and physical memory
13391202//  UINT32 physical_address = KL5C80_translate_address(offset);
13401203//  logerror("WRITING 0x%02x to 0x%04x (0x%05x)\n", hng64_com_virtual_mem[physical_address], offset, physical_address);
1341
1342   // Write to both virtual and physical memory
13431204}
13441205
1345
13461206/* KL5C80 I/O handlers */
13471207static WRITE8_HANDLER( hng64_comm_io_mmu )
13481208{
r7772r7773
14121272ADDRESS_MAP_END
14131273
14141274
1415
1416
14171275static ADDRESS_MAP_START( hng_sound_map, ADDRESS_SPACE_PROGRAM, 16 )
14181276   AM_RANGE(0x00000, 0x3ffff) AM_ROMBANK("bank2")
14191277   AM_RANGE(0xe0000, 0xfffff) AM_ROMBANK("bank1")
r7772r7773
14611319   PORT_BIT( 0x40000000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
14621320   PORT_BIT( 0x80000000, IP_ACTIVE_HIGH, IPT_SERVICE )
14631321
1464
14651322   PORT_START("P1_P2")
14661323   PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
14671324   PORT_BIT( 0x00000002, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
r7772r7773
15541411   RGN_FRAC(1,1),
15551412   4,
15561413   { 0,1,2,3 },
1557   { 24, 28, 8,12, 16,20,    0,4},
1414   { 24, 28, 8, 12, 16, 20, 0, 4 },
15581415   { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
15591416   8*32
15601417};
r7772r7773
15651422   RGN_FRAC(1,1),
15661423   8,
15671424   { 0,1,2,3,4,5,6,7 },
1568   { 24, 8, 16, 0, 256+24, 256+8, 256+16, 256+0},
1425   { 24,     8,     16,     0,
1426     256+24, 256+8, 256+16, 256+0 },
15691427   { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
15701428   16*32
15711429};
r7772r7773
15761434   RGN_FRAC(1,1),
15771435   4,
15781436   { 0,1,2,3 },
1579   { 24, 28, 8,12,  16,20,    0,4,
1580   256+24,256+28,256+8,256+12,256+16,256+20,256+0,256+4
1581
1582   },
1583   { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32, 16*32,17*32,18*32,19*32,20*32,21*32,22*32,23*32 },
1437   { 24,     28,     8,     12,     16,     20,     0,     4,
1438     256+24, 256+28, 256+8, 256+12, 256+16, 256+20, 256+0, 256+4 },
1439   { 0*32,  1*32,  2*32,  3*32,  4*32,  5*32,  6*32,  7*32,
1440     16*32, 17*32, 18*32, 19*32, 20*32, 21*32, 22*32, 23*32 },
15841441   32*32
15851442};
15861443
r7772r7773
15911448   RGN_FRAC(1,1),
15921449   8,
15931450   { 0,1,2,3,4,5,6,7 },
1594   { 24, 8, 16, 0,
1595   256+24, 256+8, 256+16, 256+0,
1596   1024+24,1024+8,1024+16,1024+0,
1597   1280+24,1280+8,1280+16,1280+0,
1598   },
1451   { 24,      8,      16,      0,
1452     256+24,  256+8,  256+16,  256+0,
1453     1024+24, 1024+8, 1024+16, 1024+0,
1454     1280+24, 1280+8, 1280+16, 1280+0, },
15991455   { 0*32,  1*32,  2*32,  3*32,  4*32,  5*32,  6*32,  7*32,
1600     16*32, 17*32, 18*32, 19*32, 20*32, 21*32, 22*32, 23*32
1601   },
1456     16*32, 17*32, 18*32, 19*32, 20*32, 21*32, 22*32, 23*32 },
16021457   64*32
16031458};
16041459
r7772r7773
16081463   RGN_FRAC(1,1),
16091464   4,
16101465   { 0,1,2,3 },
1611   {  56,60, 24, 28,  48,52,   16, 20,40, 44, 8,12,  32,36,    0,4 },
1612   { 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64,8*64,9*64,10*64,11*64,12*64,13*64,14*64,15*64 },
1466   { 56, 60, 24, 28, 48, 52, 16, 20, 40, 44, 8, 12, 32, 36, 0, 4 },
1467   { 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64, 8*64, 9*64, 10*64, 11*64, 12*64, 13*64, 14*64, 15*64 },
16131468   16*64
16141469};
16151470
r7772r7773
16191474   RGN_FRAC(1,1),
16201475   8,
16211476   { 0,1,2,3,4,5,6,7 },
1622
1623   { 56, 24, 48,16,  40, 8,  32, 0,
1624    1024+56, 1024+24, 1024+48,1024+16,  1024+40, 1024+8,  1024+32, 1024+0 },
1625   { 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64,8*64,9*64,10*64,11*64,12*64,13*64,14*64,15*64 },
1477   { 56,      24,      48,      16,      40,      8,      32,      0,
1478     1024+56, 1024+24, 1024+48, 1024+16, 1024+40, 1024+8, 1024+32, 1024+0 },
1479   { 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64, 8*64, 9*64, 10*64, 11*64, 12*64, 13*64, 14*64, 15*64 },
16261480   32*64
16271481};
16281482
1629
1630static const UINT32 texlayout_xoffset[1024] =
1631{
1632   STEP1024(0,8),
1633
1634};
1635
1636static const UINT32 texlayout_yoffset[512] =
1637{
1638   STEP512(0,8192),
1639};
1640
1483static const UINT32 texlayout_xoffset[1024] = { STEP1024(0,8) };
1484static const UINT32 texlayout_yoffset[512] = { STEP512(0,8192) };
16411485static const gfx_layout hng64_texlayout =
16421486{
16431487   1024, 512,
r7772r7773
16861530   memcpy(gfxregion, buffer, gfxregionsize);
16871531
16881532   auto_free (machine, buffer);
1689
16901533}
16911534
1692
16931535static DRIVER_INIT( hng64_reorder_gfx )
16941536{
16951537   hng64_reorder(machine, memory_region(machine,"scrtile"), memory_region_length(machine, "scrtile"));
16961538}
16971539
16981540#define HACK_REGION
1699
1700
17011541#ifdef HACK_REGION
17021542static void hng64_patch_bios_region(running_machine* machine, int region)
17031543{
r7772r7773
17101550      rom[0x4003] = region;
17111551
17121552   }
1713
1714
17151553}
17161554#endif
17171555
r7772r7773
17541592   hng64_mcu_type = SAMSHO_MCU;
17551593}
17561594
1757
17581595static DRIVER_INIT(hng64_race)
17591596{
17601597   no_machine_error_code=0x02000000;
r7772r7773
17701607}
17711608
17721609
1773
17741610/* ?? */
17751611static const mips3_config config =
17761612{
r7772r7773
18331669   cputag_set_input_line(machine, "audiocpu", INPUT_LINE_HALT, ASSERT_LINE);
18341670   cputag_set_input_line(machine, "audiocpu", INPUT_LINE_RESET, ASSERT_LINE);
18351671
1836
18371672   /* Comm CPU */
18381673   KL5C80_init();
18391674
r7772r7773
18621697   MDRV_CPU_PROGRAM_MAP(hng_map)
18631698   MDRV_CPU_VBLANK_INT_HACK(irq_start,4)
18641699
1865   MDRV_CPU_ADD("audiocpu", V30,8000000)            // v53, 16? mhz!
1700   MDRV_CPU_ADD("audiocpu", V33, 8000000)            // v53, 16? mhz!
18661701   MDRV_CPU_PROGRAM_MAP(hng_sound_map)
18671702
18681703   MDRV_CPU_ADD("comm", Z80,MASTER_CLOCK/4)      /* KL5C80A12CFP - binary compatible with Z80. */
r7772r7773
18891724MACHINE_DRIVER_END
18901725
18911726
1892
18931727ROM_START( hng64 )
18941728   /* BIOS */
18951729   ROM_REGION32_BE( 0x0100000, "user1", 0 ) /* 512k for R4300 BIOS code */
r7772r7773
19041738   ROM_REGION( 0x4000, "sprtile", ROMREGION_ERASEFF )
19051739   ROM_REGION( 0x1000000, "textures", ROMREGION_ERASEFF )
19061740   ROM_REGION16_BE( 0x0c00000, "verts", ROMREGION_ERASEFF )
1907   ROM_REGION( 0x1000000, "samples", ROMREGION_ERASEFF ) /* Sound Samples? */
1741   ROM_REGION( 0x1000000, "samples", ROMREGION_ERASEFF ) /* Sound Samples */
19081742ROM_END
19091743
19101744
1911/* roads edge might need a different bios (driving board bios?) */
19121745ROM_START( roadedge )
19131746   /* BIOS */
19141747   ROM_REGION32_BE( 0x0100000, "user1", 0 ) /* 512k for R4300 BIOS code */
r7772r7773
19621795   ROMX_LOAD( "001vt02a.18", 0x0000002, 0x400000, CRC(449f94d0) SHA1(2228690532d82d2661285aeb4260689b027597cb), ROM_GROUPWORD | ROM_SKIP(4) )
19631796   ROMX_LOAD( "001vt03a.19", 0x0000004, 0x400000, CRC(50ac8639) SHA1(dd2d3689466990a7c479bb8f11bd930ea45e47b5), ROM_GROUPWORD | ROM_SKIP(4) )
19641797
1965   ROM_REGION( 0x1000000, "samples", 0 ) /* Sound Samples? */
1798   ROM_REGION( 0x1000000, "samples", 0 ) /* Sound Samples */
19661799   ROM_LOAD( "001sd01a.77", 0x0000000, 0x400000, CRC(a851da99) SHA1(2ba24feddafc5fadec155cdb7af305fdffcf6690) )
19671800   ROM_LOAD( "001sd02a.78", 0x0400000, 0x400000, CRC(ca5cec15) SHA1(05e91a602728a048d61bf86aa8d43bb4186aeac1) )
19681801ROM_END
r7772r7773
20221855   ROMX_LOAD( "002-vt05a.21", 0x0c00002, 0x400000, CRC(d32ee9cb) SHA1(a768dfc15899924eb05eccbf8e85cb29c7b60396), ROM_GROUPWORD | ROM_SKIP(4) )
20231856   ROMX_LOAD( "002-vt06a.22", 0x0c00004, 0x400000, CRC(13bf3636) SHA1(7c704bf66b571350207bccc7a2d6ed1ec9de4cd5), ROM_GROUPWORD | ROM_SKIP(4) )
20241857
2025   ROM_REGION( 0x1000000, "samples", 0 ) /* Sound Samples? */
1858   ROM_REGION( 0x1000000, "samples", 0 ) /* Sound Samples */
20261859   ROM_LOAD( "002-sd01a.77", 0x0000000, 0x400000, CRC(6215036b) SHA1(ded71dce98b7f7ef78ef32d966a292bbf0d15332) )
20271860   ROM_LOAD( "002-sd02a.78", 0x0400000, 0x400000, CRC(32b28310) SHA1(5b80750a66c12b035b493d06e3842741a3334d0f) )
20281861   ROM_LOAD( "002-sd03a.79", 0x0800000, 0x400000, CRC(53591413) SHA1(36c7efa1aced0ca38b3ce7b95af28755973698f3) )
r7772r7773
20701903   ROMX_LOAD( "003-vt02a.18", 0x0000002, 0x400000, CRC(da7b956e) SHA1(c57cbb8c51145ae224faba5b6a1a7e61cb2bee64), ROM_GROUPWORD | ROM_SKIP(4) )
20711904   ROMX_LOAD( "003-vt03a.19", 0x0000004, 0x400000, CRC(4fe72cb7) SHA1(9f8e662f0656f201924834d1ee78498d4223745e), ROM_GROUPWORD | ROM_SKIP(4) )
20721905
2073   ROM_REGION( 0x1000000, "samples", 0 ) /* Sound Samples? */
1906   ROM_REGION( 0x1000000, "samples", 0 ) /* Sound Samples */
20741907   ROM_LOAD( "003-sd01a.77", 0x0000000, 0x400000, CRC(c43898ff) SHA1(0e49b87181b56c62a674d255d326f761942b99b1) )
20751908   ROM_LOAD( "003-sd02a.78", 0x0400000, 0x400000, CRC(079a3d5a) SHA1(a97b052de69fee7d605cae30f5a228e6ffeabb26) )
20761909   ROM_LOAD( "003-sd03a.79", 0x0800000, 0x400000, CRC(96c0991a) SHA1(01be872b3e307258236fe96a544417dd8a0bc8bd) )
r7772r7773
21241957   ROMX_LOAD( "004-vt02a.18", 0x0000002, 0x400000, CRC(279fc216) SHA1(eb90cc347745491c1d1b1fb611fd6e227310731c), ROM_GROUPWORD | ROM_SKIP(4) )
21251958   ROMX_LOAD( "004-vt03a.19", 0x0000004, 0x400000, CRC(e0cf6a42) SHA1(dd09b3d05739cf030c820cd7dbaea2e7262764ab), ROM_GROUPWORD | ROM_SKIP(4) )
21261959
2127   ROM_REGION( 0x1000000, "samples", 0 ) /* Sound Samples? */
1960   ROM_REGION( 0x1000000, "samples", 0 ) /* Sound Samples */
21281961   ROM_LOAD( "004-sd01a.77", 0x0000000, 0x400000, CRC(2ef868bd) SHA1(0a1ef002efe6738698ebe98a1c3695b151fdd282) )
21291962   ROM_LOAD( "004-sd02a.78", 0x0400000, 0x400000, CRC(07fb3135) SHA1(56cc8e29ba9b13f82a4c9248bff02e2b7a0c49b0) )
21301963   ROM_LOAD( "004-sd03a.79", 0x0800000, 0x400000, CRC(42571f1d) SHA1(425cbd3f7c8aea1c0f057ea8f186acffb0091dc0) )
r7772r7773
22012034   ROMX_LOAD( "005vt05a.21", 0x0c00002, 0x400000, CRC(49c82bec) SHA1(09255279edb9a204bbe1cce8cef58d5c81e86d1f), ROM_GROUPWORD | ROM_SKIP(4) )
22022035   ROMX_LOAD( "005vt06a.22", 0x0c00004, 0x400000, CRC(7ba05b6c) SHA1(729c1d182d74998dd904b587a2405f55af9825e0), ROM_GROUPWORD | ROM_SKIP(4) )
22032036
2204   ROM_REGION( 0x1000000, "samples", 0 ) /* Sound Samples? */
2037   ROM_REGION( 0x1000000, "samples", 0 ) /* Sound Samples */
22052038   ROM_LOAD( "005sd01a.77", 0x0000000, 0x400000, CRC(8f68150f) SHA1(a1e5efdfd1ed29f81e25c8da669851ddb7b0c826) )
22062039   ROM_LOAD( "005sd02a.78", 0x0400000, 0x400000, CRC(6b4da6a0) SHA1(8606c413c129635bdaaa37254edbfd19b10426bb) )
22072040   ROM_LOAD( "005sd03a.79", 0x0800000, 0x400000, CRC(a529fab3) SHA1(8559d402c8f66f638590b8b57ec9efa775010c96) )
2208   ROM_LOAD( "005sd04a.80", 0x0800000, 0x400000, CRC(dca95ead) SHA1(39afdfba0e5262b524f25706a96be00e5d14548e) )
2041   ROM_LOAD( "005sd04a.80", 0x0c00000, 0x400000, CRC(dca95ead) SHA1(39afdfba0e5262b524f25706a96be00e5d14548e) )
22092042ROM_END
22102043
22112044
r7772r7773
22722105   ROMX_LOAD( "006vt02a.18", 0x0000002, 0x400000, CRC(150eb717) SHA1(9acb067346eb386256047c0f1d24dc8fcc2118ca), ROM_GROUPWORD | ROM_SKIP(4) )
22732106   ROMX_LOAD( "006vt03a.19", 0x0000004, 0x400000, CRC(021cfcaf) SHA1(fb8b5f50d3490b31f0a4c3e6d3ae1b98bae41c97), ROM_GROUPWORD | ROM_SKIP(4) )
22742107
2275   ROM_REGION( 0x1000000, "samples", 0 ) /* Sound Samples? */
2108   ROM_REGION( 0x1000000, "samples", 0 ) /* Sound Samples */
22762109   ROM_LOAD( "006sd01a.77", 0x0000000, 0x400000, CRC(790efb6d) SHA1(23ddd3ee8ae808e58cbcaf92a9ef56d3ca6289b5) )
22772110   ROM_LOAD( "006sd02a.78", 0x0400000, 0x400000, CRC(f7f020c7) SHA1(b72fde4ff6384b80166a3cb67d31bf7afda750bc) )
22782111   ROM_LOAD( "006sd03a.79", 0x0800000, 0x400000, CRC(1a678084) SHA1(f52efb6145102d289f332d8341d89a5d231ba003) )
2279   ROM_LOAD( "006sd04a.80", 0x0800000, 0x400000, CRC(3c280a5c) SHA1(9d3fc78e18de45382878268db47ff9d9716f1505) )
2112   ROM_LOAD( "006sd04a.80", 0x0c00000, 0x400000, CRC(3c280a5c) SHA1(9d3fc78e18de45382878268db47ff9d9716f1505) )
22802113ROM_END
22812114
2115
22822116ROM_START( buriki )
22832117   /* BIOS */
22842118   ROM_REGION32_BE( 0x0100000, "user1", 0 ) /* 512k for R4300 BIOS code */
r7772r7773
23442178   ROMX_LOAD( "007vt02a.18", 0x0000002, 0x400000, CRC(f365f608) SHA1(035fd9b829b7720c4aee6fdf204c080e6157994f), ROM_GROUPWORD | ROM_SKIP(4) )
23452179   ROMX_LOAD( "007vt03a.19", 0x0000004, 0x400000, CRC(ba05654d) SHA1(b7fe532732c0af7860c8eded3c5abd304d74e08e), ROM_GROUPWORD | ROM_SKIP(4) )
23462180
2347   ROM_REGION( 0x1000000, "samples", 0 ) /* Sound Samples? */
2181   ROM_REGION( 0x1000000, "samples", 0 ) /* Sound Samples */
23482182   ROM_LOAD( "007sd01a.77", 0x0000000, 0x400000, CRC(1afb48c6) SHA1(b072d4fe72d6c5267864818d300b32e85b426213) )
23492183   ROM_LOAD( "007sd02a.78", 0x0400000, 0x400000, CRC(c65f1dd5) SHA1(7f504c585a10c1090dbd1ac31a3a0db920c992a0) )
23502184   ROM_LOAD( "007sd03a.79", 0x0800000, 0x400000, CRC(356f25c8) SHA1(5250865900894232960686f40c5da35b3868b78c) )
2351   ROM_LOAD( "007sd04a.80", 0x0800000, 0x400000, CRC(dabfbbad) SHA1(7d58d5181705618e0e2d69c6fdb81b9b3d2b9e0f) )
2185   ROM_LOAD( "007sd04a.80", 0x0c00000, 0x400000, CRC(dabfbbad) SHA1(7d58d5181705618e0e2d69c6fdb81b9b3d2b9e0f) )
23522186ROM_END
23532187
23542188/* Bios */
2355GAME( 1997, hng64,    0,      hng64, hng64, hng64,      ROT0, "SNK", "Hyper NeoGeo 64 Bios", GAME_NOT_WORKING|GAME_NO_SOUND|GAME_IS_BIOS_ROOT )
2189GAME( 1997, hng64,    0,      hng64, hng64, hng64,       ROT0, "SNK", "Hyper NeoGeo 64 Bios", GAME_NOT_WORKING|GAME_NO_SOUND|GAME_IS_BIOS_ROOT )
23562190
23572191/* Games */
23582192GAME( 1997, roadedge, hng64,  hng64, hng64,  hng64_race,  ROT0, "SNK", "Roads Edge / Round Trip (rev.B)",        GAME_NOT_WORKING|GAME_NO_SOUND )   /* 001 */
src/mame/drivers/poker72.c
r0r7773
1/*
2  Unknown game, dump was marked 'slot 72 - poker'
3
4  GFX roms contain
5  'Extrema Systems International Ltd'
6  as well as a logo for the company.
7
8  There are also 'Lucky Boy' graphics in various places, which might be the title.
9
10
11*/
12
13#include "emu.h"
14#include "cpu/z80/z80.h"
15#include "sound/ay8910.h"
16
17static UINT8 *poker72_vram,*poker72_pal;
18static UINT8 tile_bank;
19
20VIDEO_START(poker72)
21{
22
23}
24
25VIDEO_UPDATE(poker72)
26{
27   int x,y,count;
28
29   count = 0;
30
31   for (y=0;y<32;y++)
32   {
33      for (x=0;x<64;x++)
34      {
35         int tile = ((poker72_vram[count+1] & 0x0f) << 8 ) | (poker72_vram[count+0] & 0xff); //TODO: tile bank
36         int fx = (poker72_vram[count+1] & 0x10);
37         int fy = (poker72_vram[count+1] & 0x20);
38         int color = (poker72_vram[count+1] & 0xc0) >> 6;
39
40         tile|= tile_bank << 12;
41
42         drawgfx_opaque(bitmap,cliprect,screen->machine->gfx[0],tile,color,fx,fy,x*8,y*8);
43
44         count+=2;
45      }
46   }
47
48   return 0;
49}
50
51static WRITE8_HANDLER( poker72_paletteram_w )
52{
53   int r,g,b;
54   poker72_pal[offset] = data;
55
56   r = poker72_pal[(offset & 0x3ff)+0x000] & 0x3f;
57   g = poker72_pal[(offset & 0x3ff)+0x400] & 0x3f;
58   b = poker72_pal[(offset & 0x3ff)+0x800] & 0x3f;
59
60   palette_set_color_rgb( space->machine, offset & 0x3ff, pal6bit(r), pal6bit(g), pal6bit(b));
61}
62
63static WRITE8_HANDLER( output_w )
64{
65   UINT8 *ROM = memory_region(space->machine, "maincpu");
66
67   printf("%02x\n",data);
68
69/*  if((data & 0xc) == 0xc)
70        memory_set_bankptr(space->machine, "bank1", &ROM[0x10000]);
71    else*/
72   if(data & 8)
73      memory_set_bankptr(space->machine, "bank1", &ROM[0x08000]);
74   else
75      memory_set_bankptr(space->machine, "bank1", &ROM[0x00000]);
76}
77
78static WRITE8_HANDLER( tile_bank_w )
79{
80   tile_bank = (data & 4) >> 2;
81}
82
83static ADDRESS_MAP_START( poker72_map, ADDRESS_SPACE_PROGRAM, 8 )
84   AM_RANGE(0x0000, 0xbfff) AM_ROMBANK("bank1")
85   AM_RANGE(0xc000, 0xdfff) AM_RAM //work ram
86   AM_RANGE(0xe000, 0xefff) AM_RAM AM_BASE(&poker72_vram)
87   AM_RANGE(0xf000, 0xfbff) AM_RAM_WRITE(poker72_paletteram_w) AM_BASE(&poker72_pal)
88   AM_RANGE(0xfc00, 0xfdff) AM_RAM //???
89   AM_RANGE(0xfe08, 0xfe08) AM_READ_PORT("IN0")
90   AM_RANGE(0xfe09, 0xfe09) AM_READ_PORT("IN1")
91   AM_RANGE(0xfe0a, 0xfe0a) AM_READ_PORT("IN2")
92   AM_RANGE(0xfe0c, 0xfe0c) AM_READ_PORT("IN3")
93   AM_RANGE(0xfe0d, 0xfe0d) AM_READ_PORT("IN4")
94   AM_RANGE(0xfe0e, 0xfe0e) AM_READ_PORT("IN5")
95
96   AM_RANGE(0xfe17, 0xfe17) AM_READNOP //irq ack
97   AM_RANGE(0xfe20, 0xfe20) AM_WRITE(output_w) //output, irq enable?
98   AM_RANGE(0xfe22, 0xfe22) AM_WRITE(tile_bank_w)
99   AM_RANGE(0xfe40, 0xfe40) AM_DEVREADWRITE("ay", ay8910_r, ay8910_data_w)
100   AM_RANGE(0xfe60, 0xfe60) AM_DEVWRITE("ay", ay8910_address_w)
101ADDRESS_MAP_END
102
103
104static INPUT_PORTS_START( poker72 )
105   PORT_START("IN0")
106   PORT_DIPNAME( 0x01, 0x00, "IN0" )
107   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
108   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
109   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
110   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
111   PORT_DIPSETTING(    0x02, DEF_STR( On ) )
112   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
113   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
114   PORT_DIPSETTING(    0x04, DEF_STR( On ) )
115   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
116   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
117   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
118   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
119   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
120   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
121   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
122   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
123   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
124   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
125   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
126   PORT_DIPSETTING(    0x40, DEF_STR( On ) )
127   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
128   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
129   PORT_DIPSETTING(    0x80, DEF_STR( On ) )
130
131   PORT_START("IN1")
132   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_POKER_HOLD1 )
133   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_POKER_HOLD2 )
134   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_POKER_HOLD3 )
135   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_POKER_HOLD4 )
136   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_POKER_HOLD5 )
137   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("M. Bet")
138   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN1 )
139   PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Black")
140
141
142   PORT_START("IN2")
143   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Red")
144   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP )
145   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE )
146   PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL )
147   PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_GAMBLE_BET )
148   PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_COIN2 )
149   PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_SERVICE1 )
150   PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
151
152   PORT_START("IN3")
153   PORT_DIPNAME( 0x01, 0x00, "IN3" )
154   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
155   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
156   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
157   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
158   PORT_DIPSETTING(    0x02, DEF_STR( On ) )
159   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
160   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
161   PORT_DIPSETTING(    0x04, DEF_STR( On ) )
162   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
163   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
164   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
165   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
166   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
167   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
168   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
169   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
170   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
171   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
172   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
173   PORT_DIPSETTING(    0x40, DEF_STR( On ) )
174   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
175   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
176   PORT_DIPSETTING(    0x80, DEF_STR( On ) )
177   PORT_START("IN4")
178   PORT_DIPNAME( 0x01, 0x00, "IN4" )
179   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
180   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
181   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
182   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
183   PORT_DIPSETTING(    0x02, DEF_STR( On ) )
184   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
185   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
186   PORT_DIPSETTING(    0x04, DEF_STR( On ) )
187   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
188   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
189   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
190   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
191   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
192   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
193   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
194   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
195   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
196   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
197   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
198   PORT_DIPSETTING(    0x40, DEF_STR( On ) )
199   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
200   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
201   PORT_DIPSETTING(    0x80, DEF_STR( On ) )
202   PORT_START("IN5")
203   PORT_DIPNAME( 0x01, 0x00, "IN5" )
204   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
205   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
206   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
207   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
208   PORT_DIPSETTING(    0x02, DEF_STR( On ) )
209   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
210   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
211   PORT_DIPSETTING(    0x04, DEF_STR( On ) )
212   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
213   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
214   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
215   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
216   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
217   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
218   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
219   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
220   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
221   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
222   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
223   PORT_DIPSETTING(    0x40, DEF_STR( On ) )
224   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
225   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
226   PORT_DIPSETTING(    0x80, DEF_STR( On ) )
227
228
229   PORT_START("DSW0")
230   PORT_DIPNAME( 0x01, 0x00, "DSW0" )
231   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
232   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
233   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
234   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
235   PORT_DIPSETTING(    0x02, DEF_STR( On ) )
236   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
237   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
238   PORT_DIPSETTING(    0x04, DEF_STR( On ) )
239   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
240   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
241   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
242   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
243   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
244   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
245   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
246   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
247   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
248   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
249   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
250   PORT_DIPSETTING(    0x40, DEF_STR( On ) )
251   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
252   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
253   PORT_DIPSETTING(    0x80, DEF_STR( On ) )
254
255   PORT_START("DSW1")
256   PORT_DIPNAME( 0x01, 0x00, "DSW1" )
257   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
258   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
259   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
260   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
261   PORT_DIPSETTING(    0x02, DEF_STR( On ) )
262   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
263   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
264   PORT_DIPSETTING(    0x04, DEF_STR( On ) )
265   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
266   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
267   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
268   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
269   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
270   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
271   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
272   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
273   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
274   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
275   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
276   PORT_DIPSETTING(    0x40, DEF_STR( On ) )
277   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
278   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
279   PORT_DIPSETTING(    0x80, DEF_STR( On ) )
280
281
282INPUT_PORTS_END
283
284static const gfx_layout tiles8x8_layout =
285{
286   8,8,
287   RGN_FRAC(1,4),
288   8,
289   { RGN_FRAC(3,4), RGN_FRAC(3,4)+4, RGN_FRAC(2,4), RGN_FRAC(2,4)+4 ,RGN_FRAC(1,4),RGN_FRAC(1,4)+4, RGN_FRAC(0,4),RGN_FRAC(0,4)+4 },
290   { 0,1,2,3,8,9,10,11 },
291   { 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
292   16*8
293};
294
295
296
297static GFXDECODE_START( poker72 )
298   GFXDECODE_ENTRY( "gfx1", 0, tiles8x8_layout, 0, 16 )
299GFXDECODE_END
300
301/* default 444 palette for debug purpose */
302static PALETTE_INIT( poker72 )
303{
304   int x,r,g,b;
305
306   for(x=0;x<0x100;x++)
307   {
308      r = (x & 0xf)*0x10;
309      g = ((x & 0x3c)>>2)*0x10;
310      b = ((x & 0xf0)>>4)*0x10;
311      palette_set_color(machine,x,MAKE_RGB(r,g,b));
312   }
313}
314
315static const ay8910_interface ay8910_config =
316{
317   AY8910_LEGACY_OUTPUT,
318   AY8910_DEFAULT_LOADS,
319   DEVCB_INPUT_PORT("DSW0"),
320   DEVCB_INPUT_PORT("DSW1"),
321   DEVCB_NULL,
322   DEVCB_NULL
323};
324
325static MACHINE_RESET( poker72 )
326{
327   UINT8 *ROM = memory_region(machine, "maincpu");
328
329   memory_set_bankptr(machine, "bank1", &ROM[0]);
330}
331
332static MACHINE_DRIVER_START( poker72 )
333
334
335   /* basic machine hardware */
336   MDRV_CPU_ADD("maincpu", Z80,8000000)       /* ? MHz */
337   MDRV_CPU_PROGRAM_MAP(poker72_map)
338   MDRV_CPU_VBLANK_INT("screen", irq0_line_hold)
339
340   MDRV_MACHINE_RESET(poker72)
341
342   /* video hardware */
343   MDRV_SCREEN_ADD("screen", RASTER)
344   MDRV_SCREEN_REFRESH_RATE(60)
345   MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0))
346   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
347   MDRV_SCREEN_SIZE(64*8, 32*8)
348   MDRV_SCREEN_VISIBLE_AREA(0, 64*8-1, 0, 32*8-1)
349
350   MDRV_GFXDECODE(poker72)
351   MDRV_PALETTE_LENGTH(0xe00)
352   MDRV_PALETTE_INIT(poker72)
353
354   MDRV_VIDEO_START(poker72)
355   MDRV_VIDEO_UPDATE(poker72)
356
357   MDRV_SPEAKER_STANDARD_MONO("mono")
358
359   MDRV_SOUND_ADD("ay", AY8910, 8000000/8) /* ? Mhz */
360   MDRV_SOUND_CONFIG(ay8910_config)
361   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
362MACHINE_DRIVER_END
363
364
365
366ROM_START( poker72 )
367   ROM_REGION( 0x20000, "maincpu", 0 )
368   ROM_LOAD( "27010.bin", 0x00000, 0x20000, CRC(62447341) SHA1(e442c1f834a5dd2ab6ab3bdd316dfa86f2ca6647) )
369
370   ROM_REGION( 0x1000, "89c51", 0 )
371   ROM_LOAD( "89c51.bin", 0x00000, 0x1000, CRC(3fdd2148) SHA1(ea39a52482967268c7387aec77cfab1ae5c427fa) )
372
373   ROM_REGION( 0x80000, "gfx1", 0 )
374   ROM_LOAD( "270135.bin", 0x00000, 0x20000, CRC(188c96ee) SHA1(7e883454cb080cdc82ce47ac92f51c8d45a55085) )
375   ROM_LOAD( "270136.bin", 0x20000, 0x20000, CRC(f84c5068) SHA1(49178fe7b12f547a50879002236105a882767ebb) )
376   ROM_LOAD( "270137.bin", 0x40000, 0x20000, CRC(310281d1) SHA1(c28f97bb3613c0b481ab6e16e215549c44b83c47) )
377   ROM_LOAD( "270138.bin", 0x60000, 0x20000, CRC(d689313d) SHA1(8b9661b3af0e2ced7fe9fa487641e445ce7835b8) )
378ROM_END
379
380static DRIVER_INIT( poker72 )
381{
382   UINT8 *rom = memory_region(machine, "maincpu");
383
384   rom[0x4a9] = 0x28;
385}
386
387GAME( 1995, poker72,  0,    poker72, poker72,  poker72, ROT0, "Extrema Systems International Ltd.", "Poker Monarch (v2.50)", GAME_NOT_WORKING ) // actually unknown, was marked 'slot 72 poker'  Manufacturers logo and 'Lucky Boy' gfx in rom..
src/mame/drivers/nwk-tr.c
r7772r7773
730730
731731ROM_START(racingj)
732732   ROM_REGION32_BE(0x200000, "user1", 0)   /* PowerPC program roms */
733   ROM_LOAD16_WORD_SWAP("676nc01.bin", 0x000000, 0x200000, CRC(690346b5) SHA1(157ab6788382ef4f5a8772f08819f54d0856fcc8))
733   ROM_LOAD16_WORD_SWAP("676nc01.bin", 0x000000, 0x200000, CRC(690346b5) SHA1(157ab6788382ef4f5a8772f08819f54d0856fcc8) )
734734
735735   ROM_REGION32_BE(0x800000, "user2", 0)      /* Data roms */
736   ROM_LOAD32_WORD_SWAP("676a04.bin", 0x000000, 0x200000, CRC(d7808cb6) SHA1(0668fae5bb94cc120fe196d4b18200f7b512317f))
737   ROM_LOAD32_WORD_SWAP("676a05.bin", 0x000002, 0x200000, CRC(fb4de1ad) SHA1(f6aa4eb1b5d22901a2aaf899ed3237a9dfdc55b5))
736   ROM_LOAD32_WORD_SWAP("676a04.bin", 0x000000, 0x200000, CRC(d7808cb6) SHA1(0668fae5bb94cc120fe196d4b18200f7b512317f) )
737   ROM_LOAD32_WORD_SWAP("676a05.bin", 0x000002, 0x200000, CRC(fb4de1ad) SHA1(f6aa4eb1b5d22901a2aaf899ed3237a9dfdc55b5) )
738738
739739   ROM_REGION32_BE(0x800000, "user5", 0)   /* CG Board texture roms */
740740   ROM_LOAD32_WORD_SWAP( "676a13.8x",    0x000000, 0x400000, CRC(29077763) SHA1(ee087ca0d41966ca0fd10727055bb1dcd05a0873) )
r7772r7773
753753
754754ROM_START(racingj2)
755755   ROM_REGION32_BE(0x200000, "user1", 0)   /* PowerPC program roms */
756   ROM_LOAD16_WORD_SWAP("888a01.27p", 0x000000, 0x200000, CRC(d077890a) SHA1(08b252324cf46fbcdb95e8f9312287920cd87c5d))
756   ROM_LOAD16_WORD_SWAP("888a01.27p", 0x000000, 0x200000, CRC(d077890a) SHA1(08b252324cf46fbcdb95e8f9312287920cd87c5d) )
757757
758758   ROM_REGION32_BE(0x800000, "user2", 0)      /* Data roms */
759   ROM_LOAD32_WORD_SWAP( "676a04.bin",   0x000000, 0x200000, CRC(d7808cb6) SHA1(0668fae5bb94cc120fe196d4b18200f7b512317f))
760   ROM_LOAD32_WORD_SWAP( "676a05.bin",   0x000002, 0x200000, CRC(fb4de1ad) SHA1(f6aa4eb1b5d22901a2aaf899ed3237a9dfdc55b5))
761   ROM_LOAD32_WORD_SWAP( "888a06.12t",   0x400000, 0x200000, CRC(00cbec4d) SHA1(1ce7807d86e90edbf4eecba462a27c725f5ad862))
759   ROM_LOAD32_WORD_SWAP( "676a04.bin",   0x000000, 0x200000, CRC(d7808cb6) SHA1(0668fae5bb94cc120fe196d4b18200f7b512317f) )
760   ROM_LOAD32_WORD_SWAP( "676a05.bin",   0x000002, 0x200000, CRC(fb4de1ad) SHA1(f6aa4eb1b5d22901a2aaf899ed3237a9dfdc55b5) )
761   ROM_LOAD32_WORD_SWAP( "888a06.12t",   0x400000, 0x200000, CRC(00cbec4d) SHA1(1ce7807d86e90edbf4eecba462a27c725f5ad862) )
762762
763763   ROM_REGION32_BE(0x800000, "user5", 0)   /* CG Board Texture roms */
764764   ROM_LOAD32_WORD_SWAP( "888a13.8x",    0x000000, 0x400000, CRC(2292f530) SHA1(0f4d1332708fd5366a065e0a928cc9610558b42d) )
r7772r7773
777777
778778ROM_START(thrilld)
779779   ROM_REGION32_BE(0x200000, "user1", 0)   /* PowerPC program roms */
780   ROM_LOAD16_WORD_SWAP("713be01.27p", 0x000000, 0x200000, CRC(d84a7723) SHA1(f4e9e08591b7e5e8419266dbe744d56a185384ed))
780   ROM_LOAD16_WORD_SWAP("713be01.27p", 0x000000, 0x200000, CRC(d84a7723) SHA1(f4e9e08591b7e5e8419266dbe744d56a185384ed) )
781781
782782   ROM_REGION32_BE(0x800000, "user2", 0)      /* Data roms */
783   ROM_LOAD32_WORD_SWAP("713a04.16t", 0x000000, 0x200000, CRC(c994aaa8) SHA1(d82b9930a11e5384ad583684a27c95beec03cd5a))
784   ROM_LOAD32_WORD_SWAP("713a05.14t", 0x000002, 0x200000, CRC(6f1e6802) SHA1(91f8a170327e9b4ee6a64aee0c106b981a317e69))
783   ROM_LOAD32_WORD_SWAP("713a04.16t", 0x000000, 0x200000, CRC(c994aaa8) SHA1(d82b9930a11e5384ad583684a27c95beec03cd5a) )
784   ROM_LOAD32_WORD_SWAP("713a05.14t", 0x000002, 0x200000, CRC(6f1e6802) SHA1(91f8a170327e9b4ee6a64aee0c106b981a317e69) )
785785
786786   ROM_REGION32_BE(0x800000, "user5", 0)   /* CG Board Texture roms */
787787   ROM_LOAD32_WORD_SWAP( "713a13.8x",    0x000000, 0x400000, CRC(b795c66b) SHA1(6e50de0d5cc444ffaa0fec7ada8c07f643374bb2) )
r7772r7773
798798   ROM_LOAD( "m48t58y-70pc1", 0x000000, 0x002000, CRC(5d8fbcb2) SHA1(74ad91544d2a200cf599a565005476623075e7d6) )
799799ROM_END
800800
801ROM_START(thrilldb)
802   ROM_REGION32_BE(0x200000, "user1", 0)   /* PowerPC program roms */
803   ROM_LOAD16_WORD_SWAP("713bb01.27p", 0x000000, 0x200000, CRC(535fe4e8) SHA1(acd8194a4dafce289dbdfd874f0b799f25aeb73f) )
804
805   ROM_REGION32_BE(0x800000, "user2", 0)      /* Data roms */
806   ROM_LOAD32_WORD_SWAP("713a04.16t", 0x000000, 0x200000, CRC(c994aaa8) SHA1(d82b9930a11e5384ad583684a27c95beec03cd5a) )
807   ROM_LOAD32_WORD_SWAP("713a05.14t", 0x000002, 0x200000, CRC(6f1e6802) SHA1(91f8a170327e9b4ee6a64aee0c106b981a317e69) )
808
809   ROM_REGION32_BE(0x800000, "user5", 0)   /* CG Board Texture roms */
810   ROM_LOAD32_WORD_SWAP( "713a13.8x",    0x000000, 0x400000, CRC(b795c66b) SHA1(6e50de0d5cc444ffaa0fec7ada8c07f643374bb2) )
811   ROM_LOAD32_WORD_SWAP( "713a14.16x",   0x000002, 0x400000, CRC(5275a629) SHA1(16fadef06975f0f3625cac8f84e2e77ed7d75e15) )
812
813   ROM_REGION(0x80000, "audiocpu", 0)      /* 68k program roms */
814   ROM_LOAD16_WORD_SWAP( "713a08.7s",    0x000000, 0x080000, CRC(6a72a825) SHA1(abeac99c5343efacabcb0cdff6d34f9f967024db) )
815
816   ROM_REGION(0x1000000, "rfsnd", 0)      /* PCM sample roms */
817   ROM_LOAD( "713a09.16p",   0x000000, 0x400000, CRC(058f250a) SHA1(63b8e60004ec49009633e86b4992c00083def9a8) )
818   ROM_LOAD( "713a10.14p",   0x400000, 0x400000, CRC(27f9833e) SHA1(1540f00d2571ecb81b914c553682b67fca94bbbd) )
819
820   ROM_REGION(0x2000, "m48t58",0)
821   ROM_LOAD( "m48t58y-70pc1", 0x000000, 0x002000, CRC(5d8fbcb2) SHA1(74ad91544d2a200cf599a565005476623075e7d6) )
822ROM_END
823
801824/*****************************************************************************/
802825
803826GAME( 1998, racingj,    0,       nwktr,   nwktr, nwktr, ROT0, "Konami", "Racing Jam", GAME_NOT_WORKING | GAME_NO_SOUND )
804827GAME( 1999, racingj2,   racingj, nwktr,   nwktr, nwktr, ROT0, "Konami", "Racing Jam: Chapter 2", GAME_NOT_WORKING | GAME_NO_SOUND )
805GAME( 1998, thrilld,    0,       thrilld, nwktr, nwktr, ROT0, "Konami", "Thrill Drive", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
828GAME( 1998, thrilld,    0,       thrilld, nwktr, nwktr, ROT0, "Konami", "Thrill Drive (JAE)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
829GAME( 1998, thrilldb,   thrilld, thrilld, nwktr, nwktr, ROT0, "Konami", "Thrill Drive (JAB)", GAME_NOT_WORKING | GAME_IMPERFECT_SOUND )
src/mame/drivers/sf.c
r7772r7773
77    TODO:
88    - is there a third coin input?
99
10    - Is sfj confirmed to have a 68705?, sfua has an i8751 and the actual
11      gamecode is closer to sfua than the other sets.  The protection
12      appears to be the same on both.
13
1014***************************************************************************/
1115
1216#include "emu.h"
r7772r7773
4751}
4852
4953
50/* The protection of the japanese version */
51/* I'd love to see someone dump the 68705 rom */
54/* The protection of the Japanese (and alt US) version */
55/* I'd love to see someone dump the 68705 / i8751 roms */
5256
5357static void write_dword( const address_space *space, offs_t offset, UINT32 data )
5458{
r7772r7773
202206   AM_RANGE(0xc00018, 0xc00019) AM_WRITE(sf_bg_scroll_w)
203207   AM_RANGE(0xc0001a, 0xc0001b) AM_WRITE(sf_gfxctrl_w)
204208   AM_RANGE(0xc0001c, 0xc0001d) AM_WRITE(soundcmd_w)
205   AM_RANGE(0xc0001e, 0xc0001f) AM_WRITE(protection_w)
209//  AM_RANGE(0xc0001e, 0xc0001f) AM_WRITE(protection_w)
206210   AM_RANGE(0xff8000, 0xffdfff) AM_RAM
207211   AM_RANGE(0xffe000, 0xffffff) AM_RAM AM_BASE_MEMBER(sf_state, objectram)
208212ADDRESS_MAP_END
r7772r7773
224228   AM_RANGE(0xc00018, 0xc00019) AM_WRITE(sf_bg_scroll_w)
225229   AM_RANGE(0xc0001a, 0xc0001b) AM_WRITE(sf_gfxctrl_w)
226230   AM_RANGE(0xc0001c, 0xc0001d) AM_WRITE(soundcmd_w)
227   AM_RANGE(0xc0001e, 0xc0001f) AM_WRITE(protection_w)
231//  AM_RANGE(0xc0001e, 0xc0001f) AM_WRITE(protection_w)
228232   AM_RANGE(0xff8000, 0xffdfff) AM_RAM
229233   AM_RANGE(0xffe000, 0xffffff) AM_RAM AM_BASE_MEMBER(sf_state, objectram)
230234ADDRESS_MAP_END
r7772r7773
938942   ROM_LOAD( "sf-35.bin", 0x0e0000, 0x020000, CRC(70c00fb4) SHA1(7c5504a5aedd3be7b663c5090eb22243e3fa669b) )
939943
940944   ROM_REGION( 0x1c0000, "gfx3", 0 )
941   ROM_LOAD( "sf-15.bin", 0x000000, 0x020000, CRC(fc0113db) SHA1(7c19603129be5f6e1ccd07fd8b7ee1cbf86468db) ) /* Sprites planes 1-2 */
945   /* Sprites planes 1-2 */
946   ROM_LOAD( "sf-15.bin", 0x000000, 0x020000, CRC(fc0113db) SHA1(7c19603129be5f6e1ccd07fd8b7ee1cbf86468db) )
942947   ROM_LOAD( "sf-16.bin", 0x020000, 0x020000, CRC(82e4a6d3) SHA1(5ec519c2740c66f5da27ced1db99e19fe38fdad7) )
943948   ROM_LOAD( "sf-11.bin", 0x040000, 0x020000, CRC(e112df1b) SHA1(3f9856f69b457d79fe085bf51dfb2efcd98f883d) )
944949   ROM_LOAD( "sf-12.bin", 0x060000, 0x020000, CRC(42d52299) SHA1(6560c38f5fd5a47db7728cc7df83d2169157174f) )
945950   ROM_LOAD( "sf-07.bin", 0x080000, 0x020000, CRC(49f340d9) SHA1(65822efefa198791a632ef851a5ce06a71b4ed0f) )
946951   ROM_LOAD( "sf-08.bin", 0x0a0000, 0x020000, CRC(95ece9b1) SHA1(f0a15fce5cd9617fa5d4dd43bd5b6ea190dace85) )
947952   ROM_LOAD( "sf-03.bin", 0x0c0000, 0x020000, CRC(5ca05781) SHA1(004f5ad34798471b39bd4612c797f0913ed0fb4a) )
948   ROM_LOAD( "sf-17.bin", 0x0e0000, 0x020000, CRC(69fac48e) SHA1(c9272217256c73cb8ddb4fbbfb5905ce1122c746) ) /* planes 2-3 */
953   /* Sprites planes 2-3 */
954   ROM_LOAD( "sf-17.bin", 0x0e0000, 0x020000, CRC(69fac48e) SHA1(c9272217256c73cb8ddb4fbbfb5905ce1122c746) )
949955   ROM_LOAD( "sf-18.bin", 0x100000, 0x020000, CRC(71cfd18d) SHA1(4c17e2124f3456d6b13ede8ad3ae916b53f9bb7e) )
950956   ROM_LOAD( "sf-13.bin", 0x120000, 0x020000, CRC(fa2eb24b) SHA1(96f3bd54c340771577cc232ebde93965421f2557) )
951957   ROM_LOAD( "sf-14.bin", 0x140000, 0x020000, CRC(ad955c95) SHA1(549d6a5125432aa45d03f15e76f6c2c8ab2e05a3) )
r7772r7773
969975   ROM_LOAD( "mmi-7603.13h", 0x0300, 0x0020, CRC(06bcda53) SHA1(fa69b77697bb12aa6012d82ef5b504d3a1d20232) )   /* unknown */
970976ROM_END
971977
972ROM_START( sfus )
978ROM_START( sfu )
973979   ROM_REGION( 0x60000, "maincpu", 0 )
974980   ROM_LOAD16_BYTE("sfd-19", 0x00000, 0x10000, CRC(faaf6255) SHA1(f6d0186c6109780839576c141fc6b557c170c182) )
975981   ROM_LOAD16_BYTE("sfd-22", 0x00001, 0x10000, CRC(e1fe3519) SHA1(5c59343a8acaaa4f36636d8e28a4ca7854110dad) )
r7772r7773
10021008   ROM_LOAD( "sf-35.bin", 0x0e0000, 0x020000, CRC(70c00fb4) SHA1(7c5504a5aedd3be7b663c5090eb22243e3fa669b) )
10031009
10041010   ROM_REGION( 0x1c0000, "gfx3", 0 )
1005   ROM_LOAD( "sf-15.bin", 0x000000, 0x020000, CRC(fc0113db) SHA1(7c19603129be5f6e1ccd07fd8b7ee1cbf86468db) ) /* Sprites planes 1-2 */
1011   /* Sprites planes 1-2 */
1012   ROM_LOAD( "sf-15.bin", 0x000000, 0x020000, CRC(fc0113db) SHA1(7c19603129be5f6e1ccd07fd8b7ee1cbf86468db) )
10061013   ROM_LOAD( "sf-16.bin", 0x020000, 0x020000, CRC(82e4a6d3) SHA1(5ec519c2740c66f5da27ced1db99e19fe38fdad7) )
10071014   ROM_LOAD( "sf-11.bin", 0x040000, 0x020000, CRC(e112df1b) SHA1(3f9856f69b457d79fe085bf51dfb2efcd98f883d) )
10081015   ROM_LOAD( "sf-12.bin", 0x060000, 0x020000, CRC(42d52299) SHA1(6560c38f5fd5a47db7728cc7df83d2169157174f) )
10091016   ROM_LOAD( "sf-07.bin", 0x080000, 0x020000, CRC(49f340d9) SHA1(65822efefa198791a632ef851a5ce06a71b4ed0f) )
10101017   ROM_LOAD( "sf-08.bin", 0x0a0000, 0x020000, CRC(95ece9b1) SHA1(f0a15fce5cd9617fa5d4dd43bd5b6ea190dace85) )
10111018   ROM_LOAD( "sf-03.bin", 0x0c0000, 0x020000, CRC(5ca05781) SHA1(004f5ad34798471b39bd4612c797f0913ed0fb4a) )
1012   ROM_LOAD( "sf-17.bin", 0x0e0000, 0x020000, CRC(69fac48e) SHA1(c9272217256c73cb8ddb4fbbfb5905ce1122c746) ) /* planes 2-3 */
1019   /* Sprites planes 2-3 */
1020   ROM_LOAD( "sf-17.bin", 0x0e0000, 0x020000, CRC(69fac48e) SHA1(c9272217256c73cb8ddb4fbbfb5905ce1122c746) )
10131021   ROM_LOAD( "sf-18.bin", 0x100000, 0x020000, CRC(71cfd18d) SHA1(4c17e2124f3456d6b13ede8ad3ae916b53f9bb7e) )
10141022   ROM_LOAD( "sf-13.bin", 0x120000, 0x020000, CRC(fa2eb24b) SHA1(96f3bd54c340771577cc232ebde93965421f2557) )
10151023   ROM_LOAD( "sf-14.bin", 0x140000, 0x020000, CRC(ad955c95) SHA1(549d6a5125432aa45d03f15e76f6c2c8ab2e05a3) )
r7772r7773
10331041   ROM_LOAD( "mmi-7603.13h", 0x0300, 0x0020, CRC(06bcda53) SHA1(fa69b77697bb12aa6012d82ef5b504d3a1d20232) )   /* unknown */
10341042ROM_END
10351043
1044
1045ROM_START( sfua )
1046   ROM_REGION( 0x60000, "maincpu", 0 )
1047   ROM_LOAD16_BYTE("sfs19u.1a", 0x00000, 0x10000, CRC(c8e41c49) SHA1(01f023864a662fa451901b8689341b00a36973c1) )
1048   ROM_LOAD16_BYTE("sfs22u.1b", 0x00001, 0x10000, CRC(667e9309) SHA1(3d895874cf86470e4f2041d21e751fac3170b4c5) )
1049   ROM_LOAD16_BYTE("sfs20u.2a", 0x20000, 0x10000, CRC(303065bf) SHA1(152bb707cd71a8614f6d17cf9a145c8a8184ded7) )
1050   ROM_LOAD16_BYTE("sfs23u.2b", 0x20001, 0x10000, CRC(de6927a3) SHA1(862a62b71fbd2049f05968a238b97344d3b7404e) )
1051   ROM_LOAD16_BYTE("sfs21u.3a", 0x40000, 0x10000, CRC(004a418b) SHA1(1048afe2e0dbc22969d79a031394f3c8ab4c8901) )
1052   ROM_LOAD16_BYTE("sfs24u.3b", 0x40001, 0x10000, CRC(2b4545ff) SHA1(19bdae7947d13b861ace25b96e46f199ee9a6eb2) )
1053
1054   ROM_REGION( 0x10000, "audiocpu", 0 )   /* 64k for the music CPU */
1055   ROM_LOAD( "sf-02.bin", 0x0000, 0x8000, CRC(4a9ac534) SHA1(933645f8db4756aa2a35a843c3ac6f93cb8d565d) )
1056
1057   ROM_REGION( 0x40000, "audio2", 0 )   /* 256k for the samples CPU */
1058   ROM_LOAD( "sfu-00",    0x00000, 0x20000, CRC(a7cce903) SHA1(76f521c9a00abd95a3491ab95e8eccd0fc7ea0e5) )
1059   ROM_LOAD( "sf-01.bin", 0x20000, 0x20000, CRC(86e0f0d5) SHA1(7cef8056f83dac15f1b47d7be705d26170858337) )
1060
1061   ROM_REGION( 0x0800, "mcu", 0 ) /* i8751 MCU */
1062   ROM_LOAD( "i8751.bin",   0x0000, 0x0800, NO_DUMP )
1063
1064   ROM_REGION( 0x080000, "gfx1", 0 )
1065   ROM_LOAD( "sf-39.bin", 0x000000, 0x020000, CRC(cee3d292) SHA1(a8c22f1dc81976e8dd5d6c70361c61fa3f9f89d6) ) /* Background b planes 0-1*/
1066   ROM_LOAD( "sf-38.bin", 0x020000, 0x020000, CRC(2ea99676) SHA1(5f3eb77e75f0ee27fb8fc7bab2819b3fdd480206) )
1067   ROM_LOAD( "sf-41.bin", 0x040000, 0x020000, CRC(e0280495) SHA1(e52c79feed590535b9a0b71ccadd0ed27d04ff45) ) /* planes 2-3 */
1068   ROM_LOAD( "sf-40.bin", 0x060000, 0x020000, CRC(c70b30de) SHA1(26112ee1720b6ad0e2e29e2d25ee2ec76fca0e3a) )
1069
1070   ROM_REGION( 0x100000, "gfx2", 0 )
1071   ROM_LOAD( "sf-25.bin", 0x000000, 0x020000, CRC(7f23042e) SHA1(a355fd7047fb1a71ab5cd08e1afd82c2558494c1) )   /* Background m planes 0-1 */
1072   ROM_LOAD( "sf-28.bin", 0x020000, 0x020000, CRC(92f8b91c) SHA1(6d958bc45131810d7b0af02be939ce37a39c35e8) )
1073   ROM_LOAD( "sf-30.bin", 0x040000, 0x020000, CRC(b1399856) SHA1(7c956d49b2e73291182ea1ec4cebd3411d1322a1) )
1074   ROM_LOAD( "sf-34.bin", 0x060000, 0x020000, CRC(96b6ae2e) SHA1(700e050463b7a29a1eb08007a2add045afdcd8a0) )
1075   ROM_LOAD( "sf-26.bin", 0x080000, 0x020000, CRC(54ede9f5) SHA1(c2cb354a6b32047759945fa3ecafc70ba7d1dda1) ) /* planes 2-3 */
1076   ROM_LOAD( "sf-29.bin", 0x0a0000, 0x020000, CRC(f0649a67) SHA1(eeda256527f7a2ee2d5e0688c505a01de548bc54) )
1077   ROM_LOAD( "sf-31.bin", 0x0c0000, 0x020000, CRC(8f4dd71a) SHA1(28b82c540df04c91a2dd6cbbc9a95bbebda6643b) )
1078   ROM_LOAD( "sf-35.bin", 0x0e0000, 0x020000, CRC(70c00fb4) SHA1(7c5504a5aedd3be7b663c5090eb22243e3fa669b) )
1079
1080   ROM_REGION( 0x1c0000, "gfx3", 0 )
1081   /* Sprites planes 1-2 */
1082   ROM_LOAD( "sf-15.bin", 0x000000, 0x020000, CRC(fc0113db) SHA1(7c19603129be5f6e1ccd07fd8b7ee1cbf86468db) )
1083   ROM_LOAD( "sf-16.bin", 0x020000, 0x020000, CRC(82e4a6d3) SHA1(5ec519c2740c66f5da27ced1db99e19fe38fdad7) )
1084   ROM_LOAD( "sf-11.bin", 0x040000, 0x020000, CRC(e112df1b) SHA1(3f9856f69b457d79fe085bf51dfb2efcd98f883d) )
1085   ROM_LOAD( "sf-12.bin", 0x060000, 0x020000, CRC(42d52299) SHA1(6560c38f5fd5a47db7728cc7df83d2169157174f) )
1086   ROM_LOAD( "sf-07.bin", 0x080000, 0x020000, CRC(49f340d9) SHA1(65822efefa198791a632ef851a5ce06a71b4ed0f) )
1087   ROM_LOAD( "sf-08.bin", 0x0a0000, 0x020000, CRC(95ece9b1) SHA1(f0a15fce5cd9617fa5d4dd43bd5b6ea190dace85) )
1088   ROM_LOAD( "sf-03.bin", 0x0c0000, 0x020000, CRC(5ca05781) SHA1(004f5ad34798471b39bd4612c797f0913ed0fb4a) )
1089   /* Sprites planes 2-3 */
1090   ROM_LOAD( "sf-17.bin", 0x0e0000, 0x020000, CRC(69fac48e) SHA1(c9272217256c73cb8ddb4fbbfb5905ce1122c746) )
1091   ROM_LOAD( "sf-18.bin", 0x100000, 0x020000, CRC(71cfd18d) SHA1(4c17e2124f3456d6b13ede8ad3ae916b53f9bb7e) )
1092   ROM_LOAD( "sf-13.bin", 0x120000, 0x020000, CRC(fa2eb24b) SHA1(96f3bd54c340771577cc232ebde93965421f2557) )
1093   ROM_LOAD( "sf-14.bin", 0x140000, 0x020000, CRC(ad955c95) SHA1(549d6a5125432aa45d03f15e76f6c2c8ab2e05a3) )
1094   ROM_LOAD( "sf-09.bin", 0x160000, 0x020000, CRC(41b73a31) SHA1(aaa7a53e29fe23a1ca8ec4430f7efcbd774a8cbf) )
1095   ROM_LOAD( "sf-10.bin", 0x180000, 0x020000, CRC(91c41c50) SHA1(b03fb9b3c553fb4aae45ad6997eeb7bb95fdcce3) )
1096   ROM_LOAD( "sf-05.bin", 0x1a0000, 0x020000, CRC(538c7cbe) SHA1(f030a9562fbb93d1534b91343ca3f429cdbd0136) )
1097
1098   ROM_REGION( 0x004000, "gfx4", 0 )
1099   ROM_LOAD( "sf-27.bin", 0x000000, 0x004000, CRC(2b09b36d) SHA1(9fe1dd3a9396fbb06f30247cfe526653553beca1) ) /* Characters planes 1-2 */
1100
1101   ROM_REGION( 0x40000, "gfx5", 0 )   /* background tilemaps */
1102   ROM_LOAD( "sf-37.bin", 0x000000, 0x010000, CRC(23d09d3d) SHA1(a0c71abc49c5fe59487a63b502e3d03021bfef13) )
1103   ROM_LOAD( "sf-36.bin", 0x010000, 0x010000, CRC(ea16df6c) SHA1(68709a314b775c500817fc17d40a80204b2ae06c) )
1104   ROM_LOAD( "sf-32.bin", 0x020000, 0x010000, CRC(72df2bd9) SHA1(9a0da618139673738b6b3302207255e44c5491a2) )
1105   ROM_LOAD( "sf-33.bin", 0x030000, 0x010000, CRC(3e99d3d5) SHA1(9168a977e80f8c23c6126b9e64eb176290cf941a) )
1106
1107   ROM_REGION( 0x0320, "proms", 0 )
1108   ROM_LOAD( "sfb05.bin",    0x0000, 0x0100, CRC(864199ad) SHA1(b777df20b19fa7b7536120191df1875101e9d7af) )   /* unknown */
1109   ROM_LOAD( "sfb00.bin",    0x0100, 0x0100, CRC(bd3f8c5d) SHA1(c31ee9f466f05a21612f5ea29fb8c7c25dc9e011) )   /* unknown */
1110   ROM_LOAD( "mb7114h.12j",  0x0200, 0x0100, CRC(4c734b64) SHA1(7a122b643bad3e3586821980efff023a63e5a029) )   /* unknown */
1111   ROM_LOAD( "mmi-7603.13h", 0x0300, 0x0020, CRC(06bcda53) SHA1(fa69b77697bb12aa6012d82ef5b504d3a1d20232) )   /* unknown */
1112ROM_END
1113
1114
10361115ROM_START( sfj )
10371116   ROM_REGION( 0x60000, "maincpu", 0 )
10381117   ROM_LOAD16_BYTE("sf-19.bin", 0x00000, 0x10000, CRC(116027d7) SHA1(6bcb117ee415aff4d8ea962d4eff4088ca94c251) )
r7772r7773
10491128   ROM_LOAD( "sf-00.bin", 0x00000, 0x20000, CRC(4b733845) SHA1(f7ff46e02f8ce6682d6e573588271bae2edfa90f) )
10501129   ROM_LOAD( "sf-01.bin", 0x20000, 0x20000, CRC(86e0f0d5) SHA1(7cef8056f83dac15f1b47d7be705d26170858337) )
10511130
1052   ROM_REGION( 0x0800, "mcu", 0 ) /* 68705 MCU */
1131   ROM_REGION( 0x0800, "mcu", 0 ) /* 68705 MCU */ // or should it be an i8751 like the above set? the protection is the same!
10531132   ROM_LOAD( "68705.bin",   0x0000, 0x0800, NO_DUMP )
10541133
10551134   ROM_REGION( 0x080000, "gfx1", 0 )
r7772r7773
10691148   ROM_LOAD( "sf-35.bin", 0x0e0000, 0x020000, CRC(70c00fb4) SHA1(7c5504a5aedd3be7b663c5090eb22243e3fa669b) )
10701149
10711150   ROM_REGION( 0x1c0000, "gfx3", 0 )
1072   ROM_LOAD( "sf-15.bin", 0x000000, 0x020000, CRC(fc0113db) SHA1(7c19603129be5f6e1ccd07fd8b7ee1cbf86468db) ) /* Sprites planes 1-2 */
1151   /* Sprites planes 1-2 */
1152   ROM_LOAD( "sf-15.bin", 0x000000, 0x020000, CRC(fc0113db) SHA1(7c19603129be5f6e1ccd07fd8b7ee1cbf86468db) )
10731153   ROM_LOAD( "sf-16.bin", 0x020000, 0x020000, CRC(82e4a6d3) SHA1(5ec519c2740c66f5da27ced1db99e19fe38fdad7) )
10741154   ROM_LOAD( "sf-11.bin", 0x040000, 0x020000, CRC(e112df1b) SHA1(3f9856f69b457d79fe085bf51dfb2efcd98f883d) )
10751155   ROM_LOAD( "sf-12.bin", 0x060000, 0x020000, CRC(42d52299) SHA1(6560c38f5fd5a47db7728cc7df83d2169157174f) )
10761156   ROM_LOAD( "sf-07.bin", 0x080000, 0x020000, CRC(49f340d9) SHA1(65822efefa198791a632ef851a5ce06a71b4ed0f) )
10771157   ROM_LOAD( "sf-08.bin", 0x0a0000, 0x020000, CRC(95ece9b1) SHA1(f0a15fce5cd9617fa5d4dd43bd5b6ea190dace85) )
10781158   ROM_LOAD( "sf-03.bin", 0x0c0000, 0x020000, CRC(5ca05781) SHA1(004f5ad34798471b39bd4612c797f0913ed0fb4a) )
1079   ROM_LOAD( "sf-17.bin", 0x0e0000, 0x020000, CRC(69fac48e) SHA1(c9272217256c73cb8ddb4fbbfb5905ce1122c746) ) /* planes 2-3 */
1159   /* Sprites planes 2-3 */
1160   ROM_LOAD( "sf-17.bin", 0x0e0000, 0x020000, CRC(69fac48e) SHA1(c9272217256c73cb8ddb4fbbfb5905ce1122c746) )
10801161   ROM_LOAD( "sf-18.bin", 0x100000, 0x020000, CRC(71cfd18d) SHA1(4c17e2124f3456d6b13ede8ad3ae916b53f9bb7e) )
10811162   ROM_LOAD( "sf-13.bin", 0x120000, 0x020000, CRC(fa2eb24b) SHA1(96f3bd54c340771577cc232ebde93965421f2557) )
10821163   ROM_LOAD( "sf-14.bin", 0x140000, 0x020000, CRC(ad955c95) SHA1(549d6a5125432aa45d03f15e76f6c2c8ab2e05a3) )
r7772r7773
11001181   ROM_LOAD( "mmi-7603.13h", 0x0300, 0x0020, CRC(06bcda53) SHA1(fa69b77697bb12aa6012d82ef5b504d3a1d20232) )   /* unknown */
11011182ROM_END
11021183
1184
11031185ROM_START( sfp )
11041186   ROM_REGION( 0x60000, "maincpu", 0 )
11051187   ROM_LOAD16_BYTE("prg8.2a", 0x00000, 0x20000, CRC(d48d06a3) SHA1(d899771c66c1e7a5caa11f67a1122adb6f0f4d28) )
r7772r7773
11271209   ROM_LOAD( "mchr.2g", 0x0c0000, 0x020000, CRC(1283ac09) SHA1(229a507e0a1c46b451d8879e690e8557d21d588d) )
11281210   ROM_LOAD( "mchr.2h", 0x0e0000, 0x020000, CRC(cc6bf05c) SHA1(4e83dd55c88d5b539ab1dcae5bfd16195bcd2565) )
11291211
1130   ROM_REGION( 0xc0000, "gfx3", 0 )
1131   ROM_LOAD( "b1m.bin", 0x000000, 0x010000, CRC(64758232) SHA1(20d21677b791a7f96afed54b286ee92adb80456d) ) /* Sprites planes 1-2 */
1212   /* these graphic roms seem mismatched with this version of the prototype, they don't contain the graphics needed
1213       for the bonus round, or have complete tile sets graphic set for 2 of the characters which are used by the prototype
1214       (all of Joe is missing, many of Mike's poses are missing) If you use the original ROMs instead the graphics are
1215       correct, so the prototype is clearly already referencing the final tile arrangement for them.  The glitches
1216       therefore are not emulation bugs, if the PCB contained the same mismatched ROMs it would exhibit the same glitches. */
1217   ROM_REGION( 0x1c0000, "gfx3", ROMREGION_ERASE00 )
1218   /* Sprites planes 1-2 */
1219   ROM_LOAD( "b1m.bin", 0x000000, 0x010000, CRC(64758232) SHA1(20d21677b791a7f96afed54b286ee92adb80456d) )
11321220   ROM_LOAD( "b2m.bin", 0x010000, 0x010000, CRC(d958f5ad) SHA1(0e5c98a24814f5e1e6346dba4cfbd3a3a72ed724) )
11331221   ROM_LOAD( "b1k.bin", 0x020000, 0x010000, CRC(e766f5fe) SHA1(ad48a543507a981d844f0e2d5cceb689775b9ad6) )
11341222   ROM_LOAD( "b2k.bin", 0x030000, 0x010000, CRC(e71572d3) SHA1(752540bbabf56c883208b132e285b485d4b5b4ee) )
11351223   ROM_LOAD( "b1h.bin", 0x040000, 0x010000, CRC(8494f38c) SHA1(8d99ae088bd5b479f10e69b0a960f07d10adc23b) )
11361224   ROM_LOAD( "b2h.bin", 0x050000, 0x010000, CRC(1fc5f049) SHA1(bb6d5622247ec32ad044cde856cf67dddc3c732f) )
1137   ROM_LOAD( "b3m.bin", 0x060000, 0x010000, CRC(d136802e) SHA1(84c2a6b2a8bad7e9249b6dce9cbf5301526aa6af) ) /* planes 2-3 */
1138   ROM_LOAD( "b4m.bin", 0x070000, 0x010000, CRC(b4fa85d3) SHA1(c15e36000bf68a838eb34c3872e342acbb9c140a) )
1139   ROM_LOAD( "b3k.bin", 0x080000, 0x010000, CRC(40e11cc8) SHA1(ed469a8629080da88ce6faeb232633f94e2816c3) )
1140   ROM_LOAD( "b4k.bin", 0x090000, 0x010000, CRC(5ca9716e) SHA1(87620083aa6a7697f6faf742ac0e47115af3e0f3) )
1141   ROM_LOAD( "b3h.bin", 0x0a0000, 0x010000, CRC(8c3d9173) SHA1(08df92d962852f88b42e76dfaf6bb23a80d84657) )
1142   ROM_LOAD( "b4h.bin", 0x0b0000, 0x010000, CRC(a2df66f8) SHA1(9349704fdb7b0919813cb48d4deacdbbdebb2fee) )
1225   /* Sprites planes 2-3 */
1226   ROM_LOAD( "b3m.bin", 0x0e0000, 0x010000, CRC(d136802e) SHA1(84c2a6b2a8bad7e9249b6dce9cbf5301526aa6af) )
1227   ROM_LOAD( "b4m.bin", 0x0f0000, 0x010000, CRC(b4fa85d3) SHA1(c15e36000bf68a838eb34c3872e342acbb9c140a) )
1228   ROM_LOAD( "b3k.bin", 0x100000, 0x010000, CRC(40e11cc8) SHA1(ed469a8629080da88ce6faeb232633f94e2816c3) )
1229   ROM_LOAD( "b4k.bin", 0x110000, 0x010000, CRC(5ca9716e) SHA1(87620083aa6a7697f6faf742ac0e47115af3e0f3) )
1230   ROM_LOAD( "b3h.bin", 0x120000, 0x010000, CRC(8c3d9173) SHA1(08df92d962852f88b42e76dfaf6bb23a80d84657) )
1231   ROM_LOAD( "b4h.bin", 0x130000, 0x010000, CRC(a2df66f8) SHA1(9349704fdb7b0919813cb48d4deacdbbdebb2fee) )
11431232
11441233   ROM_REGION( 0x004000, "gfx4", 0 )
11451234   ROM_LOAD( "vram.4d", 0x000000, 0x004000, CRC(bfadfb32) SHA1(8443ad9f02da5fb032017fc0c657b1bdc15e4f27) ) /* Characters planes 1-2 */
r7772r7773
11591248
11601249
11611250
1162GAME( 1987, sf,   0,  sf,   sf,   0, ROT0, "Capcom", "Street Fighter (World)", GAME_SUPPORTS_SAVE )
1163GAME( 1987, sfus, sf, sfus, sfus, 0, ROT0, "Capcom", "Street Fighter (US)", GAME_SUPPORTS_SAVE )
1164GAME( 1987, sfj,  sf, sfjp, sfjp, 0, ROT0, "Capcom", "Street Fighter (Japan)", GAME_SUPPORTS_SAVE )
1251GAME( 1987, sf,   0,  sf,   sf,   0, ROT0, "Capcom", "Street Fighter (World, Analog buttons)", GAME_SUPPORTS_SAVE )
1252GAME( 1987, sfu,  sf, sfus, sfus, 0, ROT0, "Capcom", "Street Fighter (US, set 1)", GAME_SUPPORTS_SAVE ) // Shows Capcom copyright
1253GAME( 1987, sfua, sf, sfjp, sfjp, 0, ROT0, "Capcom", "Street Fighter (US, set 2) (protected)", GAME_SUPPORTS_SAVE ) // Shows Capcom USA copyright
1254GAME( 1987, sfj,  sf, sfjp, sfjp, 0, ROT0, "Capcom", "Street Fighter (Japan) (protected)", GAME_SUPPORTS_SAVE )
11651255GAME( 1987, sfp,  sf, sfp,  sf,   0, ROT0, "Capcom", "Street Fighter (prototype)", GAME_SUPPORTS_SAVE )
src/tools/unidasm.c
r7772r7773
346346}
347347
348348
349void osd_break_into_debugger(const char *text)
350{
351   /* we don't have a complete debugger to break in */
352}
353
354
355349void CLIB_DECL logerror(const char *format, ...)
356350{
357351   /* silent logerrors are allowed in disassemblers */
src/tools/tools.mak
r7772r7773
111111UNIDASMOBJS = \
112112   $(TOOLSOBJ)/unidasm.o \
113113
114unidasm$(EXE): $(UNIDASMOBJS) $(LIBUTIL) $(LIBOCORE) $(LIBDASM) $(ZLIB) $(EXPAT)
114unidasm$(EXE): $(UNIDASMOBJS) $(LIBDASM) $(LIBUTIL) $(LIBOCORE) $(ZLIB) $(EXPAT)
115115   @echo Linking $@...
116116   $(LD) $(LDFLAGS) $^ $(LIBS) -o $@
117117
src/osd/osdcore.h
r7772r7773
5050
5151#include "osdcomm.h"
5252
53#ifdef __cplusplus
54extern "C" {
55#endif
5356
5457
5558/***************************************************************************
r7772r7773
884887const char *osd_get_volume_name(int idx);
885888#endif
886889
890#ifdef __cplusplus
891}
892#endif
893
887894#endif   /* __OSDEPEND_H__ */
src/emu/cpu/m68000/m68kfpu.c
r7772r7773
1111
1212extern flag floatx80_is_nan( floatx80 a );
1313
14// masks for packed dwords, positive k-factor
15static UINT32 pkmask2[18] =
16{
17   0xffffffff, 0, 0xf0000000, 0xff000000, 0xfff00000, 0xffff0000,
18   0xfffff000, 0xffffff00, 0xfffffff0, 0xffffffff,
19   0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
20   0xffffffff, 0xffffffff, 0xffffffff
21};
22
23static UINT32 pkmask3[18] =
24{
25   0xffffffff, 0, 0, 0, 0, 0, 0, 0, 0, 0,
26   0xf0000000, 0xff000000, 0xfff00000, 0xffff0000,
27   0xfffff000, 0xffffff00, 0xfffffff0, 0xffffffff,
28};
29
1430INLINE double fx80_to_double(floatx80 fx)
1531{
1632   UINT64 d;
r7772r7773
3248   return float64_to_floatx80(*d);
3349}
3450
51INLINE floatx80 load_extended_float80(m68ki_cpu_core *m68k, UINT32 ea)
52{
53   UINT32 d1,d2;
54   UINT16 d3;
55   floatx80 fp;
56
57   d3 = m68ki_read_16(m68k, ea);
58   d1 = m68ki_read_32(m68k, ea+4);
59   d2 = m68ki_read_32(m68k, ea+8);
60
61   fp.high = d3;
62   fp.low = ((UINT64)d1<<32) | (d2 & 0xffffffff);
63
64   return fp;
65}
66
67INLINE void store_extended_float80(m68ki_cpu_core *m68k, UINT32 ea, floatx80 fpr)
68{
69   m68ki_write_16(m68k, ea+0, fpr.high);
70   m68ki_write_16(m68k, ea+2, 0);
71   m68ki_write_32(m68k, ea+4, (fpr.low>>32)&0xffffffff);
72   m68ki_write_32(m68k, ea+8, fpr.low&0xffffffff);
73}
74
75INLINE floatx80 load_pack_float80(m68ki_cpu_core *m68k, UINT32 ea)
76{
77   UINT32 dw1, dw2, dw3;
78   floatx80 result;
79   double tmp;
80   char str[128], *ch;
81
82   dw1 = m68ki_read_32(m68k, ea);
83   dw2 = m68ki_read_32(m68k, ea+4);
84   dw3 = m68ki_read_32(m68k, ea+8);
85
86   ch = &str[0];
87   if (dw1 & 0x80000000)   // mantissa sign
88   {
89      *ch++ = '-';
90   }
91   *ch++ = (char)((dw1 & 0xf) + '0');
92   *ch++ = '.';
93   *ch++ = (char)(((dw2 >> 28) & 0xf) + '0');
94   *ch++ = (char)(((dw2 >> 24) & 0xf) + '0');
95   *ch++ = (char)(((dw2 >> 20) & 0xf) + '0');
96   *ch++ = (char)(((dw2 >> 16) & 0xf) + '0');
97   *ch++ = (char)(((dw2 >> 12) & 0xf) + '0');
98   *ch++ = (char)(((dw2 >> 8)  & 0xf) + '0');
99   *ch++ = (char)(((dw2 >> 4)  & 0xf) + '0');
100   *ch++ = (char)(((dw2 >> 0)  & 0xf) + '0');
101   *ch++ = (char)(((dw3 >> 28) & 0xf) + '0');
102   *ch++ = (char)(((dw3 >> 24) & 0xf) + '0');
103   *ch++ = (char)(((dw3 >> 20) & 0xf) + '0');
104   *ch++ = (char)(((dw3 >> 16) & 0xf) + '0');
105   *ch++ = (char)(((dw3 >> 12) & 0xf) + '0');
106   *ch++ = (char)(((dw3 >> 8)  & 0xf) + '0');
107   *ch++ = (char)(((dw3 >> 4)  & 0xf) + '0');
108   *ch++ = (char)(((dw3 >> 0)  & 0xf) + '0');
109   *ch++ = 'E';
110   if (dw1 & 0x40000000)   // exponent sign
111   {
112      *ch++ = '-';
113   }
114   *ch++ = (char)(((dw1 >> 24) & 0xf) + '0');
115   *ch++ = (char)(((dw1 >> 20) & 0xf) + '0');
116   *ch++ = (char)(((dw1 >> 16) & 0xf) + '0');
117   *ch = '\0';
118
119   sscanf(str, "%le", &tmp);
120
121   result = double_to_fx80(tmp);
122
123   return result;
124}
125
126INLINE void store_pack_float80(m68ki_cpu_core *m68k, UINT32 ea, int k, floatx80 fpr)
127{
128   UINT32 dw1, dw2, dw3;
129   char str[128], *ch;
130   int i, j, exp;
131
132   dw1 = dw2 = dw3 = 0;
133   ch = &str[0];
134
135   sprintf(str, "%.16e", fx80_to_double(fpr));
136
137   if (*ch == '-')
138   {
139      ch++;
140      dw1 = 0x80000000;
141   }
142
143   if (*ch == '+')
144   {
145      ch++;
146   }
147
148   dw1 |= (*ch++ - '0');
149
150   if (*ch == '.')
151   {
152      ch++;
153   }
154
155   // handle negative k-factor here
156   if ((k <= 0) && (k >= -13))
157   {
158      exp = 0;
159      for (i = 0; i < 3; i++)
160      {
161         if (ch[18+i] >= '0' && ch[18+i] <= '9')
162         {
163            exp = (exp << 4) | (ch[18+i] - '0');
164         }
165      }
166
167      if (ch[17] == '-')
168      {
169         exp = -exp;
170      }
171
172      k = -k;
173      // last digit is (k + exponent - 1)
174      k += (exp - 1);
175
176      // round up the last significant mantissa digit
177      if (ch[k+1] >= '5')
178      {
179         ch[k]++;
180      }
181
182      // zero out the rest of the mantissa digits
183      for (j = (k+1); j < 16; j++)
184      {
185         ch[j] = '0';
186      }
187
188      // now zero out K to avoid tripping the positive K detection below
189      k = 0;
190   }
191
192   // crack 8 digits of the mantissa
193   for (i = 0; i < 8; i++)
194   {
195      dw2 <<= 4;
196      if (*ch >= '0' && *ch <= '9')
197      {
198         dw2 |= *ch++ - '0';
199      }
200   }
201
202   // next 8 digits of the mantissa
203   for (i = 0; i < 8; i++)
204   {
205      dw3 <<= 4;
206      if (*ch >= '0' && *ch <= '9')
207      dw3 |= *ch++ - '0';
208   }
209
210   // handle masking if k is positive
211   if (k >= 1)
212   {
213      if (k <= 17)
214      {
215         dw2 &= pkmask2[k];
216         dw3 &= pkmask3[k];
217      }
218      else
219      {
220         dw2 &= pkmask2[17];
221         dw3 &= pkmask3[17];
222//          m68k->fpcr |=  (need to set OPERR bit)
223      }
224   }
225
226   // finally, crack the exponent
227   if (*ch == 'e' || *ch == 'E')
228   {
229      ch++;
230      if (*ch == '-')
231      {
232         ch++;
233         dw1 |= 0x40000000;
234      }
235
236      if (*ch == '+')
237      {
238         ch++;
239      }
240
241      j = 0;
242      for (i = 0; i < 3; i++)
243      {
244         if (*ch >= '0' && *ch <= '9')
245         {
246            j = (j << 4) | (*ch++ - '0');
247         }
248      }
249
250      dw1 |= (j << 16);
251   }
252
253   m68ki_write_32(m68k, ea, dw1);
254   m68ki_write_32(m68k, ea+4, dw2);
255   m68ki_write_32(m68k, ea+8, dw3);
256}
257
35258INLINE void SET_CONDITION_CODES(m68ki_cpu_core *m68k, floatx80 reg)
36259{
37260   UINT64 *regi;
r7772r7773
350573   return 0;
351574}
352575
576
577static floatx80 READ_EA_FPE(m68ki_cpu_core *m68k, int ea)
578{
579   floatx80 fpr;
580   int mode = (ea >> 3) & 0x7;
581   int reg = (ea & 0x7);
582
583   switch (mode)
584   {
585      case 2:      // (An)
586      {
587         UINT32 ea = REG_A[reg];
588         fpr = load_extended_float80(m68k, ea);
589         break;
590      }
591
592      case 3:      // (An)+
593      {
594         UINT32 ea = REG_A[reg];
595         REG_A[reg] += 12;
596         fpr = load_extended_float80(m68k, ea);
597         break;
598      }
599
600      case 7:   // extended modes
601      {
602         switch (reg)
603         {
604            case 2:   // (d16, PC)
605               {
606                  UINT32 ea = EA_PCDI_32(m68k);
607                  fpr = load_extended_float80(m68k, ea);
608               }
609               break;
610
611            case 3:   // (d16,PC,Dx.w)
612               {
613                  UINT32 ea = EA_PCIX_32(m68k);
614                  fpr = load_extended_float80(m68k, ea);
615               }
616               break;
617
618            default:
619               fatalerror("M68kFPU: READ_EA_FPE: unhandled mode %d, reg %d, at %08X\n", mode, reg, REG_PC);
620               break;
621         }
622      }
623      break;
624
625      default:   fatalerror("M68kFPU: READ_EA_FPE: unhandled mode %d, reg %d, at %08X\n", mode, reg, REG_PC); break;
626   }
627
628   return fpr;
629}
630
631static floatx80 READ_EA_PACK(m68ki_cpu_core *m68k, int ea)
632{
633   floatx80 fpr;
634   int mode = (ea >> 3) & 0x7;
635   int reg = (ea & 0x7);
636
637   switch (mode)
638   {
639      case 2:      // (An)
640      {
641         UINT32 ea = REG_A[reg];
642         fpr = load_pack_float80(m68k, ea);
643         break;
644      }
645
646      case 3:      // (An)+
647      {
648         UINT32 ea = REG_A[reg];
649         REG_A[reg] += 12;
650         fpr = load_pack_float80(m68k, ea);
651         break;
652      }
653
654      case 7:   // extended modes
655      {
656         switch (reg)
657         {
658            case 3:   // (d16,PC,Dx.w)
659               {
660                  UINT32 ea = EA_PCIX_32(m68k);
661                  fpr = load_pack_float80(m68k, ea);
662               }
663               break;
664
665            default:
666               fatalerror("M68kFPU: READ_EA_PACK: unhandled mode %d, reg %d, at %08X\n", mode, reg, REG_PC);
667               break;
668         }
669      }
670      break;
671
672      default:   fatalerror("M68kFPU: READ_EA_PACK: unhandled mode %d, reg %d, at %08X\n", mode, reg, REG_PC); break;
673   }
674
675   return fpr;
676}
677
353678static void WRITE_EA_8(m68ki_cpu_core *m68k, int ea, UINT8 data)
354679{
355680   int mode = (ea >> 3) & 0x7;
r7772r7773
593918   }
594919}
595920
596INLINE floatx80 load_extended_float80(m68ki_cpu_core *m68k, UINT32 ea)
921static void WRITE_EA_FPE(m68ki_cpu_core *m68k, int ea, floatx80 fpr)
597922{
598   UINT32 d1,d2;
599   UINT16 d3;
600   floatx80 fp;
601
602   d3 = m68ki_read_16(m68k, ea);
603   d1 = m68ki_read_32(m68k, ea+4);
604   d2 = m68ki_read_32(m68k, ea+8);
605   fp.high = d3;
606   fp.low = ((UINT64)d1<<32) | (d2 & 0xffffffff);
607
608   return fp;
609}
610
611static floatx80 READ_EA_FPE(m68ki_cpu_core *m68k, int ea)
612{
613   floatx80 fpr;
614923   int mode = (ea >> 3) & 0x7;
615924   int reg = (ea & 0x7);
616925
r7772r7773
618927   {
619928      case 2:      // (An)
620929      {
621         UINT32 ea = REG_A[reg];
622         fpr = load_extended_float80(m68k, ea);
930         UINT32 ea;
931         ea = REG_A[reg];
932         store_extended_float80(m68k, ea, fpr);
623933         break;
624934      }
625935
626936      case 3:      // (An)+
627937      {
628         UINT32 ea = REG_A[reg];
938         UINT32 ea;
939         ea = REG_A[reg];
940         store_extended_float80(m68k, ea, fpr);
629941         REG_A[reg] += 12;
630         fpr = load_extended_float80(m68k, ea);
631942         break;
632943      }
633944
634      case 7:   // extended modes
945      case 4:      // -(An)
635946      {
947         UINT32 ea;
948         REG_A[reg] -= 12;
949         ea = REG_A[reg];
950         store_extended_float80(m68k, ea, fpr);
951         break;
952      }
953
954      case 7:
955      {
636956         switch (reg)
637957         {
638            case 3:   // (d16,PC,Dx.w)
639               {
640                  UINT32 ea = EA_PCIX_32(m68k);
641                  fpr = load_extended_float80(m68k, ea);
642               }
643               break;
644
645            default:
646               fatalerror("M68kFPU: READ_EA_FPE0: unhandled mode %d, reg %d, at %08X\n", mode, reg, REG_PC);
647               break;
958            default:   fatalerror("M68kFPU: WRITE_EA_FPE: unhandled mode %d, reg %d, at %08X\n", mode, reg, REG_PC);
648959         }
649960      }
650      break;
651
652      default:   fatalerror("M68kFPU: READ_EA_FPE1: unhandled mode %d, reg %d, at %08X\n", mode, reg, REG_PC); break;
961      default:   fatalerror("M68kFPU: WRITE_EA_FPE: unhandled mode %d, reg %d, at %08X\n", mode, reg, REG_PC);
653962   }
654
655   return fpr;
656963}
657964
658INLINE void store_extended_float80(m68ki_cpu_core *m68k, UINT32 ea, floatx80 fpr)
965static void WRITE_EA_PACK(m68ki_cpu_core *m68k, int ea, int k, floatx80 fpr)
659966{
660   m68ki_write_16(m68k, ea+0, fpr.high);
661   m68ki_write_16(m68k, ea+2, 0);
662   m68ki_write_32(m68k, ea+4, (fpr.low>>32)&0xffffffff);
663   m68ki_write_32(m68k, ea+8, fpr.low&0xffffffff);
664}
665
666static void WRITE_EA_FPE(m68ki_cpu_core *m68k, int ea, floatx80 fpr)
667{
668967   int mode = (ea >> 3) & 0x7;
669968   int reg = (ea & 0x7);
670969
r7772r7773
674973      {
675974         UINT32 ea;
676975         ea = REG_A[reg];
677         store_extended_float80(m68k, ea, fpr);
976         store_pack_float80(m68k, ea, k, fpr);
678977         break;
679978      }
680979
r7772r7773
682981      {
683982         UINT32 ea;
684983         ea = REG_A[reg];
685         store_extended_float80(m68k, ea, fpr);
984         store_pack_float80(m68k, ea, k, fpr);
686985         REG_A[reg] += 12;
687986         break;
688987      }
r7772r7773
692991         UINT32 ea;
693992         REG_A[reg] -= 12;
694993         ea = REG_A[reg];
695         store_extended_float80(m68k, ea, fpr);
994         store_pack_float80(m68k, ea, k, fpr);
696995         break;
697996      }
698997
r7772r7773
700999      {
7011000         switch (reg)
7021001         {
703            default:   fatalerror("M68kFPU: WRITE_EA_FPE: unhandled mode %d, reg %d, at %08X\n", mode, reg, REG_PC);
1002            default:   fatalerror("M68kFPU: WRITE_EA_PACK: unhandled mode %d, reg %d, at %08X\n", mode, reg, REG_PC);
7041003         }
7051004      }
706      default:   fatalerror("M68kFPU: WRITE_EA_FPE: unhandled mode %d, reg %d, at %08X\n", mode, reg, REG_PC);
1005      default:   fatalerror("M68kFPU: WRITE_EA_PACK: unhandled mode %d, reg %d, at %08X\n", mode, reg, REG_PC);
7071006   }
7081007}
7091008
710
7111009static void fpgen_rm_reg(m68ki_cpu_core *m68k, UINT16 w2)
7121010{
7131011   int ea = m68k->ir & 0x3f;
r7772r7773
7421040         }
7431041         case 3:      // Packed-decimal Real
7441042         {
745            fatalerror("fpgen_rm_reg: packed-decimal real load unimplemented at %08X\n", REG_PC-4);
1043            source = READ_EA_PACK(m68k, ea);
7461044            break;
7471045         }
7481046         case 4:      // Word Integer
r7772r7773
9041202         m68k->remaining_cycles -= 11;
9051203         break;
9061204      }
1205      case 0x25:      // FREM
1206      {
1207         REG_FP[dst] = floatx80_rem(REG_FP[dst], source);
1208         SET_CONDITION_CODES(m68k, REG_FP[dst]);
1209         m68k->remaining_cycles -= 43;   // guess
1210         break;
1211      }
9071212      case 0x28:      // FSUB
9081213      {
9091214         REG_FP[dst] = floatx80_sub(REG_FP[dst], source);
r7772r7773
9371242   int ea = m68k->ir & 0x3f;
9381243   int src = (w2 >>  7) & 0x7;
9391244   int dst = (w2 >> 10) & 0x7;
940   //int kfactor = w2 & 0x7f;
1245   int k = (w2 & 0x7f);
9411246
9421247   switch (dst)
9431248   {
r7772r7773
9601265      }
9611266      case 3:      // Packed-decimal Real with Static K-factor
9621267      {
963         fatalerror("fmove_reg_mem: packed-decimal real store unimplemented at %08X\n", REG_PC-4);
1268         // sign-extend k
1269         k = (k & 0x40) ? (k | 0xffffff80) : (k & 0x7f);
1270         WRITE_EA_PACK(m68k, ea, k, REG_FP[src]);
9641271         break;
9651272      }
9661273      case 4:      // Word Integer
r7772r7773
9841291      }
9851292      case 7:      // Packed-decimal Real with Dynamic K-factor
9861293      {
987         fatalerror("fmove_reg_mem: packed-decimal real store unimplemented at %08X\n", REG_PC-4);
1294         WRITE_EA_PACK(m68k, ea, REG_D[k>>4], REG_FP[src]);
9881295         break;
9891296      }
9901297   }
r7772r7773
10001307
10011308   if (dir)   // From system control reg to <ea>
10021309   {
1003      switch (reg)
1004      {
1005         case 1:      WRITE_EA_32(m68k, ea, REG_FPIAR); break;
1006         case 2:      WRITE_EA_32(m68k, ea, REG_FPSR); break;
1007         case 4:      WRITE_EA_32(m68k, ea, REG_FPCR); break;
1008         default:   fatalerror("fmove_fpcr: unknown reg %d, dir %d\n", reg, dir);
1009      }
1310      if (reg & 4) WRITE_EA_32(m68k, ea, REG_FPCR);
1311      if (reg & 2) WRITE_EA_32(m68k, ea, REG_FPSR);
1312      if (reg & 1) WRITE_EA_32(m68k, ea, REG_FPIAR);
10101313   }
10111314   else      // From <ea> to system control reg
10121315   {
1013      switch (reg)
1014      {
1015         case 1:      REG_FPIAR = READ_EA_32(m68k, ea); break;
1016         case 2:      REG_FPSR = READ_EA_32(m68k, ea); break;
1017         case 4:      REG_FPCR = READ_EA_32(m68k, ea); break;
1018         default:   fatalerror("fmove_fpcr: unknown reg %d, dir %d\n", reg, dir);
1019      }
1316      if (reg & 4) REG_FPCR = READ_EA_32(m68k, ea);
1317      if (reg & 2) REG_FPSR = READ_EA_32(m68k, ea);
1318      if (reg & 1) REG_FPIAR = READ_EA_32(m68k, ea);
10201319   }
10211320
10221321   m68k->remaining_cycles -= 10;
r7772r7773
11091408
11101409void m68040_fpu_op0(m68ki_cpu_core *m68k)
11111410{
1411   m68k->fpu_just_reset = 0;
1412
11121413   switch ((m68k->ir >> 6) & 0x3)
11131414   {
11141415      case 0:
r7772r7773
11291430               break;
11301431            }
11311432
1132            case 0x4:   // FMOVE ea, FPCR
1133            case 0x5:   // FMOVE FPCR, ea
1433            case 0x4:   // FMOVEM ea, FPCR
1434            case 0x5:   // FMOVEM FPCR, ea
11341435            {
11351436               fmove_fpcr(m68k, w2);
11361437               break;
r7772r7773
11631464   }
11641465}
11651466
1467static void perform_fsave(m68ki_cpu_core *m68k, UINT32 addr, int inc)
1468{
1469   if (inc)
1470   {
1471      // 68881 IDLE, version 0x1f
1472      m68ki_write_32(m68k, addr, 0x1f180000);
1473      m68ki_write_32(m68k, addr+4, 0);
1474      m68ki_write_32(m68k, addr+8, 0);
1475      m68ki_write_32(m68k, addr+12, 0);
1476      m68ki_write_32(m68k, addr+16, 0);
1477      m68ki_write_32(m68k, addr+20, 0);
1478      m68ki_write_32(m68k, addr+24, 0x70000000);
1479   }
1480   else
1481   {
1482      m68ki_write_32(m68k, addr, 0x70000000);
1483      m68ki_write_32(m68k, addr-4, 0);
1484      m68ki_write_32(m68k, addr-8, 0);
1485      m68ki_write_32(m68k, addr-12, 0);
1486      m68ki_write_32(m68k, addr-16, 0);
1487      m68ki_write_32(m68k, addr-20, 0);
1488      m68ki_write_32(m68k, addr-24, 0x1f180000);
1489   }
1490}
1491
1492// FRESTORE on a NULL frame reboots the FPU - all registers to NaN, the 3 status regs to 0
1493static void do_frestore_null(m68ki_cpu_core *m68k)
1494{
1495   int i;
1496
1497   REG_FPCR = 0;
1498   REG_FPSR = 0;
1499   REG_FPIAR = 0;
1500   for (i = 0; i < 8; i++)
1501   {
1502      REG_FP[i].high = 0x7fff;
1503      REG_FP[i].low = U64(0xffffffffffffffff);
1504   }
1505
1506   // Mac IIci at 408458e6 wants an FSAVE of a just-restored NULL frame to also be NULL
1507   // The PRM says it's possible to generate a NULL frame, but not how/when/why.  (need the 68881/68882 manual!)
1508   m68k->fpu_just_reset = 1;
1509}
1510
11661511void m68040_fpu_op1(m68ki_cpu_core *m68k)
11671512{
11681513   int ea = m68k->ir & 0x3f;
1514   int mode = (ea >> 3) & 0x7;
1515   int reg = (ea & 0x7);
1516   UINT32 addr, temp;
11691517
11701518   switch ((m68k->ir >> 6) & 0x3)
11711519   {
11721520      case 0:      // FSAVE <ea>
11731521      {
1174         WRITE_EA_32(m68k, ea, 0x00000000);
1175         // TODO: correct state frame
1522         switch (mode)
1523         {
1524            case 3:   // (An)+
1525                   addr = EA_AY_PI_32(m68k);
1526
1527               if (m68k->fpu_just_reset)
1528               {
1529                  m68ki_write_32(m68k, addr, 0);
1530               }
1531               else
1532               {
1533                  // we normally generate an IDLE frame
1534                  REG_A[reg] += 6*4;
1535                  perform_fsave(m68k, addr, 1);
1536               }
1537               break;
1538
1539            case 4: // -(An)
1540                   addr = EA_AY_PD_32(m68k);
1541
1542               if (m68k->fpu_just_reset)
1543               {
1544                  m68ki_write_32(m68k, addr, 0);
1545               }
1546               else
1547               {
1548                  // we normally generate an IDLE frame
1549                  REG_A[reg] -= 6*4;
1550                  perform_fsave(m68k, addr, 0);
1551               }
1552               break;
1553
1554            default:
1555               fatalerror("M68kFPU: FSAVE unhandled mode %d reg %d at %x\n", mode, reg, REG_PC);
1556         }
11761557         break;
11771558      }
1559      break;
11781560
11791561      case 1:      // FRESTORE <ea>
11801562      {
1181         READ_EA_32(m68k, ea);
1182         // TODO: correct state frame
1563         switch (mode)
1564         {
1565            case 2: // (An)
1566               addr = REG_A[reg];
1567               temp = m68ki_read_32(m68k, addr);
1568
1569               // check for NULL frame
1570               if (temp & 0xff000000)
1571               {
1572                  // we don't handle non-NULL frames and there's no pre/post inc/dec to do here
1573                  m68k->fpu_just_reset = 0;
1574               }
1575               else
1576               {
1577                  do_frestore_null(m68k);
1578               }
1579               break;
1580
1581            case 3:   // (An)+
1582                   addr = EA_AY_PI_32(m68k);
1583               temp = m68ki_read_32(m68k, addr);
1584
1585               // check for NULL frame
1586               if (temp & 0xff000000)
1587               {
1588                  m68k->fpu_just_reset = 0;
1589
1590                  // how about an IDLE frame?
1591                  if ((temp & 0x00ff0000) == 0x00180000)
1592                  {
1593                     REG_A[reg] += 6*4;
1594                  } // check UNIMP
1595                  else if ((temp & 0x00ff0000) == 0x00380000)
1596                  {
1597                     REG_A[reg] += 14*4;
1598                  } // check BUSY
1599                  else if ((temp & 0x00ff0000) == 0x00b40000)
1600                  {
1601                     REG_A[reg] += 45*4;
1602                  }
1603               }
1604               else
1605               {
1606                  do_frestore_null(m68k);
1607               }
1608               break;
1609
1610            default:
1611               fatalerror("M68kFPU: FRESTORE unhandled mode %d reg %d at %x\n", mode, reg, REG_PC);
1612         }
11831613         break;
11841614      }
1615      break;
11851616
11861617      default:   fatalerror("m68040_fpu_op1: unimplemented op %d at %08X\n", (m68k->ir >> 6) & 0x3, REG_PC-2);
11871618   }
src/emu/cpu/m68000/m68kcpu.h
r7772r7773
585585   UINT32 run_mode;     /* Stores whether we are processing a reset, bus error, address error, or something else */
586586   int    has_pmmu;     /* Indicates if a PMMU available (yes on 030, 040, no on EC030) */
587587   int    pmmu_enabled; /* Indicates if the PMMU is enabled */
588   int    fpu_just_reset; /* Indicates the FPU was just reset */
588589
589590   /* Clocks required for instructions / exceptions */
590591   UINT32 cyc_bcc_notake_b;
src/emu/cpu/m68000/m68kdasm.c
r7772r7773
296296#define get_imm_str_u16() get_imm_str_u(1)
297297#define get_imm_str_u32() get_imm_str_u(2)
298298
299static int sext_7bit_int(int value)
300{
301   return (value & 0x40) ? (value | 0xffffff80) : (value & 0x7f);
302}
299303
304
300305/* 100% portable signed int generators */
301306static int make_int_8(int value)
302307{
r7772r7773
15101515static void d68020_cprestore(void)
15111516{
15121517   LIMIT_CPU_TYPES(M68020_PLUS);
1513   sprintf(g_dasm_str, "%drestore %s; (2-3)", (g_cpu_ir>>9)&7, get_ea_mode_str_8(g_cpu_ir));
1518   if (((g_cpu_ir>>9)&7) == 1)
1519   {
1520      sprintf(g_dasm_str, "frestore %s", get_ea_mode_str_8(g_cpu_ir));
1521   }
1522   else
1523   {
1524      sprintf(g_dasm_str, "%drestore %s; (2-3)", (g_cpu_ir>>9)&7, get_ea_mode_str_8(g_cpu_ir));
1525   }
15141526}
15151527
15161528static void d68020_cpsave(void)
15171529{
15181530   LIMIT_CPU_TYPES(M68020_PLUS);
1519   sprintf(g_dasm_str, "%dsave   %s; (2-3)", (g_cpu_ir>>9)&7, get_ea_mode_str_8(g_cpu_ir));
1531   if (((g_cpu_ir>>9)&7) == 1)
1532   {
1533      sprintf(g_dasm_str, "fsave   %s", get_ea_mode_str_8(g_cpu_ir));
1534   }
1535   else
1536   {
1537      sprintf(g_dasm_str, "%dsave   %s; (2-3)", (g_cpu_ir>>9)&7, get_ea_mode_str_8(g_cpu_ir));
1538   }
15201539}
15211540
15221541static void d68020_cpscc(void)
r7772r7773
16951714{
16961715   char float_data_format[8][3] =
16971716   {
1698      ".l", ".s", ".x", ".p", ".w", ".d", ".b", ".?"
1717      ".l", ".s", ".x", ".p", ".w", ".d", ".b", ".p"
16991718   };
1700   const char *spec_reg[8] =
1701   {
1702      "?", "FPIAR", "FPSR", "?", "FPCR", "?", "?", "?"
1703   };
17041719
17051720   char mnemonic[40];
17061721   UINT32 w2, src, dst_reg;
r7772r7773
17941809
17951810      case 0x3:
17961811      {
1797         sprintf(g_dasm_str, "fmove   FP%d, %s", dst_reg, get_ea_mode_str_32(g_cpu_ir));
1812         switch ((w2>>10)&7)
1813         {
1814            case 3:      // packed decimal w/fixed k-factor
1815               sprintf(g_dasm_str, "fmove%s   FP%d, %s {#%d}", float_data_format[(w2>>10)&7], dst_reg, get_ea_mode_str_32(g_cpu_ir), sext_7bit_int(w2&0x7f));
1816               break;
1817
1818            case 7:      // packed decimal w/dynamic k-factor (register)
1819               sprintf(g_dasm_str, "fmove%s   FP%d, %s {D%d}", float_data_format[(w2>>10)&7], dst_reg, get_ea_mode_str_32(g_cpu_ir), (w2>>4)&7);
1820               break;
1821
1822            default:
1823               sprintf(g_dasm_str, "fmove%s   FP%d, %s", float_data_format[(w2>>10)&7], dst_reg, get_ea_mode_str_32(g_cpu_ir));
1824               break;
1825         }
17981826         break;
17991827      }
18001828
18011829      case 0x4:   // ea to control
18021830      {
1803         sprintf(g_dasm_str, "fmove.l   %s, %s", get_ea_mode_str_32(g_cpu_ir), spec_reg[(w2>>10)&7]);
1831         sprintf(g_dasm_str, "fmovem.l   %s, ", get_ea_mode_str_32(g_cpu_ir));
1832         if (w2 & 0x1000) strcat(g_dasm_str, "fpcr");
1833         if (w2 & 0x0800) strcat(g_dasm_str, "/fpsr");
1834         if (w2 & 0x0400) strcat(g_dasm_str, "/fpiar");
18041835         break;
18051836      }
18061837
18071838      case 0x5:   // control to ea
18081839      {
1809         sprintf(g_dasm_str, "fmove.l   %s, %s", spec_reg[(w2>>10)&7], get_ea_mode_str_32(g_cpu_ir));
1840
1841         strcpy(g_dasm_str, "fmovem.l   ");
1842         if (w2 & 0x1000) strcat(g_dasm_str, "fpcr");
1843         if (w2 & 0x0800) strcat(g_dasm_str, "/fpsr");
1844         if (w2 & 0x0400) strcat(g_dasm_str, "/fpiar");
1845         strcat(g_dasm_str, ", ");
1846         strcat(g_dasm_str, get_ea_mode_str_32(g_cpu_ir));
18101847         break;
18111848      }
18121849
src/emu/cpu/cpu.mak
r7772r7773
12221222
12231223ifneq ($(filter RSP,$(CPUS)),)
12241224OBJDIRS += $(CPUOBJ)/rsp
1225CPUOBJS += $(CPUOBJ)/rsp/rsp.o   $(DRCOBJ)
1225CPUOBJS += $(CPUOBJ)/rsp/rspdrc.o   $(CPUOBJ)/rsp/rspfe.o   $(DRCOBJ)
12261226DASMOBJS += $(CPUOBJ)/rsp/rsp_dasm.o
12271227endif
12281228
1229$(CPUOBJ)/rsp/rsp.o:   $(CPUSRC)/rsp/rsp.c \
1229$(CPUOBJ)/rsp/rspdrc.o:   $(CPUSRC)/rsp/rspdrc.c \
12301230         $(CPUSRC)/rsp/rsp.h \
12311231         $(CPUSRC)/rsp/rspfe.h \
12321232         $(DRCDEPS)
12331233
1234$(CPUOBJ)/rsp/rspfe.o:   $(CPUSRC)/rsp/rspfe.c \
1235         $(CPUSRC)/rsp/rspfe.h
12341236
1237
12351238#-------------------------------------------------
12361239# Panasonic MN10200
12371240#-------------------------------------------------
src/emu/cpu/i86/i86.c
r7772r7773
540540      case CPUINFO_INT_CLOCK_MULTIPLIER:            info->i = 1;                     break;
541541      case CPUINFO_INT_CLOCK_DIVIDER:               info->i = 1;                     break;
542542      case CPUINFO_INT_MIN_INSTRUCTION_BYTES:         info->i = 1;                     break;
543      case CPUINFO_INT_MAX_INSTRUCTION_BYTES:         info->i = 15;                     break;
543      case CPUINFO_INT_MAX_INSTRUCTION_BYTES:         info->i = 8;                     break;
544544      case CPUINFO_INT_MIN_CYCLES:               info->i = 1;                     break;
545545      case CPUINFO_INT_MAX_CYCLES:               info->i = 50;                     break;
546546
src/emu/cpu/i386/i386dasm.c
r7772r7773
4040   PARAM_ADDR,         /* 16:16 or 16:32 address */
4141   PARAM_REL,         /* 16 or 32-bit PC-relative displacement */
4242   PARAM_REL8,         /* 8-bit PC-relative displacement */
43   PARAM_MEM_OFFS_B,   /* 8-bit mem offset */
44   PARAM_MEM_OFFS_V,   /* 16 or 32-bit mem offset */
43   PARAM_MEM_OFFS,      /* 16 or 32-bit mem offset */
4544   PARAM_SREG,         /* segment register */
4645   PARAM_CREG,         /* control register */
4746   PARAM_DREG,         /* debug register */
r7772r7773
281280   {"sahf",         0,            0,               0,               0            },
282281   {"lahf",         0,            0,               0,               0            },
283282   // 0xa0
284   {"mov",            0,            PARAM_AL,         PARAM_MEM_OFFS_V,   0            },
285   {"mov",            0,            PARAM_EAX,         PARAM_MEM_OFFS_V,   0            },
286   {"mov",            0,            PARAM_MEM_OFFS_V,   PARAM_AL,         0            },
287   {"mov",            0,            PARAM_MEM_OFFS_V,   PARAM_EAX,         0            },
283   {"mov",            0,            PARAM_AL,         PARAM_MEM_OFFS,      0            },
284   {"mov",            0,            PARAM_EAX,         PARAM_MEM_OFFS,      0            },
285   {"mov",            0,            PARAM_MEM_OFFS,      PARAM_AL,         0            },
286   {"mov",            0,            PARAM_MEM_OFFS,      PARAM_EAX,         0            },
288287   {"movsb",         0,            0,               0,               0            },
289288   {"movsw\0movsd\0movsq",VAR_NAME,   0,               0,               0            },
290289   {"cmpsb",         0,            0,               0,               0            },
r7772r7773
15531552         s += sprintf( s, "%s", hexstringpc(pc + d8) );
15541553         break;
15551554
1556      case PARAM_MEM_OFFS_B:
1557         d8 = FETCHD();
1558         s += sprintf( s, "[%s]", hexstring(d8, 0) );
1559         break;
1555      case PARAM_MEM_OFFS:
1556         switch(segment)
1557         {
1558            case SEG_CS: s += sprintf( s, "cs:" ); break;
1559            case SEG_DS: s += sprintf( s, "ds:" ); break;
1560            case SEG_ES: s += sprintf( s, "es:" ); break;
1561            case SEG_FS: s += sprintf( s, "fs:" ); break;
1562            case SEG_GS: s += sprintf( s, "gs:" ); break;
1563            case SEG_SS: s += sprintf( s, "ss:" ); break;
1564         }
15601565
1561      case PARAM_MEM_OFFS_V:
15621566         if( address_size ) {
15631567            d32 = FETCHD32();
15641568            s += sprintf( s, "[%s]", hexstring(d32, 0) );
src/emu/cpu/i386/i386priv.h
r7772r7773
109109   I386_CR1,
110110   I386_CR2,
111111   I386_CR3,
112   I386_CR4,
112113
113114   I386_DR0,
114115   I386_DR1,
r7772r7773
203204
204205   UINT8 performed_intersegment_jump;
205206
206   UINT32 cr[4];      // Control registers
207   UINT32 cr[5];      // Control registers
207208   UINT32 dr[8];      // Debug registers
208209   UINT32 tr[8];      // Test registers
209210
r7772r7773
330331#define STORE_RM16(x, value)   (REG16(i386_MODRM_table[x].rm.w) = value)
331332#define STORE_RM32(x, value)   (REG32(i386_MODRM_table[x].rm.d) = value)
332333
334#define SWITCH_ENDIAN_32(x) (((((x) << 24) & (0xff << 24)) | (((x) << 8) & (0xff << 16)) | (((x) >> 8) & (0xff << 8)) | (((x) >> 24) & (0xff << 0))))
335
333336/***********************************************************************************/
334337
335338INLINE UINT32 i386_translate(i386_state *cpustate, int segment, UINT32 ip)
r7772r7773
345348   UINT32 directory = (a >> 22) & 0x3ff;
346349   UINT32 table = (a >> 12) & 0x3ff;
347350   UINT32 offset = a & 0xfff;
351   UINT32 page_entry;
348352
349353   // TODO: 4MB pages
350354   UINT32 page_dir = memory_read_dword_32le(cpustate->program, pdbr + directory * 4);
351   UINT32 page_entry = memory_read_dword_32le(cpustate->program, (page_dir & 0xfffff000) + (table * 4));
352
353   *address = (page_entry & 0xfffff000) | offset;
355   if (!(cpustate->cr[4] & 0x10)) {
356      page_entry = memory_read_dword_32le(cpustate->program, (page_dir & 0xfffff000) + (table * 4));
357      *address = (page_entry & 0xfffff000) | offset;
358   } else {
359      if (page_dir & 0x80)
360         *address = (page_dir & 0xffc00000) | (a & 0x003fffff);
361      else {
362         page_entry = memory_read_dword_32le(cpustate->program, (page_dir & 0xfffff000) + (table * 4));
363         *address = (page_entry & 0xfffff000) | offset;
364      }
365   }
354366   return 1;
355367}
356368
src/emu/cpu/i386/i386ops.h
r7772r7773
365365   { 0xBF,      OP_2BYTE|OP_I386,         I386OP(invalid),            I386OP(movsx_r32_rm16),      },
366366   { 0xC0,      OP_2BYTE|OP_I486,         I486OP(xadd_rm8_r8),         I486OP(xadd_rm8_r8),      },
367367   { 0xC1,      OP_2BYTE|OP_I486,         I486OP(xadd_rm16_r16),         I486OP(xadd_rm32_r32),      },
368   { 0xC7,      OP_2BYTE|OP_PENTIUM,      PENTIUMOP(cmpxchg8b_m64),      PENTIUMOP(cmpxchg8b_m64),   }
368   { 0xC7,      OP_2BYTE|OP_PENTIUM,      PENTIUMOP(cmpxchg8b_m64),      PENTIUMOP(cmpxchg8b_m64),   },
369   { 0xC8,      OP_2BYTE|OP_I486,         I486OP(bswap_eax),            I486OP(bswap_eax),         },
370   { 0xC9,      OP_2BYTE|OP_I486,         I486OP(bswap_ecx),            I486OP(bswap_ecx),         },
371   { 0xCA,      OP_2BYTE|OP_I486,         I486OP(bswap_edx),            I486OP(bswap_edx),         },
372   { 0xCB,      OP_2BYTE|OP_I486,         I486OP(bswap_ebx),            I486OP(bswap_ebx),         },
373   { 0xCC,      OP_2BYTE|OP_I486,         I486OP(bswap_esp),            I486OP(bswap_esp),         },
374   { 0xCD,      OP_2BYTE|OP_I486,         I486OP(bswap_ebp),            I486OP(bswap_ebp),         },
375   { 0xCE,      OP_2BYTE|OP_I486,         I486OP(bswap_esi),            I486OP(bswap_esi),         },
376   { 0xCF,      OP_2BYTE|OP_I486,         I486OP(bswap_edi),            I486OP(bswap_edi),         }
369377};
src/emu/cpu/i386/i386.c
r7772r7773
842842      case CPUINFO_INT_REGISTER + I386_CR1:         cpustate->cr[1] = info->i;                  break;
843843      case CPUINFO_INT_REGISTER + I386_CR2:         cpustate->cr[2] = info->i;                  break;
844844      case CPUINFO_INT_REGISTER + I386_CR3:         cpustate->cr[3] = info->i;                  break;
845      case CPUINFO_INT_REGISTER + I386_CR4:         cpustate->cr[4] = info->i;                  break;
845846      case CPUINFO_INT_REGISTER + I386_DR0:         cpustate->dr[0] = info->i;                  break;
846847      case CPUINFO_INT_REGISTER + I386_DR1:         cpustate->dr[1] = info->i;                  break;
847848      case CPUINFO_INT_REGISTER + I386_DR2:         cpustate->dr[2] = info->i;                  break;
r7772r7773
958959      case CPUINFO_INT_REGISTER + I386_CR1:         info->i = cpustate->cr[1];                  break;
959960      case CPUINFO_INT_REGISTER + I386_CR2:         info->i = cpustate->cr[2];                  break;
960961      case CPUINFO_INT_REGISTER + I386_CR3:         info->i = cpustate->cr[3];                  break;
962      case CPUINFO_INT_REGISTER + I386_CR4:         info->i = cpustate->cr[4];                  break;
961963      case CPUINFO_INT_REGISTER + I386_DR0:         info->i = cpustate->dr[0];                  break;
962964      case CPUINFO_INT_REGISTER + I386_DR1:         info->i = cpustate->dr[1];                  break;
963965      case CPUINFO_INT_REGISTER + I386_DR2:         info->i = cpustate->dr[2];                  break;
r7772r7773
10571059      case CPUINFO_STR_REGISTER + I386_CR1:         sprintf(info->s, "CR1: %08X", cpustate->cr[1]); break;
10581060      case CPUINFO_STR_REGISTER + I386_CR2:         sprintf(info->s, "CR2: %08X", cpustate->cr[2]); break;
10591061      case CPUINFO_STR_REGISTER + I386_CR3:         sprintf(info->s, "CR3: %08X", cpustate->cr[3]); break;
1062      case CPUINFO_STR_REGISTER + I386_CR4:         sprintf(info->s, "CR4: %08X", cpustate->cr[4]); break;
10601063      case CPUINFO_STR_REGISTER + I386_DR0:         sprintf(info->s, "DR0: %08X", cpustate->dr[0]); break;
10611064      case CPUINFO_STR_REGISTER + I386_DR1:         sprintf(info->s, "DR1: %08X", cpustate->dr[1]); break;
10621065      case CPUINFO_STR_REGISTER + I386_DR2:         sprintf(info->s, "DR2: %08X", cpustate->dr[2]); break;
src/emu/cpu/i386/i386ops.c
r7772r7773
657657      case 0: CYCLES(cpustate,CYCLES_MOV_REG_CR0); break;
658658      case 2: CYCLES(cpustate,CYCLES_MOV_REG_CR2); break;
659659      case 3: CYCLES(cpustate,CYCLES_MOV_REG_CR3); break;
660      case 4: CYCLES(cpustate,1); break; // TODO
660661      default:
661662         fatalerror("i386: mov_cr_r32 CR%d !", cr);
662663         break;
src/emu/cpu/i386/i486ops.c
r7772r7773
375375   }
376376}
377377
378static void I486OP(bswap_eax)(i386_state *cpustate)      // Opcode 0x0f 38
379{
380   REG32(EAX) = SWITCH_ENDIAN_32(REG32(EAX));
381   CYCLES(cpustate,1);      // TODO
382}
383
384static void I486OP(bswap_ecx)(i386_state *cpustate)      // Opcode 0x0f 39
385{
386   REG32(ECX) = SWITCH_ENDIAN_32(REG32(ECX));
387   CYCLES(cpustate,1);      // TODO
388}
389
390static void I486OP(bswap_edx)(i386_state *cpustate)      // Opcode 0x0f 3A
391{
392   REG32(EDX) = SWITCH_ENDIAN_32(REG32(EDX));
393   CYCLES(cpustate,1);      // TODO
394}
395
396static void I486OP(bswap_ebx)(i386_state *cpustate)      // Opcode 0x0f 3B
397{
398   REG32(EBX) = SWITCH_ENDIAN_32(REG32(EBX));
399   CYCLES(cpustate,1);      // TODO
400}
401
402static void I486OP(bswap_esp)(i386_state *cpustate)      // Opcode 0x0f 3C
403{
404   REG32(ESP) = SWITCH_ENDIAN_32(REG32(ESP));
405   CYCLES(cpustate,1);      // TODO
406}
407
408static void I486OP(bswap_ebp)(i386_state *cpustate)      // Opcode 0x0f 3D
409{
410   REG32(EBP) = SWITCH_ENDIAN_32(REG32(EBP));
411   CYCLES(cpustate,1);      // TODO
412}
413
414static void I486OP(bswap_esi)(i386_state *cpustate)      // Opcode 0x0f 3E
415{
416   REG32(ESI) = SWITCH_ENDIAN_32(REG32(ESI));
417   CYCLES(cpustate,1);      // TODO
418}
419
420static void I486OP(bswap_edi)(i386_state *cpustate)      // Opcode 0x0f 3F
421{
422   REG32(EDI) = SWITCH_ENDIAN_32(REG32(EDI));
423   CYCLES(cpustate,1);      // TODO
424}
src/emu/cpu/rsp/rsp.c
r7772r7773
185185{
186186   if (reg >= 0 && reg < 8)
187187   {
188      return (rsp->config->sp_reg_r)(rsp->device, reg, 0x00000000);
188      return (rsp->config->sp_reg_r)(rsp->program, reg, 0x00000000);
189189   }
190190   else if (reg >= 8 && reg < 16)
191191   {
192      return (rsp->config->dp_reg_r)(rsp->device, reg - 8, 0x00000000);
192      return (rsp->config->dp_reg_r)(rsp->program, reg - 8, 0x00000000);
193193   }
194194   else
195195   {
r7772r7773
201201{
202202   if (reg >= 0 && reg < 8)
203203   {
204      (rsp->config->sp_reg_w)(rsp->device, reg, data, 0x00000000);
204      (rsp->config->sp_reg_w)(rsp->program, reg, data, 0x00000000);
205205   }
206206   else if (reg >= 8 && reg < 16)
207207   {
208      (rsp->config->dp_reg_w)(rsp->device, reg - 8, data, 0x00000000);
208      (rsp->config->dp_reg_w)(rsp->program, reg - 8, data, 0x00000000);
209209   }
210210   else
211211   {
src/emu/cpu/nec/nec.c
r7772r7773
13371337      case CPUINFO_INT_CLOCK_MULTIPLIER:            info->i = 1;                     break;
13381338      case CPUINFO_INT_CLOCK_DIVIDER:               info->i = 1;                     break;
13391339      case CPUINFO_INT_MIN_INSTRUCTION_BYTES:         info->i = 1;                     break;
1340      case CPUINFO_INT_MAX_INSTRUCTION_BYTES:         info->i = 15;                     break;
1340      case CPUINFO_INT_MAX_INSTRUCTION_BYTES:         info->i = 8;                     break;
13411341      case CPUINFO_INT_MIN_CYCLES:               info->i = 1;                     break;
13421342      case CPUINFO_INT_MAX_CYCLES:               info->i = 80;                     break;
13431343
src/emu/cpu/nec/necdasm.c
r7772r7773
2929   PARAM_REG2_16,      /* 16-bit register */
3030   PARAM_RM8,         /* 8-bit memory or register */
3131   PARAM_RM16,         /* 16-bit memory or register */
32   PARAM_I4,         /* 4-bit signed immediate */
32   PARAM_I3,         /* 3-bit immediate */
33   PARAM_I4,         /* 4-bit immediate */
3334   PARAM_I8,         /* 8-bit signed immediate */
3435   PARAM_I16,         /* 16-bit signed immediate */
3536   PARAM_UI8,         /* 8-bit unsigned immediate */
36   PARAM_UI16,         /* 16-bit unsigned immediate */
3737   PARAM_IMM,         /* 16-bit immediate */
3838   PARAM_ADDR,         /* 16:16 address */
3939   PARAM_REL8,         /* 8-bit PC-relative displacement */
4040   PARAM_REL16,      /* 16-bit PC-relative displacement */
41   PARAM_MEM_OFFS_B,   /* 8-bit mem offset */
42   PARAM_MEM_OFFS_W,   /* 16-bit mem offset */
41   PARAM_MEM_OFFS,      /* 16-bit mem offset */
4342   PARAM_SREG,         /* segment register */
44   PARAM_RBANK,      /* register bank (V25) */
43   PARAM_SFREG,      /* V25/V35 special function register */
4544   PARAM_1,         /* used by shift/rotate instructions */
4645   PARAM_AL,
4746   PARAM_CL,
r7772r7773
199198   {"push    r",      0,            0,               0,               0            },
200199   {"pop     r",      0,            0,               0,               0            },
201200   {"chkind",         MODRM,         PARAM_REG16,      PARAM_RM16,         0            },
202   {"brkn",         MODRM,         PARAM_RM16,         PARAM_REG16,      0            },   /* break into native */
201   {"brkn",         0,            PARAM_UI8,         0,               0,            DASMFLAG_STEP_OVER},   /* V25S/V35S only */
203202   {"repnc",         PREFIX,         0,               0,               0            },
204203   {"repc",         PREFIX,         0,               0,               0            },
205   {"fpo2    0",      0,/*OP_SIZE*/   0,               0,               0            },
206   {"fpo2    1",      0,/*ADDR_SIZE*/   0,               0,               0            },
204   {"fpo2    0",      0,            0,               0,               0            },   /* for a coprocessor that was never made */
205   {"fpo2    1",      0,            0,               0,               0            },   /* for a coprocessor that was never made */
207206   {"push",         0,            PARAM_IMM,         0,               0            },
208207   {"mul",            MODRM,         PARAM_REG16,      PARAM_RM16,         PARAM_IMM      },
209208   {"push",         0,            PARAM_I8,         0,               0            },
r7772r7773
264263   {"mov     psw,ah",   0,            0,               0,               0            },
265264   {"mov     ah,psw",   0,            0,               0,               0            },
266265   // 0xa0
267   {"mov",            0,            PARAM_AL,         PARAM_MEM_OFFS_W,   0            },
268   {"mov",            0,            PARAM_AW,         PARAM_MEM_OFFS_W,   0            },
269   {"mov",            0,            PARAM_MEM_OFFS_W,   PARAM_AL,         0            },
270   {"mov",            0,            PARAM_MEM_OFFS_W,   PARAM_AW,         0            },
266   {"mov",            0,            PARAM_AL,         PARAM_MEM_OFFS,      0            },
267   {"mov",            0,            PARAM_AW,         PARAM_MEM_OFFS,      0            },
268   {"mov",            0,            PARAM_MEM_OFFS,      PARAM_AL,         0            },
269   {"mov",            0,            PARAM_MEM_OFFS,      PARAM_AW,         0            },
271270   {"movbkb",         0,            0,               0,               0            },
272271   {"movbkw",         0,            0,               0,               0            },
273272   {"cmpbkb",         0,            0,               0,               0            },
r7772r7773
325324   {"trans",         0,            0,               0,               0            },
326325   {"escape",         FPU,         0,               0,               0            },
327326   {"escape",         FPU,         0,               0,               0            },
328   {"premov",         MODRM,         PARAM_REG8,         PARAM_RM8,         0            },
329   {"premov",         MODRM,         PARAM_REG16,      PARAM_RM16,         0            },
327   {"premov",         MODRM,         PARAM_REG8,         PARAM_RM8,         0            },   /* ??? */
328   {"premov",         MODRM,         PARAM_REG16,      PARAM_RM16,         0            },   /* ??? */
330329   {"escape",         FPU,         0,               0,               0            },
331330   {"escape",         FPU,         0,               0,               0            },
332331   {"escape",         FPU,         0,               0,               0            },
r7772r7773
350349   {"out",            0,            PARAM_DW,         PARAM_AW,         0            },
351350   // 0xf0
352351   {"buslock",         PREFIX,         0,               0,               0            },
353   {"brks",         0,            0,               0,               0            },   /* break into secure mode */
352   {"brks",         0,            PARAM_UI8,         0,               0,            DASMFLAG_STEP_OVER},   /* V25S/V35S only */
354353   {"repne",         PREFIX,         0,               0,               0            },
355354   {"rep",            PREFIX,         0,               0,               0            },
356355   {"halt",         0,            0,               0,               0            },
r7772r7773
386385   {"???",            0,            0,               0,               0            },
387386   {"???",            0,            0,               0,               0            },
388387   {"???",            0,            0,               0,               0            },
389   // 0x10 - NEC V series only
390   {"test1",         MODRM,         PARAM_RM8,         PARAM_1,         0            },
391   {"test1",         MODRM,         PARAM_RM16,         PARAM_1,         0            },
392   {"clr1",         MODRM,         PARAM_RM8,         PARAM_1,         0            },
393   {"clr1",         MODRM,         PARAM_RM16,         PARAM_1,         0            },
394   {"set1",         MODRM,         PARAM_RM8,         PARAM_1,         0            },
395   {"set1",         MODRM,         PARAM_RM16,         PARAM_1,         0            },
396   {"not1",         MODRM,         PARAM_RM8,         PARAM_1,         0            },
397   {"not1",         MODRM,         PARAM_RM16,         PARAM_1,         0            },
398   {"test1",         MODRM,         PARAM_RM8,         PARAM_I8,         0            },
399   {"test1",         MODRM,         PARAM_RM16,         PARAM_I8,         0            },
400   {"clr1",         MODRM,         PARAM_RM8,         PARAM_I8,         0            },
401   {"clr1",         MODRM,         PARAM_RM16,         PARAM_I8,         0            },
402   {"set1",         MODRM,         PARAM_RM8,         PARAM_I8,         0            },
403   {"set1",         MODRM,         PARAM_RM16,         PARAM_I8,         0            },
404   {"not1",         MODRM,         PARAM_RM8,         PARAM_I8,         0            },
405   {"not1",         MODRM,         PARAM_RM16,         PARAM_I8,         0            },
388   // 0x10
389   {"test1",         MODRM,         PARAM_RM8,         PARAM_CL,         0            },
390   {"test1",         MODRM,         PARAM_RM16,         PARAM_CL,         0            },
391   {"clr1",         MODRM,         PARAM_RM8,         PARAM_CL,         0            },
392   {"clr1",         MODRM,         PARAM_RM16,         PARAM_CL,         0            },
393   {"set1",         MODRM,         PARAM_RM8,         PARAM_CL,         0            },
394   {"set1",         MODRM,         PARAM_RM16,         PARAM_CL,         0            },
395   {"not1",         MODRM,         PARAM_RM8,         PARAM_CL,         0            },
396   {"not1",         MODRM,         PARAM_RM16,         PARAM_CL,         0            },
397   {"test1",         MODRM,         PARAM_RM8,         PARAM_I3,         0            },
398   {"test1",         MODRM,         PARAM_RM16,         PARAM_I4,         0            },
399   {"clr1",         MODRM,         PARAM_RM8,         PARAM_I3,         0            },
400   {"clr1",         MODRM,         PARAM_RM16,         PARAM_I4,         0            },
401   {"set1",         MODRM,         PARAM_RM8,         PARAM_I3,         0            },
402   {"set1",         MODRM,         PARAM_RM16,         PARAM_I4,         0            },
403   {"not1",         MODRM,         PARAM_RM8,         PARAM_I3,         0            },
404   {"not1",         MODRM,         PARAM_RM16,         PARAM_I4,         0            },
406405   // 0x20
407406   {"add4s",         0,            0,               0,               0            },
408407   {"???",            0,            0,               0,               0            },
409408   {"sub4s",         0,            0,               0,               0            },
410409   {"???",            0,            0,               0,               0            },
411410   {"???",            0,            0,               0,               0            },
412   {"movspa",         0,            0,               0,               0            },   /* V25/35 only */
411   {"movspa",         0,            0,               0,               0            },   /* V25/V35 only */
413412   {"cmp4s",         0,            0,               0,               0            },
414413   {"???",            0,            0,               0,               0            },
415414   {"rol4",         MODRM,         PARAM_RM8,         0,               0            },
r7772r7773
417416   {"ror4",         MODRM,         PARAM_RM8,         0,               0            },
418417   {"???",            0,            0,               0,               0            },
419418   {"???",            0,            0,               0,               0            },
420   {"brkcs",         MODRM,         PARAM_REG2_8,      0,               0            },   /* V25/35 only */
419   {"brkcs",         MODRM,         PARAM_REG2_16,      0,               0,            DASMFLAG_STEP_OVER},   /* V25/V35 only */
421420   {"???",            0,            0,               0,               0            },
422421   {"???",            0,            0,               0,               0            },
423422   // 0x30
r7772r7773
524523   {"???",            0,            0,               0,               0            },
525524   // 0x90
526525   {"???",            0,            0,               0,               0            },
527   {"retrbi",         0,            0,               0,               0            },   /* V25/35 only */
528   {"fint",         0,            0,               0,               0            },   /* V25/35 only */
526   {"retrbi",         0,            0,               0,               0            },   /* V25/V35 only */
527   {"fint",         0,            0,               0,               0            },   /* V25/V35 only */
529528   {"???",            0,            0,               0,               0            },
530   {"tsksw",         MODRM,         PARAM_REG2_8,      0,               0            },   /* V25/35 only */
531   {"movspb",         0,            PARAM_RBANK,      0,               0            },   /* V25/35 only */
529   {"tsksw",         MODRM,         PARAM_REG2_16,      0,               0            },   /* V25/V35 only */
530   {"movspb",         MODRM,         PARAM_REG2_16,      0,               0            },   /* V25/V35 only */
532531   {"???",            0,            0,               0,               0            },
533532   {"???",            0,            0,               0,               0            },
534533   {"???",            0,            0,               0,               0            },
535534   {"???",            0,            0,               0,               0            },
536535   {"???",            0,            0,               0,               0            },
537536   {"???",            0,            0,               0,               0            },
538   {"btclr",         MODRM,         PARAM_REG2_8,      PARAM_I8,         PARAM_REL8      },   /* V25/35 only */
537   {"btclr",         MODRM,         PARAM_SFREG,      PARAM_I3,         PARAM_REL8      },   /* V25/V35 only */
539538   {"???",            0,            0,               0,               0            },
540   {"stop",         0,            0,               0,               0            },   /* V25/35 only */
539   {"stop",         0,            0,               0,               0            },   /* V25/V35 only */
541540   {"???",            0,            0,               0,               0            },
542541   // 0xa0
543542   {"???",            0,            0,               0,               0            },
r7772r7773
821820static const char *const nec_reg[8] = { "aw",  "cw",  "dw",  "bw",  "sp",  "bp",  "ix",  "iy" };
822821static const char *const neg_reg8[8] = { "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh" };
823822static const char *const nec_sreg[8] = { "ds1", "ps", "ss", "ds0", "???", "???", "???", "???" };
823static const char *const nec_sfreg[256] =
824{
825   /* 0x00 */
826   "p0",   "pm0",   "pmc0",   "???",   "???",   "???",   "???",   "???",
827   "p1",   "pm1",   "pmc1",   "???",   "???",   "???",   "???",   "???",
828   /* 0x10 */
829   "p2",   "pm2",   "pmc2",   "???",   "???",   "???",   "???",   "???",
830   "???",   "???",   "???",   "???",   "???",   "???",   "???",   "???",
831   /* 0x20 */
832   "???",   "???",   "???",   "???",   "???",   "???",   "???",   "???",
833   "???",   "???",   "???",   "???",   "???",   "???",   "???",   "???",
834   /* 0x30 */
835   "???",   "???",   "???",   "???",   "???",   "???",   "???",   "???",
836   "pt",   "???",   "???",   "pmt",   "???",   "???",   "???",   "???",
837   /* 0x40 */
838   "intm",   "???",   "???",   "???",   "ems0",   "ems1",   "ems2",   "???",
839   "???",   "???",   "???",   "???",   "exic0","exic1","exic2","???",
840   /* 0x50 */
841   "???",   "???",   "???",   "???",   "???",   "???",   "???",   "???",
842   "???",   "???",   "???",   "???",   "???",   "???",   "???",   "???",
843   /* 0x60 */
844   "rxb0",   "???",   "txb0",   "???",   "???",   "srms0","stms0","???",
845   "scm0",   "scc0",   "brg0",   "scs0",   "seic0","sric0","stic0","???",
846   /* 0x70 */
847   "rxb1",   "???",   "txb1",   "???",   "???",   "srms1","stms1","???",
848   "scm1",   "scc1",   "brg1",   "scs1",   "seic1","sric1","stic1","???",
849   /* 0x80 */
850   "tm0",   "???",   "md0",   "???",   "???",   "???",   "???",   "???",
851   "tm1",   "???",   "md1",   "???",   "???",   "???",   "???",   "???",
852   /* 0x90 */
853   "tmc0",   "tmc1",   "???",   "???",   "tmms0","tmms1","tmms2","???",
854   "???",   "???",   "???",   "???",   "tmic0","tmic1","tmic2","???",
855   /* 0xa0 */
856   "dmac0","dmam0","dmac1","dmam1","???",   "???",   "???",   "???",
857   "???",   "???",   "???",   "???",   "dic0",   "dic1",   "???",   "???",
858   /* 0xb0 */
859   "???",   "???",   "???",   "???",   "???",   "???",   "???",   "???",
860   "???",   "???",   "???",   "???",   "???",   "???",   "???",   "???",
861   /* 0xc0 */
862   "sar0l","sar0m","sar0h","???",   "dar0l","dar0m","dar0h","???",
863   "tc0l",   "tc0h",   "???",   "???",   "???",   "???",   "???",   "???",
864   /* 0xd0 */
865   "sar1l","sar1m","sar1h","???",   "dar1l","dar1m","dar1h","???",
866   "tc1l",   "tc1h",   "???",   "???",   "???",   "???",   "???",   "???",
867   /* 0xe0 */
868   "stbc",   "rfm",   "???",   "???",   "???",   "???",   "???",   "???",
869   "wtc",   "???",   "flag",   "prc",   "tbic",   "???",   "???",   "irqs",
870   /* 0xf0 */
871   "???",   "???",   "???",   "???",   "???",   "???",   "???",   "???",
872   "???",   "???",   "???",   "???",   "ispr",   "???",   "???",   "idb"
873};
824874
825875static UINT32 pc;
826876static UINT8 modrm;
r7772r7773
9871037         }
9881038         break;
9891039
1040      case PARAM_I3:
1041         i8 = FETCHD();
1042         s += sprintf( s, "%d", i8 & 0x07 );
1043         break;
1044
9901045      case PARAM_I4:
9911046         i8 = FETCHD();
9921047         s += sprintf( s, "%d", i8 & 0x0f );
r7772r7773
10071062         s += sprintf( s, "%s", shexstring((UINT8)i8, 0, FALSE) );
10081063         break;
10091064
1010      case PARAM_UI16:
1011         i16 = FETCHD16();
1012         s += sprintf( s, "%s", shexstring((UINT16)i16, 0, FALSE) );
1013         break;
1014
10151065      case PARAM_IMM:
10161066         i16 = FETCHD16();
10171067         s += sprintf( s, "%s", hexstring(i16, 0) );
r7772r7773
10351085         s += sprintf( s, "%s", hexstring(pc + d8, 0) );
10361086         break;
10371087
1038      case PARAM_MEM_OFFS_B:
1039         d8 = FETCHD();
1040         s += sprintf( s, "[%s]", hexstring(d8, 0) );
1041         break;
1088      case PARAM_MEM_OFFS:
1089         switch(segment)
1090         {
1091            case SEG_PS: s += sprintf( s, "ps:" ); break;
1092            case SEG_DS0: s += sprintf( s, "ds0:" ); break;
1093            case SEG_DS1: s += sprintf( s, "ds1:" ); break;
1094            case SEG_SS: s += sprintf( s, "ss:" ); break;
1095         }
10421096
1043      case PARAM_MEM_OFFS_W:
10441097         d16 = FETCHD16();
10451098         s += sprintf( s, "[%s]", hexstring(d16, 0) );
10461099         break;
r7772r7773
10491102         s += sprintf( s, "%s", nec_sreg[MODRM_REG1] );
10501103         break;
10511104
1105      case PARAM_SFREG:
1106         d8 = FETCHD();
1107         s += sprintf( s, "%s", nec_sfreg[d8] );
1108         break;
1109
10521110      case PARAM_1:
10531111         s += sprintf( s, "1" );
10541112         break;
10551113
1056      case PARAM_RBANK:
1057         s += sprintf( s, "%d", FETCHD() & 7 );
1058         break;
1059
10601114      case PARAM_AL: s += sprintf( s, "al" ); break;
10611115      case PARAM_CL: s += sprintf( s, "cl" ); break;
10621116      case PARAM_DL: s += sprintf( s, "dl" ); break;
src/emu/video/poly.c
r7772r7773
235235   dstextent->stopx = srcextent->stopx;
236236
237237   /* if we have parameters, process them as well */
238   if (polygon->numparams > 0)
238   for (int paramnum = 0; paramnum < polygon->numparams; paramnum++)
239239   {
240      float dx = srcextent->startx - polygon->xorigin;
241      float dy = y - polygon->yorigin;
242      int paramnum;
243
244      /* iterate over parameters */
245      for (paramnum = 0; paramnum < polygon->numparams; paramnum++)
246      {
247         dstextent->param[paramnum].start = polygon->param[paramnum].start + dx * polygon->param[paramnum].dpdx + dy * polygon->param[paramnum].dpdy;
248         dstextent->param[paramnum].dpdx = polygon->param[paramnum].dpdx;
249      }
240      dstextent->param[paramnum].start = polygon->param[paramnum].start + srcextent->startx * polygon->param[paramnum].dpdx + y * polygon->param[paramnum].dpdy;
241      dstextent->param[paramnum].dpdx = polygon->param[paramnum].dpdx;
250242   }
251243}
252244
r7772r7773
616608   /* compute parameter starting points and deltas */
617609   if (paramcount > 0)
618610   {
619      float divisor, dx1, dx2, dy1, dy2, xoffset, yoffset;
620      int paramnum;
611      float a00 = v2->y - v3->y;
612      float a01 = v3->x - v2->x;
613      float a02 = v2->x*v3->y - v3->x*v2->y;
614      float a10 = v3->y - v1->y;
615      float a11 = v1->x - v3->x;
616      float a12 = v3->x*v1->y - v1->x*v3->y;
617      float a20 = v1->y - v2->y;
618      float a21 = v2->x - v1->x;
619      float a22 = v1->x*v2->y - v2->x*v1->y;
620      float det = a02 + a12 + a22;
621621
622      /* compute the divisor */
623      divisor = 1.0f / ((v1->x - v2->x) * (v1->y - v3->y) - (v1->x - v3->x) * (v1->y - v2->y));
624
625      /* compute the dx/dy values */
626      dx1 = v1->y - v3->y;
627      dx2 = v1->y - v2->y;
628      dy1 = v1->x - v2->x;
629      dy2 = v1->x - v3->x;
630
631      /* determine x/y offset for subpixel correction so that the starting values are
632           relative to the integer coordinates */
633      xoffset = v1->x - ((float)polygon->xorigin + 0.5f);
634      yoffset = v1->y - ((float)polygon->yorigin + 0.5f);
635
636      /* iterate over parameters */
637      for (paramnum = 0; paramnum < paramcount; paramnum++)
622      if(fabsf(det) < 0.001) {
623         for (int paramnum = 0; paramnum < paramcount; paramnum++)
624         {
625            poly_param *params = &polygon->param[paramnum];
626            params->dpdx = 0;
627            params->dpdy = 0;
628            params->start = v1->p[paramnum];
629         }
630      }
631      else
638632      {
639         poly_param *params = &polygon->param[paramnum];
640         params->dpdx = ((v1->p[paramnum] - v2->p[paramnum]) * dx1 - (v1->p[paramnum] - v3->p[paramnum]) * dx2) * divisor;
641         params->dpdy = ((v1->p[paramnum] - v3->p[paramnum]) * dy1 - (v1->p[paramnum] - v2->p[paramnum]) * dy2) * divisor;
642         params->start = v1->p[paramnum] - xoffset * params->dpdx - yoffset * params->dpdy;
633         float idet = 1/det;
634         for (int paramnum = 0; paramnum < paramcount; paramnum++)
635         {
636            poly_param *params = &polygon->param[paramnum];
637            params->dpdx  = idet*(v1->p[paramnum]*a00 + v2->p[paramnum]*a10 + v3->p[paramnum]*a20);
638            params->dpdy  = idet*(v1->p[paramnum]*a01 + v2->p[paramnum]*a11 + v3->p[paramnum]*a21);
639            params->start = idet*(v1->p[paramnum]*a02 + v2->p[paramnum]*a12 + v3->p[paramnum]*a22);
640         }
643641      }
644642   }
645643
src/emu/emu.mak
r7772r7773
202202   $(EMUVIDEO)/vector.o \
203203   $(EMUVIDEO)/voodoo.o \
204204
205$(LIBEMU): $(EMUOBJS) $(EMUSOUNDOBJS) $(EMUAUDIOOBJS) $(EMUDRIVEROBJS) $(EMUMACHINEOBJS) $(EMUVIDEOOBJS)
205LIBEMUOBJS = $(EMUOBJS) $(EMUSOUNDOBJS) $(EMUAUDIOOBJS) $(EMUDRIVEROBJS) $(EMUMACHINEOBJS) $(EMUVIDEOOBJS)
206206
207$(LIBEMU): $(LIBEMUOBJS)
207208
208209
210
209211#-------------------------------------------------
210212# CPU core objects
211213#-------------------------------------------------
src/emu/mame.c
r7772r7773
261261      firstgame = FALSE;
262262
263263      /* parse any INI files as the first thing */
264      options_revert(mame_options(), OPTION_PRIORITY_INI);
265      mame_parse_ini_files(mame_options(), driver);
264      if (options_get_bool(options, OPTION_READCONFIG))
265      {
266         options_revert(mame_options(), OPTION_PRIORITY_INI);
267         mame_parse_ini_files(mame_options(), driver);
268      }
266269
267270      /* create the machine structure and driver */
268271      machine = global_alloc(running_machine(driver));
r7772r7773
13271330         auto_free(this, driver_data);
13281331      if (config != NULL)
13291332         machine_config_free((machine_config *)config);
1333      if (basename != NULL)
1334         osd_free(basename);
13301335      if (mame_data != NULL)
13311336         auto_free(this, mame_data);
13321337   }
r7772r7773
13431348
13441349   if (config != NULL)
13451350      machine_config_free((machine_config *)config);
1351   if (basename != NULL)
1352      osd_free(basename);
13461353
13471354   global_machine = NULL;
13481355}
src/emu/mame.h
r7772r7773
236236   ioport_list            portlist;         /* points to a list of input port configurations */
237237
238238   /* CPU information */
239   running_device *   firstcpu;         /* first CPU (allows for quick iteration via typenext) */
239   running_device *      firstcpu;         /* first CPU (allows for quick iteration via typenext) */
240240
241241   /* game-related information */
242242   const game_driver *      gamedrv;         /* points to the definition of the game machine */
243   const char *         basename;         /* basename used for game-related paths */
243   char *               basename;         /* basename used for game-related paths */
244244
245245   /* video-related information */
246246   gfx_element *         gfx[MAX_GFX_ELEMENTS];/* array of pointers to graphic sets (chars, sprites) */
247   running_device *   primary_screen;      /* the primary screen device, or NULL if screenless */
247   running_device *      primary_screen;      /* the primary screen device, or NULL if screenless */
248248   palette_t *            palette;         /* global palette object */
249249
250250   /* palette-related information */
src/emu/sound/tms5110.c
r7772r7773
6565#include "tms5110.h"
6666
6767#define MAX_SAMPLE_CHUNK      512
68#define FIFO_SIZE            64 // TODO: technically the tms51xx chips don't have a fifo at all
6869
69#define MAX_K               10
70#define MAX_SCALE_BITS         6
71#define MAX_SCALE            (1<<MAX_SCALE_BITS)
72#define COEFF_ENERGY_SENTINEL   (511)
73#define SUBTYPE_TMS5100         1
74#define SUBTYPE_M58817         2
75#define SUBTYPE_TMS5110         4
76#define SUBTYPE_TMS5200         8
77#define SUBTYPE_TMS5220         16
78#define SUBTYPE_TMS5220C      32
79#define FIFO_SIZE            64
80#define MAX_CHIRP_SIZE         51
81
8270/* Variants */
8371
8472#define TMS5110_IS_5110A   (1)
r7772r7773
9785#define CTL_STATE_OUTPUT      (1)
9886#define CTL_STATE_NEXT_OUTPUT   (2)
9987
100struct tms5100_coeffs
101{
102   int            subtype;
103   int            num_k;
104   int            energy_bits;
105   int            pitch_bits;
106   int            kbits[MAX_K];
107   unsigned short   energytable[MAX_SCALE];
108   unsigned short   pitchtable[MAX_SCALE];
109   int            ktable[MAX_K][MAX_SCALE];
110   INT8         chirptable[MAX_CHIRP_SIZE];
111   INT8         interp_coeff[8];
112};
113
11488typedef struct _tms5110_state tms5110_state;
11589struct _tms5110_state
11690{
src/emu/sound/tms5110.h
r7772r7773
99#define TMS5110_CMD_RESET        (0) /*    0     0     0     x  |     1    */
1010#define TMS5110_CMD_LOAD_ADDRESS (2) /*    0     0     1     x  |     2    */
1111#define TMS5110_CMD_OUTPUT       (4) /*    0     1     0     x  |     3    */
12#define TMS5110_CMD_SPKSLOW      (6) /*    0     1     1     x  |     1    | Note: this command is undocumented on the datasheets, it only appears on the patents. It might not actually work properly on some of the real chips as manufactured. Acts the same as CMD_SPEAK, but makes the interpolator take two A cycles whereever it would normally only take one, effectively making speech of any given word take about twice as long as normal. */
1213#define TMS5110_CMD_READ_BIT     (8) /*    1     0     0     x  |     1    */
1314#define TMS5110_CMD_SPEAK       (10) /*    1     0     1     x  |     1    */
1415#define TMS5110_CMD_READ_BRANCH (12) /*    1     1     0     x  |     1    */
src/emu/sound/rf5c68.c
r7772r7773
8282         {
8383            int sample;
8484
85            /* trigger sample callback */
86            if(chip->sample_callback)
87            {
88               if(((chan->addr >> 11) & 0xfff) == 0xfff)
89                  chip->sample_callback(chip->device,((chan->addr >> 11)/0x2000));
90            }
91
9285            /* fetch the sample and handle looping */
9386            sample = chip->data[(chan->addr >> 11) & 0xffff];
9487            if (sample == 0xff)
r7772r7773
9992               /* if we loop to a loop point, we're effectively dead */
10093               if (sample == 0xff)
10194                  break;
95
96               /* trigger sample callback */
97               if(chip->sample_callback)
98                  chip->sample_callback(chip->device,i);
10299            }
103100            chan->addr += chan->step;
104101
src/emu/sound/tms5110r.c
r7772r7773
1/* TMS5110 ROM Tables */
1/* TMS51xx and TMS52xx ROM Tables */
22
3/* Kx is (5-bits -> 9 bits+sign, 2's comp. fractional (-1 < x < 1) */
4
53/* The following table is assumed to be for TMS5100
64 *
75 * US Patent 4209836
r7772r7773
3533 /* quick note on derivative analysis:
3634 Judging by all the TI chips I (Lord Nightmare) have done this test on, the first derivative between successive values of the LPC tables should follow a roughly triangular or sine shaped curve, the second derivative should start at a value, increase slightly, then decrease smoothly and become negative right around where the LPC curve passes 0, finally increase slightly right near the end. If it doesn't do this, there is probably a wrong value in there somewhere. The pitch and energy tables follow similar patterns but aren't the same since they never cross 0. The chirp table doesn't follow this pattern at all.
3735 */
36/* chip type defines */
37#define SUBTYPE_TMS5100         1
38#define SUBTYPE_M58817         2
39#define SUBTYPE_TMS5110         4
40#define SUBTYPE_TMS5200         8
41#define SUBTYPE_TMS5220         16
42#define SUBTYPE_TMS5220C      32
3843
44/* coefficient defines */
45#define MAX_K               10
46#define MAX_SCALE_BITS         6
47#define MAX_SCALE            (1<<MAX_SCALE_BITS)
48#define COEFF_ENERGY_SENTINEL   (511)
49#define MAX_CHIRP_SIZE         51
50
51struct tms5100_coeffs
52{
53   int            subtype;
54   int            num_k;
55   int            energy_bits;
56   int            pitch_bits;
57   int            kbits[MAX_K];
58   unsigned short   energytable[MAX_SCALE];
59   unsigned short   pitchtable[MAX_SCALE];
60   int            ktable[MAX_K][MAX_SCALE];
61   INT8         chirptable[MAX_CHIRP_SIZE];
62   INT8         interp_coeff[8];
63};
64
3965 /* The following TMS5100/TMC0280/CD2801 coefficients come from US Patent 4,209,836 and several others, and have been verified using derivative analysis to show which values were bad (due to poor quality images or badly typed copies of the tables in the patents, depending on which patent you look at) which were then corrected by figuring out what the tiny remaining marks on the photocopied version of the coefficient sheet COULD have been which would make the derivatives play nice.
4066***These values have not yet been verified against a real TMS5100 or TMC0280 or CD2801 (from speak & spell, etc)***
4167*/
src/emu/input.c
r7772r7773
9898typedef struct _input_device_list input_device_list;
9999struct _input_device_list
100100{
101   input_device *         list;               /* the array */
101   input_device **         list;               /* the array */
102102   int                  count;               /* elements in the array */
103103   UINT8               enabled;            /* is this class enabled? */
104104   UINT8               multi;               /* are multiple instances of this class allowed? */
r7772r7773
453453      /* ...and the index is valid for that class, return a pointer to the device */
454454      int devindex = INPUT_CODE_DEVINDEX(code);
455455      if (devindex < device_list[devclass].count)
456         return &device_list[devclass].list[devindex];
456         return device_list[devclass].list[devindex];
457457   }
458458
459459   /* otherwise, return NULL */
r7772r7773
508508{
509509   input_device_list *device_list = machine->input_data->device_list;
510510
511   item->current = (*item->getstate)(device_list[item->devclass].list[item->devindex].internal, item->internal);
511   item->current = (*item->getstate)(device_list[item->devclass].list[item->devindex]->internal, item->internal);
512512}
513513
514514
r7772r7773
677677
678678   /* iterate over joysticks and set the map */
679679   for (joynum = startindex; joynum <= stopindex; joynum++)
680      device_list[DEVICE_CLASS_JOYSTICK].list[joynum].joymap = map;
680      device_list[DEVICE_CLASS_JOYSTICK].list[joynum]->joymap = map;
681681   return TRUE;
682682}
683683
r7772r7773
700700      /* iterate over keyboards */
701701      for (devnum = 0; devnum < device_list[DEVICE_CLASS_KEYBOARD].count; devnum++)
702702      {
703         input_device *device = &device_list[DEVICE_CLASS_KEYBOARD].list[devnum];
703         input_device *device = device_list[DEVICE_CLASS_KEYBOARD].list[devnum];
704704         input_item_id itemid;
705705         int changed = FALSE;
706706
r7772r7773
751751{
752752   input_private *state = machine->input_data;
753753   input_device_list *devlist = &state->device_list[devclass];
754   input_device *device;
755754
756755   assert_always(mame_get_phase(machine) == MAME_PHASE_INIT, "Can only call input_device_add at init time!");
757756   assert(name != NULL);
758757   assert(devclass != DEVICE_CLASS_INVALID && devclass < DEVICE_CLASS_MAXIMUM);
759758
760759   /* allocate a new device */
761   input_device *newlist = auto_alloc_array_clear(machine, input_device, devlist->count + 1);
760   input_device *device = auto_alloc_clear(machine, input_device);
761   input_device **newlist = auto_alloc_array(machine, input_device *, devlist->count + 1);
762762   for (int devnum = 0; devnum < devlist->count; devnum++)
763763      newlist[devnum] = devlist->list[devnum];
764764   auto_free(machine, devlist->list);
765765   devlist->list = newlist;
766   device = &devlist->list[devlist->count++];
766   devlist->list[devlist->count++] = device;
767767
768768   /* fill in the data */
769769   device->machine = machine;
r7772r7773
986986      /* iterate over devices within each class */
987987      for (devnum = 0; devnum < devlist->count; devnum++)
988988      {
989         input_device *device = &devlist->list[devnum];
989         input_device *device = devlist->list[devnum];
990990         if (device->item[itemid] != NULL)
991991            return device_item_to_code(device, itemid);
992992      }
r7772r7773
10201020      /* iterate over devices within each class */
10211021      for (devnum = 0; devnum < devlist->count; devnum++)
10221022      {
1023         input_device *device = &devlist->list[devnum];
1023         input_device *device = devlist->list[devnum];
10241024         input_item_id itemid;
10251025
10261026         /* iterate over items within each device */
r7772r7773
11061106   /* iterate over devices within each class */
11071107   for (devnum = 0; devnum < devlist->count; devnum++)
11081108   {
1109      input_device *device = &devlist->list[devnum];
1109      input_device *device = devlist->list[devnum];
11101110      input_item_id itemid;
11111111
11121112      /* iterate over items within each device */
r7772r7773
11911191      /* iterate over devices within each class */
11921192      for (devnum = 0; devnum < devlist->count; devnum++)
11931193      {
1194         input_device *device = &devlist->list[devnum];
1194         input_device *device = devlist->list[devnum];
11951195         input_item_id itemid;
11961196
11971197         /* iterate over items within each device */
r7772r7773
12371237      /* iterate over devices within each class */
12381238      for (devnum = 0; devnum < devlist->count; devnum++)
12391239      {
1240         input_device *device = &devlist->list[devnum];
1240         input_device *device = devlist->list[devnum];
12411241         input_item_id itemid;
12421242
12431243         /* iterate over items within each device */
r7772r7773
14441444      /* if this is an invalid device, we have nothing to look up */
14451445      if (device_list == NULL || devindex >= device_list[devclass].count)
14461446         goto exit;
1447      device = &device_list[devclass].list[devindex];
1447      device = device_list[devclass].list[devindex];
14481448
14491449      /* if not a standard code, look it up in the device specific codes */
14501450      for (itemid = ITEM_ID_FIRST_VALID; itemid <= device->maxitem; itemid++)
r7772r7773
15701570      /* if we're doing a lightgun reload hack, override the value */
15711571      if (state->lightgun_reload_button && item->devclass == DEVICE_CLASS_LIGHTGUN)
15721572      {
1573         input_device_item *button2_item = state->device_list[item->devclass].list[item->devindex].item[ITEM_ID_BUTTON2];
1573         input_device_item *button2_item = state->device_list[item->devclass].list[item->devindex]->item[ITEM_ID_BUTTON2];
15741574         if (button2_item != NULL)
15751575         {
15761576            /* if it is pressed, return (min,max) */
r7772r7773
15991599      /* left/right/up/down: if this is a joystick, fetch the paired X/Y axis values and convert */
16001600      if (modifier >= ITEM_MODIFIER_LEFT && modifier <= ITEM_MODIFIER_DOWN && item->devclass == DEVICE_CLASS_JOYSTICK)
16011601      {
1602         input_device *device = &state->device_list[item->devclass].list[item->devindex];
1602         input_device *device = state->device_list[item->devclass].list[item->devindex];
16031603         input_device_item *xaxis_item = device->item[ITEM_ID_XAXIS];
16041604         input_device_item *yaxis_item = device->item[ITEM_ID_YAXIS];
16051605         if (xaxis_item != NULL && yaxis_item != NULL)
r7772r7773
16871687         /* button 1 is pressed if either button 1 or 2 are active */
16881688         if (INPUT_CODE_ITEMID(code) == ITEM_ID_BUTTON1)
16891689         {
1690            input_device_item *button2_item = state->device_list[item->devclass].list[item->devindex].item[ITEM_ID_BUTTON2];
1690            input_device_item *button2_item = state->device_list[item->devclass].list[item->devindex]->item[ITEM_ID_BUTTON2];
16911691            if (button2_item != NULL)
16921692            {
16931693               input_item_update_value(machine, button2_item);
src/emu/render.c
r7772r7773
618618      while (*texture_ptr != NULL && (*texture_ptr)->base != *texture_ptr)
619619         *texture_ptr = (*texture_ptr)->next;
620620
621   /* free the targets; this must be done before freeing the texture groups
622       as that will forcefully free everything, and if it goes first, we may
623       end up double-freeing textures of the render targets */
624   while (targetlist != NULL)
625      render_target_free(targetlist);
626
627   /* free the screen overlay; similarly, do this before any of the following
628       calls to avoid double-frees */
629   if (screen_overlay != NULL)
630      bitmap_free(screen_overlay);
631   screen_overlay = NULL;
632
621633   /* free the texture groups */
622634   while (render_texture_free_list != NULL)
623635   {
r7772r7773
649661      container_item_free_list = temp->next;
650662      global_free(temp);
651663   }
652
653   /* free the targets */
654   while (targetlist != NULL)
655      render_target_free(targetlist);
656
657   /* free the screen overlay */
658   if (screen_overlay != NULL)
659      bitmap_free(screen_overlay);
660   screen_overlay = NULL;
661664}
662665
663666
r7772r7773
15571560   root_xform.yscale = (float) visheight;
15581561   root_xform.color.r = root_xform.color.g = root_xform.color.b = root_xform.color.a = 1.0f;
15591562   root_xform.orientation = target->orientation;
1563    root_xform.no_center = FALSE;
15601564
15611565   /* iterate over layers back-to-front, but only if we're running */
15621566   if (mame_get_phase(target->machine) >= MAME_PHASE_RESET)
r7772r7773
15911595               item_xform.color.b = item->color.b * root_xform.color.b;
15921596               item_xform.color.a = item->color.a * root_xform.color.a;
15931597               item_xform.orientation = orientation_add(item->orientation, root_xform.orientation);
1598                    item_xform.no_center = FALSE;
15941599
15951600               /* if there is no associated element, it must be a screen element */
15961601               if (item->element != NULL)
r7772r7773
16671672      ui_xform.yscale = (float) target->height;
16681673      ui_xform.color.r = ui_xform.color.g = ui_xform.color.b = ui_xform.color.a = 1.0f;
16691674      ui_xform.orientation = target->orientation;
1675        ui_xform.no_center = FALSE;
16701676
16711677      /* add UI elements */
16721678      add_container_primitives(target, &target->primlist[listnum], &ui_xform, ui_container, BLENDMODE_ALPHA);
src/lib/util/corestr.c
r7772r7773
133133
134134
135135/*-------------------------------------------------
136    core_strdup - string duplication via malloc
136    core_strdup - string duplication via osd_malloc
137137-------------------------------------------------*/
138138
139139char *core_strdup(const char *str)
r7772r7773
141141   char *cpy = NULL;
142142   if (str != NULL)
143143   {
144      cpy = (char *)malloc(strlen(str) + 1);
144      cpy = (char *)osd_malloc(strlen(str) + 1);
145145      if (cpy != NULL)
146146         strcpy(cpy, str);
147147   }
docs/messnew.txt
r7772r7773
6969
7070Source Changes:
7171----------------
72- The core is based on MAME 0.137u1.  This incorporates all features of the
72- The core is based on MAME 0.137u2.  This incorporates all features of the
7373  update to this core.  [MAME team]
7474
7575- [AMSTRAD CPC Family] Updated Hashes to GoodCPC V3.1415 [Cowering]
makefile
r7772r7773
177177# uncomment next line to include the internal profiler
178178# PROFILER = 1
179179
180# uncomment next line to include gprof profiler support
181# GPROF = 1
182
180183# uncomment the force the universal DRC to always use the C backend
181184# you may need to do this if your target architecture does not have
182185# a native backend
r7772r7773
247250endif
248251endif
249252
253# allow gprof profiling as well, which overrides the internal PROFILER
254ifdef GPROF
255CCOMFLAGS += -pg
256PROFILER =
257# LIBS += -lc_p
258endif
250259
251260
252261#-------------------------------------------------
r7772r7773
284293PREFIXSDL =
285294SUFFIX64 =
286295SUFFIXDEBUG =
296SUFFIXGPROF =
287297
288298# Windows SDL builds get an SDL prefix
289299ifeq ($(OSD),sdl)
r7772r7773
302312SUFFIXDEBUG = d
303313endif
304314
315# gprof builds get an addition 'p' suffix
316ifdef GPROF
317SUFFIXGPROF = p
318endif
319
305320# the name is just 'target' if no subtarget; otherwise it is
306321# the concatenation of the two (e.g., mametiny)
307322ifeq ($(TARGET),$(SUBTARGET))
r7772r7773
311326endif
312327
313328# fullname is prefix+name+suffix+suffix64+suffixdebug
314FULLNAME = $(PREFIX)$(PREFIXSDL)$(NAME)$(SUFFIX)$(SUFFIX64)$(SUFFIXDEBUG)
329FULLNAME = $(PREFIX)$(PREFIXSDL)$(NAME)$(SUFFIX)$(SUFFIX64)$(SUFFIXDEBUG)$(SUFFIXGPROF)
315330
316331# add an EXE suffix to get the final emulator name
317332EMULATOR = $(FULLNAME)$(EXE)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team