Previous 15994 Revisions Next

r5047 Thursday 18th June, 2009 at 22:47:11 UTC by Nathan Woods
Updated to MAME 0.132u1 core
[ROOT]whatsnew.txt
[docs]messnew.txt
[src/emu/cpu/m6502]tdeco16.c
[src/emu/cpu/minx]minx.c minxfunc.h minxopce.h minxopcf.h minxops.h
[src/emu/cpu/tms9900]tms9900.h
[src/emu/machine]74148.c 74181.c 8237dma.c
[src/emu/sound]sp0256.h
[src/emu/video]tms9928a.c
[src/mame]mamedriv.c
[src/mame/drivers]4roses.c 8080bw.c 86lions.c aristmk4.c bagman.c bestleag.c calchase.c calomega.c carrera.c coinmstr.c dambustr.c dkong.c eprom.c exprraid.c funworld.c gamecstl.c goldnpkr.c gstriker.c guab.c jokrwild.c kaneko16.c kingdrby.c kingobox.c konamim2.c liberate.c magicard.c magicfly.c mediagx.c merit.c metro.c midzeus.c miniboy7.c mpu4drvr.c murogem.c naomi.c nyny.c pcat_nit.c pcxt.c peplus.c polyplay.c progolf.c r2dtank.c rockola.c rohga.c royalmah.c segas16a.c segas32.c seta.c shaolins.c slotcarn.c spiders.c ssingles.c starwars.c system16.c taitowlf.c thayers.c thunderx.c triforce.c twinkle.c usgames.c vcombat.c
[src/mame/includes]btime.h galaxold.h qix.h system16.h
[src/mame/machine]kaneko16.c qix.c scramble.c xevious.c
[src/mame/video]aerofgt.c arabian.c btime.c cosmic.c galaxold.c liberate.c madalien.c qix.c segaic16.c segaic16.h sys16spr.c system16.c tubep.c

src/mame/machine/xevious.c
r5046r5047
177177   switch ( offset )
178178   {
179179      default:
180      case 0: return ~BITSWAP8(input_port_read(space->machine, "IN0"),6,7,5,4,3,2,1,0) >> 4;
181      case 1: return ~input_port_read(space->machine, "IN1") & 0x0f;
182      case 2: return ~input_port_read(space->machine, "IN1") >> 4;
183      case 3: return ~input_port_read(space->machine, "IN0") & 0x0f;
180      case 0: return ~BITSWAP8(input_port_read(space->machine, "IN0H"),7,6,5,4,2,3,1,0);
181      case 1: return ~input_port_read(space->machine, "IN1L");
182      case 2: return ~input_port_read(space->machine, "IN1H");
183      case 3: return ~input_port_read(space->machine, "IN0L");
184184   }
185185}
186186
src/mame/machine/scramble.c
r5046r5047
601601         bits[i] = (A >> i) & 1;
602602
603603      xormask = 0x55;
604      if (bits[2] ^ ( bits[3] &  bits[6])) xormask ^= 0x01;
605      if (bits[4] ^ ( bits[5] &  bits[7])) xormask ^= 0x02;
606      if (bits[0] ^ ( bits[7] & !bits[3])) xormask ^= 0x04;
607      if (bits[3] ^ (!bits[0] &  bits[2])) xormask ^= 0x08;
608      if (bits[5] ^ (!bits[4] &  bits[1])) xormask ^= 0x10;
609      if (bits[6] ^ (!bits[2] & !bits[5])) xormask ^= 0x20;
610      if (bits[1] ^ (!bits[6] & !bits[4])) xormask ^= 0x40;
611      if (bits[7] ^ (!bits[1] &  bits[0])) xormask ^= 0x80;
604      if (bits[2] ^ (( bits[3]) & ( bits[6]))) xormask ^= 0x01;
605      if (bits[4] ^ (( bits[5]) & ( bits[7]))) xormask ^= 0x02;
606      if (bits[0] ^ (( bits[7]) & (!bits[3]))) xormask ^= 0x04;
607      if (bits[3] ^ ((!bits[0]) & ( bits[2]))) xormask ^= 0x08;
608      if (bits[5] ^ ((!bits[4]) & ( bits[1]))) xormask ^= 0x10;
609      if (bits[6] ^ ((!bits[2]) & (!bits[5]))) xormask ^= 0x20;
610      if (bits[1] ^ ((!bits[6]) & (!bits[4]))) xormask ^= 0x40;
611      if (bits[7] ^ ((!bits[1]) & ( bits[0]))) xormask ^= 0x80;
612612
613613      rom[A] ^= xormask;
614614
src/mame/machine/qix.c
r5046r5047
250250 *
251251 *************************************/
252252
253MC6845_ON_VSYNC_CHANGED( qix_vsync_changed )
253WRITE_LINE_DEVICE_HANDLER( qix_vsync_changed )
254254{
255255   const device_config *pia = devtag_get_device(device->machine, "sndpia0");
256   pia6821_cb1_w(pia, 0, vsync);
256   pia6821_cb1_w(pia, 0, state);
257257}
258258
259259
src/mame/machine/kaneko16.c
r5046r5047
311311    - Read the DSWs
312312    - Supply code snippets to the 68000
313313*/
314UINT32 writeaddress;
315extern UINT16 calc3_mcu_crc;
314316
317// todo: change this to get it from the decrypted rom, it's block 0x19, and we have decrypted it (as specified in the parameters)
318static const UINT16 shogwarr_snip_[] = {
319   0x48E7,0xFFFE,            // movem.l D0-D7/A0-A6, -(A7)
320
321   0x3039,0x00A8,0x0000,      // move.w  $a80000.l, D0
322   0x4279,0x0020,0xFFFE,      // clr.w   $20fffe.l
323
324   0x41F9,0x0020,0x0000,      // lea     $200000.l, A0
325   0x7000,                  // moveq   #$0, D0
326
327   0x43E8,0x01C6,            // lea     ($1c6,A0), A1
328   0x7E02,                  // moveq   #$2, D7
329   0xD059,                  // add.w   (A1)+, D0
330   0x51CF,0xFFFC,            // dbra    D7, 207ffe
331
332   0x43E9,0x0002,            // lea     ($2,A1), A1
333   0x7E04,                  // moveq   #$4, D7
334   0xD059,                  // add.w   (A1)+, D0
335   0x51CF,0xFFFC,            // dbra    D7, 20800a
336
337   0x4640,                  // not.w   D0
338   0x5340,                  // subq.w  #1, D0
339   0x0068,0x0030,0x0216,      // ori.w   #$30, ($216,A0)
340
341   0xB07A,0x009A,            // cmp.w   ($9a,PC), D0; ($2080b6)
342   0x670A,                  // beq     20802a
343
344   0x0268,0x000F,0x0216,      // andi.w  #$f, ($216,A0)
345   0x4268,0x0218,            // clr.w   ($218,A0)
346
347   0x5468,0x0216,            // addq.w  #2, ($216,A0)
348   0x42A8,0x030C,            // clr.l   ($30c,A0)
349   0x117C,0x0020,0x030C,      // move.b  #$20, ($30c,A0)
350
351   0x3E3C,0x0001,            // move.w  #$1, D7
352
353   0x0C68,0x0008,0x0218,      // cmpi.w  #$8, ($218,A0)
354   0x6C00,0x0068,            // bge     2080ac
355
356   0x117C,0x0080,0x0310,      // move.b  #$80, ($310,A0)
357   0x117C,0x0008,0x0311,      // move.b  #$8, ($311,A0)
358   0x317C,0x7800,0x0312,      // move.w  #$7800, ($312,A0)
359   0x5247,                  // addq.w  #1, D7
360   0x0C68,0x0040,0x0216,      // cmpi.w  #$40, ($216,A0)
361   0x6D08,                  // blt     20806a
362
363   0x5468,0x0218,            // addq.w  #2, ($218,A0)
364   0x6000,0x0044,            // bra     2080ac
365
366   0x117C,0x0041,0x0314,      // move.b  #$41, ($314,A0)
367
368   0x0C39,0x0001,0x0010,0x2E12,// cmpi.b  #$1, $102e12.l
369   0x6606,                  // bne     208080
370
371   0x117C,0x0040,0x0314,      // move.b  #$40, ($314,A0)
372
373   0x117C,0x000C,0x0315,      // move.b  #$c, ($315,A0)
374   0x317C,0x7000,0x0316,      // move.w  #$7000, ($316,A0)
375   0x5247,                  // addq.w  #1, D7
376
377   0x0839,0x0001,0x0010,0x2E15,// btst    #$1, $102e15.l ; service mode
378   0x6714,                  // beq     2080ac
379
380   0x117C,0x0058,0x0318,      // move.b  #$58, ($318,A0)
381   0x117C,0x0006,0x0319,      // move.b  #$6, ($319,A0)
382   0x317C,0x6800,0x031A,      // move.w  #$6800, ($31a,A0)
383   0x5247,                  // addq.w  #1, D7
384
385   0x3147,0x030A,            // move.w  D7, ($30a,A0)
386   0x4CDF,0x7FFF,            // movem.l (A7)+, D0-D7/A0-A6
387   0x4E73,                  // rte
388   0xC747,
389};
390
391
315392static void calc3_mcu_run(running_machine *machine)
316393{
317394   UINT16 mcu_command;
318395
319396   if ( calc3_mcu_status != (1|2|4|8) )   return;
320397
321   mcu_command = kaneko16_mcu_ram[calc3_mcu_command_offset + 0];
398   //calc3_mcu_status = 0;
322399
400   mcu_command = kaneko16_mcu_ram[calc3_mcu_command_offset/2 + 0];
401
323402   if (mcu_command == 0) return;
324403
325404   logerror("%s : MCU executed command at %04X: %04X\n",
326       cpuexec_describe_context(machine),calc3_mcu_command_offset*2,mcu_command);
405       cpuexec_describe_context(machine),calc3_mcu_command_offset,mcu_command);
327406
407
328408   switch (mcu_command)
329409   {
330410
331411      case 0x00ff:
332412      {
333            static const UINT16 shogwarr_snip_[] = {
334          0x48E7,0xFFFE,            // movem.l D0-D7/A0-A6, -(A7)
335413
336         0x3039,0x00A8,0x0000,      // move.w  $a80000.l, D0
337         0x4279,0x0020,0xFFFE,      // clr.w   $20fffe.l
338414
339         0x41F9,0x0020,0x0000,      // lea     $200000.l, A0
340         0x7000,                  // moveq   #$0, D0
415         int param1 = kaneko16_mcu_ram[(0>>1) + 1];
416         int param2 = kaneko16_mcu_ram[(0>>1) + 2];
417         int param3 = kaneko16_mcu_ram[(0>>1) + 3];
418         int param4 = kaneko16_mcu_ram[(0>>1) + 4];
419         int param5 = kaneko16_mcu_ram[(0>>1) + 5];
420         int param6 = kaneko16_mcu_ram[(0>>1) + 6];
421         int param7 = kaneko16_mcu_ram[(0>>1) + 7];
422         int param8 = kaneko16_mcu_ram[(0>>1) + 8];
423         int param9 = kaneko16_mcu_ram[(0>>1) + 9];
341424
342         0x43E8,0x01C6,            // lea     ($1c6,A0), A1
343         0x7E02,                  // moveq   #$2, D7
344         0xD059,                  // add.w   (A1)+, D0
345         0x51CF,0xFFFC,            // dbra    D7, 207ffe
425         logerror("params %04x %04x %04x %04x %04x %04x %04x %04x %04x\n",
426         param1,param2,param3,param4,param5,param6,param7,param8,param9);
346427
347         0x43E9,0x0002,            // lea     ($2,A1), A1
348         0x7E04,                  // moveq   #$4, D7
349         0xD059,                  // add.w   (A1)+, D0
350         0x51CF,0xFFFC,            // dbra    D7, 20800a
428         writeaddress = (param6 << 16) | param7;
351429
352         0x4640,                  // not.w   D0
353         0x5340,                  // subq.w  #1, D0
354         0x0068,0x0030,0x0216,      // ori.w   #$30, ($216,A0)
355430
356         0xB07A,0x009A,            // cmp.w   ($9a,PC), D0; ($2080b6)
357         0x670A,                  // beq     20802a
358431
359         0x0268,0x000F,0x0216,      // andi.w  #$f, ($216,A0)
360         0x4268,0x0218,            // clr.w   ($218,A0)
432         // execute the command:
361433
362         0x5468,0x0216,            // addq.w  #2, ($216,A0)
363         0x42A8,0x030C,            // clr.l   ($30c,A0)
364         0x117C,0x0020,0x030C,      // move.b  #$20, ($30c,A0)
434         kaneko16_mcu_ram[param1 / 2] = ~input_port_read(machine, "DSW1");   // DSW
435         kaneko16_mcu_ram[param2 / 2] = 0xffff;            // ? -1 / anything else
365436
366         0x3E3C,0x0001,            // move.w  #$1, D7
437         // param 4?
438         kaneko16_mcu_ram[param5 / 2] = calc3_mcu_crc;            // MCU Rom Checksum!
439         // param 6&7 = address.l
367440
368         0x0C68,0x0008,0x0218,      // cmpi.w  #$8, ($218,A0)
369         0x6C00,0x0068,            // bge     2080ac
370441
371         0x117C,0x0080,0x0310,      // move.b  #$80, ($310,A0)
372         0x117C,0x0008,0x0311,      // move.b  #$8, ($311,A0)
373         0x317C,0x7800,0x0312,      // move.w  #$7800, ($312,A0)
374         0x5247,                  // addq.w  #1, D7
375         0x0C68,0x0040,0x0216,      // cmpi.w  #$40, ($216,A0)
376         0x6D08,                  // blt     20806a
377442
378         0x5468,0x0218,            // addq.w  #2, ($218,A0)
379         0x6000,0x0044,            // bra     2080ac
380443
381         0x117C,0x0041,0x0314,      // move.b  #$41, ($314,A0)
444         // clear old command (handshake to main cpu)
445         kaneko16_mcu_ram[(calc3_mcu_command_offset>>1)+0] = 0x0000;
446         kaneko16_mcu_ram[(calc3_mcu_command_offset>>1)+1] = 0x0000;
447         kaneko16_mcu_ram[(calc3_mcu_command_offset>>1)+2] = 0x0000;
448         kaneko16_mcu_ram[(calc3_mcu_command_offset>>1)+3] = 0x0000;
449         kaneko16_mcu_ram[(calc3_mcu_command_offset>>1)+4] = 0x0000;
450         kaneko16_mcu_ram[(calc3_mcu_command_offset>>1)+5] = 0x0000;
451         kaneko16_mcu_ram[(calc3_mcu_command_offset>>1)+6] = 0x0000;
452         kaneko16_mcu_ram[(calc3_mcu_command_offset>>1)+7] = 0x0000;
382453
383         0x0C39,0x0001,0x0010,0x2E12,// cmpi.b  #$1, $102e12.l
384         0x6606,                  // bne     208080
454         calc3_mcu_command_offset = param3;   // where next command will be written?
385455
386         0x117C,0x0040,0x0314,      // move.b  #$40, ($314,A0)
387456
388         0x117C,0x000C,0x0315,      // move.b  #$c, ($315,A0)
389         0x317C,0x7000,0x0316,      // move.w  #$7000, ($316,A0)
390         0x5247,                  // addq.w  #1, D7
457      }
458      break;
391459
392         0x0839,0x0001,0x0010,0x2E15,// btst    #$1, $102e15.l ; service mode
393         0x6714,                  // beq     2080ac
460      // the 'case' seems to be the number of commands in the list
461      // there are parts of the code where i've seen up to '5' specified, and the game uploads 5 transfer commands
462      //
394463
395         0x117C,0x0058,0x0318,      // move.b  #$58, ($318,A0)
396         0x117C,0x0006,0x0319,      // move.b  #$6, ($319,A0)
397         0x317C,0x6800,0x031A,      // move.w  #$6800, ($31a,A0)
398         0x5247,                  // addq.w  #1, D7
464      case 0x0001:
465      {
466         int i;
467         int param1 = kaneko16_mcu_ram[(calc3_mcu_command_offset>>1) + 1];
468         int param2 = kaneko16_mcu_ram[(calc3_mcu_command_offset>>1) + 2];
469         int param3 = kaneko16_mcu_ram[(calc3_mcu_command_offset>>1) + 3];
470         int param4 = kaneko16_mcu_ram[(calc3_mcu_command_offset>>1) + 4];
471         int param5 = kaneko16_mcu_ram[(calc3_mcu_command_offset>>1) + 5];
472         int param6 = kaneko16_mcu_ram[(calc3_mcu_command_offset>>1) + 6];
473         int param7 = kaneko16_mcu_ram[(calc3_mcu_command_offset>>1)+ 7];
399474
400         0x3147,0x030A,            // move.w  D7, ($30a,A0)
401         0x4CDF,0x7FFF,            // movem.l (A7)+, D0-D7/A0-A6
402         0x4E73,                  // rte
403         0xC747,
404         };
475         UINT32 writebackaddress = (param1&0x00ff) | (param2&0xff00);
476         UINT8  command1tabl = (param1&0xff00) >> 8;
477         UINT16 command1addr = (param1&0x00ff) | (param2&0xff00);
405478
406479
407         int param1 = kaneko16_mcu_ram[calc3_mcu_command_offset + 1];
408         int param2 = kaneko16_mcu_ram[calc3_mcu_command_offset + 2];
409         int param3 = kaneko16_mcu_ram[calc3_mcu_command_offset + 3];
410         int param4 = kaneko16_mcu_ram[calc3_mcu_command_offset + 4];
411         int param5 = kaneko16_mcu_ram[calc3_mcu_command_offset + 5];
412         int param6 = kaneko16_mcu_ram[calc3_mcu_command_offset + 6];
413         int param7 = kaneko16_mcu_ram[calc3_mcu_command_offset + 7];
414         UINT32 writeaddress = (param6 << 16) | param7;
415         int i;
416480         logerror("params %04x %04x %04x %04x %04x %04x %04x\n",
417481         param1,param2,param3,param4,param5,param6,param7);
482         logerror("command 1 addr %04x command 1 table %02x\n", command1addr, command1tabl);
418483
484         // clear old command (handshake to main cpu)
485         kaneko16_mcu_ram[calc3_mcu_command_offset>>1] = 0x0000;
419486
420487
421         // clear old command (handshake to main cpu)
422         kaneko16_mcu_ram[calc3_mcu_command_offset] = 0x0000;
423488
424489         // execute the command:
425490
426         kaneko16_mcu_ram[param1 / 2] = ~input_port_read(machine, "DSW1");   // DSW
427         kaneko16_mcu_ram[param2 / 2] = 0xffff;            // ? -1 / anything else
491         // param1 ?
492         //kaneko16_mcu_ram[param2/2 + 0] = 0x0000;      // ?
493         //kaneko16_mcu_ram[param2/2 + 1] = 0x0000;      // ?
494         //kaneko16_mcu_ram[param2/2 + 2] = 0x0000;      // ?
495         //kaneko16_mcu_ram[param2/2 + 3] = 0x0000;      // ? addr.l
496         //kaneko16_mcu_ram[param2/2 + 4] = 0x00e0;      // 0000e0: 4e73 rte
428497
429         calc3_mcu_command_offset = param3 / 2;   // where next command will be written?
430         // param 4?
431         kaneko16_mcu_ram[param5 / 2] = 0x8ee4;            // MCU Rom Checksum!
432         // param 6&7 = address.l
498         //UINT32 writeaddress = (param2);
433499
500
501
434502         writeaddress&=0xffff;
435503
436504
437505         for(i=0;i<sizeof(shogwarr_snip_) / 2;i++)
438506         {
507      //      printf("writes\n %08x", (writeaddress+i)*2);
439508            kaneko16_mcu_ram[(writeaddress/2)+i] = shogwarr_snip_[i];
440509         }
441510
511         kaneko16_mcu_ram[(writebackaddress/2)+0] = 0x0020;
512         kaneko16_mcu_ram[(writebackaddress/2)+1] = writeaddress;
513
514      //  calc3_mcu_command_offset = param3;  // where next command will be written?
515      //  calc3_mcu_status  =0;
516
442517      }
443518      break;
444519
445
446      case 0x0001:
520      case 0x0002:
447521      {
448         int param1 = kaneko16_mcu_ram[calc3_mcu_command_offset + 1];
449         int param2 = kaneko16_mcu_ram[calc3_mcu_command_offset + 2];
450         int param3 = kaneko16_mcu_ram[calc3_mcu_command_offset + 3];
451         int param4 = kaneko16_mcu_ram[calc3_mcu_command_offset + 4];
452         int param5 = kaneko16_mcu_ram[calc3_mcu_command_offset + 5];
453         int param6 = kaneko16_mcu_ram[calc3_mcu_command_offset + 6];
454         int param7 = kaneko16_mcu_ram[calc3_mcu_command_offset + 7];
455522
523
524         int param1 = kaneko16_mcu_ram[(calc3_mcu_command_offset>>1) + 1];
525         int param2 = kaneko16_mcu_ram[(calc3_mcu_command_offset>>1) + 2];
526         int param3 = kaneko16_mcu_ram[(calc3_mcu_command_offset>>1) + 3];
527         int param4 = kaneko16_mcu_ram[(calc3_mcu_command_offset>>1) + 4];
528         int param5 = kaneko16_mcu_ram[(calc3_mcu_command_offset>>1) + 5];
529         int param6 = kaneko16_mcu_ram[(calc3_mcu_command_offset>>1) + 6];
530         int param7 = kaneko16_mcu_ram[(calc3_mcu_command_offset>>1)+ 7];
531
532
533         UINT8  command1tabl = (param1&0xff00) >> 8;
534         UINT16 command1addr = (param1&0x00ff) | (param2&0xff00);
535         UINT8  command2tabl = (param3&0xff00) >> 8;
536         UINT16 command2addr = (param3&0x00ff) | (param4&0xff00);
537
456538         logerror("params %04x %04x %04x %04x %04x %04x %04x\n",
457539         param1,param2,param3,param4,param5,param6,param7);
540         logerror("command 1 addr %04x command 1 table %02x | command 2 addr %04x command 2 table %02x\n", command1addr, command1tabl, command2addr, command2tabl);
458541
459542         // clear old command (handshake to main cpu)
460         kaneko16_mcu_ram[calc3_mcu_command_offset] = 0x0000;
543         kaneko16_mcu_ram[calc3_mcu_command_offset>>1] = 0x0000;
461544
462545         // execute the command:
463
464         // param1 ?
465         kaneko16_mcu_ram[param2/2 + 0] = 0x0000;      // ?
466         kaneko16_mcu_ram[param2/2 + 1] = 0x0000;      // ?
467         kaneko16_mcu_ram[param2/2 + 2] = 0x0000;      // ?
468         kaneko16_mcu_ram[param2/2 + 3] = 0x0000;      // ? addr.l
469         kaneko16_mcu_ram[param2/2 + 4] = 0x00e0;      // 0000e0: 4e73 rte
470
546;
471547      }
472548      break;
473549
474
475      case 0x0002:
550      case 0x0003:
476551      {
477         int param1 = kaneko16_mcu_ram[calc3_mcu_command_offset + 1];
478         int param2 = kaneko16_mcu_ram[calc3_mcu_command_offset + 2];
479         int param3 = kaneko16_mcu_ram[calc3_mcu_command_offset + 3];
480         int param4 = kaneko16_mcu_ram[calc3_mcu_command_offset + 4];
481         int param5 = kaneko16_mcu_ram[calc3_mcu_command_offset + 5];
482         int param6 = kaneko16_mcu_ram[calc3_mcu_command_offset + 6];
483         int param7 = kaneko16_mcu_ram[calc3_mcu_command_offset + 7];
484552
553         int param1 = kaneko16_mcu_ram[(calc3_mcu_command_offset>>1) + 1];
554         int param2 = kaneko16_mcu_ram[(calc3_mcu_command_offset>>1) + 2];
555         int param3 = kaneko16_mcu_ram[(calc3_mcu_command_offset>>1) + 3];
556         int param4 = kaneko16_mcu_ram[(calc3_mcu_command_offset>>1) + 4];
557         int param5 = kaneko16_mcu_ram[(calc3_mcu_command_offset>>1) + 5];
558         int param6 = kaneko16_mcu_ram[(calc3_mcu_command_offset>>1) + 6];
559         int param7 = kaneko16_mcu_ram[(calc3_mcu_command_offset>>1)+ 7];
560
561
562         UINT8  command1tabl = (param1&0xff00) >> 8;
563         UINT16 command1addr = (param1&0x00ff) | (param2&0xff00);
564         UINT8  command2tabl = (param3&0xff00) >> 8;
565         UINT16 command2addr = (param3&0x00ff) | (param4&0xff00);
566         UINT8  command3tabl = (param5&0xff00) >> 8;
567         UINT16 command3addr = (param5&0x00ff) | (param6&0xff00);
568
485569         logerror("params %04x %04x %04x %04x %04x %04x %04x\n",
486570         param1,param2,param3,param4,param5,param6,param7);
571         logerror("command 1 addr %04x command 1 table %02x | command 2 addr %04x command 2 table %02x | command 3 addr %04x command 3 table %02x\n", command1addr, command1tabl, command2addr, command2tabl, command3addr, command3tabl);
487572
488
489573         // clear old command (handshake to main cpu)
490         kaneko16_mcu_ram[calc3_mcu_command_offset] = 0x0000;
574         kaneko16_mcu_ram[calc3_mcu_command_offset>>1] = 0x0000;
491575
492576         // execute the command:
493
494577      }
495578      break;
496579
src/mame/mamedriv.c
r5046r5047
12241224   DRIVER( polarisa )   /* PS  (c) 1980 Taito */
12251225   DRIVER( ballbomb )   /* TN  (c) 1980 Taito */
12261226   DRIVER( indianbt )   /* (c) 1980 Taito */
1227   DRIVER( steelwkr )   /* (c) 1980 Taito */
12271228   DRIVER( m79amb )   /* (c) 1977 RamTek */
12281229   DRIVER( alieninv )   /* bootleg */
12291230   DRIVER( tst_invd )   /* Test ROM */
r5046r5047
32013202
32023203   /* Konami Twinkle games */
32033204   DRIVER( gq863 )
3205   DRIVER( bmiidx )
32043206   DRIVER( bmiidxc )
32053207   DRIVER( bmiidxca )
32063208   DRIVER( bmiidxc2 )
3209   DRIVER( bmiidx3 )
32073210   DRIVER( bmiidx4 )
32083211   DRIVER( bmiidx6 )
32093212   DRIVER( bmiidx7 )
r5046r5047
36383641   DRIVER( dumpmtmt )   /* (c) 1986 (Japan) */
36393642   DRIVER( mjleague )   /* (c) 1985 */
36403643   DRIVER( quartet )   /* (c) 1986 (8751) */
3641   DRIVER( quartet1 )   /* (c) 1986 (8751) */
3642   DRIVER( quart21 )   /* (c) 1986 (8751) */
3643   DRIVER( quart2 )   /* (c) 1986 */
3644   DRIVER( quarteta )   /* (c) 1986 (8751) */
3645   DRIVER( quartet2 )   /* (c) 1986 (8751) */
3646   DRIVER( quartet2a )   /* (c) 1986 */
36443647
36453648   /* System16A */
36463649   DRIVER( aceattaa )   /* (c) 1988 (FD1094, decrypted) */
r5046r5047
45064509   /* Atomiswave (Dreamcast-based) games */
45074510   DRIVER( awbios )
45084511                  /* 2002.12 Maximum Speed */
4509                  /* 2002.12 Sports Shooting USA */
4512   DRIVER( sprtshot )         /* 2002.12 Sports Shooting USA */
45104513                  /* 2003.03 Guilty Gear X ver.1.5 */
45114514   DRIVER( demofist )   /* 2003.06 Demolish Fist */
45124515                  /* 2003.08 Dolphin Blue */
45134516                  /* 2003.12 Guilty Gear Isuka */
45144517                  /* 2003.12 Sangoku Senki Shichisei Tensei (IGS) */
45154518                  /* 2004.03 The Rumble Fish */
4516                  /* 2004.03 Ranger Mission */
4519   DRIVER( rangrmsn )         /* 2004.03 Ranger Mission */
45174520                  /* 2004.06 Salary Man Kintarou Net Select */
45184521                  /* 2004.07 The King of Fighters Neo Wave */
45194522                  /* 2004.09 Extreme Hunting */
r5046r5047
67396742   DRIVER( invasnab )   /* (c) 1999 Midway */
67406743   DRIVER( invasnv4 )   /* (c) 1999 Midway */
67416744   DRIVER( crusnexo )   /* (c) 1999 Midway */
6745   DRIVER( crusnexa )   /* (c) 1999 Midway */
67426746   DRIVER( thegrid )   /* (c) 2001 Midway */
67436747   DRIVER( thegrida )   /* (c) 2001 Midway */
67446748
r5046r5047
70927096   DRIVER( bigstrik )   /* (c) 1992 */
70937097   DRIVER( bigstrkb )   /* bootleg on different hardware */
70947098   DRIVER( bestleag )   /* bootleg, by Playmark? */
7099   DRIVER( bestleaw )   /* bootleg */
70957100   DRIVER( chimerab )   /* (c) 1993 */
70967101   DRIVER( cybattlr )   /* (c) 1993 */
70977102   DRIVER( hayaosi1 )   /* (c) 1993 */
r5046r5047
71767181   DRIVER( taotaido )   /* (c) 1993 Video System Co. */
71777182   DRIVER( taotaida )   /* (c) 1993 Video System Co. */
71787183   DRIVER( gstriker )   /* (c) [1993] Human */
7184   DRIVER( gstrikea )   /* (c) [1993] Human */
71797185   DRIVER( vgoalsoc )   /* (c) 199? Temco */
71807186   DRIVER( vgoalsca )   /* (c) 199? Temco */
71817187   DRIVER( twrldc94 )      /* (c) 1994 Tecmo */
r5046r5047
77297735   DRIVER( gakusai2 )   /* (c) 1998 MakeSoft */
77307736   DRIVER( blzntrnd )   /* (c) 1994 Human Amusement */
77317737   DRIVER( gstrik2 )   /* (c) 1996 Human Amusement */
7738   DRIVER( gstrik2e )
77327739   DRIVER( hyprduel )   /* (c) 1993 Technosoft (World) */
77337740   DRIVER( hyprdelj )   /* (c) 1993 Technosoft (Japan) */
77347741   DRIVER( magerror )   /* (c) 1994 Technosoft (Japan) (Arcade TV Game List - P.100, Left, 13 from Bottom) */
r5046r5047
83198326
83208327   /* JPM Give us a Break hardware */
83218328   DRIVER( guab )      /* (c) 1986 */
8322   DRIVER( guab3 )      /* (c) 1986 */
8329   DRIVER( guab3a )   /* (c) 1986 */
8330   DRIVER( guab4 )      /* (c) 1986 */
8331   DRIVER( guab6 )      /* (c) 1986 */
8332   DRIVER( guab6a )   /* (c) 1986 */
8333   DRIVER( guab7 )      /* (c) 1986 */
8334   DRIVER( guab21 )   /* (c) 1986 */
8335   DRIVER( guab43 )   /* (c) 1986 */
83238336   DRIVER( tenup )      /* (c) 1988 */
83248337   DRIVER( tenup3 )   /* (c) 1988 */
83258338
r5046r5047
86698682   DRIVER( ssfindo )   /* (c) 1999 Icarus */
86708683   DRIVER( ppcar )      /* (c) 1999 Icarus */
86718684   DRIVER( imolagp )   /* (c) 1981 Leante Games */
8672   DRIVER( dambust )   /* (c) 19?? GAT */
8673   DRIVER( dambustr )   /* (c) 19?? GAT */
8685   DRIVER( dambustr )   /* (c) 1981 South West Research */
8686   DRIVER( dambusta )   /* (c) 1981 South West Research */
8687   DRIVER( dambust )   /* (c) 1981 South West Research */
86748688   DRIVER( gunpey )   /* (c) 2000 Banpresto */
86758689   DRIVER( spaceg )   /* (c) 19?? */
86768690   DRIVER( wldarrow )   /* (c) 1982 */
r5046r5047
94089422   //DRIVER( mfish_11 )
94099423   DRIVER( mfish_12 )
94109424   DRIVER( mfish_12a )
9425   //DRIVER( mfish_13 )
94119426
94129427   /* Crazy Monkey */
94139428   //DRIVER( crzmon )
src/mame/includes/system16.h
r5046r5047
144144/*----------- defined in video/system16.c -----------*/
145145
146146extern VIDEO_START( system16a_bootleg );
147extern VIDEO_START( system16a_bootleg_wb3bl );
148extern VIDEO_START( system16a_bootleg_shinobi );
149extern VIDEO_START( system16a_bootleg_passsht );
147150extern VIDEO_UPDATE( system16a_bootleg );
148151extern VIDEO_UPDATE( system16a_bootleg_passht4b );
149152extern WRITE16_HANDLER( system16a_bootleg_tilemapselect_w );
src/mame/includes/btime.h
r5046r5047
2323VIDEO_START( btime );
2424VIDEO_START( bnj );
2525
26
2726VIDEO_UPDATE( btime );
2827VIDEO_UPDATE( cookrace );
2928VIDEO_UPDATE( bnj );
r5046r5047
3130VIDEO_UPDATE( zoar );
3231VIDEO_UPDATE( disco );
3332VIDEO_UPDATE( eggs );
34VIDEO_UPDATE( progolf );
3533
3634WRITE8_HANDLER( btime_paletteram_w );
3735WRITE8_HANDLER( bnj_background_w );
src/mame/includes/qix.h
r5046r5047
7272
7373WRITE8_DEVICE_HANDLER( qix_pia_w );
7474
75MC6845_ON_VSYNC_CHANGED( qix_vsync_changed );
75WRITE_LINE_DEVICE_HANDLER( qix_vsync_changed );
7676
7777
7878/*----------- defined in video/qix.c -----------*/
src/mame/includes/galaxold.h
r5046r5047
88    - scobra.c
99    - frogger.c
1010    - amidar.c
11    - dambustr.c
1112
1213***************************************************************************/
1314
src/mame/video/aerofgt.c
r5046r5047
416416      if (!(aerofgt_spriteram3[attr_start + 2] & 0x0080)) continue;
417417      pri = aerofgt_spriteram3[attr_start + 2] & 0x0010;
418418      if ( chip_disabled_pri & !pri) continue;
419      if (!chip_disabled_pri & (pri>>4)) continue;
419      if ((!chip_disabled_pri) & (pri>>4)) continue;
420420      ox = aerofgt_spriteram3[attr_start + 1] & 0x01ff;
421421      xsize = (aerofgt_spriteram3[attr_start + 2] & 0x0700) >> 8;
422422      zoomx = (aerofgt_spriteram3[attr_start + 1] & 0xf000) >> 12;
r5046r5047
491491      if (!(aerofgt_spriteram3[attr_start + 2] & 0x0080)) continue;
492492      pri = aerofgt_spriteram3[attr_start + 2] & 0x0010;
493493      if ( chip_disabled_pri & !pri) continue;
494      if (!chip_disabled_pri & (pri>>4)) continue;
494      if ((!chip_disabled_pri) & (pri>>4)) continue;
495495      ox = aerofgt_spriteram3[attr_start + 1] & 0x01ff;
496496      xsize = (aerofgt_spriteram3[attr_start + 2] & 0x0700) >> 8;
497497      zoomx = (aerofgt_spriteram3[attr_start + 1] & 0xf000) >> 12;
r5046r5047
567567      if (!(aerofgt_spriteram3[attr_start + 2] & 0x0080)) continue;
568568      pri = aerofgt_spriteram3[attr_start + 2] & 0x0010;
569569      if ( chip_disabled_pri & !pri) continue;
570      if (!chip_disabled_pri & (pri>>4)) continue;
570      if ((!chip_disabled_pri) & (pri>>4)) continue;
571571      ox = aerofgt_spriteram3[attr_start + 1] & 0x01ff;
572572      xsize = (aerofgt_spriteram3[attr_start + 2] & 0x0700) >> 8;
573573      zoomx = (aerofgt_spriteram3[attr_start + 1] & 0xf000) >> 12;
src/mame/video/arabian.c
r5046r5047
8686        -------------------------------------------------------------------------*/
8787
8888      int rhi = planea ? ar : enb ? bz : 0;
89      int rlo = planea ? ((!arhf & az) ? 0 : ar) : enb ? br : 0;
89      int rlo = planea ? (((!arhf) & az) ? 0 : ar) : enb ? br : 0;
9090
9191      /*-------------------------------------------------------------------------
9292            green derivation:
r5046r5047
117117        -------------------------------------------------------------------------*/
118118
119119      int ghi = planea ? ag : enb ? bb : 0;
120      int glo = planea ? ((!aghf & az) ? 0 : ag) : enb ? bg : 0;
120      int glo = planea ? (((!aghf) & az) ? 0 : ag) : enb ? bg : 0;
121121
122122      /*-------------------------------------------------------------------------
123123            blue derivation:
r5046r5047
138138        -------------------------------------------------------------------------*/
139139
140140      int bhi = ab;
141      int bbase = (!abhf & az) ? 0 : ab;
141      int bbase = ((!abhf) & az) ? 0 : ab;
142142
143143      /* convert an RGB color -
144144           there are effectively 6 bits of color: 2 red, 2 green, 2 blue */
src/mame/video/system16.c
r5046r5047
2727#include "driver.h"
2828#include "system16.h"
2929#include "video/resnet.h"
30#include "video/segaic16.h"
3031
32int system16_bootleg_spritebank_type = -1;
33int system16_bootleg_back_tilemap_yscroll = 0;
34int system16_bootleg_fore_tilemap_yscroll = 0;
35int system16_bootleg_text_tilemap_yscroll = 0;
36int system16_bootleg_sprite_xoffs = 0;
3137
38/* A config table for per-game offsets and bank types */
39struct system15_bootleg_config
40{
41   const char *name;             /* game driver name */
42   int spritebank_type;
43   int back_tilemap_yscroll;
44   int fore_tilemap_yscroll;
45   int text_tilemap_yscroll;
46   int sprite_xoffs;
47};
48
49
50static const struct system15_bootleg_config config_table[] =
51{
52   /* 16A bootlegs */
53   { "shinobld",       1, 0,0,0,    117 },
54   { "passshtb",       1, 3,0,0,    117 },
55   { "passht4b",       1, 0,0,0,    117 },
56   { "wb3bbl",         1, 2,2,0,    117 },
57
58   /* 16B bootlegs */
59   { "bayrouteb1",     0, 0,0,0,    107 },
60   { "bayrouteb2",     0, 0,0,0,    107 },
61   { "goldnaxeb1",     1, 0,0,0,    121 },
62   { "goldnaxeb2",     1, 0,0,0,    121 },
63   { "tturfbl",        0, 0,0,0,    107 },
64   { "dduxbl",         0, 0,0,0,    112 },
65   { "eswatbl",        1, 0,0,0,    124 },
66   { "fpointbl",       0, 2,2,0,    107 },
67   { "fpointbj",       0, 2,2,0,    107 },
68   { "tetrisbl",       0, 0,0,0,    112 },
69
70   /* 18 bootlegs */
71   { "astormbl",       1, 0,0,0,    107 },
72   { "astormb2",       1, 0,0,0,    107 },
73   { "mwalkbl",        1, 0,0,0,    107 },
74   { "shdancbl",       1, 0,0,0,    107 },
75
76   /* Tetris-based hardware */
77   { "beautyb",        0, 0,0,0,    112 },
78   { "iqpipe",         0, 0,0,0,    112 },
79
80
81
82   { NULL, 0 }   // end of table
83};
84
85
86
87
88void setup_system16_bootleg_video(running_machine* machine)
89{
90   const char *gamename = machine->gamedrv->name;
91   const struct system15_bootleg_config *k = &config_table[0];
92   int found = 0;
93   while (k->name)
94   {
95      if (strcmp(k->name, gamename) == 0)
96      {
97         system16_bootleg_spritebank_type = k->spritebank_type;
98         system16_bootleg_back_tilemap_yscroll = k->back_tilemap_yscroll;
99         system16_bootleg_fore_tilemap_yscroll = k->fore_tilemap_yscroll;
100         system16_bootleg_text_tilemap_yscroll = k->text_tilemap_yscroll;
101         system16_bootleg_sprite_xoffs = k->sprite_xoffs;
102         found = 1;
103         break;
104      }
105      ++k;
106   }
107
108   if (!found) fatalerror("system16 bootleg not in system15_bootleg_config config_table[]!\n");
109}
110
111void setup_system16_bootleg_spritebanking(running_machine* machine)
112{
113
114   if (system16_bootleg_spritebank_type == 1)
115   {
116      static const UINT8 default_banklist[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
117      int i;
118      for (i = 0; i < 16; i++)
119         segaic16_sprites_set_bank(machine, 0, i, default_banklist[i]);
120   }
121   else
122   {
123      static const UINT8 alternate_banklist[] = { 0,255,255,255, 255,255,255,3, 255,255,255,2, 255,1,0,255 };
124      int i;
125      for (i = 0; i < 16; i++)
126         segaic16_sprites_set_bank(machine, 0, i, alternate_banklist[i]);
127
128   }
129
130}
131
132
32133UINT16* system16a_bootleg_bg0_tileram;
33134UINT16* system16a_bootleg_bg1_tileram;
34135
r5046r5047
45146
46147/* video driver constants (potentially different for each game) */
47148int sys16_gr_bitmap_width;
48int (*sys16_spritesystem)( struct sys16_sprite_attributes *sprite, const UINT16 *source, int bJustGetColor );
149
49150const int *sys16_obj_bank;
50151int sys16_sprxoffset;
51152int sys16_bgxoffset;
r5046r5047
166267/***************************************************************************/
167268
168269
169/*
170    We mark the priority buffer as follows:
171        text    (0xf)
172        fg (hi) (0x7)
173        fg (lo) (0x3)
174        bg (hi) (0x1)
175        bg (lo) (0x0)
176
177    Each sprite has 4 levels of priority, specifying where they are placed between bg(lo) and text.
178*/
179
180static void draw_sprite(running_machine *machine,
181   bitmap_t *bitmap,
182   const rectangle *cliprect,
183   const UINT8 *addr, int pitch,
184   pen_t pen_base,
185   int x0, int y0, int screen_width, int screen_height,
186   int width, int height,
187   int flipx, int flipy,
188   int priority,
189   int shadow,
190   int shadow_pen, int eos )
191{
192   pen_t shadow_pen_base = machine->gfx[0]->color_base + (machine->config->total_colors/2);
193   const UINT8 *source;
194   int full_shadow=shadow&SYS16_SPR_SHADOW;
195   int partial_shadow=shadow&SYS16_SPR_PARTIAL_SHADOW;
196   int shadow_mask=(machine->config->total_colors/2)-1;
197   int sx, x, xcount;
198   int sy, y, ycount = 0;
199   int dx,dy;
200   UINT16 *dest;
201   UINT8 *pri;
202   unsigned pen, data;
203
204   priority = 1<<priority;
205
206   if( flipy ){
207      dy = -1;
208      y0 += screen_height-1;
209   }
210   else {
211      dy = 1;
212   }
213
214   if( flipx ){
215      dx = -1;
216      x0 += screen_width-1;
217   }
218   else {
219      dx = 1;
220   }
221
222   if (!eos)
223   {
224      sy = y0;
225      for( y=height; y; y-- ){
226         ycount += screen_height;
227         while( ycount>=height ){
228            if( sy>=cliprect->min_y && sy<=cliprect->max_y ){
229               source = addr;
230               dest = BITMAP_ADDR16(bitmap, sy, 0);
231               pri = BITMAP_ADDR8(priority_bitmap, sy, 0);
232               sx = x0;
233               xcount = 0;
234               for( x=width; x; x-=2 ){
235                  data = (unsigned)*source++; /* next 2 pixels */
236                  pen = data>>4;
237                  xcount += screen_width;
238                  while( xcount>=width )
239                  {
240                     if( pen && pen!=0xf && sx>=cliprect->min_x && sx<=cliprect->max_x ){
241                        if(!(pri[sx]&priority)){
242                           if (full_shadow)
243                              dest[sx] = shadow_pen_base + (dest[sx]&shadow_mask);
244                           else if (partial_shadow && pen==shadow_pen)
245                              dest[sx] = shadow_pen_base + (dest[sx]&shadow_mask);
246                           else
247                              dest[sx] = pen_base + pen;
248                        }
249                     }
250                     xcount -= width;
251                     sx+=dx;
252                  }
253                  pen = data&0xf;
254                  xcount += screen_width;
255                  while( xcount>=width )
256                  {
257                     if( pen && pen!=0xf && sx>=cliprect->min_x && sx<=cliprect->max_x ){
258                        if(!(pri[sx]&priority)){
259                           if (full_shadow)
260                              dest[sx] = shadow_pen_base + (dest[sx]&shadow_mask);
261                           else if (partial_shadow && pen==shadow_pen)
262                              dest[sx] = shadow_pen_base + (dest[sx]&shadow_mask);
263                           else
264                              dest[sx] = pen_base + pen;
265                        }
266                     }
267                     xcount -= width;
268                     sx+=dx;
269                  }
270               }
271            }
272            ycount -= height;
273            sy+=dy;
274         }
275         addr += pitch;
276      }
277   }
278   else
279   {
280      sy = y0;
281      for( y=height; y; y-- ){
282         ycount += screen_height;
283         while( ycount>=height ){
284            if( sy>=cliprect->min_y && sy<=cliprect->max_y ){
285               source = addr;
286               dest = BITMAP_ADDR16(bitmap, sy, 0);
287               pri = BITMAP_ADDR8(priority_bitmap, sy, 0);
288               sx = x0;
289               xcount = 0;
290               for( x=width; x; x-=2 ){
291                  data = (unsigned)*source++; /* next 2 pixels */
292                  pen = data>>4;
293                  if (pen==0xf) break;
294                  xcount += screen_width;
295                  while( xcount>=width )
296                  {
297                     if( pen && pen!=0xf && sx>=cliprect->min_x && sx<=cliprect->max_x )
298                        if(!(pri[sx]&priority)) dest[sx] = pen_base + pen;
299                     xcount -= width;
300                     sx+=dx;
301                  }
302                  pen = data&0xf;
303                  xcount += screen_width;
304                  while( xcount>=width )
305                  {
306                     if( pen && pen!=0xf && sx>=cliprect->min_x && sx<=cliprect->max_x )
307                        if(!(pri[sx]&priority)) dest[sx] = pen_base + pen;
308                     xcount -= width;
309                     sx+=dx;
310                  }
311               }
312            }
313            ycount -= height;
314            sy+=dy;
315         }
316         addr += pitch;
317      }
318   }
319}
320
321static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect, int b3d ) //*
322{
323   pen_t pen_base = machine->gfx[0]->color_base;
324   const UINT8 *base_gfx = memory_region(machine, "gfx2");
325   const int gfx_rom_size = memory_region_length(machine, "gfx2");
326   const UINT16 *source = sys16_spriteram;
327   struct sys16_sprite_attributes sprite;
328   int xpos, ypos, screen_width, width, logical_height, pitch, flipy, flipx;
329   int i, mod_h, mod_x, eos;
330   unsigned gfx;
331
332   memset(&sprite, 0x00, sizeof(sprite));
333
334   for(i=0; i<num_sprites; i++)
335   {
336      sprite.flags = 0;
337      if (sys16_spritesystem(&sprite, source, 0)) return; /* end-of-spritelist */
338      source += 8;
339
340      if( sprite.flags & SYS16_SPR_VISIBLE )
341      {
342         xpos = sprite.x;
343         flipx = sprite.flags & SYS16_SPR_FLIPX;
344         ypos = sprite.y;
345         pitch = sprite.pitch;
346         flipy = pitch & 0x80;
347         width = pitch & 0x7f;
348         if (pitch & 0x80) width = 0x80 - width;
349         pitch = width << 1;
350         width <<= 2;
351         eos = 0;
352
353         if( b3d ) // outrun/aburner
354         {
355            if (b3d == 2) eos = 1;
356            if (xpos < 0 && flipx) continue;
357            if (ypos >= 240) ypos -= 256;
358            sprite.screen_height++;
359            logical_height = (sprite.screen_height<<4)*sprite.zoomy/0x2000;
360            screen_width = width*0x200/sprite.zoomx;
361
362            if (flipx && flipy) { mod_h = -logical_height;   mod_x = 4; }
363            else if     (flipx) { mod_h = -1; xpos++;        mod_x = 4; }
364            else if     (flipy) { mod_h = -logical_height;   mod_x = 0; }
365            else                { mod_h = 0;                 mod_x = 0; }
366
367            if( sprite.flags & SYS16_SPR_DRAW_TO_TOP )
368            {
369               ypos -= sprite.screen_height;
370               flipy = !flipy;
371            }
372
373            if( sprite.flags & SYS16_SPR_DRAW_TO_LEFT )
374            {
375               xpos -= screen_width;
376               flipx = !flipx;
377            }
378         }
379         else
380         {
381            if (!width) { width = 512; eos = 1; } // used by fantasy zone for laser
382            screen_width = width;
383            logical_height = sprite.screen_height;
384
385            if (sprite.zoomy) logical_height = logical_height*(0x400 + sprite.zoomy)/0x400 - 1;
386            if (sprite.zoomx) screen_width = screen_width*(0x800 - sprite.zoomx)/0x800 + 2;
387
388// fix, 5-bit zoom field
389//              if (sprite.zoomy) logical_height = logical_height*(0x20 + sprite.zoomy)/0x20 - 1;
390//              if (sprite.zoomx) screen_width = screen_width*(0x40 - sprite.zoomx)/0x40 + 2;
391
392            if (flipx && flipy) { mod_h = -logical_height-1; mod_x = 2; }
393            else if     (flipx) { mod_h = 0;                 mod_x = 2; }
394            else if     (flipy) { mod_h = -logical_height;   mod_x = 0; }
395            else                { mod_h = 1;                 mod_x = 0; }
396         }
397
398         gfx = sprite.gfx + pitch * mod_h + mod_x;
399         if (gfx >= gfx_rom_size) gfx %= gfx_rom_size;
400
401         gfx &= 0x1fffff; // temp kludge to stop line of fire crashing
402
403         draw_sprite(machine,
404            bitmap,cliprect,
405            base_gfx + gfx, pitch,
406            pen_base + (sprite.color<<4),
407            xpos, ypos, screen_width, sprite.screen_height,
408            width, logical_height,
409            flipx, flipy,
410            sprite.priority,
411            sprite.flags,
412            sprite.shadow_pen, eos);
413      }
414   }
415}
416
417270/***************************************************************************/
418271
419272static TILEMAP_MAPPER( sys16_bg_map )
r5046r5047
458311static const int resistances_sh[6] = {3900, 2000, 1000, 1000/2, 1000/4, 470};
459312static double weights[2][3][6];
460313
314#if 0
461315WRITE16_HANDLER( sys16_paletteram_w )
462316{
463317   UINT16 newword;
r5046r5047
504358      palette_set_color( space->machine, offset+space->machine->config->total_colors/2,MAKE_RGB(rs,gs,bs));
505359   }
506360}
361#endif
507362
508
509363static void update_page( void ){
510364   int all_dirty = 0;
511365   int i,offset;
r5046r5047
564418   int data = source[tile_index%(64*32)];
565419   int tile_number = (data&0xfff) + 0x1000*((data&sys16_tilebank_switch)?sys16_tile_bank1:sys16_tile_bank0);
566420
567   if (!shinobl_kludge)
568   {
569      SET_TILE_INFO(
570            0,
571            tile_number,
572            (data>>6)&0x7f,
573            0);
574   }
575   else
576   {
577      SET_TILE_INFO(
578            0,
579            tile_number,
580            (data>>5)&0x7f,
581            0);
582   }
583
584   switch(sys16_bg_priority_mode) {
585   case 1: // Alien Syndrome
586      tileinfo->category = (data&0x8000)?1:0;
587      break;
588   case 2: // Body Slam / wrestwar
589      tileinfo->category = ((data&0xff00) >= sys16_bg_priority_value)?1:0;
590      break;
591   case 3: // sys18 games
592      if( data&0x8000 ){
593         tileinfo->category = 2;
594      }
595      else {
596         tileinfo->category = ((data&0xff00) >= sys16_bg_priority_value)?1:0;
597      }
598      break;
599   }
421   SET_TILE_INFO(
422         0,
423         tile_number,
424         (data>>6)&0x7f,
425         0);
600426}
601427
602428static TILE_GET_INFO( get_fg_tile_info ){
r5046r5047
604430   int data = source[tile_index%(64*32)];
605431   int tile_number = (data&0xfff) + 0x1000*((data&sys16_tilebank_switch)?sys16_tile_bank1:sys16_tile_bank0);
606432
607   if (!shinobl_kludge)
608   {
609      SET_TILE_INFO(
610            0,
611            tile_number,
612            (data>>6)&0x7f,
613            0);
614   }
615   else
616   {
617      SET_TILE_INFO(
618            0,
619            tile_number,
620            (data>>5)&0x7f,
621            0);
622   }
623
624   switch(sys16_fg_priority_mode){
625   case 1: // alien syndrome
626      tileinfo->category = (data&0x8000)?1:0;
627      break;
628
629   case 3:
630      tileinfo->category = ((data&0xff00) >= sys16_fg_priority_value)?1:0;
631      break;
632
633   default:
634      if( sys16_fg_priority_mode>=0 ){
635         tileinfo->category = (data&0x8000)?1:0;
636      }
637      break;
638   }
433   SET_TILE_INFO(
434         0,
435         tile_number,
436         (data>>6)&0x7f,
437         0);
639438}
640439
641440static TILE_GET_INFO( get_bg2_tile_info ){
r5046r5047
648447         tile_number,
649448         (data>>6)&0x7f,
650449         0);
651
652   tileinfo->category = 0;
653450}
654451
655452static TILE_GET_INFO( get_fg2_tile_info ){
r5046r5047
662459         tile_number,
663460         (data>>6)&0x7f,
664461         0);
665
666   if((data&0xff00) >= sys16_fg_priority_value) tileinfo->category = 1;
667   else tileinfo->category = 0;
668462}
669463
670464WRITE16_HANDLER( sys16_tileram_w ){
r5046r5047
735529
736530/***************************************************************************/
737531
738VIDEO_START( system16 ){
739   static const int bank_default[16] = {
740      0x0,0x1,0x2,0x3,
741      0x4,0x5,0x6,0x7,
742      0x8,0x9,0xa,0xb,
743      0xc,0xd,0xe,0xf
744   };
745   if (!sys16_obj_bank)
746      sys16_obj_bank = bank_default;
532VIDEO_START( system16 )
533{
534   setup_system16_bootleg_video(machine);
747535
748536   /* Normal colors */
749537   compute_resistor_weights(0, 255, -1.0,
r5046r5047
807595      sys16_refreshenable = 1;
808596
809597      /* common defaults */
810      sys16_spritesystem = sys16_sprite_shinobi;
811      if (!sys16_sprxoffset)
812         sys16_sprxoffset = -0xb8;
598
813599      sys16_bgxoffset = 0;
814600      sys16_bg_priority_mode=0;
815601      sys16_fg_priority_mode=0;
r5046r5047
823609
824610      sys16_18_mode=0;
825611   }
612
613   segaic16_palette_init(0x800);
614   segaic16_sprites_init(machine, 0, SEGAIC16_SPRITES_16B, 0x400,system16_bootleg_sprite_xoffs);
615   setup_system16_bootleg_spritebanking(machine);
616
617
826618}
827619
828620VIDEO_START( system18old )
829621{
622   VIDEO_START_CALL(system16);
623
830624   sys16_bg1_trans=1;
831625
832626   background2 = tilemap_create(machine,
r5046r5047
843637      8,8,
844638      64*2,32*2 );
845639
846   VIDEO_START_CALL(system16);
847640
848641   tilemap_set_transparent_pen( foreground2, 0 );
849642
r5046r5047
866659   sys16_fg_priority_mode=3;
867660   sys16_bg_priority_value=0x1800;
868661   sys16_fg_priority_value=0x2000;
662
663
869664}
870665
871666
r5046r5047
972767
973768VIDEO_START( system16a_bootleg )
974769{
770   setup_system16_bootleg_video(machine);
771
975772   /* Normal colors */
976773   compute_resistor_weights(0, 255, -1.0,
977774      6, resistances_normal, weights[0][0], 0, 0,
r5046r5047
998795   tilemap_set_transparent_pen( system16a_bootleg_bg_tilemaps[0], 0 );
999796   tilemap_set_transparent_pen( system16a_bootleg_bg_tilemaps[1], 0 );
1000797
798   segaic16_palette_init(0x800);
1001799
1002800}
1003801
802VIDEO_START( system16a_bootleg_wb3bl )
803{
804   VIDEO_START_CALL(system16a_bootleg);
805   segaic16_sprites_init(machine, 0, SEGAIC16_SPRITES_16A_BOOTLEG_WB3BL, 0x400, system16_bootleg_sprite_xoffs);
806   setup_system16_bootleg_spritebanking(machine);
807}
808
809VIDEO_START( system16a_bootleg_shinobi )
810{
811   VIDEO_START_CALL(system16a_bootleg);
812   segaic16_sprites_init(machine, 0, SEGAIC16_SPRITES_16A_BOOTLEG_SHINOBLD, 0x400, system16_bootleg_sprite_xoffs);
813   setup_system16_bootleg_spritebanking(machine);
814}
815
816VIDEO_START( system16a_bootleg_passsht )
817{
818   VIDEO_START_CALL(system16a_bootleg);
819   segaic16_sprites_init(machine, 0, SEGAIC16_SPRITES_16A_BOOTLEG_PASSHTBL, 0x400, system16_bootleg_sprite_xoffs);
820   setup_system16_bootleg_spritebanking(machine);
821}
822
1004823// Passing Shot (2 player), Shinobi (Datsu), Wonderboy 3
1005824VIDEO_UPDATE( system16a_bootleg )
1006825{
r5046r5047
1027846   if ((system16a_bootleg_tilemapselect&0xff) == 0x12)
1028847   {
1029848      tilemap_set_scrollx( system16a_bootleg_bg_tilemaps[1], 0, system16a_bootleg_bgscrollx+offset_bg1x );
1030      tilemap_set_scrolly( system16a_bootleg_bg_tilemaps[1], 0, system16a_bootleg_bgscrolly+offset_bg1y );
849      tilemap_set_scrolly( system16a_bootleg_bg_tilemaps[1], 0, system16a_bootleg_bgscrolly+offset_bg1y+system16_bootleg_back_tilemap_yscroll );
1031850      tilemap_set_scrollx( system16a_bootleg_bg_tilemaps[0], 0, system16a_bootleg_fgscrollx+offset_bg0x );
1032      tilemap_set_scrolly( system16a_bootleg_bg_tilemaps[0], 0, system16a_bootleg_fgscrolly+offset_bg0y );
851      tilemap_set_scrolly( system16a_bootleg_bg_tilemaps[0], 0, system16a_bootleg_fgscrolly+offset_bg0y+system16_bootleg_fore_tilemap_yscroll );
1033852
1034853      tilemap_draw( bitmap,cliprect, system16a_bootleg_bg_tilemaps[0], TILEMAP_DRAW_OPAQUE, 0 );
1035854      tilemap_draw( bitmap,cliprect, system16a_bootleg_bg_tilemaps[1], 0, 0 );
855
856      tilemap_set_scrolly( system16a_bootleg_text_tilemap, 0, system16_bootleg_text_tilemap_yscroll );
857
1036858      tilemap_draw( bitmap,cliprect, system16a_bootleg_text_tilemap, 0, 0 );
1037859   }
1038860   else if ((system16a_bootleg_tilemapselect&0xff) == 0x21)
1039861   {
1040862      tilemap_set_scrollx( system16a_bootleg_bg_tilemaps[0], 0, system16a_bootleg_bgscrollx+187 );
1041      tilemap_set_scrolly( system16a_bootleg_bg_tilemaps[0], 0, system16a_bootleg_bgscrolly );
863      tilemap_set_scrolly( system16a_bootleg_bg_tilemaps[0], 0, system16a_bootleg_bgscrolly+system16_bootleg_back_tilemap_yscroll );
1042864      tilemap_set_scrollx( system16a_bootleg_bg_tilemaps[1], 0, system16a_bootleg_fgscrollx+187 );
1043      tilemap_set_scrolly( system16a_bootleg_bg_tilemaps[1], 0, system16a_bootleg_fgscrolly+1 );
865      tilemap_set_scrolly( system16a_bootleg_bg_tilemaps[1], 0, system16a_bootleg_fgscrolly+1+system16_bootleg_fore_tilemap_yscroll );
1044866
1045867      tilemap_draw( bitmap,cliprect, system16a_bootleg_bg_tilemaps[1], TILEMAP_DRAW_OPAQUE, 0 );
1046868      tilemap_draw( bitmap,cliprect, system16a_bootleg_bg_tilemaps[0], 0, 0 );
869
870      tilemap_set_scrolly( system16a_bootleg_text_tilemap, 0, system16_bootleg_text_tilemap_yscroll );
871
1047872      tilemap_draw( bitmap,cliprect, system16a_bootleg_text_tilemap, 0, 0 );
1048873   }
1049874
875   /* draw the sprites */
876   segaic16_sprites_draw(screen, bitmap, cliprect, 0);
877
1050878   return 0;
1051879}
1052880
r5046r5047
1085913      tilemap_draw( bitmap,cliprect, system16a_bootleg_text_tilemap, 0, 0 );
1086914   }
1087915
916   /* draw the sprites */
917   segaic16_sprites_draw(screen, bitmap, cliprect, 0);
918
1088919   return 0;
1089920}
1090921
r5046r5047
1103934
1104935   bitmap_fill(priority_bitmap,cliprect,0);
1105936
1106   // draw bg
1107   {
1108      tilemap_set_scrollx( background, 0, -320-sys16_bg_scrollx+sys16_bgxoffset );
1109      tilemap_set_scrolly( background, 0, -256+sys16_bg_scrolly );
937   tilemap_set_scrollx( background, 0, -320-sys16_bg_scrollx+sys16_bgxoffset );
938   tilemap_set_scrolly( background, 0, -256+sys16_bg_scrolly+system16_bootleg_back_tilemap_yscroll );
939   tilemap_set_scrollx( foreground, 0, -320-sys16_fg_scrollx+sys16_fgxoffset );
940   tilemap_set_scrolly( foreground, 0, -256+sys16_fg_scrolly+system16_bootleg_fore_tilemap_yscroll );
1110941
1111      tilemap_draw( bitmap,cliprect, background, TILEMAP_DRAW_OPAQUE, 0x00 );
942   tilemap_set_scrollx( text_layer, 0, 0 );
943   tilemap_set_scrolly( text_layer, 0, 0+system16_bootleg_text_tilemap_yscroll );
1112944
1113      if(sys16_bg_priority_mode)
1114      {
1115         tilemap_draw( bitmap,cliprect, background, TILEMAP_DRAW_OPAQUE | 1, 0x00 );
1116      }
945   tilemap_draw( bitmap,cliprect, background, TILEMAP_DRAW_OPAQUE, 0x00 );
1117946
1118      if( sys16_bg_priority_mode==2 )
1119      {
1120         tilemap_draw( bitmap,cliprect, background, 1, 0x01 );// body slam (& wrestwar??)
1121      }
1122      else if ( sys16_bg_priority_mode==1 )
1123      {
1124         tilemap_draw( bitmap,cliprect, background, 1, 0x03 );// alien syndrome / aurail
1125      }
1126   }
947   /* Background */
1127948
1128   // draw fg
949   if(sys16_bg_priority_mode)
1129950   {
1130      tilemap_set_scrollx( foreground, 0, -320-sys16_fg_scrollx+sys16_fgxoffset );
1131      tilemap_set_scrolly( foreground, 0, -256+sys16_fg_scrolly );
951      tilemap_draw( bitmap,cliprect, background, TILEMAP_DRAW_OPAQUE | 1, 0x00 );
952   }
1132953
1133      tilemap_draw( bitmap,cliprect, foreground, 0, 0x03 );
1134      tilemap_draw( bitmap,cliprect, foreground, 1, 0x07 );
954   if( sys16_bg_priority_mode==2 )
955   {
956      tilemap_draw( bitmap,cliprect, background, 1, 0x01 );// body slam (& wrestwar??)
1135957   }
958   else if ( sys16_bg_priority_mode==1 )
959   {
960      tilemap_draw( bitmap,cliprect, background, 1, 0x03 );// alien syndrome / aurail
961   }
1136962
963   /* Foreground */
1137964
965   tilemap_draw( bitmap,cliprect, foreground, 0, 0x03 );
966   tilemap_draw( bitmap,cliprect, foreground, 1, 0x07 );
967
968
969   /* Text Layer */
970
1138971   if( sys16_textlayer_lo_max!=0 )
1139972   {
1140973      tilemap_draw( bitmap,cliprect, text_layer, 1, 7 );// needed for Body Slam
r5046r5047
1142975
1143976   tilemap_draw( bitmap,cliprect, text_layer, 0, 0xf );
1144977
1145   draw_sprites(screen->machine, bitmap,cliprect,0 );
978   //draw_sprites(screen->machine, bitmap,cliprect,0 );
979
980   /* draw the sprites */
981   segaic16_sprites_draw(screen, bitmap, cliprect, 0);
1146982   return 0;
1147983}
1148984
r5046r5047
11861022   tilemap_draw( bitmap,cliprect, text_layer, 1, 0x7 );
11871023   tilemap_draw( bitmap,cliprect, text_layer, 0, 0xf );
11881024
1189   draw_sprites(screen->machine, bitmap,cliprect, 0 );
1025   /* draw the sprites */
1026   segaic16_sprites_draw(screen, bitmap, cliprect, 0);
1027
11901028   return 0;
11911029}
src/mame/video/btime.c
r5046r5047
1919UINT8 *bnj_backgroundram;
2020UINT8 *zoar_scrollram;
2121UINT8 *deco_charram;
22UINT8 *progolf_fg_fb;
2223size_t bnj_backgroundram_size;
2324
2425static UINT8 btime_palette = 0;
r5046r5047
402403      offs_t offs;
403404        offs_t tileoffset = tmap[i & 3] * 0x100;
404405
405        // Skip if this title is completely off the screen
406        // Skip if this tile is completely off the screen
406407        if (scroll > 256)  break;
407408        if (scroll < -256) continue;
408409
r5046r5047
585586
586587   return 0;
587588}
588
589
590VIDEO_UPDATE( progolf )
591{
592   draw_chars(screen->machine, bitmap, cliprect, TRANSPARENCY_NONE, /*btime_palette*/0, -1);
593//  draw_sprites(screen->machine, bitmap, cliprect, 0/*btime_palette*/, 0, 0, spriteram, 1);
594
595   return 0;
596}
src/mame/video/cosmic.c
r5046r5047
344344            // flip-flop at IC11 is clocked
345345            map = PROM[(x1 >> 5) | (y >> 1 << 3)];
346346
347         if ((!(hc & va) & (vb ^ hb_)) &&         /* right network */
347         if (((!(hc & va)) & (vb ^ hb_)) &&         /* right network */
348348             (((x1 ^ map) & (hc | 0x1e)) == 0x1e))   /* left network */
349349         {
350350            /* RGB order is reversed -- bit 7=R, 6=G, 5=B */
r5046r5047
482482         int hc_ = (x >> 6) & 0x01;
483483         int hd_ =  x >> 7;
484484
485         if ((!vb_ & vc_ & !vd_) ^ (vb_ & !vc_ & vd_))
485         if (((!vb_) & vc_ & (!vd_)) ^ (vb_ & (!vc_) & vd_))
486486         {
487487            /* tree */
488            if (!hd_ & hc_ & !hb_)
488            if ((!hd_) & hc_ & (!hb_))
489489            {
490490               offs_t offs = ((x >> 3) & 0x03) | ((y & 0x1f) << 2) |
491491                             (flip_screen_get(screen->machine) ? 0x80 : 0);
r5046r5047
516516
517517               color = ( plane1 & plane2)      |   // R
518518                       ( plane1 | plane2) << 1 |   // G
519                       (!plane1 & hd)     << 2;    // B - see above
519                       ((!plane1) & hd)     << 2;    // B - see above
520520            }
521521         }
522522
src/mame/video/segaic16.c
r5046r5047
20162016   {
20172017      int bottom  = data[0] >> 8;
20182018      int top     = data[0] & 0xff;
2019      int xpos    = (data[1] & 0x1ff) - 0xb8;
2019      int xpos    = (data[1] & 0x1ff);
20202020      int hide    = data[2] & 0x4000;
20212021      int flip    = data[2] & 0x100;
20222022      int pitch   = (INT8)(data[2] & 0xff);
r5046r5047
20292029      const UINT16 *spritedata;
20302030      int x, y, pix, xdelta = 1;
20312031
2032      /* some bootlegs have offset sprites */
2033      xpos += info->xoffs;
2034      xpos &= 0x1ff;
2035
2036      /* originals all have this offset */
2037      xpos -= 0xb8;
2038
20322039      /* initialize the end address to the start address */
20332040      data[7] = addr;
20342041
r5046r5047
26512658   }
26522659}
26532660
2661/* bootlegs */
26542662
2663/*
26552664
2665 the system16a bootleg sprite hardware differs in subtle ways on a per game basis
2666 with each game having the words swapped around.
2667
2668 there are also some subtle, but important changes when compared to the original
2669 system16a sprites, mainly the increment of the address not happening until
2670 the end of the loop
2671
2672*/
2673
2674/* ignores the sprite priority until we understand priority better on the bootlegs */
2675#define system16a_bootleg_draw_pixel()                                    \
2676   /* only draw if onscreen, not 0 or 15 */                        \
2677   if (x >= cliprect->min_x && x <= cliprect->max_x && pix != 0 && pix != 15) \
2678   {                                                      \
2679      /* are we high enough priority to be visible? */               \
2680      if (sprpri || 1)                                    \
2681      {                                                   \
2682         /* shadow/hilight mode? */                              \
2683         if (color == info->colorbase + (0x3f << 4))                  \
2684            dest[x] += (paletteram16[dest[x]] & 0x8000) ? palette.entries*2 : palette.entries;   \
2685                                                         \
2686         /* regular draw */                                    \
2687         else                                             \
2688            dest[x] = pix | color;                              \
2689      }                                                   \
2690                                                         \
2691      /* always mark priority so no one else draws here */            \
2692      pri[x] = 0xff;                                          \
2693   }                                                      \
2694
2695
2696/* make this an actual function */
2697#define system16a_bootleg_draw_core()                                       \
2698   {                                                               \
2699      const UINT16 *spritedata;                                           \
2700      int x, y, pix, xdelta = 1;                                           \
2701                                                                  \
2702      xpos += info->xoffs;                                             \
2703      xpos &= 0x1ff;                                                   \
2704                                                                  \
2705      xpos -= 0xbd;                                                   \
2706                                                                  \
2707      /* initialize the end address to the start address */                     \
2708      data[7] = addr;                                                \
2709                                                                  \
2710      /* if hidden, or top greater than/equal to bottom, or invalid bank, punt */      \
2711      if ((top >= bottom) || bank == 255)                                    \
2712         continue;                                                   \
2713                                                                  \
2714      /* clamp to within the memory region size */                           \
2715      if (numbanks)                                                   \
2716         bank %= numbanks;                                             \
2717      spritedata = spritebase + 0x8000 * bank;                              \
2718                                                                  \
2719      /* adjust positions for screen flipping */                              \
2720      if (info->flip)                                                   \
2721      {                                                            \
2722         int temp = top;                                                \
2723         top = 224 - bottom;                                             \
2724         bottom = 224 - temp;                                          \
2725         xpos = 320 - xpos;                                             \
2726         xdelta = -1;                                                \
2727      }                                                            \
2728                                                                  \
2729      /* loop from top to bottom */                                       \
2730      for (y = top; y < bottom; y++)                                       \
2731      {                                                            \
2732                                                                  \
2733         /* skip drawing if not within the cliprect */                        \
2734         if (y >= cliprect->min_y && y <= cliprect->max_y)                     \
2735         {                                                         \
2736            UINT16 *dest = BITMAP_ADDR16(bitmap, y, 0);                        \
2737            UINT8 *pri = BITMAP_ADDR8(priority_bitmap, y, 0);                  \
2738                                                                  \
2739            /* note that the System 16A sprites have a design flaw that allows the address */      \
2740            /* to carry into the flip flag, which is the topmost bit -- it is very important */      \
2741            /* to emulate this as the games compensate for it */                           \
2742                                                                              \
2743            /* non-flipped case */                                                   \
2744            if (!(addr & 0x8000))                                                   \
2745            {                                                                  \
2746               /* start at the word before because we preincrement below */                  \
2747               data[7] = addr - 1;                                                \
2748               for (x = xpos; ((xpos - x) & 0x1ff) != 1; )                                 \
2749               {                                                               \
2750                  UINT16 pixels = spritedata[++data[7] & 0x7fff];                           \
2751                                                                              \
2752                  /* draw four pixels */                                             \
2753                  pix = (pixels >> 12) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta;      \
2754                  pix = (pixels >>  8) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta;      \
2755                  pix = (pixels >>  4) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta;      \
2756                  pix = (pixels >>  0) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta;      \
2757                                                                              \
2758                  /* stop if the last pixel in the group was 0xf */                        \
2759                  if (pix == 15)                                                   \
2760                     break;                                                      \
2761               }                                                               \
2762            }                                                                  \
2763                                                                              \
2764            /* flipped case */                                                      \
2765            else                                                               \
2766            {                                                                  \
2767               /* start at the word after because we predecrement below */                     \
2768               data[7] = addr + 1;                                                   \
2769               for (x = xpos; ((xpos - x) & 0x1ff) != 1; )                                 \
2770               {                                                               \
2771                  UINT16 pixels = spritedata[--data[7] & 0x7fff];                           \
2772                                                                              \
2773                  /* draw four pixels */                                             \
2774                  pix = (pixels >>  0) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta;      \
2775                  pix = (pixels >>  4) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta;      \
2776                  pix = (pixels >>  8) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta;      \
2777                  pix = (pixels >> 12) & 0xf; system16a_bootleg_draw_pixel(); x += xdelta;      \
2778                                                                              \
2779                  /* stop if the last pixel in the group was 0xf */                        \
2780                  if (pix == 15)                                                   \
2781                     break;                                                      \
2782               }                                                               \
2783            }                                                                  \
2784         }                                                                     \
2785                                                                              \
2786         /* advance a row - must be done at the end on the bootlegs! */                        \
2787         addr += pitch;                                                            \
2788      }                                                                        \
2789   }                                                                           \
2790
2791
2792
2793static void segaic16_sprites_16a_bootleg_wb3bl_draw(running_machine *machine, struct sprite_info *info, bitmap_t *bitmap, const rectangle *cliprect)
2794{
2795   UINT8 numbanks = memory_region_length(machine, "gfx2") / 0x10000;
2796   const UINT16 *spritebase = (const UINT16 *)memory_region(machine, "gfx2");
2797   UINT16 *data;
2798
2799   for (data = info->spriteram; data < info->spriteram+ info->ramsize/2; data += 8)
2800   {
2801      int bottom  = (data[4] >> 8);
2802      int top     = (data[4] & 0xff);
2803      int xpos    = (data[0]);
2804      int pitch   = (INT16)data[5];
2805      UINT16 addr = data[1];
2806      int color   = info->colorbase + (((data[6] >> 8) & 0x3f) << 4);
2807      int bank    = info->bank[(data[6] >> 4) & 0x7];
2808      int sprpri  = 1 << ((data[6] >> 0) & 0x3);
2809
2810      system16a_bootleg_draw_core();
2811   }
2812}
2813
2814/* 4 player passing shot is different to this.. */
2815static void segaic16_sprites_16a_bootleg_passhtb_draw(running_machine *machine, struct sprite_info *info, bitmap_t *bitmap, const rectangle *cliprect)
2816{
2817UINT8 numbanks = memory_region_length(machine, "gfx2") / 0x10000;
2818   const UINT16 *spritebase = (const UINT16 *)memory_region(machine, "gfx2");
2819   UINT16 *data;
2820
2821   for (data = info->spriteram; data < info->spriteram+ info->ramsize/2; data += 8)
2822   {
2823      int bottom  = (data[1] >> 8)-1;
2824      int top     = (data[1] & 0xff)-1;
2825      int xpos    = (data[0]);
2826      int pitch   = (INT16)data[3];
2827      UINT16 addr = data[2];
2828      int color   = info->colorbase + (((data[5] >> 8) & 0x3f) << 4);
2829      int bank    = info->bank[(data[5] >> 4) & 0x7];
2830      int sprpri  = 1 << ((data[5] >> 0) & 0x3);
2831
2832      system16a_bootleg_draw_core();
2833   }
2834}
2835
2836static void segaic16_sprites_16a_bootleg_shinobld_draw(running_machine *machine, struct sprite_info *info, bitmap_t *bitmap, const rectangle *cliprect)
2837{
2838   UINT8 numbanks = memory_region_length(machine, "gfx2") / 0x10000;
2839   const UINT16 *spritebase = (const UINT16 *)memory_region(machine, "gfx2");
2840   UINT16 *data;
2841
2842   for (data = info->spriteram; data < info->spriteram+ info->ramsize/2; data += 8)
2843   {
2844      int bottom  = (data[0] >> 8)-1;
2845      int top     = (data[0] & 0xff)-1;
2846      int xpos    = (data[1]);
2847      int pitch   = (INT16)data[2];
2848      UINT16 addr = data[3];
2849      int color   = info->colorbase + (((data[4] >> 8) & 0x3f) << 4);
2850      int bank    = info->bank[(data[4] >> 4) & 0x7];
2851      int sprpri  = 1 << ((data[4] >> 0) & 0x3);
2852
2853      system16a_bootleg_draw_core();
2854   }
2855}
2856
26562857/*************************************
26572858 *
26582859 *  General sprite initialization
r5046r5047
26712872   for (i = 0; i < 16; i++)
26722873      info->bank[i] = i;
26732874   info->colorbase = colorbase;
2875
2876   /* some bootlegs have offset sprites */
26742877   info->xoffs = xoffs;
26752878
26762879   /* set up based on which sprite system */
r5046r5047
27282931         info->ramsize = 0x800;
27292932         break;
27302933
2934      case SEGAIC16_SPRITES_16A_BOOTLEG_WB3BL:
2935         info->draw = segaic16_sprites_16a_bootleg_wb3bl_draw;
2936         info->ramsize = 0x800;
2937         break;
2938
2939      case SEGAIC16_SPRITES_16A_BOOTLEG_PASSHTBL:
2940         info->draw = segaic16_sprites_16a_bootleg_passhtb_draw;
2941         info->ramsize = 0x800;
2942         break;
2943
2944      case SEGAIC16_SPRITES_16A_BOOTLEG_SHINOBLD:
2945         info->draw = segaic16_sprites_16a_bootleg_shinobld_draw;
2946         info->ramsize = 0x800;
2947         break;
2948
27312949      default:
27322950         fatalerror("Invalid sprite system specified in segaic16_sprites_init");
27332951   }
r5046r5047
27412959   state_save_register_item_array(machine, "segaic16_sp", NULL, which, info->bank);
27422960   state_save_register_item(machine, "segaic16_sp", NULL, which, info->colorbase);
27432961   state_save_register_item(machine, "segaic16_sp", NULL, which, info->xoffs);
2962
27442963   if (buffer)
27452964      state_save_register_item_pointer(machine, "segaic16_sp", NULL, which, ((UINT8 *) info->buffer), info->ramsize);
27462965}
src/mame/video/segaic16.h
r5046r5047
5454#define SEGAIC16_SPRITES_XBOARD      5
5555#define SEGAIC16_SPRITES_YBOARD      6
5656#define SEGAIC16_SPRITES_YBOARD_16B   7
57#define SEGAIC16_SPRITES_16A_BOOTLEG_WB3BL 8
58#define SEGAIC16_SPRITES_16A_BOOTLEG_PASSHTBL 9
59#define SEGAIC16_SPRITES_16A_BOOTLEG_SHINOBLD 10
5760
5861void segaic16_sprites_init(running_machine *machine, int which, int type, int colorbase, int xoffs);
5962void segaic16_sprites_draw(const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect, int which);
src/mame/video/qix.c
r5046r5047
3131
3232static MC6845_BEGIN_UPDATE( begin_update );
3333static MC6845_UPDATE_ROW( update_row );
34static MC6845_ON_DE_CHANGED( display_enable_changed );
34static WRITE_LINE_DEVICE_HANDLER( display_enable_changed );
3535
3636
3737
r5046r5047
6363 *
6464 *************************************/
6565
66static MC6845_ON_DE_CHANGED( display_enable_changed )
66static WRITE_LINE_DEVICE_HANDLER( display_enable_changed )
6767{
68   qix_state *state = (qix_state *)device->machine->driver_data;
68   qix_state *driver_state = (qix_state *)device->machine->driver_data;
6969
7070   /* on the rising edge, latch the scanline */
71   if (display_enabled)
71   if (state)
7272   {
7373      UINT16 ma = mc6845_get_ma(device);
7474      UINT8 ra = mc6845_get_ra(device);
7575
7676      /* RA0-RA2 goes to D0-D2 and MA5-MA9 goes to D3-D7 */
77      *state->scanline_latch = ((ma >> 2) & 0xf8) | (ra & 0x07);
77      *driver_state->scanline_latch = ((ma >> 2) & 0xf8) | (ra & 0x07);
7878   }
7979}
8080
r5046r5047
427427
428428static const mc6845_interface mc6845_intf =
429429{
430   "screen",            /* screen we are acting on */
431   8,                  /* number of pixels per video memory address */
432   begin_update,         /* before pixel update callback */
433   update_row,            /* row update callback */
434   NULL,               /* after pixel update callback */
435   display_enable_changed,   /* callback for display state changes */
436   NULL,               /* HSYNC callback */
437   qix_vsync_changed      /* VSYNC callback */
430   "screen",                     /* screen we are acting on */
431   8,                           /* number of pixels per video memory address */
432   begin_update,                  /* before pixel update callback */
433   update_row,                     /* row update callback */
434   NULL,                        /* after pixel update callback */
435   DEVCB_LINE(display_enable_changed),   /* callback for display state changes */
436   DEVCB_NULL,                     /* callback for cursor state changes */
437   DEVCB_NULL,                     /* HSYNC callback */
438   DEVCB_LINE(qix_vsync_changed),      /* VSYNC callback */
439   NULL                        /* update address callback */
438440};
439441
440442
src/mame/video/galaxold.c
r5046r5047
403403   }
404404}
405405
406
406/* swapped r/g/b hook-up */
407407PALETTE_INIT( dambustr )
408408{
409409   int base = BACKGROUND_COLOR_BASE;
410   int i;
410   int i, len;
411411
412   PALETTE_INIT_CALL(galaxold);
412   /* first, the character/sprite palette */
413   len = memory_region_length(machine, "proms");
413414
415   for (i = 0;i < len;i++)
416   {
417      int bit0,bit1,bit2,r,g,b;
414418
419      /* red component */
420      bit0 = BIT(*color_prom,0);
421      bit1 = BIT(*color_prom,1);
422      bit2 = BIT(*color_prom,2);
423      b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
424      /* green component */
425      bit0 = BIT(*color_prom,3);
426      bit1 = BIT(*color_prom,4);
427      bit2 = BIT(*color_prom,5);
428      r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
429      /* blue component */
430      bit0 = BIT(*color_prom,6);
431      bit1 = BIT(*color_prom,7);
432      g = 0x4f * bit0 + 0xa8 * bit1;
433
434      palette_set_color_rgb(machine,i,r,g,b);
435      color_prom++;
436   }
437
438
439   galaxold_init_stars(machine, STARS_COLOR_BASE);
440
441
442   /* bullets - yellow and white */
443   palette_set_color(machine,BULLETS_COLOR_BASE+0,MAKE_RGB(0xef,0xef,0x00));
444   palette_set_color(machine,BULLETS_COLOR_BASE+1,MAKE_RGB(0xef,0xef,0xef));
445
415446   /*
416447    Assumption (not clear from the schematics):
417448    The background color generator is connected this way:
src/mame/video/liberate.c
r5046r5047
1515static int background_color, background_disable;
1616static tilemap *background_tilemap, *fix_tilemap;
1717static UINT8 deco16_io_ram[16];
18extern UINT8 *prosoccr_charram;
19extern UINT8 *prosport_bg_vram;
1820
1921#if 0
2022void debug_print(bitmap_t *bitmap)
r5046r5047
7072{
7173   int tile, color;
7274
73   tile = videoram[tile_index + 0x400] + ((videoram[tile_index] & 0x7) << 8);
74   color = (videoram[tile_index] & 0x70) >> 4;
75   tile = videoram[tile_index] + ((colorram[tile_index] & 0x7) << 8);
76   color = (colorram[tile_index] & 0x70) >> 4;
7577
7678//if (tile & 0x300) tile -= 0x000;
7779//else if(tile & 0x200) tile -= 0x100;
r5046r5047
113115   }
114116}
115117
118WRITE8_HANDLER( prosoccr_io_w )
119{
120   deco16_io_ram[offset] = data;
121   if (offset > 1 && offset < 6)
122      tilemap_mark_all_tiles_dirty(background_tilemap);
123
124//  popmessage("%02x %02x",deco16_io_ram[6],deco16_io_ram[7]);
125
126   switch (offset)
127   {
128      case 6: /* unused here */
129         break;
130      case 7:
131         background_disable = ~data & 0x10;
132         //sprite_priority = (data & 0x80)>>7;
133         /* -x-- --xx used during gameplay */
134         /* x--- ---- used on the attract mode */
135         break;
136      case 8: /* Irq ack */
137         cputag_set_input_line(space->machine, "maincpu", DECO16_IRQ_LINE, CLEAR_LINE);
138         break;
139      case 9: /* Sound */
140         soundlatch_w(space, 0, data);
141         cputag_set_input_line(space->machine, "audiocpu", M6502_IRQ_LINE, HOLD_LINE);
142         break;
143   }
144}
145
146/* completely different i/o...*/
147WRITE8_HANDLER( prosport_io_w )
148{
149   deco16_io_ram[offset] = data;
150
151   switch (offset)
152   {
153      case 0:
154         //background_disable = ~data & 0x80;
155         break;
156      case 2: /* Sound */
157         soundlatch_w(space, 0, data);
158         cputag_set_input_line(space->machine, "audiocpu", M6502_IRQ_LINE, HOLD_LINE);
159         break;
160      case 4: /* Irq ack */
161         cputag_set_input_line(space->machine, "maincpu", DECO16_IRQ_LINE, CLEAR_LINE);
162         break;
163   }
164}
165
116166WRITE8_HANDLER( liberate_videoram_w )
117167{
118168   videoram[offset] = data;
119   tilemap_mark_tile_dirty(fix_tilemap, offset & 0x3ff);
169   tilemap_mark_tile_dirty(fix_tilemap, offset);
120170}
121171
172WRITE8_HANDLER( liberate_colorram_w )
173{
174   colorram[offset] = data;
175   tilemap_mark_tile_dirty(fix_tilemap, offset);
176}
177
122178/***************************************************************************/
123179
124180VIDEO_START( prosoccr )
r5046r5047
127183   fix_tilemap = tilemap_create(machine, get_fix_tile_info,fix_scan,8,8,32,32);
128184
129185   tilemap_set_transparent_pen(fix_tilemap,0);
186
187   prosoccr_charram = auto_alloc_array(machine, UINT8, 0x1800*2);
188
130189}
131190
132191VIDEO_START( boomrang )
r5046r5047
150209
151210WRITE8_HANDLER( prosport_paletteram_w )
152211{
212   paletteram[offset] = data;
213
153214   /* RGB output is inverted */
154   paletteram_BBGGGRRR_w(space,offset,~data);
215   palette_set_color_rgb(space->machine, offset, pal3bit(~data >> 0), pal3bit(~data >> 3), pal2bit(~data >> 6));
155216}
156217
157218PALETTE_INIT( liberate )
r5046r5047
191252   int offs;
192253
193254   /* Sprites */
194   for (offs = 0;offs < 0x800;offs += 4)
255   for (offs = 0x000;offs < 0x800;offs += 4)
195256   {
196257      int multi,fx,fy,sx,sy,sy2,code,color;
197258
r5046r5047
256317
257318static void prosport_draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
258319{
259   int offs,multi,fx,fy,sx,sy,sy2,code,code2,color;
320   int offs,multi,fx,fy,sx,sy,sy2,code,code2,color,gfx_region;
260321
261322   for (offs = 0x000;offs < 0x800;offs += 4)
262323   {
263   //  if ((spriteram[offs+0]&1)!=1) continue;
324        if ((spriteram[offs+0]&1)!=1) continue;
264325
265326      code = spriteram[offs+1] + ((spriteram[offs+0]&0x3)<<8);
266327      code2=code+1;
267328
329      if(deco16_io_ram[0]&0x40) //dynamic ram-based gfxs for Pro Golf
330         gfx_region = 3+4;
331      else
332         gfx_region = ((deco16_io_ram[0]&0x30)>>4)+4;
333
334
268335      multi = spriteram[offs+0] & 0x10;
269336
270337      sy=spriteram[offs+2];
r5046r5047
273340//      sy = (240-spriteram[offs+2]);//-16;
274341      sy = 240-sy;
275342
276      color = 1;//(spriteram[offs+0]&0x4)>>2;
343      color = 1;//(deco16_io_ram[4] & 2)+1;//(spriteram[offs+0]&0x4)>>2;
277344
278      fx = 0;
345      fx = spriteram[offs+0] & 0x02;
279346      fy = spriteram[offs+0] & 0x04;
280347      multi = 0;// spriteram[offs+0] & 0x10;
281348
282349//      if (multi) sy-=16;
283      if (fy && multi) { code2=code; code++; }
350      if ((fy && multi) || (fx && multi)) { code2=code; code++; }
284351
285352      if (flip_screen_get(machine))
286353      {
r5046r5047
295362         sy2=sy+16;
296363      }
297364
298       drawgfx(bitmap,machine->gfx[1],
365       drawgfx(bitmap,machine->gfx[gfx_region],
299366              code,
300367            color,
301368            fx,fy,
302369            sx,sy,
303370            cliprect,TRANSPARENCY_PEN,0);
304371        if (multi)
305          drawgfx(bitmap,machine->gfx[1],
372          drawgfx(bitmap,machine->gfx[gfx_region],
306373            code2,
307374            color,
308375            fx,fy,
r5046r5047
369436   }
370437}
371438
439static void prosoccr_draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect)
440{
441   int offs,code,fx,fy,sx,sy;
442
443   for (offs = 0x000;offs < 0x400;offs += 4)
444   {
445      if ((spriteram[offs+0]&1)!=1) continue;
446
447      code = spriteram[offs+1];
448      sy = 240 - spriteram[offs+2];
449      sx = 240 - spriteram[offs+3];
450      fx = spriteram[offs+0] & 4;
451      fy = spriteram[offs+0] & 2;
452
453       drawgfx(bitmap,machine->gfx[1],
454              code,
455            0,
456            fx,fy,
457            sx,sy,
458            cliprect,TRANSPARENCY_PEN,0);
459   }
460}
461
372462/***************************************************************************/
373463
374464VIDEO_UPDATE( prosoccr )
r5046r5047
380470      bitmap_fill(bitmap,cliprect,32);
381471   else
382472      tilemap_draw(bitmap,cliprect,background_tilemap,0,0);
383   boomrang_draw_sprites(screen->machine,bitmap,cliprect,0);
473
384474   tilemap_draw(bitmap,cliprect,fix_tilemap,0,0);
475   prosoccr_draw_sprites(screen->machine,bitmap,cliprect);
476
385477   return 0;
386478}
387479
388480VIDEO_UPDATE( prosport )
389481{
390   int mx,my,tile,color,offs;
482   int mx,my,tile,offs,gfx_region;
483   int scrollx;
391484
392485   bitmap_fill(bitmap,cliprect,0);
393486
394   prosport_draw_sprites(screen->machine,bitmap,cliprect);
487//  popmessage("%d",scrollx);
395488
489   offs = 0;
490//  scrollx = ((deco16_io_ram[0] & 0xf)<<8)+deco16_io_ram[1];
491   scrollx = 0;//((deco16_io_ram[0] & 0x3)<<8)+deco16_io_ram[1];
492
493   /* TODO: enough for showing something for Pro Bowling, not enough yet for Pro Golf...*/
494   for(mx = 0;mx < 32;mx++)
495   {
496      for(my = 0;my < 16;my++)
497      {
498         tile = (prosport_bg_vram[offs] & 0xf0)>>4;
499
500         if(deco16_io_ram[0]&0x20)
501            tile+=0x20;
502
503         drawgfx(bitmap,screen->machine->gfx[8],
504            tile,0,0,0,256-16*(mx+0)+scrollx,16*(my+0),
505            cliprect,TRANSPARENCY_NONE,0);
506         drawgfx(bitmap,screen->machine->gfx[8],
507            tile,0,0,0,256-16*(mx+0)+scrollx+512,16*(my+0),
508            cliprect,TRANSPARENCY_NONE,0);
509
510         offs++;
511      }
512   }
513
514//  #if 0
515   for(mx = 0;mx < 32;mx++)
516   {
517      for(my = 16;my < 32;my++)
518      {
519         tile = (prosport_bg_vram[offs] & 0xf0)>>4;
520
521         if(deco16_io_ram[4] & 0x80)
522            tile+=0x20;
523
524         drawgfx(bitmap,screen->machine->gfx[8],
525            tile,0,0,0,256-16*(mx+0)+scrollx,16*(my+0),
526            cliprect,TRANSPARENCY_NONE,0);
527         drawgfx(bitmap,screen->machine->gfx[8],
528            tile,0,0,0,256-16*(mx+0)+scrollx+512,16*(my+0),
529            cliprect,TRANSPARENCY_NONE,0);
530
531         offs++;
532      }
533   }
534//  #endif
535
536   //return 0;
537
538//  popmessage("%d %02x %02x %02x %02x %02x %02x %02x %02x",scrollx,deco16_io_ram[0],deco16_io_ram[1],deco16_io_ram[2],deco16_io_ram[3]
539//  ,deco16_io_ram[4],deco16_io_ram[5],deco16_io_ram[6],deco16_io_ram[7]);
540
396541   for (offs = 0;offs < 0x400;offs++)
397542   {
398      tile=videoram[offs+0x400]+((videoram[offs]&0x3)<<8);
543      tile=videoram[offs]+((colorram[offs]&0x3)<<8);
399544
400      tile+=((deco16_io_ram[0]&0x30)<<6);
545      if(deco16_io_ram[0]&0x40) //dynamic ram-based gfxs for Pro Golf
546         gfx_region = 3;
547      else
548         gfx_region = ((deco16_io_ram[0]&0x30)>>4);
401549
402      if (!tile) continue;
403
404      color=1;//(videoram[offs]&0x70)>>4;
405550      my = (offs) % 32;
406551      mx = (offs) / 32;
407552
408      drawgfx(bitmap,screen->machine->gfx[0],
553      drawgfx(bitmap,screen->machine->gfx[gfx_region],
409554            tile,1,0,0,248-8*mx,8*my,
410555            cliprect,TRANSPARENCY_PEN,0);
411556   }
557
558   prosport_draw_sprites(screen->machine,bitmap,cliprect);
559
412560   return 0;
413561}
414562
src/mame/video/madalien.c
r5046r5047
387387
388388static const mc6845_interface mc6845_intf =
389389{
390   "screen",      /* screen we are acting on */
391   8,                /* number of pixels per video memory address */
392   NULL,             /* before pixel update callback */
393   NULL,             /* row update callback */
394   NULL,             /* after pixel update callback */
395   NULL,             /* callback for display state changes */
396   NULL,           /* HSYNC callback */
397   NULL           /* VSYNC callback */
390   "screen",   /* screen we are acting on */
391   8,         /* number of pixels per video memory address */
392   NULL,      /* before pixel update callback */
393   NULL,      /* row update callback */
394   NULL,      /* after pixel update callback */
395   DEVCB_NULL,   /* callback for display state changes */
396   DEVCB_NULL,   /* callback for cursor state changes */
397   DEVCB_NULL,   /* HSYNC callback */
398   DEVCB_NULL,   /* VSYNC callback */
399   NULL      /* update address callback */
398400};
399401
400402
src/mame/video/sys16spr.c
r5046r5047
11/* sys16spr.c
2**
3**  This module maps spriteram for various Sega System16/System18 games to
4**  a shared abstraction represented by the sys16_sprite_attributes
5**  structure.
6**
7**  Each function takes a pointer to a sprite attribute structure to fill
8**  out.  This function is initialized to zero automatically prior to the
9**  function call.
10**
11**  The next parameter, source points to the spriteram
12**  associated with a particular sprite.
13**
14**  The final parameter bJustGetColor is set when this function is called while
15**  marking colors.  During this pass, only the palette field needs to be
16**  populated.
17**
18**  This function must return 1 if the sprite was flagged as the last sprite,
19**  or 0 if the sprite was not flagged as the last sprite.
20**
21**  We should probably unpack sprites into an array once, rather than processing
22**  sprites one at a time, once when marking colors and once when rendering them.
23**  Note that we need to draw sprites from front to back to achieve proper sprite-tilemap
24**  orthogonality, so would make it easier to know how many sprites there are (and
25**  thus which is the 'last sprite' with which we need to start.
2 old file, delete me
263*/
27
28/*
29Changes:
3003/12/04  Charles MacDonald
31- Fixed end of list and sprite hide flag processing in sys16_sprite_shinobi, hwchamp output test works properly.
32- Fixed size of zoom fields, fixes sprite alignment issues in hwchamp
33*/
34
35#include "driver.h"
36#include "system16.h"
37
38int sys16_sprite_shinobi( struct sys16_sprite_attributes *sprite, const UINT16 *source, int bJustGetColor ){
39/* standard sprite hardware (Shinobi, Altered Beast, Golden Axe
40    0   YYYYYYYY    YYYYYYYY    top, bottom (screen coordinates)
41    1   -------X    XXXXXXXX    left (screen coordinate)
42    2   EH------F   WWWWWWWW    end list flag, hide sprite flag, flipx, signed pitch
43    3   TTTTTTTT    TTTTTTTT    word offset for start of sprite data; each word is 16 bits (4 pixels)
44    4   ----BBBB    PPCCCCCC    attributes: bank, priority, color
45    5   ------YY    YYYXXXXX    zoomy, zoomx
46    6   --------    --------
47    7   --------    --------
48*/
49   UINT16 ypos = source[0];
50   UINT16 width = source[2];
51   int top = ypos&0xff;
52   int bottom = ypos>>8;
53   if(width & 0x8000) return 1; // End of list bit set
54   if(width & 0x4000) return 0; // Hide this sprite bit set
55   if(top >= bottom || top >= 0xe0) return 0; // Invalid height or off-screen
56   if(bottom >= 0xe0) bottom = 0xe0; // Clip bottom of sprite
57
58   {
59      UINT16 attributes = source[4];
60
61      UINT16 zoomx = source[5] & 0x1F;
62      UINT16 zoomy = (source[5] >> 5) & 0x1F;
63
64      // Rest of rendering code expects zoom to be 10 bits
65      zoomx <<= 5;
66      zoomy <<= 5;
67
68      // Having zoomy set to zoomx when zoomy is zero heavily distorts the multi-sprite opponents in hwchamp
69      //if( zoomy==0 || source[6]==0xffff ) zoomy = zoomx; /* if zoomy is 0, use zoomx instead */
70
71      sprite->x = source[1] + sys16_sprxoffset;
72      sprite->y = top;
73      sprite->priority = (attributes>>6)&0x3;
74      sprite->color = 1024/16 + (attributes&0x3f);
75      sprite->screen_height = bottom-top;
76      sprite->flags = SYS16_SPR_VISIBLE;
77      if( width&0x100 ) sprite->flags |= SYS16_SPR_FLIPX;
78      if ((attributes&0x3f)==0x3f) sprite->flags|= SYS16_SPR_SHADOW;
79      sprite->zoomx = zoomx;
80      sprite->zoomy = zoomy;
81      sprite->pitch = source[2]&0xff;
82      sprite->gfx = ( source[3] + (sys16_obj_bank[(attributes>>8)&0xf]<<16) ) << 1; //*
83   }
84   return 0;
85}
86
87int sys16_sprite_passshot( struct sys16_sprite_attributes *sprite, const UINT16 *source, int bJustGetColor ){
88/* Passing shot 4p needs:   passshot_y=-0x23; passshot_width=1;
89    0   -------X    XXXXXXXX    left (screen coordinate)
90    1   YYYYYYYY    YYYYYYYY    bottom, top (screen coordinates)
91    2   XTTTTTTT    TTTTTTTT    (pen data, flipx, flipy)
92    3   --------    FWWWWWWW    pitch: flipy, logical width
93    4   ------ZZ    ZZZZZZZZ    zoom
94    5   PPCCCCCC    BBBB----    attributes: priority, color, bank
95    6   --------    --------
96    7   --------    --------
97*/
98   int passshot_y=0;
99   int passshot_width=0;
100   UINT16 attributes = source[5];
101   UINT16 ypos = source[1];
102   int bottom = (ypos>>8)+passshot_y;
103   int top = (ypos&0xff)+passshot_y;
104   if( bottom>top && ypos!=0xffff ){
105      int bank = (attributes>>4)&0xf;
106      UINT16 number = source[2];
107      UINT16 width = source[3];
108      int zoom = source[4]&0x3ff;
109      int xpos = source[0] + sys16_sprxoffset;
110      sprite->screen_height = bottom - top;
111      sprite->priority = attributes>>14;
112      sprite->color = 1024/16+ ((attributes>>8)&0x3f);
113      /* hack */
114      if( passshot_width) { /* 4 player bootleg version */
115         width = -width;
116         number -= width*(bottom-top-1)-1;
117      }
118      sprite->flags = SYS16_SPR_VISIBLE;
119      if( number & 0x8000 ) sprite->flags |= SYS16_SPR_FLIPX;
120      if (((attributes>>8)&0x3f)==0x3f)   // shadow sprite
121         sprite->flags|= SYS16_SPR_SHADOW;
122      sprite->pitch = width&0xff;
123      if( sprite->flags&SYS16_SPR_FLIPX ){
124         bank = (bank-1) & 0xf; /* ? */
125      }
126      sprite->gfx = ((number-(short)width)*4 + (sys16_obj_bank[bank] << 17))/2; //*
127      sprite->x = xpos;
128      sprite->y = top+2; //*
129      sprite->zoomx = sprite->zoomy = zoom;
130   }
131   return 0;
132}
133
134
135int sys16_sprite_quartet2( struct sys16_sprite_attributes *sprite, const UINT16 *source, int bJustGetColor ){
136/* Quartet2, Alexkidd, Bodyslam, mjleague, shinobibl
137    0   YYYYYYYY YYYYYYYY   bottom, top
138    1   -------X XXXXXXXX   xpos
139    2   -------- WWWWWWWW   pitch
140    3   FTTTTTTT TTTTTTTT   flipx, gfx
141    4   --CCCCCC BBBBPPPP   color, bank, priority
142    5   -------- --------
143    6   -------- --------
144    7   -------- --------
145*/
146   UINT16 ypos = source[0];
147   int top = ypos&0xff;
148   int bottom = ypos>>8;
149   if( bottom == 0xff ) return 1;
150   if(bottom !=0 && bottom > top){
151      UINT16 spr_pri=(source[4])&0xf; /* ?? */
152      UINT16 bank=(source[4]>>4) &0xf;
153      UINT16 pal=(source[4]>>8)&0x3f;
154      UINT16 tsource[4];
155      UINT16 width;
156      int gfx;
157
158      if (spr_pri) { /* MASH - ?? */
159         tsource[2]=source[2];
160         tsource[3]=source[3];
161         if((tsource[3] & 0x7f80) == 0x7f80){
162            bank=(bank-1)&0xf;
163            tsource[3]^=0x8000;
164         }
165         tsource[2] &= 0x00ff;
166         if (tsource[3]&0x8000){ // reverse
167            tsource[2] |= 0x0100;
168            tsource[3] &= 0x7fff;
169         }
170         gfx = tsource[3]*4;
171         width = tsource[2];
172         //top++;
173         //bottom++;
174         sprite->x = source[1] + sys16_sprxoffset;
175         if(sprite->x > 0x140) sprite->x-=0x200;
176         sprite->y = top;
177         sprite->priority = spr_pri;
178         sprite->color = 1024/16 + pal;
179         sprite->screen_height = bottom-top;
180         sprite->pitch = width&0xff;
181         sprite->flags = SYS16_SPR_VISIBLE;
182         if( width&0x100 ) sprite->flags |= SYS16_SPR_FLIPX;
183         if( pal==0x3f ) sprite->flags|= SYS16_SPR_SHADOW; // shadow sprite
184         sprite->gfx = ((gfx &0x3ffff) + (sys16_obj_bank[bank] << 17))/2;
185      }
186   }
187   return 0;
188}
src/mame/video/tubep.c
r5046r5047
192192   double weights_txt_rg[3];
193193   double weights_txt_b[2];
194194
195   memset(weights_r, 0, sizeof(weights_r));
196   memset(weights_g, 0, sizeof(weights_g));
197   memset(weights_b, 0, sizeof(weights_b));
198
195199   compute_resistor_weights(0,   255,   -1.0,
196200         3,   resistors_txt_rg,   weights_txt_rg,   470,   0,
197201         2,   resistors_txt_b,   weights_txt_b,   470,   0,
r5046r5047
251255   for (i=0; i<6; i++) active_resistors_b[ 6+i] = resistors_2[i];
252256
253257   /* calculate and store the scaler */
254/*
255    output_scaler = compute_resistor_weights(0, 255,    -1.0,
258    /*output_scaler = */compute_resistor_weights(0, 255,    -1.0,
256259                3*6,    active_resistors_r, weights_r,  470,    0,
257260                3*6,    active_resistors_g, weights_g,  470,    0,
258261                2*6,    active_resistors_b, weights_b,  470,    0);
259*/
260262
261263/*  compute_resistor_weights(0, 255,    output_scaler,
262264                3*6,    active_resistors_r, weights_r,  470,    0,
src/mame/drivers/eprom.c
r5046r5047
514514
515515ROM_START( eprom )
516516   ROM_REGION( 0xa0000, "maincpu", 0 )   /* 10*64k for 68000 code */
517   ROM_LOAD16_BYTE( "136069.50a",   0x00000, 0x10000, CRC(08888dec) SHA1(a0a137828b9e1efbdbc0e5ddaf4d73d24b36948a) )
518   ROM_LOAD16_BYTE( "136069.40a",   0x00001, 0x10000, CRC(29cb1e97) SHA1(ccf7024dccbd61983d61450f15c805422e4eee09) )
519   ROM_LOAD16_BYTE( "136069.50b",   0x20000, 0x10000, CRC(702241c9) SHA1(cba27e92f64fd201c16aed6a8f2dc64c4f887e4f) )
520   ROM_LOAD16_BYTE( "136069.40b",   0x20001, 0x10000, CRC(fecbf9e2) SHA1(cd06bfab296e9496564fc2716b26874b55dc2188) )
521   ROM_LOAD16_BYTE( "136069.50d",   0x40000, 0x10000, CRC(0f2f1502) SHA1(2aa65c03d4cd94839a2c2ba338177202bc1185ee) )
522   ROM_LOAD16_BYTE( "136069.40d",   0x40001, 0x10000, CRC(bc6f6ae8) SHA1(43a947cf9db7cda825924e167529305f63bb2a5c) )
523   ROM_LOAD16_BYTE( "136069.40k",   0x60000, 0x10000, CRC(130650f6) SHA1(bea7780d54a4e1f3e93f14494c82446a4bb48e19) )
524   ROM_LOAD16_BYTE( "136069.50k",   0x60001, 0x10000, CRC(1da21ed8) SHA1(3b00e3cf5a25918c1f3158d8b2192158f77cb521) )
517   ROM_LOAD16_BYTE( "136069-3025.50a",   0x00000, 0x10000, CRC(08888dec) SHA1(a0a137828b9e1efbdbc0e5ddaf4d73d24b36948a) )
518   ROM_LOAD16_BYTE( "136069-3024.40a",   0x00001, 0x10000, CRC(29cb1e97) SHA1(ccf7024dccbd61983d61450f15c805422e4eee09) )
519   ROM_LOAD16_BYTE( "136069-4027.50b",   0x20000, 0x10000, CRC(702241c9) SHA1(cba27e92f64fd201c16aed6a8f2dc64c4f887e4f) )
520   ROM_LOAD16_BYTE( "136069-4026.40b",   0x20001, 0x10000, CRC(fecbf9e2) SHA1(cd06bfab296e9496564fc2716b26874b55dc2188) )
521   ROM_LOAD16_BYTE( "136069-4029.50d",   0x40000, 0x10000, CRC(0f2f1502) SHA1(2aa65c03d4cd94839a2c2ba338177202bc1185ee) )
522   ROM_LOAD16_BYTE( "136069-4028.40d",   0x40001, 0x10000, CRC(bc6f6ae8) SHA1(43a947cf9db7cda825924e167529305f63bb2a5c) )
523   ROM_LOAD16_BYTE( "136069-2033.40k",   0x60000, 0x10000, CRC(130650f6) SHA1(bea7780d54a4e1f3e93f14494c82446a4bb48e19) )
524   ROM_LOAD16_BYTE( "136069-2032.50k",   0x60001, 0x10000, CRC(1da21ed8) SHA1(3b00e3cf5a25918c1f3158d8b2192158f77cb521) )
525525
526526   ROM_REGION( 0x80000, "extra", 0 )   /* 8*64k for 68000 code */
527   ROM_LOAD16_BYTE( "136069.10s",   0x00000, 0x10000, CRC(deff6469) SHA1(2fe4d42d60965581579e8edad49b86fbd321d1db) )
528   ROM_LOAD16_BYTE( "136069.10u",   0x00001, 0x10000, CRC(5d7afca2) SHA1(a37ecd2909049dd0b3ddbe602f0173c44b065f6f) )
527   ROM_LOAD16_BYTE( "136069-2035.10s",   0x00000, 0x10000, CRC(deff6469) SHA1(2fe4d42d60965581579e8edad49b86fbd321d1db) )
528   ROM_LOAD16_BYTE( "136069-2034.10u",   0x00001, 0x10000, CRC(5d7afca2) SHA1(a37ecd2909049dd0b3ddbe602f0173c44b065f6f) )
529529   ROM_COPY( "maincpu", 0x60000,  0x60000, 0x20000 )
530530
531531   ROM_REGION( 0x14000, "jsa", 0 )   /* 64k + 16k for 6502 code */
532   ROM_LOAD( "136069.7b",    0x10000, 0x4000, CRC(86e93695) SHA1(63ddab02df139dd41a8260c303798b2a550b9fe6) )
532   ROM_LOAD( "136069-1040.7b",    0x10000, 0x4000, CRC(86e93695) SHA1(63ddab02df139dd41a8260c303798b2a550b9fe6) )
533533   ROM_CONTINUE(             0x04000, 0xc000 )
534534
535535   ROM_REGION( 0x100000, "gfx1", ROMREGION_DISPOSE | ROMREGION_INVERT )
536   ROM_LOAD( "136069.47s",   0x00000, 0x10000, CRC(0de9d98d) SHA1(c2f963a8a4573e135a2825929cbc5535ce3b0215) )
537   ROM_LOAD( "136069.43s",   0x10000, 0x10000, CRC(8eb106ad) SHA1(ece0ddba8fafe6e720f843c4d3f69ae654ae9d92) )
538   ROM_LOAD( "136069.38s",   0x20000, 0x10000, CRC(bf3d0e18) SHA1(c81dacd06ce2580e37ff480d1182ab6c7e74d600) )
539   ROM_LOAD( "136069.32s",   0x30000, 0x10000, CRC(48fb2e42) SHA1(480edc87f7ca547c3d8e09bf1a98e04ac464f4c6) )
540   ROM_LOAD( "136069.76s",   0x40000, 0x10000, CRC(602d939d) SHA1(2ce9899f4cf0786df8c5f0e8cc63ce5206ea514f) )
541   ROM_LOAD( "136069.70s",   0x50000, 0x10000, CRC(f6c973af) SHA1(048d5a9b89cb83186ca594e71521675248970735) )
542   ROM_LOAD( "136069.64s",   0x60000, 0x10000, CRC(9cd52e30) SHA1(59233a87f2b50e9390f297abe7489864222f98e2) )
543   ROM_LOAD( "136069.57s",   0x70000, 0x10000, CRC(4e2c2e7e) SHA1(6bf203e8c029d955634dcbaef9a6932d42035b25) )
544   ROM_LOAD( "136069.47u",   0x80000, 0x10000, CRC(e7edcced) SHA1(4c19ea8b15332681bfc73a3d2b063985c1bbac1d) )
545   ROM_LOAD( "136069.43u",   0x90000, 0x10000, CRC(9d3e144d) SHA1(7f4c7ee14d10a733f8b4169b41023bda1b5702c8) )
546   ROM_LOAD( "136069.38u",   0xa0000, 0x10000, CRC(23f40437) SHA1(567aa09a986dd8765c54f413f906e1cb323568c6) )
547   ROM_LOAD( "136069.32u",   0xb0000, 0x10000, CRC(2a47ff7b) SHA1(89935eac8fbeed87668fe1dcb4645c96a9df2c03) )
548   ROM_LOAD( "136069.76u",   0xc0000, 0x10000, CRC(b0cead58) SHA1(b50b0125bedc1740d02c50e0547a2d2e25b2c42e) )
549   ROM_LOAD( "136069.70u",   0xd0000, 0x10000, CRC(fbc3934b) SHA1(08c581359a005df4d63fa07733bb343c5ab653a9) )
550   ROM_LOAD( "136069.64u",   0xe0000, 0x10000, CRC(0e07493b) SHA1(c5839ac4824b6fedb5397779cd30f6b1eff962d5) )
551   ROM_LOAD( "136069.57u",   0xf0000, 0x10000, CRC(34f8f0ed) SHA1(9096aa2a188a15c2e78acf48d33def0c9f2a419f) )
536   ROM_LOAD( "136069-1020.47s",   0x00000, 0x10000, CRC(0de9d98d) SHA1(c2f963a8a4573e135a2825929cbc5535ce3b0215) )
537   ROM_LOAD( "136069-1013.43s",   0x10000, 0x10000, CRC(8eb106ad) SHA1(ece0ddba8fafe6e720f843c4d3f69ae654ae9d92) )
538   ROM_LOAD( "136069-1018.38s",   0x20000, 0x10000, CRC(bf3d0e18) SHA1(c81dacd06ce2580e37ff480d1182ab6c7e74d600) )
539   ROM_LOAD( "136069-1023.32s",   0x30000, 0x10000, CRC(48fb2e42) SHA1(480edc87f7ca547c3d8e09bf1a98e04ac464f4c6) )
540   ROM_LOAD( "136069-1016.76s",   0x40000, 0x10000, CRC(602d939d) SHA1(2ce9899f4cf0786df8c5f0e8cc63ce5206ea514f) )
541   ROM_LOAD( "136069-1011.70s",   0x50000, 0x10000, CRC(f6c973af) SHA1(048d5a9b89cb83186ca594e71521675248970735) )
542   ROM_LOAD( "136069-1017.64s",   0x60000, 0x10000, CRC(9cd52e30) SHA1(59233a87f2b50e9390f297abe7489864222f98e2) )
543   ROM_LOAD( "136069-1022.57s",   0x70000, 0x10000, CRC(4e2c2e7e) SHA1(6bf203e8c029d955634dcbaef9a6932d42035b25) )
544   ROM_LOAD( "136069-1012.47u",   0x80000, 0x10000, CRC(e7edcced) SHA1(4c19ea8b15332681bfc73a3d2b063985c1bbac1d) )
545   ROM_LOAD( "136069-1010.43u",   0x90000, 0x10000, CRC(9d3e144d) SHA1(7f4c7ee14d10a733f8b4169b41023bda1b5702c8) )
546   ROM_LOAD( "136069-1015.38u",   0xa0000, 0x10000, CRC(23f40437) SHA1(567aa09a986dd8765c54f413f906e1cb323568c6) )
547   ROM_LOAD( "136069-1021.32u",   0xb0000, 0x10000, CRC(2a47ff7b) SHA1(89935eac8fbeed87668fe1dcb4645c96a9df2c03) )
548   ROM_LOAD( "136069-1008.76u",   0xc0000, 0x10000, CRC(b0cead58) SHA1(b50b0125bedc1740d02c50e0547a2d2e25b2c42e) )
549   ROM_LOAD( "136069-1009.70u",   0xd0000, 0x10000, CRC(fbc3934b) SHA1(08c581359a005df4d63fa07733bb343c5ab653a9) )
550   ROM_LOAD( "136069-1014.64u",   0xe0000, 0x10000, CRC(0e07493b) SHA1(c5839ac4824b6fedb5397779cd30f6b1eff962d5) )
551   ROM_LOAD( "136069-1019.57u",   0xf0000, 0x10000, CRC(34f8f0ed) SHA1(9096aa2a188a15c2e78acf48d33def0c9f2a419f) )
552552
553553   ROM_REGION( 0x04000, "gfx2", ROMREGION_DISPOSE )
554   ROM_LOAD( "136069.25d",  0x00000, 0x04000, CRC(409d818e) SHA1(63dcde3ce87c1a9d5afef8089432c499cc70f8f0) )
554   ROM_LOAD( "136069-1007.125d",  0x00000, 0x04000, CRC(409d818e) SHA1(63dcde3ce87c1a9d5afef8089432c499cc70f8f0) )
555555
556556   ROM_REGION( 0x0c00, "plds", ROMREGION_DISPOSE )
557557   ROM_LOAD( "gal16v8-136069.100t",  0x0000, 0x0117, CRC(fd9d472e) SHA1(ba2357e355d062f3ce8bdbed59856e28130999d0) )
r5046r5047
582582   ROM_COPY( "maincpu", 0x60000, 0x60000, 0x20000 )
583583
584584   ROM_REGION( 0x14000, "jsa", 0 )   /* 64k + 16k for 6502 code */
585   ROM_LOAD( "136069.7b",    0x10000, 0x4000, CRC(86e93695) SHA1(63ddab02df139dd41a8260c303798b2a550b9fe6) )
585   ROM_LOAD( "136069-1040.7b",    0x10000, 0x4000, CRC(86e93695) SHA1(63ddab02df139dd41a8260c303798b2a550b9fe6) )
586586   ROM_CONTINUE(             0x04000, 0xc000 )
587587
588588   ROM_REGION( 0x100000, "gfx1", ROMREGION_DISPOSE | ROMREGION_INVERT )
589   ROM_LOAD( "136069.47s",   0x00000, 0x10000, CRC(0de9d98d) SHA1(c2f963a8a4573e135a2825929cbc5535ce3b0215) )
590   ROM_LOAD( "136069.43s",   0x10000, 0x10000, CRC(8eb106ad) SHA1(ece0ddba8fafe6e720f843c4d3f69ae654ae9d92) )
591   ROM_LOAD( "136069.38s",   0x20000, 0x10000, CRC(bf3d0e18) SHA1(c81dacd06ce2580e37ff480d1182ab6c7e74d600) )
592   ROM_LOAD( "136069.32s",   0x30000, 0x10000, CRC(48fb2e42) SHA1(480edc87f7ca547c3d8e09bf1a98e04ac464f4c6) )
593   ROM_LOAD( "136069.76s",   0x40000, 0x10000, CRC(602d939d) SHA1(2ce9899f4cf0786df8c5f0e8cc63ce5206ea514f) )
594   ROM_LOAD( "136069.70s",   0x50000, 0x10000, CRC(f6c973af) SHA1(048d5a9b89cb83186ca594e71521675248970735) )
595   ROM_LOAD( "136069.64s",   0x60000, 0x10000, CRC(9cd52e30) SHA1(59233a87f2b50e9390f297abe7489864222f98e2) )
596   ROM_LOAD( "136069.57s",   0x70000, 0x10000, CRC(4e2c2e7e) SHA1(6bf203e8c029d955634dcbaef9a6932d42035b25) )
597   ROM_LOAD( "136069.47u",   0x80000, 0x10000, CRC(e7edcced) SHA1(4c19ea8b15332681bfc73a3d2b063985c1bbac1d) )
598   ROM_LOAD( "136069.43u",   0x90000, 0x10000, CRC(9d3e144d) SHA1(7f4c7ee14d10a733f8b4169b41023bda1b5702c8) )
599   ROM_LOAD( "136069.38u",   0xa0000, 0x10000, CRC(23f40437) SHA1(567aa09a986dd8765c54f413f906e1cb323568c6) )
600   ROM_LOAD( "136069.32u",   0xb0000, 0x10000, CRC(2a47ff7b) SHA1(89935eac8fbeed87668fe1dcb4645c96a9df2c03) )
601   ROM_LOAD( "136069.76u",   0xc0000, 0x10000, CRC(b0cead58) SHA1(b50b0125bedc1740d02c50e0547a2d2e25b2c42e) )
602   ROM_LOAD( "136069.70u",   0xd0000, 0x10000, CRC(fbc3934b) SHA1(08c581359a005df4d63fa07733bb343c5ab653a9) )
603   ROM_LOAD( "136069.64u",   0xe0000, 0x10000, CRC(0e07493b) SHA1(c5839ac4824b6fedb5397779cd30f6b1eff962d5) )
604   ROM_LOAD( "136069.57u",   0xf0000, 0x10000, CRC(34f8f0ed) SHA1(9096aa2a188a15c2e78acf48d33def0c9f2a419f) )
589   ROM_LOAD( "136069-1020.47s",   0x00000, 0x10000, CRC(0de9d98d) SHA1(c2f963a8a4573e135a2825929cbc5535ce3b0215) )
590   ROM_LOAD( "136069-1013.43s",   0x10000, 0x10000, CRC(8eb106ad) SHA1(ece0ddba8fafe6e720f843c4d3f69ae654ae9d92) )
591   ROM_LOAD( "136069-1018.38s",   0x20000, 0x10000, CRC(bf3d0e18) SHA1(c81dacd06ce2580e37ff480d1182ab6c7e74d600) )
592   ROM_LOAD( "136069-1023.32s",   0x30000, 0x10000, CRC(48fb2e42) SHA1(480edc87f7ca547c3d8e09bf1a98e04ac464f4c6) )
593   ROM_LOAD( "136069-1016.76s",   0x40000, 0x10000, CRC(602d939d) SHA1(2ce9899f4cf0786df8c5f0e8cc63ce5206ea514f) )
594   ROM_LOAD( "136069-1011.70s",   0x50000, 0x10000, CRC(f6c973af) SHA1(048d5a9b89cb83186ca594e71521675248970735) )
595   ROM_LOAD( "136069-1017.64s",   0x60000, 0x10000, CRC(9cd52e30) SHA1(59233a87f2b50e9390f297abe7489864222f98e2) )
596   ROM_LOAD( "136069-1022.57s",   0x70000, 0x10000, CRC(4e2c2e7e) SHA1(6bf203e8c029d955634dcbaef9a6932d42035b25) )
597   ROM_LOAD( "136069-1012.47u",   0x80000, 0x10000, CRC(e7edcced) SHA1(4c19ea8b15332681bfc73a3d2b063985c1bbac1d) )
598   ROM_LOAD( "136069-1010.43u",   0x90000, 0x10000, CRC(9d3e144d) SHA1(7f4c7ee14d10a733f8b4169b41023bda1b5702c8) )
599   ROM_LOAD( "136069-1015.38u",   0xa0000, 0x10000, CRC(23f40437) SHA1(567aa09a986dd8765c54f413f906e1cb323568c6) )
600   ROM_LOAD( "136069-1021.32u",   0xb0000, 0x10000, CRC(2a47ff7b) SHA1(89935eac8fbeed87668fe1dcb4645c96a9df2c03) )
601   ROM_LOAD( "136069-1008.76u",   0xc0000, 0x10000, CRC(b0cead58) SHA1(b50b0125bedc1740d02c50e0547a2d2e25b2c42e) )
602   ROM_LOAD( "136069-1009.70u",   0xd0000, 0x10000, CRC(fbc3934b) SHA1(08c581359a005df4d63fa07733bb343c5ab653a9) )
603   ROM_LOAD( "136069-1014.64u",   0xe0000, 0x10000, CRC(0e07493b) SHA1(c5839ac4824b6fedb5397779cd30f6b1eff962d5) )
604   ROM_LOAD( "136069-1019.57u",   0xf0000, 0x10000, CRC(34f8f0ed) SHA1(9096aa2a188a15c2e78acf48d33def0c9f2a419f) )
605605
606606   ROM_REGION( 0x04000, "gfx2", ROMREGION_DISPOSE )
607   ROM_LOAD( "136069.25d",  0x00000, 0x04000, CRC(409d818e) SHA1(63dcde3ce87c1a9d5afef8089432c499cc70f8f0) )
607   ROM_LOAD( "136069.125d",  0x00000, 0x04000, CRC(409d818e) SHA1(63dcde3ce87c1a9d5afef8089432c499cc70f8f0) )
608608
609609   ROM_REGION( 0x0c00, "plds", ROMREGION_DISPOSE )
610610   ROM_LOAD( "gal16v8-136069.100t",  0x0000, 0x0117, CRC(fd9d472e) SHA1(ba2357e355d062f3ce8bdbed59856e28130999d0) )
src/mame/drivers/coinmstr.c
r5046r5047
972972   NULL,      /* before pixel update callback */
973973   NULL,      /* row update callback */
974974   NULL,      /* after pixel update callback */
975   NULL,      /* callback for display state changes */
976   NULL,      /* HSYNC callback */
977   NULL      /* VSYNC callback */
975   DEVCB_NULL,   /* callback for display state changes */
976   DEVCB_NULL,   /* callback for cursor state changes */
977   DEVCB_NULL,   /* HSYNC callback */
978   DEVCB_NULL,   /* VSYNC callback */
979   NULL      /* update address callback */
978980};
979981
980982
src/mame/drivers/magicard.c
r5046r5047
503503    ROM_LOAD16_WORD( "cdi910.rom", 0x000000, 0x80000,  CRC(8ee44ed6) SHA1(3fcdfa96f862b0cb7603fb6c2af84cac59527b05) )
504504ROM_END
505505
506GAME( 199?, mcdi200, 0,     magicard, 0,     magicard,    ROT0, "Philips", "Magnavox CD-I 200 BIOS", GAME_NO_SOUND | GAME_NOT_WORKING )
507GAME( 199?, pcdi490, 0,     magicard, 0,     magicard,    ROT0, "Philips", "Philips CD-I 490 BIOS", GAME_NO_SOUND | GAME_NOT_WORKING )
508GAME( 199?, pcdi910m,0,     magicard, 0,     magicard,    ROT0, "Philips", "Philips CD-I 910 (Memorex-Tandy) BIOS", GAME_NO_SOUND | GAME_NOT_WORKING )
506//GAME( 199?, mcdi200, 0,     magicard, 0,     magicard,    ROT0, "Philips", "Magnavox CD-I 200 BIOS", GAME_NO_SOUND | GAME_NOT_WORKING )
507//GAME( 199?, pcdi490, 0,     magicard, 0,     magicard,    ROT0, "Philips", "Philips CD-I 490 BIOS", GAME_NO_SOUND | GAME_NOT_WORKING )
508//GAME( 199?, pcdi910m,0,     magicard, 0,     magicard,    ROT0, "Philips", "Philips CD-I 910 (Memorex-Tandy) BIOS", GAME_NO_SOUND | GAME_NOT_WORKING )
509509*/
src/mame/drivers/murogem.c
r5046r5047
199199   NULL,      /* before pixel update callback */
200200   NULL,      /* row update callback */
201201   NULL,      /* after pixel update callback */
202   NULL,      /* callback for display state changes */
203   NULL,      /* HSYNC callback */
204   NULL      /* VSYNC callback */
202   DEVCB_NULL,   /* callback for display state changes */
203   DEVCB_NULL,   /* callback for cursor state changes */
204   DEVCB_NULL,   /* HSYNC callback */
205   DEVCB_NULL,   /* VSYNC callback */
206   NULL      /* update address callback */
205207};
206208
207209
src/mame/drivers/twinkle.c
r5046r5047
22
33Twinkle System
44
5driver by smf
5driver by smf and R. Belmont
66
77TODO:
88
9sound
9sound (IDE DMA, finish comms)
1010dvd
1111hard drive
121216seg led font
r5046r5047
1717Konami 1999-2002
1818
1919The following games are known to exist on this hardware (there may be more)
20                                                                  Video CD      Security
21Game Title                       Year            Program CD     6/7/8 use DVD   Dongle      HDD label
20                                                                  Video CD     Security
21Game Title                       Year            Program CD     6/7/8 use DVD  Dongle      HDD label
2222-----------------------------------------------------------------------------------------------------
23beatmania IIDX                 - Konami 1999     GQ863 A01        GQ863 A04    863 A02     ?
24beatmania IIDX (Japan)         - Konami 1999     GQ863-JA B01     GQ863 A04     "   "      C44 JA A03*
23beatmania IIDX (English)       - Konami 1999     GQ863 A01        GQ863 A04    863 A02     Possibly same as Japan version?
24beatmania IIDX (Japanese)      - Konami 1999     GQ863-JA B01     GQ863 A04     "   "      C44 JA A03*
2525beatmania IIDX + DDR Club Kit  - Konami 1999     896 JA ABM       ?            ?           ?
26beatmania IIDX Substream       - Konami 1999     ?                GC983 A04    ?           ?
26beatmania IIDX Substream       - Konami 1999     ?                GC983 A04    ?           Dumped#
2727beatmania IIDX Club Version 2  - Konami 1999     GE984 A01(BM)    ?            984 A02     ?
2828                                               + GE984 A01(DDR)
2929beatmania IIDX 2nd Style       - Konami 1999     GC985 A01        GC985 A04    ?           ?
30beatmania IIDX 3rd Style       - Konami 2000     ?                ?            ?           ?
31beatmania IIDX 4th Style       - Konami 2000     A03 JA A01       A03 JA A02   A03         ?
30beatmania IIDX 3rd Style       - Konami 2000     GC992-JA A01     ?            ?           ?
31beatmania IIDX 4th Style       - Konami 2000     A03 JA A01       A03 JA A02   A03         A03 JA A03
3232beatmania IIDX 5th Style       - Konami 2001     ?                ?            ?           ?
33beatmania IIDX 6th Style       - Konami 2001     B4U JA A01       ?            ?           ?
34beatmania IIDX 7th Style       - Konami 2002     B44 JA A01       ?            ?           ?
33beatmania IIDX 6th Style       - Konami 2001     B4U JA A01       B4U JA A02   ?           B4U JA A03
34beatmania IIDX 7th Style       - Konami 2002     B44 JA A01       B44 JA A02   ?           ?
3535beatmania IIDX 8th Style       - Konami 2002     C44 JA A01       ?            C44         ?
3636
37? = Undumped pieces. * = Came with beatmania IIDX main board but might be for 8th Style (i.e. game C44)?
37? = Undumped pieces.
38# = Dumped but code unknown.
39* = Came with beatmania IIDX main board but might be for 8th Style (i.e. game C44)?
3840If you can help, please contact us at http://guru.mameworld.info or http://mamedev.org/contact.html
3941
4042
r5046r5047
229231#include "machine/am53cf96.h"
230232#include "machine/rtc65271.h"
231233#include "machine/i2cmem.h"
234#include "machine/idectrl.h"
232235#include "sound/psx.h"
233236#include "sound/cdda.h"
237#include "sound/rf5c400.h"
234238
239static UINT16 twinkle_spu_ctrl;      // SPU board control register
240static UINT8 twinkle_spu_shared[0x400];   // SPU/PSX shared dual-ported RAM
235241
236242/* RTC */
237243
r5046r5047
536542            if( last_io_offset != io_offset )
537543            {
538544               last_io_offset = io_offset;
539               printf( "io_offset=%02x\n", io_offset );
540545            }
541546
542547            break;
r5046r5047
604609   return i2cmem_read( space->machine, 0, I2CMEM_SDA ) << 12;
605610}
606611
607static WRITE32_HANDLER(xx_w)
612static WRITE32_HANDLER(shared_psx_w)
608613{
609/*
610    printf( "xx %08x %08x %08x\n", offset, mem_mask, data );
611*/
614   if (mem_mask == 0xff)
615   {
616      twinkle_spu_shared[offset*2] = data;
617//      printf("shared_psx_w: %x to %x (%x), mask %x (PC=%x)\n", data, offset, offset*2, mem_mask, cpu_get_pc(space->cpu));
618   }
619   else if (mem_mask == 0xff0000)
620   {
621      twinkle_spu_shared[(offset*2)+1] = data;
622//      printf("shared_psx_w: %x to %x (%x), mask %x (PC=%x)\n", data, offset, (offset*2)+1, mem_mask, cpu_get_pc(space->cpu));
623   }
624   else
625   {
626      fatalerror("shared_psx_w: Unknown mask %x\n", mem_mask);
627   }
612628}
613629
614static READ32_HANDLER(xx_r)
630static READ32_HANDLER(shared_psx_r)
615631{
616/*
617    printf( "xx %08x %08x\n", offset, mem_mask );
618*/
619   return 0;
632   UINT32 result;
633
634   result = twinkle_spu_shared[offset*2] | twinkle_spu_shared[(offset*2)+1]<<16;
635
636//  printf("shared_psx_r: @ %x (%x %x), mask %x = %x (PC=%x)\n", offset, offset*2, (offset*2)+1, mem_mask, result, cpu_get_pc(space->cpu));
637
638   result = 0;   // HACK to prevent the games from freezing while we sort out the rest of the 68k's boot sequence
639
640   return result;
620641}
621642
622643static ADDRESS_MAP_START( main_map, ADDRESS_SPACE_PROGRAM, 32 )
623644   AM_RANGE(0x00000000, 0x003fffff) AM_RAM   AM_SHARE(1) AM_BASE(&g_p_n_psxram) AM_SIZE(&g_n_psxramsize) /* ram */
624   AM_RANGE(0x1f000000, 0x1f0007ff) AM_READWRITE(xx_r, xx_w)
625//  AM_RANGE(0x1f000400, 0x1f0007ff) AM_RAM AM_SHARE(3) /* shared ram */
645   AM_RANGE(0x1f000000, 0x1f0007ff) AM_READWRITE(shared_psx_r, shared_psx_w)
626646   AM_RANGE(0x1f200000, 0x1f20001f) AM_READWRITE(am53cf96_r, am53cf96_w)
627647   AM_RANGE(0x1f20a01c, 0x1f20a01f) AM_WRITENOP /* scsi? */
628648   AM_RANGE(0x1f210400, 0x1f2107ff) AM_READNOP
r5046r5047
665685   AM_RANGE(0xfffe0130, 0xfffe0133) AM_WRITENOP
666686ADDRESS_MAP_END
667687
668static READ32_HANDLER(yy_r)
688/* SPU board */
689
690static void ide_interrupt(const device_config *device, int state)
669691{
670/*  printf( "yy %08x %08x\n", offset, mem_mask ); */
671   return 0;
692   if ((state) && (twinkle_spu_ctrl & 0x0400))
693   {
694      cputag_set_input_line(device->machine, "audiocpu", M68K_IRQ_6, ASSERT_LINE);
695   }
672696}
673697
698static READ16_DEVICE_HANDLER( twinkle_ide_r )
699{
700   if (offset == 0)
701   {
702      return ide_controller_r(device, offset+0x1f0, 2);
703   }
704   else
705   {
706      return ide_controller_r(device, offset+0x1f0, 1);
707   }
708}
674709
675static READ32_HANDLER(zz_r)
710static WRITE16_DEVICE_HANDLER( twinkle_ide_w )
676711{
677/*  printf( "zz %08x %08x\n", offset, mem_mask ); */
678   return 0;
712   ide_controller_w(device, offset+0x1f0, 1, data);
679713}
680714
681static WRITE32_HANDLER(ww_w)
715/*
716    System control register (Konami always has one)
717
718    bit 7  = write 0 to ack IRQ 1, write 1 to enable (IRQ 1 appears to be vblank)
719    bit 8  = write 0 to ack IRQ 2, write 1 to enable (IRQ 2 appears to be DMA completion)
720    bit 9  = write 0 to ack IRQ 4, write 1 to enable (IRQ 4 appears to be "command sent", unsure how the MIPS causes it yet however)
721    bit 10 = write 0 to ack IRQ 6, write 1 to enable (IRQ 6 is IDE)
722    bit 11 = watchdog toggle?
723
724    Other bits unknown.
725*/
726static WRITE16_HANDLER( twinkle_spu_ctrl_w )
682727{
683/*  printf( "ww %08x %08x %08x\n", offset, mem_mask, data ); */
728   if ((!(data & 0x0080)) && (twinkle_spu_ctrl & 0x0080))
729   {
730      cpu_set_input_line(space->cpu, M68K_IRQ_1, CLEAR_LINE);
731   }
732   else if ((!(data & 0x0100)) && (twinkle_spu_ctrl & 0x0100))
733   {
734      cpu_set_input_line(space->cpu, M68K_IRQ_2, CLEAR_LINE);
735   }
736   else if ((!(data & 0x0200)) && (twinkle_spu_ctrl & 0x0200))
737   {
738      cpu_set_input_line(space->cpu, M68K_IRQ_4, CLEAR_LINE);
739   }
740   else if ((!(data & 0x0400)) && (twinkle_spu_ctrl & 0x0400))
741   {
742      cpu_set_input_line(space->cpu, M68K_IRQ_6, CLEAR_LINE);
743   }
744
745   twinkle_spu_ctrl = data;
684746}
685747
686static READ32_HANDLER(ww_r)
748static READ16_HANDLER( twinkle_waveram_r )
687749{
688/*  printf( "ww %08x %08x\n", offset, mem_mask ); */
689   return 0;
750   UINT16 *waveram = (UINT16 *)memory_region(space->machine, "rf");
751
752   return waveram[offset];
690753}
691754
755static WRITE16_HANDLER( twinkle_waveram_w )
756{
757   UINT16 *waveram = (UINT16 *)memory_region(space->machine, "rf");
692758
693static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 32 )
759   COMBINE_DATA(&waveram[offset]);
760}
761
762static READ16_HANDLER( shared_68k_r )
763{
764//  printf("shared_68k_r: @ %x, mask %x\n", offset, mem_mask);
765
766   return twinkle_spu_shared[offset];
767}
768
769static WRITE16_HANDLER( shared_68k_w )
770{
771//  printf("shared_68k_w: %x to %x, mask %x\n", data, offset, mem_mask);
772
773   twinkle_spu_shared[offset] = data & 0xff;
774}
775
776static ADDRESS_MAP_START( sound_map, ADDRESS_SPACE_PROGRAM, 16 )
694777   AM_RANGE(0x000000, 0x07ffff) AM_ROM
695   AM_RANGE(0x100000, 0x17ffff) AM_RAM
696   AM_RANGE(0x200000, 0x200003) AM_READ( yy_r )
697   AM_RANGE(0x220000, 0x220003) AM_WRITENOP
698   AM_RANGE(0x230000, 0x230003) AM_WRITENOP
699   AM_RANGE(0x280400, 0x2807ff) AM_READWRITE( ww_r, ww_w )
700//  AM_RANGE(0x280400, 0x2807ff) AM_RAM AM_SHARE(3) /* shared ram? */
701   AM_RANGE(0x30000c, 0x30000f) AM_READ( zz_r )
702   AM_RANGE(0x400000, 0x400fff) AM_WRITENOP /* ide? */
778   AM_RANGE(0x100000, 0x13ffff) AM_RAM
779   // 220000 = LEDs?
780   AM_RANGE(0x230000, 0x230003) AM_WRITE(twinkle_spu_ctrl_w)
781   // 240000 = top 16 bits of DMA address?
782   // 250000 = write to initiate DMA?
783   // 260000 = ???
784   AM_RANGE(0x280000, 0x280fff) AM_READWRITE( shared_68k_r, shared_68k_w )
785   AM_RANGE(0x300000, 0x30000f) AM_DEVREADWRITE("ide", twinkle_ide_r, twinkle_ide_w)
786   // 34000E = ???
787   AM_RANGE(0x400000, 0x400fff) AM_DEVREADWRITE("rf", rf5c400_r, rf5c400_w)
788   AM_RANGE(0x800000, 0xffffff) AM_READWRITE( twinkle_waveram_r, twinkle_waveram_w )   // 8 MB window wave RAM
703789ADDRESS_MAP_END
704790
705791/* SCSI */
r5046r5047
844930   MDRV_CPU_PROGRAM_MAP( main_map )
845931   MDRV_CPU_VBLANK_INT( "mainscreen", psx_vblank )
846932
847   MDRV_CPU_ADD("audiocpu", M68EC020, 32000000/4)   /* 8.000 MHz!? */
933   MDRV_CPU_ADD("audiocpu", M68000, 32000000/2)   /* 16.000 MHz */
848934   MDRV_CPU_PROGRAM_MAP( sound_map )
849935
850936   MDRV_WATCHDOG_TIME_INIT(MSEC(1200)) /* check TD pin on LTC1232 */
r5046r5047
852938   MDRV_MACHINE_RESET( twinkle )
853939   MDRV_NVRAM_HANDLER( twinkle )
854940
941   MDRV_IDE_CONTROLLER_ADD("ide", ide_interrupt)
942
855943   /* video hardware */
856944   MDRV_SCREEN_ADD("mainscreen", RASTER)
857945   MDRV_SCREEN_REFRESH_RATE( 60 )
r5046r5047
874962   MDRV_SOUND_ROUTE( 0, "speakerleft", 0.75 )
875963   MDRV_SOUND_ROUTE( 1, "speakerright", 0.75 )
876964
965   MDRV_SOUND_ADD("rf", RF5C400, 32000000/2)
966   MDRV_SOUND_ROUTE(0, "speakerleft", 1.0)
967   MDRV_SOUND_ROUTE(1, "speakerright", 1.0)
968
877969   MDRV_SOUND_ADD( "cdda", CDDA, 0 )
878970   MDRV_SOUND_ROUTE( 0, "speakerleft", 1.0 )
879971   MDRV_SOUND_ROUTE( 1, "speakerright", 1.0 )
r5046r5047
9321024   ROM_LOAD( "863a03.7b",    0x000000, 0x080000, CRC(81498f73) SHA1(3599b40a5872eab3a00d345287635355fcb25a71) )\
9331025\
9341026   ROM_REGION32_LE( 0x080000, "audiocpu", 0 )\
935   ROM_LOAD16_WORD_SWAP( "863a05.2x",    0x000000, 0x080000, CRC(6f42a09e) SHA1(cab5209f90f47b9ee6e721479913ad74e3ba84b1) )
1027   ROM_LOAD16_WORD_SWAP( "863a05.2x",    0x000000, 0x080000, CRC(6f42a09e) SHA1(cab5209f90f47b9ee6e721479913ad74e3ba84b1) )\
1028\
1029   ROM_REGION(0x1800000, "rf", ROMREGION_ERASE00)
9361030
9371031ROM_START( gq863 )
9381032   TWINKLE_BIOS
9391033ROM_END
9401034
1035ROM_START( bmiidx )
1036   TWINKLE_BIOS
1037
1038   ROM_REGION( 0x100, "user2", ROMREGION_ERASE00 )      /* security */
1039
1040   DISK_REGION( "cdrom0" )   // program
1041   DISK_IMAGE_READONLY("863jaa01", 0, SHA1(aee12de1dc5dd44e5bf7b62133ed695b80999390) )
1042
1043   DISK_REGION( "cdrom1" ) // video CD
1044   DISK_IMAGE_READONLY("863jaa04", 0, SHA1(8f6a0d2e191153032c9388b5298d8ee531b22a41) )
1045
1046   DISK_REGION( "ide" )
1047   DISK_IMAGE_READONLY("c44jaa03", 0, SHA1(53e9bd25d1674a04aeec81c0224b4e4e44af802a) )   // was part of a 1st mix machine, but "c44" indicates 8th mix?
1048ROM_END
1049
1050ROM_START( bmiidx3 )
1051 TWINKLE_BIOS
1052
1053 ROM_REGION( 0x100, "user2", 0 )
1054 ROM_LOAD( "992j.pd",      0x000000, 0x000100, BAD_DUMP CRC(51f24913) SHA1(574b555e3d0c234011198d218d7ae5e95091acb1) )
1055
1056 DISK_REGION( "cdrom0" )
1057 DISK_IMAGE_READONLY( "992jaa01", 0, BAD_DUMP SHA1(7e5389735dff379bb286ba3744edf59b7dfcc74b) )
1058//  DISK_IMAGE_READONLY( "992jaahd", 1, NO_DUMP )
1059//  DISK_IMAGE_READONLY( "992jaa02", 2, NO_DUMP )
1060ROM_END
1061
9411062ROM_START( bmiidx4 )
9421063   TWINKLE_BIOS
9431064
9441065   ROM_REGION( 0x100, "user2", 0 )
945   ROM_LOAD( "a03j.pd",      0x000000, 0x000100, BAD_DUMP CRC(1faf8d1b) SHA1(e8d9d216a8f5459598ff68692f9197e226a231e6) )
1066   ROM_LOAD( "a03j.pd",      0x000000, 0x000100, CRC(8860cfb6) SHA1(85a5b27f24d4baa7960e692b91c0cf3dc5388e72) )
9461067
9471068   DISK_REGION( "cdrom0" )
9481069   DISK_IMAGE_READONLY( "a03jaa01", 0, BAD_DUMP SHA1(2a587b5524bac6f03d26b55247a0acd22aad6c3a) )
r5046r5047
10251146GAME( 1999, gq863,   0,     twinkle, twinkle, twinkle, ROT0, "Konami", "Twinkle System", GAME_IS_BIOS_ROOT )
10261147
10271148/* VCD */
1028/* 1999 - beatmania IIDX */
1149GAME( 1999, bmiidx,   gq863,   twinkle, twinkle, twinkle, ROT0, "Konami", "beatmania IIDX (863 JAA)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
10291150/* find out what these use for security */
10301151GAME( 1999, bmiidxc,  gq863,   twinkle, twinkle, twinkle, ROT0, "Konami", "beatmania IIDX with DDR 2nd Club Version (896 JAB)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
10311152GAME( 1999, bmiidxca, bmiidxc, twinkle, twinkle, twinkle, ROT0, "Konami", "beatmania IIDX with DDR 2nd Club Version (896 JAA)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
r5046r5047
10331154GAME( 1999, bmiidxc2, gq863,   twinkle, twinkle, twinkle, ROT0, "Konami", "beatmania IIDX Substream 2 with DDR 2nd Club Version (984 A01 BM)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
10341155
10351156/* 1999 - beatmania IIDX 2nd style */
1036/* 2000 - beatmania IIDX 3rd style */
10371157/* these use i2c for security */
1158GAME( 2000, bmiidx3,  gq863,   twinkle, twinkle, twinkle, ROT0, "Konami", "beatmania IIDX 3th style (GC992 JA)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
10381159GAME( 2000, bmiidx4,  gq863,   twinkle, twinkle, twinkle, ROT0, "Konami", "beatmania IIDX 4th style (GCA03 JA)", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )
10391160/* 2001 - beatmania IIDX 5th style */
10401161
src/mame/drivers/86lions.c
r5046r5047
316316   /* in fact is a mc6845 driving 4 pixels by memory address.
317317       that's why the big horizontal parameters */
318318
319   "screen",/* screen we are acting on */
320   4,      /* number of pixels per video memory address */
321   NULL,   /* before pixel update callback */
322   NULL,   /* row update callback */
323   NULL,   /* after pixel update callback */
324   NULL,   /* callback for display state changes */
325   NULL,   /* HSYNC callback */
326   NULL   /* VSYNC callback */
319   "screen",   /* screen we are acting on */
320   4,         /* number of pixels per video memory address */
321   NULL,      /* before pixel update callback */
322   NULL,      /* row update callback */
323   NULL,      /* after pixel update callback */
324   DEVCB_NULL,   /* callback for display state changes */
325   DEVCB_NULL,   /* callback for cursor state changes */
326   DEVCB_NULL,   /* HSYNC callback */
327   DEVCB_NULL,   /* VSYNC callback */
328   NULL      /* update address callback */
327329};
328330
329331/* same as Aristocrat Mark-IV HW color offset 7 */
src/mame/drivers/mediagx.c
r5046r5047
773773}
774774
775775
776static DMA8237_HRQ_CHANGED( pc_dma_hrq_changed )
777{
778   cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
779
780   /* Assert HLDA */
781   dma8237_set_hlda( device, state );
782}
783
784
776785static DMA8237_MEM_READ( pc_dma_read_byte )
777786{
778787   const address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
r5046r5047
795804
796805static const struct dma8237_interface dma8237_1_config =
797806{
798   "maincpu",
799   1.0e-6, // 1us
807   XTAL_14_31818MHz/3,
800808
809   pc_dma_hrq_changed,
801810   pc_dma_read_byte,
802811   pc_dma_write_byte,
803812
804   { 0, 0, NULL, NULL },
805   { 0, 0, NULL, NULL },
813   { NULL, NULL, NULL, NULL },
814   { NULL, NULL, NULL, NULL },
806815   NULL
807816};
808817
809818
810819static const struct dma8237_interface dma8237_2_config =
811820{
812   "maincpu",
813   1.0e-6, // 1us
821   XTAL_14_31818MHz/3,
814822
815823   NULL,
816824   NULL,
825   NULL,
817826
818827   { NULL, NULL, NULL, NULL },
819828   { NULL, NULL, NULL, NULL },
src/mame/drivers/calchase.c
r5046r5047
213213}
214214
215215
216static DMA8237_HRQ_CHANGED( pc_dma_hrq_changed )
217{
218   cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
219
220   /* Assert HLDA */
221   dma8237_set_hlda( device, state );
222}
223
224
216225static DMA8237_MEM_READ( pc_dma_read_byte )
217226{
218227   const address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
r5046r5047
235244
236245static const struct dma8237_interface dma8237_1_config =
237246{
238   "maincpu",
239   1.0e-6, // 1us
247   XTAL_14_31818MHz/3,
240248
249   pc_dma_hrq_changed,
241250   pc_dma_read_byte,
242251   pc_dma_write_byte,
243252
244   { 0, 0, NULL, NULL },
245   { 0, 0, NULL, NULL },
253   { NULL, NULL, NULL, NULL },
254   { NULL, NULL, NULL, NULL },
246255   NULL
247256};
248257
249258
250259static const struct dma8237_interface dma8237_2_config =
251260{
252   "maincpu",
253   1.0e-6, // 1us
261   XTAL_14_31818MHz/3,
254262
255263   NULL,
256264   NULL,
265   NULL,
257266
258267   { NULL, NULL, NULL, NULL },
259268   { NULL, NULL, NULL, NULL },
src/mame/drivers/midzeus.c
r5046r5047
1818
1919Game Title       Level  Released
2020----------------------------------
21Cruis'n Exotica  v2.4   08/13/2000
21Cruis'n Exotica  v2.4   08/23/2000
2222Invasion         v5.0   12/14/1999
2323The Grid         v1.2   10/18/2000
2424
r5046r5047
12461246   ROM_LOAD( "exotica.u4", 0x800000, 0x400000, CRC(213f7fd8) SHA1(8528d524a62bc41a8e3b39f0dbeeba33c862ee27) )
12471247
12481248   ROM_REGION32_LE( 0x0800000, "user1", 0 )
1249   ROM_LOAD32_WORD( "exotica.u10", 0x0000000, 0x200000, CRC(65450140) SHA1(cad41a2cad48426de01feb78d3f71f768e3fc872) )
1250   ROM_LOAD32_WORD( "exotica.u11", 0x0000002, 0x200000, CRC(e994891f) SHA1(bb088729b665864c7f3b79b97c3c86f9c8f68770) )
1251   ROM_LOAD32_WORD( "exotica.u12", 0x0400000, 0x200000, CRC(21f122b2) SHA1(5473401ec954bf9ab66a8283bd08d17c7960cd29) )
1252   ROM_LOAD32_WORD( "exotica.u13", 0x0400002, 0x200000, CRC(cf9d3609) SHA1(6376891f478185d26370466bef92f0c5304d58d3) )
1249   ROM_LOAD32_WORD( "exotica-24.u10", 0x0000000, 0x200000, CRC(5e702f7c) SHA1(98c76fb46b304d4d21656d0505d5e5e99c8335bf) ) /* Version 2.4  Wed Aug 23, 2000  17:26:53 */
1250   ROM_LOAD32_WORD( "exotica-24.u11", 0x0000002, 0x200000, CRC(5ecb2cbc) SHA1(57283167e48ca96579d0712d9fec23a36fa2b496) )
1251   ROM_LOAD32_WORD( "exotica.u12",    0x0400000, 0x200000, CRC(21f122b2) SHA1(5473401ec954bf9ab66a8283bd08d17c7960cd29) )
1252   ROM_LOAD32_WORD( "exotica.u13",    0x0400002, 0x200000, CRC(cf9d3609) SHA1(6376891f478185d26370466bef92f0c5304d58d3) )
12531253
12541254   ROM_REGION32_LE( 0x3000000, "user2", 0 )
12551255   ROM_LOAD32_WORD( "exotica.u14", 0x0000000, 0x400000, CRC(84452fc2) SHA1(06d87263f83ef079e6c5fb9de620e0135040c858) )
r5046r5047
12661266   ROM_LOAD32_WORD( "exotica.u21", 0x2400002, 0x200000, CRC(0011b9d6) SHA1(231d768c964a16b905857b0814d758fe93c2eefb) )
12671267ROM_END
12681268
1269ROM_START( crusnexa )
1270   ROM_REGION16_LE( 0xc00000, "dcs", ROMREGION_ERASEFF )   /* sound data */
1271   ROM_LOAD( "exotica.u2", 0x000000, 0x200000, CRC(d2d54acf) SHA1(2b4d6fda30af807228bb281335939dfb6df9b530) )
1272   ROM_RELOAD(             0x200000, 0x200000 )
1273   ROM_LOAD( "exotica.u3", 0x400000, 0x400000, CRC(28a3a13d) SHA1(8d7d641b883df089adefdd144229afef79db9e8a) )
1274   ROM_LOAD( "exotica.u4", 0x800000, 0x400000, CRC(213f7fd8) SHA1(8528d524a62bc41a8e3b39f0dbeeba33c862ee27) )
12691275
1276   ROM_REGION32_LE( 0x0800000, "user1", 0 )
1277   ROM_LOAD32_WORD( "exotica-16.u10", 0x0000000, 0x200000, CRC(65450140) SHA1(cad41a2cad48426de01feb78d3f71f768e3fc872) ) /* Version 1.6  Tue Feb 22, 2000  10:25:01 */
1278   ROM_LOAD32_WORD( "exotica-16.u11", 0x0000002, 0x200000, CRC(e994891f) SHA1(bb088729b665864c7f3b79b97c3c86f9c8f68770) )
1279   ROM_LOAD32_WORD( "exotica.u12",    0x0400000, 0x200000, CRC(21f122b2) SHA1(5473401ec954bf9ab66a8283bd08d17c7960cd29) )
1280   ROM_LOAD32_WORD( "exotica.u13",    0x0400002, 0x200000, CRC(cf9d3609) SHA1(6376891f478185d26370466bef92f0c5304d58d3) )
1281
1282   ROM_REGION32_LE( 0x3000000, "user2", 0 )
1283   ROM_LOAD32_WORD( "exotica.u14", 0x0000000, 0x400000, CRC(84452fc2) SHA1(06d87263f83ef079e6c5fb9de620e0135040c858) )
1284   ROM_LOAD32_WORD( "exotica.u15", 0x0000002, 0x400000, CRC(b6aaebdb) SHA1(6ede6ea123be6a88d1ff38e90f059c9d1f822d6d) )
1285   ROM_LOAD32_WORD( "exotica.u16", 0x0800000, 0x400000, CRC(aac6d2a5) SHA1(6c336520269d593b46b82414d9352a3f16955cc3) )
1286   ROM_LOAD32_WORD( "exotica.u17", 0x0800002, 0x400000, CRC(71cf5404) SHA1(a6eed1a66fb4f4ddd749e4272a2cdb8e3e354029) )
1287   ROM_LOAD32_WORD( "exotica.u22", 0x1000000, 0x400000, CRC(ad6dcda7) SHA1(5c9291753e1659f9adbe7e59fa2d0e030efae5bc) )
1288   ROM_LOAD32_WORD( "exotica.u23", 0x1000002, 0x400000, CRC(1f103a68) SHA1(3b3acc63a461677cd424e75e7211fa6f063a37ef) )
1289   ROM_LOAD32_WORD( "exotica.u24", 0x1800000, 0x400000, CRC(6312feef) SHA1(4113e4e5d39c99e8131d41a57c973df475b67d18) )
1290   ROM_LOAD32_WORD( "exotica.u25", 0x1800002, 0x400000, CRC(b8277b16) SHA1(1355e87affd78e195906aedc9aed9e230374e2bf) )
1291   ROM_LOAD32_WORD( "exotica.u18", 0x2000000, 0x200000, CRC(60cf5caa) SHA1(629870a305802d632bd2681131d1ffc0086280d2) )
1292   ROM_LOAD32_WORD( "exotica.u19", 0x2000002, 0x200000, CRC(6b919a18) SHA1(20e40e195554146ed1d3fad54f7280823ae89d4b) )
1293   ROM_LOAD32_WORD( "exotica.u20", 0x2400000, 0x200000, CRC(4855b68b) SHA1(1f6e557590b2621d0d5c782b95577f1be5cbc51d) )
1294   ROM_LOAD32_WORD( "exotica.u21", 0x2400002, 0x200000, CRC(0011b9d6) SHA1(231d768c964a16b905857b0814d758fe93c2eefb) )
1295ROM_END
1296
1297
12701298ROM_START( thegrid ) /* Version 1.2 Program roms */
12711299   ROM_REGION16_LE( 0xc00000, "dcs", ROMREGION_ERASEFF )   /* sound data */
12721300   ROM_LOAD( "the_grid.u2", 0x000000, 0x400000, CRC(e6a39ee9) SHA1(4ddc62f5d278ea9791205098fa5f018ab1e698b4) )
r5046r5047
13641392GAME(  1997, mk4a,     mk4,      midzeus,  mk4,      mk4,      ROT0, "Midway", "Mortal Kombat 4 (version 2.1)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
13651393GAME(  1999, invasnab, 0,        midzeus,  invasn,   invasn,   ROT0, "Midway", "Invasion - The Abductors (version 5.0)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
13661394GAME(  1999, invasnv4, invasnab, midzeus,  invasn,   invasn,   ROT0, "Midway", "Invasion - The Abductors (version 4.0)", GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
1367GAMEL( 1999, crusnexo, 0,        midzeus2, crusnexo, crusnexo, ROT0, "Midway", "Cruis'n Exotica (version 1.6)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE, layout_crusnexo )
1395GAMEL( 1999, crusnexo, 0,        midzeus2, crusnexo, crusnexo, ROT0, "Midway", "Cruis'n Exotica (version 2.4)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE, layout_crusnexo )
1396GAMEL( 1999, crusnexa, crusnexo, midzeus2, crusnexo, crusnexo, ROT0, "Midway", "Cruis'n Exotica (version 1.6)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE, layout_crusnexo )
13681397GAME(  2001, thegrid,  0,        midzeus2, thegrid,  thegrid,  ROT0, "Midway", "The Grid (version 1.2)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
13691398GAME(  2001, thegrida, thegrid,  midzeus2, thegrid,  thegrid,  ROT0, "Midway", "The Grid (version 1.1)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_SUPPORTS_SAVE )
src/mame/drivers/bestleag.c
r5046r5047
356356   ROM_LOAD( "7.bin", 0x180000, 0x80000, CRC(dcece871) SHA1(7db919ab7f51748b77b3bd35228bbf71b951349f) )
357357
358358   ROM_REGION( 0x080000, "gfx2", ROMREGION_DISPOSE ) /* 16x16x4 Sprites */
359   ROM_LOAD( "8.bin",  0x000000, 0x20000, CRC(a463422a) SHA1(a3b6efd1c57b0a3b0ce4ce734a9a9b79540c4136) )
360   ROM_LOAD( "9.bin",  0x020000, 0x20000, CRC(ebec74ed) SHA1(9a1620f4ca163470f5e567f650663ae368bdd3c1) )
361   ROM_LOAD( "10.bin", 0x040000, 0x20000, CRC(7ea4e22d) SHA1(3c7f05dfd1c5889bfcbc14d08026e2a484870216) )
362   ROM_LOAD( "11.bin", 0x060000, 0x20000, CRC(283d9ba6) SHA1(6054853f76907a4a0f89ad5aa02dde9d3d4ff196) )
359   ROM_LOAD( "27_27c010.u86",  0x000000, 0x20000, CRC(a463422a) SHA1(a3b6efd1c57b0a3b0ce4ce734a9a9b79540c4136) )
360   ROM_LOAD( "28_27c010.u85",  0x020000, 0x20000, CRC(ebec74ed) SHA1(9a1620f4ca163470f5e567f650663ae368bdd3c1) )
361   ROM_LOAD( "29_27c010.u84", 0x040000, 0x20000, CRC(7ea4e22d) SHA1(3c7f05dfd1c5889bfcbc14d08026e2a484870216) )
362   ROM_LOAD( "30_27c010.u83", 0x060000, 0x20000, CRC(283d9ba6) SHA1(6054853f76907a4a0f89ad5aa02dde9d3d4ff196) )
363363
364364   ROM_REGION( 0x80000, "user1", 0 ) /* Samples */
365   ROM_LOAD( "1.bin", 0x00000, 0x80000, CRC(e152138e) SHA1(9d41b61b98414e1d5804b5a9edf4acb4c5f31615) )
365   ROM_LOAD( "20_27c040.u16", 0x00000, 0x80000, CRC(e152138e) SHA1(9d41b61b98414e1d5804b5a9edf4acb4c5f31615) )
366366
367367   ROM_REGION( 0xc0000, "oki", 0 )
368368   ROM_COPY( "user1", 0x000000, 0x000000, 0x020000)
r5046r5047
373373   ROM_COPY( "user1", 0x060000, 0x0a0000, 0x020000)
374374ROM_END
375375
376ROM_START( bestleaw )
377   ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 Code */
378   ROM_LOAD16_BYTE( "21_27c101.u67", 0x00000, 0x20000, CRC(ab5abd37) SHA1(822a4ab77041ea4d62d9f8df6197c4afe2558f21) )
379   ROM_LOAD16_BYTE( "22_27c010.u66", 0x00001, 0x20000, CRC(4abc0580) SHA1(c834ad0710d1ecd3babb446df4b3b4e5d0b23cbd) )
380
381   ROM_REGION( 0x200000, "gfx1", ROMREGION_DISPOSE ) /* 16x16x4 BG and 8x8x4 FG Tiles */
382   ROM_LOAD( "23_27c040.u36", 0x000000, 0x80000, CRC(dcd53a97) SHA1(ed22c51a3501bbe164d8ec4b19f1f67e28e10427) )
383   ROM_LOAD( "24_27c040.u42", 0x080000, 0x80000, CRC(2984c1a0) SHA1(ddab53cc6e9debb7f1fb7dae8196ff6df31cbedc) )
384   ROM_LOAD( "25_27c040.u38", 0x100000, 0x80000, CRC(8bb5d73a) SHA1(bc93825aab08340ef182cde56323bf30ea6c5edf) )
385   ROM_LOAD( "26_27c4001.u45", 0x180000, 0x80000, CRC(a82c905d) SHA1(b1c1098ad79eb66943bc362246983427d0263b6e) )
386
387   ROM_REGION( 0x080000, "gfx2", ROMREGION_DISPOSE ) /* 16x16x4 Sprites */
388   ROM_LOAD( "27_27c010.u86",  0x000000, 0x20000, CRC(a463422a) SHA1(a3b6efd1c57b0a3b0ce4ce734a9a9b79540c4136) )
389   ROM_LOAD( "28_27c010.u85",  0x020000, 0x20000, CRC(ebec74ed) SHA1(9a1620f4ca163470f5e567f650663ae368bdd3c1) )
390   ROM_LOAD( "29_27c010.u84", 0x040000, 0x20000, CRC(7ea4e22d) SHA1(3c7f05dfd1c5889bfcbc14d08026e2a484870216) )
391   ROM_LOAD( "30_27c010.u83", 0x060000, 0x20000, CRC(283d9ba6) SHA1(6054853f76907a4a0f89ad5aa02dde9d3d4ff196) )
392
393   ROM_REGION( 0x80000, "user1", 0 ) /* Samples */
394   ROM_LOAD( "20_27c040.u16", 0x00000, 0x80000, CRC(e152138e) SHA1(9d41b61b98414e1d5804b5a9edf4acb4c5f31615) )
395
396   ROM_REGION( 0xc0000, "oki", 0 )
397   ROM_COPY( "user1", 0x000000, 0x000000, 0x020000)
398   ROM_COPY( "user1", 0x020000, 0x020000, 0x020000)
399   ROM_COPY( "user1", 0x000000, 0x040000, 0x020000)
400   ROM_COPY( "user1", 0x040000, 0x060000, 0x020000)
401   ROM_COPY( "user1", 0x000000, 0x080000, 0x020000)
402   ROM_COPY( "user1", 0x060000, 0x0a0000, 0x020000)
403
404   ROM_REGION( 0x2000, "plds", ROMREGION_DISPOSE )
405   ROM_LOAD( "85c060.bin",            0x0000, 0x032f, CRC(537100ac) SHA1(3d5e9013e3cba660671f02e78c233c866dad2e53) )
406   ROM_LOAD( "gal16v8-25hb1.u182",    0x0200, 0x0117, NO_DUMP ) /* Protected */
407   ROM_LOAD( "gal16v8-25hb1.u183",    0x0400, 0x0117, NO_DUMP ) /* Protected */
408   ROM_LOAD( "gal16v8-25hb1.u58",     0x0800, 0x0117, NO_DUMP ) /* Protected */
409      ROM_LOAD( "palce20v8h-15pc-4.u38", 0x1000, 0x0157, NO_DUMP ) /* Protected */
410ROM_END
411
376412/* GAME drivers */
377413
378414GAME( 1993, bestleag, bigstrik, bestleag, bestleag, 0, ROT0, "bootleg", "Best League", 0 )
415GAME( 1993, bestleaw, bigstrik, bestleag, bestleag, 0, ROT0, "bootleg", "Best League (World)", GAME_IMPERFECT_GRAPHICS )
416
src/mame/drivers/dkong.c
r5046r5047
176176          05 - Rivet level 2 completed (end tune)
177177          06 - Hammer hit
178178          07 - Standard level end
179          08 - Background 1 (first screen)
180          09 - ???
179          08 - Background 1 (barrels)
180          09 - Background 4 (pie factory)
181181          0A - Background 3 (springs)
182          0B - Background 2 (rivet)
182          0B - Background 2 (rivets)
183183          0C - Rivet level 1 completed (end tune)
184184          0D - Rivet removed
185185          0E - Rivet level completed
r5046r5047
313313 *
314314 *************************************/
315315
316#define DEBUG_PROTECTION   (0)
317#define DEBUG_DISC_SOUND   (0)
316#define DEBUG_PROTECTION    (0)
317#define DEBUG_DISC_SOUND    (0)
318318
319319#define COMBINE_TYPE_PC(_tyn, _pc) ((_tyn)<<16 | (_pc))
320320
r5046r5047
339339
340340static const z80dma_interface dk3_dma =
341341{
342   "maincpu",
342    "maincpu",
343343
344   dk_dma_read_byte,
345   dk_dma_write_byte,
346   0, 0, 0, 0,
347   NULL
344    dk_dma_read_byte,
345    dk_dma_write_byte,
346    0, 0, 0, 0,
347    NULL
348348};
349349
350350static const dma8257_interface dk_dma =
351351{
352   "maincpu",
352    "maincpu",
353353
354   dk_dma_read_byte,
355   dk_dma_write_byte,
354    dk_dma_read_byte,
355    dk_dma_write_byte,
356356
357   { 0, p8257_ctl_r, 0, 0 },
358   { p8257_ctl_w, 0, 0, 0 },
359   { 0, 0, 0, 0 }
357    { 0, p8257_ctl_r, 0, 0 },
358    { p8257_ctl_w, 0, 0, 0 },
359    { 0, 0, 0, 0 }
360360};
361361
362362static const dma8257_interface hb_dma =
363363{
364   "maincpu",
364    "maincpu",
365365
366   hb_dma_read_byte,
367   hb_dma_write_byte,
366    hb_dma_read_byte,
367    hb_dma_write_byte,
368368
369   { 0, p8257_ctl_r, 0, 0 },
370   { p8257_ctl_w, 0, 0, 0 },
371   { 0, 0, 0, 0 }
369    { 0, p8257_ctl_r, 0, 0 },
370    { p8257_ctl_w, 0, 0, 0 },
371    { 0, 0, 0, 0 }
372372};
373373
374374/*************************************
r5046r5047
379379
380380static INTERRUPT_GEN( s2650_interrupt )
381381{
382   cpu_set_input_line_and_vector(device, 0, HOLD_LINE, 0x03);
382    cpu_set_input_line_and_vector(device, 0, HOLD_LINE, 0x03);
383383}
384384
385385/*************************************
r5046r5047
390390
391391static MACHINE_START( dkong2b )
392392{
393   dkong_state *state = (dkong_state *)machine->driver_data;
393    dkong_state *state = (dkong_state *)machine->driver_data;
394394
395   state->hardware_type = HARDWARE_TKG04;
395    state->hardware_type = HARDWARE_TKG04;
396396
397   state_save_register_global(machine, state->decrypt_counter);
398   state_save_register_global(machine, state->dma_latch);
397    state_save_register_global(machine, state->decrypt_counter);
398    state_save_register_global(machine, state->dma_latch);
399399
400400}
401401
402402static MACHINE_START( s2650 )
403403{
404   dkong_state *state = (dkong_state *)machine->driver_data;
405   UINT8   *p = memory_region(machine, "user1");
406   const char *game_name = machine->gamedrv->name;
407   int i;
404    dkong_state *state = (dkong_state *)machine->driver_data;
405    UINT8   *p = memory_region(machine, "user1");
406    const char *game_name = machine->gamedrv->name;
407    int i;
408408
409   MACHINE_START_CALL(dkong2b);
409    MACHINE_START_CALL(dkong2b);
410410
411   for (i=0;i<0x200;i++)
412      state->rev_map[i] = -1;
413   for (i=0;i<0x200;i++)
414      state->rev_map[p[0x0000+i]] = i;
411    for (i=0;i<0x200;i++)
412        state->rev_map[i] = -1;
413    for (i=0;i<0x200;i++)
414        state->rev_map[p[0x0000+i]] = i;
415415
416   state->hunchloopback = 0;
416    state->hunchloopback = 0;
417417
418   state_save_register_global(machine, state->hunchloopback);
418    state_save_register_global(machine, state->hunchloopback);
419419
420   if (strcmp(game_name,"herbiedk") == 0) state->protect_type = DK2650_HERBIEDK;
421   else if (strcmp(game_name,"hunchbkd") == 0) state->protect_type = DK2650_HUNCHBKD;
422   else if (strcmp(game_name,"sbdk") == 0) state->protect_type = DK2650_HUNCHBKD;
423   else if (strcmp(game_name,"herodk") == 0) state->protect_type = DK2650_HUNCHBKD;
424   else if (strcmp(game_name,"herodku") == 0) state->protect_type = DK2650_HUNCHBKD;
425   else if (strcmp(game_name,"8ballact") == 0) state->protect_type = DK2650_EIGHTACT;
426   else if (strcmp(game_name,"8ballat2") == 0) state->protect_type = DK2650_EIGHTACT;
427   else if (strcmp(game_name,"shootgal") == 0) state->protect_type = DK2650_SHOOTGAL;
428   else if (strcmp(game_name,"spclforc") == 0) state->protect_type = DK2650_SPCLFORC;
429   else if (strcmp(game_name,"spcfrcii") == 0) state->protect_type = DK2650_SPCLFORC;
430   else
431      fatalerror("Unknown game <%s> in S2650 start.", game_name);
420    if (strcmp(game_name,"herbiedk") == 0) state->protect_type = DK2650_HERBIEDK;
421    else if (strcmp(game_name,"hunchbkd") == 0) state->protect_type = DK2650_HUNCHBKD;
422    else if (strcmp(game_name,"sbdk") == 0) state->protect_type = DK2650_HUNCHBKD;
423    else if (strcmp(game_name,"herodk") == 0) state->protect_type = DK2650_HUNCHBKD;
424    else if (strcmp(game_name,"herodku") == 0) state->protect_type = DK2650_HUNCHBKD;
425    else if (strcmp(game_name,"8ballact") == 0) state->protect_type = DK2650_EIGHTACT;
426    else if (strcmp(game_name,"8ballat2") == 0) state->protect_type = DK2650_EIGHTACT;
427    else if (strcmp(game_name,"shootgal") == 0) state->protect_type = DK2650_SHOOTGAL;
428    else if (strcmp(game_name,"spclforc") == 0) state->protect_type = DK2650_SPCLFORC;
429    else if (strcmp(game_name,"spcfrcii") == 0) state->protect_type = DK2650_SPCLFORC;
430    else
431        fatalerror("Unknown game <%s> in S2650 start.", game_name);
432432}
433433
434434static MACHINE_START( radarscp )
435435{
436   dkong_state *state = (dkong_state *)machine->driver_data;
436    dkong_state *state = (dkong_state *)machine->driver_data;
437437
438   MACHINE_START_CALL(dkong2b);
439   state->hardware_type = HARDWARE_TRS02;
438    MACHINE_START_CALL(dkong2b);
439    state->hardware_type = HARDWARE_TRS02;
440440}
441441
442442static MACHINE_START( radarsc1 )
443443{
444   dkong_state *state = (dkong_state *)machine->driver_data;
444    dkong_state *state = (dkong_state *)machine->driver_data;
445445
446   MACHINE_START_CALL(dkong2b);
447   state->hardware_type = HARDWARE_TRS01;
446    MACHINE_START_CALL(dkong2b);
447    state->hardware_type = HARDWARE_TRS01;
448448}
449449
450450static MACHINE_START( dkong3 )
451451{
452   dkong_state *state = (dkong_state *)machine->driver_data;
452    dkong_state *state = (dkong_state *)machine->driver_data;
453453
454   state->hardware_type = HARDWARE_TKG04;
454    state->hardware_type = HARDWARE_TKG04;
455455}
456456
457457static MACHINE_RESET( dkong )
458458{
459   /* nothing */
459    /* nothing */
460460}
461461
462462static MACHINE_RESET( strtheat )
463463{
464   dkong_state *state = (dkong_state *)machine->driver_data;
465   UINT8 *ROM = memory_region(machine, "maincpu");
464    dkong_state *state = (dkong_state *)machine->driver_data;
465    UINT8 *ROM = memory_region(machine, "maincpu");
466466
467   MACHINE_RESET_CALL(dkong);
467    MACHINE_RESET_CALL(dkong);
468468
469   /* The initial state of the counter is 0x08 */
470   memory_configure_bank(machine, 1, 0, 4, &ROM[0x10000], 0x4000);
471   state->decrypt_counter = 0x08;
472   memory_set_bank(machine, 1, 0);
469    /* The initial state of the counter is 0x08 */
470    memory_configure_bank(machine, 1, 0, 4, &ROM[0x10000], 0x4000);
471    state->decrypt_counter = 0x08;
472    memory_set_bank(machine, 1, 0);
473473}
474474
475475static MACHINE_RESET( drakton )
476476{
477   dkong_state *state = (dkong_state *)machine->driver_data;
478   UINT8 *ROM = memory_region(machine, "maincpu");
477    dkong_state *state = (dkong_state *)machine->driver_data;
478    UINT8 *ROM = memory_region(machine, "maincpu");
479479
480   MACHINE_RESET_CALL(dkong);
480    MACHINE_RESET_CALL(dkong);
481481
482   /* The initial state of the counter is 0x09 */
483   memory_configure_bank(machine, 1, 0, 4, &ROM[0x10000], 0x4000);
484   state->decrypt_counter = 0x09;
485   memory_set_bank(machine, 1, 1);
482    /* The initial state of the counter is 0x09 */
483    memory_configure_bank(machine, 1, 0, 4, &ROM[0x10000], 0x4000);
484    state->decrypt_counter = 0x09;
485    memory_set_bank(machine, 1, 1);
486486}
487487
488488
r5046r5047
494494
495495static READ8_DEVICE_HANDLER( dk_dma_read_byte )
496496{
497   const address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
498   return memory_read_byte(space, offset);
497    const address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
498    return memory_read_byte(space, offset);
499499}
500500
501501static WRITE8_DEVICE_HANDLER( dk_dma_write_byte )
502502{
503   const address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
504   memory_write_byte(space, offset, data);
503    const address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
504    memory_write_byte(space, offset, data);
505505}
506506
507507static READ8_DEVICE_HANDLER( hb_dma_read_byte )
508508{
509   const address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
510   dkong_state *state = (dkong_state *)device->machine->driver_data;
511   int     bucket = state->rev_map[(offset>>10) & 0x1ff];
512   int   addr;
509    const address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
510    dkong_state *state = (dkong_state *)device->machine->driver_data;
511    int   bucket = state->rev_map[(offset>>10) & 0x1ff];
512    int   addr;
513513
514   if (bucket<0)
515      fatalerror("hb_dma_read_byte - unmapped access for 0x%02x - bucket 0x%02x\n", offset, bucket);
514    if (bucket<0)
515        fatalerror("hb_dma_read_byte - unmapped access for 0x%02x - bucket 0x%02x\n", offset, bucket);
516516
517   addr = ((bucket<<7) & 0x7c00) | (offset & 0x3ff);
517    addr = ((bucket<<7) & 0x7c00) | (offset & 0x3ff);
518518
519   return memory_read_byte(space, addr);
519    return memory_read_byte(space, addr);
520520}
521521
522522static WRITE8_DEVICE_HANDLER( hb_dma_write_byte )
523523{
524   const address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
525   dkong_state *state = (dkong_state *)device->machine->driver_data;
526   int     bucket = state->rev_map[(offset>>10) & 0x1ff];
527   int   addr;
524    const address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
525    dkong_state *state = (dkong_state *)device->machine->driver_data;
526    int   bucket = state->rev_map[(offset>>10) & 0x1ff];
527    int   addr;
528528
529   if (bucket<0)
530      fatalerror("hb_dma_read_byte - unmapped access for 0x%02x - bucket 0x%02x\n", offset, bucket);
529    if (bucket<0)
530        fatalerror("hb_dma_read_byte - unmapped access for 0x%02x - bucket 0x%02x\n", offset, bucket);
531531
532   addr = ((bucket<<7) & 0x7c00) | (offset & 0x3ff);
532    addr = ((bucket<<7) & 0x7c00) | (offset & 0x3ff);
533533
534   memory_write_byte(space, addr, data);
534    memory_write_byte(space, addr, data);
535535}
536536
537537static READ8_DEVICE_HANDLER( p8257_ctl_r )
538538{
539   dkong_state *state = (dkong_state *)device->machine->driver_data;
540   return state->dma_latch;
539    dkong_state *state = (dkong_state *)device->machine->driver_data;
540    return state->dma_latch;
541541}
542542
543543static WRITE8_DEVICE_HANDLER( p8257_ctl_w )
544544{
545   dkong_state *state = (dkong_state *)device->machine->driver_data;
546   state->dma_latch = data;
545    dkong_state *state = (dkong_state *)device->machine->driver_data;
546    state->dma_latch = data;
547547}
548548
549549
r5046r5047
555555
556556static WRITE8_HANDLER( dkong3_coin_counter_w )
557557{
558   coin_counter_w(offset, data & 0x01);
558    coin_counter_w(offset, data & 0x01);
559559}
560560
561561static WRITE8_DEVICE_HANDLER( p8257_drq_w )
562562{
563   dma8257_drq_w(device, 0, data & 0x01);
564   dma8257_drq_w(device, 1, data & 0x01);
563    dma8257_drq_w(device, 0, data & 0x01);
564    dma8257_drq_w(device, 1, data & 0x01);
565565}
566566
567567static READ8_HANDLER( dkong_in2_r )
568568{
569   /* mcu status (sound feedback) is inverted bit4 from port B (8039) */
570   const device_config *devvp2 = devtag_get_device(space->machine, "virtual_p2");
571   UINT8 mcustatus = latch8_bit4_q_r(devvp2, 0);
569    /* mcu status (sound feedback) is inverted bit4 from port B (8039) */
570    const device_config *devvp2 = devtag_get_device(space->machine, "virtual_p2");
571    UINT8 mcustatus = latch8_bit4_q_r(devvp2, 0);
572572
573   UINT8 r;
573    UINT8 r;
574574
575   r = (input_port_read(space->machine, "IN2") & 0xBF) | (mcustatus << 6);
576   coin_counter_w(offset, r >> 7);
577   if (r & 0x10)
578      r = (r & ~0x10) | 0x80; /* service ==> coin */
579   return r;
575    r = (input_port_read(space->machine, "IN2") & 0xBF) | (mcustatus << 6);
576    coin_counter_w(offset, r >> 7);
577    if (r & 0x10)
578        r = (r & ~0x10) | 0x80; /* service ==> coin */
579    return r;
580580}
581581
582582static READ8_HANDLER( dkongjr_in2_r )
583583{
584   /* dkongjr does not have the mcu line connected */
584    /* dkongjr does not have the mcu line connected */
585585
586   UINT8 r;
586    UINT8 r;
587587
588   r = (input_port_read(space->machine, "IN2") & 0xBF) | 0x40;
589   coin_counter_w(offset, r >> 7);
590   if (r & 0x10)
591      r = (r & ~0x10) | 0x80; /* service ==> coin */
592   return r;
588    r = (input_port_read(space->machine, "IN2") & 0xBF) | 0x40;
589    coin_counter_w(offset, r >> 7);
590    if (r & 0x10)
591        r = (r & ~0x10) | 0x80; /* service ==> coin */
592    return r;
593593}
594594
595595static READ8_HANDLER( s2650_mirror_r )
596596{
597   return memory_read_byte(space, 0x1000+offset);
597    return memory_read_byte(space, 0x1000+offset);
598598}
599599
600600
601601static WRITE8_HANDLER( s2650_mirror_w )
602602{
603   memory_write_byte(space, 0x1000+offset, data);
603    memory_write_byte(space, 0x1000+offset, data);
604604}
605605
606606
607607static READ8_HANDLER( epos_decrypt_rom )
608608{
609   dkong_state *state = (dkong_state *)space->machine->driver_data;
609    dkong_state *state = (dkong_state *)space->machine->driver_data;
610610
611   if (offset & 0x01)
612   {
613      state->decrypt_counter = state->decrypt_counter - 1;
614      if (state->decrypt_counter < 0)
615         state->decrypt_counter = 0x0F;
616   }
617   else
618   {
619      state->decrypt_counter = (state->decrypt_counter + 1) & 0x0F;
620   }
611    if (offset & 0x01)
612    {
613        state->decrypt_counter = state->decrypt_counter - 1;
614        if (state->decrypt_counter < 0)
615            state->decrypt_counter = 0x0F;
616    }
617    else
618    {
619        state->decrypt_counter = (state->decrypt_counter + 1) & 0x0F;
620    }
621621
622   switch(state->decrypt_counter)
623   {
624      case 0x08:   memory_set_bank(space->machine, 1, 0);      break;
625      case 0x09:   memory_set_bank(space->machine, 1, 1);      break;
626      case 0x0A:   memory_set_bank(space->machine, 1, 2);      break;
627      case 0x0B:   memory_set_bank(space->machine, 1, 3);      break;
628      default:
629         logerror("Invalid counter = %02X\n",state->decrypt_counter);
630         break;
631   }
622    switch(state->decrypt_counter)
623    {
624        case 0x08:  memory_set_bank(space->machine, 1, 0);      break;
625        case 0x09:  memory_set_bank(space->machine, 1, 1);      break;
626        case 0x0A:  memory_set_bank(space->machine, 1, 2);      break;
627        case 0x0B:  memory_set_bank(space->machine, 1, 3);      break;
628        default:
629            logerror("Invalid counter = %02X\n",state->decrypt_counter);
630            break;
631    }
632632
633   return 0;
633    return 0;
634634}
635635
636636
637637static WRITE8_HANDLER( s2650_data_w )
638638{
639   dkong_state *state = (dkong_state *)space->machine->driver_data;
639    dkong_state *state = (dkong_state *)space->machine->driver_data;
640640#if DEBUG_PROTECTION
641   logerror("write : pc = %04x, loopback = %02x\n",cpu_get_pc(space->cpu), data);
641    logerror("write : pc = %04x, loopback = %02x\n",cpu_get_pc(space->cpu), data);
642642#endif
643643
644   state->hunchloopback = data;
644    state->hunchloopback = data;
645645}
646646
647647static READ8_HANDLER( s2650_port0_r )
648648{
649   dkong_state *state = (dkong_state *)space->machine->driver_data;
649    dkong_state *state = (dkong_state *)space->machine->driver_data;
650650#if DEBUG_PROTECTION
651   logerror("port 0 : pc = %04x, loopback = %02x\n",cpu_get_pc(space->cpu), state->hunchloopback);
651    logerror("port 0 : pc = %04x, loopback = %02x\n",cpu_get_pc(space->cpu), state->hunchloopback);
652652#endif
653653
654   switch (COMBINE_TYPE_PC(state->protect_type, cpu_get_pc(space->cpu)))
655   {
656      case COMBINE_TYPE_PC(DK2650_HUNCHBKD, 0x00e9):  return 0xff;
657      case COMBINE_TYPE_PC(DK2650_HUNCHBKD, 0x0114):  return 0xfb; //fb
658      case COMBINE_TYPE_PC(DK2650_HUNCHBKD, 0x209b):  return state->hunchloopback; /* this at least prevents reset after super bonus */
659      case COMBINE_TYPE_PC(DK2650_SHOOTGAL, 0x0079):  return 0xff;
660      case COMBINE_TYPE_PC(DK2650_SPCLFORC, 0x00a3):  return 0x01;
661      case COMBINE_TYPE_PC(DK2650_SPCLFORC, 0x007b):  return 0x01;
662   }
654    switch (COMBINE_TYPE_PC(state->protect_type, cpu_get_pc(space->cpu)))
655    {
656        case COMBINE_TYPE_PC(DK2650_HUNCHBKD, 0x00e9):  return 0xff;
657        case COMBINE_TYPE_PC(DK2650_HUNCHBKD, 0x0114):  return 0xfb; //fb
658        case COMBINE_TYPE_PC(DK2650_HUNCHBKD, 0x209b):  return state->hunchloopback; /* this at least prevents reset after super bonus */
659        case COMBINE_TYPE_PC(DK2650_SHOOTGAL, 0x0079):  return 0xff;
660        case COMBINE_TYPE_PC(DK2650_SPCLFORC, 0x00a3):  return 0x01;
661        case COMBINE_TYPE_PC(DK2650_SPCLFORC, 0x007b):  return 0x01;
662    }
663663
664   switch (state->protect_type)
665   {
666      case DK2650_HUNCHBKD:  return 0x00;
667      case DK2650_SHOOTGAL:  return 0x00;
668      case DK2650_SPCLFORC:  return 0x00;
669   }
670   fatalerror("Unhandled read from port 0 : pc = %4x\n",cpu_get_pc(space->cpu));
664    switch (state->protect_type)
665    {
666        case DK2650_HUNCHBKD:  return 0x00;
667        case DK2650_SHOOTGAL:  return 0x00;
668        case DK2650_SPCLFORC:  return 0x00;
669    }
670    fatalerror("Unhandled read from port 0 : pc = %4x\n",cpu_get_pc(space->cpu));
671671}
672672
673673
674674static READ8_HANDLER( s2650_port1_r )
675675{
676   dkong_state *state = (dkong_state *)space->machine->driver_data;
676    dkong_state *state = (dkong_state *)space->machine->driver_data;
677677#if DEBUG_PROTECTION
678   logerror("port 1 : pc = %04x, loopback = %02x\n",cpu_get_pc(space->cpu), state->hunchloopback);
678    logerror("port 1 : pc = %04x, loopback = %02x\n",cpu_get_pc(space->cpu), state->hunchloopback);
679679#endif
680680
681   switch (COMBINE_TYPE_PC(state->protect_type, cpu_get_pc(space->cpu)))
682   {
683      case COMBINE_TYPE_PC(DK2650_EIGHTACT, 0x0021):  return 0x00;
684      case COMBINE_TYPE_PC(DK2650_HERBIEDK, 0x002b):  return 0x00;
685      case COMBINE_TYPE_PC(DK2650_HERBIEDK, 0x09dc):  return 0x00;
686   }
681    switch (COMBINE_TYPE_PC(state->protect_type, cpu_get_pc(space->cpu)))
682    {
683        case COMBINE_TYPE_PC(DK2650_EIGHTACT, 0x0021):  return 0x00;
684        case COMBINE_TYPE_PC(DK2650_HERBIEDK, 0x002b):  return 0x00;
685        case COMBINE_TYPE_PC(DK2650_HERBIEDK, 0x09dc):  return 0x00;
686    }
687687
688   switch (state->protect_type)
689   {
690      case DK2650_HUNCHBKD:  return state->hunchloopback;
691      case DK2650_EIGHTACT:  return 1;
692      case DK2650_HERBIEDK:  return 1;
693   }
694   fatalerror("Unhandled read from port 1 : pc = %4x\n",cpu_get_pc(space->cpu));
688    switch (state->protect_type)
689    {
690        case DK2650_HUNCHBKD:  return state->hunchloopback;
691        case DK2650_EIGHTACT:  return 1;
692        case DK2650_HERBIEDK:  return 1;
693    }
694    fatalerror("Unhandled read from port 1 : pc = %4x\n",cpu_get_pc(space->cpu));
695695}
696696
697697
698698static WRITE8_HANDLER( dkong3_2a03_reset_w )
699699{
700   if (data & 1)
701   {
702      cputag_set_input_line(space->machine, "n2a03a", INPUT_LINE_RESET, CLEAR_LINE);
703      cputag_set_input_line(space->machine, "n2a03b", INPUT_LINE_RESET, CLEAR_LINE);
704   }
705   else
706   {
707      cputag_set_input_line(space->machine, "n2a03a", INPUT_LINE_RESET, ASSERT_LINE);
708      cputag_set_input_line(space->machine, "n2a03b", INPUT_LINE_RESET, ASSERT_LINE);
709   }
700    if (data & 1)
701    {
702        cputag_set_input_line(space->machine, "n2a03a", INPUT_LINE_RESET, CLEAR_LINE);
703        cputag_set_input_line(space->machine, "n2a03b", INPUT_LINE_RESET, CLEAR_LINE);
704    }
705    else
706    {
707        cputag_set_input_line(space->machine, "n2a03a", INPUT_LINE_RESET, ASSERT_LINE);
708        cputag_set_input_line(space->machine, "n2a03b", INPUT_LINE_RESET, ASSERT_LINE);
709    }
710710}
711711
712712static READ8_HANDLER( strtheat_inputport_0_r )
713713{
714   if(input_port_read(space->machine, "DSW0") & 0x40)
715   {
716      /* Joystick inputs */
717      return input_port_read(space->machine, "IN0");
718   }
719   else
720   {
721      /* Steering Wheel inputs */
722      return (input_port_read(space->machine, "IN0") & ~3) | (input_port_read(space->machine, "IN4") & 3);
723   }
714    if(input_port_read(space->machine, "DSW0") & 0x40)
715    {
716        /* Joystick inputs */
717        return input_port_read(space->machine, "IN0");
718    }
719    else
720    {
721        /* Steering Wheel inputs */
722        return (input_port_read(space->machine, "IN0") & ~3) | (input_port_read(space->machine, "IN4") & 3);
723    }
724724}
725725
726726
727727static READ8_HANDLER( strtheat_inputport_1_r )
728728{
729   if(input_port_read(space->machine, "DSW0") & 0x40)
730   {
731      /* Joystick inputs */
732      return input_port_read(space->machine, "IN1");
733   }
734   else
735   {
736      /* Steering Wheel inputs */
737      return (input_port_read(space->machine, "IN1") & ~3) | (input_port_read(space->machine, "IN5") & 3);
738   }
729    if(input_port_read(space->machine, "DSW0") & 0x40)
730    {
731        /* Joystick inputs */
732        return input_port_read(space->machine, "IN1");
733    }
734    else
735    {
736        /* Steering Wheel inputs */
737        return (input_port_read(space->machine, "IN1") & ~3) | (input_port_read(space->machine, "IN5") & 3);
738    }
739739}
740740
741741
r5046r5047
746746 *************************************/
747747
748748static ADDRESS_MAP_START( dkong_map, ADDRESS_SPACE_PROGRAM, 8 )
749   AM_RANGE(0x0000, 0x3fff) AM_ROM
750   AM_RANGE(0x6000, 0x6bff) AM_RAM
751   AM_RANGE(0x7000, 0x73ff) AM_RAM AM_BASE_MEMBER(dkong_state, sprite_ram)
752                           AM_SIZE_MEMBER(dkong_state, sprite_ram_size)  /* sprite set 1 */
753   AM_RANGE(0x7400, 0x77ff) AM_RAM_WRITE(dkong_videoram_w)
754                            AM_BASE_MEMBER(dkong_state, video_ram)
755   AM_RANGE(0x7800, 0x780f) AM_DEVREADWRITE("dma8257", dma8257_r, dma8257_w)   /* P8257 control registers */
756   AM_RANGE(0x7c00, 0x7c00) AM_READ_PORT("IN0") AM_LATCH8_WRITE("ls175.3d")      /* IN0, sound CPU intf */
757   AM_RANGE(0x7c80, 0x7c80) AM_READ_PORT("IN1") AM_WRITE(radarscp_grid_color_w)  /* IN1 */
749    AM_RANGE(0x0000, 0x3fff) AM_ROM
750    AM_RANGE(0x6000, 0x6bff) AM_RAM
751    AM_RANGE(0x7000, 0x73ff) AM_RAM AM_BASE_MEMBER(dkong_state, sprite_ram)
752                                    AM_SIZE_MEMBER(dkong_state, sprite_ram_size)  /* sprite set 1 */
753    AM_RANGE(0x7400, 0x77ff) AM_RAM_WRITE(dkong_videoram_w)
754                                    AM_BASE_MEMBER(dkong_state, video_ram)
755    AM_RANGE(0x7800, 0x780f) AM_DEVREADWRITE("dma8257", dma8257_r, dma8257_w)   /* P8257 control registers */
756    AM_RANGE(0x7c00, 0x7c00) AM_READ_PORT("IN0") AM_LATCH8_WRITE("ls175.3d")      /* IN0, sound CPU intf */
757    AM_RANGE(0x7c80, 0x7c80) AM_READ_PORT("IN1") AM_WRITE(radarscp_grid_color_w)  /* IN1 */
758758
759   AM_RANGE(0x7d00, 0x7d00) AM_READ(dkong_in2_r)                          /* IN2 */
760   AM_RANGE(0x7d00, 0x7d07) AM_DEVWRITE("ls259.6h", latch8_bit0_w)       /* Sound signals */
759    AM_RANGE(0x7d00, 0x7d00) AM_READ(dkong_in2_r)                                 /* IN2 */
760    AM_RANGE(0x7d00, 0x7d07) AM_DEVWRITE("ls259.6h", latch8_bit0_w)       /* Sound signals */
761761
762   AM_RANGE(0x7d80, 0x7d80) AM_READ_PORT("DSW0") AM_WRITE(dkong_audio_irq_w)     /* DSW0 */
763   AM_RANGE(0x7d81, 0x7d81) AM_WRITE(radarscp_grid_enable_w)
764   AM_RANGE(0x7d82, 0x7d82) AM_WRITE(dkong_flipscreen_w)
765   AM_RANGE(0x7d83, 0x7d83) AM_WRITE(dkong_spritebank_w)                    /* 2 PSL Signal */
766   AM_RANGE(0x7d84, 0x7d84) AM_WRITE(interrupt_enable_w)
767   AM_RANGE(0x7d85, 0x7d85) AM_DEVWRITE("dma8257", p8257_drq_w)        /* P8257 ==> /DRQ0 /DRQ1 */
768   AM_RANGE(0x7d86, 0x7d87) AM_WRITE(dkong_palettebank_w)
762    AM_RANGE(0x7d80, 0x7d80) AM_READ_PORT("DSW0") AM_WRITE(dkong_audio_irq_w)     /* DSW0 */
763    AM_RANGE(0x7d81, 0x7d81) AM_WRITE(radarscp_grid_enable_w)
764    AM_RANGE(0x7d82, 0x7d82) AM_WRITE(dkong_flipscreen_w)
765    AM_RANGE(0x7d83, 0x7d83) AM_WRITE(dkong_spritebank_w)                         /* 2 PSL Signal */
766    AM_RANGE(0x7d84, 0x7d84) AM_WRITE(interrupt_enable_w)
767    AM_RANGE(0x7d85, 0x7d85) AM_DEVWRITE("dma8257", p8257_drq_w)          /* P8257 ==> /DRQ0 /DRQ1 */
768    AM_RANGE(0x7d86, 0x7d87) AM_WRITE(dkong_palettebank_w)
769769ADDRESS_MAP_END
770770
771771static ADDRESS_MAP_START( dkongjr_map, ADDRESS_SPACE_PROGRAM, 8 )
772   AM_RANGE(0x0000, 0x5fff) AM_ROM
773   AM_RANGE(0x6000, 0x6bff) AM_RAM
774   AM_RANGE(0x6c00, 0x6fff) AM_RAM                                              /* DK3 bootleg only */
775   AM_RANGE(0x7000, 0x73ff) AM_RAM AM_BASE_MEMBER(dkong_state, sprite_ram)
776                           AM_SIZE_MEMBER(dkong_state, sprite_ram_size) /* sprite set 1 */
777   AM_RANGE(0x7400, 0x77ff) AM_RAM_WRITE(dkong_videoram_w)
778                           AM_BASE_MEMBER(dkong_state, video_ram)
779   AM_RANGE(0x7800, 0x780f) AM_DEVREADWRITE("dma8257", dma8257_r, dma8257_w)   /* P8257 control registers */
772    AM_RANGE(0x0000, 0x5fff) AM_ROM
773    AM_RANGE(0x6000, 0x6bff) AM_RAM
774    AM_RANGE(0x6c00, 0x6fff) AM_RAM                                              /* DK3 bootleg only */
775    AM_RANGE(0x7000, 0x73ff) AM_RAM AM_BASE_MEMBER(dkong_state, sprite_ram)
776                                    AM_SIZE_MEMBER(dkong_state, sprite_ram_size) /* sprite set 1 */
777    AM_RANGE(0x7400, 0x77ff) AM_RAM_WRITE(dkong_videoram_w)
778                                    AM_BASE_MEMBER(dkong_state, video_ram)
779    AM_RANGE(0x7800, 0x780f) AM_DEVREADWRITE("dma8257", dma8257_r, dma8257_w)   /* P8257 control registers */
780780
781   AM_RANGE(0x7c00, 0x7c00) AM_READ_PORT("IN0") AM_LATCH8_WRITE("ls174.3d")    /* IN0, sound interface */
781    AM_RANGE(0x7c00, 0x7c00) AM_READ_PORT("IN0") AM_LATCH8_WRITE("ls174.3d")    /* IN0, sound interface */
782782
783   AM_RANGE(0x7c80, 0x7c80) AM_READ_PORT("IN1") AM_WRITE(dkongjr_gfxbank_w)
784   AM_RANGE(0x7c80, 0x7c87) AM_DEVWRITE("ls259.4h", latch8_bit0_w)     /* latch for sound and signals above */
783    AM_RANGE(0x7c80, 0x7c80) AM_READ_PORT("IN1") AM_WRITE(dkongjr_gfxbank_w)
784    AM_RANGE(0x7c80, 0x7c87) AM_DEVWRITE("ls259.4h", latch8_bit0_w)     /* latch for sound and signals above */
785785
786   AM_RANGE(0x7d00, 0x7d00) AM_READ(dkongjr_in2_r)                               /* IN2 */
787   AM_RANGE(0x7d00, 0x7d07) AM_DEVWRITE("ls259.6h",latch8_bit0_w)      /* Sound addrs */
786    AM_RANGE(0x7d00, 0x7d00) AM_READ(dkongjr_in2_r)                             /* IN2 */
787    AM_RANGE(0x7d00, 0x7d07) AM_DEVWRITE("ls259.6h",latch8_bit0_w)      /* Sound addrs */
788788
789   AM_RANGE(0x7d80, 0x7d80) AM_READ_PORT("DSW0") AM_WRITE(dkong_audio_irq_w)   /* DSW0 */
790   AM_RANGE(0x7d82, 0x7d82) AM_WRITE(dkong_flipscreen_w)
791   AM_RANGE(0x7d83, 0x7d83) AM_WRITE(dkong_spritebank_w)                  /* 2 PSL Signal */
792   AM_RANGE(0x7d84, 0x7d84) AM_WRITE(interrupt_enable_w)
793   AM_RANGE(0x7d85, 0x7d85) AM_DEVWRITE("dma8257", p8257_drq_w)      /* P8257 ==> /DRQ0 /DRQ1 */
794   AM_RANGE(0x7d86, 0x7d87) AM_WRITE(dkong_palettebank_w)
795   AM_RANGE(0x7d80, 0x7d87) AM_DEVWRITE("ls259.5h", latch8_bit0_w)     /* latch for sound and signals above*/
789    AM_RANGE(0x7d80, 0x7d80) AM_READ_PORT("DSW0") AM_WRITE(dkong_audio_irq_w)   /* DSW0 */
790    AM_RANGE(0x7d82, 0x7d82) AM_WRITE(dkong_flipscreen_w)
791    AM_RANGE(0x7d83, 0x7d83) AM_WRITE(dkong_spritebank_w)                       /* 2 PSL Signal */
792    AM_RANGE(0x7d84, 0x7d84) AM_WRITE(interrupt_enable_w)
793    AM_RANGE(0x7d85, 0x7d85) AM_DEVWRITE("dma8257", p8257_drq_w)        /* P8257 ==> /DRQ0 /DRQ1 */
794    AM_RANGE(0x7d86, 0x7d87) AM_WRITE(dkong_palettebank_w)
795    AM_RANGE(0x7d80, 0x7d87) AM_DEVWRITE("ls259.5h", latch8_bit0_w)     /* latch for sound and signals above*/
796796
797   AM_RANGE(0x8000, 0x9fff) AM_ROM                                               /* bootleg DKjr only */
798   AM_RANGE(0xb000, 0xbfff) AM_ROM                                             /* pestplce only */
799   AM_RANGE(0xd000, 0xdfff) AM_ROM                                               /* DK3 bootleg only */
797    AM_RANGE(0x8000, 0x9fff) AM_ROM                                             /* bootleg DKjr only */
798    AM_RANGE(0xb000, 0xbfff) AM_ROM                                             /* pestplce only */
799    AM_RANGE(0xd000, 0xdfff) AM_ROM                                             /* DK3 bootleg only */
800800ADDRESS_MAP_END
801801
802802static ADDRESS_MAP_START( dkong3_map, ADDRESS_SPACE_PROGRAM, 8 )
803   AM_RANGE(0x0000, 0x5fff) AM_ROM
804   AM_RANGE(0x6000, 0x67ff) AM_RAM
805   AM_RANGE(0x6800, 0x6fff) AM_RAM
806   AM_RANGE(0x7000, 0x73ff) AM_RAM AM_BASE_MEMBER(dkong_state, sprite_ram)
807                           AM_SIZE_MEMBER(dkong_state, sprite_ram_size) /* sprite set 1 */
808   AM_RANGE(0x7400, 0x77ff) AM_RAM_WRITE(dkong_videoram_w)
809                           AM_BASE_MEMBER(dkong_state, video_ram)
810   AM_RANGE(0x7c00, 0x7c00) AM_READ_PORT("IN0")  AM_LATCH8_WRITE("latch1")
811   AM_RANGE(0x7c80, 0x7c80) AM_READ_PORT("IN1")  AM_LATCH8_WRITE("latch2")
812   AM_RANGE(0x7d00, 0x7d00) AM_READ_PORT("DSW0") AM_LATCH8_WRITE("latch3")
813   AM_RANGE(0x7d80, 0x7d80) AM_READ_PORT("DSW1") AM_WRITE(dkong3_2a03_reset_w)
814   AM_RANGE(0x7e80, 0x7e80) AM_WRITE(dkong3_coin_counter_w)
815   AM_RANGE(0x7e81, 0x7e81) AM_WRITE(dkong3_gfxbank_w)
816   AM_RANGE(0x7e82, 0x7e82) AM_WRITE(dkong_flipscreen_w)
817   AM_RANGE(0x7e83, 0x7e83) AM_WRITE(dkong_spritebank_w)              /* 2 PSL Signal */
818   AM_RANGE(0x7e84, 0x7e84) AM_WRITE(interrupt_enable_w)
819   AM_RANGE(0x7e85, 0x7e85) AM_DEVWRITE("z80dma", z80dma_rdy_w)  /* ==> DMA Chip */
820   AM_RANGE(0x7e86, 0x7e87) AM_WRITE(dkong_palettebank_w)
821   AM_RANGE(0x8000, 0x9fff) AM_ROM                                         /* DK3 and bootleg DKjr only */
803    AM_RANGE(0x0000, 0x5fff) AM_ROM
804    AM_RANGE(0x6000, 0x67ff) AM_RAM
805    AM_RANGE(0x6800, 0x6fff) AM_RAM
806    AM_RANGE(0x7000, 0x73ff) AM_RAM AM_BASE_MEMBER(dkong_state, sprite_ram)
807                                    AM_SIZE_MEMBER(dkong_state, sprite_ram_size) /* sprite set 1 */
808    AM_RANGE(0x7400, 0x77ff) AM_RAM_WRITE(dkong_videoram_w)
809                                    AM_BASE_MEMBER(dkong_state, video_ram)
810    AM_RANGE(0x7c00, 0x7c00) AM_READ_PORT("IN0")  AM_LATCH8_WRITE("latch1")
811    AM_RANGE(0x7c80, 0x7c80) AM_READ_PORT("IN1")  AM_LATCH8_WRITE("latch2")
812    AM_RANGE(0x7d00, 0x7d00) AM_READ_PORT("DSW0") AM_LATCH8_WRITE("latch3")
813    AM_RANGE(0x7d80, 0x7d80) AM_READ_PORT("DSW1") AM_WRITE(dkong3_2a03_reset_w)
814    AM_RANGE(0x7e80, 0x7e80) AM_WRITE(dkong3_coin_counter_w)
815    AM_RANGE(0x7e81, 0x7e81) AM_WRITE(dkong3_gfxbank_w)
816    AM_RANGE(0x7e82, 0x7e82) AM_WRITE(dkong_flipscreen_w)
817    AM_RANGE(0x7e83, 0x7e83) AM_WRITE(dkong_spritebank_w)                 /* 2 PSL Signal */
818    AM_RANGE(0x7e84, 0x7e84) AM_WRITE(interrupt_enable_w)
819    AM_RANGE(0x7e85, 0x7e85) AM_DEVWRITE("z80dma", z80dma_rdy_w)  /* ==> DMA Chip */
820    AM_RANGE(0x7e86, 0x7e87) AM_WRITE(dkong_palettebank_w)
821    AM_RANGE(0x8000, 0x9fff) AM_ROM                                       /* DK3 and bootleg DKjr only */
822822ADDRESS_MAP_END
823823
824824static ADDRESS_MAP_START( dkong3_io_map, ADDRESS_SPACE_IO, 8 )
825   ADDRESS_MAP_GLOBAL_MASK(0xff)
826   AM_RANGE(0x00, 0x00) AM_DEVREADWRITE("z80dma", z80dma_r, z80dma_w)   /* dma controller */
825    ADDRESS_MAP_GLOBAL_MASK(0xff)
826    AM_RANGE(0x00, 0x00) AM_DEVREADWRITE("z80dma", z80dma_r, z80dma_w)  /* dma controller */
827827ADDRESS_MAP_END
828828
829829/* Epos conversions */
830830
831831static ADDRESS_MAP_START( epos_readport, ADDRESS_SPACE_IO, 8 )
832   ADDRESS_MAP_GLOBAL_MASK(0xff)
833   AM_RANGE(0x00, 0xff) AM_READ(epos_decrypt_rom)    /* Switch protection logic */
832    ADDRESS_MAP_GLOBAL_MASK(0xff)
833    AM_RANGE(0x00, 0xff) AM_READ(epos_decrypt_rom)  /* Switch protection logic */
834834ADDRESS_MAP_END
835835
836836/* S2650 conversions */
837837
838838static ADDRESS_MAP_START( s2650_map, ADDRESS_SPACE_PROGRAM, 8 )
839   AM_RANGE(0x0000, 0x0fff) AM_ROM
840   AM_RANGE(0x1000, 0x13ff) AM_RAM AM_BASE_MEMBER(dkong_state, sprite_ram)
841                           AM_SIZE_MEMBER(dkong_state, sprite_ram_size)  /* 0x7000 */
842   AM_RANGE(0x1400, 0x1400) AM_READ_PORT("IN0") AM_DEVWRITE("ls175.3d", latch8_w)
843   AM_RANGE(0x1480, 0x1480) AM_READ_PORT("IN1")
844   AM_RANGE(0x1500, 0x1500) AM_READ(dkong_in2_r)                                 /* IN2 */
845   AM_RANGE(0x1500, 0x1507) AM_DEVWRITE("ls259.6h", latch8_bit0_w)       /* Sound signals */
846   AM_RANGE(0x1580, 0x1580) AM_READ_PORT("DSW0") AM_WRITE(dkong_audio_irq_w)     /* DSW0 */
847   AM_RANGE(0x1582, 0x1582) AM_WRITE(dkong_flipscreen_w)
848   AM_RANGE(0x1583, 0x1583) AM_WRITE(dkong_spritebank_w)                    /* 2 PSL Signal */
849   AM_RANGE(0x1584, 0x1584) AM_NOP                                               /* Possibly still interupt enable */
850   AM_RANGE(0x1585, 0x1585) AM_DEVWRITE("dma8257", p8257_drq_w)        /* P8257 ==> /DRQ0 /DRQ1 */
851   AM_RANGE(0x1586, 0x1587) AM_WRITE(dkong_palettebank_w)
852   AM_RANGE(0x1600, 0x17ff) AM_RAM                                               /* 0x6400  spriteram location */
853   AM_RANGE(0x1800, 0x1bff) AM_RAM_WRITE(dkong_videoram_w)
854                           AM_BASE_MEMBER(dkong_state, video_ram)        /* 0x7400 */
855   AM_RANGE(0x1C00, 0x1f7f) AM_RAM                                               /* 0x6000 */
856   AM_RANGE(0x1f80, 0x1f8f) AM_DEVREADWRITE("dma8257", dma8257_r, dma8257_w)   /* P8257 control registers */
857   /* 0x6800 not remapped */
858   AM_RANGE(0x2000, 0x2fff) AM_ROM
859   AM_RANGE(0x3000, 0x3fff) AM_READWRITE(s2650_mirror_r, s2650_mirror_w)
860   AM_RANGE(0x4000, 0x4fff) AM_ROM
861   AM_RANGE(0x5000, 0x5fff) AM_READWRITE(s2650_mirror_r, s2650_mirror_w)
862   AM_RANGE(0x6000, 0x6fff) AM_ROM
863   AM_RANGE(0x7000, 0x7fff) AM_READWRITE(s2650_mirror_r, s2650_mirror_w)
839    AM_RANGE(0x0000, 0x0fff) AM_ROM
840    AM_RANGE(0x1000, 0x13ff) AM_RAM AM_BASE_MEMBER(dkong_state, sprite_ram)
841                                    AM_SIZE_MEMBER(dkong_state, sprite_ram_size)  /* 0x7000 */
842    AM_RANGE(0x1400, 0x1400) AM_READ_PORT("IN0") AM_DEVWRITE("ls175.3d", latch8_w)
843    AM_RANGE(0x1480, 0x1480) AM_READ_PORT("IN1")
844    AM_RANGE(0x1500, 0x1500) AM_READ(dkong_in2_r)                                 /* IN2 */
845    AM_RANGE(0x1500, 0x1507) AM_DEVWRITE("ls259.6h", latch8_bit0_w)       /* Sound signals */
846    AM_RANGE(0x1580, 0x1580) AM_READ_PORT("DSW0") AM_WRITE(dkong_audio_irq_w)     /* DSW0 */
847    AM_RANGE(0x1582, 0x1582) AM_WRITE(dkong_flipscreen_w)
848    AM_RANGE(0x1583, 0x1583) AM_WRITE(dkong_spritebank_w)                         /* 2 PSL Signal */
849    AM_RANGE(0x1584, 0x1584) AM_NOP                                               /* Possibly still interupt enable */
850    AM_RANGE(0x1585, 0x1585) AM_DEVWRITE("dma8257", p8257_drq_w)          /* P8257 ==> /DRQ0 /DRQ1 */
851    AM_RANGE(0x1586, 0x1587) AM_WRITE(dkong_palettebank_w)
852    AM_RANGE(0x1600, 0x17ff) AM_RAM                                               /* 0x6400  spriteram location */
853    AM_RANGE(0x1800, 0x1bff) AM_RAM_WRITE(dkong_videoram_w)
854                                    AM_BASE_MEMBER(dkong_state, video_ram)        /* 0x7400 */
855    AM_RANGE(0x1C00, 0x1f7f) AM_RAM                                               /* 0x6000 */
856    AM_RANGE(0x1f80, 0x1f8f) AM_DEVREADWRITE("dma8257", dma8257_r, dma8257_w)   /* P8257 control registers */
857    /* 0x6800 not remapped */
858    AM_RANGE(0x2000, 0x2fff) AM_ROM
859    AM_RANGE(0x3000, 0x3fff) AM_READWRITE(s2650_mirror_r, s2650_mirror_w)
860    AM_RANGE(0x4000, 0x4fff) AM_ROM
861    AM_RANGE(0x5000, 0x5fff) AM_READWRITE(s2650_mirror_r, s2650_mirror_w)
862    AM_RANGE(0x6000, 0x6fff) AM_ROM
863    AM_RANGE(0x7000, 0x7fff) AM_READWRITE(s2650_mirror_r, s2650_mirror_w)
864864ADDRESS_MAP_END
865865
866866static ADDRESS_MAP_START( s2650_io_map, ADDRESS_SPACE_IO, 8 )
867   AM_RANGE(0x00, 0x00) AM_READ(s2650_port0_r)
868   AM_RANGE(0x01, 0x01) AM_READ(s2650_port1_r)
869   AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE")
870   AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_WRITE(s2650_data_w)
867    AM_RANGE(0x00, 0x00) AM_READ(s2650_port0_r)
868    AM_RANGE(0x01, 0x01) AM_READ(s2650_port1_r)
869    AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE")
870    AM_RANGE(S2650_DATA_PORT, S2650_DATA_PORT) AM_WRITE(s2650_data_w)
871871ADDRESS_MAP_END
872872
873873
r5046r5047
879879 *************************************/
880880
881881static INPUT_PORTS_START( radarscp_in0_2 )
882   PORT_START("IN0")      /* IN0 */
883   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
884   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
885   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */
886   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */
887   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
888   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */
889   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */
890   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */
882    PORT_START("IN0")      /* IN0 */
883    PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
884    PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
885    PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */
886    PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */
887    PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
888    PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */
889    PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */
890    PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not connected - held to high */
891891INPUT_PORTS_END
892892
893893static INPUT_PORTS_START( radarscp_in1_2 )
894   PORT_START("IN1")      /* IN1 */
895   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL
896   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL
897   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_COCKTAIL /* not connected - held to high */
898   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_COCKTAIL /* not connected - held to high */
899   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
900   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
901   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
902   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
894    PORT_START("IN1")      /* IN1 */
895    PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL
896    PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL
897    PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_COCKTAIL /* not connected - held to high */
898    PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_COCKTAIL /* not connected - held to high */
899    PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
900    PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
901    PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
902    PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
903903INPUT_PORTS_END
904904
905905static INPUT_PORTS_START( dkong_in0_4 )
906   PORT_START("IN0")      /* IN0 */
907   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY
908   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY
909   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY
910   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY
911   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
912   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
913   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
914   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
906    PORT_START("IN0")      /* IN0 */
907    PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY
908    PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY
909    PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY
910    PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY
911    PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
912    PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
913    PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
914    PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
915915INPUT_PORTS_END
916916
917917static INPUT_PORTS_START( dkong_in1_4 )
918   PORT_START("IN1")      /* IN1 */
919   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
920   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
921   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
922   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
923   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
924   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
925   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
926   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
918    PORT_START("IN1")      /* IN1 */
919    PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
920    PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
921    PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
922    PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
923    PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
924    PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
925    PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
926    PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
927927INPUT_PORTS_END
928928
929929static INPUT_PORTS_START( dkong_in0_8 )
930   PORT_START("IN0")      /* IN0 */
931   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
932   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
933   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
934   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
935   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
936   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
937   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
938   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
930    PORT_START("IN0")      /* IN0 */
931    PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
932    PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
933    PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
934    PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
935    PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
936    PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
937    PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
938    PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
939939INPUT_PORTS_END
940940
941941static INPUT_PORTS_START( dkong_in1_8 )
942   PORT_START("IN1")      /* IN1 */
943   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
944   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
945   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
946   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
947   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
948   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
949   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
950   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
942    PORT_START("IN1")      /* IN1 */
943    PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
944    PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
945    PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
946    PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
947    PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
948    PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
949    PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
950    PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* not connected - held to high */
951951INPUT_PORTS_END
952952
953953static INPUT_PORTS_START( dkong_in2 )
954   /* Bit 0x80 is (SERVICE OR COIN) !
954    /* Bit 0x80 is (SERVICE OR COIN) !
955955     * Bit 0x01 is going to the connector but it is not labeled
956956     * It should be a IPT_UNKNOWN. In fact, it will reset the game.
957957     */
958   PORT_START("IN2")      /* IN2 */
959   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN  ) /* connection not labeled in schematics - reset */
960   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* connection not labeled in schematics - freeze or reset */
961   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
962   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
963   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SERVICE )    /* not connected - held to high - used as service */
964   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )   /* not connected - held to high */
965   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL )   /* status from sound cpu */
966   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
958    PORT_START("IN2")      /* IN2 */
959    PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN  ) /* connection not labeled in schematics - reset */
960    PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* connection not labeled in schematics - freeze or reset */
961    PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
962    PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
963    PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SERVICE )   /* not connected - held to high - used as service */
964    PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )   /* not connected - held to high */
965    PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL )   /* status from sound cpu */
966    PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
967967INPUT_PORTS_END
968968
969969static INPUT_PORTS_START( dkong_dsw0 )
970   PORT_START("DSW0")      /* DSW0 */
971   PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )      PORT_DIPLOCATION( "SW1:!1,!2" )
972   PORT_DIPSETTING(    0x00, "3" )
973   PORT_DIPSETTING(    0x01, "4" )
974   PORT_DIPSETTING(    0x02, "5" )
975   PORT_DIPSETTING(    0x03, "6" )
976   PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )   PORT_DIPLOCATION( "SW1:!3,!4" )
977   PORT_DIPSETTING(    0x00, "7000" )
978   PORT_DIPSETTING(    0x04, "10000" )
979   PORT_DIPSETTING(    0x08, "15000" )
980   PORT_DIPSETTING(    0x0c, "20000" )
981   PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) )      PORT_DIPLOCATION( "SW1:!5,!6,!7" )
982   PORT_DIPSETTING(    0x70, DEF_STR( 5C_1C ) )
983   PORT_DIPSETTING(    0x50, DEF_STR( 4C_1C ) )
984   PORT_DIPSETTING(    0x30, DEF_STR( 3C_1C ) )
985   PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
986   PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
987   PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) )
988   PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
989   PORT_DIPSETTING(    0x60, DEF_STR( 1C_4C ) )
990   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )      PORT_DIPLOCATION( "SW1:!8" )
991   PORT_DIPSETTING(    0x80, DEF_STR( Upright ) )
992   PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
970    PORT_START("DSW0")      /* DSW0 */
971    PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )        PORT_DIPLOCATION( "SW1:!1,!2" )
972    PORT_DIPSETTING(    0x00, "3" )
973    PORT_DIPSETTING(    0x01, "4" )
974    PORT_DIPSETTING(    0x02, "5" )
975    PORT_DIPSETTING(    0x03, "6" )
976    PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )   PORT_DIPLOCATION( "SW1:!3,!4" )
977    PORT_DIPSETTING(    0x00, "7000" )
978    PORT_DIPSETTING(    0x04, "10000" )
979    PORT_DIPSETTING(    0x08, "15000" )
980    PORT_DIPSETTING(    0x0c, "20000" )
981    PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) )      PORT_DIPLOCATION( "SW1:!5,!6,!7" )
982    PORT_DIPSETTING(    0x70, DEF_STR( 5C_1C ) )
983    PORT_DIPSETTING(    0x50, DEF_STR( 4C_1C ) )
984    PORT_DIPSETTING(    0x30, DEF_STR( 3C_1C ) )
985    PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
986    PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
987    PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) )
988    PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
989    PORT_DIPSETTING(    0x60, DEF_STR( 1C_4C ) )
990    PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )      PORT_DIPLOCATION( "SW1:!8" )
991    PORT_DIPSETTING(    0x80, DEF_STR( Upright ) )
992    PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
993993INPUT_PORTS_END
994994
995995static INPUT_PORTS_START( dkong_config )
996   PORT_START("VR2")
997   PORT_ADJUSTER( 90, "VR2 - DAC Volume" )
996    PORT_START("VR2")
997    PORT_ADJUSTER( 90, "VR2 - DAC Volume" )
998998
999   PORT_START("VIDHW")
1000   PORT_CONFNAME( 0x01, 0x01, "Video Hardware" )
1001   PORT_CONFSETTING(    0x00, "TKG-02 (Radarscope Conversion)" )
1002   PORT_CONFSETTING(    0x01, "TKG-04 (Two board set)" )
999    PORT_START("VIDHW")
1000    PORT_CONFNAME( 0x01, 0x01, "Video Hardware" )
1001    PORT_CONFSETTING(    0x00, "TKG-02 (Radarscope Conversion)" )
1002    PORT_CONFSETTING(    0x01, "TKG-04 (Two board set)" )
10031003INPUT_PORTS_END
10041004
10051005static INPUT_PORTS_START( dkong )
1006   PORT_INCLUDE( dkong_in0_4 )
1007   PORT_INCLUDE( dkong_in1_4 )
1008   PORT_INCLUDE( dkong_in2 )
1009   PORT_INCLUDE( dkong_dsw0 )
1006    PORT_INCLUDE( dkong_in0_4 )
1007    PORT_INCLUDE( dkong_in1_4 )
1008    PORT_INCLUDE( dkong_in2 )
1009    PORT_INCLUDE( dkong_dsw0 )
10101010
1011   PORT_INCLUDE( dkong_config )
1011    PORT_INCLUDE( dkong_config )
10121012INPUT_PORTS_END
10131013
10141014static INPUT_PORTS_START( dkongf )
1015   PORT_INCLUDE( dkong )
1015    PORT_INCLUDE( dkong )
10161016
1017   PORT_MODIFY("DSW0")
1018   PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) )      PORT_DIPLOCATION( "SW1:!5,!6,!7" )
1019   PORT_DIPSETTING(    0x70, DEF_STR( Free_Play ) )
1020   PORT_DIPSETTING(    0x50, DEF_STR( 4C_1C ) )
1021   PORT_DIPSETTING(    0x30, DEF_STR( 3C_1C ) )
1022   PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
1023   PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
1024   PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) )
1025   PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
1026   PORT_DIPSETTING(    0x60, DEF_STR( 1C_4C ) )
1017    PORT_MODIFY("DSW0")
1018    PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) )      PORT_DIPLOCATION( "SW1:!5,!6,!7" )
1019    PORT_DIPSETTING(    0x70, DEF_STR( Free_Play ) )
1020    PORT_DIPSETTING(    0x50, DEF_STR( 4C_1C ) )
1021    PORT_DIPSETTING(    0x30, DEF_STR( 3C_1C ) )
1022    PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
1023    PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
1024    PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) )
1025    PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
1026    PORT_DIPSETTING(    0x60, DEF_STR( 1C_4C ) )
10271027INPUT_PORTS_END
10281028
10291029static INPUT_PORTS_START( radarscp )
1030   PORT_INCLUDE( radarscp_in0_2 )
1031   PORT_INCLUDE( radarscp_in1_2 )
1030    PORT_INCLUDE( radarscp_in0_2 )
1031    PORT_INCLUDE( radarscp_in1_2 )
10321032
1033   PORT_INCLUDE( dkong_in2 )
1033    PORT_INCLUDE( dkong_in2 )
10341034
1035   PORT_INCLUDE( dkong_dsw0 )
1035    PORT_INCLUDE( dkong_dsw0 )
10361036
1037   PORT_START("VR2")
1038   PORT_ADJUSTER( 35, "VR2 - DAC Volume" )
1037    PORT_START("VR2")
1038    PORT_ADJUSTER( 35, "VR2 - DAC Volume" )
10391039
10401040INPUT_PORTS_END
10411041
10421042static INPUT_PORTS_START( dkong3 )
1043   PORT_START("IN0")      /* IN0 */
1044   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY
1045   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY
1046   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY
1047   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY
1048   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
1049   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
1050   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 )
1051   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN3 )
1043    PORT_START("IN0")      /* IN0 */
1044    PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY
1045    PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY
1046    PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY
1047    PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY
1048    PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
1049    PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
1050    PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START2 )
1051    PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN3 )
10521052
1053   PORT_START("IN1")      /* IN1 */
1054   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
1055   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
1056   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
1057   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
1058   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
1059   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
1060   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1)
1061   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1053    PORT_START("IN1")      /* IN1 */
1054    PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
1055    PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_COCKTAIL
1056    PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
1057    PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
1058    PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
1059    PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1)
1060    PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(1)
1061    PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
10621062
1063   PORT_START("DSW0")      /* DSW0 */
1064   PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coinage ) )         PORT_DIPLOCATION("SW2:!1,!2,!3")
1065   PORT_DIPSETTING(    0x02, DEF_STR( 3C_1C ) )
1066   PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
1067   PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
1068   PORT_DIPSETTING(    0x06, DEF_STR( 1C_2C ) )
1069   PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
1070   PORT_DIPSETTING(    0x03, DEF_STR( 1C_4C ) )
1071   PORT_DIPSETTING(    0x05, DEF_STR( 1C_5C ) )
1072   PORT_DIPSETTING(    0x07, DEF_STR( 1C_6C ) )
1073   PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW2:!4" )
1074   PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x00, "SW2:!5" )
1075   PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x00, "SW2:!6" )
1076   PORT_SERVICE_DIPLOC( 0x40, IP_ACTIVE_HIGH, "SW2:!7" )
1077   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )         PORT_DIPLOCATION("SW2:!8")
1078   PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
1079   PORT_DIPSETTING(    0x80, DEF_STR( Cocktail ) )
1063    PORT_START("DSW0")      /* DSW0 */
1064    PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coinage ) )          PORT_DIPLOCATION("SW2:!1,!2,!3")
1065    PORT_DIPSETTING(    0x02, DEF_STR( 3C_1C ) )
1066    PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
1067    PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
1068    PORT_DIPSETTING(    0x06, DEF_STR( 1C_2C ) )
1069    PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
1070    PORT_DIPSETTING(    0x03, DEF_STR( 1C_4C ) )
1071    PORT_DIPSETTING(    0x05, DEF_STR( 1C_5C ) )
1072    PORT_DIPSETTING(    0x07, DEF_STR( 1C_6C ) )
1073    PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW2:!4" )
1074    PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x00, "SW2:!5" )
1075    PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x00, "SW2:!6" )
1076    PORT_SERVICE_DIPLOC( 0x40, IP_ACTIVE_HIGH, "SW2:!7" )
1077    PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )          PORT_DIPLOCATION("SW2:!8")
1078    PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
1079    PORT_DIPSETTING(    0x80, DEF_STR( Cocktail ) )
10801080
1081   PORT_START("DSW1")      /* DSW1 */
1082   PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )         PORT_DIPLOCATION("SW1:!1,!2")
1083   PORT_DIPSETTING(    0x00, "3" )
1084   PORT_DIPSETTING(    0x01, "4" )
1085   PORT_DIPSETTING(    0x02, "5" )
1086   PORT_DIPSETTING(    0x03, "6" )
1087   PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )      PORT_DIPLOCATION("SW1:!3,!4")
1088   PORT_DIPSETTING(    0x00, "30000" )
1089   PORT_DIPSETTING(    0x04, "40000" )
1090   PORT_DIPSETTING(    0x08, "50000" )
1091   PORT_DIPSETTING(    0x0c, DEF_STR( None ) )
1092   PORT_DIPNAME( 0x30, 0x00, "Additional Bonus" )         PORT_DIPLOCATION("SW1:!5,!6")
1093   PORT_DIPSETTING(    0x00, "30000" )
1094   PORT_DIPSETTING(    0x10, "40000" )
1095   PORT_DIPSETTING(    0x20, "50000" )
1096   PORT_DIPSETTING(    0x30, DEF_STR( None ) )
1097   PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Difficulty ) )      PORT_DIPLOCATION("SW1:!7,!8")
1098   PORT_DIPSETTING(    0x00, DEF_STR( Easy ) )
1099   PORT_DIPSETTING(    0x40, DEF_STR( Medium ) )
1100   PORT_DIPSETTING(    0x80, DEF_STR( Hard ) )
1101   PORT_DIPSETTING(    0xc0, DEF_STR( Hardest ) )
1081    PORT_START("DSW1")      /* DSW1 */
1082    PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )            PORT_DIPLOCATION("SW1:!1,!2")
1083    PORT_DIPSETTING(    0x00, "3" )
1084    PORT_DIPSETTING(    0x01, "4" )
1085    PORT_DIPSETTING(    0x02, "5" )
1086    PORT_DIPSETTING(    0x03, "6" )
1087    PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )       PORT_DIPLOCATION("SW1:!3,!4")
1088    PORT_DIPSETTING(    0x00, "30000" )
1089    PORT_DIPSETTING(    0x04, "40000" )
1090    PORT_DIPSETTING(    0x08, "50000" )
1091    PORT_DIPSETTING(    0x0c, DEF_STR( None ) )
1092    PORT_DIPNAME( 0x30, 0x00, "Additional Bonus" )          PORT_DIPLOCATION("SW1:!5,!6")
1093    PORT_DIPSETTING(    0x00, "30000" )
1094    PORT_DIPSETTING(    0x10, "40000" )
1095    PORT_DIPSETTING(    0x20, "50000" )
1096    PORT_DIPSETTING(    0x30, DEF_STR( None ) )
1097    PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Difficulty ) )       PORT_DIPLOCATION("SW1:!7,!8")
1098    PORT_DIPSETTING(    0x00, DEF_STR( Easy ) )
1099    PORT_DIPSETTING(    0x40, DEF_STR( Medium ) )
1100    PORT_DIPSETTING(    0x80, DEF_STR( Hard ) )
1101    PORT_DIPSETTING(    0xc0, DEF_STR( Hardest ) )
11021102INPUT_PORTS_END
11031103
11041104static INPUT_PORTS_START( dkong3b )
1105   PORT_INCLUDE( dkong_in0_4 )
1106   PORT_INCLUDE( dkong_in1_4 )
1105    PORT_INCLUDE( dkong_in0_4 )
1106    PORT_INCLUDE( dkong_in1_4 )
11071107
1108   PORT_INCLUDE( dkong_in2 )
1108    PORT_INCLUDE( dkong_in2 )
11091109
1110   PORT_START("DSW0")      /* DSW0 */
1111   PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coinage ) )         PORT_DIPLOCATION("SW1:!1,!2,!3")
1112   PORT_DIPSETTING(    0x02, DEF_STR( 3C_1C ) )
1113   PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
1114   PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
1115   PORT_DIPSETTING(    0x06, DEF_STR( 1C_2C ) )
1116   PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
1117   PORT_DIPSETTING(    0x03, DEF_STR( 1C_4C ) )
1118   PORT_DIPSETTING(    0x05, DEF_STR( 1C_5C ) )
1119   PORT_DIPSETTING(    0x07, DEF_STR( 1C_6C ) )
1120   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) )         PORT_DIPLOCATION("SW1:!4")
1121   PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
1122   PORT_DIPSETTING(    0x08, DEF_STR( Cocktail ) )
1123   PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x00, "SW1:!5" )
1124   PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x00, "SW1:!6" )
1125   PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x00, "SW1:!7" )
1126   PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x00, "SW1:!8" )
1110    PORT_START("DSW0")      /* DSW0 */
1111    PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coinage ) )          PORT_DIPLOCATION("SW1:!1,!2,!3")
1112    PORT_DIPSETTING(    0x02, DEF_STR( 3C_1C ) )
1113    PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
1114    PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
1115    PORT_DIPSETTING(    0x06, DEF_STR( 1C_2C ) )
1116    PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
1117    PORT_DIPSETTING(    0x03, DEF_STR( 1C_4C ) )
1118    PORT_DIPSETTING(    0x05, DEF_STR( 1C_5C ) )
1119    PORT_DIPSETTING(    0x07, DEF_STR( 1C_6C ) )
1120    PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) )          PORT_DIPLOCATION("SW1:!4")
1121    PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
1122    PORT_DIPSETTING(    0x08, DEF_STR( Cocktail ) )
1123    PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x00, "SW1:!5" )
1124    PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x00, "SW1:!6" )
1125    PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x00, "SW1:!7" )
1126    PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x00, "SW1:!8" )
11271127INPUT_PORTS_END
11281128
11291129static INPUT_PORTS_START( dkongjr )
1130   PORT_INCLUDE( dkong_in0_4 )
1131   PORT_INCLUDE( dkong_in1_4 )
1132   PORT_INCLUDE( dkong_in2 )
1133   PORT_INCLUDE( dkong_dsw0 )
1130    PORT_INCLUDE( dkong_in0_4 )
1131    PORT_INCLUDE( dkong_in1_4 )
1132    PORT_INCLUDE( dkong_in2 )
1133    PORT_INCLUDE( dkong_dsw0 )
11341134
11351135#if DEBUG_DISC_SOUND
1136   PORT_START("TST")      /* TST */
1137   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CODE(KEYCODE_A)
1138   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CODE(KEYCODE_B)
1136    PORT_START("TST")      /* TST */
1137    PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CODE(KEYCODE_A)
1138    PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CODE(KEYCODE_B)
11391139#endif
11401140INPUT_PORTS_END
11411141
11421142static INPUT_PORTS_START( hunchbkd )
11431143
1144   PORT_INCLUDE( dkong_in0_8 )
1145   PORT_INCLUDE( dkong_in1_8 )
1144    PORT_INCLUDE( dkong_in0_8 )
1145    PORT_INCLUDE( dkong_in1_8 )
11461146
1147   PORT_INCLUDE( dkong_in2 )
1148   PORT_MODIFY("IN2")
1149   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
1150   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1151   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
1147    PORT_INCLUDE( dkong_in2 )
1148    PORT_MODIFY("IN2")
1149    PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
1150    PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1151    PORT_DIPSETTING(    0x01, DEF_STR( On ) )
11521152
1153   PORT_INCLUDE( dkong_dsw0 )
1154   PORT_MODIFY("DSW0")
1155   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )      PORT_DIPLOCATION( "SW1:!1" )
1156   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1157   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
1158   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) )      PORT_DIPLOCATION( "SW1:!2" )
1159   PORT_DIPSETTING(    0x00, "3" )
1160   PORT_DIPSETTING(    0x02, "5" )
1161   PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )   PORT_DIPLOCATION( "SW1:!3,!4" )
1162   PORT_DIPSETTING(    0x00, "10000" )
1163   PORT_DIPSETTING(    0x04, "20000" )
1164   PORT_DIPSETTING(    0x08, "40000" )
1165   PORT_DIPSETTING(    0x0c, "80000" )
1153    PORT_INCLUDE( dkong_dsw0 )
1154    PORT_MODIFY("DSW0")
1155    PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )      PORT_DIPLOCATION( "SW1:!1" )
1156    PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1157    PORT_DIPSETTING(    0x01, DEF_STR( On ) )
1158    PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) )        PORT_DIPLOCATION( "SW1:!2" )
1159    PORT_DIPSETTING(    0x00, "3" )
1160    PORT_DIPSETTING(    0x02, "5" )
1161    PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Bonus_Life ) )   PORT_DIPLOCATION( "SW1:!3,!4" )
1162    PORT_DIPSETTING(    0x00, "10000" )
1163    PORT_DIPSETTING(    0x04, "20000" )
1164    PORT_DIPSETTING(    0x08, "40000" )
1165    PORT_DIPSETTING(    0x0c, "80000" )
11661166
1167   PORT_START("SENSE") /* Sense */
1168   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
1167    PORT_START("SENSE") /* Sense */
1168    PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
11691169
1170   PORT_INCLUDE( dkong_config )
1170    PORT_INCLUDE( dkong_config )
11711171INPUT_PORTS_END
11721172
11731173static INPUT_PORTS_START( shootgal )
1174   PORT_START("IN0")      /* IN0 */
1175   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(4) PORT_REVERSE
1174    PORT_START("IN0")      /* IN0 */
1175    PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(4) PORT_REVERSE
11761176
1177   PORT_START("IN1")      /* IN1 */
1178   PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(4) PORT_REVERSE
1177    PORT_START("IN1")      /* IN1 */
1178    PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(4) PORT_REVERSE
11791179
1180   PORT_INCLUDE( dkong_in2 )
1181   PORT_MODIFY("IN2")
1182   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Start 1 / P1 Button 1") PORT_PLAYER(1)
1183   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Start 2 / P1 Button 2") PORT_PLAYER(1)
1184   /* PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) */
1185   /* PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) */
1180    PORT_INCLUDE( dkong_in2 )
1181    PORT_MODIFY("IN2")
1182    PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Start 1 / P1 Button 1") PORT_PLAYER(1)
1183    PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Start 2 / P1 Button 2") PORT_PLAYER(1)
1184    /* PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) */
1185    /* PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) */
11861186
1187   PORT_START("DSW0")      /* DSW0 */
1188   PORT_DIPNAME( 0x01, 0x00, "1" )
1189   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1190   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
1191   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
1192   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1193   PORT_DIPSETTING(    0x02, DEF_STR( On ) )
1194   PORT_DIPNAME( 0x04, 0x00, "Time" )
1195   PORT_DIPSETTING(    0x00, "60" )
1196   PORT_DIPSETTING(    0x04, "100" )
1197   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
1198   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1199   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
1200   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
1201   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1202   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
1203   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
1204   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1205   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
1206   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
1207   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1208   PORT_DIPSETTING(    0x40, DEF_STR( On ) )
1209   PORT_SERVICE( 0x80, IP_ACTIVE_HIGH )
1187    PORT_START("DSW0")      /* DSW0 */
1188    PORT_DIPNAME( 0x01, 0x00, "1" )
1189    PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1190    PORT_DIPSETTING(    0x01, DEF_STR( On ) )
1191    PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
1192    PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1193    PORT_DIPSETTING(    0x02, DEF_STR( On ) )
1194    PORT_DIPNAME( 0x04, 0x00, "Time" )
1195    PORT_DIPSETTING(    0x00, "60" )
1196    PORT_DIPSETTING(    0x04, "100" )
1197    PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
1198    PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1199    PORT_DIPSETTING(    0x08, DEF_STR( On ) )
1200    PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
1201    PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1202    PORT_DIPSETTING(    0x10, DEF_STR( On ) )
1203    PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
1204    PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1205    PORT_DIPSETTING(    0x20, DEF_STR( On ) )
1206    PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
1207    PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1208    PORT_DIPSETTING(    0x40, DEF_STR( On ) )
1209    PORT_SERVICE( 0x80, IP_ACTIVE_HIGH )
12101210
1211   PORT_START("SENSE") /* Sense */
1212   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
1211    PORT_START("SENSE") /* Sense */
1212    PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
12131213
1214   PORT_INCLUDE( dkong_config )
1214    PORT_INCLUDE( dkong_config )
12151215INPUT_PORTS_END
12161216
12171217static INPUT_PORTS_START( sbdk )
1218   PORT_INCLUDE( dkong_in0_8 )
1219   PORT_MODIFY("IN0")
1220   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not used by clone */
1218    PORT_INCLUDE( dkong_in0_8 )
1219    PORT_MODIFY("IN0")
1220    PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not used by clone */
12211221
1222   PORT_INCLUDE( dkong_in1_8 )
1223   PORT_MODIFY("IN1")
1224   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not used by clone */
1225   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not used by clone */
1226   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not used by clone */
1227   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not used by clone */
1228   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not used by clone */
1222    PORT_INCLUDE( dkong_in1_8 )
1223    PORT_MODIFY("IN1")
1224    PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not used by clone */
1225    PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not used by clone */
1226    PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not used by clone */
1227    PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not used by clone */
1228    PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED ) /* not used by clone */
12291229
1230   PORT_INCLUDE( dkong_in2 )
1231   PORT_MODIFY("IN2")
1232   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Start 1 / P1 Button 1") PORT_PLAYER(1)
1233   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Start 2 / P1 Button 2") PORT_PLAYER(1)
1230    PORT_INCLUDE( dkong_in2 )
1231    PORT_MODIFY("IN2")
1232    PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Start 1 / P1 Button 1") PORT_PLAYER(1)
1233    PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Start 2 / P1 Button 2") PORT_PLAYER(1)
12341234
1235   PORT_INCLUDE( dkong_dsw0 )
1236   PORT_MODIFY("DSW0")
1237   PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x00, "SW1:!1" )
1238   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) )      PORT_DIPLOCATION( "SW1:!2" )
1239   PORT_DIPSETTING(    0x00, "3" )
1240   PORT_DIPSETTING(    0x02, "5" )
1241   PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "SW1:!3" )
1242   PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW1:!4" )
1235    PORT_INCLUDE( dkong_dsw0 )
1236    PORT_MODIFY("DSW0")
1237    PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x00, "SW1:!1" )
1238    PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) )        PORT_DIPLOCATION( "SW1:!2" )
1239    PORT_DIPSETTING(    0x00, "3" )
1240    PORT_DIPSETTING(    0x02, "5" )
1241    PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "SW1:!3" )
1242    PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW1:!4" )
12431243
1244   PORT_START("SENSE") /* Sense */
1245   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
1244    PORT_START("SENSE") /* Sense */
1245    PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
12461246
1247   PORT_INCLUDE( dkong_config )
1247    PORT_INCLUDE( dkong_config )
12481248INPUT_PORTS_END
12491249
12501250static INPUT_PORTS_START( herbiedk )
1251   PORT_INCLUDE( dkong_in0_8 )
1252   PORT_INCLUDE( dkong_in1_8 )
1251    PORT_INCLUDE( dkong_in0_8 )
1252    PORT_INCLUDE( dkong_in1_8 )
12531253
1254   PORT_INCLUDE( dkong_in2 )
1254    PORT_INCLUDE( dkong_in2 )
12551255
1256   PORT_INCLUDE( dkong_dsw0 )
1257   PORT_MODIFY("DSW0")
1258   PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x00, "SW1:!1" )
1259   PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x00, "SW1:!2" )
1260   PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "SW1:!3" )
1261   PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW1:!4" )
1256    PORT_INCLUDE( dkong_dsw0 )
1257    PORT_MODIFY("DSW0")
1258    PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x00, "SW1:!1" )
1259    PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x00, "SW1:!2" )
1260    PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "SW1:!3" )
1261    PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW1:!4" )
12621262
1263   PORT_START("SENSE") /* Sense */
1264   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK )
1263    PORT_START("SENSE") /* Sense */
1264    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK )
12651265
1266   PORT_INCLUDE( dkong_config )
1266    PORT_INCLUDE( dkong_config )
12671267INPUT_PORTS_END
12681268
12691269/* Notes :
r5046r5047
12721272*/
12731273
12741274static INPUT_PORTS_START( herodk )
1275   PORT_INCLUDE( dkong_in0_8 )
1276   PORT_MODIFY("IN0")
1277   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 )
1275    PORT_INCLUDE( dkong_in0_8 )
1276    PORT_MODIFY("IN0")
1277    PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 )
12781278
1279   PORT_INCLUDE( dkong_in1_8 )
1280   PORT_MODIFY("IN1")
1281   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL
1279    PORT_INCLUDE( dkong_in1_8 )
1280    PORT_MODIFY("IN1")
1281    PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL
12821282
1283   PORT_INCLUDE( dkong_in2 )
1283    PORT_INCLUDE( dkong_in2 )
12841284
1285   PORT_INCLUDE( dkong_dsw0 )
1286   PORT_MODIFY("DSW0")
1287   PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW1:!1" )
1288   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) )      PORT_DIPLOCATION( "SW1:!2" )
1289   PORT_DIPSETTING(    0x00, "3" )
1290   PORT_DIPSETTING(    0x02, "5" )
1291   PORT_DIPNAME( 0x0c, 0x00, "Difficulty?" )         PORT_DIPLOCATION( "SW1:!3,!4" ) /* Stored at 0x1c99 */
1292   PORT_DIPSETTING(    0x00, "0" )
1293   PORT_DIPSETTING(    0x04, "1" )
1294   PORT_DIPSETTING(    0x08, "2" )
1295   PORT_DIPSETTING(    0x0c, "3" )
1285    PORT_INCLUDE( dkong_dsw0 )
1286    PORT_MODIFY("DSW0")
1287    PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW1:!1" )
1288    PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) )        PORT_DIPLOCATION( "SW1:!2" )
1289    PORT_DIPSETTING(    0x00, "3" )
1290    PORT_DIPSETTING(    0x02, "5" )
1291    PORT_DIPNAME( 0x0c, 0x00, "Difficulty?" )           PORT_DIPLOCATION( "SW1:!3,!4" ) /* Stored at 0x1c99 */
1292    PORT_DIPSETTING(    0x00, "0" )
1293    PORT_DIPSETTING(    0x04, "1" )
1294    PORT_DIPSETTING(    0x08, "2" )
1295    PORT_DIPSETTING(    0x0c, "3" )
12961296
1297   PORT_START("SENSE") /* Sense */
1298   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
1297    PORT_START("SENSE") /* Sense */
1298    PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
12991299
1300   PORT_INCLUDE( dkong_config )
1300    PORT_INCLUDE( dkong_config )
13011301INPUT_PORTS_END
13021302
13031303
13041304static INPUT_PORTS_START( pestplce )
1305   PORT_START("IN0")      /* IN0 */
1306   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1)
1307   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1)
1308   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(1)
1309   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1)
1310   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
1311   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1312   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1313   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1305    PORT_START("IN0")      /* IN0 */
1306    PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1)
1307    PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1)
1308    PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(1)
1309    PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1)
1310    PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
1311    PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1312    PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1313    PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
13141314
1315   PORT_START("IN1")      /* IN1 */
1316   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2)
1317   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2)
1318   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(2)
1319   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2)
1320   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
1321   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1322   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1323   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1315    PORT_START("IN1")      /* IN1 */
1316    PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2)
1317    PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2)
1318    PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(2)
1319    PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2)
1320    PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
1321    PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1322    PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1323    PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
13241324
1325   PORT_INCLUDE( dkong_in2 )
1325    PORT_INCLUDE( dkong_in2 )
13261326
1327   PORT_START("DSW0")      /* DSW0 */
1328   PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
1329   PORT_DIPSETTING(    0x00, "3" )
1330   PORT_DIPSETTING(    0x01, "4" )
1331   PORT_DIPSETTING(    0x02, "5" )
1332   PORT_DIPSETTING(    0x03, "6" )
1333   PORT_DIPNAME( 0x1c, 0x00, DEF_STR( Coinage ) )
1334   PORT_DIPSETTING(    0x08, DEF_STR( 3C_1C ) )
1335   PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
1336   PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
1337   PORT_DIPSETTING(    0x18, DEF_STR( 1C_2C ) )
1338   PORT_DIPSETTING(    0x04, DEF_STR( 1C_3C ) )
1339   PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )
1340   PORT_DIPSETTING(    0x14, DEF_STR( 1C_5C ) )
1341   PORT_DIPSETTING(    0x1c, DEF_STR( 1C_6C ) )
1342   PORT_DIPNAME( 0x20, 0x20, "2 Players Game" )
1343   PORT_DIPSETTING(    0x00, "1 Credit" )
1344   PORT_DIPSETTING(    0x20, "2 Credits" )
1345   PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Bonus_Life ) )
1346   PORT_DIPSETTING(    0x00, "20000" )
1347   PORT_DIPSETTING(    0x40, "30000" )
1348   PORT_DIPSETTING(    0x80, "40000" )
1349   PORT_DIPSETTING(    0xc0, DEF_STR ( None ) )
1327    PORT_START("DSW0")      /* DSW0 */
1328    PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
1329    PORT_DIPSETTING(    0x00, "3" )
1330    PORT_DIPSETTING(    0x01, "4" )
1331    PORT_DIPSETTING(    0x02, "5" )
1332    PORT_DIPSETTING(    0x03, "6" )
1333    PORT_DIPNAME( 0x1c, 0x00, DEF_STR( Coinage ) )
1334    PORT_DIPSETTING(    0x08, DEF_STR( 3C_1C ) )
1335    PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
1336    PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
1337    PORT_DIPSETTING(    0x18, DEF_STR( 1C_2C ) )
1338    PORT_DIPSETTING(    0x04, DEF_STR( 1C_3C ) )
1339    PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )
1340    PORT_DIPSETTING(    0x14, DEF_STR( 1C_5C ) )
1341    PORT_DIPSETTING(    0x1c, DEF_STR( 1C_6C ) )
1342    PORT_DIPNAME( 0x20, 0x20, "2 Players Game" )
1343    PORT_DIPSETTING(    0x00, "1 Credit" )
1344    PORT_DIPSETTING(    0x20, "2 Credits" )
1345    PORT_DIPNAME( 0xc0, 0x00, DEF_STR( Bonus_Life ) )
1346    PORT_DIPSETTING(    0x00, "20000" )
1347    PORT_DIPSETTING(    0x40, "30000" )
1348    PORT_DIPSETTING(    0x80, "40000" )
1349    PORT_DIPSETTING(    0xc0, DEF_STR ( None ) )
13501350
1351   PORT_INCLUDE( dkong_config )
1351    PORT_INCLUDE( dkong_config )
13521352INPUT_PORTS_END
13531353
13541354
13551355static INPUT_PORTS_START( spclforc )
1356   PORT_INCLUDE( dkong_in0_8 )
1357   PORT_MODIFY("IN0")
1358   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1356    PORT_INCLUDE( dkong_in0_8 )
1357    PORT_MODIFY("IN0")
1358    PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
13591359
1360   PORT_INCLUDE( dkong_in1_8 )
1361   PORT_MODIFY("IN1")
1362   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL
1363   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
1360    PORT_INCLUDE( dkong_in1_8 )
1361    PORT_MODIFY("IN1")
1362    PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL
1363    PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
13641364
1365   PORT_INCLUDE( dkong_in2 )
1366   PORT_MODIFY("IN2")
1367   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Start 1 / P1 Button 1") PORT_PLAYER(1)
1368   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Start 2 / P1 Button 2") PORT_PLAYER(1)
1365    PORT_INCLUDE( dkong_in2 )
1366    PORT_MODIFY("IN2")
1367    PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Start 1 / P1 Button 1") PORT_PLAYER(1)
1368    PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Start 2 / P1 Button 2") PORT_PLAYER(1)
13691369
1370   PORT_START("DSW0")      /* DSW0 */
1371   PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
1372   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1373   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
1374   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
1375   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1376   PORT_DIPSETTING(    0x02, DEF_STR( On ) )
1377   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) )
1378   PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
1379   PORT_DIPSETTING(    0x04, DEF_STR( Cocktail ) )
1380   PORT_DIPNAME( 0x18, 0x00, DEF_STR( Bonus_Life ) )
1381   PORT_DIPSETTING(    0x00, "40000" )
1382   PORT_DIPSETTING(    0x08, "50000" )
1383   PORT_DIPSETTING(    0x10, "60000" )
1384   PORT_DIPSETTING(    0x18, "70000" )
1385   PORT_DIPNAME( 0xe0, 0x00, DEF_STR( Coinage ) )
1386   PORT_DIPSETTING(    0xe0, DEF_STR( 5C_1C ) )
1387   PORT_DIPSETTING(    0xa0, DEF_STR( 4C_1C ) )
1388   PORT_DIPSETTING(    0x60, DEF_STR( 3C_1C ) )
1389   PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
1390   PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
1391   PORT_DIPSETTING(    0x40, DEF_STR( 1C_2C ) )
1392   PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) )
1393   PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )
1370    PORT_START("DSW0")      /* DSW0 */
1371    PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
1372    PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1373    PORT_DIPSETTING(    0x01, DEF_STR( On ) )
1374    PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
1375    PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1376    PORT_DIPSETTING(    0x02, DEF_STR( On ) )
1377    PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) )
1378    PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
1379    PORT_DIPSETTING(    0x04, DEF_STR( Cocktail ) )
1380    PORT_DIPNAME( 0x18, 0x00, DEF_STR( Bonus_Life ) )
1381    PORT_DIPSETTING(    0x00, "40000" )
1382    PORT_DIPSETTING(    0x08, "50000" )
1383    PORT_DIPSETTING(    0x10, "60000" )
1384    PORT_DIPSETTING(    0x18, "70000" )
1385    PORT_DIPNAME( 0xe0, 0x00, DEF_STR( Coinage ) )
1386    PORT_DIPSETTING(    0xe0, DEF_STR( 5C_1C ) )
1387    PORT_DIPSETTING(    0xa0, DEF_STR( 4C_1C ) )
1388    PORT_DIPSETTING(    0x60, DEF_STR( 3C_1C ) )
1389    PORT_DIPSETTING(    0x20, DEF_STR( 2C_1C ) )
1390    PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
1391    PORT_DIPSETTING(    0x40, DEF_STR( 1C_2C ) )
1392    PORT_DIPSETTING(    0x80, DEF_STR( 1C_3C ) )
1393    PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )
13941394
1395   PORT_START("SENSE") /* Sense */
1396   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK )
1395    PORT_START("SENSE") /* Sense */
1396    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK )
13971397
1398   PORT_INCLUDE( dkong_config )
1398    PORT_INCLUDE( dkong_config )
13991399INPUT_PORTS_END
14001400
14011401
14021402static INPUT_PORTS_START( 8ballact )
1403   PORT_INCLUDE( dkong_in0_8 )
1404   PORT_INCLUDE( dkong_in1_8 )
1403    PORT_INCLUDE( dkong_in0_8 )
1404    PORT_INCLUDE( dkong_in1_8 )
14051405
1406   PORT_INCLUDE( dkong_in2 )
1406    PORT_INCLUDE( dkong_in2 )
14071407
1408   PORT_START("DSW0")      /* DSW0 */
1409   PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW1:!1" )
1410   PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW1:!2" )
1411   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION( "SW1:!3" )
1412   PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
1413   PORT_DIPSETTING(    0x04, DEF_STR( Cocktail ) )
1414   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:!4" )
1415   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1416   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
1417   PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION( "SW1:!5,!6,!7" )
1418   PORT_DIPSETTING(    0x70, DEF_STR( 5C_1C ) )
1419   PORT_DIPSETTING(    0x50, DEF_STR( 4C_1C ) )
1420   PORT_DIPSETTING(    0x30, DEF_STR( 3C_1C ) )
1421   PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
1422   PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
1423   PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) )
1424   PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
1425   PORT_DIPSETTING(    0x60, DEF_STR( 1C_4C ) )
1426   PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW1:!8" )
1408    PORT_START("DSW0")      /* DSW0 */
1409    PORT_DIPUNUSED_DIPLOC( 0x01, 0x01, "SW1:!1" )
1410    PORT_DIPUNUSED_DIPLOC( 0x02, 0x02, "SW1:!2" )
1411    PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION( "SW1:!3" )
1412    PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
1413    PORT_DIPSETTING(    0x04, DEF_STR( Cocktail ) )
1414    PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION( "SW1:!4" )
1415    PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1416    PORT_DIPSETTING(    0x08, DEF_STR( On ) )
1417    PORT_DIPNAME( 0x70, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION( "SW1:!5,!6,!7" )
1418    PORT_DIPSETTING(    0x70, DEF_STR( 5C_1C ) )
1419    PORT_DIPSETTING(    0x50, DEF_STR( 4C_1C ) )
1420    PORT_DIPSETTING(    0x30, DEF_STR( 3C_1C ) )
1421    PORT_DIPSETTING(    0x10, DEF_STR( 2C_1C ) )
1422    PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
1423    PORT_DIPSETTING(    0x20, DEF_STR( 1C_2C ) )
1424    PORT_DIPSETTING(    0x40, DEF_STR( 1C_3C ) )
1425    PORT_DIPSETTING(    0x60, DEF_STR( 1C_4C ) )
1426    PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW1:!8" )
14271427
1428   PORT_START("SENSE") /* Sense */
1429   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK )
1428    PORT_START("SENSE") /* Sense */
1429    PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_VBLANK )
14301430
1431   PORT_INCLUDE( dkong_config )
1431    PORT_INCLUDE( dkong_config )
14321432INPUT_PORTS_END
14331433
14341434static INPUT_PORTS_START( drakton )
1435   PORT_INCLUDE( dkong_in0_4 )
1436   PORT_INCLUDE( dkong_in1_4 )
1435    PORT_INCLUDE( dkong_in0_4 )
1436    PORT_INCLUDE( dkong_in1_4 )
14371437
1438   PORT_INCLUDE( dkong_in2 )
1438    PORT_INCLUDE( dkong_in2 )
14391439
1440   PORT_START("DSW0")      /* DSW0 */
1441   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Demo_Sounds ) )
1442   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1443   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
1444   PORT_DIPNAME( 0x06, 0x04, DEF_STR( Lives ) )
1445   PORT_DIPSETTING(    0x00, "3" )
1446   PORT_DIPSETTING(    0x02, "4" )
1447   PORT_DIPSETTING(    0x04, "5" )
1448   PORT_DIPSETTING(    0x06, "6" )
1449   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Difficulty ) )
1450   PORT_DIPSETTING(    0x00, DEF_STR( Easy ) )
1451   PORT_DIPSETTING(    0x08, DEF_STR( Normal ) )
1452   PORT_DIPNAME( 0x70, 0x10, DEF_STR( Bonus_Life ) )
1453   PORT_DIPSETTING(    0x00, "10000" )
1454   PORT_DIPSETTING(    0x10, "20000" )
1455   PORT_DIPSETTING(    0x20, "30000" )
1456   PORT_DIPSETTING(    0x30, "40000" )
1457   PORT_DIPSETTING(    0x40, "50000" )
1458   PORT_DIPSETTING(    0x50, "60000" )
1459   PORT_DIPSETTING(    0x60, "70000" )
1460   PORT_DIPSETTING(    0x70, "80000" )
1461   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )
1462   PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
1463   PORT_DIPSETTING(    0x80, DEF_STR( Cocktail ) )
1440    PORT_START("DSW0")      /* DSW0 */
1441    PORT_DIPNAME( 0x01, 0x01, DEF_STR( Demo_Sounds ) )
1442    PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1443    PORT_DIPSETTING(    0x01, DEF_STR( On ) )
1444    PORT_DIPNAME( 0x06, 0x04, DEF_STR( Lives ) )
1445    PORT_DIPSETTING(    0x00, "3" )
1446    PORT_DIPSETTING(    0x02, "4" )
1447    PORT_DIPSETTING(    0x04, "5" )
1448    PORT_DIPSETTING(    0x06, "6" )
1449    PORT_DIPNAME( 0x08, 0x08, DEF_STR( Difficulty ) )
1450    PORT_DIPSETTING(    0x00, DEF_STR( Easy ) )
1451    PORT_DIPSETTING(    0x08, DEF_STR( Normal ) )
1452    PORT_DIPNAME( 0x70, 0x10, DEF_STR( Bonus_Life ) )
1453    PORT_DIPSETTING(    0x00, "10000" )
1454    PORT_DIPSETTING(    0x10, "20000" )
1455    PORT_DIPSETTING(    0x20, "30000" )
1456    PORT_DIPSETTING(    0x30, "40000" )
1457    PORT_DIPSETTING(    0x40, "50000" )
1458    PORT_DIPSETTING(    0x50, "60000" )
1459    PORT_DIPSETTING(    0x60, "70000" )
1460    PORT_DIPSETTING(    0x70, "80000" )
1461    PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )
1462    PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
1463    PORT_DIPSETTING(    0x80, DEF_STR( Cocktail ) )
14641464
1465   PORT_INCLUDE( dkong_config )
1465    PORT_INCLUDE( dkong_config )
14661466INPUT_PORTS_END
14671467
14681468
14691469static INPUT_PORTS_START( strtheat )
1470   PORT_START("IN0")      /* IN0 */
1471   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
1472   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
1473   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 )
1474   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 )
1475   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 )
1476   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1477   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1478   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1470    PORT_START("IN0")      /* IN0 */
1471    PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
1472    PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
1473    PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 )
1474    PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 )
1475    PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 )
1476    PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1477    PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1478    PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
14791479
1480   PORT_START("IN1")      /* IN1 */
1481   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL
1482   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL
1483   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
1484   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL
1485   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_COCKTAIL
1486   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1487   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1488   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1480    PORT_START("IN1")      /* IN1 */
1481    PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL
1482    PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL
1483    PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
1484    PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL
1485    PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_COCKTAIL
1486    PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1487    PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1488    PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
14891489
1490   PORT_INCLUDE( dkong_in2 )
1490    PORT_INCLUDE( dkong_in2 )
14911491
1492   PORT_START("DSW0")      /* DSW0 */
1493   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Demo_Sounds ) )
1494   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1495   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
1496   PORT_DIPNAME( 0x06, 0x00, DEF_STR( Lives ) )
1497   PORT_DIPSETTING(    0x00, "3" )
1498   PORT_DIPSETTING(    0x02, "4" )
1499   PORT_DIPSETTING(    0x04, "5" )
1500   PORT_DIPSETTING(    0x06, "6" )
1501   PORT_DIPNAME( 0x38, 0x00, DEF_STR( Bonus_Life ) )
1502   PORT_DIPSETTING(    0x00, "10000" )
1503   PORT_DIPSETTING(    0x08, "20000" )
1504   PORT_DIPSETTING(    0x10, "30000" )
1505   PORT_DIPSETTING(    0x18, "40000" )
1506   PORT_DIPSETTING(    0x20, "50000" )
1507   PORT_DIPSETTING(    0x28, "60000" )
1508   PORT_DIPSETTING(    0x30, "70000" )
1509   PORT_DIPSETTING(    0x38, "80000" )
1510   PORT_DIPNAME( 0x40, 0x00,"Control type" )
1511   PORT_DIPSETTING(    0x00, "Steering Wheel" )
1512   PORT_DIPSETTING(    0x40, DEF_STR ( Joystick ) )
1513   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )
1514   PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
1515   PORT_DIPSETTING(    0x80, DEF_STR( Cocktail ) )
1492    PORT_START("DSW0")      /* DSW0 */
1493    PORT_DIPNAME( 0x01, 0x01, DEF_STR( Demo_Sounds ) )
1494    PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
1495    PORT_DIPSETTING(    0x01, DEF_STR( On ) )
1496    PORT_DIPNAME( 0x06, 0x00, DEF_STR( Lives ) )
1497    PORT_DIPSETTING(    0x00, "3" )
1498    PORT_DIPSETTING(    0x02, "4" )
1499    PORT_DIPSETTING(    0x04, "5" )
1500    PORT_DIPSETTING(    0x06, "6" )
1501    PORT_DIPNAME( 0x38, 0x00, DEF_STR( Bonus_Life ) )
1502    PORT_DIPSETTING(    0x00, "10000" )
1503    PORT_DIPSETTING(    0x08, "20000" )
1504    PORT_DIPSETTING(    0x10, "30000" )
1505    PORT_DIPSETTING(    0x18, "40000" )
1506    PORT_DIPSETTING(    0x20, "50000" )
1507    PORT_DIPSETTING(    0x28, "60000" )
1508    PORT_DIPSETTING(    0x30, "70000" )
1509    PORT_DIPSETTING(    0x38, "80000" )
1510    PORT_DIPNAME( 0x40, 0x00,"Control type" )
1511    PORT_DIPSETTING(    0x00, "Steering Wheel" )
1512    PORT_DIPSETTING(    0x40, DEF_STR ( Joystick ) )
1513    PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )
1514    PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
1515    PORT_DIPSETTING(    0x80, DEF_STR( Cocktail ) )
15161516
1517   PORT_START("IN4")      /* IN4 */
1518   PORT_BIT( 0x03, 0x00, IPT_DIAL ) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) PORT_REVERSE
1517    PORT_START("IN4")      /* IN4 */
1518    PORT_BIT( 0x03, 0x00, IPT_DIAL ) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) PORT_REVERSE
15191519
1520   PORT_START("IN5")      /* IN5 */
1521   PORT_BIT( 0x03, 0x00, IPT_DIAL ) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) PORT_REVERSE PORT_COCKTAIL
1520    PORT_START("IN5")      /* IN5 */
1521    PORT_BIT( 0x03, 0x00, IPT_DIAL ) PORT_SENSITIVITY(40) PORT_KEYDELTA(10) PORT_REVERSE PORT_COCKTAIL
15221522
1523   PORT_INCLUDE( dkong_config )
1523    PORT_INCLUDE( dkong_config )
15241524INPUT_PORTS_END
15251525
15261526/*************************************
r5046r5047
15311531
15321532static const gfx_layout spritelayout =
15331533{
1534   16,16,                                   /* 16*16 sprites */
1535   RGN_FRAC(1,4),                           /* 128 sprites */
1536   2,                                       /* 2 bits per pixel */
1537   { RGN_FRAC(1,2), RGN_FRAC(0,2) },       /* the two bitplanes are separated */
1538   { STEP8(0,1), STEP8(RGN_FRAC(1,4),1) }, /* the two halves of the sprite are separated */
1539   { STEP16(0,8) },
1540   16*8                                   /* every sprite takes 16 consecutive bytes */
1534    16,16,                                  /* 16*16 sprites */
1535    RGN_FRAC(1,4),                          /* 128 sprites */
1536    2,                                      /* 2 bits per pixel */
1537    { RGN_FRAC(1,2), RGN_FRAC(0,2) },       /* the two bitplanes are separated */
1538    { STEP8(0,1), STEP8(RGN_FRAC(1,4),1) }, /* the two halves of the sprite are separated */
1539    { STEP16(0,8) },
1540    16*8                                    /* every sprite takes 16 consecutive bytes */
15411541};
15421542
15431543static const gfx_layout pestplce_spritelayout =
15441544{
1545   16,16,                                   /* 16*16 sprites */
1546   RGN_FRAC(1,4),                           /* 256 sprites */
1547   2,                                       /* 2 bits per pixel */
1548   { RGN_FRAC(1,2), RGN_FRAC(0,2) },       /* the two bitplanes are separated */
1549   { STEP8(0,1), STEP8(RGN_FRAC(1,4),1) }, /* the two halves of the sprite are separated */
1550   { STEP16(0,8) },
1551   16*8                                   /* every sprite takes 16 consecutive bytes */
1545    16,16,                                  /* 16*16 sprites */
1546    RGN_FRAC(1,4),                          /* 256 sprites */
1547    2,                                      /* 2 bits per pixel */
1548    { RGN_FRAC(1,2), RGN_FRAC(0,2) },       /* the two bitplanes are separated */
1549    { STEP8(0,1), STEP8(RGN_FRAC(1,4),1) }, /* the two halves of the sprite are separated */
1550    { STEP16(0,8) },
1551    16*8                                    /* every sprite takes 16 consecutive bytes */
15521552};
15531553
15541554static GFXDECODE_START( dkong )
1555   GFXDECODE_ENTRY( "gfx1", 0x0000, gfx_8x8x2_planar,   0, 64 )
1556   GFXDECODE_ENTRY( "gfx2", 0x0000, spritelayout,       0, 64 )
1555    GFXDECODE_ENTRY( "gfx1", 0x0000, gfx_8x8x2_planar,   0, 64 )
1556    GFXDECODE_ENTRY( "gfx2", 0x0000, spritelayout,       0, 64 )
15571557GFXDECODE_END
15581558
15591559static GFXDECODE_START( pestplce )
1560   GFXDECODE_ENTRY( "gfx1", 0x0000, gfx_8x8x2_planar,         0, 64 )
1561   GFXDECODE_ENTRY( "gfx2", 0x0000, pestplce_spritelayout,   0, 64 )
1560    GFXDECODE_ENTRY( "gfx1", 0x0000, gfx_8x8x2_planar,         0, 64 )
1561    GFXDECODE_ENTRY( "gfx2", 0x0000, pestplce_spritelayout,   0, 64 )
15621562GFXDECODE_END
15631563
15641564
r5046r5047
15701570
15711571static MACHINE_DRIVER_START( dkong_base )
15721572
1573   /* driver data */
1574   MDRV_DRIVER_DATA(dkong_state)
1573    /* driver data */
1574    MDRV_DRIVER_DATA(dkong_state)
15751575
1576   /* basic machine hardware */
1577   MDRV_CPU_ADD("maincpu", Z80, CLOCK_1H)
1578   MDRV_CPU_PROGRAM_MAP(dkong_map)
1579   MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse)
1576    /* basic machine hardware */
1577    MDRV_CPU_ADD("maincpu", Z80, CLOCK_1H)
1578    MDRV_CPU_PROGRAM_MAP(dkong_map)
1579    MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse)
15801580
1581   MDRV_MACHINE_START(dkong2b)
1582   MDRV_MACHINE_RESET(dkong)
1581    MDRV_MACHINE_START(dkong2b)
1582    MDRV_MACHINE_RESET(dkong)
15831583
1584   MDRV_DMA8257_ADD("dma8257", CLOCK_1H, dk_dma)
1584    MDRV_DMA8257_ADD("dma8257", CLOCK_1H, dk_dma)
15851585
1586   /* video hardware */
1587   MDRV_SCREEN_ADD("screen", RASTER)
1588   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
1589   MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
1586    /* video hardware */
1587    MDRV_SCREEN_ADD("screen", RASTER)
1588    MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
1589    MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
15901590
1591   MDRV_GFXDECODE(dkong)
1592   MDRV_PALETTE_LENGTH(DK2B_PALETTE_LENGTH)
1591    MDRV_GFXDECODE(dkong)
1592    MDRV_PALETTE_LENGTH(DK2B_PALETTE_LENGTH)
15931593
1594   MDRV_PALETTE_INIT(dkong2b)
1595   MDRV_VIDEO_START(dkong)
1596   MDRV_VIDEO_UPDATE(dkong)
1594    MDRV_PALETTE_INIT(dkong2b)
1595    MDRV_VIDEO_START(dkong)
1596    MDRV_VIDEO_UPDATE(dkong)
15971597
15981598MACHINE_DRIVER_END
15991599
16001600static MACHINE_DRIVER_START( radarscp )
16011601
1602   MDRV_IMPORT_FROM(dkong_base)
1602    MDRV_IMPORT_FROM(dkong_base)
16031603
1604   MDRV_MACHINE_START(radarscp)
1605   MDRV_PALETTE_LENGTH(RS_PALETTE_LENGTH)
1606   MDRV_PALETTE_INIT(radarscp)
1604    MDRV_MACHINE_START(radarscp)
1605    MDRV_PALETTE_LENGTH(RS_PALETTE_LENGTH)
1606    MDRV_PALETTE_INIT(radarscp)
16071607
1608   /* sound hardware */
1609   MDRV_IMPORT_FROM(radarscp_audio)
1608    /* sound hardware */
1609    MDRV_IMPORT_FROM(radarscp_audio)
16101610
16111611MACHINE_DRIVER_END
16121612
16131613static MACHINE_DRIVER_START( radarsc1 )
16141614
1615   MDRV_IMPORT_FROM(dkong_base)
1615    MDRV_IMPORT_FROM(dkong_base)
16161616
1617   MDRV_MACHINE_START(radarsc1)
1618   MDRV_PALETTE_LENGTH(RS_PALETTE_LENGTH)
1619   MDRV_PALETTE_INIT(radarsc1)
1617    MDRV_MACHINE_START(radarsc1)
1618    MDRV_PALETTE_LENGTH(RS_PALETTE_LENGTH)
1619    MDRV_PALETTE_INIT(radarsc1)
16201620
1621   /* sound hardware */
1622   MDRV_IMPORT_FROM(radarsc1_audio)
1621    /* sound hardware */
1622    MDRV_IMPORT_FROM(radarsc1_audio)
16231623
16241624MACHINE_DRIVER_END
16251625
16261626
16271627static MACHINE_DRIVER_START( dkong2b )
16281628
1629   MDRV_IMPORT_FROM(dkong_base)
1629    MDRV_IMPORT_FROM(dkong_base)
16301630
1631   MDRV_MACHINE_START(dkong2b)
1632   MDRV_PALETTE_LENGTH(DK2B_PALETTE_LENGTH)
1631    MDRV_MACHINE_START(dkong2b)
1632    MDRV_PALETTE_LENGTH(DK2B_PALETTE_LENGTH)
16331633
1634   /* sound hardware */
1635   MDRV_IMPORT_FROM(dkong2b_audio)
1634    /* sound hardware */
1635    MDRV_IMPORT_FROM(dkong2b_audio)
16361636
16371637MACHINE_DRIVER_END
16381638
16391639static MACHINE_DRIVER_START( dkong3 )
16401640
1641   /* driver data */
1642   MDRV_DRIVER_DATA(dkong_state)
1641    /* driver data */
1642    MDRV_DRIVER_DATA(dkong_state)
16431643
1644   /* basic machine hardware */
1645   MDRV_CPU_ADD("maincpu", Z80, XTAL_8MHz / 2)   /* verified in schematics */
1646   MDRV_CPU_PROGRAM_MAP(dkong3_map)
1647   MDRV_CPU_IO_MAP(dkong3_io_map)
1648   MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse)
1644    /* basic machine hardware */
1645    MDRV_CPU_ADD("maincpu", Z80, XTAL_8MHz / 2) /* verified in schematics */
1646    MDRV_CPU_PROGRAM_MAP(dkong3_map)
1647    MDRV_CPU_IO_MAP(dkong3_io_map)
1648    MDRV_CPU_VBLANK_INT("screen", nmi_line_pulse)
16491649
1650   MDRV_MACHINE_START(dkong3)
1650    MDRV_MACHINE_START(dkong3)
16511651
1652   MDRV_Z80DMA_ADD("z80dma", CLOCK_1H, dk3_dma)
1652    MDRV_Z80DMA_ADD("z80dma", CLOCK_1H, dk3_dma)
16531653
1654   /* video hardware */
1655   MDRV_SCREEN_ADD("screen", RASTER)
1656   MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
1657   MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
1654    /* video hardware */
1655    MDRV_SCREEN_ADD("screen", RASTER)
1656    MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
1657    MDRV_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
16581658
1659   MDRV_GFXDECODE(dkong)
1660   MDRV_PALETTE_LENGTH(DK3_PALETTE_LENGTH)
1659    MDRV_GFXDECODE(dkong)
1660    MDRV_PALETTE_LENGTH(DK3_PALETTE_LENGTH)
16611661
1662   MDRV_PALETTE_INIT(dkong3)
1663   MDRV_VIDEO_START(dkong)
1664   MDRV_VIDEO_UPDATE(dkong)
1662    MDRV_PALETTE_INIT(dkong3)
1663    MDRV_VIDEO_START(dkong)
1664    MDRV_VIDEO_UPDATE(dkong)
16651665
1666   /* sound hardware */
1667   MDRV_IMPORT_FROM(dkong3_audio)
1666    /* sound hardware */
1667    MDRV_IMPORT_FROM(dkong3_audio)
16681668MACHINE_DRIVER_END
16691669
16701670static MACHINE_DRIVER_START( dkongjr )
16711671
1672   MDRV_IMPORT_FROM(dkong_base)
1672    MDRV_IMPORT_FROM(dkong_base)
16731673
1674   MDRV_CPU_MODIFY("maincpu")
1675   MDRV_CPU_PROGRAM_MAP(dkongjr_map)
1674    MDRV_CPU_MODIFY("maincpu")
1675    MDRV_CPU_PROGRAM_MAP(dkongjr_map)
16761676
1677   /* sound hardware */
1678   MDRV_IMPORT_FROM(dkongjr_audio)
1677    /* sound hardware */
1678    MDRV_IMPORT_FROM(dkongjr_audio)
16791679
16801680MACHINE_DRIVER_END
16811681
16821682static MACHINE_DRIVER_START( pestplce )
16831683
1684   MDRV_IMPORT_FROM(dkongjr)
1684    MDRV_IMPORT_FROM(dkongjr)
16851685
1686   MDRV_GFXDECODE(pestplce)
1687   MDRV_PALETTE_LENGTH(DK2B_PALETTE_LENGTH)
1688   MDRV_PALETTE_INIT(dkong2b)   /* wrong! */
1689   MDRV_VIDEO_UPDATE(pestplce)
1686    MDRV_GFXDECODE(pestplce)
1687    MDRV_PALETTE_LENGTH(DK2B_PALETTE_LENGTH)
1688    MDRV_PALETTE_INIT(dkong2b)  /* wrong! */
1689    MDRV_VIDEO_UPDATE(pestplce)
16901690
16911691MACHINE_DRIVER_END
16921692
16931693static MACHINE_DRIVER_START( dkong3b )
16941694
1695   /* basic machine hardware */
1696   MDRV_IMPORT_FROM(dkongjr)
1697   MDRV_PALETTE_INIT(dkong3)
1695    /* basic machine hardware */
1696    MDRV_IMPORT_FROM(dkongjr)
1697    MDRV_PALETTE_INIT(dkong3)
16981698MACHINE_DRIVER_END
16991699
17001700/*************************************
r5046r5047
17051705
17061706static MACHINE_DRIVER_START( s2650 )
17071707
1708   MDRV_IMPORT_FROM(dkong2b)
1708    MDRV_IMPORT_FROM(dkong2b)
17091709
1710   /* basic machine hardware */
1711   MDRV_CPU_REPLACE("maincpu", S2650, CLOCK_1H / 2)   /* ??? */
1712   MDRV_CPU_PROGRAM_MAP(s2650_map)
1713   MDRV_CPU_IO_MAP(s2650_io_map)
1714   MDRV_CPU_VBLANK_INT("screen", s2650_interrupt)
1710    /* basic machine hardware */
1711    MDRV_CPU_REPLACE("maincpu", S2650, CLOCK_1H / 2)    /* ??? */
1712    MDRV_CPU_PROGRAM_MAP(s2650_map)
1713    MDRV_CPU_IO_MAP(s2650_io_map)
1714    MDRV_CPU_VBLANK_INT("screen", s2650_interrupt)
17151715
1716   MDRV_DEVICE_MODIFY("dma8257")
1717   MDRV_DEVICE_CONFIG(hb_dma)
1716    MDRV_DEVICE_MODIFY("dma8257")
1717    MDRV_DEVICE_CONFIG(hb_dma)
17181718
1719   MDRV_MACHINE_START(s2650)
1719    MDRV_MACHINE_START(s2650)
17201720
17211721MACHINE_DRIVER_END
17221722
17231723static MACHINE_DRIVER_START( spclforc )
17241724
1725   /* basic machine hardware */
1726   MDRV_IMPORT_FROM(s2650)
1727   MDRV_DEVICE_REMOVE("soundcpu")
1725    /* basic machine hardware */
1726    MDRV_IMPORT_FROM(s2650)
1727    MDRV_DEVICE_REMOVE("soundcpu")
17281728
1729   /* video hardware */
1730   MDRV_VIDEO_UPDATE(spclforc)
1729    /* video hardware */
1730    MDRV_VIDEO_UPDATE(spclforc)
17311731
17321732MACHINE_DRIVER_END
17331733
r5046r5047
17381738 *************************************/
17391739
17401740static MACHINE_DRIVER_START( strtheat )
1741   /* basic machine hardware */
1742   MDRV_IMPORT_FROM(dkong2b)
1741    /* basic machine hardware */
1742    MDRV_IMPORT_FROM(dkong2b)
17431743
1744   MDRV_CPU_MODIFY("maincpu")
1745   MDRV_CPU_IO_MAP(epos_readport)
1744    MDRV_CPU_MODIFY("maincpu")
1745    MDRV_CPU_IO_MAP(epos_readport)
17461746
1747   MDRV_MACHINE_RESET(strtheat)
1747    MDRV_MACHINE_RESET(strtheat)
17481748MACHINE_DRIVER_END
17491749
17501750static MACHINE_DRIVER_START( drakton )
1751   /* basic machine hardware */
1752   MDRV_IMPORT_FROM(dkong2b)
1751    /* basic machine hardware */
1752    MDRV_IMPORT_FROM(dkong2b)
17531753
1754   MDRV_CPU_MODIFY("maincpu")
1755   MDRV_CPU_IO_MAP(epos_readport)
1754    MDRV_CPU_MODIFY("maincpu")
1755    MDRV_CPU_IO_MAP(epos_readport)
17561756
1757   MDRV_MACHINE_RESET(drakton)
1757    MDRV_MACHINE_RESET(drakton)
17581758MACHINE_DRIVER_END
17591759
17601760static MACHINE_DRIVER_START( drktnjr )
1761   /* basic machine hardware */
1762   MDRV_IMPORT_FROM(dkongjr)
1761    /* basic machine hardware */
1762    MDRV_IMPORT_FROM(dkongjr)
17631763
1764   MDRV_CPU_MODIFY("maincpu")
1765   MDRV_CPU_IO_MAP(epos_readport)
1764    MDRV_CPU_MODIFY("maincpu")
1765    MDRV_CPU_IO_MAP(epos_readport)
17661766
1767   MDRV_MACHINE_RESET(drakton)
1767    MDRV_MACHINE_RESET(drakton)
17681768MACHINE_DRIVER_END
17691769
17701770/*************************************
r5046r5047
17741774 *************************************/
17751775
17761776ROM_START( radarscp )
1777   ROM_REGION( 0x10000, "maincpu", 0 )
1778   ROM_LOAD( "trs2c5fc",     0x0000, 0x1000, CRC(40949e0d) SHA1(94717b9d027600e25b863e89900df41325875961) )
1779   ROM_LOAD( "trs2c5gc",     0x1000, 0x1000, CRC(afa8c49f) SHA1(25880e9dcf2dc8862f7f3c38687f01dfe2424293) )
1780   ROM_LOAD( "trs2c5hc",     0x2000, 0x1000, CRC(51b8263d) SHA1(09687f2c40cf09ffc2aeddde4a4fa32800847f01) )
1781   ROM_LOAD( "trs2c5kc",     0x3000, 0x1000, CRC(1f0101f7) SHA1(b9f988847fdefa64dfeae06c2244215cb0d64dbe) )
1782   /* space for diagnostic ROM */
1777    ROM_REGION( 0x10000, "maincpu", 0 )
1778    ROM_LOAD( "trs2c5fc",     0x0000, 0x1000, CRC(40949e0d) SHA1(94717b9d027600e25b863e89900df41325875961) )
1779    ROM_LOAD( "trs2c5gc",     0x1000, 0x1000, CRC(afa8c49f) SHA1(25880e9dcf2dc8862f7f3c38687f01dfe2424293) )
1780    ROM_LOAD( "trs2c5hc",     0x2000, 0x1000, CRC(51b8263d) SHA1(09687f2c40cf09ffc2aeddde4a4fa32800847f01) )
1781    ROM_LOAD( "trs2c5kc",     0x3000, 0x1000, CRC(1f0101f7) SHA1(b9f988847fdefa64dfeae06c2244215cb0d64dbe) )
1782    /* space for diagnostic ROM */
17831783
1784   ROM_REGION( 0x1800, "soundcpu", 0 )   /* sound */
1785   ROM_LOAD( "trs2s3i",      0x0000, 0x0800, CRC(78034f14) SHA1(548b44ac69f39df6687da1c0f60968009b1e0767) )
1786   ROM_RELOAD(               0x0800, 0x0800 )
1787   ROM_FILL(                 0x1000, 0x0800, 0x00 )
1788   /* socket 3J is empty */
1784    ROM_REGION( 0x1800, "soundcpu", 0 ) /* sound */
1785    ROM_LOAD( "trs2s3i",      0x0000, 0x0800, CRC(78034f14) SHA1(548b44ac69f39df6687da1c0f60968009b1e0767) )
1786    ROM_RELOAD(               0x0800, 0x0800 )
1787    ROM_FILL(                 0x1000, 0x0800, 0x00 )
1788    /* socket 3J is empty */
17891789
1790   ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
1791   ROM_LOAD( "trs2v3gc",     0x0000, 0x0800, CRC(f095330e) SHA1(dd3de744f28ff108630d3336bd246d3323fa34af) )
1792   ROM_LOAD( "trs2v3hc",     0x0800, 0x0800, CRC(15a316f0) SHA1(8785a996c6433882a0a7150693c329a4247bb77e) )
1790    ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
1791    ROM_LOAD( "trs2v3gc",     0x0000, 0x0800, CRC(f095330e) SHA1(dd3de744f28ff108630d3336bd246d3323fa34af) )
1792    ROM_LOAD( "trs2v3hc",     0x0800, 0x0800, CRC(15a316f0) SHA1(8785a996c6433882a0a7150693c329a4247bb77e) )
17931793
1794   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
1795   ROM_LOAD( "trs2v3dc",     0x0000, 0x0800, CRC(e0bb0db9) SHA1(b570439ea1b5d34d0ac938ac9157f22f319b786d) )
1796   ROM_LOAD( "trs2v3cc",     0x0800, 0x0800, CRC(6c4e7dad) SHA1(54e6a5005c44261dc4ba845dcd5ff62ea1402d26) )
1797   ROM_LOAD( "trs2v3bc",     0x1000, 0x0800, CRC(6fdd63f1) SHA1(2eb09ab0759e4c8df9188fb833440d8fc94f6172) )
1798   ROM_LOAD( "trs2v3ac",     0x1800, 0x0800, CRC(bbf62755) SHA1(cb4ca8d4fe689ca0011a4b6c0a2dbd4c764ac70a) )
1794    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
1795    ROM_LOAD( "trs2v3dc",     0x0000, 0x0800, CRC(e0bb0db9) SHA1(b570439ea1b5d34d0ac938ac9157f22f319b786d) )
1796    ROM_LOAD( "trs2v3cc",     0x0800, 0x0800, CRC(6c4e7dad) SHA1(54e6a5005c44261dc4ba845dcd5ff62ea1402d26) )
1797    ROM_LOAD( "trs2v3bc",     0x1000, 0x0800, CRC(6fdd63f1) SHA1(2eb09ab0759e4c8df9188fb833440d8fc94f6172) )
1798    ROM_LOAD( "trs2v3ac",     0x1800, 0x0800, CRC(bbf62755) SHA1(cb4ca8d4fe689ca0011a4b6c0a2dbd4c764ac70a) )
17991799
1800   ROM_REGION( 0x0800, "gfx3", 0 )   /* radar/star timing table */
1801   ROM_LOAD( "trs2v3ec",     0x0000, 0x0800, CRC(0eca8d6b) SHA1(8358b5131d082b2fb8dd793d2e5382daeef6f75c) )
1800    ROM_REGION( 0x0800, "gfx3", 0 ) /* radar/star timing table */
1801    ROM_LOAD( "trs2v3ec",     0x0000, 0x0800, CRC(0eca8d6b) SHA1(8358b5131d082b2fb8dd793d2e5382daeef6f75c) )
18021802
1803   ROM_REGION( 0x0300, "proms", 0 )
1804   ROM_LOAD( "rs2-x.xxx",    0x0000, 0x0100, CRC(54609d61) SHA1(586620ecc61f3e55258fe6360bcacad5f570f29c) ) /* palette low 4 bits (inverted) */
1805   ROM_LOAD( "rs2-c.xxx",    0x0100, 0x0100, CRC(79a7d831) SHA1(475ec991929d43b2bcd4b5aee144249f487d0b5b) ) /* palette high 4 bits (inverted) */
1806   ROM_LOAD( "rs2-v.1hc",    0x0200, 0x0100, CRC(1b828315) SHA1(00c9f8c5ae86b68d38c66f9071b5f1ef421c1005) ) /* character color codes on a per-column basis */
1803    ROM_REGION( 0x0300, "proms", 0 )
1804    ROM_LOAD( "rs2-x.xxx",    0x0000, 0x0100, CRC(54609d61) SHA1(586620ecc61f3e55258fe6360bcacad5f570f29c) ) /* palette low 4 bits (inverted) */
1805    ROM_LOAD( "rs2-c.xxx",    0x0100, 0x0100, CRC(79a7d831) SHA1(475ec991929d43b2bcd4b5aee144249f487d0b5b) ) /* palette high 4 bits (inverted) */
1806    ROM_LOAD( "rs2-v.1hc",    0x0200, 0x0100, CRC(1b828315) SHA1(00c9f8c5ae86b68d38c66f9071b5f1ef421c1005) ) /* character color codes on a per-column basis */
18071807ROM_END
18081808
18091809ROM_START( radarsc1 )
1810   ROM_REGION( 0x10000, "maincpu", 0 )
1811   ROM_LOAD( "trs01_5f",     0x0000, 0x1000, CRC(40949e0d) SHA1(94717b9d027600e25b863e89900df41325875961) )
1812   ROM_LOAD( "trs01_5g",     0x1000, 0x1000, CRC(afa8c49f) SHA1(25880e9dcf2dc8862f7f3c38687f01dfe2424293) )
1813   ROM_LOAD( "trs01_5h",     0x2000, 0x1000, CRC(51b8263d) SHA1(09687f2c40cf09ffc2aeddde4a4fa32800847f01) )
1814   ROM_LOAD( "trs01_5k",     0x3000, 0x1000, CRC(1f0101f7) SHA1(b9f988847fdefa64dfeae06c2244215cb0d64dbe) )
1815   /* space for diagnostic ROM */
1810    ROM_REGION( 0x10000, "maincpu", 0 )
1811    ROM_LOAD( "trs01_5f",     0x0000, 0x1000, CRC(40949e0d) SHA1(94717b9d027600e25b863e89900df41325875961) )
1812    ROM_LOAD( "trs01_5g",     0x1000, 0x1000, CRC(afa8c49f) SHA1(25880e9dcf2dc8862f7f3c38687f01dfe2424293) )
1813    ROM_LOAD( "trs01_5h",     0x2000, 0x1000, CRC(51b8263d) SHA1(09687f2c40cf09ffc2aeddde4a4fa32800847f01) )
1814    ROM_LOAD( "trs01_5k",     0x3000, 0x1000, CRC(1f0101f7) SHA1(b9f988847fdefa64dfeae06c2244215cb0d64dbe) )
1815    /* space for diagnostic ROM */
18161816
1817   ROM_REGION( 0x1800, "soundcpu", 0 )   /* sound */
1818   ROM_LOAD( "trs015aa.bin", 0x0000, 0x0800, CRC(5166554c) SHA1(00bf501ca448929f6187598da6fdbc1ea488745a) )
1819   ROM_RELOAD(               0x0800, 0x0800 )
1820   ROM_FILL(                 0x1000, 0x0800, 0xFF )
1817    ROM_REGION( 0x1800, "soundcpu", 0 ) /* sound */
1818    ROM_LOAD( "trs015aa.bin", 0x0000, 0x0800, CRC(5166554c) SHA1(00bf501ca448929f6187598da6fdbc1ea488745a) )
1819    ROM_RELOAD(               0x0800, 0x0800 )
1820    ROM_FILL(                 0x1000, 0x0800, 0xFF )
18211821
1822   ROM_REGION( 0x0800, "tms", 0 )   /* speech rom */
1823   ROM_LOAD( "trs014ha.bin",      0x0000, 0x0800, CRC(d1f1b48c) SHA1(ee5584368d2e9f7bde271f5004585b53f5ff5c3f) ) /* speech rom */
1822    ROM_REGION( 0x0800, "tms", 0 )  /* speech rom */
1823    ROM_LOAD( "trs014ha.bin",      0x0000, 0x0800, CRC(d1f1b48c) SHA1(ee5584368d2e9f7bde271f5004585b53f5ff5c3f) ) /* speech rom */
18241824
1825   ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
1826   ROM_LOAD( "trs01v3f",     0x0000, 0x0800, CRC(f095330e) SHA1(dd3de744f28ff108630d3336bd246d3323fa34af) )
1827   ROM_LOAD( "trs01v3g",     0x0800, 0x0800, CRC(15a316f0) SHA1(8785a996c6433882a0a7150693c329a4247bb77e) )
1825    ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
1826    ROM_LOAD( "trs01v3f",     0x0000, 0x0800, CRC(f095330e) SHA1(dd3de744f28ff108630d3336bd246d3323fa34af) )
1827    ROM_LOAD( "trs01v3g",     0x0800, 0x0800, CRC(15a316f0) SHA1(8785a996c6433882a0a7150693c329a4247bb77e) )
18281828
1829   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
1830   ROM_LOAD( "trs01v3d",     0x0000, 0x0800, CRC(e0bb0db9) SHA1(b570439ea1b5d34d0ac938ac9157f22f319b786d) )
1831   ROM_LOAD( "trs01v3c",     0x0800, 0x0800, CRC(6c4e7dad) SHA1(54e6a5005c44261dc4ba845dcd5ff62ea1402d26) )
1832   ROM_LOAD( "trs01v3b",     0x1000, 0x0800, CRC(6fdd63f1) SHA1(2eb09ab0759e4c8df9188fb833440d8fc94f6172) )
1833   ROM_LOAD( "trs01v3a",     0x1800, 0x0800, CRC(bbf62755) SHA1(cb4ca8d4fe689ca0011a4b6c0a2dbd4c764ac70a) )
1829    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
1830    ROM_LOAD( "trs01v3d",     0x0000, 0x0800, CRC(e0bb0db9) SHA1(b570439ea1b5d34d0ac938ac9157f22f319b786d) )
1831    ROM_LOAD( "trs01v3c",     0x0800, 0x0800, CRC(6c4e7dad) SHA1(54e6a5005c44261dc4ba845dcd5ff62ea1402d26) )
1832    ROM_LOAD( "trs01v3b",     0x1000, 0x0800, CRC(6fdd63f1) SHA1(2eb09ab0759e4c8df9188fb833440d8fc94f6172) )
1833    ROM_LOAD( "trs01v3a",     0x1800, 0x0800, CRC(bbf62755) SHA1(cb4ca8d4fe689ca0011a4b6c0a2dbd4c764ac70a) )
18341834
1835   ROM_REGION( 0x0800, "gfx3", 0 )   /* radar/star timing table */
1836   ROM_LOAD( "trs011ha.bin",    0x0000, 0x0800, CRC(dbcc50c2) SHA1(1e438057d4d93ba22794ab0a9bf41bb49ac28a35) ) /* star /grid */
1835    ROM_REGION( 0x0800, "gfx3", 0 ) /* radar/star timing table */
1836    ROM_LOAD( "trs011ha.bin",    0x0000, 0x0800, CRC(dbcc50c2) SHA1(1e438057d4d93ba22794ab0a9bf41bb49ac28a35) ) /* star /grid */
18371837
1838   ROM_REGION( 0x0100, "gfx4", 0 )   /* priority based on hor. pos */
1839   ROM_LOAD( "trs01e3k.bin",    0x0000, 0x0100, CRC(6c6f989c) SHA1(d4b90e43d93ef141a8002b88ce5e33411b870ced) )
1838    ROM_REGION( 0x0100, "gfx4", 0 ) /* priority based on hor. pos */
1839    ROM_LOAD( "trs01e3k.bin",    0x0000, 0x0100, CRC(6c6f989c) SHA1(d4b90e43d93ef141a8002b88ce5e33411b870ced) )
18401840
1841   ROM_REGION( 0x0400, "proms", 0 )
1842   ROM_LOAD( "trs01c2j.bin",    0x0000, 0x0100, CRC(2a087c87) SHA1(dbf0c6173583dc4fa5d3f34d2f42cbaf2bd4b167) ) /* blue */
1843   ROM_LOAD( "trs01c2k.bin",    0x0100, 0x0100, CRC(650c5daf) SHA1(72f91ee2fab9eee58ee42881327e6345aa70b7f9) ) /* green */
1844   ROM_LOAD( "trs01c2l.bin",    0x0200, 0x0100, CRC(23087910) SHA1(afc05c322b11fefaf0af857fee06a5afd0d4593e) ) /* red */
1845   /* Hack! The prom at pos 1D on video board has not been dumped
1841    ROM_REGION( 0x0400, "proms", 0 )
1842    ROM_LOAD( "trs01c2j.bin",    0x0000, 0x0100, CRC(2a087c87) SHA1(dbf0c6173583dc4fa5d3f34d2f42cbaf2bd4b167) ) /* blue */
1843    ROM_LOAD( "trs01c2k.bin",    0x0100, 0x0100, CRC(650c5daf) SHA1(72f91ee2fab9eee58ee42881327e6345aa70b7f9) ) /* green */
1844    ROM_LOAD( "trs01c2l.bin",    0x0200, 0x0100, CRC(23087910) SHA1(afc05c322b11fefaf0af857fee06a5afd0d4593e) ) /* red */
1845    /* Hack! The prom at pos 1D on video board has not been dumped
18461846     * Rom 1D is a MB7051, only 5 address lines
18471847     * Rom below from TRS02 dump: rs2-v.1hc
18481848     */
1849   ROM_LOAD( "trs01v1d.bin",    0x0300, 0x0100, BAD_DUMP CRC(1b828315) SHA1(00c9f8c5ae86b68d38c66f9071b5f1ef421c1005) ) /* character color codes on a per-column basis */
1849    ROM_LOAD( "trs01v1d.bin",    0x0300, 0x0100, BAD_DUMP CRC(1b828315) SHA1(00c9f8c5ae86b68d38c66f9071b5f1ef421c1005) ) /* character color codes on a per-column basis */
18501850ROM_END
18511851
18521852ROM_START( dkong )
1853   ROM_REGION( 0x10000, "maincpu", 0 )
1854   ROM_LOAD( "c_5et_g.bin",  0x0000, 0x1000, CRC(ba70b88b) SHA1(d76ebecfea1af098d843ee7e578e480cd658ac1a) )
1855   ROM_LOAD( "c_5ct_g.bin",  0x1000, 0x1000, CRC(5ec461ec) SHA1(acb11a8fbdbb3ab46068385fe465f681e3c824bd) )
1856   ROM_LOAD( "c_5bt_g.bin",  0x2000, 0x1000, CRC(1c97d324) SHA1(c7966261f3a1d3296927e0b6ee1c58039fc53c1f) )
1857   ROM_LOAD( "c_5at_g.bin",  0x3000, 0x1000, CRC(b9005ac0) SHA1(3fe3599f6fa7c496f782053ddf7bacb453d197c4) )
1858   /* space for diagnostic ROM */
1853    ROM_REGION( 0x10000, "maincpu", 0 )
1854    ROM_LOAD( "c_5et_g.bin",  0x0000, 0x1000, CRC(ba70b88b) SHA1(d76ebecfea1af098d843ee7e578e480cd658ac1a) )
1855    ROM_LOAD( "c_5ct_g.bin",  0x1000, 0x1000, CRC(5ec461ec) SHA1(acb11a8fbdbb3ab46068385fe465f681e3c824bd) )
1856    ROM_LOAD( "c_5bt_g.bin",  0x2000, 0x1000, CRC(1c97d324) SHA1(c7966261f3a1d3296927e0b6ee1c58039fc53c1f) )
1857    ROM_LOAD( "c_5at_g.bin",  0x3000, 0x1000, CRC(b9005ac0) SHA1(3fe3599f6fa7c496f782053ddf7bacb453d197c4) )
1858    /* space for diagnostic ROM */
18591859
1860   ROM_REGION( 0x1800, "soundcpu", 0 )   /* sound */
1861   ROM_LOAD( "s_3i_b.bin",   0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) )
1862   ROM_RELOAD(               0x0800, 0x0800 )
1863   ROM_LOAD( "s_3j_b.bin",   0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) )
1860    ROM_REGION( 0x1800, "soundcpu", 0 ) /* sound */
1861    ROM_LOAD( "s_3i_b.bin",   0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) )
1862    ROM_RELOAD(               0x0800, 0x0800 )
1863    ROM_LOAD( "s_3j_b.bin",   0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) )
18641864
1865   ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
1866   ROM_LOAD( "v_5h_b.bin",   0x0000, 0x0800, CRC(12c8c95d) SHA1(a57ff5a231c45252a63b354137c920a1379b70a3) )
1867   ROM_LOAD( "v_3pt.bin",    0x0800, 0x0800, CRC(15e9c5e9) SHA1(976eb1e18c74018193a35aa86cff482ebfc5cc4e) )
1865    ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
1866    ROM_LOAD( "v_5h_b.bin",   0x0000, 0x0800, CRC(12c8c95d) SHA1(a57ff5a231c45252a63b354137c920a1379b70a3) )
1867    ROM_LOAD( "v_3pt.bin",    0x0800, 0x0800, CRC(15e9c5e9) SHA1(976eb1e18c74018193a35aa86cff482ebfc5cc4e) )
18681868
1869   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
1870   ROM_LOAD( "l_4m_b.bin",   0x0000, 0x0800, CRC(59f8054d) SHA1(793dba9bf5a5fe76328acdfb90815c243d2a65f1) )
1871   ROM_LOAD( "l_4n_b.bin",   0x0800, 0x0800, CRC(672e4714) SHA1(92e5d379f4838ac1fa44d448ce7d142dae42102f) )
1872   ROM_LOAD( "l_4r_b.bin",   0x1000, 0x0800, CRC(feaa59ee) SHA1(ecf95db5a20098804fc8bd59232c66e2e0ed3db4) )
1873   ROM_LOAD( "l_4s_b.bin",   0x1800, 0x0800, CRC(20f2ef7e) SHA1(3bc482a38bf579033f50082748ee95205b0f673d) )
1869    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
1870    ROM_LOAD( "l_4m_b.bin",   0x0000, 0x0800, CRC(59f8054d) SHA1(793dba9bf5a5fe76328acdfb90815c243d2a65f1) )
1871    ROM_LOAD( "l_4n_b.bin",   0x0800, 0x0800, CRC(672e4714) SHA1(92e5d379f4838ac1fa44d448ce7d142dae42102f) )
1872    ROM_LOAD( "l_4r_b.bin",   0x1000, 0x0800, CRC(feaa59ee) SHA1(ecf95db5a20098804fc8bd59232c66e2e0ed3db4) )
1873    ROM_LOAD( "l_4s_b.bin",   0x1800, 0x0800, CRC(20f2ef7e) SHA1(3bc482a38bf579033f50082748ee95205b0f673d) )
18741874
1875   ROM_REGION( 0x0300, "proms", 0 )
1876   ROM_LOAD( "c-2k.bpr",     0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */
1877   ROM_LOAD( "c-2j.bpr",     0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */
1878   ROM_LOAD( "v-5e.bpr",     0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */
1875    ROM_REGION( 0x0300, "proms", 0 )
1876    ROM_LOAD( "c-2k.bpr",     0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */
1877    ROM_LOAD( "c-2j.bpr",     0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */
1878    ROM_LOAD( "v-5e.bpr",     0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */
18791879ROM_END
18801880
18811881ROM_START( dkongo )
1882   ROM_REGION( 0x10000, "maincpu", 0 )
1883   ROM_LOAD( "c_5f_b.bin",   0x0000, 0x1000, CRC(424f2b11) SHA1(e4f096f2bbd37281f42a5f8e083738f55c07f3dd) )   /* tkg3c.5f */
1884   ROM_LOAD( "c_5ct_g.bin",  0x1000, 0x1000, CRC(5ec461ec) SHA1(acb11a8fbdbb3ab46068385fe465f681e3c824bd) )   /* tkg3c.5g */
1885   ROM_LOAD( "c_5h_b.bin",   0x2000, 0x1000, CRC(1d28895d) SHA1(63792cab215fc2a7b0e8ee61d8115045571e9d42) )   /* tkg3c.5h */
1886   ROM_LOAD( "tkg3c.5k",     0x3000, 0x1000, CRC(553b89bb) SHA1(61611df9e2748fdcd31821038dcc0e16dc933873) )
1887   /* space for diagnostic ROM */
1882    ROM_REGION( 0x10000, "maincpu", 0 )
1883    ROM_LOAD( "c_5f_b.bin",   0x0000, 0x1000, CRC(424f2b11) SHA1(e4f096f2bbd37281f42a5f8e083738f55c07f3dd) )    /* tkg3c.5f */
1884    ROM_LOAD( "c_5ct_g.bin",  0x1000, 0x1000, CRC(5ec461ec) SHA1(acb11a8fbdbb3ab46068385fe465f681e3c824bd) )    /* tkg3c.5g */
1885    ROM_LOAD( "c_5h_b.bin",   0x2000, 0x1000, CRC(1d28895d) SHA1(63792cab215fc2a7b0e8ee61d8115045571e9d42) )    /* tkg3c.5h */
1886    ROM_LOAD( "tkg3c.5k",     0x3000, 0x1000, CRC(553b89bb) SHA1(61611df9e2748fdcd31821038dcc0e16dc933873) )
1887    /* space for diagnostic ROM */
18881888
1889   ROM_REGION( 0x1800, "soundcpu", 0 )   /* sound */
1890   ROM_LOAD( "s_3i_b.bin",   0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) )
1891   ROM_RELOAD(               0x0800, 0x0800 )
1892   ROM_LOAD( "s_3j_b.bin",   0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) )
1889    ROM_REGION( 0x1800, "soundcpu", 0 ) /* sound */
1890    ROM_LOAD( "s_3i_b.bin",   0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) )
1891    ROM_RELOAD(               0x0800, 0x0800 )
1892    ROM_LOAD( "s_3j_b.bin",   0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) )
18931893
1894   ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
1895   ROM_LOAD( "v_5h_b.bin",   0x0000, 0x0800, CRC(12c8c95d) SHA1(a57ff5a231c45252a63b354137c920a1379b70a3) )
1896   ROM_LOAD( "v_3pt.bin",    0x0800, 0x0800, CRC(15e9c5e9) SHA1(976eb1e18c74018193a35aa86cff482ebfc5cc4e) )
1894    ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
1895    ROM_LOAD( "v_5h_b.bin",   0x0000, 0x0800, CRC(12c8c95d) SHA1(a57ff5a231c45252a63b354137c920a1379b70a3) )
1896    ROM_LOAD( "v_3pt.bin",    0x0800, 0x0800, CRC(15e9c5e9) SHA1(976eb1e18c74018193a35aa86cff482ebfc5cc4e) )
18971897
1898   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
1899   ROM_LOAD( "l_4m_b.bin",   0x0000, 0x0800, CRC(59f8054d) SHA1(793dba9bf5a5fe76328acdfb90815c243d2a65f1) )
1900   ROM_LOAD( "l_4n_b.bin",   0x0800, 0x0800, CRC(672e4714) SHA1(92e5d379f4838ac1fa44d448ce7d142dae42102f) )
1901   ROM_LOAD( "l_4r_b.bin",   0x1000, 0x0800, CRC(feaa59ee) SHA1(ecf95db5a20098804fc8bd59232c66e2e0ed3db4) )
1902   ROM_LOAD( "l_4s_b.bin",   0x1800, 0x0800, CRC(20f2ef7e) SHA1(3bc482a38bf579033f50082748ee95205b0f673d) )
1898    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
1899    ROM_LOAD( "l_4m_b.bin",   0x0000, 0x0800, CRC(59f8054d) SHA1(793dba9bf5a5fe76328acdfb90815c243d2a65f1) )
1900    ROM_LOAD( "l_4n_b.bin",   0x0800, 0x0800, CRC(672e4714) SHA1(92e5d379f4838ac1fa44d448ce7d142dae42102f) )
1901    ROM_LOAD( "l_4r_b.bin",   0x1000, 0x0800, CRC(feaa59ee) SHA1(ecf95db5a20098804fc8bd59232c66e2e0ed3db4) )
1902    ROM_LOAD( "l_4s_b.bin",   0x1800, 0x0800, CRC(20f2ef7e) SHA1(3bc482a38bf579033f50082748ee95205b0f673d) )
19031903
1904   ROM_REGION( 0x0300, "proms", 0 )
1905   ROM_LOAD( "c-2k.bpr",     0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */
1906   ROM_LOAD( "c-2j.bpr",     0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */
1907   ROM_LOAD( "v-5e.bpr",     0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */
1904    ROM_REGION( 0x0300, "proms", 0 )
1905    ROM_LOAD( "c-2k.bpr",     0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */
1906    ROM_LOAD( "c-2j.bpr",     0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */
1907    ROM_LOAD( "v-5e.bpr",     0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */
19081908ROM_END
19091909
19101910ROM_START( dkongjp )
1911   ROM_REGION( 0x10000, "maincpu", 0 )
1912   ROM_LOAD( "c_5f_b.bin",   0x0000, 0x1000, CRC(424f2b11) SHA1(e4f096f2bbd37281f42a5f8e083738f55c07f3dd) )
1913   ROM_LOAD( "5g.cpu",       0x1000, 0x1000, CRC(d326599b) SHA1(94c7382604d0a123a442d53f9641f366dfbb7631) )
1914   ROM_LOAD( "5h.cpu",       0x2000, 0x1000, CRC(ff31ac89) SHA1(9626a9e6df0d1b0ff273dbbe986f670200f91f75) )
1915   ROM_LOAD( "c_5k_b.bin",   0x3000, 0x1000, CRC(394d6007) SHA1(57e5ae76ef5d4a2fa9cd860b6c6be03b6d5ed5ba) )
1911    ROM_REGION( 0x10000, "maincpu", 0 )
1912    ROM_LOAD( "c_5f_b.bin",   0x0000, 0x1000, CRC(424f2b11) SHA1(e4f096f2bbd37281f42a5f8e083738f55c07f3dd) )
1913    ROM_LOAD( "5g.cpu",       0x1000, 0x1000, CRC(d326599b) SHA1(94c7382604d0a123a442d53f9641f366dfbb7631) )
1914    ROM_LOAD( "5h.cpu",       0x2000, 0x1000, CRC(ff31ac89) SHA1(9626a9e6df0d1b0ff273dbbe986f670200f91f75) )
1915    ROM_LOAD( "c_5k_b.bin",   0x3000, 0x1000, CRC(394d6007) SHA1(57e5ae76ef5d4a2fa9cd860b6c6be03b6d5ed5ba) )
19161916
1917   ROM_REGION( 0x1800, "soundcpu", 0 )   /* sound */
1918   ROM_LOAD( "s_3i_b.bin",   0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) )
1919   ROM_RELOAD(               0x0800, 0x0800 )
1920   ROM_LOAD( "s_3j_b.bin",   0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) )
1917    ROM_REGION( 0x1800, "soundcpu", 0 ) /* sound */
1918    ROM_LOAD( "s_3i_b.bin",   0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) )
1919    ROM_RELOAD(               0x0800, 0x0800 )
1920    ROM_LOAD( "s_3j_b.bin",   0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) )
19211921
1922   ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
1923   ROM_LOAD( "v_5h_b.bin",   0x0000, 0x0800, CRC(12c8c95d) SHA1(a57ff5a231c45252a63b354137c920a1379b70a3) )
1924   ROM_LOAD( "v_5k_b.bin",   0x0800, 0x0800, CRC(3684f914) SHA1(882ae48ec1eabf5d350438dfec37ab20f7ee155d) )
1922    ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
1923    ROM_LOAD( "v_5h_b.bin",   0x0000, 0x0800, CRC(12c8c95d) SHA1(a57ff5a231c45252a63b354137c920a1379b70a3) )
1924    ROM_LOAD( "v_5k_b.bin",   0x0800, 0x0800, CRC(3684f914) SHA1(882ae48ec1eabf5d350438dfec37ab20f7ee155d) )
19251925
1926   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
1927   ROM_LOAD( "l_4m_b.bin",   0x0000, 0x0800, CRC(59f8054d) SHA1(793dba9bf5a5fe76328acdfb90815c243d2a65f1) )
1928   ROM_LOAD( "l_4n_b.bin",   0x0800, 0x0800, CRC(672e4714) SHA1(92e5d379f4838ac1fa44d448ce7d142dae42102f) )
1929   ROM_LOAD( "l_4r_b.bin",   0x1000, 0x0800, CRC(feaa59ee) SHA1(ecf95db5a20098804fc8bd59232c66e2e0ed3db4) )
1930   ROM_LOAD( "l_4s_b.bin",   0x1800, 0x0800, CRC(20f2ef7e) SHA1(3bc482a38bf579033f50082748ee95205b0f673d) )
1926    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
1927    ROM_LOAD( "l_4m_b.bin",   0x0000, 0x0800, CRC(59f8054d) SHA1(793dba9bf5a5fe76328acdfb90815c243d2a65f1) )
1928    ROM_LOAD( "l_4n_b.bin",   0x0800, 0x0800, CRC(672e4714) SHA1(92e5d379f4838ac1fa44d448ce7d142dae42102f) )
1929    ROM_LOAD( "l_4r_b.bin",   0x1000, 0x0800, CRC(feaa59ee) SHA1(ecf95db5a20098804fc8bd59232c66e2e0ed3db4) )
1930    ROM_LOAD( "l_4s_b.bin",   0x1800, 0x0800, CRC(20f2ef7e) SHA1(3bc482a38bf579033f50082748ee95205b0f673d) )
19311931
1932   ROM_REGION( 0x0300, "proms", 0 )
1933   ROM_LOAD( "c-2k.bpr",     0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */
1934   ROM_LOAD( "c-2j.bpr",     0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */
1935   ROM_LOAD( "v-5e.bpr",     0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */
1932    ROM_REGION( 0x0300, "proms", 0 )
1933    ROM_LOAD( "c-2k.bpr",     0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */
1934    ROM_LOAD( "c-2j.bpr",     0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */
1935    ROM_LOAD( "v-5e.bpr",     0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */
19361936ROM_END
19371937
19381938ROM_START( dkongjo )
1939   ROM_REGION( 0x10000, "maincpu", 0 )
1940   ROM_LOAD( "c_5f_b.bin",   0x0000, 0x1000, CRC(424f2b11) SHA1(e4f096f2bbd37281f42a5f8e083738f55c07f3dd) )
1941   ROM_LOAD( "c_5g_b.bin",   0x1000, 0x1000, CRC(3b2a6635) SHA1(32c62e00863ab99c6f263587d9d5bb775a68f3de) )
1942   ROM_LOAD( "c_5h_b.bin",   0x2000, 0x1000, CRC(1d28895d) SHA1(63792cab215fc2a7b0e8ee61d8115045571e9d42) )
1943   ROM_LOAD( "c_5k_b.bin",   0x3000, 0x1000, CRC(394d6007) SHA1(57e5ae76ef5d4a2fa9cd860b6c6be03b6d5ed5ba) )
1939    ROM_REGION( 0x10000, "maincpu", 0 )
1940    ROM_LOAD( "c_5f_b.bin",   0x0000, 0x1000, CRC(424f2b11) SHA1(e4f096f2bbd37281f42a5f8e083738f55c07f3dd) )
1941    ROM_LOAD( "c_5g_b.bin",   0x1000, 0x1000, CRC(3b2a6635) SHA1(32c62e00863ab99c6f263587d9d5bb775a68f3de) )
1942    ROM_LOAD( "c_5h_b.bin",   0x2000, 0x1000, CRC(1d28895d) SHA1(63792cab215fc2a7b0e8ee61d8115045571e9d42) )
1943    ROM_LOAD( "c_5k_b.bin",   0x3000, 0x1000, CRC(394d6007) SHA1(57e5ae76ef5d4a2fa9cd860b6c6be03b6d5ed5ba) )
19441944
1945   ROM_REGION( 0x1800, "soundcpu", 0 )   /* sound */
1946   ROM_LOAD( "s_3i_b.bin",   0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) )
1947   ROM_RELOAD(               0x0800, 0x0800 )
1948   ROM_LOAD( "s_3j_b.bin",   0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) )
1945    ROM_REGION( 0x1800, "soundcpu", 0 ) /* sound */
1946    ROM_LOAD( "s_3i_b.bin",   0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) )
1947    ROM_RELOAD(               0x0800, 0x0800 )
1948    ROM_LOAD( "s_3j_b.bin",   0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) )
19491949
1950   ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
1951   ROM_LOAD( "v_5h_b.bin",   0x0000, 0x0800, CRC(12c8c95d) SHA1(a57ff5a231c45252a63b354137c920a1379b70a3) )
1952   ROM_LOAD( "v_5k_b.bin",   0x0800, 0x0800, CRC(3684f914) SHA1(882ae48ec1eabf5d350438dfec37ab20f7ee155d) )
1950    ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
1951    ROM_LOAD( "v_5h_b.bin",   0x0000, 0x0800, CRC(12c8c95d) SHA1(a57ff5a231c45252a63b354137c920a1379b70a3) )
1952    ROM_LOAD( "v_5k_b.bin",   0x0800, 0x0800, CRC(3684f914) SHA1(882ae48ec1eabf5d350438dfec37ab20f7ee155d) )
19531953
1954   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
1955   ROM_LOAD( "l_4m_b.bin",   0x0000, 0x0800, CRC(59f8054d) SHA1(793dba9bf5a5fe76328acdfb90815c243d2a65f1) )
1956   ROM_LOAD( "l_4n_b.bin",   0x0800, 0x0800, CRC(672e4714) SHA1(92e5d379f4838ac1fa44d448ce7d142dae42102f) )
1957   ROM_LOAD( "l_4r_b.bin",   0x1000, 0x0800, CRC(feaa59ee) SHA1(ecf95db5a20098804fc8bd59232c66e2e0ed3db4) )
1958   ROM_LOAD( "l_4s_b.bin",   0x1800, 0x0800, CRC(20f2ef7e) SHA1(3bc482a38bf579033f50082748ee95205b0f673d) )
1954    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
1955    ROM_LOAD( "l_4m_b.bin",   0x0000, 0x0800, CRC(59f8054d) SHA1(793dba9bf5a5fe76328acdfb90815c243d2a65f1) )
1956    ROM_LOAD( "l_4n_b.bin",   0x0800, 0x0800, CRC(672e4714) SHA1(92e5d379f4838ac1fa44d448ce7d142dae42102f) )
1957    ROM_LOAD( "l_4r_b.bin",   0x1000, 0x0800, CRC(feaa59ee) SHA1(ecf95db5a20098804fc8bd59232c66e2e0ed3db4) )
1958    ROM_LOAD( "l_4s_b.bin",   0x1800, 0x0800, CRC(20f2ef7e) SHA1(3bc482a38bf579033f50082748ee95205b0f673d) )
19591959
1960   ROM_REGION( 0x0300, "proms", 0 )
1961   ROM_LOAD( "c-2k.bpr",     0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */
1962   ROM_LOAD( "c-2j.bpr",     0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */
1963   ROM_LOAD( "v-5e.bpr",     0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */
1960    ROM_REGION( 0x0300, "proms", 0 )
1961    ROM_LOAD( "c-2k.bpr",     0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */
1962    ROM_LOAD( "c-2j.bpr",     0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */
1963    ROM_LOAD( "v-5e.bpr",     0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */
19641964ROM_END
19651965
19661966ROM_START( dkongjo1 )
1967   ROM_REGION( 0x10000, "maincpu", 0 )
1968   ROM_LOAD( "c_5f_b.bin",   0x0000, 0x1000, CRC(424f2b11) SHA1(e4f096f2bbd37281f42a5f8e083738f55c07f3dd) )
1969   ROM_LOAD( "5g.cpu",       0x1000, 0x1000, CRC(d326599b) SHA1(94c7382604d0a123a442d53f9641f366dfbb7631) )
1970   ROM_LOAD( "c_5h_b.bin",   0x2000, 0x1000, CRC(1d28895d) SHA1(63792cab215fc2a7b0e8ee61d8115045571e9d42) )
1971   ROM_LOAD( "5k.bin",       0x3000, 0x1000, CRC(7961599c) SHA1(698a4c2b8d67840dca7526efb1ac0d3370a86925) )
1967    ROM_REGION( 0x10000, "maincpu", 0 )
1968    ROM_LOAD( "c_5f_b.bin",   0x0000, 0x1000, CRC(424f2b11) SHA1(e4f096f2bbd37281f42a5f8e083738f55c07f3dd) )
1969    ROM_LOAD( "5g.cpu",       0x1000, 0x1000, CRC(d326599b) SHA1(94c7382604d0a123a442d53f9641f366dfbb7631) )
1970    ROM_LOAD( "c_5h_b.bin",   0x2000, 0x1000, CRC(1d28895d) SHA1(63792cab215fc2a7b0e8ee61d8115045571e9d42) )
1971    ROM_LOAD( "5k.bin",       0x3000, 0x1000, CRC(7961599c) SHA1(698a4c2b8d67840dca7526efb1ac0d3370a86925) )
19721972
1973   ROM_REGION( 0x1800, "soundcpu", 0 )   /* sound */
1974   ROM_LOAD( "s_3i_b.bin",   0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) )
1975   ROM_RELOAD(               0x0800, 0x0800 )
1976   ROM_LOAD( "s_3j_b.bin",   0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) )
1973    ROM_REGION( 0x1800, "soundcpu", 0 ) /* sound */
1974    ROM_LOAD( "s_3i_b.bin",   0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) )
1975    ROM_RELOAD(               0x0800, 0x0800 )
1976    ROM_LOAD( "s_3j_b.bin",   0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) )
19771977
1978   ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
1979   ROM_LOAD( "v_5h_b.bin",   0x0000, 0x0800, CRC(12c8c95d) SHA1(a57ff5a231c45252a63b354137c920a1379b70a3) )
1980   ROM_LOAD( "v_5k_b.bin",   0x0800, 0x0800, CRC(3684f914) SHA1(882ae48ec1eabf5d350438dfec37ab20f7ee155d) )
1978    ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
1979    ROM_LOAD( "v_5h_b.bin",   0x0000, 0x0800, CRC(12c8c95d) SHA1(a57ff5a231c45252a63b354137c920a1379b70a3) )
1980    ROM_LOAD( "v_5k_b.bin",   0x0800, 0x0800, CRC(3684f914) SHA1(882ae48ec1eabf5d350438dfec37ab20f7ee155d) )
19811981
1982   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
1983   ROM_LOAD( "l_4m_b.bin",   0x0000, 0x0800, CRC(59f8054d) SHA1(793dba9bf5a5fe76328acdfb90815c243d2a65f1) )
1984   ROM_LOAD( "l_4n_b.bin",   0x0800, 0x0800, CRC(672e4714) SHA1(92e5d379f4838ac1fa44d448ce7d142dae42102f) )
1985   ROM_LOAD( "l_4r_b.bin",   0x1000, 0x0800, CRC(feaa59ee) SHA1(ecf95db5a20098804fc8bd59232c66e2e0ed3db4) )
1986   ROM_LOAD( "l_4s_b.bin",   0x1800, 0x0800, CRC(20f2ef7e) SHA1(3bc482a38bf579033f50082748ee95205b0f673d) )
1982    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
1983    ROM_LOAD( "l_4m_b.bin",   0x0000, 0x0800, CRC(59f8054d) SHA1(793dba9bf5a5fe76328acdfb90815c243d2a65f1) )
1984    ROM_LOAD( "l_4n_b.bin",   0x0800, 0x0800, CRC(672e4714) SHA1(92e5d379f4838ac1fa44d448ce7d142dae42102f) )
1985    ROM_LOAD( "l_4r_b.bin",   0x1000, 0x0800, CRC(feaa59ee) SHA1(ecf95db5a20098804fc8bd59232c66e2e0ed3db4) )
1986    ROM_LOAD( "l_4s_b.bin",   0x1800, 0x0800, CRC(20f2ef7e) SHA1(3bc482a38bf579033f50082748ee95205b0f673d) )
19871987
1988   ROM_REGION( 0x0300, "proms", 0 )
1989   ROM_LOAD( "c-2k.bpr",     0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */
1990   ROM_LOAD( "c-2j.bpr",     0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */
1991   ROM_LOAD( "v-5e.bpr",     0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */
1988    ROM_REGION( 0x0300, "proms", 0 )
1989    ROM_LOAD( "c-2k.bpr",     0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */
1990    ROM_LOAD( "c-2j.bpr",     0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */
1991    ROM_LOAD( "v-5e.bpr",     0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */
19921992ROM_END
19931993
19941994ROM_START( dkongf ) /* Donkey Kong Foundry (hack) from Jeff's Romhack */
1995   ROM_REGION( 0x10000, "maincpu", 0 )
1996   ROM_LOAD( "dk_f.5et",  0x0000, 0x1000, CRC(00b7efaf) SHA1(97ed5930eb5d0cb98a9008b1d329ba7f3b8b8dbf) )
1997   ROM_LOAD( "dk_f.5ct",  0x1000, 0x1000, CRC(88af9b69) SHA1(c5621dd8198c333b3fa32fdece60ee5a3d8b2276) )
1998   ROM_LOAD( "dk_f.5bt",  0x2000, 0x1000, CRC(de74ad91) SHA1(c80227361bdbc565e9f5764e6364b52d40ca778a) )
1999   ROM_LOAD( "dk_f.5at",  0x3000, 0x1000, CRC(6a6bd420) SHA1(f012e2d21d906a2993af9cf8b2912ea6c928e94b) )
2000   /* space for diagnostic ROM */
1995    ROM_REGION( 0x10000, "maincpu", 0 )
1996    ROM_LOAD( "dk_f.5et",  0x0000, 0x1000, CRC(00b7efaf) SHA1(97ed5930eb5d0cb98a9008b1d329ba7f3b8b8dbf) )
1997    ROM_LOAD( "dk_f.5ct",  0x1000, 0x1000, CRC(88af9b69) SHA1(c5621dd8198c333b3fa32fdece60ee5a3d8b2276) )
1998    ROM_LOAD( "dk_f.5bt",  0x2000, 0x1000, CRC(de74ad91) SHA1(c80227361bdbc565e9f5764e6364b52d40ca778a) )
1999    ROM_LOAD( "dk_f.5at",  0x3000, 0x1000, CRC(6a6bd420) SHA1(f012e2d21d906a2993af9cf8b2912ea6c928e94b) )
2000    /* space for diagnostic ROM */
20012001
2002   ROM_REGION( 0x1800, "soundcpu", 0 )   /* sound */
2003   ROM_LOAD( "s_3i_b.bin",   0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) )
2004   ROM_RELOAD(               0x0800, 0x0800 )
2005   ROM_LOAD( "s_3j_b.bin",   0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) )
2002    ROM_REGION( 0x1800, "soundcpu", 0 ) /* sound */
2003    ROM_LOAD( "s_3i_b.bin",   0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) )
2004    ROM_RELOAD(               0x0800, 0x0800 )
2005    ROM_LOAD( "s_3j_b.bin",   0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) )
20062006
2007   ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
2008   ROM_LOAD( "v_5h_b.bin",   0x0000, 0x0800, CRC(12c8c95d) SHA1(a57ff5a231c45252a63b354137c920a1379b70a3) )
2009   ROM_LOAD( "v_3pt.bin",    0x0800, 0x0800, CRC(15e9c5e9) SHA1(976eb1e18c74018193a35aa86cff482ebfc5cc4e) )
2007    ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
2008    ROM_LOAD( "v_5h_b.bin",   0x0000, 0x0800, CRC(12c8c95d) SHA1(a57ff5a231c45252a63b354137c920a1379b70a3) )
2009    ROM_LOAD( "v_3pt.bin",    0x0800, 0x0800, CRC(15e9c5e9) SHA1(976eb1e18c74018193a35aa86cff482ebfc5cc4e) )
20102010
2011   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2012   ROM_LOAD( "l_4m_b.bin",   0x0000, 0x0800, CRC(59f8054d) SHA1(793dba9bf5a5fe76328acdfb90815c243d2a65f1) )
2013   ROM_LOAD( "l_4n_b.bin",   0x0800, 0x0800, CRC(672e4714) SHA1(92e5d379f4838ac1fa44d448ce7d142dae42102f) )
2014   ROM_LOAD( "l_4r_b.bin",   0x1000, 0x0800, CRC(feaa59ee) SHA1(ecf95db5a20098804fc8bd59232c66e2e0ed3db4) )
2015   ROM_LOAD( "l_4s_b.bin",   0x1800, 0x0800, CRC(20f2ef7e) SHA1(3bc482a38bf579033f50082748ee95205b0f673d) )
2011    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2012    ROM_LOAD( "l_4m_b.bin",   0x0000, 0x0800, CRC(59f8054d) SHA1(793dba9bf5a5fe76328acdfb90815c243d2a65f1) )
2013    ROM_LOAD( "l_4n_b.bin",   0x0800, 0x0800, CRC(672e4714) SHA1(92e5d379f4838ac1fa44d448ce7d142dae42102f) )
2014    ROM_LOAD( "l_4r_b.bin",   0x1000, 0x0800, CRC(feaa59ee) SHA1(ecf95db5a20098804fc8bd59232c66e2e0ed3db4) )
2015    ROM_LOAD( "l_4s_b.bin",   0x1800, 0x0800, CRC(20f2ef7e) SHA1(3bc482a38bf579033f50082748ee95205b0f673d) )
20162016
2017   ROM_REGION( 0x0300, "proms", 0 )
2018   ROM_LOAD( "c-2k.bpr",     0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */
2019   ROM_LOAD( "c-2j.bpr",     0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */
2020   ROM_LOAD( "v-5e.bpr",     0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */
2017    ROM_REGION( 0x0300, "proms", 0 )
2018    ROM_LOAD( "c-2k.bpr",     0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */
2019    ROM_LOAD( "c-2j.bpr",     0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */
2020    ROM_LOAD( "v-5e.bpr",     0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */
20212021ROM_END
20222022
20232023ROM_START( dkongjr )
2024   ROM_REGION( 0x10000, "maincpu", 0 )
2025   ROM_LOAD( "dkj.5b",       0x0000, 0x1000, CRC(dea28158) SHA1(08baf84ae6f9b40a2c743fe1d8c158c74a40e95a) )
2026   ROM_CONTINUE(             0x3000, 0x1000 )
2027   ROM_LOAD( "dkj.5c",       0x2000, 0x0800, CRC(6fb5faf6) SHA1(ce1cfde71a9e2a8b5896a6301d386f72869a1d2e) )
2028   ROM_CONTINUE(             0x4800, 0x0800 )
2029   ROM_CONTINUE(             0x1000, 0x0800 )
2030   ROM_CONTINUE(             0x5800, 0x0800 )
2031   ROM_LOAD( "dkj.5e",       0x4000, 0x0800, CRC(d042b6a8) SHA1(57ac237d273496b44220b4437118115ef11dbd9f) )
2032   ROM_CONTINUE(             0x2800, 0x0800 )
2033   ROM_CONTINUE(             0x5000, 0x0800 )
2034   ROM_CONTINUE(             0x1800, 0x0800 )
2024    ROM_REGION( 0x10000, "maincpu", 0 )
2025    ROM_LOAD( "dkj.5b",       0x0000, 0x1000, CRC(dea28158) SHA1(08baf84ae6f9b40a2c743fe1d8c158c74a40e95a) )
2026    ROM_CONTINUE(             0x3000, 0x1000 )
2027    ROM_LOAD( "dkj.5c",       0x2000, 0x0800, CRC(6fb5faf6) SHA1(ce1cfde71a9e2a8b5896a6301d386f72869a1d2e) )
2028    ROM_CONTINUE(             0x4800, 0x0800 )
2029    ROM_CONTINUE(             0x1000, 0x0800 )
2030    ROM_CONTINUE(             0x5800, 0x0800 )
2031    ROM_LOAD( "dkj.5e",       0x4000, 0x0800, CRC(d042b6a8) SHA1(57ac237d273496b44220b4437118115ef11dbd9f) )
2032    ROM_CONTINUE(             0x2800, 0x0800 )
2033    ROM_CONTINUE(             0x5000, 0x0800 )
2034    ROM_CONTINUE(             0x1800, 0x0800 )
20352035
2036   ROM_REGION( 0x1000, "soundcpu", 0 )   /* sound */
2037   ROM_LOAD( "c_3h.bin",       0x0000, 0x1000, CRC(715da5f8) SHA1(f708c3fd374da65cbd9fe2e191152f5d865414a0) )
2036    ROM_REGION( 0x1000, "soundcpu", 0 ) /* sound */
2037    ROM_LOAD( "c_3h.bin",       0x0000, 0x1000, CRC(715da5f8) SHA1(f708c3fd374da65cbd9fe2e191152f5d865414a0) )
20382038
2039   ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2040   ROM_LOAD( "dkj.3n",       0x0000, 0x1000, CRC(8d51aca9) SHA1(64887564b079d98e98aafa53835e398f34fe4e3f) )
2041   ROM_LOAD( "dkj.3p",       0x1000, 0x1000, CRC(4ef64ba5) SHA1(41a7a4005087951f57f62c9751d62a8c495e6bb3) )
2039    ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2040    ROM_LOAD( "dkj.3n",       0x0000, 0x1000, CRC(8d51aca9) SHA1(64887564b079d98e98aafa53835e398f34fe4e3f) )
2041    ROM_LOAD( "dkj.3p",       0x1000, 0x1000, CRC(4ef64ba5) SHA1(41a7a4005087951f57f62c9751d62a8c495e6bb3) )
20422042
2043   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2044   ROM_LOAD( "v_7c.bin",     0x0000, 0x0800, CRC(dc7f4164) SHA1(07a6242e95b5c3b8dfdcd4b4950f463dba16dd77) )
2045   ROM_LOAD( "v_7d.bin",     0x0800, 0x0800, CRC(0ce7dcf6) SHA1(0654b77526c49f0dfa077ac4f1f69cf5cb2e2f64) )
2046   ROM_LOAD( "v_7e.bin",     0x1000, 0x0800, CRC(24d1ff17) SHA1(696854bf3dc5447d33b4815db357e6ce3834d867) )
2047   ROM_LOAD( "v_7f.bin",     0x1800, 0x0800, CRC(0f8c083f) SHA1(0b688ae9da296b2447fffa5e135fd6a56ec3e790) )
2043    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2044    ROM_LOAD( "v_7c.bin",     0x0000, 0x0800, CRC(dc7f4164) SHA1(07a6242e95b5c3b8dfdcd4b4950f463dba16dd77) )
2045    ROM_LOAD( "v_7d.bin",     0x0800, 0x0800, CRC(0ce7dcf6) SHA1(0654b77526c49f0dfa077ac4f1f69cf5cb2e2f64) )
2046    ROM_LOAD( "v_7e.bin",     0x1000, 0x0800, CRC(24d1ff17) SHA1(696854bf3dc5447d33b4815db357e6ce3834d867) )
2047    ROM_LOAD( "v_7f.bin",     0x1800, 0x0800, CRC(0f8c083f) SHA1(0b688ae9da296b2447fffa5e135fd6a56ec3e790) )
20482048
2049   ROM_REGION( 0x0300, "proms", 0 )
2050   ROM_LOAD( "c-2e.bpr",  0x0000, 0x0100, CRC(463dc7ad) SHA1(b2c9f22facc8885be2d953b056eb8dcddd4f34cb) )   /* palette low 4 bits (inverted) */
2051   ROM_LOAD( "c-2f.bpr",  0x0100, 0x0100, CRC(47ba0042) SHA1(dbec3f4b8013628c5b8f83162e5f8b1f82f6ee5f) )   /* palette high 4 bits (inverted) */
2052   ROM_LOAD( "v-2n.bpr",  0x0200, 0x0100, CRC(dbf185bf) SHA1(2697a991a4afdf079dd0b7e732f71c7618f43b70) )   /* character color codes on a per-column basis */
2049    ROM_REGION( 0x0300, "proms", 0 )
2050    ROM_LOAD( "c-2e.bpr",  0x0000, 0x0100, CRC(463dc7ad) SHA1(b2c9f22facc8885be2d953b056eb8dcddd4f34cb) )   /* palette low 4 bits (inverted) */
2051    ROM_LOAD( "c-2f.bpr",  0x0100, 0x0100, CRC(47ba0042) SHA1(dbec3f4b8013628c5b8f83162e5f8b1f82f6ee5f) )   /* palette high 4 bits (inverted) */
2052    ROM_LOAD( "v-2n.bpr",  0x0200, 0x0100, CRC(dbf185bf) SHA1(2697a991a4afdf079dd0b7e732f71c7618f43b70) )   /* character color codes on a per-column basis */
20532053ROM_END
20542054
20552055ROM_START( dkongjrj )
2056   ROM_REGION( 0x10000, "maincpu", 0 )
2057   ROM_LOAD( "c_5ba.bin",    0x0000, 0x1000, CRC(50a015ce) SHA1(edcafdf8f989dd25bb142817084d270a6942577a) )
2058   ROM_CONTINUE(             0x3000, 0x1000 )
2059   ROM_LOAD( "c_5ca.bin",    0x2000, 0x0800, CRC(c0a18f0d) SHA1(6d7396b98c0a7fa508dc233f90e5a8359439c97b) )
2060   ROM_CONTINUE(             0x4800, 0x0800 )
2061   ROM_CONTINUE(             0x1000, 0x0800 )
2062   ROM_CONTINUE(             0x5800, 0x0800 )
2063   ROM_LOAD( "c_5ea.bin",    0x4000, 0x0800, CRC(a81dd00c) SHA1(ec507d963151bb8fcee13a47d7f93aa4cd089b7e) )
2064   ROM_CONTINUE(             0x2800, 0x0800 )
2065   ROM_CONTINUE(             0x5000, 0x0800 )
2066   ROM_CONTINUE(             0x1800, 0x0800 )
2056    ROM_REGION( 0x10000, "maincpu", 0 )
2057    ROM_LOAD( "c_5ba.bin",    0x0000, 0x1000, CRC(50a015ce) SHA1(edcafdf8f989dd25bb142817084d270a6942577a) )
2058    ROM_CONTINUE(             0x3000, 0x1000 )
2059    ROM_LOAD( "c_5ca.bin",    0x2000, 0x0800, CRC(c0a18f0d) SHA1(6d7396b98c0a7fa508dc233f90e5a8359439c97b) )
2060    ROM_CONTINUE(             0x4800, 0x0800 )
2061    ROM_CONTINUE(             0x1000, 0x0800 )
2062    ROM_CONTINUE(             0x5800, 0x0800 )
2063    ROM_LOAD( "c_5ea.bin",    0x4000, 0x0800, CRC(a81dd00c) SHA1(ec507d963151bb8fcee13a47d7f93aa4cd089b7e) )
2064    ROM_CONTINUE(             0x2800, 0x0800 )
2065    ROM_CONTINUE(             0x5000, 0x0800 )
2066    ROM_CONTINUE(             0x1800, 0x0800 )
20672067
2068   ROM_REGION( 0x1000, "soundcpu", 0 )   /* sound */
2069   ROM_LOAD( "c_3h.bin",     0x0000, 0x1000, CRC(715da5f8) SHA1(f708c3fd374da65cbd9fe2e191152f5d865414a0) )
2068    ROM_REGION( 0x1000, "soundcpu", 0 ) /* sound */
2069    ROM_LOAD( "c_3h.bin",     0x0000, 0x1000, CRC(715da5f8) SHA1(f708c3fd374da65cbd9fe2e191152f5d865414a0) )
20702070
2071   ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2072   ROM_LOAD( "v_3na.bin",    0x0000, 0x1000, CRC(a95c4c63) SHA1(75e312b6872958f3bfc7bafd0743efdf7a74e8f0) )
2073   ROM_LOAD( "v_3pa.bin",    0x1000, 0x1000, CRC(4974ffef) SHA1(7bb1e207dd3c5214e405bf32c57ec1b048061050) )
2071    ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2072    ROM_LOAD( "v_3na.bin",    0x0000, 0x1000, CRC(a95c4c63) SHA1(75e312b6872958f3bfc7bafd0743efdf7a74e8f0) )
2073    ROM_LOAD( "v_3pa.bin",    0x1000, 0x1000, CRC(4974ffef) SHA1(7bb1e207dd3c5214e405bf32c57ec1b048061050) )
20742074
2075   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2076   ROM_LOAD( "v_7c.bin",     0x0000, 0x0800, CRC(dc7f4164) SHA1(07a6242e95b5c3b8dfdcd4b4950f463dba16dd77) )
2077   ROM_LOAD( "v_7d.bin",     0x0800, 0x0800, CRC(0ce7dcf6) SHA1(0654b77526c49f0dfa077ac4f1f69cf5cb2e2f64) )
2078   ROM_LOAD( "v_7e.bin",     0x1000, 0x0800, CRC(24d1ff17) SHA1(696854bf3dc5447d33b4815db357e6ce3834d867) )
2079   ROM_LOAD( "v_7f.bin",     0x1800, 0x0800, CRC(0f8c083f) SHA1(0b688ae9da296b2447fffa5e135fd6a56ec3e790) )
2075    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2076    ROM_LOAD( "v_7c.bin",     0x0000, 0x0800, CRC(dc7f4164) SHA1(07a6242e95b5c3b8dfdcd4b4950f463dba16dd77) )
2077    ROM_LOAD( "v_7d.bin",     0x0800, 0x0800, CRC(0ce7dcf6) SHA1(0654b77526c49f0dfa077ac4f1f69cf5cb2e2f64) )
2078    ROM_LOAD( "v_7e.bin",     0x1000, 0x0800, CRC(24d1ff17) SHA1(696854bf3dc5447d33b4815db357e6ce3834d867) )
2079    ROM_LOAD( "v_7f.bin",     0x1800, 0x0800, CRC(0f8c083f) SHA1(0b688ae9da296b2447fffa5e135fd6a56ec3e790) )
20802080
2081   ROM_REGION( 0x0300, "proms", 0 )
2082   ROM_LOAD( "c-2e.bpr",  0x0000, 0x0100, CRC(463dc7ad) SHA1(b2c9f22facc8885be2d953b056eb8dcddd4f34cb) )   /* palette low 4 bits (inverted) */
2083   ROM_LOAD( "c-2f.bpr",  0x0100, 0x0100, CRC(47ba0042) SHA1(dbec3f4b8013628c5b8f83162e5f8b1f82f6ee5f) )   /* palette high 4 bits (inverted) */
2084   ROM_LOAD( "v-2n.bpr",  0x0200, 0x0100, CRC(dbf185bf) SHA1(2697a991a4afdf079dd0b7e732f71c7618f43b70) )   /* character color codes on a per-column basis */
2081    ROM_REGION( 0x0300, "proms", 0 )
2082    ROM_LOAD( "c-2e.bpr",  0x0000, 0x0100, CRC(463dc7ad) SHA1(b2c9f22facc8885be2d953b056eb8dcddd4f34cb) )   /* palette low 4 bits (inverted) */
2083    ROM_LOAD( "c-2f.bpr",  0x0100, 0x0100, CRC(47ba0042) SHA1(dbec3f4b8013628c5b8f83162e5f8b1f82f6ee5f) )   /* palette high 4 bits (inverted) */
2084    ROM_LOAD( "v-2n.bpr",  0x0200, 0x0100, CRC(dbf185bf) SHA1(2697a991a4afdf079dd0b7e732f71c7618f43b70) )   /* character color codes on a per-column basis */
20852085ROM_END
20862086
20872087ROM_START( dkngjnrj )
2088   ROM_REGION( 0x10000, "maincpu", 0 )
2089   ROM_LOAD( "dkjp.5b",      0x0000, 0x1000, CRC(7b48870b) SHA1(4f737559e2bf5cc28824220417d7a2827361221f) )
2090   ROM_CONTINUE(             0x3000, 0x1000 )
2091   ROM_LOAD( "dkjp.5c",      0x2000, 0x0800, CRC(12391665) SHA1(3141ed5096097c48ac128636330ab6837a665d40) )
2092   ROM_CONTINUE(             0x4800, 0x0800 )
2093   ROM_CONTINUE(             0x1000, 0x0800 )
2094   ROM_CONTINUE(             0x5800, 0x0800 )
2095   ROM_LOAD( "dkjp.5e",      0x4000, 0x0800, CRC(6c9f9103) SHA1(2d595e13c4ecb74b18e92b00efcc90c1e841b478) )
2096   ROM_CONTINUE(             0x2800, 0x0800 )
2097   ROM_CONTINUE(             0x5000, 0x0800 )
2098   ROM_CONTINUE(             0x1800, 0x0800 )
2088    ROM_REGION( 0x10000, "maincpu", 0 )
2089    ROM_LOAD( "dkjp.5b",      0x0000, 0x1000, CRC(7b48870b) SHA1(4f737559e2bf5cc28824220417d7a2827361221f) )
2090    ROM_CONTINUE(             0x3000, 0x1000 )
2091    ROM_LOAD( "dkjp.5c",      0x2000, 0x0800, CRC(12391665) SHA1(3141ed5096097c48ac128636330ab6837a665d40) )
2092    ROM_CONTINUE(             0x4800, 0x0800 )
2093    ROM_CONTINUE(             0x1000, 0x0800 )
2094    ROM_CONTINUE(             0x5800, 0x0800 )
2095    ROM_LOAD( "dkjp.5e",      0x4000, 0x0800, CRC(6c9f9103) SHA1(2d595e13c4ecb74b18e92b00efcc90c1e841b478) )
2096    ROM_CONTINUE(             0x2800, 0x0800 )
2097    ROM_CONTINUE(             0x5000, 0x0800 )
2098    ROM_CONTINUE(             0x1800, 0x0800 )
20992099
2100   ROM_REGION( 0x1000, "soundcpu", 0 )   /* sound */
2101   ROM_LOAD( "c_3h.bin",       0x0000, 0x1000, CRC(715da5f8) SHA1(f708c3fd374da65cbd9fe2e191152f5d865414a0) )
2100    ROM_REGION( 0x1000, "soundcpu", 0 ) /* sound */
2101    ROM_LOAD( "c_3h.bin",       0x0000, 0x1000, CRC(715da5f8) SHA1(f708c3fd374da65cbd9fe2e191152f5d865414a0) )
21022102
2103   ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2104   ROM_LOAD( "dkj.3n",       0x0000, 0x1000, CRC(8d51aca9) SHA1(64887564b079d98e98aafa53835e398f34fe4e3f) )
2105   ROM_LOAD( "dkj.3p",       0x1000, 0x1000, CRC(4ef64ba5) SHA1(41a7a4005087951f57f62c9751d62a8c495e6bb3) )
2103    ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2104    ROM_LOAD( "dkj.3n",       0x0000, 0x1000, CRC(8d51aca9) SHA1(64887564b079d98e98aafa53835e398f34fe4e3f) )
2105    ROM_LOAD( "dkj.3p",       0x1000, 0x1000, CRC(4ef64ba5) SHA1(41a7a4005087951f57f62c9751d62a8c495e6bb3) )
21062106
2107   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2108   ROM_LOAD( "v_7c.bin",     0x0000, 0x0800, CRC(dc7f4164) SHA1(07a6242e95b5c3b8dfdcd4b4950f463dba16dd77) )
2109   ROM_LOAD( "v_7d.bin",     0x0800, 0x0800, CRC(0ce7dcf6) SHA1(0654b77526c49f0dfa077ac4f1f69cf5cb2e2f64) )
2110   ROM_LOAD( "v_7e.bin",     0x1000, 0x0800, CRC(24d1ff17) SHA1(696854bf3dc5447d33b4815db357e6ce3834d867) )
2111   ROM_LOAD( "v_7f.bin",     0x1800, 0x0800, CRC(0f8c083f) SHA1(0b688ae9da296b2447fffa5e135fd6a56ec3e790) )
2107    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2108    ROM_LOAD( "v_7c.bin",     0x0000, 0x0800, CRC(dc7f4164) SHA1(07a6242e95b5c3b8dfdcd4b4950f463dba16dd77) )
2109    ROM_LOAD( "v_7d.bin",     0x0800, 0x0800, CRC(0ce7dcf6) SHA1(0654b77526c49f0dfa077ac4f1f69cf5cb2e2f64) )
2110    ROM_LOAD( "v_7e.bin",     0x1000, 0x0800, CRC(24d1ff17) SHA1(696854bf3dc5447d33b4815db357e6ce3834d867) )
2111    ROM_LOAD( "v_7f.bin",     0x1800, 0x0800, CRC(0f8c083f) SHA1(0b688ae9da296b2447fffa5e135fd6a56ec3e790) )
21122112
2113   ROM_REGION( 0x0300, "proms", 0 )
2114   ROM_LOAD( "c-2e.bpr",  0x0000, 0x0100, CRC(463dc7ad) SHA1(b2c9f22facc8885be2d953b056eb8dcddd4f34cb) )   /* palette low 4 bits (inverted) */
2115   ROM_LOAD( "c-2f.bpr",  0x0100, 0x0100, CRC(47ba0042) SHA1(dbec3f4b8013628c5b8f83162e5f8b1f82f6ee5f) )   /* palette high 4 bits (inverted) */
2116   ROM_LOAD( "v-2n.bpr",  0x0200, 0x0100, CRC(dbf185bf) SHA1(2697a991a4afdf079dd0b7e732f71c7618f43b70) )   /* character color codes on a per-column basis */
2113    ROM_REGION( 0x0300, "proms", 0 )
2114    ROM_LOAD( "c-2e.bpr",  0x0000, 0x0100, CRC(463dc7ad) SHA1(b2c9f22facc8885be2d953b056eb8dcddd4f34cb) )   /* palette low 4 bits (inverted) */
2115    ROM_LOAD( "c-2f.bpr",  0x0100, 0x0100, CRC(47ba0042) SHA1(dbec3f4b8013628c5b8f83162e5f8b1f82f6ee5f) )   /* palette high 4 bits (inverted) */
2116    ROM_LOAD( "v-2n.bpr",  0x0200, 0x0100, CRC(dbf185bf) SHA1(2697a991a4afdf079dd0b7e732f71c7618f43b70) )   /* character color codes on a per-column basis */
21172117ROM_END
21182118
21192119ROM_START( dkongjrb )
2120   ROM_REGION( 0x10000, "maincpu", 0 )
2121   ROM_LOAD( "dkjr1",        0x0000, 0x1000, CRC(ec7e097f) SHA1(c10885d8724434030094a106c5b6de7fa6976d0f) )
2122   ROM_CONTINUE(             0x3000, 0x1000 )
2123   ROM_LOAD( "c_5ca.bin",    0x2000, 0x0800, CRC(c0a18f0d) SHA1(6d7396b98c0a7fa508dc233f90e5a8359439c97b) )
2124   ROM_CONTINUE(             0x4800, 0x0800 )
2125   ROM_CONTINUE(             0x1000, 0x0800 )
2126   ROM_CONTINUE(             0x5800, 0x0800 )
2127   ROM_LOAD( "c_5ea.bin",    0x4000, 0x0800, CRC(a81dd00c) SHA1(ec507d963151bb8fcee13a47d7f93aa4cd089b7e) )
2128   ROM_CONTINUE(             0x2800, 0x0800 )
2129   ROM_CONTINUE(             0x5000, 0x0800 )
2130   ROM_CONTINUE(             0x1800, 0x0800 )
2120    ROM_REGION( 0x10000, "maincpu", 0 )
2121    ROM_LOAD( "dkjr1",        0x0000, 0x1000, CRC(ec7e097f) SHA1(c10885d8724434030094a106c5b6de7fa6976d0f) )
2122    ROM_CONTINUE(             0x3000, 0x1000 )
2123    ROM_LOAD( "c_5ca.bin",    0x2000, 0x0800, CRC(c0a18f0d) SHA1(6d7396b98c0a7fa508dc233f90e5a8359439c97b) )
2124    ROM_CONTINUE(             0x4800, 0x0800 )
2125    ROM_CONTINUE(             0x1000, 0x0800 )
2126    ROM_CONTINUE(             0x5800, 0x0800 )
2127    ROM_LOAD( "c_5ea.bin",    0x4000, 0x0800, CRC(a81dd00c) SHA1(ec507d963151bb8fcee13a47d7f93aa4cd089b7e) )
2128    ROM_CONTINUE(             0x2800, 0x0800 )
2129    ROM_CONTINUE(             0x5000, 0x0800 )
2130    ROM_CONTINUE(             0x1800, 0x0800 )
21312131
2132   ROM_REGION( 0x1000, "soundcpu", 0 )   /* sound */
2133   ROM_LOAD( "c_3h.bin",       0x0000, 0x1000, CRC(715da5f8) SHA1(f708c3fd374da65cbd9fe2e191152f5d865414a0) )
2132    ROM_REGION( 0x1000, "soundcpu", 0 ) /* sound */
2133    ROM_LOAD( "c_3h.bin",       0x0000, 0x1000, CRC(715da5f8) SHA1(f708c3fd374da65cbd9fe2e191152f5d865414a0) )
21342134
2135   ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2136   ROM_LOAD( "v_3na.bin",    0x0000, 0x1000, CRC(a95c4c63) SHA1(75e312b6872958f3bfc7bafd0743efdf7a74e8f0) )
2137   ROM_LOAD( "dkjr10",       0x1000, 0x1000, CRC(adc11322) SHA1(01c13213e413c269cf8d9e391209b32b18747c8d) )
2135    ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2136    ROM_LOAD( "v_3na.bin",    0x0000, 0x1000, CRC(a95c4c63) SHA1(75e312b6872958f3bfc7bafd0743efdf7a74e8f0) )
2137    ROM_LOAD( "dkjr10",       0x1000, 0x1000, CRC(adc11322) SHA1(01c13213e413c269cf8d9e391209b32b18747c8d) )
21382138
2139   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2140   ROM_LOAD( "v_7c.bin",     0x0000, 0x0800, CRC(dc7f4164) SHA1(07a6242e95b5c3b8dfdcd4b4950f463dba16dd77) )
2141   ROM_LOAD( "v_7d.bin",     0x0800, 0x0800, CRC(0ce7dcf6) SHA1(0654b77526c49f0dfa077ac4f1f69cf5cb2e2f64) )
2142   ROM_LOAD( "v_7e.bin",     0x1000, 0x0800, CRC(24d1ff17) SHA1(696854bf3dc5447d33b4815db357e6ce3834d867) )
2143   ROM_LOAD( "v_7f.bin",     0x1800, 0x0800, CRC(0f8c083f) SHA1(0b688ae9da296b2447fffa5e135fd6a56ec3e790) )
2139    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2140    ROM_LOAD( "v_7c.bin",     0x0000, 0x0800, CRC(dc7f4164) SHA1(07a6242e95b5c3b8dfdcd4b4950f463dba16dd77) )
2141    ROM_LOAD( "v_7d.bin",     0x0800, 0x0800, CRC(0ce7dcf6) SHA1(0654b77526c49f0dfa077ac4f1f69cf5cb2e2f64) )
2142    ROM_LOAD( "v_7e.bin",     0x1000, 0x0800, CRC(24d1ff17) SHA1(696854bf3dc5447d33b4815db357e6ce3834d867) )
2143    ROM_LOAD( "v_7f.bin",     0x1800, 0x0800, CRC(0f8c083f) SHA1(0b688ae9da296b2447fffa5e135fd6a56ec3e790) )
21442144
2145   ROM_REGION( 0x0300, "proms", 0 )
2146   ROM_LOAD( "c-2e.bpr",  0x0000, 0x0100, CRC(463dc7ad) SHA1(b2c9f22facc8885be2d953b056eb8dcddd4f34cb) )   /* palette low 4 bits (inverted) */
2147   ROM_LOAD( "c-2f.bpr",  0x0100, 0x0100, CRC(47ba0042) SHA1(dbec3f4b8013628c5b8f83162e5f8b1f82f6ee5f) )   /* palette high 4 bits (inverted) */
2148   ROM_LOAD( "v-2n.bpr",  0x0200, 0x0100, CRC(dbf185bf) SHA1(2697a991a4afdf079dd0b7e732f71c7618f43b70) )   /* character color codes on a per-column basis */
2145    ROM_REGION( 0x0300, "proms", 0 )
2146    ROM_LOAD( "c-2e.bpr",  0x0000, 0x0100, CRC(463dc7ad) SHA1(b2c9f22facc8885be2d953b056eb8dcddd4f34cb) )   /* palette low 4 bits (inverted) */
2147    ROM_LOAD( "c-2f.bpr",  0x0100, 0x0100, CRC(47ba0042) SHA1(dbec3f4b8013628c5b8f83162e5f8b1f82f6ee5f) )   /* palette high 4 bits (inverted) */
2148    ROM_LOAD( "v-2n.bpr",  0x0200, 0x0100, CRC(dbf185bf) SHA1(2697a991a4afdf079dd0b7e732f71c7618f43b70) )   /* character color codes on a per-column basis */
21492149ROM_END
21502150
21512151/* only the graphic roms differ from dkongjrb but it's a common bootleg */
21522152ROM_START( jrking )
2153   ROM_REGION( 0x10000, "maincpu", 0 )
2154   ROM_LOAD( "b5.bin",    0x0000, 0x1000, CRC(ec7e097f) SHA1(c10885d8724434030094a106c5b6de7fa6976d0f) )
2155   ROM_CONTINUE(          0x3000, 0x1000 )
2156   ROM_LOAD( "c5.bin",    0x2000, 0x0800, CRC(c0a18f0d) SHA1(6d7396b98c0a7fa508dc233f90e5a8359439c97b) )
2157   ROM_CONTINUE(          0x4800, 0x0800 )
2158   ROM_CONTINUE(          0x1000, 0x0800 )
2159   ROM_CONTINUE(          0x5800, 0x0800 )
2160   ROM_LOAD( "e5.bin",    0x4000, 0x0800, CRC(a81dd00c) SHA1(ec507d963151bb8fcee13a47d7f93aa4cd089b7e) )
2161   ROM_CONTINUE(          0x2800, 0x0800 )
2162   ROM_CONTINUE(          0x5000, 0x0800 )
2163   ROM_CONTINUE(          0x1800, 0x0800 )
2153    ROM_REGION( 0x10000, "maincpu", 0 )
2154    ROM_LOAD( "b5.bin",    0x0000, 0x1000, CRC(ec7e097f) SHA1(c10885d8724434030094a106c5b6de7fa6976d0f) )
2155    ROM_CONTINUE(          0x3000, 0x1000 )
2156    ROM_LOAD( "c5.bin",    0x2000, 0x0800, CRC(c0a18f0d) SHA1(6d7396b98c0a7fa508dc233f90e5a8359439c97b) )
2157    ROM_CONTINUE(          0x4800, 0x0800 )
2158    ROM_CONTINUE(          0x1000, 0x0800 )
2159    ROM_CONTINUE(          0x5800, 0x0800 )
2160    ROM_LOAD( "e5.bin",    0x4000, 0x0800, CRC(a81dd00c) SHA1(ec507d963151bb8fcee13a47d7f93aa4cd089b7e) )
2161    ROM_CONTINUE(          0x2800, 0x0800 )
2162    ROM_CONTINUE(          0x5000, 0x0800 )
2163    ROM_CONTINUE(          0x1800, 0x0800 )
21642164
2165   ROM_REGION( 0x1000, "soundcpu", 0 )   /* sound */
2166   ROM_LOAD( "h3.bin",       0x0000, 0x1000, CRC(715da5f8) SHA1(f708c3fd374da65cbd9fe2e191152f5d865414a0) )
2165    ROM_REGION( 0x1000, "soundcpu", 0 ) /* sound */
2166    ROM_LOAD( "h3.bin",       0x0000, 0x1000, CRC(715da5f8) SHA1(f708c3fd374da65cbd9fe2e191152f5d865414a0) )
21672167
2168   ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2169   ROM_LOAD( "n3.bin",    0x0000, 0x1000, CRC(7110715d) SHA1(6d848563bf01b347e374d5cae23e09806e28ea6d) )
2170   ROM_LOAD( "p3.bin",    0x1000, 0x1000, CRC(46476016) SHA1(5af29f816e53fd344d114ebf2369e29359e08ce0) )
2168    ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2169    ROM_LOAD( "n3.bin",    0x0000, 0x1000, CRC(7110715d) SHA1(6d848563bf01b347e374d5cae23e09806e28ea6d) )
2170    ROM_LOAD( "p3.bin",    0x1000, 0x1000, CRC(46476016) SHA1(5af29f816e53fd344d114ebf2369e29359e08ce0) )
21712171
2172   ROM_REGION( 0x4000, "gfx2", ROMREGION_DISPOSE )
2173   ROM_LOAD( "c7.bin",     0x0000, 0x1000, CRC(9f531527) SHA1(6b426cea91135ae1924506f964d856fc475c08e1) )
2174   ROM_LOAD( "d7.bin",     0x1000, 0x1000, CRC(32fbd41b) SHA1(1f98facc2c20dc4b8722085f269f123601382994) )
2175   ROM_LOAD( "e7.bin",     0x2000, 0x1000, CRC(2286bf8e) SHA1(7511e83aa5a4de988048fc2db4de7b3d5aabee8c) )
2176   ROM_LOAD( "f7.bin",     0x3000, 0x1000, CRC(627007a0) SHA1(f71091b65978f7f386ba3c30a3ffe824412bbe67) )
2172    ROM_REGION( 0x4000, "gfx2", ROMREGION_DISPOSE )
2173    ROM_LOAD( "c7.bin",     0x0000, 0x1000, CRC(9f531527) SHA1(6b426cea91135ae1924506f964d856fc475c08e1) )
2174    ROM_LOAD( "d7.bin",     0x1000, 0x1000, CRC(32fbd41b) SHA1(1f98facc2c20dc4b8722085f269f123601382994) )
2175    ROM_LOAD( "e7.bin",     0x2000, 0x1000, CRC(2286bf8e) SHA1(7511e83aa5a4de988048fc2db4de7b3d5aabee8c) )
2176    ROM_LOAD( "f7.bin",     0x3000, 0x1000, CRC(627007a0) SHA1(f71091b65978f7f386ba3c30a3ffe824412bbe67) )
21772177
2178   ROM_REGION( 0x0300, "proms", 0 )
2179   ROM_LOAD( "c-2e.bpr",  0x0000, 0x0100, CRC(463dc7ad) SHA1(b2c9f22facc8885be2d953b056eb8dcddd4f34cb) )   /* palette low 4 bits (inverted) */
2180   ROM_LOAD( "c-2f.bpr",  0x0100, 0x0100, CRC(47ba0042) SHA1(dbec3f4b8013628c5b8f83162e5f8b1f82f6ee5f) )   /* palette high 4 bits (inverted) */
2181   ROM_LOAD( "v-2n.bpr",  0x0200, 0x0100, CRC(dbf185bf) SHA1(2697a991a4afdf079dd0b7e732f71c7618f43b70) )   /* character color codes on a per-column basis */
2178    ROM_REGION( 0x0300, "proms", 0 )
2179    ROM_LOAD( "c-2e.bpr",  0x0000, 0x0100, CRC(463dc7ad) SHA1(b2c9f22facc8885be2d953b056eb8dcddd4f34cb) )   /* palette low 4 bits (inverted) */
2180    ROM_LOAD( "c-2f.bpr",  0x0100, 0x0100, CRC(47ba0042) SHA1(dbec3f4b8013628c5b8f83162e5f8b1f82f6ee5f) )   /* palette high 4 bits (inverted) */
2181    ROM_LOAD( "v-2n.bpr",  0x0200, 0x0100, CRC(dbf185bf) SHA1(2697a991a4afdf079dd0b7e732f71c7618f43b70) )   /* character color codes on a per-column basis */
21822182ROM_END
21832183
21842184ROM_START( dkongjre )
2185   ROM_REGION( 0x10000, "maincpu", 0 )
2186   ROM_LOAD( "djr1-c.5b",    0x0000, 0x1000, CRC(ffe9e1a5) SHA1(715dc79d85169b4c1faf43458592e69b434afefd) )
2187   ROM_CONTINUE(             0x3000, 0x1000 )
2188   ROM_LOAD( "djr1-c.5c",    0x2000, 0x0800, CRC(982e30e8) SHA1(4d93d79e6ab1cad678af509cb3be4166b239bfa6) )
2189   ROM_CONTINUE(             0x4800, 0x0800 )
2190   ROM_CONTINUE(             0x1000, 0x0800 )
2191   ROM_CONTINUE(             0x5800, 0x0800 )
2192   ROM_LOAD( "djr1-c.5e",    0x4000, 0x0800, CRC(24c3d325) SHA1(98b0354cddf2cb5e21a3aa8387b86e8606e51d55) )
2193   ROM_CONTINUE(             0x2800, 0x0800 )
2194   ROM_CONTINUE(             0x5000, 0x0800 )
2195   ROM_CONTINUE(             0x1800, 0x0800 )
2196   ROM_LOAD( "djr1-c.5a",    0x8000, 0x1000, CRC(bb5f5180) SHA1(1ef6236b7204432cfd17c689760943ab603c6fb7) )
2185    ROM_REGION( 0x10000, "maincpu", 0 )
2186    ROM_LOAD( "djr1-c.5b",    0x0000, 0x1000, CRC(ffe9e1a5) SHA1(715dc79d85169b4c1faf43458592e69b434afefd) )
2187    ROM_CONTINUE(             0x3000, 0x1000 )
2188    ROM_LOAD( "djr1-c.5c",    0x2000, 0x0800, CRC(982e30e8) SHA1(4d93d79e6ab1cad678af509cb3be4166b239bfa6) )
2189    ROM_CONTINUE(             0x4800, 0x0800 )
2190    ROM_CONTINUE(             0x1000, 0x0800 )
2191    ROM_CONTINUE(             0x5800, 0x0800 )
2192    ROM_LOAD( "djr1-c.5e",    0x4000, 0x0800, CRC(24c3d325) SHA1(98b0354cddf2cb5e21a3aa8387b86e8606e51d55) )
2193    ROM_CONTINUE(             0x2800, 0x0800 )
2194    ROM_CONTINUE(             0x5000, 0x0800 )
2195    ROM_CONTINUE(             0x1800, 0x0800 )
2196    ROM_LOAD( "djr1-c.5a",    0x8000, 0x1000, CRC(bb5f5180) SHA1(1ef6236b7204432cfd17c689760943ab603c6fb7) )
21972197
2198   ROM_REGION( 0x1000, "soundcpu", 0 )   /* sound */
2199   ROM_LOAD( "c_3h.bin",       0x0000, 0x1000, CRC(715da5f8) SHA1(f708c3fd374da65cbd9fe2e191152f5d865414a0) )
2198    ROM_REGION( 0x1000, "soundcpu", 0 ) /* sound */
2199    ROM_LOAD( "c_3h.bin",       0x0000, 0x1000, CRC(715da5f8) SHA1(f708c3fd374da65cbd9fe2e191152f5d865414a0) )
22002200
2201   ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2202   ROM_LOAD( "dkj.3n",       0x0000, 0x1000, CRC(8d51aca9) SHA1(64887564b079d98e98aafa53835e398f34fe4e3f) )
2203   ROM_LOAD( "dkj.3p",       0x1000, 0x1000, CRC(4ef64ba5) SHA1(41a7a4005087951f57f62c9751d62a8c495e6bb3) )
2201    ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2202    ROM_LOAD( "dkj.3n",       0x0000, 0x1000, CRC(8d51aca9) SHA1(64887564b079d98e98aafa53835e398f34fe4e3f) )
2203    ROM_LOAD( "dkj.3p",       0x1000, 0x1000, CRC(4ef64ba5) SHA1(41a7a4005087951f57f62c9751d62a8c495e6bb3) )
22042204
2205   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2206   ROM_LOAD( "v_7c.bin",     0x0000, 0x0800, CRC(dc7f4164) SHA1(07a6242e95b5c3b8dfdcd4b4950f463dba16dd77) )
2207   ROM_LOAD( "v_7d.bin",     0x0800, 0x0800, CRC(0ce7dcf6) SHA1(0654b77526c49f0dfa077ac4f1f69cf5cb2e2f64) )
2208   ROM_LOAD( "v_7e.bin",     0x1000, 0x0800, CRC(24d1ff17) SHA1(696854bf3dc5447d33b4815db357e6ce3834d867) )
2209   ROM_LOAD( "v_7f.bin",     0x1800, 0x0800, CRC(0f8c083f) SHA1(0b688ae9da296b2447fffa5e135fd6a56ec3e790) )
2205    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2206    ROM_LOAD( "v_7c.bin",     0x0000, 0x0800, CRC(dc7f4164) SHA1(07a6242e95b5c3b8dfdcd4b4950f463dba16dd77) )
2207    ROM_LOAD( "v_7d.bin",     0x0800, 0x0800, CRC(0ce7dcf6) SHA1(0654b77526c49f0dfa077ac4f1f69cf5cb2e2f64) )
2208    ROM_LOAD( "v_7e.bin",     0x1000, 0x0800, CRC(24d1ff17) SHA1(696854bf3dc5447d33b4815db357e6ce3834d867) )
2209    ROM_LOAD( "v_7f.bin",     0x1800, 0x0800, CRC(0f8c083f) SHA1(0b688ae9da296b2447fffa5e135fd6a56ec3e790) )
22102210
2211   ROM_REGION( 0x0300, "proms", 0 )
2212   ROM_LOAD( "c-2e.bpr",  0x0000, 0x0100, CRC(463dc7ad) SHA1(b2c9f22facc8885be2d953b056eb8dcddd4f34cb) )   /* palette low 4 bits (inverted) */
2213   ROM_LOAD( "c-2f.bpr",  0x0100, 0x0100, CRC(47ba0042) SHA1(dbec3f4b8013628c5b8f83162e5f8b1f82f6ee5f) )   /* palette high 4 bits (inverted) */
2214   ROM_LOAD( "v-2n.bpr",  0x0200, 0x0100, CRC(dbf185bf) SHA1(2697a991a4afdf079dd0b7e732f71c7618f43b70) )   /* character color codes on a per-column basis */
2211    ROM_REGION( 0x0300, "proms", 0 )
2212    ROM_LOAD( "c-2e.bpr",  0x0000, 0x0100, CRC(463dc7ad) SHA1(b2c9f22facc8885be2d953b056eb8dcddd4f34cb) )   /* palette low 4 bits (inverted) */
2213    ROM_LOAD( "c-2f.bpr",  0x0100, 0x0100, CRC(47ba0042) SHA1(dbec3f4b8013628c5b8f83162e5f8b1f82f6ee5f) )   /* palette high 4 bits (inverted) */
2214    ROM_LOAD( "v-2n.bpr",  0x0200, 0x0100, CRC(dbf185bf) SHA1(2697a991a4afdf079dd0b7e732f71c7618f43b70) )   /* character color codes on a per-column basis */
22152215ROM_END
22162216
22172217ROM_START( pestplce )
2218   ROM_REGION( 0x10000, "maincpu", 0 )
2219   ROM_LOAD( "pest.1p",      0x0000, 0x1000, CRC(80d50721) SHA1(9c0e7571b1664dce741595a2d13dc9d7709b35a9) )
2220   ROM_CONTINUE(           0x3000, 0x1000 )
2221   ROM_LOAD( "pest.2p",      0x2000, 0x0800, CRC(9c3681cc) SHA1(c12e8e7ab79c9fde92cca2c589904f68cf52cbf1) )
2222   ROM_CONTINUE(           0x4800, 0x0800 )
2223   ROM_CONTINUE(           0x1000, 0x0800 )
2224   ROM_CONTINUE(           0x5800, 0x0800 )
2225   ROM_LOAD( "pest.3p",      0x4000, 0x0800, CRC(49853922) SHA1(1e8a29fdb1af52a39c07ef214f5e7c2d56b35ea5) )
2226   ROM_CONTINUE(           0x2800, 0x0800 )
2227   ROM_CONTINUE(           0x5000, 0x0800 )
2228   ROM_CONTINUE(           0x1800, 0x0800 )
2229   ROM_LOAD( "pest.0",       0xb000, 0x1000, CRC(28952b56) SHA1(fa8abe594a88a61e85f074d03822d7e0dcd52fb2) )
2218    ROM_REGION( 0x10000, "maincpu", 0 )
2219    ROM_LOAD( "pest.1p",      0x0000, 0x1000, CRC(80d50721) SHA1(9c0e7571b1664dce741595a2d13dc9d7709b35a9) )
2220    ROM_CONTINUE(             0x3000, 0x1000 )
2221    ROM_LOAD( "pest.2p",      0x2000, 0x0800, CRC(9c3681cc) SHA1(c12e8e7ab79c9fde92cca2c589904f68cf52cbf1) )
2222    ROM_CONTINUE(             0x4800, 0x0800 )
2223    ROM_CONTINUE(             0x1000, 0x0800 )
2224    ROM_CONTINUE(             0x5800, 0x0800 )
2225    ROM_LOAD( "pest.3p",      0x4000, 0x0800, CRC(49853922) SHA1(1e8a29fdb1af52a39c07ef214f5e7c2d56b35ea5) )
2226    ROM_CONTINUE(             0x2800, 0x0800 )
2227    ROM_CONTINUE(             0x5000, 0x0800 )
2228    ROM_CONTINUE(             0x1800, 0x0800 )
2229    ROM_LOAD( "pest.0",       0xb000, 0x1000, CRC(28952b56) SHA1(fa8abe594a88a61e85f074d03822d7e0dcd52fb2) )
22302230
2231   ROM_REGION( 0x1000, "soundcpu", 0 )   /* sound */
2232   ROM_LOAD( "pest.4",       0x0000, 0x1000, CRC(715da5f8) SHA1(f708c3fd374da65cbd9fe2e191152f5d865414a0) )
2231    ROM_REGION( 0x1000, "soundcpu", 0 ) /* sound */
2232    ROM_LOAD( "pest.4",       0x0000, 0x1000, CRC(715da5f8) SHA1(f708c3fd374da65cbd9fe2e191152f5d865414a0) )
22332233
2234   ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2235   ROM_LOAD( "pest.o",       0x0000, 0x1000, CRC(03939ece) SHA1(a776558eba2f8a2bc16933555d41a4532b627bff) )
2236   ROM_LOAD( "pest.k",       0x1000, 0x1000, CRC(2acacedf) SHA1(f91863f46aeb8986226b0b0854bac00217d6e7cf) )
2234    ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2235    ROM_LOAD( "pest.o",       0x0000, 0x1000, CRC(03939ece) SHA1(a776558eba2f8a2bc16933555d41a4532b627bff) )
2236    ROM_LOAD( "pest.k",       0x1000, 0x1000, CRC(2acacedf) SHA1(f91863f46aeb8986226b0b0854bac00217d6e7cf) )
22372237
2238   ROM_REGION( 0x4000, "gfx2", ROMREGION_DISPOSE )
2239   ROM_LOAD( "pest.b",        0x0000, 0x1000, CRC(e760073e) SHA1(917e74a4efa62b7404a03f094f3f4047dda8feda) )
2240   ROM_LOAD( "pest.a",        0x1000, 0x1000, CRC(1958346e) SHA1(c4053dafc904b5e202e4a1acc48dd3e22db05c74) )
2241   ROM_LOAD( "pest.d",        0x2000, 0x1000, CRC(3a993c17) SHA1(af7048576aa3185b051518663693802ec9014a74) )
2242   ROM_LOAD( "pest.c",        0x3000, 0x1000, CRC(bf08f2a3) SHA1(c755f7463ac46054c65248d91b8e8da9cd379bf5) )
2238    ROM_REGION( 0x4000, "gfx2", ROMREGION_DISPOSE )
2239    ROM_LOAD( "pest.b",        0x0000, 0x1000, CRC(e760073e) SHA1(917e74a4efa62b7404a03f094f3f4047dda8feda) )
2240    ROM_LOAD( "pest.a",        0x1000, 0x1000, CRC(1958346e) SHA1(c4053dafc904b5e202e4a1acc48dd3e22db05c74) )
2241    ROM_LOAD( "pest.d",        0x2000, 0x1000, CRC(3a993c17) SHA1(af7048576aa3185b051518663693802ec9014a74) )
2242    ROM_LOAD( "pest.c",        0x3000, 0x1000, CRC(bf08f2a3) SHA1(c755f7463ac46054c65248d91b8e8da9cd379bf5) )
22432243
2244   /* not standard dkong layout */
2245   ROM_REGION( 0x0300, "proms", ROMREGION_INVERT )
2246   ROM_LOAD( "n82s129a.bin",  0x0000, 0x0100, CRC(0330f35f) SHA1(5bd50cdd738b258dd3cfcd0e1dd8d37c927edc4b) )
2247   ROM_LOAD( "n82s129b.bin",  0x0100, 0x0100, CRC(ba88311b) SHA1(b4388ebd3984bdb966d850cfb7d34c3ebce230b7) )
2248   ROM_LOAD( "sn74s288n.bin", 0x0200, 0x0020, CRC(a5a6f2ca) SHA1(5507fb6f5c8845c4421c2996e9f76c818d987623) )
2244    /* not standard dkong layout */
2245    ROM_REGION( 0x0300, "proms", ROMREGION_INVERT )
2246    ROM_LOAD( "n82s129a.bin",  0x0000, 0x0100, CRC(0330f35f) SHA1(5bd50cdd738b258dd3cfcd0e1dd8d37c927edc4b) )
2247    ROM_LOAD( "n82s129b.bin",  0x0100, 0x0100, CRC(ba88311b) SHA1(b4388ebd3984bdb966d850cfb7d34c3ebce230b7) )
2248    ROM_LOAD( "sn74s288n.bin", 0x0200, 0x0020, CRC(a5a6f2ca) SHA1(5507fb6f5c8845c4421c2996e9f76c818d987623) )
22492249ROM_END
22502250
22512251ROM_START( dkong3 )
2252   ROM_REGION( 0x10000, "maincpu", 0 )
2253   ROM_LOAD( "dk3c.7b",      0x0000, 0x2000, CRC(38d5f38e) SHA1(5a6bb0e5070211515e3d56bd7d4c2d1655ac1621) )
2254   ROM_LOAD( "dk3c.7c",      0x2000, 0x2000, CRC(c9134379) SHA1(ecddb3694b93cb3dc98c3b1aeeee928e27529aba) )
2255   ROM_LOAD( "dk3c.7d",      0x4000, 0x2000, CRC(d22e2921) SHA1(59a4a1a36aaca19ee0a7255d832df9d042ba34fb) )
2256   ROM_LOAD( "dk3c.7e",      0x8000, 0x2000, CRC(615f14b7) SHA1(145674073e95d97c9131b6f2b03303eadb57ca78) )
2252    ROM_REGION( 0x10000, "maincpu", 0 )
2253    ROM_LOAD( "dk3c.7b",      0x0000, 0x2000, CRC(38d5f38e) SHA1(5a6bb0e5070211515e3d56bd7d4c2d1655ac1621) )
2254    ROM_LOAD( "dk3c.7c",      0x2000, 0x2000, CRC(c9134379) SHA1(ecddb3694b93cb3dc98c3b1aeeee928e27529aba) )
2255    ROM_LOAD( "dk3c.7d",      0x4000, 0x2000, CRC(d22e2921) SHA1(59a4a1a36aaca19ee0a7255d832df9d042ba34fb) )
2256    ROM_LOAD( "dk3c.7e",      0x8000, 0x2000, CRC(615f14b7) SHA1(145674073e95d97c9131b6f2b03303eadb57ca78) )
22572257
2258   ROM_REGION( 0x10000, "n2a03a", 0 )   /* sound #1 */
2259   ROM_LOAD( "dk3c.5l",      0xe000, 0x2000, CRC(7ff88885) SHA1(d530581778aab260e21f04c38e57ba34edea7c64) )
2258    ROM_REGION( 0x10000, "n2a03a", 0 )  /* sound #1 */
2259    ROM_LOAD( "dk3c.5l",      0xe000, 0x2000, CRC(7ff88885) SHA1(d530581778aab260e21f04c38e57ba34edea7c64) )
22602260
2261   ROM_REGION( 0x10000, "n2a03b", 0 )   /* sound #2 */
2262   ROM_LOAD( "dk3c.6h",      0xe000, 0x2000, CRC(36d7200c) SHA1(7965fcb9bc1c0fdcae8a8e79df9c7b7439c506d8) )
2261    ROM_REGION( 0x10000, "n2a03b", 0 )  /* sound #2 */
2262    ROM_LOAD( "dk3c.6h",      0xe000, 0x2000, CRC(36d7200c) SHA1(7965fcb9bc1c0fdcae8a8e79df9c7b7439c506d8) )
22632263
2264   ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2265   ROM_LOAD( "dk3v.3n",      0x0000, 0x1000, CRC(415a99c7) SHA1(e0855b03bb1dc0d8ae46da9fe33ca30ecf6a2e96) )
2266   ROM_LOAD( "dk3v.3p",      0x1000, 0x1000, CRC(25744ea0) SHA1(4866e43e80b010ccf2c8cc94c232786521f9e26e) )
2264    ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2265    ROM_LOAD( "dk3v.3n",      0x0000, 0x1000, CRC(415a99c7) SHA1(e0855b03bb1dc0d8ae46da9fe33ca30ecf6a2e96) )
2266    ROM_LOAD( "dk3v.3p",      0x1000, 0x1000, CRC(25744ea0) SHA1(4866e43e80b010ccf2c8cc94c232786521f9e26e) )
22672267
2268   ROM_REGION( 0x4000, "gfx2", ROMREGION_DISPOSE )
2269   ROM_LOAD( "dk3v.7c",      0x0000, 0x1000, CRC(8ffa1737) SHA1(fa5896124227d412fbdf83f129ddffa32cf2053b) )
2270   ROM_LOAD( "dk3v.7d",      0x1000, 0x1000, CRC(9ac84686) SHA1(a089376b9c23094490703152ad98ed27f519402d) )
2271   ROM_LOAD( "dk3v.7e",      0x2000, 0x1000, CRC(0c0af3fb) SHA1(03e0c3f51bc3c20f95cb02f76f2d80188d5dbe36) )
2272   ROM_LOAD( "dk3v.7f",      0x3000, 0x1000, CRC(55c58662) SHA1(7f3d5a1b386cc37d466e42392ffefc928666a8dc) )
2268    ROM_REGION( 0x4000, "gfx2", ROMREGION_DISPOSE )
2269    ROM_LOAD( "dk3v.7c",      0x0000, 0x1000, CRC(8ffa1737) SHA1(fa5896124227d412fbdf83f129ddffa32cf2053b) )
2270    ROM_LOAD( "dk3v.7d",      0x1000, 0x1000, CRC(9ac84686) SHA1(a089376b9c23094490703152ad98ed27f519402d) )
2271    ROM_LOAD( "dk3v.7e",      0x2000, 0x1000, CRC(0c0af3fb) SHA1(03e0c3f51bc3c20f95cb02f76f2d80188d5dbe36) )
2272    ROM_LOAD( "dk3v.7f",      0x3000, 0x1000, CRC(55c58662) SHA1(7f3d5a1b386cc37d466e42392ffefc928666a8dc) )
22732273
2274   ROM_REGION( 0x0500, "proms", 0 )
2275   ROM_LOAD( "dkc1-c.1d",    0x0000, 0x0200, CRC(df54befc) SHA1(7912dbf0a0c8ef68f4ae0f95e55ab164da80e4a1) ) /* palette red & green component */
2276   ROM_LOAD( "dkc1-c.1c",    0x0200, 0x0200, CRC(66a77f40) SHA1(c408d65990f0edd78c4590c447426f383fcd2d88) ) /* palette blue component */
2277   ROM_LOAD( "dkc1-v.2n",    0x0400, 0x0100, CRC(50e33434) SHA1(b63da9bed9dc4c7da78e4c26d4ba14b65f2b7e72) ) /* character color codes on a per-column basis */
2274    ROM_REGION( 0x0500, "proms", 0 )
2275    ROM_LOAD( "dkc1-c.1d",    0x0000, 0x0200, CRC(df54befc) SHA1(7912dbf0a0c8ef68f4ae0f95e55ab164da80e4a1) ) /* palette red & green component */
2276    ROM_LOAD( "dkc1-c.1c",    0x0200, 0x0200, CRC(66a77f40) SHA1(c408d65990f0edd78c4590c447426f383fcd2d88) ) /* palette blue component */
2277    ROM_LOAD( "dkc1-v.2n",    0x0400, 0x0100, CRC(50e33434) SHA1(b63da9bed9dc4c7da78e4c26d4ba14b65f2b7e72) ) /* character color codes on a per-column basis */
22782278
2279   ROM_REGION( 0x0020, "adrdecode", 0 )
2280   /* address decode prom 18s030 - this has inverted outputs. The dump does not reflect this. */
2281   ROM_LOAD( "dkc1-v.5e",    0x0000, 0x0020, CRC(d3e2eaf8) SHA1(87bb298137c26570dafb4ac495c87e82441e70e5) )
2279    ROM_REGION( 0x0020, "adrdecode", 0 )
2280    /* address decode prom 18s030 - this has inverted outputs. The dump does not reflect this. */
2281    ROM_LOAD( "dkc1-v.5e",    0x0000, 0x0020, CRC(d3e2eaf8) SHA1(87bb298137c26570dafb4ac495c87e82441e70e5) )
22822282ROM_END
22832283
22842284ROM_START( dkong3j )
2285   ROM_REGION( 0x10000, "maincpu", 0 )
2286   ROM_LOAD( "dk3c.7b",      0x0000, 0x2000, CRC(38d5f38e) SHA1(5a6bb0e5070211515e3d56bd7d4c2d1655ac1621) )
2287   ROM_LOAD( "dk3c.7c",      0x2000, 0x2000, CRC(c9134379) SHA1(ecddb3694b93cb3dc98c3b1aeeee928e27529aba) )
2288   ROM_LOAD( "dk3c.7d",      0x4000, 0x2000, CRC(d22e2921) SHA1(59a4a1a36aaca19ee0a7255d832df9d042ba34fb) )
2289   ROM_LOAD( "dk3cj.7e",     0x8000, 0x2000, CRC(25b5be23) SHA1(43cf2a676922e60d9d637777a7721ab7582129fc) )
2285    ROM_REGION( 0x10000, "maincpu", 0 )
2286    ROM_LOAD( "dk3c.7b",      0x0000, 0x2000, CRC(38d5f38e) SHA1(5a6bb0e5070211515e3d56bd7d4c2d1655ac1621) )
2287    ROM_LOAD( "dk3c.7c",      0x2000, 0x2000, CRC(c9134379) SHA1(ecddb3694b93cb3dc98c3b1aeeee928e27529aba) )
2288    ROM_LOAD( "dk3c.7d",      0x4000, 0x2000, CRC(d22e2921) SHA1(59a4a1a36aaca19ee0a7255d832df9d042ba34fb) )
2289    ROM_LOAD( "dk3cj.7e",     0x8000, 0x2000, CRC(25b5be23) SHA1(43cf2a676922e60d9d637777a7721ab7582129fc) )
22902290
2291   ROM_REGION( 0x10000, "n2a03a", 0 )   /* sound #1 */
2292   ROM_LOAD( "dk3c.5l",      0xe000, 0x2000, CRC(7ff88885) SHA1(d530581778aab260e21f04c38e57ba34edea7c64) )
2291    ROM_REGION( 0x10000, "n2a03a", 0 )  /* sound #1 */
2292    ROM_LOAD( "dk3c.5l",      0xe000, 0x2000, CRC(7ff88885) SHA1(d530581778aab260e21f04c38e57ba34edea7c64) )
22932293
2294   ROM_REGION( 0x10000, "n2a03b", 0 )   /* sound #2 */
2295   ROM_LOAD( "dk3c.6h",      0xe000, 0x2000, CRC(36d7200c) SHA1(7965fcb9bc1c0fdcae8a8e79df9c7b7439c506d8) )
2294    ROM_REGION( 0x10000, "n2a03b", 0 )  /* sound #2 */
2295    ROM_LOAD( "dk3c.6h",      0xe000, 0x2000, CRC(36d7200c) SHA1(7965fcb9bc1c0fdcae8a8e79df9c7b7439c506d8) )
22962296
2297   ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2298   ROM_LOAD( "dk3v.3n",      0x0000, 0x1000, CRC(415a99c7) SHA1(e0855b03bb1dc0d8ae46da9fe33ca30ecf6a2e96) )
2299   ROM_LOAD( "dk3v.3p",      0x1000, 0x1000, CRC(25744ea0) SHA1(4866e43e80b010ccf2c8cc94c232786521f9e26e) )
2297    ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2298    ROM_LOAD( "dk3v.3n",      0x0000, 0x1000, CRC(415a99c7) SHA1(e0855b03bb1dc0d8ae46da9fe33ca30ecf6a2e96) )
2299    ROM_LOAD( "dk3v.3p",      0x1000, 0x1000, CRC(25744ea0) SHA1(4866e43e80b010ccf2c8cc94c232786521f9e26e) )
23002300
2301   ROM_REGION( 0x4000, "gfx2", ROMREGION_DISPOSE )
2302   ROM_LOAD( "dk3v.7c",      0x0000, 0x1000, CRC(8ffa1737) SHA1(fa5896124227d412fbdf83f129ddffa32cf2053b) )
2303   ROM_LOAD( "dk3v.7d",      0x1000, 0x1000, CRC(9ac84686) SHA1(a089376b9c23094490703152ad98ed27f519402d) )
2304   ROM_LOAD( "dk3v.7e",      0x2000, 0x1000, CRC(0c0af3fb) SHA1(03e0c3f51bc3c20f95cb02f76f2d80188d5dbe36) )
2305   ROM_LOAD( "dk3v.7f",      0x3000, 0x1000, CRC(55c58662) SHA1(7f3d5a1b386cc37d466e42392ffefc928666a8dc) )
2301    ROM_REGION( 0x4000, "gfx2", ROMREGION_DISPOSE )
2302    ROM_LOAD( "dk3v.7c",      0x0000, 0x1000, CRC(8ffa1737) SHA1(fa5896124227d412fbdf83f129ddffa32cf2053b) )
2303    ROM_LOAD( "dk3v.7d",      0x1000, 0x1000, CRC(9ac84686) SHA1(a089376b9c23094490703152ad98ed27f519402d) )
2304    ROM_LOAD( "dk3v.7e",      0x2000, 0x1000, CRC(0c0af3fb) SHA1(03e0c3f51bc3c20f95cb02f76f2d80188d5dbe36) )
2305    ROM_LOAD( "dk3v.7f",      0x3000, 0x1000, CRC(55c58662) SHA1(7f3d5a1b386cc37d466e42392ffefc928666a8dc) )
23062306
2307   ROM_REGION( 0x0500, "proms", 0 )
2308   ROM_LOAD( "dkc1-c.1d",    0x0000, 0x0200, CRC(df54befc) SHA1(7912dbf0a0c8ef68f4ae0f95e55ab164da80e4a1) ) /* palette red & green component */
2309   ROM_LOAD( "dkc1-c.1c",    0x0200, 0x0200, CRC(66a77f40) SHA1(c408d65990f0edd78c4590c447426f383fcd2d88) ) /* palette blue component */
2310   ROM_LOAD( "dkc1-v.2n",    0x0400, 0x0100, CRC(50e33434) SHA1(b63da9bed9dc4c7da78e4c26d4ba14b65f2b7e72) )   /* character color codes on a per-column basis */
2307    ROM_REGION( 0x0500, "proms", 0 )
2308    ROM_LOAD( "dkc1-c.1d",    0x0000, 0x0200, CRC(df54befc) SHA1(7912dbf0a0c8ef68f4ae0f95e55ab164da80e4a1) ) /* palette red & green component */
2309    ROM_LOAD( "dkc1-c.1c",    0x0200, 0x0200, CRC(66a77f40) SHA1(c408d65990f0edd78c4590c447426f383fcd2d88) ) /* palette blue component */
2310    ROM_LOAD( "dkc1-v.2n",    0x0400, 0x0100, CRC(50e33434) SHA1(b63da9bed9dc4c7da78e4c26d4ba14b65f2b7e72) )    /* character color codes on a per-column basis */
23112311
2312   ROM_REGION( 0x0020, "adrdecode", 0 )
2313   /* address decode prom 18s030 - this has inverted outputs. The dump does not reflect this. */
2314   ROM_LOAD( "dkc1-v.5e",    0x0000, 0x0020, CRC(d3e2eaf8) SHA1(87bb298137c26570dafb4ac495c87e82441e70e5) )
2312    ROM_REGION( 0x0020, "adrdecode", 0 )
2313    /* address decode prom 18s030 - this has inverted outputs. The dump does not reflect this. */
2314    ROM_LOAD( "dkc1-v.5e",    0x0000, 0x0020, CRC(d3e2eaf8) SHA1(87bb298137c26570dafb4ac495c87e82441e70e5) )
23152315ROM_END
23162316
23172317ROM_START( dkong3b )
2318   ROM_REGION( 0x10000, "maincpu", 0 )
2319   ROM_LOAD( "5b.bin",       0x0000, 0x1000, CRC(549979bc) SHA1(58532f39285db0b081089e54a23041d83bec49aa) )
2320   ROM_CONTINUE(             0x3000, 0x1000 )
2321   ROM_LOAD( "5c-2.bin",     0x2000, 0x0800, CRC(b9dcbae6) SHA1(a7a7a3d79cb1eed93e54dff508c61cbc24797007) )
2322   ROM_CONTINUE(             0x4800, 0x0800 )
2323   ROM_CONTINUE(             0x1000, 0x0800 )
2324   ROM_CONTINUE(             0x5800, 0x0800 )
2325   ROM_LOAD( "5e-2.bin",     0x4000, 0x0800, CRC(5a61868f) SHA1(25c57969c1fbf457d223c4186ed291a1e0f75e14) )
2326   ROM_CONTINUE(             0x2800, 0x0800 )
2327   ROM_CONTINUE(             0x5000, 0x0800 )
2328   ROM_CONTINUE(             0x1800, 0x0800 )
2329   ROM_LOAD( "5c-1.bin",     0x9000, 0x1000, CRC(77a012d6) SHA1(334ae2c213acd50eda71b4102d0803bc596973ec) )
2330   ROM_LOAD( "5e-1.bin",     0xd000, 0x1000, CRC(745ed767) SHA1(32f4678f3eea9dc88f4c99509719a42292d6833a) )
2318    ROM_REGION( 0x10000, "maincpu", 0 )
2319    ROM_LOAD( "5b.bin",       0x0000, 0x1000, CRC(549979bc) SHA1(58532f39285db0b081089e54a23041d83bec49aa) )
2320    ROM_CONTINUE(             0x3000, 0x1000 )
2321    ROM_LOAD( "5c-2.bin",     0x2000, 0x0800, CRC(b9dcbae6) SHA1(a7a7a3d79cb1eed93e54dff508c61cbc24797007) )
2322    ROM_CONTINUE(             0x4800, 0x0800 )
2323    ROM_CONTINUE(             0x1000, 0x0800 )
2324    ROM_CONTINUE(             0x5800, 0x0800 )
2325    ROM_LOAD( "5e-2.bin",     0x4000, 0x0800, CRC(5a61868f) SHA1(25c57969c1fbf457d223c4186ed291a1e0f75e14) )
2326    ROM_CONTINUE(             0x2800, 0x0800 )
2327    ROM_CONTINUE(             0x5000, 0x0800 )
2328    ROM_CONTINUE(             0x1800, 0x0800 )
2329    ROM_LOAD( "5c-1.bin",     0x9000, 0x1000, CRC(77a012d6) SHA1(334ae2c213acd50eda71b4102d0803bc596973ec) )
2330    ROM_LOAD( "5e-1.bin",     0xd000, 0x1000, CRC(745ed767) SHA1(32f4678f3eea9dc88f4c99509719a42292d6833a) )
23312331
2332   ROM_REGION( 0x1000, "soundcpu", 0 )   /* sound */
2333   ROM_LOAD( "3h.bin",       0x0000, 0x1000, CRC(715da5f8) SHA1(f708c3fd374da65cbd9fe2e191152f5d865414a0) )
2332    ROM_REGION( 0x1000, "soundcpu", 0 ) /* sound */
2333    ROM_LOAD( "3h.bin",       0x0000, 0x1000, CRC(715da5f8) SHA1(f708c3fd374da65cbd9fe2e191152f5d865414a0) )
23342334
2335   ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2336   ROM_LOAD( "3n.bin",       0x0000, 0x1000, CRC(fed67d35) SHA1(472a378abff96a76aac0e2da06c8d7c3ce172b60) )
2337   ROM_LOAD( "3p.bin",       0x1000, 0x1000, CRC(3d1b87ce) SHA1(e0cbeebf8dc291302ab1f039e51e9b409cced340) )
2335    ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2336    ROM_LOAD( "3n.bin",       0x0000, 0x1000, CRC(fed67d35) SHA1(472a378abff96a76aac0e2da06c8d7c3ce172b60) )
2337    ROM_LOAD( "3p.bin",       0x1000, 0x1000, CRC(3d1b87ce) SHA1(e0cbeebf8dc291302ab1f039e51e9b409cced340) )
23382338
2339   ROM_REGION( 0x4000, "gfx2", ROMREGION_DISPOSE )
2340   ROM_LOAD( "7c.bin",       0x0000, 0x1000, CRC(8ffa1737) SHA1(fa5896124227d412fbdf83f129ddffa32cf2053b) )
2341   ROM_LOAD( "7d.bin",       0x1000, 0x1000, CRC(9ac84686) SHA1(a089376b9c23094490703152ad98ed27f519402d) )
2342   ROM_LOAD( "7e.bin",       0x2000, 0x1000, CRC(0c0af3fb) SHA1(03e0c3f51bc3c20f95cb02f76f2d80188d5dbe36) )
2343   ROM_LOAD( "7f.bin",       0x3000, 0x1000, CRC(55c58662) SHA1(7f3d5a1b386cc37d466e42392ffefc928666a8dc) )
2339    ROM_REGION( 0x4000, "gfx2", ROMREGION_DISPOSE )
2340    ROM_LOAD( "7c.bin",       0x0000, 0x1000, CRC(8ffa1737) SHA1(fa5896124227d412fbdf83f129ddffa32cf2053b) )
2341    ROM_LOAD( "7d.bin",       0x1000, 0x1000, CRC(9ac84686) SHA1(a089376b9c23094490703152ad98ed27f519402d) )
2342    ROM_LOAD( "7e.bin",       0x2000, 0x1000, CRC(0c0af3fb) SHA1(03e0c3f51bc3c20f95cb02f76f2d80188d5dbe36) )
2343    ROM_LOAD( "7f.bin",       0x3000, 0x1000, CRC(55c58662) SHA1(7f3d5a1b386cc37d466e42392ffefc928666a8dc) )
23442344
2345   ROM_REGION( 0x0500, "proms", 0 )
2346   ROM_LOAD( "dk3b-c.1d",    0x0000, 0x0200, CRC(df54befc) SHA1(7912dbf0a0c8ef68f4ae0f95e55ab164da80e4a1) ) /* palette red & green component */
2347   ROM_LOAD( "dk3b-c.1c",    0x0200, 0x0200, CRC(66a77f40) SHA1(c408d65990f0edd78c4590c447426f383fcd2d88) ) /* palette blue component */
2348   ROM_LOAD( "dk3b-v.2n",    0x0400, 0x0100, CRC(50e33434) SHA1(b63da9bed9dc4c7da78e4c26d4ba14b65f2b7e72) ) /* character color codes on a per-column basis */
2345    ROM_REGION( 0x0500, "proms", 0 )
2346    ROM_LOAD( "dk3b-c.1d",    0x0000, 0x0200, CRC(df54befc) SHA1(7912dbf0a0c8ef68f4ae0f95e55ab164da80e4a1) ) /* palette red & green component */
2347    ROM_LOAD( "dk3b-c.1c",    0x0200, 0x0200, CRC(66a77f40) SHA1(c408d65990f0edd78c4590c447426f383fcd2d88) ) /* palette blue component */
2348    ROM_LOAD( "dk3b-v.2n",    0x0400, 0x0100, CRC(50e33434) SHA1(b63da9bed9dc4c7da78e4c26d4ba14b65f2b7e72) ) /* character color codes on a per-column basis */
23492349ROM_END
23502350
23512351ROM_START( hunchbkd )
2352   ROM_REGION( 0x8000, "maincpu", 0 )
2353   ROM_LOAD( "hb.5e",        0x0000, 0x1000, CRC(4c3ac070) SHA1(636843b33f1b7e994b112fa29e65038098528b8c) )
2354   ROM_LOAD( "hbsc-1.5c",    0x2000, 0x1000, CRC(9b0e6234) SHA1(a7405451e5cd42bc276c659ec5a2136dbb7b6aba) )
2355   ROM_LOAD( "hb.5b",        0x4000, 0x1000, CRC(4cde80f3) SHA1(3d93d8e454b2c517971a99c5700b6e943f975a11) )
2356   ROM_LOAD( "hb.5a",        0x6000, 0x1000, CRC(d60ef5b2) SHA1(b2b5528cb837d58ef632d7670820ad8b07e5af1b) )
2352    ROM_REGION( 0x8000, "maincpu", 0 )
2353    ROM_LOAD( "hb.5e",        0x0000, 0x1000, CRC(4c3ac070) SHA1(636843b33f1b7e994b112fa29e65038098528b8c) )
2354    ROM_LOAD( "hbsc-1.5c",    0x2000, 0x1000, CRC(9b0e6234) SHA1(a7405451e5cd42bc276c659ec5a2136dbb7b6aba) )
2355    ROM_LOAD( "hb.5b",        0x4000, 0x1000, CRC(4cde80f3) SHA1(3d93d8e454b2c517971a99c5700b6e943f975a11) )
2356    ROM_LOAD( "hb.5a",        0x6000, 0x1000, CRC(d60ef5b2) SHA1(b2b5528cb837d58ef632d7670820ad8b07e5af1b) )
23572357
2358   ROM_REGION( 0x1800, "soundcpu", 0 )   /* sound */
2359   ROM_LOAD( "hb.3h",        0x0000, 0x0800, CRC(a3c240d4) SHA1(8cb6057ca617909c73b09988ba65a1176696cb5d) )
2360   ROM_RELOAD(               0x0800, 0x0800 )
2361   ROM_FILL(                 0x1000, 0x0800, 0xFF )
2358    ROM_REGION( 0x1800, "soundcpu", 0 ) /* sound */
2359    ROM_LOAD( "hb.3h",        0x0000, 0x0800, CRC(a3c240d4) SHA1(8cb6057ca617909c73b09988ba65a1176696cb5d) )
2360    ROM_RELOAD(               0x0800, 0x0800 )
2361    ROM_FILL(                 0x1000, 0x0800, 0xFF )
23622362
2363   ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
2364   ROM_LOAD( "hb.3n",        0x0000, 0x0800, CRC(443ed5ac) SHA1(febed689e03abf25452aab6eff85ea01883e929c) )
2365   ROM_LOAD( "hb.3p",        0x0800, 0x0800, CRC(073e7b0c) SHA1(659cd3b1827bf6b7f0c9bef3cd83e69c2b2193ff) )
2363    ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
2364    ROM_LOAD( "hb.3n",        0x0000, 0x0800, CRC(443ed5ac) SHA1(febed689e03abf25452aab6eff85ea01883e929c) )
2365    ROM_LOAD( "hb.3p",        0x0800, 0x0800, CRC(073e7b0c) SHA1(659cd3b1827bf6b7f0c9bef3cd83e69c2b2193ff) )
23662366
2367   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2368   ROM_LOAD( "hb.7c",        0x0000, 0x0800, CRC(3ba71686) SHA1(34c2ceadea1026de6157df1e7a1c2f6b86fd3c82) )
2369   ROM_LOAD( "hb.7d",        0x0800, 0x0800, CRC(5786948d) SHA1(7e8bc953195cc9a07a8429b547e1fab6cd487b51) )
2370   ROM_LOAD( "hb.7e",        0x1000, 0x0800, CRC(f845e8ca) SHA1(4bedbbc74a637f6d60b3b2dbf41efc7390ee9091) )
2371   ROM_LOAD( "hb.7f",        0x1800, 0x0800, CRC(52d20fea) SHA1(e3825f75f312d1e256f78a89098e328e8f307577) )
2367    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2368    ROM_LOAD( "hb.7c",        0x0000, 0x0800, CRC(3ba71686) SHA1(34c2ceadea1026de6157df1e7a1c2f6b86fd3c82) )
2369    ROM_LOAD( "hb.7d",        0x0800, 0x0800, CRC(5786948d) SHA1(7e8bc953195cc9a07a8429b547e1fab6cd487b51) )
2370    ROM_LOAD( "hb.7e",        0x1000, 0x0800, CRC(f845e8ca) SHA1(4bedbbc74a637f6d60b3b2dbf41efc7390ee9091) )
2371    ROM_LOAD( "hb.7f",        0x1800, 0x0800, CRC(52d20fea) SHA1(e3825f75f312d1e256f78a89098e328e8f307577) )
23722372
2373   ROM_REGION( 0x0300, "proms", 0 )
2374   ROM_LOAD( "hbprom.2e",    0x0000, 0x0100, CRC(37aab98f) SHA1(0b002ab82158854bdd4a9db05eee037711017313) )   /* palette low 4 bits (inverted) */
2375   ROM_LOAD( "hbprom.2f",    0x0100, 0x0100, CRC(845b8dcc) SHA1(eebd0c024172e54b509f1f99d9159438d5f3a905) )   /* palette high 4 bits (inverted) */
2376   ROM_LOAD( "hbprom.2n",    0x0200, 0x0100, CRC(dff9070a) SHA1(307b95749343b5106247d842f773b2b445faa156) )   /* character color codes on a per-column basis */
2373    ROM_REGION( 0x0300, "proms", 0 )
2374    ROM_LOAD( "hbprom.2e",    0x0000, 0x0100, CRC(37aab98f) SHA1(0b002ab82158854bdd4a9db05eee037711017313) )    /* palette low 4 bits (inverted) */
2375    ROM_LOAD( "hbprom.2f",    0x0100, 0x0100, CRC(845b8dcc) SHA1(eebd0c024172e54b509f1f99d9159438d5f3a905) )    /* palette high 4 bits (inverted) */
2376    ROM_LOAD( "hbprom.2n",    0x0200, 0x0100, CRC(dff9070a) SHA1(307b95749343b5106247d842f773b2b445faa156) )    /* character color codes on a per-column basis */
23772377
2378   ROM_REGION( 0x0200, "user1", 0 )
2379   ROM_LOAD( "82s147.prm",   0x0000, 0x0200, CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) )   /* address mapping */
2378    ROM_REGION( 0x0200, "user1", 0 )
2379    ROM_LOAD( "82s147.prm",   0x0000, 0x0200, CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) )    /* address mapping */
23802380
2381   ROM_REGION( 0x0100, "plds", ROMREGION_DISPOSE )
2382   ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
2381    ROM_REGION( 0x0100, "plds", ROMREGION_DISPOSE )
2382    ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
23832383ROM_END
23842384
23852385ROM_START( sbdk )
2386   ROM_REGION( 0x8000, "maincpu", 0 )
2387   ROM_LOAD( "sb-dk.ap",     0x0000, 0x1000, CRC(fef0ef9c) SHA1(8d3de7f96354672d906b2e124f3fb355f3201ed2) )
2388   ROM_LOAD( "sb-dk.ay",     0x2000, 0x1000, CRC(2e9dade2) SHA1(74e5770fd362fd0242b8174b0ea5383fdf893cb3) )
2389   ROM_LOAD( "sb-dk.as",     0x4000, 0x1000, CRC(e6d200f3) SHA1(3787334df76e629baa9ef5362495cd3af7777358) )
2390   ROM_LOAD( "sb-dk.5a",     0x6000, 0x1000, CRC(ca41ca56) SHA1(d862172b1cc6639d540efc140b63d1a598f75656) )
2386    ROM_REGION( 0x8000, "maincpu", 0 )
2387    ROM_LOAD( "sb-dk.ap",     0x0000, 0x1000, CRC(fef0ef9c) SHA1(8d3de7f96354672d906b2e124f3fb355f3201ed2) )
2388    ROM_LOAD( "sb-dk.ay",     0x2000, 0x1000, CRC(2e9dade2) SHA1(74e5770fd362fd0242b8174b0ea5383fdf893cb3) )
2389    ROM_LOAD( "sb-dk.as",     0x4000, 0x1000, CRC(e6d200f3) SHA1(3787334df76e629baa9ef5362495cd3af7777358) )
2390    ROM_LOAD( "sb-dk.5a",     0x6000, 0x1000, CRC(ca41ca56) SHA1(d862172b1cc6639d540efc140b63d1a598f75656) )
23912391
2392   ROM_REGION( 0x1800, "soundcpu", 0 )   /* sound */
2393   ROM_LOAD( "sb-dk.3h",     0x0000, 0x0800, CRC(13e60b6e) SHA1(f5dca15db0f1a225ff0116726bb055bb7b9655cc) )
2394   ROM_RELOAD(               0x0800, 0x0800 )
2395   ROM_FILL(                 0x1000, 0x0800, 0xFF )
2392    ROM_REGION( 0x1800, "soundcpu", 0 ) /* sound */
2393    ROM_LOAD( "sb-dk.3h",     0x0000, 0x0800, CRC(13e60b6e) SHA1(f5dca15db0f1a225ff0116726bb055bb7b9655cc) )
2394    ROM_RELOAD(               0x0800, 0x0800 )
2395    ROM_FILL(                 0x1000, 0x0800, 0xFF )
23962396
2397   ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
2398   ROM_LOAD( "sb-dk.3n",     0x0000, 0x0800, CRC(b1d76b59) SHA1(aed57ec67d80abdff1a4bfc3a713fa01c0dd15a2) )
2399   ROM_LOAD( "sb-dk.3p",     0x0800, 0x0800, CRC(ea5f9f88) SHA1(5742d3554d967ed1e90f7c6f73dafbd302f0f244) )
2397    ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
2398    ROM_LOAD( "sb-dk.3n",     0x0000, 0x0800, CRC(b1d76b59) SHA1(aed57ec67d80abdff1a4bfc3a713fa01c0dd15a2) )
2399    ROM_LOAD( "sb-dk.3p",     0x0800, 0x0800, CRC(ea5f9f88) SHA1(5742d3554d967ed1e90f7c6f73dafbd302f0f244) )
24002400
2401   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2402   ROM_LOAD( "sb-dk.7c",     0x0000, 0x0800, CRC(c12c18f2) SHA1(77e99d80e05108ceec21ae299645139f83a389b1) )
2403   ROM_LOAD( "sb-dk.7d",     0x0800, 0x0800, CRC(f7a32d23) SHA1(5782e8f8744481a931c629579ae6f4fff7e2f838) )
2404   ROM_LOAD( "sb-dk.7e",     0x1000, 0x0800, CRC(8e48b13e) SHA1(b4589685a60a8463f656a4f5b0dedfb265c3b3e4) )
2405   ROM_LOAD( "sb-dk.7f",     0x1800, 0x0800, CRC(989969f3) SHA1(de641082476ac3da3872461263566dfb398ea43a) )
2401    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2402    ROM_LOAD( "sb-dk.7c",     0x0000, 0x0800, CRC(c12c18f2) SHA1(77e99d80e05108ceec21ae299645139f83a389b1) )
2403    ROM_LOAD( "sb-dk.7d",     0x0800, 0x0800, CRC(f7a32d23) SHA1(5782e8f8744481a931c629579ae6f4fff7e2f838) )
2404    ROM_LOAD( "sb-dk.7e",     0x1000, 0x0800, CRC(8e48b13e) SHA1(b4589685a60a8463f656a4f5b0dedfb265c3b3e4) )
2405    ROM_LOAD( "sb-dk.7f",     0x1800, 0x0800, CRC(989969f3) SHA1(de641082476ac3da3872461263566dfb398ea43a) )
24062406
2407   ROM_REGION( 0x0500, "proms", 0 )
2408   ROM_LOAD( "sb.2e",        0x0000, 0x0100, CRC(4f06f789) SHA1(0b2775dd8da1c20121639871ed291a015a34e1f6) )
2409   ROM_LOAD( "sb.2f",        0x0100, 0x0100, CRC(2c15b1b2) SHA1(7c80eb77ba47e2f4d889fc10663a0391d4329a1d) )
2410   ROM_LOAD( "sb.2n",        0x0200, 0x0100, CRC(dff9070a) SHA1(307b95749343b5106247d842f773b2b445faa156) )
2407    ROM_REGION( 0x0500, "proms", 0 )
2408    ROM_LOAD( "sb.2e",        0x0000, 0x0100, CRC(4f06f789) SHA1(0b2775dd8da1c20121639871ed291a015a34e1f6) )
2409    ROM_LOAD( "sb.2f",        0x0100, 0x0100, CRC(2c15b1b2) SHA1(7c80eb77ba47e2f4d889fc10663a0391d4329a1d) )
2410    ROM_LOAD( "sb.2n",        0x0200, 0x0100, CRC(dff9070a) SHA1(307b95749343b5106247d842f773b2b445faa156) )
24112411
2412   ROM_REGION( 0x0200, "user1", 0 )
2413   ROM_LOAD( "82s147.prm",   0x0000, 0x0200, CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) )   /* address mapping */
2412    ROM_REGION( 0x0200, "user1", 0 )
2413    ROM_LOAD( "82s147.prm",   0x0000, 0x0200, CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) )    /* address mapping */
24142414
2415   ROM_REGION( 0x0100, "plds", ROMREGION_DISPOSE )
2416   ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
2415    ROM_REGION( 0x0100, "plds", ROMREGION_DISPOSE )
2416    ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
24172417ROM_END
24182418
24192419ROM_START( herbiedk )
2420   ROM_REGION( 0x8000, "maincpu", 0 )
2421   ROM_LOAD( "5f.cpu",        0x0000, 0x1000, CRC(c7ab3ac6) SHA1(5ef8c0ac1acd09a0f6c1536d0525cc27bb87b167) )
2422   ROM_LOAD( "5g.cpu",        0x2000, 0x1000, CRC(d1031aa6) SHA1(6f5eadf43f1a59333833b3ee72d8d3043ac8c899) )
2423   ROM_LOAD( "5h.cpu",        0x4000, 0x1000, CRC(c0daf551) SHA1(f39058fa05ad69e839e7c0281cb1fad80cfa3134) )
2424   ROM_LOAD( "5k.cpu",        0x6000, 0x1000, CRC(67442242) SHA1(0241281e8cc721f7fe22822f2cf168c2eed7983d) )
2420    ROM_REGION( 0x8000, "maincpu", 0 )
2421    ROM_LOAD( "5f.cpu",        0x0000, 0x1000, CRC(c7ab3ac6) SHA1(5ef8c0ac1acd09a0f6c1536d0525cc27bb87b167) )
2422    ROM_LOAD( "5g.cpu",        0x2000, 0x1000, CRC(d1031aa6) SHA1(6f5eadf43f1a59333833b3ee72d8d3043ac8c899) )
2423    ROM_LOAD( "5h.cpu",        0x4000, 0x1000, CRC(c0daf551) SHA1(f39058fa05ad69e839e7c0281cb1fad80cfa3134) )
2424    ROM_LOAD( "5k.cpu",        0x6000, 0x1000, CRC(67442242) SHA1(0241281e8cc721f7fe22822f2cf168c2eed7983d) )
24252425
2426   ROM_REGION( 0x1800, "soundcpu", 0 )   /* sound */
2427   ROM_LOAD( "3i.snd",        0x0000, 0x0800, CRC(20e30406) SHA1(e2b9c6b731e53651d26455c2753a6dc3d5e9d066) )
2428   ROM_RELOAD(               0x0800, 0x0800 )
2429   ROM_FILL(                 0x1000, 0x0800, 0xFF )
2426    ROM_REGION( 0x1800, "soundcpu", 0 ) /* sound */
2427    ROM_LOAD( "3i.snd",        0x0000, 0x0800, CRC(20e30406) SHA1(e2b9c6b731e53651d26455c2753a6dc3d5e9d066) )
2428    ROM_RELOAD(               0x0800, 0x0800 )
2429    ROM_FILL(                 0x1000, 0x0800, 0xFF )
24302430
2431   ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
2432   ROM_LOAD( "5h.vid",        0x0000, 0x0800, CRC(ea2a2547) SHA1(ec714abe43ab86ef615e1105688bf3df209c8f5f) )
2433   ROM_LOAD( "5k.vid",        0x0800, 0x0800, CRC(a8d421c9) SHA1(b733246d8674450ef00ed81b7d5e2ca09b3731d8) )
2431    ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
2432    ROM_LOAD( "5h.vid",        0x0000, 0x0800, CRC(ea2a2547) SHA1(ec714abe43ab86ef615e1105688bf3df209c8f5f) )
2433    ROM_LOAD( "5k.vid",        0x0800, 0x0800, CRC(a8d421c9) SHA1(b733246d8674450ef00ed81b7d5e2ca09b3731d8) )
24342434
2435   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2436   ROM_LOAD( "7c.clk",        0x0000, 0x0800, CRC(af646166) SHA1(c935051697f559fa8dea647e976d35b607c931d5) )
2437   ROM_LOAD( "7d.clk",        0x0800, 0x0800, CRC(d8e15832) SHA1(d11983d7a3ff71c6bc75607453080d554ae15df2) )
2438   ROM_LOAD( "7e.clk",        0x1000, 0x0800, CRC(2f7e65fa) SHA1(ff4d03020f9ad423fcebca28395964cb01b19b31) )
2439   ROM_LOAD( "7f.clk",        0x1800, 0x0800, CRC(ad32d5ae) SHA1(578e703ca07b9a0284d1c9c7f260a52e4f4dac0e) )
2435    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2436    ROM_LOAD( "7c.clk",        0x0000, 0x0800, CRC(af646166) SHA1(c935051697f559fa8dea647e976d35b607c931d5) )
2437    ROM_LOAD( "7d.clk",        0x0800, 0x0800, CRC(d8e15832) SHA1(d11983d7a3ff71c6bc75607453080d554ae15df2) )
2438    ROM_LOAD( "7e.clk",        0x1000, 0x0800, CRC(2f7e65fa) SHA1(ff4d03020f9ad423fcebca28395964cb01b19b31) )
2439    ROM_LOAD( "7f.clk",        0x1800, 0x0800, CRC(ad32d5ae) SHA1(578e703ca07b9a0284d1c9c7f260a52e4f4dac0e) )
24402440
2441   ROM_REGION( 0x0500, "proms", 0 )
2442   ROM_LOAD( "74s287.2k",     0x0000, 0x0100, CRC(7dc0a381) SHA1(7d974b2249392160e3b800e7113d4899c3600b7f) ) /* palette high 4 bits (inverted) */
2443   ROM_LOAD( "74s287.2j",     0x0100, 0x0100, CRC(0a440c00) SHA1(e3249a646cd8aa50739e09ae101e796ea3aac37a) ) /* palette low 4 bits (inverted) */
2444   ROM_LOAD( "74s287.vid",    0x0200, 0x0100, CRC(5a3446cc) SHA1(158de015006e6c400cb7ee758fda7ff760eb5835) ) /* character color codes on a per-column basis */
2441    ROM_REGION( 0x0500, "proms", 0 )
2442    ROM_LOAD( "74s287.2k",     0x0000, 0x0100, CRC(7dc0a381) SHA1(7d974b2249392160e3b800e7113d4899c3600b7f) ) /* palette high 4 bits (inverted) */
2443    ROM_LOAD( "74s287.2j",     0x0100, 0x0100, CRC(0a440c00) SHA1(e3249a646cd8aa50739e09ae101e796ea3aac37a) ) /* palette low 4 bits (inverted) */
2444    ROM_LOAD( "74s287.vid",    0x0200, 0x0100, CRC(5a3446cc) SHA1(158de015006e6c400cb7ee758fda7ff760eb5835) ) /* character color codes on a per-column basis */
24452445
2446   ROM_REGION( 0x0200, "user1", 0 )
2447   ROM_LOAD( "82s147.hh",     0x0000, 0x0200, CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) )   /* address mapping */
2446    ROM_REGION( 0x0200, "user1", 0 )
2447    ROM_LOAD( "82s147.hh",     0x0000, 0x0200, CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) )   /* address mapping */
24482448
2449   ROM_REGION( 0x0100, "plds", ROMREGION_DISPOSE )
2450   ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, CRC(d6a04bcc) SHA1(ef1ed4311869d46dec95c2bfb31875c2f022da4f) )
2449    ROM_REGION( 0x0100, "plds", ROMREGION_DISPOSE )
2450    ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, CRC(d6a04bcc) SHA1(ef1ed4311869d46dec95c2bfb31875c2f022da4f) )
24512451ROM_END
24522452
24532453ROM_START( herodk )
2454   ROM_REGION( 0x10000, "maincpu", 0 )
2455   ROM_LOAD( "red-dot.rgt",  0x0c00, 0x0400, CRC(9c4af229) SHA1(8b7330457acdd8d92f2853f3e5f8c18f8991c5c9) )   /* encrypted */
2456   ROM_CONTINUE(             0x0800, 0x0400 )
2457   ROM_CONTINUE(             0x0400, 0x0400 )
2458   ROM_CONTINUE(             0x0000, 0x0400 )
2459   ROM_CONTINUE(             0x2000, 0x0e00 )
2460   ROM_CONTINUE(             0x6e00, 0x0200 )
2461   ROM_LOAD( "wht-dot.lft",  0x4000, 0x1000, CRC(c10f9235) SHA1(42dbf01e5da80cd8bdd18a27c3fbdf4cb5110d9a) )   /* encrypted */
2462   ROM_CONTINUE(             0x6000, 0x0e00 )
2463   ROM_CONTINUE(             0x2e00, 0x0200 )
2454    ROM_REGION( 0x10000, "maincpu", 0 )
2455    ROM_LOAD( "red-dot.rgt",  0x0c00, 0x0400, CRC(9c4af229) SHA1(8b7330457acdd8d92f2853f3e5f8c18f8991c5c9) )    /* encrypted */
2456    ROM_CONTINUE(             0x0800, 0x0400 )
2457    ROM_CONTINUE(             0x0400, 0x0400 )
2458    ROM_CONTINUE(             0x0000, 0x0400 )
2459    ROM_CONTINUE(             0x2000, 0x0e00 )
2460    ROM_CONTINUE(             0x6e00, 0x0200 )
2461    ROM_LOAD( "wht-dot.lft",  0x4000, 0x1000, CRC(c10f9235) SHA1(42dbf01e5da80cd8bdd18a27c3fbdf4cb5110d9a) )    /* encrypted */
2462    ROM_CONTINUE(             0x6000, 0x0e00 )
2463    ROM_CONTINUE(             0x2e00, 0x0200 )
24642464
2465   ROM_REGION( 0x1800, "soundcpu", 0 )   /* sound */
2466   ROM_LOAD( "silver.3h",    0x0000, 0x0800, CRC(67863ce9) SHA1(2b78e3d32a64cdef34afc476fed7ff0ab6a0277c) )
2467   ROM_RELOAD(               0x0800, 0x0800 )
2468   ROM_FILL(                 0x1000, 0x0800, 0xFF )
2465    ROM_REGION( 0x1800, "soundcpu", 0 ) /* sound */
2466    ROM_LOAD( "silver.3h",    0x0000, 0x0800, CRC(67863ce9) SHA1(2b78e3d32a64cdef34afc476fed7ff0ab6a0277c) )
2467    ROM_RELOAD(               0x0800, 0x0800 )
2468    ROM_FILL(                 0x1000, 0x0800, 0xFF )
24692469
2470   ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
2471   ROM_LOAD( "pnk.3n",       0x0000, 0x0800, CRC(574dfd7a) SHA1(78bbe4ea83fdaec14ca92ceae03e8a3d0877d14b) )
2472   ROM_LOAD( "blk.3p",       0x0800, 0x0800, CRC(16f7c040) SHA1(d1bd1b5f3c66ac6e71637ef42962adabacd79340) )
2470    ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
2471    ROM_LOAD( "pnk.3n",       0x0000, 0x0800, CRC(574dfd7a) SHA1(78bbe4ea83fdaec14ca92ceae03e8a3d0877d14b) )
2472    ROM_LOAD( "blk.3p",       0x0800, 0x0800, CRC(16f7c040) SHA1(d1bd1b5f3c66ac6e71637ef42962adabacd79340) )
24732473
2474   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2475   ROM_LOAD( "gold.7c",      0x0000, 0x0800, CRC(5f5282ed) SHA1(fcd467e404fab89addd55bd7c5c07d28551a4c8e) )
2476   ROM_LOAD( "orange.7d",    0x0800, 0x0800, CRC(075d99f5) SHA1(ff6f85a50179e0599b39871be1739080768fc475) )
2477   ROM_LOAD( "yellow.7e",    0x1000, 0x0800, CRC(f6272e96) SHA1(a9608966613aedb36cfb04f85730efed9a44d17c) )
2478   ROM_LOAD( "violet.7f",    0x1800, 0x0800, CRC(ca020685) SHA1(fe0d8d85c3bf244384e9c94f6a7f17db31083245) )
2474    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2475    ROM_LOAD( "gold.7c",      0x0000, 0x0800, CRC(5f5282ed) SHA1(fcd467e404fab89addd55bd7c5c07d28551a4c8e) )
2476    ROM_LOAD( "orange.7d",    0x0800, 0x0800, CRC(075d99f5) SHA1(ff6f85a50179e0599b39871be1739080768fc475) )
2477    ROM_LOAD( "yellow.7e",    0x1000, 0x0800, CRC(f6272e96) SHA1(a9608966613aedb36cfb04f85730efed9a44d17c) )
2478    ROM_LOAD( "violet.7f",    0x1800, 0x0800, CRC(ca020685) SHA1(fe0d8d85c3bf244384e9c94f6a7f17db31083245) )
24792479
2480   ROM_REGION( 0x0500, "proms", 0 )
2481   ROM_LOAD( "82s129.2e",    0x0000, 0x0100, CRC(da4b47e6) SHA1(2cfc7d489002113eb91048cc29d24831dadbfabb) )   /* palette low 4 bits (inverted) */
2482   ROM_LOAD( "82s129.2f",    0x0100, 0x0100, CRC(96e213a4) SHA1(38f21e7bce96fd2159aa61e64d66aa574d85873c) )   /* palette high 4 bits (inverted) */
2483   ROM_LOAD( "82s126.2n",    0x0200, 0x0100, CRC(37aece4b) SHA1(08dbb470644278132b8126649fe41d70e7750bee) )   /* character color codes on a per-column basis */
2480    ROM_REGION( 0x0500, "proms", 0 )
2481    ROM_LOAD( "82s129.2e",    0x0000, 0x0100, CRC(da4b47e6) SHA1(2cfc7d489002113eb91048cc29d24831dadbfabb) )    /* palette low 4 bits (inverted) */
2482    ROM_LOAD( "82s129.2f",    0x0100, 0x0100, CRC(96e213a4) SHA1(38f21e7bce96fd2159aa61e64d66aa574d85873c) )    /* palette high 4 bits (inverted) */
2483    ROM_LOAD( "82s126.2n",    0x0200, 0x0100, CRC(37aece4b) SHA1(08dbb470644278132b8126649fe41d70e7750bee) )    /* character color codes on a per-column basis */
24842484
2485   ROM_REGION( 0x0200, "user1", 0 )
2486   ROM_LOAD( "82s147.prm",  0x0000, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) )   /* no dump - taken from hunchbkd */
2485    ROM_REGION( 0x0200, "user1", 0 )
2486    ROM_LOAD( "82s147.prm",  0x0000, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) )    /* no dump - taken from hunchbkd */
24872487
2488   ROM_REGION( 0x0100, "plds", ROMREGION_DISPOSE )
2489   ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
2488    ROM_REGION( 0x0100, "plds", ROMREGION_DISPOSE )
2489    ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
24902490ROM_END
24912491
24922492ROM_START( herodku )
2493   ROM_REGION( 0x10000, "maincpu", 0 )
2494   ROM_LOAD( "2764.8h",      0x0c00, 0x0400, CRC(989ce053) SHA1(852401856a2d91118d1bd0b3db892b57d0ac949c) )
2495   ROM_CONTINUE(             0x0800, 0x0400 )
2496   ROM_CONTINUE(             0x0400, 0x0400 )
2497   ROM_CONTINUE(             0x0000, 0x0400 )
2498   ROM_CONTINUE(             0x2000, 0x1000 )
2499   ROM_LOAD( "2764.8f",      0x4000, 0x1000, CRC(835e0074) SHA1(187358973f595033a4745759f554a3dfd398889b) )
2500   ROM_CONTINUE(             0x6000, 0x1000 )
2493    ROM_REGION( 0x10000, "maincpu", 0 )
2494    ROM_LOAD( "2764.8h",      0x0c00, 0x0400, CRC(989ce053) SHA1(852401856a2d91118d1bd0b3db892b57d0ac949c) )
2495    ROM_CONTINUE(             0x0800, 0x0400 )
2496    ROM_CONTINUE(             0x0400, 0x0400 )
2497    ROM_CONTINUE(             0x0000, 0x0400 )
2498    ROM_CONTINUE(             0x2000, 0x1000 )
2499    ROM_LOAD( "2764.8f",      0x4000, 0x1000, CRC(835e0074) SHA1(187358973f595033a4745759f554a3dfd398889b) )
2500    ROM_CONTINUE(             0x6000, 0x1000 )
25012501
2502   ROM_REGION( 0x1800, "soundcpu", 0 )   /* sound */
2503   ROM_LOAD( "2716.3h",      0x0000, 0x0800, CRC(caf57bef) SHA1(60c19c65bf312b36c68631ccea5434ad8cf0f3df) )
2504   ROM_RELOAD(               0x0800, 0x0800 )
2505   ROM_FILL(                 0x1000, 0x0800, 0xFF )
2502    ROM_REGION( 0x1800, "soundcpu", 0 ) /* sound */
2503    ROM_LOAD( "2716.3h",      0x0000, 0x0800, CRC(caf57bef) SHA1(60c19c65bf312b36c68631ccea5434ad8cf0f3df) )
2504    ROM_RELOAD(               0x0800, 0x0800 )
2505    ROM_FILL(                 0x1000, 0x0800, 0xFF )
25062506
2507   ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
2508   ROM_LOAD( "pnk.3n",       0x0000, 0x0800, CRC(574dfd7a) SHA1(78bbe4ea83fdaec14ca92ceae03e8a3d0877d14b) )
2509   ROM_LOAD( "blk.3p",       0x0800, 0x0800, CRC(16f7c040) SHA1(d1bd1b5f3c66ac6e71637ef42962adabacd79340) )
2507    ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
2508    ROM_LOAD( "pnk.3n",       0x0000, 0x0800, CRC(574dfd7a) SHA1(78bbe4ea83fdaec14ca92ceae03e8a3d0877d14b) )
2509    ROM_LOAD( "blk.3p",       0x0800, 0x0800, CRC(16f7c040) SHA1(d1bd1b5f3c66ac6e71637ef42962adabacd79340) )
25102510
2511   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2512   ROM_LOAD( "gold.7c",      0x0000, 0x0800, CRC(5f5282ed) SHA1(fcd467e404fab89addd55bd7c5c07d28551a4c8e) )
2513   ROM_LOAD( "orange.7d",    0x0800, 0x0800, CRC(075d99f5) SHA1(ff6f85a50179e0599b39871be1739080768fc475) )
2514   ROM_LOAD( "yellow.7e",    0x1000, 0x0800, CRC(f6272e96) SHA1(a9608966613aedb36cfb04f85730efed9a44d17c) )
2515   ROM_LOAD( "violet.7f",    0x1800, 0x0800, CRC(ca020685) SHA1(fe0d8d85c3bf244384e9c94f6a7f17db31083245) )
2511    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2512    ROM_LOAD( "gold.7c",      0x0000, 0x0800, CRC(5f5282ed) SHA1(fcd467e404fab89addd55bd7c5c07d28551a4c8e) )
2513    ROM_LOAD( "orange.7d",    0x0800, 0x0800, CRC(075d99f5) SHA1(ff6f85a50179e0599b39871be1739080768fc475) )
2514    ROM_LOAD( "yellow.7e",    0x1000, 0x0800, CRC(f6272e96) SHA1(a9608966613aedb36cfb04f85730efed9a44d17c) )
2515    ROM_LOAD( "violet.7f",    0x1800, 0x0800, CRC(ca020685) SHA1(fe0d8d85c3bf244384e9c94f6a7f17db31083245) )
25162516
2517   ROM_REGION( 0x0500, "proms", 0 )
2518   ROM_LOAD( "82s129.2e",    0x0000, 0x0100, CRC(da4b47e6) SHA1(2cfc7d489002113eb91048cc29d24831dadbfabb) )   /* palette low 4 bits (inverted) */
2519   ROM_LOAD( "82s129.2f",    0x0100, 0x0100, CRC(96e213a4) SHA1(38f21e7bce96fd2159aa61e64d66aa574d85873c) )   /* palette high 4 bits (inverted) */
2520   ROM_LOAD( "82s126.2n",    0x0200, 0x0100, CRC(37aece4b) SHA1(08dbb470644278132b8126649fe41d70e7750bee) )   /* character color codes on a per-column basis */
2517    ROM_REGION( 0x0500, "proms", 0 )
2518    ROM_LOAD( "82s129.2e",    0x0000, 0x0100, CRC(da4b47e6) SHA1(2cfc7d489002113eb91048cc29d24831dadbfabb) )    /* palette low 4 bits (inverted) */
2519    ROM_LOAD( "82s129.2f",    0x0100, 0x0100, CRC(96e213a4) SHA1(38f21e7bce96fd2159aa61e64d66aa574d85873c) )    /* palette high 4 bits (inverted) */
2520    ROM_LOAD( "82s126.2n",    0x0200, 0x0100, CRC(37aece4b) SHA1(08dbb470644278132b8126649fe41d70e7750bee) )    /* character color codes on a per-column basis */
25212521
2522   ROM_REGION( 0x0200, "user1", 0 )
2523   ROM_LOAD( "82s147.prm",  0x0000, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) )   /* no dump - taken from hunchbkd */
2522    ROM_REGION( 0x0200, "user1", 0 )
2523    ROM_LOAD( "82s147.prm",  0x0000, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) )    /* no dump - taken from hunchbkd */
25242524
2525   ROM_REGION( 0x0100, "plds", ROMREGION_DISPOSE )
2526   ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
2525    ROM_REGION( 0x0100, "plds", ROMREGION_DISPOSE )
2526    ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
25272527ROM_END
25282528
25292529ROM_START( spclforc )
2530   ROM_REGION( 0x8000, "maincpu", 0 )
2531   ROM_LOAD( "27128.8f",     0x0000, 0x1000, CRC(1e9b8d26) SHA1(783e733cfb5d8fa560a6e6a7b49f782abc60bb58) )
2532   ROM_CONTINUE(           0x2000, 0x1000 )
2533   ROM_CONTINUE(           0x4000, 0x1000 )
2534   ROM_CONTINUE(           0x6000, 0x1000 )
2530    ROM_REGION( 0x8000, "maincpu", 0 )
2531    ROM_LOAD( "27128.8f",     0x0000, 0x1000, CRC(1e9b8d26) SHA1(783e733cfb5d8fa560a6e6a7b49f782abc60bb58) )
2532    ROM_CONTINUE(             0x2000, 0x1000 )
2533    ROM_CONTINUE(             0x4000, 0x1000 )
2534    ROM_CONTINUE(             0x6000, 0x1000 )
25352535
2536   ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
2537   ROM_LOAD( "2716.3n",      0x0000, 0x0800, CRC(68c28bcb) SHA1(12a12cd4d639fea649f4baf40c60994fba303cf0) )
2538   ROM_LOAD( "2716.3p",      0x0800, 0x0800, CRC(dfb18c81) SHA1(a7a17b14f0c1194da1e771cd1291b59d330e4307) )
2536    ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
2537    ROM_LOAD( "2716.3n",      0x0000, 0x0800, CRC(68c28bcb) SHA1(12a12cd4d639fea649f4baf40c60994fba303cf0) )
2538    ROM_LOAD( "2716.3p",      0x0800, 0x0800, CRC(dfb18c81) SHA1(a7a17b14f0c1194da1e771cd1291b59d330e4307) )
25392539
2540   ROM_REGION( 0x4000, "gfx2", ROMREGION_DISPOSE )
2541   ROM_LOAD( "2732.7c",      0x0000, 0x1000, CRC(c1ea2b17) SHA1(6e95b15e7fdd04023622e8c521560e47e98acf28) )
2542   ROM_LOAD( "2732.7d",      0x1000, 0x1000, CRC(fe5501f0) SHA1(ab7d1e02400659ebedfed2837823f228af017a94) )
2543   ROM_LOAD( "2732.7e",      0x2000, 0x1000, CRC(f6a113bd) SHA1(2f8776780284081f7858334766be6a6fde3a3371) )
2544   ROM_LOAD( "2732.7f",      0x3000, 0x1000, CRC(42857a7a) SHA1(267dd954480bc87f14c758803cb26b7812d323b8) )
2540    ROM_REGION( 0x4000, "gfx2", ROMREGION_DISPOSE )
2541    ROM_LOAD( "2732.7c",      0x0000, 0x1000, CRC(c1ea2b17) SHA1(6e95b15e7fdd04023622e8c521560e47e98acf28) )
2542    ROM_LOAD( "2732.7d",      0x1000, 0x1000, CRC(fe5501f0) SHA1(ab7d1e02400659ebedfed2837823f228af017a94) )
2543    ROM_LOAD( "2732.7e",      0x2000, 0x1000, CRC(f6a113bd) SHA1(2f8776780284081f7858334766be6a6fde3a3371) )
2544    ROM_LOAD( "2732.7f",      0x3000, 0x1000, CRC(42857a7a) SHA1(267dd954480bc87f14c758803cb26b7812d323b8) )
25452545
2546   ROM_REGION( 0x0500, "proms", 0 )
2547   ROM_LOAD( "82s126.2e",    0x0000, 0x0100, CRC(b3751a25) SHA1(4b444e8fd02ac8674ecaba2fee083cb9feb99fa0) )
2548   ROM_LOAD( "82s126.2f",    0x0100, 0x0100, CRC(1026d438) SHA1(927009e6ed520c39c36c1d7966589c6778df1a3a) )
2549   ROM_LOAD( "82s126.2n",    0x0200, 0x0100, CRC(9735998d) SHA1(c3f50f97369547b1fd25da64507a5c8b725de6d0) )
2546    ROM_REGION( 0x0500, "proms", 0 )
2547    ROM_LOAD( "82s126.2e",    0x0000, 0x0100, CRC(b3751a25) SHA1(4b444e8fd02ac8674ecaba2fee083cb9feb99fa0) )
2548    ROM_LOAD( "82s126.2f",    0x0100, 0x0100, CRC(1026d438) SHA1(927009e6ed520c39c36c1d7966589c6778df1a3a) )
2549    ROM_LOAD( "82s126.2n",    0x0200, 0x0100, CRC(9735998d) SHA1(c3f50f97369547b1fd25da64507a5c8b725de6d0) )
25502550
2551   ROM_REGION( 0x0200, "user1", 0 )
2552   ROM_LOAD( "82s147.prm",  0x0000, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) )   /* no dump - taken from hunchbkd */
2551    ROM_REGION( 0x0200, "user1", 0 )
2552    ROM_LOAD( "82s147.prm",  0x0000, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) )    /* no dump - taken from hunchbkd */
25532553
2554   ROM_REGION( 0x0100, "plds", ROMREGION_DISPOSE )
2555   ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
2554    ROM_REGION( 0x0100, "plds", ROMREGION_DISPOSE )
2555    ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
25562556ROM_END
25572557
25582558ROM_START( spcfrcii )
2559   ROM_REGION( 0x8000, "maincpu", 0 )
2560   ROM_LOAD( "spfc2.8f",     0x0000, 0x1000, CRC(87f9bb6c) SHA1(f432ff205336280ae11ef4b3061be48e19e07d76) )
2561   ROM_CONTINUE(           0x2000, 0x1000 )
2562   ROM_CONTINUE(           0x4000, 0x1000 )
2563   ROM_CONTINUE(           0x6000, 0x1000 )
2559    ROM_REGION( 0x8000, "maincpu", 0 )
2560    ROM_LOAD( "spfc2.8f",     0x0000, 0x1000, CRC(87f9bb6c) SHA1(f432ff205336280ae11ef4b3061be48e19e07d76) )
2561    ROM_CONTINUE(             0x2000, 0x1000 )
2562    ROM_CONTINUE(             0x4000, 0x1000 )
2563    ROM_CONTINUE(             0x6000, 0x1000 )
25642564
2565   ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
2566   ROM_LOAD( "spfc2.3n",     0x0000, 0x0800, CRC(7aba051a) SHA1(d9c9f9932991fbc8a2130d3025fdc027e7f89511) )
2567   ROM_LOAD( "spfc2.3p",     0x0800, 0x0800, CRC(efeed826) SHA1(d62c5c75f9c77f7313cb4a60c22368a85807a39a) )
2565    ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
2566    ROM_LOAD( "spfc2.3n",     0x0000, 0x0800, CRC(7aba051a) SHA1(d9c9f9932991fbc8a2130d3025fdc027e7f89511) )
2567    ROM_LOAD( "spfc2.3p",     0x0800, 0x0800, CRC(efeed826) SHA1(d62c5c75f9c77f7313cb4a60c22368a85807a39a) )
25682568
2569   ROM_REGION( 0x4000, "gfx2", ROMREGION_DISPOSE )
2570   ROM_LOAD( "spfc2.7c",     0x0000, 0x1000, CRC(c1ea2b17) SHA1(6e95b15e7fdd04023622e8c521560e47e98acf28) )
2571   ROM_LOAD( "spfc2.7d",     0x1000, 0x1000, CRC(fe5501f0) SHA1(ab7d1e02400659ebedfed2837823f228af017a94) )
2572   ROM_LOAD( "spfc2.7e",     0x2000, 0x1000, CRC(f6a113bd) SHA1(2f8776780284081f7858334766be6a6fde3a3371) )
2573   ROM_LOAD( "spfc2.7f",     0x3000, 0x1000, CRC(42857a7a) SHA1(267dd954480bc87f14c758803cb26b7812d323b8) )
2569    ROM_REGION( 0x4000, "gfx2", ROMREGION_DISPOSE )
2570    ROM_LOAD( "spfc2.7c",     0x0000, 0x1000, CRC(c1ea2b17) SHA1(6e95b15e7fdd04023622e8c521560e47e98acf28) )
2571    ROM_LOAD( "spfc2.7d",     0x1000, 0x1000, CRC(fe5501f0) SHA1(ab7d1e02400659ebedfed2837823f228af017a94) )
2572    ROM_LOAD( "spfc2.7e",     0x2000, 0x1000, CRC(f6a113bd) SHA1(2f8776780284081f7858334766be6a6fde3a3371) )
2573    ROM_LOAD( "spfc2.7f",     0x3000, 0x1000, CRC(42857a7a) SHA1(267dd954480bc87f14c758803cb26b7812d323b8) )
25742574
2575   ROM_REGION( 0x0500, "proms", 0 )
2576   ROM_LOAD( "spfc2.2e",     0x0000, 0x0100, CRC(b3751a25) SHA1(4b444e8fd02ac8674ecaba2fee083cb9feb99fa0) )
2577   ROM_LOAD( "spfc2.2f",     0x0100, 0x0100, CRC(1026d438) SHA1(927009e6ed520c39c36c1d7966589c6778df1a3a) )
2578   ROM_LOAD( "spfc2.2n",     0x0200, 0x0100, CRC(9735998d) SHA1(c3f50f97369547b1fd25da64507a5c8b725de6d0) )
2575    ROM_REGION( 0x0500, "proms", 0 )
2576    ROM_LOAD( "spfc2.2e",     0x0000, 0x0100, CRC(b3751a25) SHA1(4b444e8fd02ac8674ecaba2fee083cb9feb99fa0) )
2577    ROM_LOAD( "spfc2.2f",     0x0100, 0x0100, CRC(1026d438) SHA1(927009e6ed520c39c36c1d7966589c6778df1a3a) )
2578    ROM_LOAD( "spfc2.2n",     0x0200, 0x0100, CRC(9735998d) SHA1(c3f50f97369547b1fd25da64507a5c8b725de6d0) )
25792579
2580   ROM_REGION( 0x0200, "user1", 0 )
2581   ROM_LOAD( "82s147.prm",  0x0000, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) )   /* no dump - taken from hunchbkd */
2580    ROM_REGION( 0x0200, "user1", 0 )
2581    ROM_LOAD( "82s147.prm",  0x0000, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) )    /* no dump - taken from hunchbkd */
25822582
2583   ROM_REGION( 0x0100, "plds", ROMREGION_DISPOSE )
2584   ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
2583    ROM_REGION( 0x0100, "plds", ROMREGION_DISPOSE )
2584    ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
25852585ROM_END
25862586
25872587ROM_START( 8ballact )
2588   ROM_REGION( 0x8000, "maincpu", 0 )
2589   ROM_LOAD( "8b-dk.5e",     0x0400, 0x0400, CRC(166c1c9b) SHA1(fd5661dbb4617a1daff7949ef030b8572bdebb85) )
2590   ROM_CONTINUE(           0x0000, 0x0400 )
2591   ROM_CONTINUE(           0x0c00, 0x0400 )
2592   ROM_CONTINUE(           0x0800, 0x0400 )
2593   ROM_LOAD( "8b-dk.5c",     0x2000, 0x1000, CRC(9ec87baa) SHA1(79fc89d9474ac23cda56f6af27db77aba964f395) )
2594   ROM_LOAD( "8b-dk.5b",     0x4000, 0x1000, CRC(f836a962) SHA1(5a45514ea59cd92092523d116b0dc4a1f8fc46b7) )
2595   ROM_LOAD( "8b-dk.5a",     0x6000, 0x1000, CRC(d45866d4) SHA1(5dfb121aa87bc5e6efadd9412b9f8d360c3dabd3) )
2588    ROM_REGION( 0x8000, "maincpu", 0 )
2589    ROM_LOAD( "8b-dk.5e",     0x0400, 0x0400, CRC(166c1c9b) SHA1(fd5661dbb4617a1daff7949ef030b8572bdebb85) )
2590    ROM_CONTINUE(             0x0000, 0x0400 )
2591    ROM_CONTINUE(             0x0c00, 0x0400 )
2592    ROM_CONTINUE(             0x0800, 0x0400 )
2593    ROM_LOAD( "8b-dk.5c",     0x2000, 0x1000, CRC(9ec87baa) SHA1(79fc89d9474ac23cda56f6af27db77aba964f395) )
2594    ROM_LOAD( "8b-dk.5b",     0x4000, 0x1000, CRC(f836a962) SHA1(5a45514ea59cd92092523d116b0dc4a1f8fc46b7) )
2595    ROM_LOAD( "8b-dk.5a",     0x6000, 0x1000, CRC(d45866d4) SHA1(5dfb121aa87bc5e6efadd9412b9f8d360c3dabd3) )
25962596
2597   ROM_REGION( 0x1800, "soundcpu", 0 )   /* sound */
2598   ROM_LOAD( "8b-dk.3h",     0x0000, 0x0800, CRC(a8752c60) SHA1(0d7d35fd271d796e884a33071b83c000b91208a0) )
2599   ROM_RELOAD(               0x0800, 0x0800 )
2600   ROM_FILL(                 0x1000, 0x0800, 0xFF )
2597    ROM_REGION( 0x1800, "soundcpu", 0 ) /* sound */
2598    ROM_LOAD( "8b-dk.3h",     0x0000, 0x0800, CRC(a8752c60) SHA1(0d7d35fd271d796e884a33071b83c000b91208a0) )
2599    ROM_RELOAD(               0x0800, 0x0800 )
2600    ROM_FILL(                 0x1000, 0x0800, 0xFF )
26012601
2602   ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
2603   ROM_LOAD( "8b-dk.3n",     0x0000, 0x0800, CRC(44830867) SHA1(29d34792b9193edcdac427367c360d6f01e1e094) )
2604   ROM_LOAD( "8b-dk.3p",     0x0800, 0x0800, CRC(6148c6f2) SHA1(7e6ddb8999f07888ac49441ed8cf6496e8db3caa) )
2602    ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
2603    ROM_LOAD( "8b-dk.3n",     0x0000, 0x0800, CRC(44830867) SHA1(29d34792b9193edcdac427367c360d6f01e1e094) )
2604    ROM_LOAD( "8b-dk.3p",     0x0800, 0x0800, CRC(6148c6f2) SHA1(7e6ddb8999f07888ac49441ed8cf6496e8db3caa) )
26052605
2606   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2607   ROM_LOAD( "8b-dk.7c",     0x0000, 0x0800, CRC(e34409f5) SHA1(81fd6f038988843d7ef1c57af75253e497a6f57b) )
2608   ROM_LOAD( "8b-dk.7d",     0x0800, 0x0800, CRC(b4dc37ca) SHA1(6c469f8edbc6dd02e1821972a503e634f920e221) )
2609   ROM_LOAD( "8b-dk.7e",     0x1000, 0x0800, CRC(655af8a8) SHA1(d434efc89226d28d24e858186fab9aff0e476deb) )
2610   ROM_LOAD( "8b-dk.7f",     0x1800, 0x0800, CRC(a29b2763) SHA1(6b2ee88e96a1b74193f12f4fa64a6705f17557b1) )
2606    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2607    ROM_LOAD( "8b-dk.7c",     0x0000, 0x0800, CRC(e34409f5) SHA1(81fd6f038988843d7ef1c57af75253e497a6f57b) )
2608    ROM_LOAD( "8b-dk.7d",     0x0800, 0x0800, CRC(b4dc37ca) SHA1(6c469f8edbc6dd02e1821972a503e634f920e221) )
2609    ROM_LOAD( "8b-dk.7e",     0x1000, 0x0800, CRC(655af8a8) SHA1(d434efc89226d28d24e858186fab9aff0e476deb) )
2610    ROM_LOAD( "8b-dk.7f",     0x1800, 0x0800, CRC(a29b2763) SHA1(6b2ee88e96a1b74193f12f4fa64a6705f17557b1) )
26112611
2612   ROM_REGION( 0x0500, "proms", 0 )
2613   ROM_LOAD( "8b.2e",        0x0000, 0x0100, CRC(c7379a12) SHA1(e128e7d7c71ec61b934651c29648d0d2fc69e306) )
2614   ROM_LOAD( "8b.2f",        0x0100, 0x0100, CRC(116612b4) SHA1(9a7c5329f211b13d5a757fdac761d7096d78b65a) )
2615   ROM_LOAD( "8b.2n",        0x0200, 0x0100, CRC(30586988) SHA1(a9c246fd01cb3ff371ad33b55d5b2fe4898c4d1b) )
2612    ROM_REGION( 0x0500, "proms", 0 )
2613    ROM_LOAD( "8b.2e",        0x0000, 0x0100, CRC(c7379a12) SHA1(e128e7d7c71ec61b934651c29648d0d2fc69e306) )
2614    ROM_LOAD( "8b.2f",        0x0100, 0x0100, CRC(116612b4) SHA1(9a7c5329f211b13d5a757fdac761d7096d78b65a) )
2615    ROM_LOAD( "8b.2n",        0x0200, 0x0100, CRC(30586988) SHA1(a9c246fd01cb3ff371ad33b55d5b2fe4898c4d1b) )
26162616
2617   ROM_REGION( 0x0200, "user1", 0 )
2618   ROM_LOAD( "82s147.prm",  0x0000, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) )   /* no dump - taken from hunchbkd */
2617    ROM_REGION( 0x0200, "user1", 0 )
2618    ROM_LOAD( "82s147.prm",  0x0000, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) )    /* no dump - taken from hunchbkd */
26192619
2620   ROM_REGION( 0x0100, "plds", ROMREGION_DISPOSE )
2621   ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
2620    ROM_REGION( 0x0100, "plds", ROMREGION_DISPOSE )
2621    ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
26222622ROM_END
26232623
26242624ROM_START( 8ballat2 )
2625   ROM_REGION( 0x8000, "maincpu", 0 )
2626   ROM_LOAD( "8b-jr.5b",     0x0400, 0x0400, CRC(579cd634) SHA1(93d81539459f7198d8cbf05b3e66a40466aee2d9) )
2627   ROM_CONTINUE(           0x0000, 0x0400 )
2628   ROM_CONTINUE(           0x0c00, 0x0400 )
2629   ROM_CONTINUE(           0x0800, 0x0400 )
2630   ROM_CONTINUE(           0x6000, 0x1000 )
2631   ROM_LOAD( "8b-jr.5c",     0x4000, 0x1000, CRC(9bccbe93) SHA1(dec4e1d41e1df36359f205bf090c4290311e4141) )
2632   ROM_CONTINUE(           0x2000, 0x1000 )
2625    ROM_REGION( 0x8000, "maincpu", 0 )
2626    ROM_LOAD( "8b-jr.5b",     0x0400, 0x0400, CRC(579cd634) SHA1(93d81539459f7198d8cbf05b3e66a40466aee2d9) )
2627    ROM_CONTINUE(             0x0000, 0x0400 )
2628    ROM_CONTINUE(             0x0c00, 0x0400 )
2629    ROM_CONTINUE(             0x0800, 0x0400 )
2630    ROM_CONTINUE(             0x6000, 0x1000 )
2631    ROM_LOAD( "8b-jr.5c",     0x4000, 0x1000, CRC(9bccbe93) SHA1(dec4e1d41e1df36359f205bf090c4290311e4141) )
2632    ROM_CONTINUE(             0x2000, 0x1000 )
26332633
2634   ROM_REGION( 0x1000, "soundcpu", 0 )   /* sound */
2635   ROM_LOAD( "8b-jr.3h",     0x0000, 0x1000, CRC(7f5c19fa) SHA1(9cde134137ee8e34bb745a72e67981c581561428) )
2634    ROM_REGION( 0x1000, "soundcpu", 0 ) /* sound */
2635    ROM_LOAD( "8b-jr.3h",     0x0000, 0x1000, CRC(7f5c19fa) SHA1(9cde134137ee8e34bb745a72e67981c581561428) )
26362636
2637   ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2638   ROM_LOAD( "8b-jr.3n",     0x0000, 0x1000, CRC(9ec0edac) SHA1(ffa1ae2236995527d72917c45be337f642134cf8) )
2639   ROM_LOAD( "8b-jr.3p",     0x1000, 0x1000, CRC(2978a88b) SHA1(15c21a3b3fb879996c13ce56791828e170c771d1) )
2637    ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2638    ROM_LOAD( "8b-jr.3n",     0x0000, 0x1000, CRC(9ec0edac) SHA1(ffa1ae2236995527d72917c45be337f642134cf8) )
2639    ROM_LOAD( "8b-jr.3p",     0x1000, 0x1000, CRC(2978a88b) SHA1(15c21a3b3fb879996c13ce56791828e170c771d1) )
26402640
2641   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2642   ROM_LOAD( "8b-jr.7c",     0x0000, 0x0800, CRC(e34409f5) SHA1(81fd6f038988843d7ef1c57af75253e497a6f57b) )
2643   ROM_LOAD( "8b-jr.7d",     0x0800, 0x0800, CRC(b4dc37ca) SHA1(6c469f8edbc6dd02e1821972a503e634f920e221) )
2644   ROM_LOAD( "8b-jr.7e",     0x1000, 0x0800, CRC(655af8a8) SHA1(d434efc89226d28d24e858186fab9aff0e476deb) )
2645   ROM_LOAD( "8b-jr.7f",     0x1800, 0x0800, CRC(a29b2763) SHA1(6b2ee88e96a1b74193f12f4fa64a6705f17557b1) )
2641    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2642    ROM_LOAD( "8b-jr.7c",     0x0000, 0x0800, CRC(e34409f5) SHA1(81fd6f038988843d7ef1c57af75253e497a6f57b) )
2643    ROM_LOAD( "8b-jr.7d",     0x0800, 0x0800, CRC(b4dc37ca) SHA1(6c469f8edbc6dd02e1821972a503e634f920e221) )
2644    ROM_LOAD( "8b-jr.7e",     0x1000, 0x0800, CRC(655af8a8) SHA1(d434efc89226d28d24e858186fab9aff0e476deb) )
2645    ROM_LOAD( "8b-jr.7f",     0x1800, 0x0800, CRC(a29b2763) SHA1(6b2ee88e96a1b74193f12f4fa64a6705f17557b1) )
26462646
2647   ROM_REGION( 0x0500, "proms", 0 )
2648   ROM_LOAD( "8b.2e",        0x0000, 0x0100, CRC(c7379a12) SHA1(e128e7d7c71ec61b934651c29648d0d2fc69e306) )
2649   ROM_LOAD( "8b.2f",        0x0100, 0x0100, CRC(116612b4) SHA1(9a7c5329f211b13d5a757fdac761d7096d78b65a) )
2650   ROM_LOAD( "8b.2n",        0x0200, 0x0100, CRC(30586988) SHA1(a9c246fd01cb3ff371ad33b55d5b2fe4898c4d1b) )
2647    ROM_REGION( 0x0500, "proms", 0 )
2648    ROM_LOAD( "8b.2e",        0x0000, 0x0100, CRC(c7379a12) SHA1(e128e7d7c71ec61b934651c29648d0d2fc69e306) )
2649    ROM_LOAD( "8b.2f",        0x0100, 0x0100, CRC(116612b4) SHA1(9a7c5329f211b13d5a757fdac761d7096d78b65a) )
2650    ROM_LOAD( "8b.2n",        0x0200, 0x0100, CRC(30586988) SHA1(a9c246fd01cb3ff371ad33b55d5b2fe4898c4d1b) )
26512651
2652   ROM_REGION( 0x0200, "user1", 0 )
2653   ROM_LOAD( "82s147.prm",  0x0000, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) )   /* no dump - taken from hunchbkd */
2652    ROM_REGION( 0x0200, "user1", 0 )
2653    ROM_LOAD( "82s147.prm",  0x0000, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) )    /* no dump - taken from hunchbkd */
26542654
2655   ROM_REGION( 0x0100, "plds", ROMREGION_DISPOSE )
2656   ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
2655    ROM_REGION( 0x0100, "plds", ROMREGION_DISPOSE )
2656    ROM_LOAD( "pls153h.bin", 0x0000, 0x00eb, NO_DUMP ) /* missing - pls153 ??? */
26572657ROM_END
26582658
26592659/* encrypted */
26602660ROM_START( drakton )
2661   ROM_REGION( 0x20000, "maincpu", 0 )   /* 64k for code + 4*16k for decrypted code */
2662   ROM_LOAD( "2764.u2",      0x0000, 0x2000, CRC(d9a33205) SHA1(06dc96412e7162fd8a4f6ef4d14d1510c06b1d00) )
2663   ROM_LOAD( "2764.u3",      0x2000, 0x2000, CRC(69583a35) SHA1(061271be4e9ddfd8dff4217f1434215ad35ba505) )
2661    ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k for code + 4*16k for decrypted code */
2662    ROM_LOAD( "2764.u2",      0x0000, 0x2000, CRC(d9a33205) SHA1(06dc96412e7162fd8a4f6ef4d14d1510c06b1d00) )
2663    ROM_LOAD( "2764.u3",      0x2000, 0x2000, CRC(69583a35) SHA1(061271be4e9ddfd8dff4217f1434215ad35ba505) )
26642664
2665   /* one is used for dkong conversions, the other one for dkongjr conversions */
2666   ROM_REGION( 0x1800, "soundcpu", 0 )   /* sound */
2667   ROM_LOAD( "2716.3h",      0x0000, 0x0800, CRC(3489a35b) SHA1(9ebcf4b20b212d54e6b1a6d9abbda3109298631b) ) /* dkong */
2668   ROM_RELOAD(               0x0800, 0x0800 )
2669   ROM_FILL(                 0x1000, 0x0800, 0x00 )
2665    /* one is used for dkong conversions, the other one for dkongjr conversions */
2666    ROM_REGION( 0x1800, "soundcpu", 0 ) /* sound */
2667    ROM_LOAD( "2716.3h",      0x0000, 0x0800, CRC(3489a35b) SHA1(9ebcf4b20b212d54e6b1a6d9abbda3109298631b) ) /* dkong */
2668    ROM_RELOAD(               0x0800, 0x0800 )
2669    ROM_FILL(                 0x1000, 0x0800, 0x00 )
26702670
2671   ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
2672   ROM_LOAD( "2716.3n",      0x0000, 0x0800, CRC(ea0e7f9a) SHA1(a8e2b43e15281d45e414eaae98e5248bad79c41b) )
2673   ROM_LOAD( "2716.3p",      0x0800, 0x0800, CRC(46f51b68) SHA1(7d1c3a61cdd0ad471cb0064c0cbaf758325fc267) )
2671    ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
2672    ROM_LOAD( "2716.3n",      0x0000, 0x0800, CRC(ea0e7f9a) SHA1(a8e2b43e15281d45e414eaae98e5248bad79c41b) )
2673    ROM_LOAD( "2716.3p",      0x0800, 0x0800, CRC(46f51b68) SHA1(7d1c3a61cdd0ad471cb0064c0cbaf758325fc267) )
26742674
2675   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2676   ROM_LOAD( "2716.7c",      0x0000, 0x0800, CRC(2925dc2d) SHA1(721748031714ba488191eb074643093c906e8ce2) )
2677   ROM_LOAD( "2716.7d",      0x0800, 0x0800, CRC(bdf6b1b4) SHA1(ea9076a2bba909bfae8a10a92d857e8f0644fc8b) )
2678   ROM_LOAD( "2716.7e",      0x1000, 0x0800, CRC(4d62e62f) SHA1(01e757110edcb24600a27b1505f54e3bd04b9e58) )
2679   ROM_LOAD( "2716.7f",      0x1800, 0x0800, CRC(81d200e5) SHA1(5eb74f319756ba3fbc6d0d918799337f911e9419) )
2675    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2676    ROM_LOAD( "2716.7c",      0x0000, 0x0800, CRC(2925dc2d) SHA1(721748031714ba488191eb074643093c906e8ce2) )
2677    ROM_LOAD( "2716.7d",      0x0800, 0x0800, CRC(bdf6b1b4) SHA1(ea9076a2bba909bfae8a10a92d857e8f0644fc8b) )
2678    ROM_LOAD( "2716.7e",      0x1000, 0x0800, CRC(4d62e62f) SHA1(01e757110edcb24600a27b1505f54e3bd04b9e58) )
2679    ROM_LOAD( "2716.7f",      0x1800, 0x0800, CRC(81d200e5) SHA1(5eb74f319756ba3fbc6d0d918799337f911e9419) )
26802680
2681   ROM_REGION( 0x0300, "proms", 0 )
2682   ROM_LOAD( "82s126.2e",    0x0000, 0x0100, CRC(3ff45f76) SHA1(4068b5568f9e22e54f0df8a9e02bfed0bfb00db7) )
2683   ROM_LOAD( "82s126.2f",    0x0100, 0x0100, CRC(38f905be) SHA1(a963aea9a92ac95850c90c43085376cb4e06696b) )
2684   ROM_LOAD( "82s126.2n",    0x0200, 0x0100, CRC(3c343b9b) SHA1(f84f5fddcccc8499a2511877f5d706b37ddc7db8) )
2681    ROM_REGION( 0x0300, "proms", 0 )
2682    ROM_LOAD( "82s126.2e",    0x0000, 0x0100, CRC(3ff45f76) SHA1(4068b5568f9e22e54f0df8a9e02bfed0bfb00db7) )
2683    ROM_LOAD( "82s126.2f",    0x0100, 0x0100, CRC(38f905be) SHA1(a963aea9a92ac95850c90c43085376cb4e06696b) )
2684    ROM_LOAD( "82s126.2n",    0x0200, 0x0100, CRC(3c343b9b) SHA1(f84f5fddcccc8499a2511877f5d706b37ddc7db8) )
26852685ROM_END
26862686
26872687/* encrypted */
26882688ROM_START( drktnjr )
2689   ROM_REGION( 0x20000, "maincpu", 0 )   /* 64k for code + 4*16k for decrypted code */
2690   ROM_LOAD( "2764.u2",      0x0000, 0x2000, CRC(d9a33205) SHA1(06dc96412e7162fd8a4f6ef4d14d1510c06b1d00) )
2691   ROM_LOAD( "2764.u3",      0x2000, 0x2000, CRC(69583a35) SHA1(061271be4e9ddfd8dff4217f1434215ad35ba505) )
2689    ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k for code + 4*16k for decrypted code */
2690    ROM_LOAD( "2764.u2",      0x0000, 0x2000, CRC(d9a33205) SHA1(06dc96412e7162fd8a4f6ef4d14d1510c06b1d00) )
2691    ROM_LOAD( "2764.u3",      0x2000, 0x2000, CRC(69583a35) SHA1(061271be4e9ddfd8dff4217f1434215ad35ba505) )
26922692
2693   ROM_REGION( 0x1000, "soundcpu", 0 )   /* sound */
2694   /* one is used for dkong conversions, the other one for dkongjr conversions */
2695   ROM_LOAD( "2716.3h1",     0x0000, 0x0800, CRC(2a6ec016) SHA1(c95e185a39c8029f00798ce0a00759a4deb45677) ) /* dkongjr */
2693    ROM_REGION( 0x1000, "soundcpu", 0 ) /* sound */
2694    /* one is used for dkong conversions, the other one for dkongjr conversions */
2695    ROM_LOAD( "2716.3h1",     0x0000, 0x0800, CRC(2a6ec016) SHA1(c95e185a39c8029f00798ce0a00759a4deb45677) ) /* dkongjr */
26962696
2697   ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
2698   ROM_LOAD( "2716.3n",      0x0000, 0x0800, CRC(ea0e7f9a) SHA1(a8e2b43e15281d45e414eaae98e5248bad79c41b) )
2699   ROM_LOAD( "2716.3p",      0x0800, 0x0800, CRC(46f51b68) SHA1(7d1c3a61cdd0ad471cb0064c0cbaf758325fc267) )
2697    ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
2698    ROM_LOAD( "2716.3n",      0x0000, 0x0800, CRC(ea0e7f9a) SHA1(a8e2b43e15281d45e414eaae98e5248bad79c41b) )
2699    ROM_LOAD( "2716.3p",      0x0800, 0x0800, CRC(46f51b68) SHA1(7d1c3a61cdd0ad471cb0064c0cbaf758325fc267) )
27002700
2701   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2702   ROM_LOAD( "2716.7c",      0x0000, 0x0800, CRC(2925dc2d) SHA1(721748031714ba488191eb074643093c906e8ce2) )
2703   ROM_LOAD( "2716.7d",      0x0800, 0x0800, CRC(bdf6b1b4) SHA1(ea9076a2bba909bfae8a10a92d857e8f0644fc8b) )
2704   ROM_LOAD( "2716.7e",      0x1000, 0x0800, CRC(4d62e62f) SHA1(01e757110edcb24600a27b1505f54e3bd04b9e58) )
2705   ROM_LOAD( "2716.7f",      0x1800, 0x0800, CRC(81d200e5) SHA1(5eb74f319756ba3fbc6d0d918799337f911e9419) )
2701    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2702    ROM_LOAD( "2716.7c",      0x0000, 0x0800, CRC(2925dc2d) SHA1(721748031714ba488191eb074643093c906e8ce2) )
2703    ROM_LOAD( "2716.7d",      0x0800, 0x0800, CRC(bdf6b1b4) SHA1(ea9076a2bba909bfae8a10a92d857e8f0644fc8b) )
2704    ROM_LOAD( "2716.7e",      0x1000, 0x0800, CRC(4d62e62f) SHA1(01e757110edcb24600a27b1505f54e3bd04b9e58) )
2705    ROM_LOAD( "2716.7f",      0x1800, 0x0800, CRC(81d200e5) SHA1(5eb74f319756ba3fbc6d0d918799337f911e9419) )
27062706
2707   ROM_REGION( 0x0300, "proms", 0 )
2708   ROM_LOAD( "82s126.2e",    0x0000, 0x0100, CRC(3ff45f76) SHA1(4068b5568f9e22e54f0df8a9e02bfed0bfb00db7) )
2709   ROM_LOAD( "82s126.2f",    0x0100, 0x0100, CRC(38f905be) SHA1(a963aea9a92ac95850c90c43085376cb4e06696b) )
2710   ROM_LOAD( "82s126.2n",    0x0200, 0x0100, CRC(3c343b9b) SHA1(f84f5fddcccc8499a2511877f5d706b37ddc7db8) )
2707    ROM_REGION( 0x0300, "proms", 0 )
2708    ROM_LOAD( "82s126.2e",    0x0000, 0x0100, CRC(3ff45f76) SHA1(4068b5568f9e22e54f0df8a9e02bfed0bfb00db7) )
2709    ROM_LOAD( "82s126.2f",    0x0100, 0x0100, CRC(38f905be) SHA1(a963aea9a92ac95850c90c43085376cb4e06696b) )
2710    ROM_LOAD( "82s126.2n",    0x0200, 0x0100, CRC(3c343b9b) SHA1(f84f5fddcccc8499a2511877f5d706b37ddc7db8) )
27112711ROM_END
27122712
27132713/* encrypted */
27142714ROM_START( strtheat )
2715   ROM_REGION( 0x20000, "maincpu", 0 )   /* 64k for code + 4*16k for decrypted code */
2716   ROM_LOAD( "2764.u2",   0x0000, 0x2000, CRC(8d3e82c3) SHA1(ec26fb1c6015721da1f61eca76a4b3390d8dcc76) )
2717   ROM_LOAD( "2764.u3",   0x2000, 0x2000, CRC(f0759e76) SHA1(e086f02d1861269194c4cd2ada71696b48ed1a1d) )
2715    ROM_REGION( 0x20000, "maincpu", 0 ) /* 64k for code + 4*16k for decrypted code */
2716    ROM_LOAD( "2764.u2",   0x0000, 0x2000, CRC(8d3e82c3) SHA1(ec26fb1c6015721da1f61eca76a4b3390d8dcc76) )
2717    ROM_LOAD( "2764.u3",   0x2000, 0x2000, CRC(f0759e76) SHA1(e086f02d1861269194c4cd2ada71696b48ed1a1d) )
27182718
2719   ROM_REGION( 0x1800, "soundcpu", 0 )   /* sound */
2720   ROM_LOAD( "2716.3h",   0x0000, 0x0800, CRC(4cd17174) SHA1(5ed9b5275b0779d1ca05d6e62d3ad8a682ebde37) )
2721   ROM_RELOAD(            0x0800, 0x0800 )
2722   ROM_FILL(              0x1000, 0x0800, 0xFF )
2719    ROM_REGION( 0x1800, "soundcpu", 0 ) /* sound */
2720    ROM_LOAD( "2716.3h",   0x0000, 0x0800, CRC(4cd17174) SHA1(5ed9b5275b0779d1ca05d6e62d3ad8a682ebde37) )
2721    ROM_RELOAD(            0x0800, 0x0800 )
2722    ROM_FILL(              0x1000, 0x0800, 0xFF )
27232723
2724   ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2725   ROM_LOAD( "2716.3n",   0x0000, 0x0800, CRC(29e57678) SHA1(cbbb980c44c7f5c45d5f0b85209658f53b7ba4a7) )
2726   ROM_RELOAD(            0x0800, 0x0800 )
2727   ROM_LOAD( "2716.3p",   0x1000, 0x0800, CRC(31171146) SHA1(e26b22e73b528810b566b2b9f6d81e2d7856523d) )
2728   ROM_RELOAD(            0x1800, 0x0800 )
2724    ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2725    ROM_LOAD( "2716.3n",   0x0000, 0x0800, CRC(29e57678) SHA1(cbbb980c44c7f5c45d5f0b85209658f53b7ba4a7) )
2726    ROM_RELOAD(            0x0800, 0x0800 )
2727    ROM_LOAD( "2716.3p",   0x1000, 0x0800, CRC(31171146) SHA1(e26b22e73b528810b566b2b9f6d81e2d7856523d) )
2728    ROM_RELOAD(            0x1800, 0x0800 )
27292729
2730   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2731   ROM_LOAD( "2716.7c",   0x0000, 0x0800, CRC(a8238e9c) SHA1(947bbe48ce1c705ef974e37b138929f1c846ed79) )
2732   ROM_LOAD( "2716.7d",   0x0800, 0x0800, CRC(71202138) SHA1(b4edc77ed2844ef46aee4a492282e4785bdb7224) )
2733   ROM_LOAD( "2716.7e",   0x1000, 0x0800, CRC(dc7785ac) SHA1(4ccb3f9f938fd1d9bd20f1601a16a2780c84588b) )
2734   ROM_LOAD( "2716.7f",   0x1800, 0x0800, CRC(ede71d86) SHA1(0bce1b1d4180173537685a08055ce44b9dedc76a) )
2730    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2731    ROM_LOAD( "2716.7c",   0x0000, 0x0800, CRC(a8238e9c) SHA1(947bbe48ce1c705ef974e37b138929f1c846ed79) )
2732    ROM_LOAD( "2716.7d",   0x0800, 0x0800, CRC(71202138) SHA1(b4edc77ed2844ef46aee4a492282e4785bdb7224) )
2733    ROM_LOAD( "2716.7e",   0x1000, 0x0800, CRC(dc7785ac) SHA1(4ccb3f9f938fd1d9bd20f1601a16a2780c84588b) )
2734    ROM_LOAD( "2716.7f",   0x1800, 0x0800, CRC(ede71d86) SHA1(0bce1b1d4180173537685a08055ce44b9dedc76a) )
27352735
2736   ROM_REGION( 0x0300, "proms", 0 )
2737   ROM_LOAD( "82s129.2e",     0x0000, 0x0100, CRC(1311ba28) SHA1(d9b5bc07c8943d83592833e8b1c2ff57e4accb55) ) /* palette low 4 bits (inverted) */
2738   ROM_LOAD( "82s129.2f",     0x0100, 0x0100, CRC(18d90d4f) SHA1(b956fd652dcc5eb50eaec8729762d19cfd475bc7) ) /* palette high 4 bits (inverted) */
2739   ROM_LOAD( "82s129.2n",     0x0200, 0x0100, CRC(a515d59b) SHA1(930616c4bcd819c2a4432a6619a8c6da74f3e8c5) ) /* character color codes on a per-column basis */
2736    ROM_REGION( 0x0300, "proms", 0 )
2737    ROM_LOAD( "82s129.2e",     0x0000, 0x0100, CRC(1311ba28) SHA1(d9b5bc07c8943d83592833e8b1c2ff57e4accb55) ) /* palette low 4 bits (inverted) */
2738    ROM_LOAD( "82s129.2f",     0x0100, 0x0100, CRC(18d90d4f) SHA1(b956fd652dcc5eb50eaec8729762d19cfd475bc7) ) /* palette high 4 bits (inverted) */
2739    ROM_LOAD( "82s129.2n",     0x0200, 0x0100, CRC(a515d59b) SHA1(930616c4bcd819c2a4432a6619a8c6da74f3e8c5) ) /* character color codes on a per-column basis */
27402740ROM_END
27412741
27422742/*
r5046r5047
27992799*/
28002800
28012801ROM_START( shootgal )
2802   ROM_REGION( 0x8000, "maincpu", 0 )
2803   ROM_LOAD( "cpu.5e",       0x0000, 0x1000, CRC(c6d61b9c) SHA1(de3f4cf559313c4e5c5f7019aa6f68b3334e05c1) )
2804   ROM_LOAD( "cpu.5a",       0x6000, 0x1000, CRC(5dabe5e3) SHA1(7a36d97b2604aa61fe468863651cf67b851bbfca) )
2802    ROM_REGION( 0x8000, "maincpu", 0 )
2803    ROM_LOAD( "cpu.5e",       0x0000, 0x1000, CRC(c6d61b9c) SHA1(de3f4cf559313c4e5c5f7019aa6f68b3334e05c1) )
2804    ROM_LOAD( "cpu.5a",       0x6000, 0x1000, CRC(5dabe5e3) SHA1(7a36d97b2604aa61fe468863651cf67b851bbfca) )
28052805
2806   ROM_REGION( 0x1000, "soundcpu", 0 )
2807   ROM_LOAD( "sg-01-3h",    0x0000, 0x1000, CRC(80be5915) SHA1(a4f7d6a8319065a7a712df0195a3f8695d8f99f9) )
2806    ROM_REGION( 0x1000, "soundcpu", 0 )
2807    ROM_LOAD( "sg-01-3h",    0x0000, 0x1000, CRC(80be5915) SHA1(a4f7d6a8319065a7a712df0195a3f8695d8f99f9) )
28082808
2809   ROM_REGION( 0x0800, "cpu2", 0 )
2810   ROM_LOAD( "sg-01-0",     0x0000, 0x0800, CRC(f055a624) SHA1(5dfe89d7271092e665cdd5cd59d15a2b70f92f43) )
2809    ROM_REGION( 0x0800, "cpu2", 0 )
2810    ROM_LOAD( "sg-01-0",     0x0000, 0x0800, CRC(f055a624) SHA1(5dfe89d7271092e665cdd5cd59d15a2b70f92f43) )
28112811
2812   ROM_REGION( 0x1800, "tms", 0 )
2813   ROM_LOAD( "sg-01snd",    0x0000, 0x1000, CRC(644a0728) SHA1(e249fd57bc49572a2246aaf7c68a547f319f51bc) ) /* sg-01-snd */
2814   ROM_LOAD( "sg-01spk",    0x1000, 0x0800, CRC(aacaf730) SHA1(cd562093ab8931d165cb0877e332474fce131c67) ) /* sg-01-spk */
2812    ROM_REGION( 0x1800, "tms", 0 )
2813    ROM_LOAD( "sg-01snd",    0x0000, 0x1000, CRC(644a0728) SHA1(e249fd57bc49572a2246aaf7c68a547f319f51bc) ) /* sg-01-snd */
2814    ROM_LOAD( "sg-01spk",    0x1000, 0x0800, CRC(aacaf730) SHA1(cd562093ab8931d165cb0877e332474fce131c67) ) /* sg-01-spk */
28152815
2816   ROM_REGION( 0x2000, "user2", 0 ) /* gun proms? */
2817   ROM_LOAD( "sg-1",        0x0000, 0x0200, CRC(fda82517) SHA1(b36bac69b6f8218b280aae59133ea0d22d7a99f6) )
2818   ROM_LOAD( "sg-2",        0x0200, 0x091d, CRC(6e065613) SHA1(26d048af5c302f921de8e2c1bc7c7bf48dc21b5a) )
2816    ROM_REGION( 0x2000, "user2", 0 ) /* gun proms? */
2817    ROM_LOAD( "sg-1",        0x0000, 0x0200, CRC(fda82517) SHA1(b36bac69b6f8218b280aae59133ea0d22d7a99f6) )
2818    ROM_LOAD( "sg-2",        0x0200, 0x091d, CRC(6e065613) SHA1(26d048af5c302f921de8e2c1bc7c7bf48dc21b5a) )
28192819
2820   ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2821   ROM_LOAD( "sg-01-3n",    0x0000, 0x1000, CRC(72987a57) SHA1(8b972cfccb43023aca905c51182f8d3c06f7d0bb) )
2822   ROM_LOAD( "sg-01-3p",    0x1000, 0x1000, CRC(1ae9434e) SHA1(26228bf0aba99f48366544772693b35788084a6b) )
2820    ROM_REGION( 0x2000, "gfx1", ROMREGION_DISPOSE )
2821    ROM_LOAD( "sg-01-3n",    0x0000, 0x1000, CRC(72987a57) SHA1(8b972cfccb43023aca905c51182f8d3c06f7d0bb) )
2822    ROM_LOAD( "sg-01-3p",    0x1000, 0x1000, CRC(1ae9434e) SHA1(26228bf0aba99f48366544772693b35788084a6b) )
28232823
2824   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2825   ROM_LOAD( "sg-01-7c",    0x0000, 0x0800, CRC(3315658e) SHA1(613387aaa58f5df75d42d38b07237c0dc8aaba36) )
2826   ROM_LOAD( "sg-01-7d",    0x0800, 0x0800, CRC(76ad4143) SHA1(4ccc32656de9d5142e539b84d4c73bb14d32f8bf) )
2827   ROM_LOAD( "sg-01-7e",    0x1000, 0x0800, CRC(65d11685) SHA1(4e4b0b60ca4c16e26d842e142002887456d98ea4) )
2828   ROM_LOAD( "sg-01-7f",    0x1800, 0x0800, CRC(44fe71a2) SHA1(ff4442a5601ac2ed63c57e22977299b5b5499c93) )
2824    ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
2825    ROM_LOAD( "sg-01-7c",    0x0000, 0x0800, CRC(3315658e) SHA1(613387aaa58f5df75d42d38b07237c0dc8aaba36) )
2826    ROM_LOAD( "sg-01-7d",    0x0800, 0x0800, CRC(76ad4143) SHA1(4ccc32656de9d5142e539b84d4c73bb14d32f8bf) )
2827    ROM_LOAD( "sg-01-7e",    0x1000, 0x0800, CRC(65d11685) SHA1(4e4b0b60ca4c16e26d842e142002887456d98ea4) )
2828    ROM_LOAD( "sg-01-7f",    0x1800, 0x0800, CRC(44fe71a2) SHA1(ff4442a5601ac2ed63c57e22977299b5b5499c93) )
28292829
2830   ROM_REGION( 0x0600, "proms", 0 )
2831   ROM_LOAD( "sg-01-2e",    0x0000, 0x0200, CRC(34fb23ea) SHA1(6bd6de791c9e0a5f9c833c287663e9755e01c573) )
2832   ROM_LOAD( "sg-01-2f",    0x0100, 0x0200, CRC(c29b880a) SHA1(950017a0298f91e41db9865ed8ce388f4095f6cf) )
2833   ROM_LOAD( "sg-01-2n",    0x0200, 0x0200, CRC(e08ed788) SHA1(6982f6bcc70dbf4c75ff538a5df70da11bc89bb4) )
2830    ROM_REGION( 0x0600, "proms", 0 )
2831    ROM_LOAD( "sg-01-2e",    0x0000, 0x0200, CRC(34fb23ea) SHA1(6bd6de791c9e0a5f9c833c287663e9755e01c573) )
2832    ROM_LOAD( "sg-01-2f",    0x0100, 0x0200, CRC(c29b880a) SHA1(950017a0298f91e41db9865ed8ce388f4095f6cf) )
2833    ROM_LOAD( "sg-01-2n",    0x0200, 0x0200, CRC(e08ed788) SHA1(6982f6bcc70dbf4c75ff538a5df70da11bc89bb4) )
28342834
2835   ROM_REGION( 0x0200, "user1", 0 )
2836   ROM_LOAD( "82s147.prm",  0x0000, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) )   /* no dump - taken from hunchbkd */
2835    ROM_REGION( 0x0200, "user1", 0 )
2836    ROM_LOAD( "82s147.prm",  0x0000, 0x0200, BAD_DUMP CRC(46e5bc92) SHA1(f4171f8650818c017d58ad7131a7aff100b1b99c) )    /* no dump - taken from hunchbkd */
28372837ROM_END
28382838
28392839/*************************************
r5046r5047
28442844
28452845static void drakton_decrypt_rom(running_machine *machine, UINT8 mod, int offs, int *bs)
28462846{
2847   UINT8 oldbyte,newbyte;
2848   UINT8 *ROM;
2849   int mem;
2847    UINT8 oldbyte,newbyte;
2848    UINT8 *ROM;
2849    int mem;
28502850
2851   ROM = memory_region(machine, "maincpu");
2851    ROM = memory_region(machine, "maincpu");
28522852
2853   for (mem=0;mem<0x4000;mem++)
2854   {
2855      oldbyte = ROM[mem];
2853    for (mem=0;mem<0x4000;mem++)
2854    {
2855        oldbyte = ROM[mem];
28562856
2857      /*  Note: D2 is inverted and connected to D1, D5 is inverted and
2857        /*  Note: D2 is inverted and connected to D1, D5 is inverted and
28582858            connected to D0.  The other six data bits are converted by a
28592859            PAL10H8 driven by the counter. */
28602860
2861      newbyte = (oldbyte & mod) | (~oldbyte & ~mod);
2862      newbyte = BITSWAP8(newbyte, bs[0], bs[1], bs[2], bs[3], bs[4], bs[5], bs[6], bs[7]);
2861        newbyte = (oldbyte & mod) | (~oldbyte & ~mod);
2862        newbyte = BITSWAP8(newbyte, bs[0], bs[1], bs[2], bs[3], bs[4], bs[5], bs[6], bs[7]);
28632863
2864      ROM[mem + offs] = newbyte;
2865   }
2864        ROM[mem + offs] = newbyte;
2865    }
28662866}
28672867
28682868/*************************************
r5046r5047
28732873
28742874static DRIVER_INIT( herodk )
28752875{
2876   int A;
2877   UINT8 *rom = memory_region(machine, "maincpu");
2876    int A;
2877    UINT8 *rom = memory_region(machine, "maincpu");
28782878
2879   /* swap data lines D3 and D4 */
2880   for (A = 0;A < 0x8000;A++)
2881   {
2882      if ((A & 0x1000) == 0)
2883      {
2884         int v;
2879    /* swap data lines D3 and D4 */
2880    for (A = 0;A < 0x8000;A++)
2881    {
2882        if ((A & 0x1000) == 0)
2883        {
2884            int v;
28852885
2886         v = rom[A];
2887         rom[A] = (v & 0xe7) | ((v & 0x10) >> 1) | ((v & 0x08) << 1);
2888      }
2889   }
2886            v = rom[A];
2887            rom[A] = (v & 0xe7) | ((v & 0x10) >> 1) | ((v & 0x08) << 1);
2888        }
2889    }
28902890}
28912891
28922892
28932893static DRIVER_INIT( drakton )
28942894{
2895   int bs[4][8] = {
2896         {7,6,1,3,0,4,2,5},
2897         {7,1,4,3,0,6,2,5},
2898         {7,6,1,0,3,4,2,5},
2899         {7,1,4,0,3,6,2,5},
2900   };
2895    int bs[4][8] = {
2896            {7,6,1,3,0,4,2,5},
2897            {7,1,4,3,0,6,2,5},
2898            {7,6,1,0,3,4,2,5},
2899            {7,1,4,0,3,6,2,5},
2900    };
29012901
2902   memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x0000, 0x3fff, 0, 0, (read8_space_func)SMH_BANK(1) );
2902    memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x0000, 0x3fff, 0, 0, (read8_space_func)SMH_BANK(1) );
29032903
2904   /* While the PAL supports up to 16 decryption methods, only four
2904    /* While the PAL supports up to 16 decryption methods, only four
29052905        are actually used in the PAL.  Therefore, we'll take a little
29062906        memory overhead and decrypt the ROMs using each method in advance. */
29072907
2908   drakton_decrypt_rom(machine, 0x02, 0x10000, bs[0]);
2909   drakton_decrypt_rom(machine, 0x40, 0x14000, bs[1]);
2910   drakton_decrypt_rom(machine, 0x8a, 0x18000, bs[2]);
2911   drakton_decrypt_rom(machine, 0xc8, 0x1c000, bs[3]);
2908    drakton_decrypt_rom(machine, 0x02, 0x10000, bs[0]);
2909    drakton_decrypt_rom(machine, 0x40, 0x14000, bs[1]);
2910    drakton_decrypt_rom(machine, 0x8a, 0x18000, bs[2]);
2911    drakton_decrypt_rom(machine, 0xc8, 0x1c000, bs[3]);
29122912}
29132913
29142914
29152915static DRIVER_INIT( strtheat )
29162916{
2917   int bs[4][8] = {
2918         {0,6,1,7,3,4,2,5},
2919         {0,6,4,1,3,7,2,5},
2920         {6,3,1,7,0,4,2,5},
2921         {6,3,4,1,0,7,2,5},
2922   };
2917    int bs[4][8] = {
2918            {0,6,1,7,3,4,2,5},
2919            {0,6,4,1,3,7,2,5},
2920            {6,3,1,7,0,4,2,5},
2921            {6,3,4,1,0,7,2,5},
2922    };
29232923
2924   memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x0000, 0x3fff, 0, 0, (read8_space_func)SMH_BANK(1) );
2924    memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x0000, 0x3fff, 0, 0, (read8_space_func)SMH_BANK(1) );
29252925
2926   /* While the PAL supports up to 16 decryption methods, only four
2926    /* While the PAL supports up to 16 decryption methods, only four
29272927        are actually used in the PAL.  Therefore, we'll take a little
29282928        memory overhead and decrypt the ROMs using each method in advance. */
2929   drakton_decrypt_rom(machine, 0x03, 0x10000, bs[0]);
2930   drakton_decrypt_rom(machine, 0x81, 0x14000, bs[1]);
2931   drakton_decrypt_rom(machine, 0x0a, 0x18000, bs[2]);
2932   drakton_decrypt_rom(machine, 0x88, 0x1c000, bs[3]);
2929    drakton_decrypt_rom(machine, 0x03, 0x10000, bs[0]);
2930    drakton_decrypt_rom(machine, 0x81, 0x14000, bs[1]);
2931    drakton_decrypt_rom(machine, 0x0a, 0x18000, bs[2]);
2932    drakton_decrypt_rom(machine, 0x88, 0x1c000, bs[3]);
29332933
2934   /* custom handlers supporting Joystick or Steering Wheel */
2935   memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x7c00, 0x7c00, 0, 0, strtheat_inputport_0_r);
2936   memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x7c80, 0x7c80, 0, 0, strtheat_inputport_1_r);
2934    /* custom handlers supporting Joystick or Steering Wheel */
2935    memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x7c00, 0x7c00, 0, 0, strtheat_inputport_0_r);
2936    memory_install_read8_handler(cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x7c80, 0x7c80, 0, 0, strtheat_inputport_1_r);
29372937}
29382938
29392939/*************************************
r5046r5047
29612961
29622962GAME( 1983, dkong3,   0,        dkong3,   dkong3,         0,  ROT90, "Nintendo of America", "Donkey Kong 3 (US)", GAME_SUPPORTS_SAVE )
29632963GAME( 1983, dkong3j,  dkong3,   dkong3,   dkong3,         0,  ROT90, "Nintendo", "Donkey Kong 3 (Japan)", GAME_SUPPORTS_SAVE )
2964GAME( 1984, dkong3b,  dkong3,   dkong3b,  dkong3b,        0,  ROT90, "bootleg", "Donkey Kong 3 (bootleg on Donkey Kong Jr. hardware)", GAME_SUPPORTS_SAVE )
2964GAME( 1984, dkong3b,  dkong3,   dkong3b,  dkong3b,        0,  ROT90, "bootleg", "Donkey Kong 3 (bootleg on Donkey Kong Jr. hardware)", GAME_SUPPORTS_SAVE )
29652965
2966GAME( 1983, pestplce, mario,   pestplce, pestplce,       0,  ROT180, "bootleg", "Pest Place", GAME_WRONG_COLORS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
2966GAME( 1983, pestplce, mario,    pestplce, pestplce,       0,  ROT180, "bootleg", "Pest Place", GAME_WRONG_COLORS | GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
29672967
29682968/* 2650 based */
29692969GAME( 1984, herbiedk, huncholy, s2650,    herbiedk,       0,  ROT90, "CVS", "Herbie at the Olympics (DK conversion)", GAME_SUPPORTS_SAVE )
r5046r5047
29712971GAME( 1984, sbdk,     superbik, s2650,    sbdk,           0,  ROT90, "Century Electronics", "Super Bike (DK conversion)", GAME_SUPPORTS_SAVE )
29722972GAME( 1984, herodk,   hero,     s2650,    herodk,    herodk,  ROT90, "Seatongrove Ltd (Crown license)", "Hero in the Castle of Doom (DK conversion)", GAME_SUPPORTS_SAVE )
29732973GAME( 1984, herodku,  hero,     s2650,    herodk,         0,  ROT90, "Seatongrove Ltd (Crown license)", "Hero in the Castle of Doom (DK conversion not encrypted)", GAME_SUPPORTS_SAVE )
2974GAME( 1984, 8ballact, 0,       s2650,    8ballact,       0,  ROT90, "Seatongrove Ltd (Magic Eletronics USA licence)", "Eight Ball Action (DK conversion)", GAME_SUPPORTS_SAVE )
2975GAME( 1984, 8ballat2, 8ballact,   s2650,    8ballact,       0,  ROT90, "Seatongrove Ltd (Magic Eletronics USA licence)", "Eight Ball Action (DKJr conversion)", GAME_SUPPORTS_SAVE )
2976GAME( 1984, shootgal, 0,      s2650,    shootgal,       0,  ROT180, "Seatongrove Ltd (Zaccaria licence)", "Shooting Gallery", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
2977GAME( 1985, spclforc, 0,      spclforc, spclforc,       0,  ROT90, "Senko Industries (Magic Eletronics Inc. licence)", "Special Forces", GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
2978GAME( 1985, spcfrcii, 0,      spclforc, spclforc,       0,  ROT90, "Senko Industries (Magic Eletronics Inc. licence)", "Special Forces II", GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
2974GAME( 1984, 8ballact, 0,        s2650,    8ballact,       0,  ROT90, "Seatongrove Ltd (Magic Eletronics USA licence)", "Eight Ball Action (DK conversion)", GAME_SUPPORTS_SAVE )
2975GAME( 1984, 8ballat2, 8ballact, s2650,    8ballact,       0,  ROT90, "Seatongrove Ltd (Magic Eletronics USA licence)", "Eight Ball Action (DKJr conversion)", GAME_SUPPORTS_SAVE )
2976GAME( 1984, shootgal, 0,        s2650,    shootgal,       0,  ROT180, "Seatongrove Ltd (Zaccaria licence)", "Shooting Gallery", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )
2977GAME( 1985, spclforc, 0,        spclforc, spclforc,       0,  ROT90, "Senko Industries (Magic Eletronics Inc. licence)", "Special Forces", GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
2978GAME( 1985, spcfrcii, 0,        spclforc, spclforc,       0,  ROT90, "Senko Industries (Magic Eletronics Inc. licence)", "Special Forces II", GAME_NO_SOUND | GAME_SUPPORTS_SAVE )
29792979
29802980/* EPOS */
29812981GAME( 1984, drakton,  0,        drakton,  drakton,  drakton,  ROT90, "Epos Corporation", "Drakton (DK conversion)", GAME_SUPPORTS_SAVE )
src/mame/drivers/kaneko16.c
r5046r5047
19741974   {
19751975      case 2:  cpu_set_input_line(device, 2, HOLD_LINE); break;
19761976      case 1:  cpu_set_input_line(device, 3, HOLD_LINE); break;
1977//      case 0:  cpu_set_input_line(device, 4, HOLD_LINE); break;
1977      case 0:  cpu_set_input_line(device, 4, HOLD_LINE); break;
19781978   }
19791979}
19801980
r5046r5047
32553255   ROM_LOAD( "fb003.u45",   0x080000, 0x080000, CRC(405722e9) SHA1(92e51093d50f74f650ba137f5fc2910e0f85337e) )   // 2 x $40000
32563256ROM_END
32573257
3258static DRIVER_INIT( shogwarr )
3259{
3260   DRIVER_INIT_CALL(kaneko16);
3261
3262/*
3263    ROM test at 2237e:
3264
3265    the chksum of 00000-03fffd = $657f is added to ($200042).w
3266    [from shared ram]. The result must be $f463 [=($3fffe).w]
3267
3268    Now, $f463-$657f = $8ee4 = byte sum of FB040A.U33 !!
3269
3270    So, there's probably the MCU's code in there, though
3271    I can't id what kind of CPU should run it :-(  MCU is a 78K series III type CPU
3272*/
3273}
3274
32753258/***************************************************************************
32763259
32773260                                Fujiyama Buster
r5046r5047
36163599   DRIVER_INIT_CALL(decrypt_toybox_rom_alt);
36173600}
36183601
3602// protection information for brapboys / shogwarr
3603//
3604// this is just an analysis of the MCU Data rom, in reality it probably processes this when requested, not pre-decrypts
3605//
3606
3607/*
3608
3609esentially the data rom is a linked list of encrypted blocks
3610
3611contains the following
3612ROM ADDRESS 0x0000 = the number of tables in this rom
3613
3614followed by several tables in the following format
3615
3616OFFSET 0 - the location of a word which specifies the size of the block
3617         - this is usually '3', but if it's larger than 3 it enables an 'inline encryption' mode, whereby the decryption table is stored in the
3618         - right before the length register
3619
3620OFFSET 1 - a 'mode' register of some sort, usually 0,1,2 or 3 for used data, shogun also called a 'blank' command (length 0) with mode 8
3621
3622OFFSET 2 - unknown, might be some kind of 'step' register
3623
3624OFFSET 3 - decryption key - specifies which decryption table to use (ignored for inline tables, see offset 0)
3625
3626(inline decryption table goes here if specified)
3627
3628OFFSET 4-5 (or after the inline decryption table) - the length of the current block (so that the start of the next block can be found)
3629
3630OFFSET 6-size - data for thie block
3631
3632this continues for the number of blocks specified
3633after all the blocks there is a 0x1000 block of data which is the same between games
3634
3635where games specify the same decryption key the table used is the same, I don't know where these tables come from.
3636
3637*/
3638
3639UINT16 calc3_mcu_crc;
3640
3641DRIVER_INIT( calc3 )
3642{
3643   UINT8* rom = memory_region(machine,"cpu1");
3644
3645   int x;
3646   int offset = 0;
3647   UINT8 numregions;
3648
3649   calc3_mcu_crc = 0;
3650   for (x=0;x<0x20000;x++)
3651   {
3652      calc3_mcu_crc+=rom[x];
3653   }
3654   printf("crc %04x\n",calc3_mcu_crc);
3655
3656   numregions = rom[offset+0];
3657   rom++;
3658
3659
3660
3661
3662
3663   for (x=0;x<numregions;x++)
3664   {
3665      int length;
3666      int startoffset = offset;
3667      int xx;
3668      int blocksize_offset = rom[offset+0]; // location of the 'block length'
3669      int decryption_key_byte = rom[offset+3];
3670      int inline_table_base = 0;
3671      int inline_table_size = 0;
3672      UINT8 mode = rom[offset+1];
3673      UINT8 unknown = rom[offset+2];
3674
3675
3676      printf("%04x keydat %02x - bsofs:%02x m:%02x u:%02x k:%02x | ", startoffset, x, blocksize_offset,mode,unknown,decryption_key_byte);
3677
3678      // if blocksize_offset > 3, it seems to specify the decryption table (or _a_ decryption table) inline of specified length, which loops over the data
3679      if (blocksize_offset>3)
3680      {
3681         inline_table_base = offset+4;
3682         inline_table_size = blocksize_offset-3;
3683         for (xx=0;xx<blocksize_offset-3;xx++)
3684         {
3685            printf("%02x ", rom[inline_table_base+xx]);
3686         }
3687      }
3688
3689
3690      offset+= blocksize_offset+1;
3691      length = rom[offset+0] | (rom[offset+1]<<8);
3692
3693      printf("(length %04x)", length);
3694
3695      printf("\n");
3696
3697      offset+=2;
3698
3699      //if (x==0x2d)
3700      {
3701         if (length != 0)
3702         {
3703
3704            if (blocksize_offset==3)
3705            {
3706
3707               // these tables are guessed, where do they come from? internal mcu rom? 0x1000 block at the end? are they related?
3708               UINT8* table = 0;
3709
3710               /* ok */
3711               UINT8 table01[64] = {
3712                  0xce,0xab,0xa1,0xaa,0x20,0x20,0xcb,0x57,0x5b,0x65,0xd6,0x65,0x5e,0x92,0x6c,0x0a,
3713                  0xf8,0xea,0xb6,0xfd,0x76,0x35,0x47,0xaf,0xed,0xe0,0xcc,0x4d,0x4c,0xd6,0x74,0x78,
3714                  0x20,0x1c,0x1f,0xc1,0x25,0x2e,0x49,0xe7,0x90,0x1b,0xb4,0xcf,0x1e,0x61,0xd7,0x46,
3715                  0xda,0x89,0x08,0x77,0xb1,0x81,0x6b,0x2d,0xb6,0xbc,0x99,0xc9,0x35,0x0a,0x0f,0x01
3716               };
3717
3718
3719
3720               /* ok */
3721               UINT8 table15[64] = {
3722                  0x0C,0xEB,0x30,0x25,0xA8,0xED,0xE3,0x23,0xAC,0x2B,0x8D,0x34,0x88,0x9F,0x55,0xB5,
3723                  0xBF,0x15,0xE3,0x7C,0x54,0xD4,0x72,0xA9,0x7E,0x80,0x27,0x9F,0xA3,0x3F,0xA1,0x4D,
3724                  0x84,0x1B,0xD1,0xB2,0xB5,0xA7,0x0C,0xA0,0x51,0xE6,0x5E,0xC0,0xEB,0x68,0x22,0xD6,
3725                  0xC8,0xB6,0xCF,0x46,0x4B,0xF0,0x15,0xD7,0xB0,0xB5,0x29,0xB8,0xFD,0x43,0x5C,0xC0
3726               };
3727
3728
3729               /* used by shogun & brapboys */
3730               unsigned char table31[64] = {
3731                        // x     x     x    ok     x     x     x    ok     x     x     x    ok     x     x     x    ok
3732                  0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0xaf, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x00, 0x00, 0x3b,
3733                  0x00, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0xb1, 0x00, 0x00, 0x00, 0xdc,
3734                  0x00, 0x00, 0x00, 0xb5, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00, 0xde,
3735                  0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0xb1
3736               };
3737
3738               /* not ok */
3739               unsigned char table3f[64] = {
3740                  0x29,0x34,0xD9,0x20,0x61,0x54,0x5F,0x6C,0x21,0x7E,0x5A,0x0F,0xD0,0x35,0x3B,0x2E,
3741                  0x44,0x4C,0x71,0xE5,0x53,0x93,0x59,0x1A,0x1A,0xB5,0xE7,0x7A,0x0F,0x61,0x13,0xBD,
3742                  0xC7,0xA8,0x05,0x2A,0x86,0xA7,0x00,0x5A,0x8B,0x65,0x10,0xBE,0x18,0xFE,0x71,0xE3,
3743                  0x43,0x02,0xC3,0xF5,0x7E,0x18,0xF1,0x82,0xE7,0xE7,0xDC,0x01,0x4F,0x36,0xCA,0x13
3744                  };
3745
3746
3747
3748               unsigned char tableb0[64] = {
3749                        // x     x     x    ok     x     x     x    ok     x     x     x    ok     x     x     x    ok
3750                  0x00, 0x00, 0x00, 0x5e, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x81,
3751                  0x00, 0x00, 0x00, 0x85, 0x00, 0x00, 0x00, 0x6d, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x32,
3752                  0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0xb2, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00,
3753                  0x00, 0x00, 0x00, 0xb2, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x5b
3754               };
3755
3756               unsigned char tableb7[64] = {
3757                        // x     x     x    ok     x     x     x    ok     x     x     x    ok     x     x     x    ok
3758                  0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xd7,
3759                  0x00, 0x00, 0x00, 0xe7, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x82,
3760                  0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xa2, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x26,
3761                  0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x9d, 0x00, 0x00, 0x00, 0x33
3762               };
3763
3764               unsigned char tablebb[64] = {
3765                        // x     x     x    ok     x     x     x    ok     x     x     x    ok     x     x     x    ok
3766                  0x00, 0x00, 0x00, 0x62, 0x00, 0x00, 0x00, 0x4a, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x3d,
3767                  0x00, 0x00, 0x00, 0xec, 0x00, 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x69,
3768                  0x00, 0x00, 0x00, 0xeb, 0x00, 0x00, 0x00, 0x6f, 0x00, 0x00, 0x00, 0x97, 0x00, 0x00, 0x00, 0x9e,
3769                  0x00, 0x00, 0x00, 0xe1, 0x00, 0x00, 0x00, 0x9f, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x00, 0x00, 0x4d
3770               };
3771                           /* not ok */
3772               unsigned char tablebf[64] = {
3773                  0x9B, 0x8F, 0xDC, 0xBE, 0xE1, 0xD9, 0xE1, 0x86, 0x10, 0x4E, 0xBA, 0xC4,   0x8D, 0x6E, 0xD8, 0x9B,
3774                  0x2F, 0x0F, 0xAC, 0x2C, 0xCB, 0x00, 0x92, 0x5D,   0x80, 0xED, 0x7E, 0xD9, 0xC3, 0x82, 0x69, 0x58,
3775                  0x29, 0xD3, 0x78, 0x21,   0xF7, 0xFC, 0xF1, 0xCD, 0x69, 0x04, 0xDD, 0x4D, 0xC4, 0x08, 0x7C, 0x2F,
3776                  0x1D, 0x95, 0x6C, 0x1C, 0xE7, 0x55, 0x98, 0xA6, 0x3D, 0xEE, 0xE1, 0x40,   0xF4, 0x27, 0x8E, 0x8E
3777               };
3778
3779               if (decryption_key_byte == 0x01) table = table01;
3780               if (decryption_key_byte == 0x15) table = table15;
3781               if (decryption_key_byte == 0x31) table = table31;
3782               if (decryption_key_byte == 0x3f) table = table3f;
3783               if (decryption_key_byte == 0xb0) table = tableb0;
3784               if (decryption_key_byte == 0xb7) table = tableb7;
3785               if (decryption_key_byte == 0xbb) table = tablebb;
3786               if (decryption_key_byte == 0xbf) table = tablebf;
3787
3788               if (table)
3789               {
3790                  int l;
3791                  for (l=0;l<length;l++)
3792                  {
3793                     rom[offset+l] -= table[l&0x3f];
3794                  }
3795               }
3796            }
3797            else if (blocksize_offset>3)// inline decryption table case
3798            {
3799               int l;
3800               for (l=0;l<length;l++)
3801               {
3802                  rom[offset+l] -= rom[inline_table_base + (l%inline_table_size)];
3803               }
3804            }
3805            else
3806            {
3807               printf("blocksize offset < 3??\n");
3808
3809            }
3810
3811            // dump out file
3812            {
3813               FILE *fp;
3814               char filename[256];
3815
3816               sprintf(filename,"data_%s_tableno%02x_key%02x_inlineoffset%02x_length%04x",
3817               machine->gamedrv->name,
3818               x,
3819               decryption_key_byte,
3820               blocksize_offset,
3821               length);
3822
3823
3824               fp=fopen(filename, "w+b");
3825               if (fp)
3826               {
3827                  fwrite(&rom[offset], length, 1, fp);
3828                  fclose(fp);
3829               }
3830            }
3831
3832         }
3833      }
3834
3835      offset+=length;
3836   }
3837
3838   // dump out the 0x1000 sized block at the end
3839   {
3840      FILE *fp;
3841      char filename[256];
3842
3843      sprintf(filename,"data_%s_finalblock",
3844      machine->gamedrv->name);
3845
3846      fp=fopen(filename, "w+b");
3847      if (fp)
3848      {
3849         fwrite(&rom[offset], 0x1000, 1, fp);
3850         fclose(fp);
3851      }
3852   }
3853
3854   DRIVER_INIT_CALL(kaneko16);
3855    //  MCU is a 78K series III type CPU
3856}
3857
36193858/***************************************************************************
36203859
36213860
r5046r5047
36253864***************************************************************************/
36263865
36273866/* Working games */
3628
36293867GAME( 1991, berlwall, 0,        berlwall, berlwall, berlwall,   ROT0,  "Kaneko", "The Berlin Wall", 0 )
36303868GAME( 1991, berlwalt, berlwall, berlwall, berlwalt, berlwall,   ROT0,  "Kaneko", "The Berlin Wall (bootleg ?)", 0 )
36313869GAME( 1991, mgcrystl, 0,        mgcrystl, mgcrystl, kaneko16,   ROT0,  "Kaneko", "Magical Crystals (World, 92/01/10)", 0 )
r5046r5047
36463884
36473885/* Non-working games (mainly due to protection) */
36483886
3649GAME( 1992, shogwarr, 0,        shogwarr, shogwarr, shogwarr,   ROT0,  "Kaneko", "Shogun Warriors",         GAME_NOT_WORKING )
3650GAME( 1992, shogware, shogwarr, shogwarr, shogwarr, shogwarr,   ROT0,  "Kaneko", "Shogun Warriors (Euro)",  GAME_NOT_WORKING )
3651GAME( 1992, fjbuster, shogwarr, shogwarr, shogwarr, shogwarr,   ROT0,  "Kaneko", "Fujiyama Buster (Japan)", GAME_NOT_WORKING )
3652GAME( 1992, brapboys, 0,        shogwarr, shogwarr, 0,          ROT0,  "Kaneko", "B.Rap Boys (World)",      GAME_NOT_WORKING )
3653GAME( 1992, brapboyj, brapboys, shogwarr, shogwarr, 0,          ROT0,  "Kaneko", "B.Rap Boys (Japan)",      GAME_NOT_WORKING )
3887GAME( 1992, shogwarr, 0,        shogwarr, shogwarr, calc3,   ROT0,  "Kaneko", "Shogun Warriors",         GAME_NOT_WORKING )
3888GAME( 1992, shogware, shogwarr, shogwarr, shogwarr, calc3,   ROT0,  "Kaneko", "Shogun Warriors (Euro)",  GAME_NOT_WORKING )
3889GAME( 1992, fjbuster, shogwarr, shogwarr, shogwarr, calc3,   ROT0,  "Kaneko", "Fujiyama Buster (Japan)", GAME_NOT_WORKING )
3890GAME( 1992, brapboys, 0,        shogwarr, shogwarr, calc3,          ROT0,  "Kaneko", "B.Rap Boys (World)",      GAME_NOT_WORKING )
3891GAME( 1992, brapboyj, brapboys, shogwarr, shogwarr, calc3,          ROT0,  "Kaneko", "B.Rap Boys (Japan)",      GAME_NOT_WORKING )
src/mame/drivers/system16.c
r5046r5047
9595#include "sound/upd7759.h"
9696#include "sound/2612intf.h"
9797#include "sound/rf5c68.h"
98#include "video/segaic16.h"
9899
99100/***************************************************************************/
100101
r5046r5047
491492   AM_RANGE(0x000000, 0x0bffff) AM_ROM
492493   AM_RANGE(0x100000, 0x100003) AM_WRITENOP // tilebank control?
493494   AM_RANGE(0x500000, 0x503fff) AM_RAM // work ram
494   AM_RANGE(0x600000, 0x600fff) AM_RAM AM_BASE(&sys16_spriteram)
495   AM_RANGE(0x600000, 0x600fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
495496   AM_RANGE(0x700000, 0x70ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram)
496497   AM_RANGE(0x710000, 0x710fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram)
497   AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE( sys16_paletteram_w )  AM_BASE(&paletteram16)
498   AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE( segaic16_paletteram_w )  AM_BASE(&paletteram16)
498499   AM_RANGE(0x900000, 0x900001) AM_WRITE(sys16_coinctrl_w)
499500   AM_RANGE(0x901002, 0x901003) AM_READ_PORT("P1")
500501   AM_RANGE(0x901006, 0x901007) AM_READ_PORT("P2")
r5046r5047
596597
597598static MACHINE_RESET( eswatbl )
598599{
599   static const int bank[16] = {
600      0,1,   4,5,
601      8,9,   12,13,
602      2,3,   6,7,
603      10,11,   14,15
604   };
605600
606
607   sys16_obj_bank = bank;
608   sys16_sprxoffset = -0x23c;
609601}
610602
611603
r5046r5047
826818   AM_RANGE(0x118018, 0x118019) AM_WRITE(sys16bootleg_bgscrollx_w)
827819   AM_RANGE(0x118020, 0x118021) AM_WRITE(sys16bootleg_fgpage_w)
828820   AM_RANGE(0x118028, 0x118029) AM_WRITE(sys16bootleg_bgpage_w)
829   AM_RANGE(0x140000, 0x143fff) AM_RAM_WRITE( sys16_paletteram_w )  AM_BASE(&paletteram16)
830   AM_RANGE(0x200000, 0x200fff) AM_RAM AM_BASE(&sys16_spriteram)
821   AM_RANGE(0x140000, 0x143fff) AM_RAM_WRITE( segaic16_paletteram_w )  AM_BASE(&paletteram16)
822   AM_RANGE(0x200000, 0x200fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
831823   AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w)
832824   AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1")
833825   AM_RANGE(0xc41006, 0xc41007) AM_READ_PORT("P2")
r5046r5047
844836static ADDRESS_MAP_START( bayroute_b1_map, ADDRESS_SPACE_PROGRAM, 16 )
845837   AM_RANGE(0x000000, 0x0bffff) AM_ROM
846838   AM_RANGE(0x500000, 0x503fff) AM_RAM // work ram
847   AM_RANGE(0x600000, 0x600fff) AM_RAM AM_BASE(&sys16_spriteram)
839   AM_RANGE(0x600000, 0x600fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
848840   AM_RANGE(0x700000, 0x70ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram)
849841   AM_RANGE(0x710000, 0x710fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram)
850842   AM_RANGE(0x718000, 0x718001) AM_WRITE(sys16bootleg_fgscrolly_w)
r5046r5047
853845   AM_RANGE(0x718018, 0x718019) AM_WRITE(sys16bootleg_bgscrollx_w)
854846   AM_RANGE(0x718020, 0x718021) AM_WRITE(sys16bootleg_fgpage_w)
855847   AM_RANGE(0x718028, 0x718029) AM_WRITE(sys16bootleg_bgpage_w)
856   AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE( sys16_paletteram_w )  AM_BASE(&paletteram16)
848   AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE( segaic16_paletteram_w )  AM_BASE(&paletteram16)
857849   AM_RANGE(0x901000, 0x901001) AM_READ_PORT("SERVICE") AM_WRITE(sys16_coinctrl_w)
858850   AM_RANGE(0x901002, 0x901003) AM_READ_PORT("P1")
859851   AM_RANGE(0x901006, 0x901007) AM_READ_PORT("P2")
r5046r5047
911903static ADDRESS_MAP_START( bayroute_b2_map, ADDRESS_SPACE_PROGRAM, 16 )
912904   AM_RANGE(0x000000, 0x0bffff) AM_ROM
913905   AM_RANGE(0x500000, 0x503fff) AM_RAM // work ram
914   AM_RANGE(0x600000, 0x600fff) AM_RAM AM_BASE(&sys16_spriteram)
906   AM_RANGE(0x600000, 0x600fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
915907   AM_RANGE(0x700000, 0x70ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram)
916908   AM_RANGE(0x710000, 0x710fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram)
917909   AM_RANGE(0x718000, 0x718001) AM_WRITE(sys16bootleg_fgscrolly_w)
r5046r5047
923915   AM_RANGE(0x718024, 0x718025) AM_WRITE(datsu_page2_w)
924916   AM_RANGE(0x718026, 0x718027) AM_WRITE(datsu_page3_w)
925917
926   AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE( sys16_paletteram_w )  AM_BASE(&paletteram16)
918   AM_RANGE(0x800000, 0x800fff) AM_RAM_WRITE( segaic16_paletteram_w )  AM_BASE(&paletteram16)
927919   AM_RANGE(0x900000, 0x900001) AM_READ_PORT("DSW1")
928920   AM_RANGE(0x900002, 0x900003) AM_READ_PORT("DSW2")
929921   AM_RANGE(0x901000, 0x901001) AM_READ_PORT("SERVICE") AM_WRITE(sys16_coinctrl_w)
r5046r5047
936928   AM_RANGE(0x3f0000, 0x3fffff) AM_WRITE(sys16_tilebank_w)
937929   AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram)
938930   AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram)
939   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&sys16_spriteram)
940   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( sys16_paletteram_w )  AM_BASE(&paletteram16)
931   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
932   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w )  AM_BASE(&paletteram16)
941933   AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w)
942934   AM_RANGE(0xc40006, 0xc40007) AM_WRITE(sound_command_w)
943935   AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1")
r5046r5047
10261018   AM_RANGE(0x000000, 0x0bffff) AM_ROM
10271019   AM_RANGE(0x100000, 0x10ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram)
10281020   AM_RANGE(0x110000, 0x110fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram)
1029   AM_RANGE(0x140000, 0x143fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
1030   AM_RANGE(0x200000, 0x200fff) AM_RAM AM_BASE(&sys16_spriteram)
1021   AM_RANGE(0x140000, 0x143fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
1022   AM_RANGE(0x200000, 0x200fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
10311023   AM_RANGE(0xc40000, 0xc40001) AM_READ_PORT("DSW2") AM_WRITE(SMH_NOP)
10321024   AM_RANGE(0xc40002, 0xc40003) AM_READ_PORT("DSW1")
10331025   AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE")
r5046r5047
11671159
11681160   AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram)
11691161   AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram)
1170   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&sys16_spriteram)
1162   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
11711163
11721164   AM_RANGE(0x600006, 0x600007) AM_WRITE(sound_command_w)
11731165   AM_RANGE(0x601000, 0x601001) AM_READ_PORT("SERVICE")
r5046r5047
11761168   AM_RANGE(0x600000, 0x600001) AM_READ_PORT("DSW2")
11771169   AM_RANGE(0x600002, 0x600003) AM_READ_PORT("DSW1")
11781170
1179   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( sys16_paletteram_w )  AM_BASE(&paletteram16)
1171   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w )  AM_BASE(&paletteram16)
11801172   AM_RANGE(0x843000, 0x843001) AM_WRITENOP
11811173
11821174   AM_RANGE(0xC46000, 0xC46001) AM_WRITE(sys16bootleg_fgscrolly_w)
r5046r5047
12341226   AM_RANGE(0x418020, 0x418021) AM_WRITE(sys16bootleg_bgpage_w)
12351227   AM_RANGE(0x418028, 0x418029) AM_WRITE(sys16bootleg_fgpage_w)
12361228
1237   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&sys16_spriteram)
1238   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( sys16_paletteram_w )  AM_BASE(&paletteram16)
1229   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
1230   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w )  AM_BASE(&paletteram16)
12391231   AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w)
12401232   AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1")
12411233   AM_RANGE(0xc41006, 0xc41007) AM_READ_PORT("P2")
r5046r5047
12731265   AM_RANGE(0x40a000, 0x40afff) AM_RAM AM_BASE(&system16a_bootleg_bg1_tileram)
12741266   AM_RANGE(0x410000, 0x410fff) AM_RAM AM_BASE(&sys16_textram)
12751267
1276   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&sys16_spriteram)
1277   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
1268   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
1269   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
12781270   AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w)
12791271   AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1")
12801272   AM_RANGE(0xc41004, 0xc41005) AM_READ_PORT("P2")
r5046r5047
13521344   AM_RANGE(0x409000, 0x40afff) AM_RAM AM_BASE(&system16a_bootleg_bg0_tileram)
13531345   AM_RANGE(0x40a000, 0x40bfff) AM_RAM AM_BASE(&system16a_bootleg_bg1_tileram)
13541346   AM_RANGE(0x410000, 0x410fff) AM_RAM AM_BASE(&sys16_textram)
1355   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&sys16_spriteram)
1356   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( sys16_paletteram_w )  AM_BASE(&paletteram16)
1347   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
1348   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w )  AM_BASE(&paletteram16)
13571349   AM_RANGE(0xc41000, 0xc41001) AM_READ(passht4b_service_r)
13581350   AM_RANGE(0xc41002, 0xc41003) AM_READ(passht4b_io1_r)
13591351   AM_RANGE(0xc41004, 0xc41005) AM_READ(passht4b_io2_r)
r5046r5047
14911483   MDRV_CPU_MODIFY("maincpu")
14921484   MDRV_CPU_PROGRAM_MAP(system16a_bootleg_passsht_map)
14931485
1494   MDRV_VIDEO_START( system16a_bootleg )
1486   MDRV_VIDEO_START( system16a_bootleg_passsht )
14951487   MDRV_VIDEO_UPDATE( system16a_bootleg )
14961488
14971489   MDRV_MACHINE_RESET(passsht)
r5046r5047
15051497   MDRV_CPU_MODIFY("maincpu")
15061498   MDRV_CPU_PROGRAM_MAP(system16a_bootleg_passht4b_map)
15071499
1508   MDRV_VIDEO_START( system16a_bootleg )
1500   MDRV_VIDEO_START( system16a_bootleg_passsht )
15091501   MDRV_VIDEO_UPDATE( system16a_bootleg_passht4b )
15101502
15111503   MDRV_MACHINE_RESET(passht4b)
r5046r5047
15491541   AM_RANGE(0x410000, 0x410fff) AM_RAM AM_BASE(&sys16_textram)
15501542   AM_RANGE(0x411000, 0x411fff) AM_RAM AM_BASE(&system16a_bootleg_bg0_tileram)
15511543   AM_RANGE(0x412000, 0x412fff) AM_RAM AM_BASE(&system16a_bootleg_bg1_tileram)
1552   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&sys16_spriteram)
1553   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( sys16_paletteram_w )  AM_BASE(&paletteram16)
1544   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
1545   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w )  AM_BASE(&paletteram16)
15541546   AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sound_command_nmi_w)
15551547   AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE")
15561548   AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1")
r5046r5047
15711563/***************************************************************************/
15721564
15731565
1574
1575static MACHINE_RESET( shinobl )
1576{
1577   static const int bank[16] = {
1578      0,2,4,6,
1579      1,3,5,7
1580   };
1581   sys16_obj_bank = bank;
1582   sys16_spritesystem = sys16_sprite_quartet2;
1583   sys16_sprxoffset = -0xbc;
1584   sys16_fgxoffset = sys16_bgxoffset = 7;
1585   sys16_tilebank_switch=0x2000;
1586}
1587
15881566static DRIVER_INIT( shinobl )
15891567{
1590   shinobl_kludge = 1;
15911568   MACHINE_RESET_CALL(sys16_onetime);
15921569}
15931570
r5046r5047
16001577   MDRV_CPU_MODIFY("maincpu")
16011578   MDRV_CPU_PROGRAM_MAP(system16a_bootleg_shinobi_map)
16021579
1603   MDRV_VIDEO_START( system16a_bootleg )
1580   MDRV_VIDEO_START( system16a_bootleg_shinobi )
16041581   MDRV_VIDEO_UPDATE( system16a_bootleg )
1605
1606   MDRV_MACHINE_RESET(shinobl)
16071582MACHINE_DRIVER_END
16081583
16091584/***************************************************************************/
r5046r5047
16211596   AM_RANGE(0x418020, 0x418021) AM_WRITE(sys16bootleg_fgpage_w)
16221597   AM_RANGE(0x418028, 0x418029) AM_WRITE(sys16bootleg_bgpage_w)
16231598
1624   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&sys16_spriteram)
1625   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( sys16_paletteram_w )  AM_BASE(&paletteram16)
1599   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
1600   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w )  AM_BASE(&paletteram16)
16261601   AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w)
16271602   AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE")
16281603   AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1")
r5046r5047
16611636   AM_RANGE(0x418020, 0x418021) AM_WRITE(sys16bootleg_bgpage_w)
16621637   AM_RANGE(0x418028, 0x418029) AM_WRITE(sys16bootleg_fgpage_w)
16631638
1664   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&sys16_spriteram)
1665   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( sys16_paletteram_w )  AM_BASE(&paletteram16)
1639   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
1640   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w )  AM_BASE(&paletteram16)
16661641
16671642   AM_RANGE(0xC41000, 0xC41001) AM_READ(beautyb_unkx_r )
16681643   AM_RANGE(0xC41002, 0xC41003) AM_READ(beautyb_unkx_r )
r5046r5047
16751650
16761651/***************************************************************************/
16771652
1678static MACHINE_RESET( tetrisbl )
1679{
1680   sys16_sprxoffset = -0x40;
1681}
16821653
16831654static DRIVER_INIT( tetrisbl )
16841655{
r5046r5047
17181689   MDRV_IMPORT_FROM(system16)
17191690   MDRV_CPU_MODIFY("maincpu")
17201691   MDRV_CPU_PROGRAM_MAP(tetrisbl_map)
1721
1722   MDRV_MACHINE_RESET(tetrisbl)
17231692MACHINE_DRIVER_END
17241693
17251694static MACHINE_DRIVER_START( beautyb )
r5046r5047
17281697   MDRV_IMPORT_FROM(system16)
17291698   MDRV_CPU_MODIFY("maincpu")
17301699   MDRV_CPU_PROGRAM_MAP(beautyb_map)
1731
1732   MDRV_MACHINE_RESET(tetrisbl)
17331700MACHINE_DRIVER_END
17341701
17351702/***************************************************************************/
r5046r5047
17671734static ADDRESS_MAP_START( tturfbl_map, ADDRESS_SPACE_PROGRAM, 16 )
17681735   AM_RANGE(0x000000, 0x03ffff) AM_ROM
17691736   AM_RANGE(0x200000, 0x203fff) AM_RAM // work ram
1770   AM_RANGE(0x300000, 0x300fff) AM_RAM AM_BASE(&sys16_spriteram)
1737   AM_RANGE(0x300000, 0x300fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
17711738   AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram)
17721739   AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram)
1773   AM_RANGE(0x500000, 0x500fff) AM_RAM_WRITE( sys16_paletteram_w )  AM_BASE(&paletteram16)
1740   AM_RANGE(0x500000, 0x500fff) AM_RAM_WRITE( segaic16_paletteram_w )  AM_BASE(&paletteram16)
17741741   AM_RANGE(0x600000, 0x600001) AM_WRITE(sys16_coinctrl_w)
17751742   AM_RANGE(0x600000, 0x600001) AM_READ_PORT("DSW2")
17761743   AM_RANGE(0x600002, 0x600003) AM_READ_PORT("DSW1")
r5046r5047
17941761
17951762/***************************************************************************/
17961763
1797
1798static MACHINE_RESET( tturfbl )
1799{
1800   static const int bank[16] = {
1801      0,0,0,0,
1802      0,0,0,3,
1803      0,0,0,2,
1804      0,1,0,0
1805   };
1806   sys16_obj_bank = bank;
1807   sys16_sprxoffset = -0x48;
1808}
1809
18101764static DRIVER_INIT( tturfbl )
18111765{
18121766   UINT8 *mem;
r5046r5047
18351789   MDRV_SOUND_CONFIG(tturfbl_msm5205_interface)
18361790   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.80)
18371791   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.80)
1838
1839   MDRV_MACHINE_RESET(tturfbl)
18401792MACHINE_DRIVER_END
18411793
18421794
r5046r5047
18761828   AM_RANGE(0x409000, 0x40afff) AM_RAM AM_BASE(&system16a_bootleg_bg0_tileram)
18771829   AM_RANGE(0x40a000, 0x40bfff) AM_RAM AM_BASE(&system16a_bootleg_bg1_tileram)
18781830   AM_RANGE(0x410000, 0x410fff) AM_RAM AM_BASE(&sys16_textram)
1879   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&sys16_spriteram)
1880   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( sys16_paletteram_w )  AM_BASE(&paletteram16)
1831   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
1832   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w )  AM_BASE(&paletteram16)
18811833   AM_RANGE(0xc40000, 0xc40001) AM_WRITE(sys16_coinctrl_w)
18821834   AM_RANGE(0xc41000, 0xc41001) AM_READ_PORT("SERVICE")
18831835   AM_RANGE(0xc41002, 0xc41003) AM_READ_PORT("P1")
r5046r5047
18961848
18971849/***************************************************************************/
18981850
1899static MACHINE_RESET( wb3bbl )
1900{
1901   static const int bank[16] = {
1902      2,0,
1903      1,0,
1904      3,0,
1905      0,3,
1906      0,0,
1907      0,2,
1908      0,1,
1909      0,0
1910   };
1911
1912   sys16_obj_bank = bank;
1913}
1914
19151851static DRIVER_INIT( wb3bbl )
19161852{
19171853   MACHINE_RESET_CALL(sys16_onetime);
r5046r5047
19261862   MDRV_CPU_MODIFY("maincpu")
19271863   MDRV_CPU_PROGRAM_MAP(wb3bbl_map)
19281864
1929   MDRV_VIDEO_START( system16a_bootleg )
1865   MDRV_VIDEO_START( system16a_bootleg_wb3bl )
19301866   MDRV_VIDEO_UPDATE( system16a_bootleg )
1931
1932   MDRV_MACHINE_RESET(wb3bbl)
19331867MACHINE_DRIVER_END
19341868
19351869/*****************************************************************************/
r5046r5047
19461880   ROM_LOAD16_BYTE( "b6.bin", 0x0a0001, 0x10000, CRC(2bc748a6) SHA1(9ab760377fde24cecb703726ee3e59ee23d60a3a) )
19471881
19481882   // interrupt code, taken from the other bootleg set(!)
1883   // might be wrong for this, hence the broken sprites
19491884   ROM_LOAD( "protdata", 0x0bf000, 0x01000, BAD_DUMP CRC(5474fd95) SHA1(1cbd47aa8f8b9641ba81942bcaae0bc768fd33fd) )
19501885
19511886   // there clearly should be some kind of MCU on this bootleg to put the interrupt code in RAM
r5046r5047
19591894   ROM_LOAD( "bs14.bin", 0x10000, 0x10000, CRC(6bc4d0a8) SHA1(90b9a61c7a140291d72554857ce26d54ebf03fc2) )
19601895   ROM_LOAD( "bs12.bin", 0x20000, 0x10000, CRC(c1f967a6) SHA1(8eb6bbd9e17dc531830bc798b8485c8ea999e56e) )
19611896
1962   ROM_REGION( 0x80000, "gfx2", 0 ) /* sprites */
1897   ROM_REGION16_BE( 0x80000, "gfx2", 0 ) /* sprites */
19631898   ROM_LOAD16_BYTE( "br_obj0o.1b", 0x00001, 0x10000, CRC(098a5e82) SHA1(c5922f418773bc3629071e584457839d67a370e9) )
19641899   ROM_LOAD16_BYTE( "br_obj0e.5b", 0x00000, 0x10000, CRC(85238af9) SHA1(39989a8d9b60c6d55272b5e2c213341a563dd993) )
19651900   ROM_LOAD16_BYTE( "br_obj1o.2b", 0x20001, 0x10000, CRC(cc641da1) SHA1(28f8a6502702cb9e2cc7f3e98f6c5d201f462fa3) )
r5046r5047
19941929   ROM_LOAD( "bs14.bin", 0x10000, 0x10000, CRC(6bc4d0a8) SHA1(90b9a61c7a140291d72554857ce26d54ebf03fc2) )
19951930   ROM_LOAD( "bs12.bin", 0x20000, 0x10000, CRC(c1f967a6) SHA1(8eb6bbd9e17dc531830bc798b8485c8ea999e56e) )
19961931
1997   ROM_REGION( 0x080000, "gfx2", 0 ) /* sprites */
1932   #if 0 // these look bad
1933   ROM_REGION16_BE( 0x080000, "gfx2", ROMREGION_ERASEFF ) /* sprites */
19981934   ROM_LOAD16_BYTE( "br_11",       0x00001, 0x10000, CRC(65232905) SHA1(cb195a0ce8bff9d1d3e31678060b3aaccfefcd2d) )
19991935   ROM_LOAD16_BYTE( "br_obj0e.5b", 0x00000, 0x10000, CRC(85238af9) SHA1(39989a8d9b60c6d55272b5e2c213341a563dd993) )
20001936   ROM_LOAD16_BYTE( "br_obj1o.2b", 0x20001, 0x10000, CRC(cc641da1) SHA1(28f8a6502702cb9e2cc7f3e98f6c5d201f462fa3) )
r5046r5047
20031939   ROM_LOAD16_BYTE( "br_09",       0x40000, 0x10000, CRC(05e9b840) SHA1(7cc1c9ac7b85f1e1bdb68215b5e83eae3ee5ba2a) )
20041940   ROM_LOAD16_BYTE( "br_14",       0x60001, 0x10000, CRC(4c4a177b) SHA1(a9dfd7e56b0a21a0f7750d8ec4631901ad182609) )
20051941   ROM_LOAD16_BYTE( "bs7.bin",     0x60000, 0x10000, CRC(0c91abcc) SHA1(d25608f3cbacd1bd169f1a2247f007ac8bc8dda0) )
1942   #endif
20061943
1944   // use the roms from the first bootleg set
1945   ROM_REGION16_BE( 0x080000, "gfx2", ROMREGION_ERASEFF ) /* sprites */
1946   ROM_LOAD16_BYTE( "br_obj0o.1b", 0x00001, 0x10000, CRC(098a5e82) SHA1(c5922f418773bc3629071e584457839d67a370e9) )
1947   ROM_LOAD16_BYTE( "br_obj0e.5b", 0x00000, 0x10000, CRC(85238af9) SHA1(39989a8d9b60c6d55272b5e2c213341a563dd993) )
1948   ROM_LOAD16_BYTE( "br_obj1o.2b", 0x20001, 0x10000, CRC(cc641da1) SHA1(28f8a6502702cb9e2cc7f3e98f6c5d201f462fa3) )
1949   ROM_LOAD16_BYTE( "br_obj1e.6b", 0x20000, 0x10000, CRC(d3123315) SHA1(16a87caed1cabb080d4f35935910b38797344ca5) )
1950   ROM_LOAD16_BYTE( "br_obj2o.3b", 0x40001, 0x10000, CRC(84efac1f) SHA1(41c43d70dc7ae7e361d6fa12c5790ea7ebf13ca8) )
1951   ROM_LOAD16_BYTE( "br_obj2e.7b", 0x40000, 0x10000, CRC(b73b12cb) SHA1(e8265ae90aabf1ee0522dbc6541a0f82fec97c7a) )
1952   ROM_LOAD16_BYTE( "br_obj3o.4b", 0x60001, 0x10000, CRC(a2e238ac) SHA1(c854774c0ffd1ccf6e46591a8fa3c80a4630e007) )
1953   ROM_LOAD16_BYTE( "bs7.bin",     0x60000, 0x10000, CRC(0c91abcc) SHA1(d25608f3cbacd1bd169f1a2247f007ac8bc8dda0) )
1954
20071955   ROM_REGION( 0x50000, "soundcpu", 0 ) /* sound CPU */
20081956   ROM_LOAD( "br_01", 0x00000, 0x10000, CRC(b87156ec) SHA1(bdfef2ab5a4d3cac4077c92ce1ef4604b4c11cf8) )
20091957   ROM_LOAD( "br_02", 0x10000, 0x10000, CRC(ef63991b) SHA1(4221741780f88c80b3213ddca949bee7d4c1469a) )
r5046r5047
20231971   ROM_LOAD( "dduxb15.bin", 0x10000, 0x10000, CRC(ce0d2b30) SHA1(e60521c46f1650c9bdc76f2ceb91a6d61aaa0a09) )
20241972   ROM_LOAD( "dduxb16.bin", 0x20000, 0x10000, CRC(6de95434) SHA1(7bed2a0261cf6c2fbb3756633f05f0bb2173977c) )
20251973
2026   ROM_REGION( 0xa0000, "gfx2", 0 ) //* sprites */
2027   ROM_LOAD16_BYTE( "dduxb10.bin", 0x00001, 0x010000, CRC(0be3aee5) SHA1(48fc779b7398abbb82cd0d0d28705ece75b3c4e3) )
2028   ROM_RELOAD( 0x20001, 0x010000 )
1974   ROM_REGION16_BE( 0x100000, "gfx2", 0 ) //* sprites */
20291975   ROM_LOAD16_BYTE( "dduxb06.bin", 0x00000, 0x010000, CRC(b0079e99) SHA1(9bb4d3fa804a3d05a6e06b45a1280d7064e96ac6) )
2030   ROM_RELOAD( 0x20000, 0x010000 )
2031   ROM_LOAD16_BYTE( "dduxb11.bin", 0x40001, 0x010000, CRC(cfb2af18) SHA1(1ad18f933a7b797f0364d1f4a6c8549351b4c9a6) )
2032   ROM_LOAD16_BYTE( "dduxb07.bin", 0x40000, 0x010000, CRC(0217369c) SHA1(b6ec2fa1279a27a602d79e1073c54193745ea816) )
2033   ROM_LOAD16_BYTE( "dduxb12.bin", 0x60001, 0x010000, CRC(28ce9b15) SHA1(1640df9c8f21893c0647ad2f4210c714a06e6f37) )
2034   ROM_LOAD16_BYTE( "dduxb08.bin", 0x60000, 0x010000, CRC(8844f336) SHA1(18c1baaad3bcc658d4a6d03de8c97378b5284e88) )
2035   ROM_LOAD16_BYTE( "dduxb13.bin", 0x80001, 0x010000, CRC(efe57759) SHA1(69b8969b20ab9480df2735bd2bcd527069196bd7) )
2036   ROM_LOAD16_BYTE( "dduxb09.bin", 0x80000, 0x010000, CRC(6b64f665) SHA1(df07fcf2bbec6fa78f89b95272762aebd6f3ec0e) )
1976   ROM_LOAD16_BYTE( "dduxb10.bin", 0x00001, 0x010000, CRC(0be3aee5) SHA1(48fc779b7398abbb82cd0d0d28705ece75b3c4e3) )
1977   ROM_LOAD16_BYTE( "dduxb07.bin", 0x20000, 0x010000, CRC(0217369c) SHA1(b6ec2fa1279a27a602d79e1073c54193745ea816) )
1978   ROM_LOAD16_BYTE( "dduxb11.bin", 0x20001, 0x010000, CRC(cfb2af18) SHA1(1ad18f933a7b797f0364d1f4a6c8549351b4c9a6) )
1979   ROM_LOAD16_BYTE( "dduxb08.bin", 0x40000, 0x010000, CRC(8844f336) SHA1(18c1baaad3bcc658d4a6d03de8c97378b5284e88) )
1980   ROM_LOAD16_BYTE( "dduxb12.bin", 0x40001, 0x010000, CRC(28ce9b15) SHA1(1640df9c8f21893c0647ad2f4210c714a06e6f37) )
1981   ROM_LOAD16_BYTE( "dduxb09.bin", 0x60000, 0x010000, CRC(6b64f665) SHA1(df07fcf2bbec6fa78f89b95272762aebd6f3ec0e) )
1982   ROM_LOAD16_BYTE( "dduxb13.bin", 0x60001, 0x010000, CRC(efe57759) SHA1(69b8969b20ab9480df2735bd2bcd527069196bd7) )
20371983
20381984   ROM_REGION( 0x10000, "soundcpu", 0 ) /* sound CPU */
20391985   ROM_LOAD( "dduxb01.bin", 0x0000, 0x8000, CRC(0dbef0d7) SHA1(8b9afb2fcb946cec467b1e691c267194b503f841) )
r5046r5047
20542000   ROM_LOAD( "mpr12625.b12", 0x40000, 0x40000, CRC(3b8c757e) SHA1(0b66e8446d059a12e47e2a6fe8f0a333245bb95c) ) // ic20
20552001   ROM_LOAD( "mpr12626.b13", 0x80000, 0x40000, CRC(3efca25c) SHA1(0d866bf53a16b52719f73081e933f4db27d72ece) ) // ic21
20562002
2057   ROM_REGION( 0x180000, "gfx2", 0 ) /* sprites */
2058   ROM_LOAD16_BYTE( "mpr12618.b1", 0x000001, 0x40000, CRC(0d1530bf) SHA1(bb8626cd98761c1c20cee117d00315c85621ba6a) ) // ic9
2059   ROM_LOAD16_BYTE( "mpr12621.b4", 0x000000, 0x40000, CRC(18ff0799) SHA1(5417223378aef16ee2b4f438d1f8f11a23fe7265) ) // ic12
2060   ROM_LOAD16_BYTE( "mpr12619.b2", 0x080001, 0x40000, CRC(32069246) SHA1(4913009bc72bf4f8b171b14fe06457f5784cab15) ) // ic10
2061   ROM_LOAD16_BYTE( "mpr12622.b5", 0x080000, 0x40000, CRC(a3dfe436) SHA1(640ccc552114d403f35d441574d2f3e4f1d4a8f9) ) // ic13
2062   ROM_LOAD16_BYTE( "mpr12620.b3", 0x100001, 0x40000, CRC(f6b096e0) SHA1(695ad1adbdc29f4d614645867e16de038cf92709) ) // ic11
2063   ROM_LOAD16_BYTE( "mpr12623.b6", 0x100000, 0x40000, CRC(6773fef6) SHA1(91e646ea447be02254d060daf255d26afe0cc79e) ) // ic14
2003   ROM_REGION16_BE( 0x1c0000, "gfx2", 0 ) /* sprites */
2004   ROM_LOAD16_BYTE( "ic9",  0x000001, 0x20000, CRC(0d1530bf) SHA1(bb8626cd98761c1c20cee117d00315c85621ba6a) )
2005   ROM_CONTINUE(            0x100001, 0x20000 )
2006   ROM_LOAD16_BYTE( "ic12", 0x000000, 0x20000, CRC(18ff0799) SHA1(5417223378aef16ee2b4f438d1f8f11a23fe7265) )
2007   ROM_CONTINUE(            0x100000, 0x20000 )
2008   ROM_LOAD16_BYTE( "ic10", 0x040001, 0x20000, CRC(32069246) SHA1(4913009bc72bf4f8b171b14fe06457f5784cab15) )
2009   ROM_CONTINUE(            0x140001, 0x20000 )
2010   ROM_LOAD16_BYTE( "ic13", 0x040000, 0x20000, CRC(a3dfe436) SHA1(640ccc552114d403f35d441574d2f3e4f1d4a8f9) )
2011   ROM_CONTINUE(            0x140000, 0x20000 )
2012   ROM_LOAD16_BYTE( "ic11", 0x080001, 0x20000, CRC(f6b096e0) SHA1(695ad1adbdc29f4d614645867e16de038cf92709) )
2013   ROM_CONTINUE(            0x180001, 0x20000 )
2014   ROM_LOAD16_BYTE( "ic14", 0x080000, 0x20000, CRC(6773fef6) SHA1(91e646ea447be02254d060daf255d26afe0cc79e) )
2015   ROM_CONTINUE(            0x180000, 0x20000 )
20642016
20652017   ROM_REGION( 0x50000, "soundcpu", 0 ) /* sound CPU */
20662018   ROM_LOAD( "epr12617.a13",  0x00000, 0x08000, CRC(7efecf23) SHA1(2b87af7cfaab5942a3f7b38c987fcba01d3475ab) ) // ic8
r5046r5047
20782030   ROM_LOAD( "flpoint.005", 0x10000, 0x10000, CRC(82c0b8b0) SHA1(e1e2e721cb8ad53df33065582dc90edeba9c3cab) )
20792031   ROM_LOAD( "flpoint.004", 0x20000, 0x10000, CRC(522426ae) SHA1(90fd0a19b30a8a61dc4cfa66a64115596333dcc6) )
20802032
2081   ROM_REGION( 0x20000, "gfx2", 0 ) /* sprites */
2033   ROM_REGION16_BE( 0x20000, "gfx2", 0 ) /* sprites */
20822034   ROM_LOAD16_BYTE( "12596.bin", 0x00001, 0x010000, CRC(4a4041f3) SHA1(4c52b30223d8aa80ccdbb196098cb17e64ad6583) )
20832035   ROM_LOAD16_BYTE( "12597.bin", 0x00000, 0x010000, CRC(6961e676) SHA1(7639d2da086b57a9a8d6100fdacf40d97d7c4772) )
20842036
r5046r5047
20962048   ROM_LOAD( "flpoint.005", 0x10000, 0x10000, CRC(82c0b8b0) SHA1(e1e2e721cb8ad53df33065582dc90edeba9c3cab) )
20972049   ROM_LOAD( "flpoint.004", 0x20000, 0x10000, CRC(522426ae) SHA1(90fd0a19b30a8a61dc4cfa66a64115596333dcc6) )
20982050
2099   ROM_REGION( 0x20000, "gfx2", 0 ) /* sprites */
2051   ROM_REGION16_BE( 0x20000, "gfx2", 0 ) /* sprites */
21002052   ROM_LOAD16_BYTE( "12596.bin", 0x00001, 0x010000, CRC(4a4041f3) SHA1(4c52b30223d8aa80ccdbb196098cb17e64ad6583) )
21012053   ROM_LOAD16_BYTE( "12597.bin", 0x00000, 0x010000, CRC(6961e676) SHA1(7639d2da086b57a9a8d6100fdacf40d97d7c4772) )
21022054
r5046r5047
22572209   ROM_LOAD( "28.12",  0x40000, 0x10000, CRC(22f0667e) SHA1(2d11b2ce105a3db9c914942cace85aff17deded9) )
22582210   ROM_LOAD( "27.11", 0x50000, 0x10000, CRC(afb1a7e4) SHA1(726fded9db72a881128b43f449d2baf450131f63) )
22592211
2260   ROM_REGION( 0x1c0000, "gfx2", 0 ) /* sprites */
2212   ROM_REGION16_BE( 0x1c0000, "gfx2", 0 ) /* sprites */
22612213   ROM_LOAD16_BYTE( "33.17",       0x000001, 0x10000, CRC(28ba70c8) SHA1(a6f33e1404928b6d1006943494646d6cfbd60a4b) )
22622214   ROM_LOAD16_BYTE( "34.18",       0x020001, 0x10000, CRC(2ed96a26) SHA1(edcf915243e6f92d31cdfc53965438f6b6bff51d) )
22632215   ROM_LOAD16_BYTE( "37.bin",       0x100001, 0x10000, CRC(84dccc5b) SHA1(10263d98d663f1170c3203066f391075a1d64ff5) )
r5046r5047
22712223
22722224    ROM_LOAD16_BYTE( "35.19",       0x040001, 0x10000, CRC(101d2fff) SHA1(1de1390c5f55f192491053c8aac31be3389aab2b) )
22732225   ROM_LOAD16_BYTE( "36.20",       0x060001, 0x10000, CRC(677e64a6) SHA1(e3d0d31097017c6cb1a7f41292783f18ce13b41c) )
2274   ROM_LOAD16_BYTE( "15.bin",       0x0a0000, 0x10000, CRC(11794d05) SHA1(eef52d7a644dbcc5f983222f163445a725286a32) )
2226   ROM_LOAD16_BYTE( "15.bin",       0x140001, 0x10000, CRC(11794d05) SHA1(eef52d7a644dbcc5f983222f163445a725286a32) )
22752227   ROM_LOAD16_BYTE( "17.bin",       0x160001, 0x10000, CRC(ad1c1c90) SHA1(155f17593cfab1a117bb755b1edd0c473d455f91) )
22762228
22772229     ROM_LOAD16_BYTE( "23.9",       0x040000, 0x10000, CRC(5853000d) SHA1(db7adf1de74c66f667ea7ccc41702576de081ff5) )
r5046r5047
22892241   ROM_LOAD16_BYTE( "20.bin",       0x180000, 0x10000, CRC(cba013c7) SHA1(a0658aaf7893bc9fb8f0435cab9f77ceb1fb4e1d) )
22902242   ROM_LOAD16_BYTE( "26.bin",       0x1a0000, 0x10000, CRC(bea4d237) SHA1(46e51e89b4ee1e2701da1004758d7da547a2e4c2) )
22912243
2244
22922245   ROM_REGION( 0x30000, "soundcpu", 0 ) /* sound CPU */
22932246   ROM_LOAD( "2.3",     0x00000, 0x08000, CRC(399fc5f5) SHA1(6f290b36dc71ff4759598e2a9c185a8945a3c9e7) )
22942247   ROM_LOAD( "3.1",     0x10000, 0x10000, CRC(50eb5a56) SHA1(d59ba04254000de5577e8a58d0b51c73112a4c80) )
r5046r5047
23442297   ROM_LOAD( "ic2.37",  0x40000, 0x10000, CRC(22f0667e) SHA1(2d11b2ce105a3db9c914942cace85aff17deded9) )
23452298   ROM_LOAD( "ic16.40", 0x50000, 0x10000, CRC(afb1a7e4) SHA1(726fded9db72a881128b43f449d2baf450131f63) )
23462299
2347   ROM_REGION( 0x1c0000, "gfx2", 0 ) /* sprites */
2300   ROM_REGION16_BE( 0x1c0000, "gfx2", 0 ) /* sprites */
23482301   ROM_LOAD16_BYTE( "ic73.34",       0x000001, 0x10000, CRC(28ba70c8) SHA1(a6f33e1404928b6d1006943494646d6cfbd60a4b) ) // mpr12378.b1  [1/4]      IDENTICAL
23492302   ROM_LOAD16_BYTE( "ic74.33",       0x020001, 0x10000, CRC(2ed96a26) SHA1(edcf915243e6f92d31cdfc53965438f6b6bff51d) ) // mpr12378.b1  [2/4]      IDENTICAL
23502303   ROM_LOAD16_BYTE( "ic79.28",       0x100001, 0x10000, CRC(84dccc5b) SHA1(10263d98d663f1170c3203066f391075a1d64ff5) ) // mpr12378.b1  [3/4]      IDENTICAL
r5046r5047
23872340   ROM_LOAD( "pas4p.12", 0x10000, 0x10000, CRC(bebb9211) SHA1(4f56048f6f70b63f74a4c0d64456213d36ce5b26) )
23882341   ROM_LOAD( "pas4p.13", 0x20000, 0x10000, CRC(e37506c3) SHA1(e6fbf15d58f321a3d052fefbe5a1901e4a1734ae) )
23892342
2390   ROM_REGION( 0x60000, "gfx2", 0 ) /* sprites */
2343   ROM_REGION16_BE( 0x60000, "gfx2", 0 ) /* sprites */
23912344   ROM_LOAD16_BYTE( "opr11862.b1",  0x00001, 0x10000, CRC(b6e94727) SHA1(0838e034f1f10d9cd1312c8c94b5c57387c0c271) )
23922345   ROM_LOAD16_BYTE( "opr11865.b5",  0x00000, 0x10000, CRC(17e8d5d5) SHA1(ac1074b0a705be13c6e3391441e6cfec1d2b3f8a) )
23932346   ROM_LOAD16_BYTE( "opr11863.b2",  0x20001, 0x10000, CRC(3e670098) SHA1(2cfc83f4294be30cd868738886ac546bd8489962) )
r5046r5047
24112364   ROM_LOAD( "opr11855.b10", 0x10000, 0x10000, CRC(b78762b4) SHA1(d594ef846bd7fed8da91a89906b39c1a2867a1fe) )
24122365   ROM_LOAD( "opr11856.b11", 0x20000, 0x10000, CRC(ea49f666) SHA1(36ccd32cdcbb7fcc300628bb59c220ec3c324d82) )
24132366
2414   ROM_REGION( 0x60000, "gfx2", 0 ) /* sprites */
2367   ROM_REGION16_BE( 0x80000, "gfx2", ROMREGION_ERASEFF ) /* sprites */
24152368   ROM_LOAD16_BYTE( "opr11862.b1",  0x00001, 0x10000, CRC(b6e94727) SHA1(0838e034f1f10d9cd1312c8c94b5c57387c0c271) )
24162369   ROM_LOAD16_BYTE( "opr11865.b5",  0x00000, 0x10000, CRC(17e8d5d5) SHA1(ac1074b0a705be13c6e3391441e6cfec1d2b3f8a) )
24172370   ROM_LOAD16_BYTE( "opr11863.b2",  0x20001, 0x10000, CRC(3e670098) SHA1(2cfc83f4294be30cd868738886ac546bd8489962) )
r5046r5047
24422395   ROM_LOAD( "10.bin", 0x10000, 0x10000, CRC(7cc40b6c) SHA1(ffad7eef7ab2ff9a2e49a8d71b5785a61fa3c675) )
24432396   ROM_LOAD( "11.bin", 0x20000, 0x10000, CRC(0f6c7b1c) SHA1(defc76592c285b3396e89a3cff7a73f3a948117f) )
24442397
2445   ROM_REGION( 0x080000, "gfx2", 0 ) /* sprites */
2446   ROM_LOAD16_BYTE( "5.bin", 0x00001, 0x08000, CRC(611f413a) SHA1(180f83216e2dfbfd77b0fb3be83c3042954d12df) )
2447   ROM_CONTINUE(             0x40001, 0x08000 )
2448   ROM_LOAD16_BYTE( "3.bin", 0x00000, 0x08000, CRC(5eb00fc1) SHA1(97e02eee74f61fabcad2a9e24f1868cafaac1d51) )
2449   ROM_CONTINUE(             0x40000, 0x08000 )
2450   ROM_LOAD16_BYTE( "8.bin", 0x10001, 0x08000, CRC(3c0797c0) SHA1(df18c7987281bd9379026c6cf7f96f6ae49fd7f9) )
2451   ROM_CONTINUE(             0x50001, 0x08000 )
2452   ROM_LOAD16_BYTE( "2.bin", 0x10000, 0x08000, CRC(25307ef8) SHA1(91ffbe436f80d583524ee113a8b7c0cf5d8ab286) )
2453   ROM_CONTINUE(             0x50000, 0x08000 )
2454   ROM_LOAD16_BYTE( "6.bin", 0x30001, 0x08000, CRC(c29ac34e) SHA1(b5e9b8c3233a7d6797f91531a0d9123febcf1660) )
2455   ROM_CONTINUE(             0x60001, 0x08000 )
2456   ROM_LOAD16_BYTE( "4.bin", 0x30000, 0x08000, CRC(04a437f8) SHA1(ea5fed64443236e3404fab243761e60e2e48c84c) )
2457   ROM_CONTINUE(             0x60000, 0x08000 )
2458   ROM_LOAD16_BYTE( "7.bin", 0x40001, 0x08000, CRC(41f41063) SHA1(5cc461e9738dddf9eea06831fce3702d94674163) )
2459   ROM_CONTINUE(             0x70001, 0x08000 )
2460   ROM_LOAD16_BYTE( "1.bin", 0x40000, 0x08000, CRC(b6e1fd72) SHA1(eb86e4bf880bd1a1d9bcab3f2f2e917bcaa06172) )
2461   ROM_CONTINUE(             0x70000, 0x08000 )
2398   ROM_REGION16_BE( 0x080000, "gfx2", ROMREGION_ERASEFF ) /* sprites */
2399   ROM_LOAD16_BYTE( "5.bin", 0x00001, 0x10000, CRC(611f413a) SHA1(180f83216e2dfbfd77b0fb3be83c3042954d12df) )
2400   ROM_LOAD16_BYTE( "3.bin", 0x00000, 0x10000, CRC(5eb00fc1) SHA1(97e02eee74f61fabcad2a9e24f1868cafaac1d51) )
2401   ROM_LOAD16_BYTE( "8.bin", 0x20001, 0x10000, CRC(3c0797c0) SHA1(df18c7987281bd9379026c6cf7f96f6ae49fd7f9) )
2402   ROM_LOAD16_BYTE( "2.bin", 0x20000, 0x10000, CRC(25307ef8) SHA1(91ffbe436f80d583524ee113a8b7c0cf5d8ab286) )
2403   ROM_LOAD16_BYTE( "6.bin", 0x40001, 0x10000, CRC(c29ac34e) SHA1(b5e9b8c3233a7d6797f91531a0d9123febcf1660) )
2404   ROM_LOAD16_BYTE( "4.bin", 0x40000, 0x10000, CRC(04a437f8) SHA1(ea5fed64443236e3404fab243761e60e2e48c84c) )
2405   ROM_LOAD16_BYTE( "7.bin", 0x60001, 0x10000, CRC(41f41063) SHA1(5cc461e9738dddf9eea06831fce3702d94674163) )
2406   ROM_LOAD16_BYTE( "1.bin", 0x60000, 0x10000, CRC(b6e1fd72) SHA1(eb86e4bf880bd1a1d9bcab3f2f2e917bcaa06172) )
24622407
24632408   ROM_REGION( 0x10000, "soundcpu", 0 ) /* sound CPU + data */
24642409   ROM_LOAD( "16.bin", 0x0000, 0x10000, CRC(52c8364e) SHA1(01d30b82f92498d155d2e31d43d58dff0285cce3) )
r5046r5047
24752420   ROM_LOAD( "epr12166.b10", 0x10000, 0x10000, CRC(9abd183b) SHA1(621b017cb34973f9227be383e26b5cd41aea9422) )
24762421   ROM_LOAD( "epr12167.b11", 0x20000, 0x10000, CRC(2495fd4e) SHA1(2db94ead9223a67238a97e724668076fc43e5534) )
24772422
2478   ROM_REGION( 0x020000, "gfx2", 0 ) /* sprites */
2423   ROM_REGION16_BE( 0x020000, "gfx2", 0 ) /* sprites */
24792424   ROM_LOAD16_BYTE( "obj0-o.rom", 0x00001, 0x10000, CRC(2fb38880) SHA1(0e1b601bbda78d1887951c1f7e752531c281bc83) )
24802425   ROM_LOAD16_BYTE( "obj0-e.rom", 0x00000, 0x10000, CRC(d6a02cba) SHA1(d80000f92e754e89c6ca7b7273feab448fc9a061) )
24812426
r5046r5047
24962441   ROM_LOAD( "tt16cf44.rom", 0x10000, 0x10000, CRC(4c467735) SHA1(8338b6605cbe2e076da0b3e3a47630409a79f002) )
24972442   ROM_LOAD( "tt17d59e.rom", 0x20000, 0x10000, CRC(60c0f2fe) SHA1(3fea4ed757d47628f59ff940e40cb86b3b5b443b) )
24982443
2499   ROM_REGION( 0x80000, "gfx2", 0 ) /* sprites */
2444   ROM_REGION16_BE( 0x80000, "gfx2", 0 ) /* sprites */
25002445   ROM_LOAD16_BYTE( "12279.1b", 0x00001, 0x10000, CRC(7a169fb1) SHA1(1ec6da0d2cfcf727e61f61c847fd8b975b64f944) )
25012446   ROM_LOAD16_BYTE( "12283.5b", 0x00000, 0x10000, CRC(ae0fa085) SHA1(ae9af92d4dd0c8a0f064d24e647522b588fbd7f7) )
25022447   ROM_LOAD16_BYTE( "12278.2b", 0x20001, 0x10000, CRC(961d06b7) SHA1(b1a9dea63785bfa2c0e7b931387b91dfcd27d79b) )
r5046r5047
25112456   ROM_LOAD( "tt0246ff.rom", 0x20000, 0x10000, CRC(bb4bba8f) SHA1(b182a7e1d0425e93c2c1b93472aafd30a6af6907) )
25122457ROM_END
25132458
2514// sys16B
25152459ROM_START( wb3bbl )
25162460   ROM_REGION( 0x040000, "maincpu", 0 ) /* 68000 code */
25172461   ROM_LOAD16_BYTE( "wb3_03", 0x000000, 0x10000, CRC(0019ab3b) SHA1(89d49a437690fa6e0c35bb9f1450042f89504714) )
r5046r5047
25242468   ROM_LOAD( "wb3_15", 0x10000, 0x10000, CRC(96ff9d52) SHA1(791a9da4860e0d42fba98f80a3c6725ad8c73e33) )
25252469   ROM_LOAD( "wb3_16", 0x20000, 0x10000, CRC(afaf0d31) SHA1(d4309329a0a543250788146b63b27ff058c02fc3) )
25262470
2527   ROM_REGION( 0x080000, "gfx2", 0 ) /* sprites */
2528   ROM_LOAD16_BYTE( "epr12093.b4", 0x000001, 0x010000, CRC(4891e7bb) SHA1(1be04fcabe9bfa8cf746263a5bcca67902a021a0) )
2529   ROM_LOAD16_BYTE( "epr12097.b8", 0x000000, 0x010000, CRC(e645902c) SHA1(497cfcf6c25cc2e042e16dbcb1963d2223def15a) )
2530   ROM_LOAD16_BYTE( "epr12091.b2", 0x020001, 0x010000, CRC(8409a243) SHA1(bcbb9510a6499d8147543d6befa5a49f4ac055d9) )
2531   ROM_LOAD16_BYTE( "epr12095.b6", 0x020000, 0x010000, CRC(e774ec2c) SHA1(a4aa15ec7be5539a740ad02ff720458018dbc536) )
2532   ROM_LOAD16_BYTE( "epr12090.b1", 0x040001, 0x010000, CRC(aeeecfca) SHA1(496124b170a725ad863c741d4e021ab947511e4c) )
2533   ROM_LOAD16_BYTE( "epr12094.b5", 0x040000, 0x010000, CRC(615e4927) SHA1(d23f164973afa770714e284a77ddf10f18cc596b) )
2534   ROM_LOAD16_BYTE( "epr12092.b3", 0x060001, 0x010000, CRC(5c2f0d90) SHA1(e0fbc0f841e4607ad232931368b16e81440a75c4) )
2535   ROM_LOAD16_BYTE( "epr12096.b7", 0x060000, 0x010000, CRC(0cd59d6e) SHA1(caf754a461feffafcfe7bfc6e89da76c4db257c5) )
2471   ROM_REGION16_BE( 0x100000, "gfx2", ROMREGION_ERASEFF ) /* sprites */
2472   ROM_LOAD16_BYTE( "epr12090.b1", 0x00001, 0x010000, CRC(aeeecfca) SHA1(496124b170a725ad863c741d4e021ab947511e4c) )
2473   ROM_LOAD16_BYTE( "epr12094.b5", 0x00000, 0x010000, CRC(615e4927) SHA1(d23f164973afa770714e284a77ddf10f18cc596b) )
2474   ROM_LOAD16_BYTE( "epr12091.b2", 0x20001, 0x010000, CRC(8409a243) SHA1(bcbb9510a6499d8147543d6befa5a49f4ac055d9) )
2475   ROM_LOAD16_BYTE( "epr12095.b6", 0x20000, 0x010000, CRC(e774ec2c) SHA1(a4aa15ec7be5539a740ad02ff720458018dbc536) )
2476   ROM_LOAD16_BYTE( "epr12092.b3", 0x40001, 0x010000, CRC(5c2f0d90) SHA1(e0fbc0f841e4607ad232931368b16e81440a75c4) )
2477   ROM_LOAD16_BYTE( "epr12096.b7", 0x40000, 0x010000, CRC(0cd59d6e) SHA1(caf754a461feffafcfe7bfc6e89da76c4db257c5) )
2478   ROM_LOAD16_BYTE( "epr12093.b4", 0x60001, 0x010000, CRC(4891e7bb) SHA1(1be04fcabe9bfa8cf746263a5bcca67902a021a0) )
2479   ROM_LOAD16_BYTE( "epr12097.b8", 0x60000, 0x010000, CRC(e645902c) SHA1(497cfcf6c25cc2e042e16dbcb1963d2223def15a) )
25362480
2481
25372482   ROM_REGION( 0x10000, "soundcpu", 0 ) /* sound CPU */
25382483   ROM_LOAD( "epr12127.a10", 0x0000, 0x8000, CRC(0bb901bb) SHA1(c81b198df8e3b0ec568032c76addf0d1a1711194) )
25392484ROM_END
r5046r5047
25422487/* Looked at 24/05/09 */
25432488
25442489// System 16B based bootlegs
2545GAME( 1989, bayrouteb1, bayroute, bayrouteb1, bayroute, bayrouteb1, ROT0,   "bootleg", "Bay Route (encrypted, protected bootleg)", GAME_NO_SOUND | GAME_NOT_WORKING )
2490GAME( 1989, bayrouteb1, bayroute, bayrouteb1, bayroute, bayrouteb1, ROT0,   "bootleg", "Bay Route (encrypted, protected bootleg)", GAME_NO_SOUND | GAME_NOT_WORKING ) // broken sprites (due to missing/wrong irq code?)
25462491GAME( 1989, bayrouteb2, bayroute, bayrouteb2, bayroute, bayrouteb2, ROT0,   "bootleg", "Bay Route (Datsu bootleg)", GAME_NO_SOUND | GAME_NOT_WORKING )
25472492GAME( 1989, goldnaxeb1, goldnaxe, goldnaxe_b1, goldnaxe, goldnabl, ROT0,   "bootleg", "Golden Axe (encrypted bootleg)", GAME_NOT_WORKING|GAME_NO_SOUND )
25482493GAME( 1989, goldnaxeb2, goldnaxe, goldnaxe_b2, goldnaxe, goldnab2, ROT0,   "bootleg", "Golden Axe (bootleg)", GAME_NOT_WORKING|GAME_NO_SOUND )
r5046r5047
28582803
28592804
28602805/***************************************************************************/
2861
28622806/*
2863    315-5296 I/O chip emulation
2864*/
2865#if 0
2866static int io_reg[0x10];
2867
2868static READ16_HANDLER( sys18_io_r )
2869{
2870   if(ACCESSING_BITS_0_7)
2871   {
2872      switch(offset & 0x3000/2)
2873      {
2874         case 0x0000/2: /* I/O chip internal locations */
2875         case 0x1000/2: /* I/O chip internal locations (mirror) */
2876            switch(offset & 0x1F)
2877            {
2878               case 0x00: /* Port A - 1P controls */
2879                  if(io_reg[0x0F] & 0x01)
2880                     return io_reg[0x00];
2881                  else
2882                     return input_port_read(space->machine, "P1");
2883                  break;
2884
2885               case 0x01: /* Port B - 2P controls */
2886                  if(io_reg[0x0F] & 0x02)
2887                     return io_reg[0x01];
2888                  else
2889                     return input_port_read(space->machine, "P2");
2890                  break;
2891
2892               case 0x02: /* Port C - Bidirectional I/O port */
2893                  if(io_reg[0x0F] & 0x04)
2894                     return io_reg[0x02];
2895                  else
2896                     return -1;
2897                  break;
2898
2899               case 0x03: /* Port D - Miscellaneous outputs */
2900                  if(io_reg[0x0F] & 0x08)
2901                     return io_reg[0x03];
2902                  else
2903                     return -1;
2904                  break;
2905
2906               case 0x04: /* Port E - Service / Coin inputs */
2907                  if(io_reg[0x0F] & 0x10)
2908                     return io_reg[0x04];
2909                  else
2910                     return input_port_read(space->machine, "SERVICE");
2911                  break;
2912
2913               case 0x05: /* Port F - DIP switch #1 */
2914                  if(io_reg[0x0F] & 0x20)
2915                     return io_reg[0x05];
2916                  else
2917                     return input_port_read(space->machine, "DSW1");
2918                  break;
2919
2920               case 0x06: /* Port G - DIP switch #2 */
2921                  if(io_reg[0x0F] & 0x40)
2922                     return io_reg[0x06];
2923                  else
2924                     return input_port_read(space->machine, "P3");
2925                  break;
2926
2927               case 0x07: /* Port H - Tile banking control */
2928                  if(io_reg[0x0F] & 0x80)
2929                     return io_reg[0x07];
2930                  else
2931                     return -1;
2932                  break;
2933
2934               case 0x08: /* Protection #1 */
2935                  return 'S';
2936               case 0x09: /* Protection #2 */
2937                  return 'E';
2938               case 0x0A: /* Protection #3 */
2939                  return 'G';
2940               case 0x0B: /* Protection #4 */
2941                  return 'A';
2942
2943               case 0x0C: /* CNT2-0 pin output control (mirror) */
2944               case 0x0E: /* CNT2-0 pin output control */
2945                  return io_reg[0x0E];
2946
2947               case 0x0D: /* Port direction control (mirror) */
2948               case 0x0F: /* Port direction control */
2949                  return io_reg[0x0F];
2950            }
2951            return -1;
2952
2953         case 0x2000/2: /* Unused */
2954            logerror("read video control latch %06X (%06X)\n", offset, cpu_get_pc(space->cpu));
2955            return -1;
2956
2957         case 0x3000/2: /* Expansion connector */
2958            logerror("read expansion area %06X (%06X)\n", offset, cpu_get_pc(space->cpu));
2959            return -1;
2960      }
2961   }
2962
2963   return -1;
2964}
2965
2966static WRITE16_HANDLER( sys18_io_w )
2967{
2968   if(ACCESSING_BITS_0_7)
2969   {
2970      switch(offset & 0x3000/2)
2971      {
2972         case 0x0000/2: /* I/O chip internal locations */
2973         case 0x1000/2: /* I/O chip internal locations (mirror) */
2974            switch(offset & 0x1F)
2975            {
2976               case 0x00: /* Port A - 1P controls */
2977                  io_reg[0x00] = data;
2978                  break;
2979
2980               case 0x01: /* Port B - 2P controls */
2981                  io_reg[0x01] = data;
2982                  break;
2983
2984               case 0x02: /* Port C - Bidirectional I/O port */
2985                  io_reg[0x02] = data;
2986                  break;
2987
2988               case 0x03: /* Port D - Miscellaneous outputs */
2989                  io_reg[0x03] = data;
2990                  coin_lockout_w(1, data & 8);
2991                  coin_lockout_w(0, data & 4);
2992                  coin_counter_w(1, data & 2);
2993                  coin_counter_w(0, data & 1);
2994                  break;
2995
2996               case 0x04: /* Port E - Service / Coin inputs */
2997                  io_reg[0x04] = data;
2998                  break;
2999
3000               case 0x05: /* Port F - DIP switch #1 */
3001                  io_reg[0x05] = data;
3002                  break;
3003
3004               case 0x06: /* Port G - DIP switch #2 */
3005                  io_reg[0x06] = data;
3006                  break;
3007
3008               case 0x07: /* Port H - Tile banking control */
3009                  io_reg[0x07] = data;
3010                  sys16_tile_bank0 = (data >> 0) & 0x0F;
3011                  sys16_tile_bank1 = (data >> 4) & 0x0F;
3012                  break;
3013
3014               case 0x0E: /* CNT2-0 pin output control */
3015                  io_reg[0x0E] = data;
3016                  sys16_refreshenable = data & 0x02;
3017                  break;
3018
3019               case 0x0F: /* Port direction control */
3020                  io_reg[0x0F] = data;
3021                  break;
3022            }
3023            break;
3024
3025         case 0x2000/2: /* Video control latch */
3026            logerror("write video control latch %06X = %04X (%06X)\n", offset, data, cpu_get_pc(space->cpu));
3027            break;
3028
3029         case 0x3000/2: /* Expansion connector */
3030//              logerror("write expansion area %06X = %04X (%06X)\n", offset, data, cpu_get_pc(space->cpu));
3031            break;
3032      }
3033   }
3034}
3035#endif
3036
3037/***************************************************************************/
3038/*
30392807    Shadow Dancer (Bootleg)
30402808
30412809    This seems to be a modified version of shdancer. It has no warning screen, displays English text during the
r5046r5047
30802848   AM_RANGE(0x000000, 0x07ffff) AM_ROM
30812849   AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram)
30822850   AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram)
3083   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&sys16_spriteram)
3084   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
2851   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
2852   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
30852853   AM_RANGE(0xc00000, 0xc0ffff) AM_NOP
30862854   AM_RANGE(0xc40000, 0xc40001) AM_READ_PORT("COINAGE")
30872855   AM_RANGE(0xc40002, 0xc40003) AM_READ_PORT("DSW1")
r5046r5047
31002868
31012869/***************************************************************************/
31022870
3103static MACHINE_RESET( shdancbl )
3104{
3105   sys16_sprxoffset = -0xbc+0x77;
3106}
31072871
3108
3109
31102872static DRIVER_INIT( shdancbl )
31112873{
31122874   UINT8 *mem;
r5046r5047
31322894   AM_RANGE(0x000000, 0x07ffff) AM_ROM
31332895   AM_RANGE(0x400000, 0x40ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram)
31342896   AM_RANGE(0x410000, 0x410fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram)
3135   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&sys16_spriteram)
3136   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
2897   AM_RANGE(0x440000, 0x440fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
2898   AM_RANGE(0x840000, 0x840fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
31372899
31382900   /* bootleg video regs */
31392901   /*AM_RANGE(0xc00000, 0xc00001) AM_NOP
r5046r5047
31642926
31652927/***************************************************************************/
31662928
3167static MACHINE_RESET( mwalkbl )
3168{
3169
3170}
3171
31722929static DRIVER_INIT( mwalkbl )
31732930{
31742931   UINT8 *RAM= memory_region(machine, "soundcpu");
r5046r5047
31962953   AM_RANGE(0x000000, 0x07ffff) AM_ROM
31972954   AM_RANGE(0x100000, 0x10ffff) AM_RAM_WRITE( sys16_tileram_w ) AM_BASE(&sys16_tileram)
31982955   AM_RANGE(0x110000, 0x110fff) AM_RAM_WRITE( sys16_textram_w ) AM_BASE(&sys16_textram)
3199   AM_RANGE(0x140000, 0x140fff) AM_RAM_WRITE( sys16_paletteram_w ) AM_BASE(&paletteram16)
3200   AM_RANGE(0x200000, 0x200fff) AM_RAM AM_BASE(&sys16_spriteram)
2956   AM_RANGE(0x140000, 0x140fff) AM_RAM_WRITE( segaic16_paletteram_w ) AM_BASE(&paletteram16)
2957   AM_RANGE(0x200000, 0x200fff) AM_RAM AM_BASE(&segaic16_spriteram_0)
32012958   AM_RANGE(0xa00000, 0xa00001) AM_READ_PORT("COINAGE")
32022959   AM_RANGE(0xa00002, 0xa00003) AM_READ_PORT("DSW1")
32032960   AM_RANGE(0xa00006, 0xa00007) AM_WRITE(sound_command_nmi_w)
r5046r5047
32302987/***************************************************************************/
32312988
32322989
3233static MACHINE_RESET( astormbl )
3234{
3235
3236}
3237
3238
32392990static DRIVER_INIT( astormbl )
32402991{
32412992   UINT8 *RAM= memory_region(machine, "soundcpu");
r5046r5047
33103061   MDRV_IMPORT_FROM(system18)
33113062   MDRV_CPU_MODIFY("maincpu")
33123063   MDRV_CPU_PROGRAM_MAP(astormbl_map)
3313
3314   MDRV_MACHINE_RESET(astormbl)
33153064MACHINE_DRIVER_END
33163065
33173066
r5046r5047
33213070   MDRV_IMPORT_FROM(system18)
33223071   MDRV_CPU_MODIFY("maincpu")
33233072   MDRV_CPU_PROGRAM_MAP(mwalkbl_map)
3324
3325   MDRV_MACHINE_RESET(mwalkbl)
33263073MACHINE_DRIVER_END
33273074
33283075
r5046r5047
33423089   MDRV_SOUND_CONFIG(shdancbl_msm5205_interface)
33433090   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.80)
33443091   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.80)
3345
3346   MDRV_MACHINE_RESET(shdancbl)
33473092MACHINE_DRIVER_END
33483093
33493094
r5046r5047
34963241   ROM_LOAD( "epr13074.bin", 0x40000, 0x40000, CRC(787afab8) SHA1(a119042bb2dad54e9733bfba4eaab0ac5fc0f9e7) )
34973242   ROM_LOAD( "epr13075.bin", 0x80000, 0x40000, CRC(4e01b477) SHA1(4178ce4a87ea427c3b0195e64acef6cddfb3485f) )
34983243
3499   ROM_REGION( 0x200000, "gfx2", 0 ) /* sprites */
3244   ROM_REGION16_BE( 0x200000, "gfx2", 0 ) /* sprites */
35003245   ROM_LOAD16_BYTE( "mpr13082.bin", 0x000001, 0x40000, CRC(a782b704) SHA1(ba15bdfbc267b8d86f03e5310ce60846ff846de3) )
35013246   ROM_LOAD16_BYTE( "astorm.a11",   0x000000, 0x40000, CRC(7829c4f3) SHA1(3adb7aa7f70163d3848c98316e18b9783c41d663) )
35023247   ROM_LOAD16_BYTE( "mpr13081.bin", 0x080001, 0x40000, CRC(eb510228) SHA1(4cd387b160ec7050e1300ebe708853742169e643) )
r5046r5047
35583303   ROM_LOAD( "36.03",  0x80000, 0x20000, CRC(c0f9628d) SHA1(aeacf5e409adfa0b9c28c90d4e89eb1f56cd5f4d) ) // epr13075.bin [1/2]      IDENTICAL
35593304   ROM_LOAD( "37.031", 0xa0000, 0x20000, CRC(95af904e) SHA1(6574fa874c355c368109b417aab7d0b05c9d215d) ) // epr13075.bin [2/2]      IDENTICAL
35603305
3561   ROM_REGION( 0x200000, "gfx2", 0 ) /* sprites */
3306   ROM_REGION16_BE( 0x200000, "gfx2", 0 ) /* sprites */
35623307   ROM_LOAD16_BYTE( "17.042", 0x000001, 0x20000, CRC(db08beb5) SHA1(c154d22c69b77637d6a9d0f2bffcfb47e6901ec8) ) // mpr13082.bin [1/2]      IDENTICAL
35633308   ROM_LOAD16_BYTE( "16.043", 0x040001, 0x20000, CRC(41f78977) SHA1(9cf9fcf96722d148c4b2cf7aa33425b6efcd0379) ) // mpr13082.bin [2/2]      IDENTICAL
35643309   ROM_LOAD16_BYTE( "29.012", 0x000000, 0x20000, CRC(22acf675) SHA1(80fd0d96017bf36d964a79f7e13e73fee7ed370a) ) // mpr13089.bin [1/2]      99.941254%
r5046r5047
36133358   ROM_LOAD( "mpr13217.b2", 0x40000, 0x40000, CRC(7d1ac3ec) SHA1(8495357304f1df135bba77ef3b96e79a883b8ff0) )
36143359   ROM_LOAD( "mpr13218.b3", 0x80000, 0x40000, CRC(56d3393c) SHA1(50a2d065060692c9ecaa56046a781cb21d93e554) )
36153360
3616   ROM_REGION( 0x200000, "gfx2", 0 ) /* sprites */
3361   ROM_REGION16_BE( 0x200000, "gfx2", 0 ) /* sprites */
36173362   ROM_LOAD16_BYTE( "mpr13224.b11", 0x000001, 0x40000, CRC(c59f107b) SHA1(10fa60fca6e34eda277c483bb1c0e81bb88c8a47) )
36183363   ROM_LOAD16_BYTE( "mpr13231.a11", 0x000000, 0x40000, CRC(a5e96346) SHA1(a854f4dd5dc16975373255110fdb8ab3d121b1af) )
36193364   ROM_LOAD16_BYTE( "mpr13223.b10", 0x080001, 0x40000, CRC(364f60ff) SHA1(9ac887ec0b2e32b504b7c6a5f3bb1ce3fe41a15a) )
r5046r5047
36513396   ROM_LOAD( "ic2",  0x80000, 0x20000, CRC(60095070) SHA1(913c2ee51fb6f838f3c6cbd27032bdf754fbadf1) )
36523397   ROM_LOAD( "ic16", 0xa0000, 0x20000, CRC(0f0d5dd3) SHA1(76812e2f831256a8b6598257dd84a7f07443642e) )
36533398
3654   ROM_REGION( 0x200000, "gfx2", 0 ) /* sprites */
3399   ROM_REGION16_BE( 0x200000, "gfx2", 0 ) /* sprites */
36553400
36563401   // 12719
36573402   ROM_LOAD16_BYTE( "ic73", 0x000001, 0x10000, CRC(59e77c96) SHA1(08da058529ac83352a4528d3792a21edda348f7a) )
src/mame/drivers/nyny.c
r5046r5047
397397}
398398
399399
400static MC6845_ON_DE_CHANGED( display_enable_changed )
400static WRITE_LINE_DEVICE_HANDLER( display_enable_changed )
401401{
402   ttl74123_a_w(devtag_get_device(device->machine, "ic48_1"), 0, display_enabled);
402   ttl74123_a_w(devtag_get_device(device->machine, "ic48_1"), 0, state);
403403}
404404
405405
r5046r5047
410410   begin_update,         /* before pixel update callback */
411411   update_row,            /* row update callback */
412412   end_update,            /* after pixel update callback */
413   display_enable_changed,   /* callback for display state changes */
414   NULL,               /* HSYNC callback */
415   NULL               /* VSYNC callback */
413   DEVCB_LINE(display_enable_changed),   /* callback for display state changes */
414   DEVCB_NULL,            /* callback for cursor state changes */
415   DEVCB_NULL,            /* HSYNC callback */
416   DEVCB_NULL,            /* VSYNC callback */
417   NULL               /* update address callback */
416418};
417419
418420
src/mame/drivers/gstriker.c
r5046r5047
633633   ROM_LOAD16_WORD_SWAP( "human-1.u58",  0x00000, 0x80000, CRC(45cf4857) SHA1(8133a9a7bdd547cc3d69140a68a1a5a7341e9f5b) )
634634
635635   ROM_REGION( 0x40000, "audiocpu", 0 )
636   ROM_LOAD( "human-3.u87",  0x00000, 0x20000, CRC(2f28c01e) SHA1(63829ad7969d197b2f2c87cb88bdb9e9880ed2d6) )
636   ROM_LOAD( "human-3_27c1001.u87",  0x00000, 0x20000, CRC(2f28c01e) SHA1(63829ad7969d197b2f2c87cb88bdb9e9880ed2d6) )
637637   ROM_RELOAD(               0x10000, 0x20000 )
638638
639639   ROM_REGION( 0x20000, "gfx1", 0 ) // score tilemap
640   ROM_LOAD( "human-2.u79",  0x00000, 0x20000, CRC(a981993b) SHA1(ed92c7581d2b84a8628744dd5f8a2266c45dcd5b) )
640   ROM_LOAD( "human-2_27c1024.u79",  0x00000, 0x20000, CRC(a981993b) SHA1(ed92c7581d2b84a8628744dd5f8a2266c45dcd5b) )
641641
642642   ROM_REGION( 0x200000, "gfx2", 0 ) // scroll tilemap
643   ROM_LOAD( "scrgs105.u2",  0x00000, 0x200000, CRC(d584b568) SHA1(64c5e4fdbb859873e51f62d8f5314598108270ef) )
644   ROM_LOAD( "scrgs105.u4",  0x00000, 0x200000, CRC(d584b568) SHA1(64c5e4fdbb859873e51f62d8f5314598108270ef) ) // same content, dif pos on board
643   ROM_LOAD( "human_scr-gs-105_m531602c-44_3405356.u2",  0x00000, 0x200000, CRC(d584b568) SHA1(64c5e4fdbb859873e51f62d8f5314598108270ef) )
644   ROM_LOAD( "human_scr-gs-105_m531602c-44_3405356.u4",  0x00000, 0x200000, CRC(d584b568) SHA1(64c5e4fdbb859873e51f62d8f5314598108270ef) ) // same content, dif pos on board
645645
646646   ROM_REGION( 0x1000000, "gfx3", 0 )
647   ROM_LOAD( "scrgs101.u25", 0x000000, 0x200000, CRC(becaea24) SHA1(e96fca863f49f50992f56c7defa5a69599608785) )
648   ROM_LOAD( "scrgs102.u24", 0x200000, 0x200000, CRC(0dae7aba) SHA1(304f336994be33fa8239c13e6fd9967c06f97d5c) )
649   ROM_LOAD( "scrgs103.u23", 0x400000, 0x200000, CRC(3448fe92) SHA1(c4c2d2d5610795aff6633b0601ff484897598904) )
650   ROM_LOAD( "scrgs104.u22", 0x600000, 0x200000, CRC(0ac33e5a) SHA1(9d7717d80f2c6817bac3fad50c39e04f0aa94255) )
651   ROM_LOAD( "human-4.u6",   0xf80000, 0x080000, CRC(a990f9bb) SHA1(7ce31d4c650eb244e2ab285f253a98d6613b7dc8) )
647   ROM_LOAD( "human_scr-gs-101_m531602c-40_3405351.u25", 0x000000, 0x200000, CRC(becaea24) SHA1(e96fca863f49f50992f56c7defa5a69599608785) )
648   ROM_LOAD( "human_scr-gs-102_m531602c-41_3405355.u24", 0x200000, 0x200000, CRC(0dae7aba) SHA1(304f336994be33fa8239c13e6fd9967c06f97d5c) )
649   ROM_LOAD( "human_scr-gs-103_m531602c-42_3405353.u23", 0x400000, 0x200000, CRC(3448fe92) SHA1(c4c2d2d5610795aff6633b0601ff484897598904) )
650   ROM_LOAD( "human_scr-gs-104_m531602c-43_3405354.u22", 0x600000, 0x200000, CRC(0ac33e5a) SHA1(9d7717d80f2c6817bac3fad50c39e04f0aa94255) )
651   ROM_LOAD( "human-4_27c240.u6",   0xf80000, 0x080000, CRC(a990f9bb) SHA1(7ce31d4c650eb244e2ab285f253a98d6613b7dc8) )
652652
653653   ROM_REGION( 0x40000, "ym.deltat", 0 )
654   ROM_LOAD( "scrgs106.u93", 0x00000, 0x040000, CRC(93c9868c) SHA1(dcecb34e46405155e35aaf134b8547430d23f5a7) )
654   ROM_LOAD( "human_scr-gs-106_m532001b-16_3402370.u93", 0x00000, 0x040000, CRC(93c9868c) SHA1(dcecb34e46405155e35aaf134b8547430d23f5a7) )
655655
656656   ROM_REGION( 0x100000, "ym", 0 )
657657   ROM_LOAD( "scrgs107.u99", 0x00000, 0x100000, CRC(ecc0a01b) SHA1(239e832b7d22925460a8f44eb82e782cd13aba49) )
r5046r5047
664664   ROM_LOAD( "pal16l8.s205a.u109",  0x0800, 0x0104, CRC(0d644e59) SHA1(bb8f4ab47d7bc9b9b37f636f8fa9c419f17630ad) )
665665ROM_END
666666
667ROM_START( gstrikea )
668   ROM_REGION( 0x100000, "maincpu", 0 )
669   ROM_LOAD16_WORD_SWAP( "human-1_27c4002.u58",  0x00000, 0x80000, CRC(7cf45320) SHA1(4127c93fe5f863cecf0a005c66129c0eb660f5dd) )
670
671   ROM_REGION( 0x40000, "audiocpu", 0 )
672   ROM_LOAD( "human-3_27c1001.u87",  0x00000, 0x20000, CRC(2f28c01e) SHA1(63829ad7969d197b2f2c87cb88bdb9e9880ed2d6) )
673   ROM_RELOAD(               0x10000, 0x20000 )
674
675   ROM_REGION( 0x20000, "gfx1", 0 ) // score tilemap
676   ROM_LOAD( "human-2_27c1024.u79",  0x00000, 0x20000, CRC(a981993b) SHA1(ed92c7581d2b84a8628744dd5f8a2266c45dcd5b) )
677
678   ROM_REGION( 0x200000, "gfx2", 0 ) // scroll tilemap
679   ROM_LOAD( "human_scr-gs-105_m531602c-44_3405356.u2",  0x00000, 0x200000, CRC(d584b568) SHA1(64c5e4fdbb859873e51f62d8f5314598108270ef) )
680   ROM_LOAD( "human_scr-gs-105_m531602c-44_3405356.u4",  0x00000, 0x200000, CRC(d584b568) SHA1(64c5e4fdbb859873e51f62d8f5314598108270ef) ) // same content, dif pos on board
681
682   ROM_REGION( 0x1000000, "gfx3", 0 )
683   ROM_LOAD( "human_scr-gs-101_m531602c-40_3405351.u25", 0x000000, 0x200000, CRC(becaea24) SHA1(e96fca863f49f50992f56c7defa5a69599608785) )
684   ROM_LOAD( "human_scr-gs-102_m531602c-41_3405355.u24", 0x200000, 0x200000, CRC(0dae7aba) SHA1(304f336994be33fa8239c13e6fd9967c06f97d5c) )
685   ROM_LOAD( "human_scr-gs-103_m531602c-42_3405353.u23", 0x400000, 0x200000, CRC(3448fe92) SHA1(c4c2d2d5610795aff6633b0601ff484897598904) )
686   ROM_LOAD( "human_scr-gs-104_m531602c-43_3405354.u22", 0x600000, 0x200000, CRC(0ac33e5a) SHA1(9d7717d80f2c6817bac3fad50c39e04f0aa94255) )
687   ROM_LOAD( "human-4_27c240.u6",   0xf80000, 0x080000, CRC(a990f9bb) SHA1(7ce31d4c650eb244e2ab285f253a98d6613b7dc8) )
688
689   ROM_REGION( 0x40000, "ym.deltat", 0 )
690   ROM_LOAD( "human_scr-gs-106_m532001b-16_3402370.u93", 0x00000, 0x040000, CRC(93c9868c) SHA1(dcecb34e46405155e35aaf134b8547430d23f5a7) )
691
692   ROM_REGION( 0x100000, "ym", 0 )
693   ROM_LOAD( "scrgs107.u99", 0x00000, 0x100000, CRC(ecc0a01b) SHA1(239e832b7d22925460a8f44eb82e782cd13aba49) )
694
695      /* PALs were protected on this version, used the ones from the "gstriker" set */
696   ROM_REGION( 0x1000, "plds", 0 )
697   ROM_LOAD( "pal16l8.s201a.u52",   0x0000, 0x0104, CRC(724faf0f) SHA1(755fad09d188af58efce733a9f1256b1abc7c360) )
698   ROM_LOAD( "pal16l8.s202a.u74",   0x0200, 0x0104, CRC(ad5c4722) SHA1(0aad71b73c6674e15596b7de59160a5156a4118d) )
699   ROM_LOAD( "pal16l8.s203a.u75",   0x0400, 0x0104, CRC(ad197e2d) SHA1(e0691b79b8433285a0bafea1d52b0166f6417c20) )
700   ROM_LOAD( "pal16l8.s204a.u89",   0x0600, 0x0104, CRC(eb997577) SHA1(504a2499c8a96c74607d06aefb0a062612a78b38) )
701   ROM_LOAD( "pal16l8.s205a.u109",  0x0800, 0x0104, CRC(0d644e59) SHA1(bb8f4ab47d7bc9b9b37f636f8fa9c419f17630ad) )
702ROM_END
703
704
705
667706ROM_START( vgoalsoc )
668707   ROM_REGION( 0x100000, "maincpu", 0 )
669708   ROM_LOAD16_WORD_SWAP( "c16_u37.u37",  0x00000, 0x80000, CRC(18c05440) SHA1(0fc78ee0ba6d7817d4a93a80f668f193c352c00d) )
r5046r5047
10181057/*** GAME DRIVERS ************************************************************/
10191058
10201059GAME( 1993, gstriker, 0,        gstriker, gstriker, 0,        ROT0, "Human", "Grand Striker", GAME_IMPERFECT_GRAPHICS )
1060GAME( 1993, gstrikea, gstriker, gstriker, gstriker, 0,        ROT0, "Human", "Grand Striker (Americas)", GAME_IMPERFECT_GRAPHICS )
10211061
1062
10221063/* Similar, but not identical hardware, appear to be protected by an MCU :-( */
10231064GAME( 1994, vgoalsoc, 0,        vgoal,    vgoalsoc, vgoalsoc,   ROT0, "Tecmo", "V Goal Soccer (set 1)", GAME_NOT_WORKING )
10241065GAME( 1994, vgoalsca, vgoalsoc, vgoal,    vgoalsoc, vgoalsoc,   ROT0, "Tecmo", "V Goal Soccer (set 2)", GAME_NOT_WORKING )
src/mame/drivers/calomega.c
r5046r5047
19061906   NULL,      /* before pixel update callback */
19071907   NULL,      /* row update callback */
19081908   NULL,      /* after pixel update callback */
1909   NULL,      /* callback for display state changes */
1910   NULL,      /* HSYNC callback */
1911   NULL      /* VSYNC callback */
1909   DEVCB_NULL,   /* callback for display state changes */
1910   DEVCB_NULL,   /* callback for cursor state changes */
1911   DEVCB_NULL,   /* HSYNC callback */
1912   DEVCB_NULL,   /* VSYNC callback */
1913   NULL      /* update address callback */
19121914};
19131915
19141916
src/mame/drivers/4roses.c
r5046r5047
364364   NULL,      /* before pixel update callback */
365365   NULL,      /* row update callback */
366366   NULL,      /* after pixel update callback */
367   NULL,      /* callback for display state changes */
368   NULL,      /* HSYNC callback */
369   NULL      /* VSYNC callback */
367   DEVCB_NULL,   /* callback for display state changes */
368   DEVCB_NULL,   /* callback for cursor state changes */
369   DEVCB_NULL,   /* HSYNC callback */
370   DEVCB_NULL,   /* VSYNC callback */
371   NULL      /* update address callback */
370372};
371373
372374
src/mame/drivers/shaolins.c
r5046r5047
117117   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
118118   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
119119
120      /* This bank only have four switches */
120121   PORT_START("DSW2")
121122   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
122123   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
r5046r5047
126127   PORT_DIPSETTING(   0x00, DEF_STR( Dual ) )
127128   PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
128129   PORT_BIT ( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
129   PORT_DIPNAME( 0x10, 0x10, "Unknown DSW2 5" )
130   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
131   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
132   PORT_DIPNAME( 0x20, 0x20, "Unknown DSW2 6" )
133   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
134   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
135   PORT_DIPNAME( 0x40, 0x40, "Unknown DSW2 7" )
136   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
137   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
138   PORT_DIPNAME( 0x80, 0x80, "Unknown DSW2 8" )
139   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
140   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
141130
142131   PORT_START("DSW3")
143132   PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )
src/mame/drivers/pcat_nit.c
r5046r5047
188188static UINT8 dma_offset[2][4];
189189static UINT8 at_pages[0x10];
190190
191static DMA8237_HRQ_CHANGED( pc_dma_hrq_changed )
192{
193   cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
194
195   /* Assert HLDA */
196   dma8237_set_hlda( device, state );
197}
198
199
191200static DMA8237_MEM_READ( pc_dma_read_byte )
192201{
193202   const address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
r5046r5047
254263
255264static const struct dma8237_interface dma8237_1_config =
256265{
257   "maincpu",
258   1.0e-6, // 1us
266   XTAL_14_31818MHz/3,
259267
268   pc_dma_hrq_changed,
260269   pc_dma_read_byte,
261270   pc_dma_write_byte,
262271
263   { 0, 0, NULL, NULL },
264   { 0, 0, NULL, NULL },
272   { NULL, NULL, NULL, NULL },
273   { NULL, NULL, NULL, NULL },
265274   NULL
266275};
267276
268277static const struct dma8237_interface dma8237_2_config =
269278{
270   "maincpu",
271   1.0e-6, // 1us
279   XTAL_14_31818MHz/3,
272280
273281   NULL,
274282   NULL,
283   NULL,
275284
276   { 0, 0, NULL, NULL },
277   { 0, 0, NULL, NULL },
285   { NULL, NULL, NULL, NULL },
286   { NULL, NULL, NULL, NULL },
278287   NULL
279288};
280289
src/mame/drivers/ssingles.c
r5046r5047
8686
8787static const mc6845_interface mc6845_intf =
8888{
89      "screen",
90      8,
91      NULL,
92      update_row,
93      NULL,
94      NULL,
95      NULL,
96      NULL
89   "screen",
90   8,
91   NULL,                  /* before pixel update callback */
92   update_row,               /* row update callback */
93   NULL,                  /* after pixel update callback */
94   DEVCB_NULL,               /* callback for display state changes */
95   DEVCB_NULL,               /* callback for cursor state changes */
96   DEVCB_NULL,               /* HSYNC callback */
97   DEVCB_NULL,               /* VSYNC callback */
98   NULL                  /* update address callback */
9799};
98100
99101static WRITE8_HANDLER(ssingles_videoram_w)
src/mame/drivers/spiders.c
r5046r5047
507507}
508508
509509
510static MC6845_ON_DE_CHANGED( display_enable_changed )
510static WRITE_LINE_DEVICE_HANDLER( display_enable_changed )
511511{
512   ttl74123_a_w(devtag_get_device(device->machine, "ic60"), 0, display_enabled);
512   ttl74123_a_w(devtag_get_device(device->machine, "ic60"), 0, state);
513513}
514514
515515
r5046r5047
519519   8,                  /* number of pixels per video memory address */
520520   begin_update,         /* before pixel update callback */
521521   update_row,            /* row update callback */
522   0,                  /* after pixel update callback */
523   display_enable_changed,   /* callback for display state changes */
524   NULL,               /* HSYNC callback */
525   NULL               /* VSYNC callback */
522   NULL,               /* after pixel update callback */
523   DEVCB_LINE(display_enable_changed),   /* callback for display state changes */
524   DEVCB_NULL,            /* callback for cursor state changes */
525   DEVCB_NULL,            /* HSYNC callback */
526   DEVCB_NULL,            /* VSYNC callback */
527   NULL               /* update address callback */
526528};
527529
528530
src/mame/drivers/pcxt.c
r5046r5047
551551static UINT8 dma_offset[2][4];
552552static UINT8 at_pages[0x10];
553553
554static DMA8237_HRQ_CHANGED( pc_dma_hrq_changed )
555{
556   cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
557
558   /* Assert HLDA */
559   dma8237_set_hlda( device, state );
560}
561
562
554563static DMA8237_MEM_READ( pc_dma_read_byte )
555564{
556565   const address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
r5046r5047
615624
616625static const struct dma8237_interface dma8237_1_config =
617626{
618   "maincpu",
619   1.0e-6, // 1us
627   XTAL_14_31818MHz/3,
620628
629   pc_dma_hrq_changed,
621630   pc_dma_read_byte,
622631   pc_dma_write_byte,
623632
624   { 0, 0, NULL, NULL },
625   { 0, 0, NULL, NULL },
633   { NULL, NULL, NULL, NULL },
634   { NULL, NULL, NULL, NULL },
626635   NULL
627636};
628637
src/mame/drivers/rockola.c
r5046r5047
768768   NULL,      /* before pixel update callback */
769769   NULL,      /* row update callback */
770770   NULL,      /* after pixel update callback */
771   NULL,      /* callback for display state changes */
772   NULL,      /* HSYNC callback */
773   NULL      /* VSYNC callback */
771   DEVCB_NULL,   /* callback for display state changes */
772   DEVCB_NULL,   /* callback for cursor state changes */
773   DEVCB_NULL,   /* HSYNC callback */
774   DEVCB_NULL,   /* VSYNC callback */
775   NULL      /* update address callback */
774776};
775777
776778
src/mame/drivers/magicfly.c
r5046r5047
741741   NULL,      /* before pixel update callback */
742742   NULL,      /* row update callback */
743743   NULL,      /* after pixel update callback */
744   NULL,      /* callback for display state changes */
745   NULL,      /* HSYNC callback */
746   NULL      /* VSYNC callback */
744   DEVCB_NULL,   /* callback for display state changes */
745   DEVCB_NULL,   /* callback for cursor state changes */
746   DEVCB_NULL,   /* HSYNC callback */
747   DEVCB_NULL,   /* VSYNC callback */
748   NULL      /* update address callback */
747749};
748750
749751
src/mame/drivers/mpu4drvr.c
r5046r5047
16331633}
16341634
16351635
1636static MC6845_ON_VSYNC_CHANGED( dealem_vsync_changed )
1636static WRITE_LINE_DEVICE_HANDLER( dealem_vsync_changed )
16371637{
1638   cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_NMI, vsync);
1638   cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_NMI, state);
16391639}
16401640
16411641/*************************************
r5046r5047
16461646
16471647static const mc6845_interface hd6845_intf =
16481648{
1649   "screen",               /* screen we are acting on */
1650   8,                     /* number of pixels per video memory address */
1651   NULL,                  /* before pixel update callback */
1652   NULL,                  /* row update callback */
1653   NULL,                  /* after pixel update callback */
1654   NULL,                  /* callback for display state changes */
1655   NULL,                  /* HSYNC callback */
1656   dealem_vsync_changed      /* VSYNC callback */
1649   "screen",                     /* screen we are acting on */
1650   8,                           /* number of pixels per video memory address */
1651   NULL,                        /* before pixel update callback */
1652   NULL,                        /* row update callback */
1653   NULL,                        /* after pixel update callback */
1654   DEVCB_NULL,                     /* callback for display state changes */
1655   DEVCB_NULL,                     /* callback for cursor state changes */
1656   DEVCB_NULL,                     /* HSYNC callback */
1657   DEVCB_LINE(dealem_vsync_changed),   /* VSYNC callback */
1658   NULL                        /* update address callback */
16571659};
16581660
16591661
src/mame/drivers/metro.c
r5046r5047
47784778   /* ROM7.27 not populated?  */
47794779ROM_END
47804780
4781ROM_START( gstrik2e )
4782   ROM_REGION( 0x200000, "maincpu", 0 )   /* 68000 */
4783   ROM_LOAD16_BYTE( "hum_003_g2f.rom1.u107", 0x000000, 0x80000, CRC(2712d9ca) SHA1(efa967de931728534a663fa1529e92003afbb3e9) )
4784   ROM_LOAD16_BYTE( "hum_003_g2f.rom2.u108", 0x000001, 0x80000, CRC(86785c64) SHA1(ef172d6e859a68eb80f7c127b61883d50eefb0fe) )
4785   ROM_LOAD16_BYTE( "prg2.109", 0x100000, 0x80000, BAD_DUMP CRC(ead86919) SHA1(eb9b68dff4e08d90ac90043c7f3021914caa007d) )
4786   ROM_LOAD16_BYTE( "prg3.110", 0x100001, 0x80000, BAD_DUMP CRC(e0b026e3) SHA1(05f75c0432efda3dec0372199382e310bb268fba) )
4787
4788   ROM_REGION( 0x20000, "audiocpu", 0 )   /* Z80 */
4789   ROM_LOAD( "sprg.30", 0x0000, 0x20000, BAD_DUMP CRC(aeef6045) SHA1(61b8c89ca495d3aac79e53413a85dd203db816f3) )
4790
4791   ROM_REGION( 0x1000000, "gfx1", 0 )   /* Gfx + Data (Addressable by CPU & Blitter) */
4792   ROMX_LOAD( "chr0.80", 0x0000000, 0x200000, BAD_DUMP CRC(f63a52a9) SHA1(1ad52bb3a051eaffe8fb6ba49d4fc1d0b6144156) , ROM_GROUPWORD | ROM_SKIP(6))
4793   ROMX_LOAD( "chr1.79", 0x0000002, 0x200000, BAD_DUMP CRC(4110c184) SHA1(90ccb3d50eff7a655336cfa9c072f7213589e64c) , ROM_GROUPWORD | ROM_SKIP(6))
4794   ROMX_LOAD( "chr2.78", 0x0000004, 0x200000, BAD_DUMP CRC(ddb4b9ee) SHA1(0e2c151c3690b9c3d298dda8842e283660d37386) , ROM_GROUPWORD | ROM_SKIP(6))
4795   ROMX_LOAD( "chr3.77", 0x0000006, 0x200000, BAD_DUMP CRC(5ab367db) SHA1(adf8749451f4583f8e9e00ab61f3408d804a7265) , ROM_GROUPWORD | ROM_SKIP(6))
4796   ROMX_LOAD( "chr4.84", 0x0800000, 0x200000, BAD_DUMP CRC(77d7ef99) SHA1(8f5cf72f5919fe9363e7549e0bb1b3ee633cec3b) , ROM_GROUPWORD | ROM_SKIP(6))
4797   ROMX_LOAD( "chr5.83", 0x0800002, 0x200000, BAD_DUMP CRC(a4d49e95) SHA1(9789bacba7876100e0f0293f54c81def545ed068) , ROM_GROUPWORD | ROM_SKIP(6))
4798   ROMX_LOAD( "chr6.82", 0x0800004, 0x200000, BAD_DUMP CRC(32eb33b0) SHA1(2ea06484ca326b44a35ee470343147a9d91d5626) , ROM_GROUPWORD | ROM_SKIP(6))
4799   ROMX_LOAD( "chr7.81", 0x0800006, 0x200000, BAD_DUMP CRC(2d30a21e) SHA1(749e86b7935ef71556eaee4caf6f954634e9bcbf) , ROM_GROUPWORD | ROM_SKIP(6))
4800   /* not populated */
4801//  ROMX_LOAD( "chr8.88", 0x1000000, 0x200000, CRC() SHA1() , ROM_GROUPWORD | ROM_SKIP(6))
4802//  ROMX_LOAD( "chr9.87", 0x1000002, 0x200000, CRC() SHA1() , ROM_GROUPWORD | ROM_SKIP(6))
4803//  ROMX_LOAD( "chr10.86", 0x1000004, 0x200000, CRC() SHA1() , ROM_GROUPWORD | ROM_SKIP(6))
4804//  ROMX_LOAD( "chr11.85", 0x1000006, 0x200000, CRC() SHA1() , ROM_GROUPWORD | ROM_SKIP(6))
4805//  ROMX_LOAD( "chr12.92", 0x1800000, 0x200000, CRC() SHA1() , ROM_GROUPWORD | ROM_SKIP(6))
4806//  ROMX_LOAD( "chr13.91", 0x1800002, 0x200000, CRC() SHA1() , ROM_GROUPWORD | ROM_SKIP(6))
4807//  ROMX_LOAD( "chr14.90", 0x1800004, 0x200000, CRC() SHA1() , ROM_GROUPWORD | ROM_SKIP(6))
4808//  ROMX_LOAD( "chr15.89", 0x1800006, 0x200000, CRC() SHA1() , ROM_GROUPWORD | ROM_SKIP(6))
4809
4810   ROM_REGION( 0x200000, "gfx3", ROMREGION_DISPOSE )   /* 053936 gfx data */
4811   ROM_LOAD( "psacrom.60", 0x000000, 0x200000,  BAD_DUMP CRC(73f1f279) SHA1(1135b2b1eb4c52249bc12ee178340bbb202a94c8) )
4812
4813   ROM_REGION( 0x200000, "ym.deltat", 0 )   /* Samples */
4814   ROM_LOAD( "sndpcm-b.22", 0x000000, 0x200000, BAD_DUMP CRC(a5d844d2) SHA1(18d644545f0844e66aa53775b67b0a29c7b7c31b) )
4815
4816   ROM_REGION( 0x400000, "ym", 0 )   /* ? YRW801-M ? */
4817   ROM_LOAD( "sndpcm-a.23", 0x000000, 0x200000, BAD_DUMP CRC(e6d32373) SHA1(8a79d4ea8b27d785fffd80e38d5ae73b7cea7304) )
4818   /* ROM7.27 not populated?  */
4819ROM_END
4820
47814821/***************************************************************************
47824822
47834823Daitoride
r5046r5047
58525892GAME( 1996, balcube,  0,        balcube,  balcube,  balcube,  ROT0,   "Metro",                                  "Bal Cube",                          0 )
58535893GAME( 1996, bangball, 0,        bangball, bangball, balcube,  ROT0,   "Banpresto / Kunihiko Tashiro+Goodhouse", "Bang Bang Ball (v1.05)",            0 )
58545894GAME( 1996, gstrik2,  0,        gstrik2,  gstrik2,  blzntrnd, ROT0,   "Human Amusement",                        "Grand Striker 2 (Japan)",           GAME_IMPERFECT_GRAPHICS ) // priority between rounds
5895GAME( 1996, gstrik2e, gstrik2,  gstrik2,  gstrik2,  blzntrnd, ROT0,   "Human Amusement",                        "Grand Striker 2 (Europe and Oceania)", GAME_IMPERFECT_GRAPHICS )
58555896GAME( 1999, batlbubl, bangball, batlbubl, batlbubl, balcube,  ROT0,   "Limenko",                                "Battle Bubble (v2.00)",             0 )
58565897GAME( 1996, mouja,    0,        mouja,    mouja,    mouja,    ROT0,   "Etona",                                  "Mouja (Japan)",                     GAME_NO_COCKTAIL )
58575898GAME( 1997, gakusai,  0,        gakusai,  gakusai,  gakusai,  ROT0,   "MakeSoft",                               "Mahjong Gakuensai (Japan)",         GAME_IMPERFECT_GRAPHICS )
src/mame/drivers/usgames.c
r5046r5047
229229   NULL,      /* before pixel update callback */
230230   NULL,      /* row update callback */
231231   NULL,      /* after pixel update callback */
232   NULL,      /* callback for display state changes */
233   NULL,      /* HSYNC callback */
234   NULL      /* VSYNC callback */
232   DEVCB_NULL,   /* callback for display state changes */
233   DEVCB_NULL,   /* callback for cursor state changes */
234   DEVCB_NULL,   /* HSYNC callback */
235   DEVCB_NULL,   /* VSYNC callback */
236   NULL      /* update address callback */
235237};
236238
237239
src/mame/drivers/bagman.c
r5046r5047
189189   AM_RANGE(0xa004, 0xa004) AM_WRITE(bagman_coin_counter_w)
190190   AM_RANGE(0xb000, 0xb000) AM_READ_PORT("DSW")
191191   AM_RANGE(0xb800, 0xb800) AM_READNOP
192   AM_RANGE(0xc000, 0xffff) AM_ROM      /* Super Bagman only */
193192
194193#if 0
195194   AM_RANGE(0xa007, 0xa007) AM_WRITENOP   /* ???? */
src/mame/drivers/liberate.c
r5046r5047
3030
3131static int deco16_bank;
3232static UINT8 *scratchram;
33UINT8 *prosoccr_charram;
34UINT8 *prosport_bg_vram;
3335
3436WRITE8_HANDLER( deco16_io_w );
37WRITE8_HANDLER( prosoccr_io_w );
38WRITE8_HANDLER( prosport_io_w );
3539WRITE8_HANDLER( prosport_paletteram_w );
3640WRITE8_HANDLER( liberate_videoram_w );
41WRITE8_HANDLER( liberate_colorram_w );
3742
3843/*************************************
3944 *
r5046r5047
5055      return ROM[offset];
5156
5257   /* Else the handler falls through to read the usual address */
53   if (offset<0x800) return videoram[offset];
58   if (offset<0x400) return colorram[offset];
59   if (offset<0x800) return videoram[offset-0x400];
5460   if (offset<0x1000) return spriteram[offset-0x800];
5561   if (offset<0x2200) { logerror("%04x: Unmapped bank read %04x\n",cpu_get_pc(space->cpu),offset); return 0; }
5662   if (offset<0x2800) return scratchram[offset-0x2200];
r5046r5047
8187      memory_install_read8_handler(cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x8000, 0x800f, 0, 0, (read8_space_func)SMH_BANK(1));
8288}
8389
90static UINT8 gfx_rom_readback;
91
92static READ8_HANDLER( prosoccr_bank_r )
93{
94   const UINT8 *ROM = memory_region(space->machine, "user1");
95
96   /* The tilemap bank can be swapped into main memory */
97   if (deco16_bank)
98      return ROM[offset];
99
100   /* Else the handler falls through to read the usual address */
101   if (offset<0x400) return colorram[offset];
102   if (offset<0x800) return videoram[offset-0x400];
103   if (offset<0xc00) return colorram[offset-0x800];
104   if (offset<0x1000) return spriteram[offset-0xc00];
105   if (offset<0x2200) { logerror("%04x: Unmapped bank read %04x\n",cpu_get_pc(space->cpu),offset); return 0; }
106   if (offset<0x2800) return scratchram[offset-0x2200];
107
108   logerror("%04x: Unmapped bank read %04x\n",cpu_get_pc(space->cpu),offset);
109   return 0;
110}
111
112static READ8_HANDLER( prosoccr_charram_r )
113{
114   UINT8 *SRC_GFX = memory_region(space->machine, "shared_gfx");
115
116   if(gfx_rom_readback)
117   {
118      switch(offset & 0x1800)
119      {
120         case 0x0000:
121            return SRC_GFX[(offset & 0x7ff)+(0x0000)+0x0000];
122         case 0x0800:
123            return SRC_GFX[(offset & 0x7ff)+(0x0000)+0x2000];
124         case 0x1000:
125            return SRC_GFX[(offset & 0x7ff)+(0x0000)+0x4000];
126      }
127   }
128
129   /* note: gfx_rom_readback == 1 never happens. */
130   return prosoccr_charram[offset+gfx_rom_readback*0x1800];
131}
132
133static WRITE8_HANDLER( prosoccr_charram_w )
134{
135   UINT8 *FG_GFX = memory_region(space->machine, "fg_gfx");
136
137   if(deco16_bank)
138   {
139      prosoccr_io_w(space,offset & 0xf,data);
140   }
141   else
142   {
143      /* note: gfx_rom_readback == 1 never happens. */
144      prosoccr_charram[offset+gfx_rom_readback*0x1800] = data;
145
146      switch(offset & 0x1800)
147      {
148         case 0x0000:
149            FG_GFX[(offset & 0x7ff)+(0x0000)+0x0000] = data;
150            //FG_GFX[(offset & 0x7ff)+(0x1800)+0x0000] = data;
151            break;
152         case 0x0800:
153            FG_GFX[(offset & 0x7ff)+(0x0000)+0x2000] = data;
154            //FG_GFX[(offset & 0x7ff)+(0x1800)+0x2000] = data;
155            break;
156         case 0x1000:
157            FG_GFX[(offset & 0x7ff)+(0x0000)+0x4000] = data;
158            //FG_GFX[(offset & 0x7ff)+(0x1800)+0x4000] = data;
159            break;
160      }
161   }
162
163   offset&=0x7ff;
164
165   /* dirty char */
166    gfx_element_mark_dirty(space->machine->gfx[0], offset >> 3);
167//  gfx_element_mark_dirty(space->machine->gfx[0], (offset|0x1800) >> 3);
168}
169
170static WRITE8_HANDLER( prosoccr_char_bank_w )
171{
172   gfx_rom_readback = data & 1; //enable GFX rom read-back
173   if(data & 0xfe)
174      printf("%02x\n",data);
175}
176
177static WRITE8_HANDLER( prosoccr_io_bank_w )
178{
179   deco16_bank = data & 1;
180
181   if (deco16_bank)
182      memory_install_read8_handler(cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x8000, 0x800f, 0, 0, deco16_io_r);
183   else
184      memory_install_read8_handler(cputag_get_address_space(space->machine, "maincpu", ADDRESS_SPACE_PROGRAM), 0x8000, 0x800f, 0, 0, prosoccr_charram_r);
185
186}
187
188static READ8_HANDLER( prosport_charram_r )
189{
190   UINT8 *FG_GFX = memory_region(space->machine, "progolf_fg_gfx");
191
192   switch(offset & 0x1800)
193   {
194      case 0x0000:
195         return FG_GFX[(offset & 0x7ff)+(0x0800)+0x0000];
196         //FG_GFX[(offset & 0x7ff)+(0x1800)+0x0000] = data;
197      case 0x0800:
198         return FG_GFX[(offset & 0x7ff)+(0x0800)+0x2000];
199         //FG_GFX[(offset & 0x7ff)+(0x1800)+0x2000] = data;
200      case 0x1000:
201         return FG_GFX[(offset & 0x7ff)+(0x0800)+0x4000];
202         //FG_GFX[(offset & 0x7ff)+(0x1800)+0x4000] = data;
203   }
204
205   return 0;
206}
207
208static WRITE8_HANDLER( prosport_charram_w )
209{
210   UINT8 *FG_GFX = memory_region(space->machine, "progolf_fg_gfx");
211
212   switch(offset & 0x1800)
213   {
214      case 0x0000:
215         FG_GFX[(offset & 0x7ff)+(0x0800)+0x0000] = data;
216         //FG_GFX[(offset & 0x7ff)+(0x1800)+0x0000] = data;
217         break;
218      case 0x0800:
219         FG_GFX[(offset & 0x7ff)+(0x0800)+0x2000] = data;
220         //FG_GFX[(offset & 0x7ff)+(0x1800)+0x2000] = data;
221         break;
222      case 0x1000:
223         FG_GFX[(offset & 0x7ff)+(0x0800)+0x4000] = data;
224         //FG_GFX[(offset & 0x7ff)+(0x1800)+0x4000] = data;
225         break;
226   }
227
228   offset&=0x7ff;
229
230   /* dirty char */
231    gfx_element_mark_dirty(space->machine->gfx[3], (offset+0x800) >> 3);
232    gfx_element_mark_dirty(space->machine->gfx[3+4], (offset+0x800) >> 5);
233}
234
235
84236/*************************************
85237 *
86238 *  Memory handlers
r5046r5047
89241
90242static ADDRESS_MAP_START( prosport_map, ADDRESS_SPACE_PROGRAM, 8 )
91243   AM_RANGE(0x0200, 0x021f) AM_RAM_WRITE(prosport_paletteram_w) AM_BASE(&paletteram)
92   AM_RANGE(0x0000, 0x0fff) AM_RAM
93   AM_RANGE(0x3000, 0x37ff) AM_WRITE(liberate_videoram_w) AM_BASE(&videoram)
94   AM_RANGE(0x3800, 0x3fff) AM_WRITEONLY AM_BASE(&spriteram)
95   AM_RANGE(0x8000, 0x800f) AM_WRITE(deco16_io_w)
244   AM_RANGE(0x0400, 0x07ff) AM_RAM AM_BASE(&prosport_bg_vram)
245   AM_RANGE(0x0000, 0x03ff) AM_SHARE(2) AM_RAM
246//  AM_RANGE(0x0e00, 0x0fff) AM_RAM
247//  AM_RANGE(0x1600, 0x17ff) AM_RAM
248//  AM_RANGE(0x1e00, 0x1fff) AM_RAM
249   AM_RANGE(0x0800, 0x1fff) AM_READWRITE(prosport_charram_r,prosport_charram_w) //0x1e00-0x1ff isn't charram!
250//  AM_RANGE(0x2000, 0x2fff) AM_RAM //likely i/o
251   AM_RANGE(0x2000, 0x23ff) AM_SHARE(2) AM_RAM
252   AM_RANGE(0x2800, 0x2bff) AM_RAM
253//  AM_RANGE(0x2800, 0x2fff) AM_SHARE(2) AM_RAM
254   AM_RANGE(0x3000, 0x33ff) AM_RAM_WRITE(liberate_colorram_w) AM_BASE(&colorram)
255   AM_RANGE(0x3400, 0x37ff) AM_RAM_WRITE(liberate_videoram_w) AM_BASE(&videoram)
256   AM_RANGE(0x3800, 0x3fff) AM_RAM AM_BASE(&spriteram)
257   AM_RANGE(0x8000, 0x800f) AM_WRITE(prosport_io_w)
96258   AM_RANGE(0x8000, 0x800f) AM_ROMBANK(1)
97259   AM_RANGE(0x4000, 0xffff) AM_ROM
98260ADDRESS_MAP_END
r5046r5047
101263   AM_RANGE(0x0000, 0x0fff) AM_RAM
102264   AM_RANGE(0x1000, 0x3fff) AM_ROM /* Mirror of main rom */
103265   AM_RANGE(0x4000, 0x7fff) AM_READ(deco16_bank_r)
104   AM_RANGE(0x4000, 0x47ff) AM_WRITE(liberate_videoram_w) AM_BASE(&videoram)
266   AM_RANGE(0x4000, 0x43ff) AM_WRITE(liberate_colorram_w) AM_BASE(&colorram)
267   AM_RANGE(0x4400, 0x47ff) AM_WRITE(liberate_videoram_w) AM_BASE(&videoram)
105268   AM_RANGE(0x4800, 0x4fff) AM_WRITEONLY AM_BASE(&spriteram)
106269   AM_RANGE(0x6200, 0x67ff) AM_RAM AM_BASE(&scratchram)
107270   AM_RANGE(0x8000, 0x800f) AM_WRITE(deco16_io_w)
r5046r5047
109272   AM_RANGE(0x8000, 0xffff) AM_ROM
110273ADDRESS_MAP_END
111274
275static ADDRESS_MAP_START( prosoccr_map, ADDRESS_SPACE_PROGRAM, 8 )
276   AM_RANGE(0x0000, 0x0fff) AM_RAM
277   AM_RANGE(0x1000, 0x3fff) AM_ROM /* Mirror of main rom */
278   AM_RANGE(0x4000, 0x7fff) AM_READ(prosoccr_bank_r)
279   AM_RANGE(0x4000, 0x43ff) AM_MIRROR(0x800) AM_WRITE(liberate_colorram_w) AM_BASE(&colorram)
280   AM_RANGE(0x4400, 0x47ff) AM_WRITE(liberate_videoram_w) AM_BASE(&videoram)
281   AM_RANGE(0x4c00, 0x4fff) AM_WRITEONLY AM_BASE(&spriteram)
282   AM_RANGE(0x6200, 0x67ff) AM_RAM AM_BASE(&scratchram)
283   AM_RANGE(0x8000, 0x97ff) AM_READWRITE(prosoccr_charram_r,prosoccr_charram_w)
284   AM_RANGE(0x9800, 0x9800) AM_WRITE(prosoccr_char_bank_w)
285   AM_RANGE(0xa000, 0xffff) AM_ROM
286ADDRESS_MAP_END
287
112288static ADDRESS_MAP_START( deco16_io_map, ADDRESS_SPACE_IO, 8 )
113289   AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_WRITE(deco16_bank_w)
290   AM_RANGE(0x01, 0x01) AM_READ_PORT("TILT")
114291ADDRESS_MAP_END
115292
293static ADDRESS_MAP_START( prosoccr_io_map, ADDRESS_SPACE_IO, 8 )
294   AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_WRITE(prosoccr_io_bank_w)
295   //AM_RANGE(0x01, 0x01) AM_READ_PORT("TILT")
296ADDRESS_MAP_END
297
116298static ADDRESS_MAP_START( liberatb_map, ADDRESS_SPACE_PROGRAM, 8 )
117299   AM_RANGE(0x00fe, 0x00fe) AM_READ_PORT("IN0")
118300   AM_RANGE(0x0000, 0x0fff) AM_RAM
119301   AM_RANGE(0x1000, 0x3fff) AM_ROM /* Mirror of main rom */
120302   AM_RANGE(0x4000, 0x7fff) AM_READ(deco16_bank_r)
121   AM_RANGE(0x4000, 0x47ff) AM_WRITE(liberate_videoram_w) AM_BASE(&videoram)
303   AM_RANGE(0x4000, 0x43ff) AM_WRITE(liberate_colorram_w) AM_BASE(&colorram)
304   AM_RANGE(0x4400, 0x47ff) AM_WRITE(liberate_videoram_w) AM_BASE(&videoram)
122305   AM_RANGE(0x4800, 0x4fff) AM_WRITEONLY AM_BASE(&spriteram)
123306   AM_RANGE(0x6200, 0x67ff) AM_WRITEONLY AM_BASE(&scratchram)
124307   AM_RANGE(0xf000, 0xf00f) AM_WRITE(deco16_io_w)
r5046r5047
136319 *
137320 *************************************/
138321
139#if 0
140322static ADDRESS_MAP_START( prosoccr_sound_map, ADDRESS_SPACE_PROGRAM, 8 )
141323   AM_RANGE(0x0000, 0x01ff) AM_RAM
142324   AM_RANGE(0x2000, 0x2000) AM_DEVWRITE("ay1", ay8910_data_w)
143325   AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("ay1", ay8910_address_w)
144326   AM_RANGE(0x6000, 0x6000) AM_DEVWRITE("ay2", ay8910_data_w)
145   AM_RANGE(0x8000, 0x8000) AM_DEVWRITE(SOUND, "ay2", ay8910_address_w)
327   AM_RANGE(0x8000, 0x8000) AM_DEVWRITE("ay2", ay8910_address_w)
146328   AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r)
329   AM_RANGE(0xc000, 0xc000) AM_WRITENOP //irq ack
147330   AM_RANGE(0xe000, 0xffff) AM_ROM
148331ADDRESS_MAP_END
149#endif
150332
151333static ADDRESS_MAP_START( liberate_sound_map, ADDRESS_SPACE_PROGRAM, 8 )
152334   AM_RANGE(0x0000, 0x01ff) AM_RAM
r5046r5047
248430   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
249431   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
250432   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
433
434   PORT_START("TILT")
435   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_TILT )
436   PORT_BIT( 0xfd, IP_ACTIVE_HIGH, IPT_UNKNOWN )
251437INPUT_PORTS_END
252438
253439/*************************************
r5046r5047
305491   PORT_DIPNAME( 0x80, 0x80, "Invincibility (Cheat)" )
306492   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
307493   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
494
495   PORT_MODIFY("TILT")
496   PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
308497INPUT_PORTS_END
309498
310499static INPUT_PORTS_START( yellowcb )
r5046r5047
363552   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
364553   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
365554   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
555
556   PORT_MODIFY("TILT")
557   PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
366558INPUT_PORTS_END
367559
560static INPUT_PORTS_START( prosoccr )
561   PORT_INCLUDE( generic_input )
562
563   PORT_MODIFY("DSW1")
564   PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_B ) ) //maybe reversed coins actually?
565   PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
566   PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
567   PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
568   PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
569   PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_A ) )
570   PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
571   PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
572   PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
573   PORT_DIPSETTING(    0x04, DEF_STR( 1C_3C ) )
574   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
575   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
576   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
577   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
578   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
579   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
580   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
581   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
582   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
583   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
584   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
585   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
586
587   PORT_MODIFY("DSW2")
588   PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
589   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
590   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
591   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
592   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
593   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
594   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
595   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
596   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
597   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
598   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
599   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
600   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
601   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
602   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
603   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
604   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
605   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
606   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
607   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
608   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
609   PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) )
610   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
611   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
612INPUT_PORTS_END
613
368614/*************************************
369615 *
370616 *  Graphics definitions
r5046r5047
394640   16*16
395641};
396642
397static const gfx_layout pro_tiles =
643static const gfx_layout tiles1 =
398644{
399645   16,16,
400   16,
401   2,
402   { 0, 4 },
646   128,
647   3,
648   { 4, 0, 0x4000*8+4 },
403649   {
404       24,25,26,27, 16,17,18,19, 8,9,10,11, 0,1,2,3
650      24,25,26,27, 16,17,18,19, 8,9,10,11, 0,1,2,3
405651   },
406652   {
407653      0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
r5046r5047
410656   64*8
411657};
412658
413static const gfx_layout tiles1 =
659static const gfx_layout tiles2 =
414660{
415661   16,16,
416662   128,
417663   3,
418   { 4, 0, 0x4000*8+4 },
664   { 0x2000*8+4, 0x2000*8+0, 0x4000*8 },
419665   {
420666      24,25,26,27, 16,17,18,19, 8,9,10,11, 0,1,2,3
421667   },
422   {
423      0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
424         8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32
425   },
668   { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
669         8*32, 9*32, 10*32, 11*32, 12*32, 13*32, 14*32, 15*32 },
426670   64*8
427671};
428672
429static const gfx_layout tiles2 =
673static const gfx_layout prosoccr_bg_gfx =
430674{
431675   16,16,
432   128,
676   RGN_FRAC(1,2),
433677   3,
434   { 0x2000*8+4, 0x2000*8+0, 0x4000*8 },
678   { RGN_FRAC(0,2)+4, RGN_FRAC(0,2)+0, RGN_FRAC(1,2)+4 },
435679   {
436680      24,25,26,27, 16,17,18,19, 8,9,10,11, 0,1,2,3
437681   },
r5046r5047
440684   64*8
441685};
442686
687static const gfx_layout pro_tiles =
688{
689   16,16,
690   RGN_FRAC(1,2),
691   3,
692    { 4,0, RGN_FRAC(1,2)+4 },
693   { 384+0, 384+1, 384+2, 384+3,
694     256+0, 256+1, 256+2, 256+3,
695     128+0, 128+1, 128+2, 128+3,
696     0,1,2,3 },
697   { 0*8, 1*8, 2*8, 3*8,4*8,5*8,6*8,7*8,8*8,9*8,10*8,11*8,12*8,13*8,14*8,15*8 },
698   512
699};
700
701
443702static GFXDECODE_START( liberate )
444703   GFXDECODE_ENTRY( "gfx1", 0x00000, charlayout,  0, 4 )
445704   GFXDECODE_ENTRY( "gfx1", 0x00000, sprites,     0, 4 )
r5046r5047
448707GFXDECODE_END
449708
450709static GFXDECODE_START( prosport )
451   GFXDECODE_ENTRY( "gfx1", 0x00000, charlayout,  0, 4 )
452   GFXDECODE_ENTRY( "gfx1", 0x00000, sprites,     0, 4 )
453   GFXDECODE_ENTRY( "gfx2", 0x00000, pro_tiles,   0, 4 )
454   GFXDECODE_ENTRY( "gfx2", 0x00800, pro_tiles,   0, 4 )
710   GFXDECODE_ENTRY( "prosport_fg_gfx",  0x00000, charlayout,  0, 4 )
711   GFXDECODE_ENTRY( "protenns_fg_gfx",  0x00000, charlayout,  0, 4 )
712   GFXDECODE_ENTRY( "probowl_fg_gfx",   0x00000, charlayout,  0, 4 )
713   GFXDECODE_ENTRY( "progolf_fg_gfx",   0x00000, charlayout,  0, 4 )
714   GFXDECODE_ENTRY( "prosport_fg_gfx",  0x00000, sprites,  0, 4 )
715   GFXDECODE_ENTRY( "protenns_fg_gfx",  0x00000, sprites,  0, 4 )
716   GFXDECODE_ENTRY( "probowl_fg_gfx",   0x00000, sprites,  0, 4 )
717   GFXDECODE_ENTRY( "progolf_fg_gfx",   0x00000, sprites,  0, 4 )
718   GFXDECODE_ENTRY( "gfx2", 0x00000, pro_tiles,   0, 4 ) //backgrounds
455719GFXDECODE_END
456720
721static GFXDECODE_START( prosoccr )
722   GFXDECODE_ENTRY( "fg_gfx", 0x00000, charlayout,        0, 4 )
723   GFXDECODE_ENTRY( "sp_gfx", 0x00000, sprites,           0, 4 )
724   GFXDECODE_ENTRY( "bg_gfx", 0x00000, prosoccr_bg_gfx,   8, 2 )
725GFXDECODE_END
726
457727/*************************************
458728 *
459729 *  Deco16 interrupts
r5046r5047
476746   }
477747}
478748
749#if 0
750static INTERRUPT_GEN( prosport_interrupt )
751{
752   /* ??? */
753   cpu_set_input_line(device, DECO16_IRQ_LINE, ASSERT_LINE);
754}
755#endif
756
479757/*************************************
480758 *
481759 *  Machine driver(s)
r5046r5047
545823
546824   /* basic machine hardware */
547825   MDRV_CPU_MODIFY("maincpu")
548   MDRV_CPU_CLOCK(3000000)
549   MDRV_CPU_PROGRAM_MAP(liberate_map)
550   MDRV_CPU_IO_MAP(deco16_io_map)
826   MDRV_CPU_CLOCK(12000000/8) //xtal is 12 Mhz, divider is unknown
827   MDRV_CPU_PROGRAM_MAP(prosoccr_map)
828   MDRV_CPU_IO_MAP(prosoccr_io_map)
551829
830   MDRV_CPU_MODIFY("audiocpu")
831   MDRV_CPU_PROGRAM_MAP(prosoccr_sound_map)
832
833   MDRV_SCREEN_MODIFY("screen")
834   MDRV_SCREEN_VISIBLE_AREA(1*8, 31*8-1, 0*8, 32*8-1)
835
836   MDRV_GFXDECODE(prosoccr)
837
552838   MDRV_VIDEO_START(prosoccr)
553839   MDRV_VIDEO_UPDATE(prosoccr)
554840MACHINE_DRIVER_END
r5046r5047
559845   MDRV_CPU_ADD("maincpu", DECO16, 2000000)
560846   MDRV_CPU_PROGRAM_MAP(prosport_map)
561847   MDRV_CPU_IO_MAP(deco16_io_map)
848   MDRV_CPU_VBLANK_INT("screen", deco16_interrupt)
562849
563   MDRV_CPU_ADD("audiocpu", M6502, 1500000)
850   MDRV_CPU_ADD("audiocpu", M6502, 1500000/2)
564851   MDRV_CPU_PROGRAM_MAP(liberate_sound_map)
565852   MDRV_CPU_PERIODIC_INT(nmi_line_pulse,16*60) /* ??? */
566853
r5046r5047
599886
600887ROM_START( prosoccr )
601888   ROM_REGION(0x10000, "maincpu", 0)
602   ROM_LOAD( "am07.7e",  0x8000, 0x2000, CRC(55415fb5) SHA1(676feb07d4fbd76aae8349b46f7edc8f357f2ddf) )
603889   ROM_LOAD( "am08.9e",  0xa000, 0x2000, CRC(73d45d0d) SHA1(07736286087478af404bd9c6b279d631a01cf4e2) )
604890   ROM_LOAD( "am09.10e", 0xc000, 0x2000, CRC(a7ee0b3a) SHA1(87e487f863bd90c5b979c2d3c4317869ba1d71d9) )
605891   ROM_LOAD( "am10.11e", 0xe000, 0x2000, CRC(5571bdb8) SHA1(a3740650453c9e4f78dcc7826eb112d0d9f65b22) )
r5046r5047
607893   ROM_REGION( 0x10000, "audiocpu", 0 )
608894   ROM_LOAD( "am06.10a", 0xe000, 0x2000, CRC(37a0c74f) SHA1(5757b9eaf5b1129ee2d03b0ab6c3b15c120cf43c) )
609895
610   ROM_REGION( 0x6000, "gfx1", ROMREGION_DISPOSE )
896   ROM_REGION( 0x6000, "shared_gfx", 0 ) // gfxs for foreground and sprites
611897   ROM_LOAD( "am00.2b",  0x0000, 0x2000, CRC(f3c8b649) SHA1(d2d42484e80d9241dac77a78c68314f88e0cbe5d) )
612898   ROM_LOAD( "am01.5b",  0x2000, 0x2000, CRC(24785bda) SHA1(536bdda766b46771223f01e463fa4c61e0dd545c) )
613899   ROM_LOAD( "am02.7b",  0x4000, 0x2000, CRC(c5af58ea) SHA1(a73d537b88befb76d67cc17d241e78c572c5b737) )
614900
615   ROM_REGION( 0x8000, "gfx2", ROMREGION_DISPOSE )
901   ROM_REGION( 0x6000, "fg_gfx", ROMREGION_ERASE00 )
902   ROM_COPY( "shared_gfx", 0x0800, 0x0800, 0x1800 )
903   ROM_COPY( "shared_gfx", 0x2800, 0x2800, 0x1800 )
904   ROM_COPY( "shared_gfx", 0x4800, 0x4800, 0x1800 )
905
906   ROM_REGION( 0x6000, "sp_gfx", 0 )
907   ROM_COPY( "shared_gfx", 0x0000, 0x0000, 0x2000 )
908   ROM_COPY( "shared_gfx", 0x2000, 0x2000, 0x2000 )
909   ROM_COPY( "shared_gfx", 0x4000, 0x4000, 0x2000 )
910
911   ROM_REGION( 0x4000, "bg_gfx", ROMREGION_DISPOSE )
616912   ROM_LOAD( "am03.10b", 0x0000, 0x2000, CRC(47dc31dc) SHA1(7f492477e30a0353251a43e7e726551c3861b63f) )
617913   ROM_LOAD( "am04.c10", 0x2000, 0x2000, CRC(e057d827) SHA1(81ca4351777de5c32f4cf65547287c8169ba1494) )
618914
619915   ROM_REGION(0x04000, "user1", 0 )
620   ROM_LOAD( "am05.d12", 0x0000, 0x2000,  CRC(f63e5a73) SHA1(50e7a1a0eb3bf8df3264bcba441c5fbd7dec52f4) )
916   ROM_LOAD( "am05.d12", 0x0000, 0x2000, CRC(f63e5a73) SHA1(50e7a1a0eb3bf8df3264bcba441c5fbd7dec52f4) )
917   ROM_LOAD( "am07.7e",  0x2000, 0x2000, CRC(55415fb5) SHA1(676feb07d4fbd76aae8349b46f7edc8f357f2ddf) )
621918
622919   ROM_REGION( 64, "proms", 0 )
623920   ROM_LOAD( "k1",    0, 32,  CRC(ebdc8343) SHA1(c9ae04da662f40237de24f5f01e97051e99e8c15) ) /* Colour */
r5046r5047
637934   ROM_LOAD( "ic43ar16.bin", 0xc000, 0x2000,  CRC(113a4f89) SHA1(abbc7f5ad543f3500c0194100d236ac942e4739f) )
638935   ROM_LOAD( "ic42ar15.bin", 0xe000, 0x2000,  CRC(635425a6) SHA1(2b95c3252046462f8886a309d02ea3a15b693780) )
639936
640   ROM_REGION( 0x12000, "gfx1", ROMREGION_DISPOSE )
937   ROM_REGION( 0x12000, "fg_gfx_src", 0 )
641938   ROM_LOAD( "ic52ar00.bin",   0x00000, 0x2000, CRC(1e16adde) SHA1(229f68a687cbc9ac0d393e4db49d91f646eea7a6) )
642939   ROM_LOAD( "ic53ar01.bin",   0x02000, 0x2000, CRC(4b7a6431) SHA1(a8a23dffc3bf9fb3b806985272822904578e460e) )
643940   ROM_LOAD( "ic54ar02.bin",   0x04000, 0x2000, CRC(039eba80) SHA1(bd15f707f4d5dded8dd3373de5cb2a8d91a731d6) )
r5046r5047
650947   ROM_LOAD( "ic59ar07.bin",   0x0e000, 0x2000, CRC(e6527838) SHA1(e40acbcfda7d73ce4c1faa1c05e17d21bfc7f0d4) )
651948   ROM_LOAD( "ic60ar08.bin",   0x10000, 0x2000, CRC(ff1e6b01) SHA1(4561b718be41c67d713f6d7f10decc4d2eed9acc) )
652949
950   /* 0 - Title Screen */
951   ROM_REGION( 0x6000, "prosport_fg_gfx", 0 )
952   ROM_COPY( "fg_gfx_src", 0x04000, 0x00000, 0x2000 )
953   ROM_COPY( "fg_gfx_src", 0x0a000, 0x02000, 0x2000 )
954   ROM_COPY( "fg_gfx_src", 0x10000, 0x04000, 0x2000 )
955
956   /* 4 - Pro Tennis*/
957   ROM_REGION( 0x6000, "protenns_fg_gfx", 0 )
958   ROM_COPY( "fg_gfx_src", 0x02000, 0x00000, 0x2000 )
959   ROM_COPY( "fg_gfx_src", 0x08000, 0x02000, 0x2000 )
960   ROM_COPY( "fg_gfx_src", 0x0e000, 0x04000, 0x2000 )
961
962   /* 8 - Pro Bowling */
963   ROM_REGION( 0x6000, "probowl_fg_gfx", 0 )
964   ROM_COPY( "fg_gfx_src", 0x00000, 0x00000, 0x2000 )
965   ROM_COPY( "fg_gfx_src", 0x06000, 0x02000, 0x2000 )
966   ROM_COPY( "fg_gfx_src", 0x0c000, 0x04000, 0x2000 )
967
968   /* c - Pro Golf */
969   ROM_REGION( 0x6000, "progolf_fg_gfx", 0 )
970   ROM_COPY( "fg_gfx_src", 0x04000, 0x00000, 0x2000 )
971   ROM_COPY( "fg_gfx_src", 0x0a000, 0x02000, 0x2000 )
972   ROM_COPY( "fg_gfx_src", 0x10000, 0x04000, 0x2000 )
973   /* the following is WRONG! */
974   ROM_COPY( "fg_gfx_src", 0x05000, 0x01800, 0x0800 )
975   ROM_COPY( "fg_gfx_src", 0x0b000, 0x03800, 0x0800 )
976   ROM_COPY( "fg_gfx_src", 0x11000, 0x05800, 0x0800 )
977
653978   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
654979   ROM_LOAD( "ic46ar18.bin",   0x00000, 0x1000, CRC(d23998d3) SHA1(4d3545a0e1df2eb7927ec6fa4a35abd21321016c) )
655980   ROM_LOAD( "ic45ar17.bin",   0x01000, 0x1000, CRC(5f1c621e) SHA1(29ce85d3d5da5ee16bb67644b0555ab9bce52d05) )
981
982   ROM_REGION(0x02000, "user1", 0 )
983   ROM_COPY( "gfx2", 0x0000, 0x0000, 0x2000 )
656984ROM_END
657985
658986ROM_START( prosporta )
r5046r5047
668996   ROM_LOAD( "ar16.43", 0xc000, 0x2000,  CRC(113a4f89) SHA1(abbc7f5ad543f3500c0194100d236ac942e4739f) )
669997   ROM_LOAD( "ar15.42", 0xe000, 0x2000,  CRC(635425a6) SHA1(2b95c3252046462f8886a309d02ea3a15b693780) )
670998
671   ROM_REGION( 0x12000, "gfx1", ROMREGION_DISPOSE )
999   ROM_REGION( 0x12000, "fg_gfx_src", ROMREGION_DISPOSE )
6721000   ROM_LOAD( "ar00.52",   0x00000, 0x2000, CRC(1e16adde) SHA1(229f68a687cbc9ac0d393e4db49d91f646eea7a6) )
6731001   ROM_LOAD( "ar01.53",   0x02000, 0x2000, CRC(4b7a6431) SHA1(a8a23dffc3bf9fb3b806985272822904578e460e) )
6741002   ROM_LOAD( "ar02.54",   0x04000, 0x2000, CRC(cb22c60a) SHA1(0c83c15781cedb17ade7d48a606d1c49e8b80819) )
r5046r5047
6811009   ROM_LOAD( "ar07.59",   0x0e000, 0x2000, CRC(e6527838) SHA1(e40acbcfda7d73ce4c1faa1c05e17d21bfc7f0d4) )
6821010   ROM_LOAD( "ar08.60",   0x10000, 0x2000, CRC(37a2178b) SHA1(28655d0ebe5813b4fc7eb6dae2a64575214ebc6a) )
6831011
1012   /* 0 - Title Screen */
1013   ROM_REGION( 0x6000, "prosport_fg_gfx", 0 )
1014   ROM_COPY( "fg_gfx_src", 0x04000, 0x00000, 0x2000 )
1015   ROM_COPY( "fg_gfx_src", 0x0a000, 0x02000, 0x2000 )
1016   ROM_COPY( "fg_gfx_src", 0x10000, 0x04000, 0x2000 )
1017
1018   /* 4 - Pro Tennis*/
1019   ROM_REGION( 0x6000, "protenns_fg_gfx", 0 )
1020   ROM_COPY( "fg_gfx_src", 0x02000, 0x00000, 0x2000 )
1021   ROM_COPY( "fg_gfx_src", 0x08000, 0x02000, 0x2000 )
1022   ROM_COPY( "fg_gfx_src", 0x0e000, 0x04000, 0x2000 )
1023
1024   /* 8 - Pro Bowling */
1025   ROM_REGION( 0x6000, "probowl_fg_gfx", 0 )
1026   ROM_COPY( "fg_gfx_src", 0x00000, 0x00000, 0x2000 )
1027   ROM_COPY( "fg_gfx_src", 0x06000, 0x02000, 0x2000 )
1028   ROM_COPY( "fg_gfx_src", 0x0c000, 0x04000, 0x2000 )
1029
1030   /* c - Pro Golf */
1031   ROM_REGION( 0x6000, "progolf_fg_gfx", 0 )
1032   ROM_COPY( "fg_gfx_src", 0x04000, 0x00000, 0x2000 )
1033   ROM_COPY( "fg_gfx_src", 0x0a000, 0x02000, 0x2000 )
1034   ROM_COPY( "fg_gfx_src", 0x10000, 0x04000, 0x2000 )
1035   /* the following is WRONG! */
1036   ROM_COPY( "fg_gfx_src", 0x05000, 0x01800, 0x0800 )
1037   ROM_COPY( "fg_gfx_src", 0x0b000, 0x03800, 0x0800 )
1038   ROM_COPY( "fg_gfx_src", 0x11000, 0x05800, 0x0800 )
1039
6841040   ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
6851041   ROM_LOAD( "ar18.46",   0x00000, 0x1000, CRC(d23998d3) SHA1(4d3545a0e1df2eb7927ec6fa4a35abd21321016c) )
6861042   ROM_LOAD( "ar17.45",   0x01000, 0x1000, CRC(5f1c621e) SHA1(29ce85d3d5da5ee16bb67644b0555ab9bce52d05) )
1043
1044   ROM_REGION(0x02000, "user1", 0 )
1045   ROM_COPY( "gfx2", 0x0000, 0x0000, 0x2000 )
6871046ROM_END
6881047
6891048ROM_START( boomrang )
r5046r5047
9861345 *
9871346 *************************************/
9881347
989GAME( 1983, prosoccr,  0,        prosoccr,  liberate, prosport, ROT270, "Data East Corporation", "Pro Soccer", GAME_NOT_WORKING )
990GAME( 1983, prosport,  0,        prosport,  liberate, prosport, ROT270, "Data East Corporation", "Pro. Sports", GAME_NOT_WORKING )
991GAME( 1983, prosporta, prosport, prosport,  liberate, prosport, ROT270, "Data East Corporation", "Pro. Sports (alternate)", GAME_NOT_WORKING )
1348GAME( 1983, prosoccr,  0,        prosoccr,  prosoccr, prosport, ROT270, "Data East Corporation", "Pro Soccer", 0 )
1349GAME( 1983, prosport,  0,        prosport,  liberate, prosport, ROT270, "Data East Corporation", "Pro. Sports", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
1350GAME( 1983, prosporta, prosport, prosport,  liberate, prosport, ROT270, "Data East Corporation", "Pro. Sports (alternate)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND )
9921351GAME( 1983, boomrang,  0,        boomrang,  boomrang, prosport, ROT270, "Data East Corporation", "Boomer Rang'r / Genesis (set 1)", 0 )
9931352GAME( 1983, boomranga, boomrang, boomrang,  boomrang, prosport, ROT270, "Data East Corporation", "Boomer Rang'r / Genesis (set 2)", 0 )
9941353GAME( 1984, kamikcab,  0,        boomrang,  kamikcab, prosport, ROT270, "Data East Corporation", "Kamikaze Cabbie", 0 )
src/mame/drivers/seta.c
r5046r5047
12871287
12881288***************************************************************************/
12891289
1290/***************************************************************************
1291
1292Jockey Club
1293^^^^^^^^^^^
1294Dumped by Andrew Welburn on the evening of 05/06/09
1295
1296http://www.andys-arcade.com
1297
1298*************************************************
1299**Do not seperate this text file from the roms.**
1300*************************************************
1301
1302Take a look at the photos in the archive, the roms
1303should be failry explanatory, and you should be
1304able to pick out the chips it uses.
1305
1306Most of the romset matches mame except for the
1307two eproms, see the mame -romident dump.
1308
1309enjoy..
1310
1311***************************************************************************/
1312
13131290#include "driver.h"
13141291#include "cpu/z80/z80.h"
13151292#include "cpu/m68000/m68000.h"
src/mame/drivers/rohga.c
r5046r5047
99
1010    This hardware is capable of alpha-blending on sprites and playfields
1111
12    Todo:  On Wizard Fire when you insert a coin and press start, the start
13    button being held seems to select the knight right away.  Emulation bug.
14
1512    Todo:  Sprite priority errors in Nitro Ball.
1613
1714    Todo:  There is some kind of full-screen flash in Rohga when you die,
r5046r5047
125122VIDEO_UPDATE( nitrobal );
126123WRITE16_HANDLER( rohga_buffer_spriteram16_w );
127124
125static READ16_HANDLER( rohga_irq_ack_r )
126{
127   cputag_set_input_line(space->machine, "maincpu", 6, CLEAR_LINE);
128   return 0;
129}
130
131static WRITE16_HANDLER( wizdfire_irq_ack_w )
132{
133   /* This might actually do more, nitrobal for example sets 0xca->0xffff->0x80 at startup then writes 7 all the time
134       except when a credit is inserted (writes 6 twice).
135       Wizard Fire / Dark Seal 2 just writes 1 all the time, so I just don't trust it much for now... -AS */
136   cputag_set_input_line(space->machine, "maincpu", 6, CLEAR_LINE);
137}
138
128139/**********************************************************************************/
129140
130141static ADDRESS_MAP_START( rohga_map, ADDRESS_SPACE_PROGRAM, 16 )
r5046r5047
142153   AM_RANGE(0x31000a, 0x31000b) AM_WRITE(deco16_palette_dma_w) /* Write 1111 for dma?  (Or any value?) */
143154   AM_RANGE(0x320000, 0x320001) AM_WRITENOP /* ? */
144155   AM_RANGE(0x322000, 0x322001) AM_WRITE(deco16_priority_w)
145   AM_RANGE(0x321100, 0x321101) AM_READNOP /* Irq ack?  Value not used */
156   AM_RANGE(0x321100, 0x321101) AM_READ(rohga_irq_ack_r) /* Irq ack?  Value not used */
146157
147158   AM_RANGE(0x3c0000, 0x3c1fff) AM_RAM_WRITE(deco16_pf1_data_w) AM_BASE(&deco16_pf1_data)
148159   AM_RANGE(0x3c2000, 0x3c2fff) AM_RAM_WRITE(deco16_pf2_data_w) AM_BASE(&deco16_pf2_data)
r5046r5047
176187
177188   AM_RANGE(0x320000, 0x320001) AM_WRITE(deco16_priority_w) /* Priority */
178189   AM_RANGE(0x320002, 0x320003) AM_WRITENOP /* ? */
179   AM_RANGE(0x320004, 0x320005) AM_WRITENOP /* VBL IRQ ack */
190   AM_RANGE(0x320004, 0x320005) AM_WRITE(wizdfire_irq_ack_w) /* VBL IRQ ack */
180191
181192   AM_RANGE(0x340000, 0x3407ff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size)
182193   AM_RANGE(0x350000, 0x350001) AM_WRITE(buffer_spriteram16_w) /* Triggers DMA for spriteram */
r5046r5047
208219
209220   AM_RANGE(0x320000, 0x320001) AM_READ_PORT("DSW3") AM_WRITE(deco16_priority_w) /* Priority */
210221   AM_RANGE(0x320002, 0x320003) AM_WRITENOP /* ? */
211   AM_RANGE(0x320004, 0x320005) AM_WRITENOP /* VBL IRQ ack */
222   AM_RANGE(0x320004, 0x320005) AM_WRITE(wizdfire_irq_ack_w) /* VBL IRQ ack */
212223
213224   AM_RANGE(0x340000, 0x3407ff) AM_RAM AM_BASE(&spriteram16) AM_SIZE(&spriteram_size)
214225   AM_RANGE(0x350000, 0x350001) AM_WRITE(buffer_spriteram16_w) /* Triggers DMA for spriteram */
r5046r5047
218229   AM_RANGE(0x380000, 0x381fff) AM_RAM_WRITE(deco16_buffered_palette_w) AM_BASE(&paletteram16)
219230   AM_RANGE(0x390008, 0x390009) AM_WRITE(deco16_palette_dma_w)
220231
221   AM_RANGE(0xfec000, 0xffffff) AM_RAM
232   AM_RANGE(0xfec000, 0xff3fff) AM_RAM
222233   AM_RANGE(0xff4000, 0xff47ff) AM_MIRROR(0x800) AM_READWRITE(deco16_146_nitroball_prot_r,deco16_146_nitroball_prot_w) AM_BASE(&deco16_prot_ram) /* Protection device */
234   AM_RANGE(0xff8000, 0xffffff) AM_RAM
223235ADDRESS_MAP_END
224236
225237static ADDRESS_MAP_START( schmeisr_map, ADDRESS_SPACE_PROGRAM, 16 )
r5046r5047
235247   AM_RANGE(0x31000a, 0x31000b) AM_WRITE(deco16_palette_dma_w) /* Write 1111 for dma?  (Or any value?) */
236248   AM_RANGE(0x320000, 0x320001) AM_WRITENOP /* ? */
237249   AM_RANGE(0x322000, 0x322001) AM_WRITE(deco16_priority_w)
238   AM_RANGE(0x321100, 0x321101) AM_READNOP /* Irq ack?  Value not used */
250   AM_RANGE(0x321100, 0x321101) AM_WRITE(wizdfire_irq_ack_w) /* Irq ack?  Value not used */
239251
240252   AM_RANGE(0x3c0000, 0x3c1fff) AM_RAM_WRITE(deco16_pf1_data_w) AM_BASE(&deco16_pf1_data)
241253   AM_RANGE(0x3c2000, 0x3c2fff) AM_RAM_WRITE(deco16_pf2_data_w) AM_BASE(&deco16_pf2_data)
r5046r5047
427439   PORT_DIPSETTING(      0x0c00, DEF_STR( Normal ) )
428440   PORT_DIPSETTING(      0x0400, DEF_STR( Hard ) )
429441   PORT_DIPSETTING(      0x0000, DEF_STR( Hardest ) )
430   PORT_DIPNAME( 0x3000, 0x3000, "Magic Guage Speed" )
442   PORT_DIPNAME( 0x3000, 0x3000, "Magic Gauge Speed" )
431443   PORT_DIPSETTING(      0x0000, "Very Slow" )
432444   PORT_DIPSETTING(      0x1000, "Slow" )
433445   PORT_DIPSETTING(      0x3000, DEF_STR( Normal ) )
r5046r5047
737749   /* basic machine hardware */
738750   MDRV_CPU_ADD("maincpu", M68000, 14000000)
739751   MDRV_CPU_PROGRAM_MAP(rohga_map)
740   MDRV_CPU_VBLANK_INT("screen", irq6_line_hold)
752   MDRV_CPU_VBLANK_INT("screen", irq6_line_assert)
741753
742754   MDRV_CPU_ADD("audiocpu", H6280,32220000/4/3) /* verified on pcb (8.050Mhz is XIN on pin 10 of H6280 */
743755   MDRV_CPU_PROGRAM_MAP(rohga_sound_map)
r5046r5047
782794   /* basic machine hardware */
783795   MDRV_CPU_ADD("maincpu", M68000, 14000000)
784796   MDRV_CPU_PROGRAM_MAP(wizdfire_map)
785   MDRV_CPU_VBLANK_INT("screen", irq6_line_hold)
797   MDRV_CPU_VBLANK_INT("screen", irq6_line_assert)
786798
787799   MDRV_CPU_ADD("audiocpu", H6280,32220000/4/3) /* verified on pcb (8.050Mhz is XIN on pin 10 of H6280 */
788800   MDRV_CPU_PROGRAM_MAP(rohga_sound_map)
r5046r5047
827839   /* basic machine hardware */
828840   MDRV_CPU_ADD("maincpu", M68000, 14000000)
829841   MDRV_CPU_PROGRAM_MAP(nitrobal_map)
830   MDRV_CPU_VBLANK_INT("screen", irq6_line_hold)
842   MDRV_CPU_VBLANK_INT("screen", irq6_line_assert)
831843
832844   MDRV_CPU_ADD("audiocpu", H6280,32220000/4/3) /* verified on pcb (8.050Mhz is XIN on pin 10 of H6280 */
833845   MDRV_CPU_PROGRAM_MAP(rohga_sound_map)
r5046r5047
872884   /* basic machine hardware */
873885   MDRV_CPU_ADD("maincpu", M68000, 14000000)
874886   MDRV_CPU_PROGRAM_MAP(schmeisr_map)
875   MDRV_CPU_VBLANK_INT("screen", irq6_line_hold)
887   MDRV_CPU_VBLANK_INT("screen", irq6_line_assert)
876888
877889   MDRV_CPU_ADD("audiocpu", H6280,32220000/4/3) /* verified on pcb (8.050Mhz is XIN on pin 10 of H6280 */
878890   MDRV_CPU_PROGRAM_MAP(rohga_sound_map)
src/mame/drivers/naomi.c
r5046r5047
768768|----------------------------|
769769Notes:
770770           * - Denotes those devices are on the other side of the PCB
771      CN1    - This connector plugs into the main board.
771         CN1 - This connector plugs into the main board.
772772      XC9536 - Xilinx XC9536 in-system programmable CPLD (PLCC44), stamped with a
773773               game code. This code is different for each different game.
774774               The last 3 digits seems to be for the usage.
775775               F01 = CPLD/protection device and M01 = MASKROM
776776
777               Game (sorted by code)            Code
778               ------------------------------------------
779               Dolphin Blue                     AX0401F01
780               Demolish Fist                    AX0601F01
781               Guilt Gear Isuka                 AX1201F01
782               Knights Of Valour Seven Spirits  AX1301F01
783               Salaryman Kintaro                AX1401F01
784               Fist Of The North Star           AX1901F01
785               King Of Fighters NEOWAVE         AX2201F01
777               Game (sorted by code)                 Code
778               -----------------------------------------------
779               Sports Shooting USA                   AX0101F01
780               Dolphin Blue                          AX0401F01
781               Demolish Fist                         AX0601F01
782               Guilt Gear Isuka                      AX1201F01
783               Knights Of Valour Seven Spirits       AX1301F01
784               Salaryman Kintaro                     AX1401F01
785               Ranger Mission                        AX1601F01
786               Rumble Fish                           AX1801F01
787               Fist Of The North Star                AX1901F01
788               Victory Furlong : Horse Racing        AX2001F01
789               King Of Fighters NEOWAVE              AX2201F01
786790
787
788791        IC18 - Fujitsu 29DL640E 64M TSOP48 FlashROM. This ROM has no additional custom markings
789792               The name in the archive has been devised purely for convenience.
790793               This ROM holds the main program.
791794
792IC10 to IC17 - Custom-badged 128M TSOP48 maskROMs. I suspect they are Macronix
795IC10 to IC17 - Custom-badged 128M TSOP48 mask ROMs. I suspect they are Macronix
793796               ROMs because the ROM on the main board is also a custom Macronix
794797               ROM and they have a history of producing custom ROMs for other
795798               companies that hide their ROM types like Nintendo etc.
796               The ROMs match a pinout that is identical to....
797               Macronix MX26F128J3 (TSOP48)
798               Oki MR27V12800 (TSOP48)
799               More importantly the size is standard TSOP48 20mm long.
800               They have been read as Oki MR27V12800
801               The pinout also matches the same ROMs found on Namco Mr Driller 2
802               and some Namco and Capcom NAOMI carts where these ROMs are used,
803               although in all cases those ROMs are 18mm long, not 20mm.
799               They could also be Oki MR27V12800.
804800
805801               IC10 - Not Populated for 7 ROMs or less (ROM 01 if 8 ROMs are populated)
806802               IC11 - ROM 01 (or ROM 02 if 8 ROMs are populated)
r5046r5047
813809
814810               ROM Codes
815811               ---------
816                                                                          Number
817               Game (sorted by code)            Code                      of ROMs
818               ------------------------------------------------------------------
819               Dolphin Blue                     AX0401M01 to AX0405M01    5
820               Demolish Fist                    AX0601M01 to AX0607M01    7
821               Guilty Gear Isuka                AX1201M01 to AX1208M01    8
822               Knights Of Valour Seven Spirits  AX1301M01 to AX1307M01    7
823               Salaryman Kintaro                AX1401M01 to AX1407M01    7
824               Fist Of The North Star           AX1901M01 to AX1907M01    7
825               King Of Fighters NEOWAVE         AX2201M01 to AX2206M01    6
812                                                                               Number
813               Game (sorted by code)                 Code                      of ROMs
814               -----------------------------------------------------------------------
815               Sports Shooting USA                   AX0101M01 to AX0104M01    4
816               Dolphin Blue                          AX0401M01 to AX0405M01    5
817               Demolish Fist                         AX0601M01 to AX0607M01    7
818               Guilty Gear Isuka                     AX1201M01 to AX1208M01    8
819               Knights Of Valour Seven Spirits       AX1301M01 to AX1307M01    7
820               Salaryman Kintaro                     AX1401M01 to AX1407M01    7
821               Ranger Mission                        AX1601M01 to AX1605M01    5
822               Rumble Fish                           AX1801M01 to AX1807M01    7
823               Fist Of The North Star                AX1901M01 to AX1907M01    7
824               Victory Furlong : Horse Racing        AX2001M01 to AX2007M01    7
825               King Of Fighters NEOWAVE              AX2201M01 to AX2206M01    6
826826
827827
828
829828Type 2 ROM Board:
830829
831830
r5046r5047
855854               The last 3 digits seems to be for the usage.
856855               F01 = CPLD/protection device and M01 = MASKROM
857856
858               Game (sorted by code)            Code
859               ------------------------------------------
860               Neogeo Battle Coliseum           AX3301F01
857               Game (sorted by code)                 Code
858               -----------------------------------------------
859               Samurai Spirits Tenkaichi Kenkakuden  AX2901F01
860               Neogeo Battle Coliseum                AX3301F01
861               Rumble Fish 2                         AX3401F01
861862
862
863863 FMEM1/FMEM2 - Fujitsu 29DL640E 64M TSOP48 FlashROM. This ROM has no additional custom markings
864864               The name in the archive has been devised purely for convenience.
865865               This ROM holds the main program.
r5046r5047
867867               is a TSOP48, using the middle pins. The other 2 pins on each side of the ROM
868868               are not connected to anything.
869869
870       MROM* - Custom-badged SSOP70 maskROMs. These may be OKI MR26V25605 or MR26V25655 (256M)
870       MROM* - Custom-badged SSOP70 mask ROMs. These may be OKI MR26V25605 or MR26V25655 (256M)
871871               or possibly 26V51253 (512M) or something else similar.
872872
873873               ROM Codes
874874               ---------
875                                                                          Number
876               Game (sorted by code)            Code                      of ROMs
877               ------------------------------------------------------------------
878               Neogeo Battle Coliseum           AX3301M01 to AX3307M01    7
875                                                                               Number
876               Game (sorted by code)                 Code                      of ROMs
877               -----------------------------------------------------------------------
878               Samurai Spirits Tenkaichi Kenkakuden  AX2901M01 to AX2907M01    7
879               Neogeo Battle Coliseum                AX3301M01 to AX3307M01    7
880               Rumble Fish 2                         AX3401M01 to AX3405M01    5
879881
880882
883               Other games not dumped (some may have been cancelled)
884               ----------------------
885               Chase 1929
886               Dirty Pigskin
887               Extreme Hunting
888               Extreme Hunting 2: Tournament Edition
889               Faster Than Speed
890               Force Five
891               Guilty Gear X Version 1.5
892               Kenju
893               Maximum Speed
894               Metal Slug 6
895               Premier Eleven
896               Sushi Bar
897               The King Of Fighters XI
898
899
900
901
902
881903*/
882904
883905#include "driver.h"
r5046r5047
40334055
40344056   DISK_REGION( "gdrom" )
40354057   DISK_IMAGE_READONLY( "gdl-0036a", 0, SHA1(91f1e19136997cb1e2edfb1ad342b9427d1d3bfb) )
4036\
4058
40374059   ROM_REGION( 0x50, "picreturn", ROMREGION_ERASE)
40384060   //PIC16C622A (317-5121-JPN)
40394061   //(sticker 253-5509-5121J)
r5046r5047
44974519GAME( 2006, kurucham,  naomigd,  naomigd,  naomi,    naomi,   ROT0,   "Able",                   "Kurukuru Chameleon (GDL-0034)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
44984520GAME( 2005, undefeat,  naomigd,  naomigd,  naomi,    naomi,   ROT270, "G-Rev",                  "Under Defeat (GDL-0035)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
44994521//GDL-0036 Trigger Heart Exelica
4500GAME( 2005, trgheart,  naomigd,  naomigd,  naomi,    naomi,   ROT270, "Warashi",                "Trigger Heart Exelica (Rev A) (GDL-0036A)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
4501GAME( 2005, jingystm,  naomigd,  naomigd,  naomi,    naomi,   ROT0,   "Atrativa Japan",         "Jingi Storm - The Arcade (GDL-0037)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
4522//GAME( 2005, trgheart,  naomigd,  naomigd,  naomi,    naomi,   ROT270, "Warashi",                "Trigger Heart Exelica (Rev A) (GDL-0036A)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
4523//GAME( 2005, jingystm,  naomigd,  naomigd,  naomi,    naomi,   ROT0,   "Atrativa Japan",         "Jingi Storm - The Arcade (GDL-0037)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
45024524//GDL-0038 Senko No Ronde Special
4503GAME( 2006, meltyb,    naomigd,  naomigd,  naomi,    naomi,   ROT0,   "Ecole Software",         "Melty Blood Act Cadenza Ver B (GDL-0039)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
4504GAME( 2006, meltyba,   meltyb,   naomigd,  naomi,    naomi,   ROT0,   "Ecole Software",         "Melty Blood Act Cadenza Ver B (Rev A) (GDL-0039A)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
4505GAME( 2006, karous,    naomigd,  naomigd,  naomi,    naomi,   ROT270, "Milestone",              "Karous (GDL-0040)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
4525//GAME( 2006, meltyb,    naomigd,  naomigd,  naomi,    naomi,   ROT0,   "Ecole Software",         "Melty Blood Act Cadenza Ver B (GDL-0039)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
4526//GAME( 2006, meltyba,   meltyb,   naomigd,  naomi,    naomi,   ROT0,   "Ecole Software",         "Melty Blood Act Cadenza Ver B (Rev A) (GDL-0039A)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
4527//GAME( 2006, karous,    naomigd,  naomigd,  naomi,    naomi,   ROT270, "Milestone",              "Karous (GDL-0040)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
45064528//GDL-0041 Guilty Gear XX Accent Core
4507GAME( 2006, takoron,   naomigd,  naomigd,  naomi,    naomi,   ROT0,   "Compile",                "Noukone Puzzle Takoron (GDL-0042)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
4529//GAME( 2006, takoron,   naomigd,  naomigd,  naomi,    naomi,   ROT0,   "Compile",                "Noukone Puzzle Takoron (GDL-0042)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
45084530
45094531
45104532/* GDS-xxxx (Sega first party games) */
r5046r5047
49885010#endif
49895011}
49905012
5013static DRIVER_INIT(sprtshot)
5014{
5015     int i;
5016   UINT16 *src = (UINT16 *)(memory_region(machine, "user1"));
5017
5018   long rom_size = memory_region_length(machine, "user1");
5019
5020   for(i=0; i<rom_size/2; i++)
5021   {
5022      src[i] = atomiswave_decrypt(src[i], i*2, &df_key);   // $$$TODO: need key
5023   }
5024}
5025
5026static DRIVER_INIT(rangrmsn)
5027{
5028     int i;
5029   UINT16 *src = (UINT16 *)(memory_region(machine, "user1"));
5030
5031   long rom_size = memory_region_length(machine, "user1");
5032
5033   for(i=0; i<rom_size/2; i++)
5034   {
5035      src[i] = atomiswave_decrypt(src[i], i*2, &df_key);   // $$$TODO: need key
5036   }
5037}
5038
49915039ROM_START( fotns )
49925040   ROM_REGION( 0x200000, "maincpu", 0)
49935041   AW_BIOS
r5046r5047
50185066   ROM_LOAD("ic17", 0x7000000, 0x1000000,  NO_DUMP )
50195067ROM_END
50205068
5069ROM_START( rangrmsn )
5070   ROM_REGION( 0x200000, "maincpu", 0)
5071   AW_BIOS
5072
5073   ROM_REGION( 0x8000000, "user1", ROMREGION_ERASE)
5074        ROM_LOAD( "ax1601p01.ic18", 0x0000000, 0x0800000, CRC(00a74fbb) SHA1(57cc1eedd22d1f553956a825e69a597309ee2bef) )
5075        ROM_LOAD( "ax1601m01.ic11", 0x1000000, 0x1000000, CRC(f34eed33) SHA1(1c171fb8aa95877f81ed78652d4a9ff80f7713ff) )
5076        ROM_LOAD( "ax1602m01.ic12", 0x2000000, 0x1000000, CRC(a7d59efb) SHA1(a40938ce1399babefc8cf02f579a86cf08e211ef) )
5077        ROM_LOAD( "ax1603m01.ic13", 0x3000000, 0x1000000, CRC(7c0aa241) SHA1(3e0e5ff3307dcfa52998fb9b4b14bf54bd056a99) )
5078        ROM_LOAD( "ax1604m01.ic14", 0x4000000, 0x1000000, CRC(d2369144) SHA1(da1eae9957d27d1682c4191780cf51b32dfe6659) )
5079        ROM_LOAD( "ax1605m01.ic15", 0x5000000, 0x1000000, CRC(0c11c1f9) SHA1(0585db60618c5b97f9b7c203baf7e5ac90883ca6) )
5080ROM_END
5081
5082ROM_START( sprtshot )
5083   ROM_REGION( 0x200000, "maincpu", 0)
5084   AW_BIOS
5085
5086   ROM_REGION( 0x8000000, "user1", ROMREGION_ERASE)
5087        ROM_LOAD( "ax0101p01.ic18", 0x0000000, 0x800000, CRC(b3642b5d) SHA1(85eabd9551aefb825ae8eb6422092fb5a58d60f6) )
5088        ROM_LOAD( "ax0101m01.ic11", 0x1000000, 0x1000000, CRC(1e39184d) SHA1(663e0cb9f43a0f89d9841e04b3d009f6c5e88d5e) )
5089        ROM_LOAD( "ax0102m01.ic12", 0x2000000, 0x1000000, CRC(700764d1) SHA1(310f1606f7bbed1012c119f1ef5d89d231d8489e) )
5090        ROM_LOAD( "ax0103m01.ic13", 0x3000000, 0x1000000, CRC(6144e7a8) SHA1(4d4341082f008dfd93ef5bf32a44c80869ef02a8) )
5091        ROM_LOAD( "ax0104m01.ic14", 0x4000000, 0x1000000, CRC(ccb72150) SHA1(a1032d321c27f9ff43da41f20b8687bf1958ddc9) )
5092ROM_END
5093
5094
50215095/* Atomiswave */
50225096GAME( 2001, awbios,   0,        naomi,    naomi,    0,        ROT0, "Sammy",                           "Atomiswave Bios", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING|GAME_IS_BIOS_ROOT )
50235097
5098GAME( 2002, sprtshot, awbios,   naomi,    naomi,    sprtshot, ROT0, "Sammy",                           "Sports Shooting USA", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
5099GAME( 2003, demofist, awbios,   naomi,    naomi,    demofist, ROT0, "Polygon Magic / Dimps",           "Demolish Fist", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
5100GAME( 2004, rangrmsn, awbios,   naomi,    naomi,    rangrmsn, ROT0, "Sammy",                           "Ranger Mission", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
50245101GAME( 2005, fotns,    awbios,   naomi,    naomi,    fotns,    ROT0, "Arc System Works",                "Fist Of The North Star", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
5025GAME( 2003, demofist, awbios,   naomi,    naomi,    demofist, ROT0, "Polygon Magic / Dimps",           "Demolish Fist", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
5102
src/mame/drivers/progolf.c
r5046r5047
1/***************************************************************
1/****************************************************************************************
22
318 Holes Pro Golf (c) 1981 Data East
4
5driver by Angelo Salese, based on early work by Pierpaolo Prazzoli and David Haywood
6
7TODO:
8- We need to patch a rom to get the games to do more, there's also a "rom test error 6"
9  in service mode (that is the g2-m.6a rom), so a rom might be bad or the decryption
10  isn't complete.
11- Hazards doesn't have any effect, might be the same issue as above;
12- There's no "rough" display on the sides on the screen, might be the same issue as above;
13- Map displays are currently wrong, they are drawn with the framebuffer;
14- Flip screen support;
15- progolfa: decryption isn't yet correct;
16
17=========================================================================================
18
319Pro Golf
420Data East 1981
521PCB version (not cassette)
r5046r5047
3753
3854Twenty four 8116 rams.
3955
40****************************************************************/
56****************************************************************************************/
4157
4258#include "driver.h"
4359#include "cpu/m6502/m6502.h"
4460#include "sound/ay8910.h"
45#include "includes/btime.h"
61#include "video/mc6845.h"
4662
63static UINT8 char_pen,char_pen_vreg;
64static UINT8 *progolf_fg_fb;
65static UINT8 *progolf_fbram;
66static UINT8 scrollx_hi;
67static UINT8 scrollx_lo;
68
69static UINT8 sound_cmd;
70
71static VIDEO_START( progolf )
72{
73    scrollx_hi = 0;
74    scrollx_lo = 0;
75
76   progolf_fg_fb = auto_alloc_array(machine, UINT8, 0x2000*8);
77}
78
79
80static VIDEO_UPDATE( progolf )
81{
82   int count,color,x,y,xi,yi;
83
84   {
85      int scroll = (scrollx_lo | ((scrollx_hi & 0x03) << 8));
86
87      count = 0;
88
89      for(x=0;x<128;x++)
90      {
91         for(y=0;y<32;y++)
92         {
93            int tile = videoram[count];
94
95            drawgfx(bitmap,screen->machine->gfx[0],tile,1,0,0,(256-x*8)+scroll,y*8,cliprect,TRANSPARENCY_NONE,0);
96            /* wrap-around */
97            drawgfx(bitmap,screen->machine->gfx[0],tile,1,0,0,(256-x*8)+scroll-1024,y*8,cliprect,TRANSPARENCY_NONE,0);
98
99            count++;
100         }
101      }
102   }
103
104   /* framebuffer is 8x8 chars arranged like a bitmap + a register that controls the pen handling. */
105   {
106      count = 0;
107
108      for(y=0;y<256;y+=8)
109      {
110         for(x=0;x<256;x+=8)
111         {
112            for (yi=0;yi<8;yi++)
113            {
114               for (xi=0;xi<8;xi++)
115               {
116                  color = progolf_fg_fb[(xi+yi*8)+count*0x40];
117
118                  if((x+yi) <= cliprect->max_x && (256-y+xi) <= cliprect->max_y && color != 0)
119                     *BITMAP_ADDR16(bitmap, x+yi, 256-y+xi) = screen->machine->pens[(color & 0x7)];
120               }
121            }
122
123            count++;
124         }
125      }
126   }
127
128   return 0;
129}
130
131static WRITE8_HANDLER( progolf_charram_w )
132{
133   int i;
134   progolf_fbram[offset] = data;
135
136   if(char_pen == 7)
137   {
138      for(i=0;i<8;i++)
139         progolf_fg_fb[offset*8+i] = 0;
140   }
141   else
142   {
143      for(i=0;i<8;i++)
144      {
145         if(progolf_fg_fb[offset*8+i] == char_pen)
146            progolf_fg_fb[offset*8+i] = data & (1<<(7-i)) ? char_pen : 0;
147         else
148            progolf_fg_fb[offset*8+i] = data & (1<<(7-i)) ? progolf_fg_fb[offset*8+i]|char_pen : progolf_fg_fb[offset*8+i];
149      }
150   }
151}
152
153static WRITE8_HANDLER( progolf_char_vregs_w )
154{
155   char_pen = data & 0x07;
156   if(data & 0xf0)
157      char_pen_vreg = data & 0xf0;
158}
159
160static WRITE8_HANDLER( progolf_scrollx_lo_w )
161{
162   scrollx_lo = data;
163}
164
165static WRITE8_HANDLER( progolf_scrollx_hi_w )
166{
167   scrollx_hi = data;
168}
169
170static WRITE8_HANDLER( progolf_flip_screen_w )
171{
172   flip_screen_set(space->machine, data & 1);
173   if(data & 0xfe)
174      printf("$9600 with data = %02x used\n",data);
175}
176
177static WRITE8_HANDLER( audio_command_w )
178{
179   sound_cmd = data;
180   cputag_set_input_line(space->machine, "audiocpu", 0, ASSERT_LINE);
181}
182
183static READ8_HANDLER( audio_command_r )
184{
185   cputag_set_input_line(space->machine, "audiocpu", 0, CLEAR_LINE);
186   return sound_cmd;
187}
188
47189static ADDRESS_MAP_START( main_cpu, ADDRESS_SPACE_PROGRAM, 8 )
48   AM_RANGE(0x0000, 0x0fff) AM_RAM
49   AM_RANGE(0x1000, 0x1fff) AM_RAM //AM_WRITE(deco_charram_w) AM_BASE(&deco_charram)
50   AM_RANGE(0x2000, 0x7fff) AM_RAM AM_BASE(&deco_charram) //AM_WRITE(deco_charram_w)
51   AM_RANGE(0x9000, 0x9000) AM_WRITENOP //video control?
52   AM_RANGE(0x9000, 0x9000) AM_READNOP
53   AM_RANGE(0x9200, 0x9200) AM_WRITENOP
54   AM_RANGE(0x9400, 0x9400) AM_WRITENOP
55   AM_RANGE(0x9600, 0x9600) AM_WRITENOP
56   AM_RANGE(0x9600, 0x9600) AM_READ_PORT("IN0")     /* VBLANK */
57   AM_RANGE(0x9800, 0x9800) AM_READNOP
58   AM_RANGE(0x9800, 0x9801) AM_WRITENOP // mc6845 regs
59   AM_RANGE(0x9a00, 0x9a00) AM_WRITENOP
60   AM_RANGE(0x9a00, 0x9a00) AM_READNOP
61   AM_RANGE(0x9e00, 0x9e00) AM_WRITENOP
62   AM_RANGE(0x8000, 0x83ff) AM_RAM AM_BASE(&btime_videoram) AM_SIZE(&btime_videoram_size)
63   AM_RANGE(0x8400, 0x87ff) AM_RAM AM_BASE(&btime_colorram)
64   AM_RANGE(0x8800, 0x881f) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
65   AM_RANGE(0x8820, 0x8fff) AM_RAM
190   AM_RANGE(0x0000, 0x5fff) AM_RAM
191   AM_RANGE(0x6000, 0x7fff) AM_RAM_WRITE(progolf_charram_w) AM_BASE(&progolf_fbram)
192   AM_RANGE(0x8000, 0x8fff) AM_RAM AM_BASE(&videoram)
193   AM_RANGE(0x9000, 0x9000) AM_READ_PORT("IN2") AM_WRITE(progolf_char_vregs_w)
194   AM_RANGE(0x9200, 0x9200) AM_READ_PORT("P1") AM_WRITE(progolf_scrollx_hi_w) //p1 inputs
195   AM_RANGE(0x9400, 0x9400) AM_READ_PORT("P2") AM_WRITE(progolf_scrollx_lo_w) //p2 inputs
196   AM_RANGE(0x9600, 0x9600) AM_READ_PORT("IN0") AM_WRITE(progolf_flip_screen_w)   /* VBLANK */
197   AM_RANGE(0x9800, 0x9800) AM_READ_PORT("DSW1")
198   AM_RANGE(0x9800, 0x9800) AM_DEVWRITE("crtc", mc6845_address_w)
199   AM_RANGE(0x9801, 0x9801) AM_DEVWRITE("crtc", mc6845_register_w)
200   AM_RANGE(0x9a00, 0x9a00) AM_READ_PORT("DSW2") AM_WRITE(audio_command_w)
201//  AM_RANGE(0x9e00, 0x9e00) AM_WRITENOP
66202   AM_RANGE(0xb000, 0xffff) AM_ROM
67203ADDRESS_MAP_END
68204
r5046r5047
72208   AM_RANGE(0x5000, 0x5fff) AM_DEVWRITE("ay1", ay8910_address_w)
73209   AM_RANGE(0x6000, 0x6fff) AM_DEVREADWRITE("ay2", ay8910_r, ay8910_data_w)
74210   AM_RANGE(0x7000, 0x7fff) AM_DEVWRITE("ay2", ay8910_address_w)
75//  AM_RANGE(0x8000, 0x8fff) AM_WRITE(interrupt_enable_w) //???
76   AM_RANGE(0x9000, 0xafff) AM_READ(soundlatch_r)
211   AM_RANGE(0x8000, 0x8fff) AM_READ(audio_command_r) AM_WRITENOP //volume control?
77212   AM_RANGE(0xf000, 0xffff) AM_ROM
78213ADDRESS_MAP_END
79214
215static INPUT_CHANGED( coin_inserted )
216{
217   cputag_set_input_line(field->port->machine, "maincpu", INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE);
218}
219
80220static INPUT_PORTS_START( progolf )
81221   PORT_START("IN0")
82   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
83   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
84   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
85   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
86   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
87   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
88   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
222   PORT_DIPNAME( 0x01, 0x01, "IN0" )
223   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
224   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
225   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
226   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
227   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
228   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
229   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
230   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
231   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
232   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
233   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
234   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
235   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
236   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
237   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
238   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
239   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
240   PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
241   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
242   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
89243   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_VBLANK )
90244
91   PORT_START("IN1")
92   /* */
245   PORT_START("P1")
246   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
247   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
248   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
249   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
250   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
251   PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED )
252   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START1 )
93253
94254   PORT_START("IN2")
95   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
96   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
97   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
98   PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
99   PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
100   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
101   PORT_BIT( 0x40, IP_ACTIVE_HIGH,IPT_COIN1 ) PORT_IMPULSE(2)
102   PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_COIN2 ) PORT_IMPULSE(2)
103INPUT_PORTS_END
255   PORT_DIPNAME( 0x01, 0x01, "IN3" )
256   PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
257   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
258   PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) )
259   PORT_DIPSETTING(    0x02, DEF_STR( Off ) )
260   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
261   PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) )
262   PORT_DIPSETTING(    0x04, DEF_STR( Off ) )
263   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
264   PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) )
265   PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
266   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
267   PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
268   PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
269   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
270   PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) )
271   PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
272   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
273   PORT_BIT( 0x40, IP_ACTIVE_LOW,IPT_COIN1 ) PORT_CHANGED(coin_inserted, 0)
274   PORT_BIT( 0x80, IP_ACTIVE_LOW,IPT_COIN2 ) PORT_CHANGED(coin_inserted, 0)
104275
105static const gfx_layout charlayout =
106{
107   8,8,    /* 8*8 characters */
108   1024,   /* 1024 characters */
109   3,      /* 3 bits per pixel */
110   { 2*1024*8*8, 1024*8*8, 0 },    /* the bitplanes are separated */
111   { 0, 1, 2, 3, 4, 5, 6, 7 },
112   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
113   8*8     /* every char takes 8 consecutive bytes */
114};
276   PORT_START("P2")
277   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
278   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
279   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
280   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
281   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
282   PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED )
283   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START2 )
115284
116static const gfx_layout spritelayout =
117{
118   16,16,  /* 16*16 sprites */
119   256,    /* 256 sprites */
120   3,      /* 3 bits per pixel */
121   { 2*256*16*16, 256*16*16, 0 },  /* the bitplanes are separated */
122   { 16*8+0, 16*8+1, 16*8+2, 16*8+3, 16*8+4, 16*8+5, 16*8+6, 16*8+7,
123     0, 1, 2, 3, 4, 5, 6, 7 },
124   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
125     8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
126   32*8    /* every sprite takes 32 consecutive bytes */
127};
285   PORT_START("DSW1")
286   PORT_DIPNAME( 0x01, 0x00, "DSW1" )
287   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
288   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
289   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
290   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
291   PORT_DIPSETTING(    0x02, DEF_STR( On ) )
292   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
293   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
294   PORT_DIPSETTING(    0x04, DEF_STR( On ) )
295   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
296   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
297   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
298   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
299   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
300   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
301   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
302   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
303   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
304   PORT_BIT( 0x40, IP_ACTIVE_HIGH,IPT_SERVICE1 ) PORT_CHANGED(coin_inserted, 0)
305   PORT_SERVICE( 0x80, IP_ACTIVE_HIGH )
128306
307   PORT_START("DSW2")
308   PORT_DIPNAME( 0x01, 0x00, "DSW2" )
309   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
310   PORT_DIPSETTING(    0x01, DEF_STR( On ) )
311   PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) )
312   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
313   PORT_DIPSETTING(    0x02, DEF_STR( On ) )
314   PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) )
315   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
316   PORT_DIPSETTING(    0x04, DEF_STR( On ) )
317   PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
318   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
319   PORT_DIPSETTING(    0x08, DEF_STR( On ) )
320   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) )
321   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
322   PORT_DIPSETTING(    0x10, DEF_STR( On ) )
323   PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) )
324   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
325   PORT_DIPSETTING(    0x20, DEF_STR( On ) )
326   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) )
327   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
328   PORT_DIPSETTING(    0x40, DEF_STR( On ) )
329   PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) )
330   PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
331   PORT_DIPSETTING(    0x80, DEF_STR( On ) )
332INPUT_PORTS_END
333
129334static const gfx_layout progolf_charlayout =
130335{
131336   8,8,         /* 8*8 characters */
r5046r5047
137342   8*8     /* every char takes 8 consecutive bytes */
138343};
139344
140static const gfx_layout progolf_charlayout2 =
141{
142   8,8,         /* 8*8 characters */
143   RGN_FRAC(1,1),  /* 512 characters */
144   1,            /* 3 bits per pixel */
145   { 0 },  /* the bitplanes are separated */
146   { 0, 1, 2, 3, 4, 5, 6, 7 },
147   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
148   8*8     /* every char takes 8 consecutive bytes */
149};
150
151#if 1
152static const gfx_layout progolf_spritelayout2 =
153{
154   16,16,  /* 16*16 sprites */
155   RGN_FRAC(1,1),    /* 256 sprites */
156   1,//3,      /* 3 bits per pixel */
157   { 0},//RGN_FRAC(2,3), RGN_FRAC(1,3), RGN_FRAC(0,3) },  /* the bitplanes are separated */
158   { 16*8+0, 16*8+1, 16*8+2, 16*8+3, 16*8+4, 16*8+5, 16*8+6, 16*8+7,
159     0, 1, 2, 3, 4, 5, 6, 7 },
160   { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
161     8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
162   32*8    /* every sprite takes 32 consecutive bytes */
163};
164#endif
165345static GFXDECODE_START( progolf )
166346   GFXDECODE_ENTRY( "gfx1", 0x0000, progolf_charlayout, 0, 8 ) /* sprites */
167   GFXDECODE_ENTRY( NULL,           0x2000, charlayout,           0, 4 ) /* char set #1 */
168   GFXDECODE_ENTRY( NULL,           0x2000, spritelayout,         0, 4 ) /* sprites */
169
170//  GFXDECODE_ENTRY( "gfx2", 0x0000, progolf_charlayout2, 0, 8 ) /* sprites */
171//  GFXDECODE_ENTRY( "gfx2", 0x0000, progolf_spritelayout2, 0, 8 ) /* sprites */
172347GFXDECODE_END
173348
174349
175#ifdef UNUSED_FUNCTION
350//#ifdef UNUSED_FUNCTION
176351static INTERRUPT_GEN( progolf_interrupt )
177352{
178   //if (input_port_read(machine, "IN2") & 0xc0)
179      cpu_set_input_line(device, /*0*/INPUT_LINE_NMI, /*HOLD_LINE*/PULSE_LINE);
180353}
181#endif
354//#endif
182355
356static const mc6845_interface mc6845_intf =
357{
358   "screen",   /* screen we are acting on */
359   8,         /* number of pixels per video memory address */
360   NULL,      /* before pixel update callback */
361   NULL,      /* row update callback */
362   NULL,      /* after pixel update callback */
363   DEVCB_NULL,   /* callback for display state changes */
364   DEVCB_NULL,   /* callback for cursor state changes */
365   DEVCB_NULL,   /* HSYNC callback */
366   DEVCB_NULL,   /* VSYNC callback */
367   NULL      /* update address callback */
368
369};
370
371static PALETTE_INIT( progolf )
372{
373   int i;
374
375   for (i = 0;i < machine->config->total_colors;i++)
376   {
377      int bit0,bit1,bit2,r,g,b;
378
379      /* red component */
380      bit0 = (color_prom[i] >> 0) & 0x01;
381      bit1 = (color_prom[i] >> 1) & 0x01;
382      bit2 = (color_prom[i] >> 2) & 0x01;
383      r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
384      /* green component */
385      bit0 = (color_prom[i] >> 3) & 0x01;
386      bit1 = (color_prom[i] >> 4) & 0x01;
387      bit2 = (color_prom[i] >> 5) & 0x01;
388      g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
389      /* blue component */
390      bit0 = 0;
391      bit1 = (color_prom[i] >> 6) & 0x01;
392      bit2 = (color_prom[i] >> 7) & 0x01;
393      b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
394
395      palette_set_color(machine,i,MAKE_RGB(r,g,b));
396   }
397}
398
183399static MACHINE_DRIVER_START( progolf )
184400   /* basic machine hardware */
185   MDRV_CPU_ADD("maincpu", M6502, 2000000)      /* ? */
401   MDRV_CPU_ADD("maincpu", M6502, 3000000/2) /* guess, 3 Mhz makes the game to behave worse? */
186402   MDRV_CPU_PROGRAM_MAP(main_cpu)
187// MDRV_CPU_VBLANK_INT("screen", progolf_interrupt)
403    MDRV_CPU_VBLANK_INT("screen", progolf_interrupt)
188404
189405     MDRV_CPU_ADD("audiocpu", M6502, 500000)
190406   MDRV_CPU_PROGRAM_MAP(sound_cpu)
191//  MDRV_CPU_VBLANK_INT("screen",nmi_line_pulse)
192407
408   MDRV_QUANTUM_PERFECT_CPU("maincpu")
409
193410   /* video hardware */
194411   MDRV_SCREEN_ADD("screen", RASTER)
195412   MDRV_SCREEN_REFRESH_RATE(57)
r5046r5047
200417
201418   MDRV_GFXDECODE(progolf)
202419   MDRV_PALETTE_LENGTH(32*3)
420   MDRV_PALETTE_INIT(progolf)
203421
204   MDRV_PALETTE_INIT(btime)
205
206   MDRV_VIDEO_START(btime)
422   MDRV_MC6845_ADD("crtc", MC6845, 3000000/4, mc6845_intf)   /* hand tuned to get ~57 fps */
423   MDRV_VIDEO_START(progolf)
207424   MDRV_VIDEO_UPDATE(progolf)
208425
209426   /* sound hardware */
210427   MDRV_SPEAKER_STANDARD_MONO("mono")
211428
212   MDRV_SOUND_ADD("ay1", AY8910, 1500000)
429   MDRV_SOUND_ADD("ay1", AY8910, 12000000/8)
213430   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.23)
214431
215   MDRV_SOUND_ADD("ay2", AY8910, 1500000)
432   MDRV_SOUND_ADD("ay2", AY8910, 12000000/8)
216433   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.23)
217434MACHINE_DRIVER_END
218435
r5046r5047
221438   ROM_REGION( 0x10000, "maincpu", 0 )
222439   ROM_LOAD( "g4-m.2a",      0xb000, 0x1000, CRC(8f06ebc0) SHA1(c012dcaf06cbd9e49f3ae819d9cbed4df8751cec) )
223440   ROM_LOAD( "g3-m.4a",      0xc000, 0x1000, CRC(8101b231) SHA1(d933992c93b3cd9a052ac40ec1fa92a181b28691) )
224   ROM_LOAD( "g2-m.6a",      0xd000, 0x1000, CRC(a4a0d8dc) SHA1(04db60d5cfca4834ac2cc7661f772704489cb329) )
441   ROM_LOAD( "g2-m.6a",      0xd000, 0x1000, BAD_DUMP CRC(a4a0d8dc) SHA1(04db60d5cfca4834ac2cc7661f772704489cb329) ) //bit-rotted?
225442   ROM_LOAD( "g1-m.8a",      0xe000, 0x1000, CRC(749032eb) SHA1(daa356b2c70bcd8cdd0c4df4268b6158bc8aae8e) )
226443   ROM_LOAD( "g0-m.9a",      0xf000, 0x1000, CRC(8f8b1e8e) SHA1(fc877a8f2b26ea48c5ba2324678d6077f3432a79) )
227444
r5046r5047
240457ROM_END
241458
242459ROM_START( progolfa )
243   ROM_REGION( 0x10000, "maincpu", 0 )
460   ROM_REGION( 0x10000, "maincpu", 0 ) // custom DECO CPU-6 module
244461   ROM_LOAD( "g4-m.a3",      0xb000, 0x1000, CRC(015a08d9) SHA1(671d5cd708e098dbda3e495a8b4ce3393c6971da) )
245462   ROM_LOAD( "g3-m.a4",      0xc000, 0x1000, CRC(c1339da5) SHA1(e9728dcc5f67fbe79eea818ba48421c46d9e63e9) )
246463   ROM_LOAD( "g2-m.a6",      0xd000, 0x1000, CRC(fafec36e) SHA1(70880d6f9b11505d466f36c12a43361ee2639fed) )
r5046r5047
272489   memory_set_decrypted_region(space,0x0000,0xffff, decrypted);
273490
274491   /* Swap bits 5 & 6 for opcodes */
275   for (A = 0;A < 0x10000;A++)
492   for (A = 0xb000;A < 0x10000;A++)
276493      decrypted[A] = BITSWAP8(rom[A],7,5,6,4,3,2,1,0);
494
495   /*
496    CE12: B1 66         lda  ($66),y
497    CE14: 20 39 A7      jsr  $C759
498        C759: E6 66         inc  $66
499        C75B: D0 02         bne  $C75F
500        C75D: E6 67         inc  $67
501        C75F: 60            rts
502    CE17: C9 FD         cmp  #$FD
503    CE19: F0 44         beq  $CE3F
504    CE1B: C9 FE         cmp  #$FE
505    CE1D: F0 13         beq  $CE32
506    CE1F: C9 FF         cmp  #$FF
507    CE21: F0 4C         beq  $CE4F <- might go out there, this is the only branch in the entire rom that points to the rts
508    ...
509    CE48: 90 A3         bcc  $CE0D
510    CE4A: E6 69         inc  $69
511    CE4C: 4C 0D AE      jmp  $CE0D
512    CE4F: 60            rts
513    */
514
515   decrypted[0xce21] = 0xd0;
277516}
278517
279/*Maybe progolf is a bootleg and progolfa is the original (with Deco C10707 as CPU)?*/
280GAME( 1981, progolf,  0,       progolf, progolf, progolf, ROT270, "Data East Corporation", "18 Holes Pro Golf (set 1)", GAME_NOT_WORKING )
281GAME( 1981, progolfa, progolf, progolf, progolf, progolf, ROT270, "Data East Corporation", "18 Holes Pro Golf (set 2)", GAME_NOT_WORKING ) // doesn't display anything
518static DRIVER_INIT( progolfa )
519{
520   int A;
521   UINT8 *rom = memory_region(machine, "maincpu");
522
523   /* TODO: data is likely to not be encrypted, just the opcodes are. */
524   for (A = 0x0000;A < 0x10000;A++)
525   {
526      switch(A & 0x1f)
527      {
528         // 0xda (1011) -> 0xea (1110)
529         // 0xc5 (1100) -> 0xa5 (1010)
530         // 0x4c (0100) -> 0x4c (0100) <- data!!!
531         case 0x03: rom[A] = BITSWAP8(rom[A],7,4,6,5,3,2,1,0); break;
532         // 0x59 (0101) -> 0xc9 (1100)
533         case 0x05: rom[A] = BITSWAP8(rom[A],4,6,7,5,3,2,1,0); break;
534         //case 0x04: rom[A] = BITSWAP8(rom[A],7,,4,3,2,1,0); break;
535         case 0x0b: rom[A] = BITSWAP8(rom[A],7,5,6,4,3,2,1,0); break;
536         // 0x6a (0110) -> 0x9a (1001)
537         case 0x0d: rom[A] = BITSWAP8(rom[A],6,7,4,5,3,2,1,0); break;
538         // 0x70 (0111) -> 0xd0 (1101)
539         case 0x0f: rom[A] = BITSWAP8(rom[A],5,6,7,4,3,2,1,0); break;
540         case 0x13: rom[A] = BITSWAP8(rom[A],5,6,7,4,3,2,1,0); break;
541         // 0xc0 (1100) -> 0xa0 (1010)
542         // 0x4d (0100) -> 0x8d (1000)
543         case 0x17: rom[A] = BITSWAP8(rom[A],6,5,7,4,3,2,1,0); break;
544         // 0xed (1110) -> 0xbd (1011)
545         case 0x1b: rom[A] = BITSWAP8(rom[A],7,4,6,5,3,2,1,0); break;
546         // 0xcd (1100) -> 0xad (1010)
547         case 0x1f: rom[A] = BITSWAP8(rom[A],6,5,7,4,3,2,1,0); break;
548      }
549   }
550}
551
552/* Maybe progolf is a bootleg? progolfa uses DECO CPU-6 as custom module CPU (the same as Zoar) */
553GAME( 1981, progolf,  0,       progolf, progolf, progolf,  ROT270, "Data East Corporation", "18 Holes Pro Golf (set 1)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_NO_COCKTAIL )
554GAME( 1981, progolfa, progolf, progolf, progolf, progolfa, ROT270, "Data East Corporation", "18 Holes Pro Golf (set 2)", GAME_NOT_WORKING | GAME_IMPERFECT_GRAPHICS | GAME_NO_COCKTAIL ) // doesn't display anything
src/mame/drivers/8080bw.c
r5046r5047
15581558
15591559MACHINE_DRIVER_END
15601560
1561/*******************************************************/
1562/*                                                     */
1563/* Taito "Steel Worker"                                */
1564/*                                                     */
1565/*******************************************************/
1566
1567static ADDRESS_MAP_START( steelwkr_io_map, ADDRESS_SPACE_IO, 8 )
1568    AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0")
1569    AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1")
1570    AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_WRITE(mb14241_0_shift_count_w)
1571    AM_RANGE(0x03, 0x03) AM_READWRITE(mb14241_0_shift_result_r, invadpt2_sh_port_1_w)
1572    AM_RANGE(0x04, 0x04) AM_WRITE(mb14241_0_shift_data_w)
1573    AM_RANGE(0x05, 0x05) AM_WRITE(invadpt2_sh_port_2_w)
1574   AM_RANGE(0x06, 0x06) AM_WRITENOP /* ? */
1575ADDRESS_MAP_END
1576
1577static INPUT_PORTS_START( steelwkr )
1578   PORT_START("IN0")
1579   PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1580   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1581   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1582   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1583   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1584   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1585   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1586   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1587
1588   PORT_START("IN1")
1589   PORT_BIT( 0x01, IP_ACTIVE_LOW,  IPT_COIN1 )
1590   PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
1591   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
1592   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
1593   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
1594   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
1595   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
1596   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_BUTTON2 )
1597
1598   PORT_START("IN2")
1599   PORT_DIPNAME( 0x03, 0x02, DEF_STR( Lives ) )                           PORT_DIPLOCATION("SW1:1,2")
1600   PORT_DIPSETTING(    0x00, "1" )
1601   PORT_DIPSETTING(    0x01, "2" )
1602   PORT_DIPSETTING(    0x02, "3" )
1603   PORT_DIPSETTING(    0x03, "4" )
1604   PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT )                              PORT_DIPLOCATION("SW1:3")
1605   PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW1:4" )
1606   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
1607   PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_PLAYER(2)
1608   PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_PLAYER(2)
1609   PORT_BIT( 0x80, IP_ACTIVE_LOW,  IPT_BUTTON2 ) PORT_PLAYER(2)
1610
1611   /* Dummy port for cocktail mode */
1612   INVADERS_CAB_TYPE_PORT
1613INPUT_PORTS_END
1614
1615
1616/* same as regular invaders, but with a color board added */
1617
1618static MACHINE_DRIVER_START( steelwkr )
1619
1620    /* basic machine hardware */
1621    MDRV_IMPORT_FROM(mw8080bw_root)
1622    MDRV_CPU_MODIFY("maincpu")
1623    MDRV_CPU_IO_MAP(steelwkr_io_map)
1624    MDRV_MACHINE_START(extra_8080bw)
1625
1626   /* video hardware */
1627   MDRV_VIDEO_UPDATE(invadpt2)
1628
1629    /* sound hardware */
1630   MDRV_IMPORT_FROM(invaders_samples_audio)
1631
1632MACHINE_DRIVER_END
1633
15611634/*****************************************************
15621635
15631636 Omori "Shuttle Invader" ??
r5046r5047
20272100   ROM_LOAD( "la02-1.35",    0x0800, 0x0800, CRC(43bc65c5) SHA1(5f9827c02c2d221e1607359c840374ff7fb92fbf) )
20282101   ROM_LOAD( "la03-1.34",    0x1000, 0x0800, CRC(278ef9cf) SHA1(74a9c1d3500ea28e50d07363a547c381999c84fa) )
20292102   ROM_LOAD( "la04-1.33",    0x1800, 0x0800, CRC(5116b234) SHA1(b165b2574cbcb26a5bb43f91df5f8be5f111f486) )
2103
2104   ROM_REGION( 0x0800, "proms", 0 )      /* color maps player 1/player 2 */
2105   ROM_LOAD( "01.bin",       0x0000, 0x0400, CRC(aac24f34) SHA1(ad110e776547fb48baac568bb50d61854537ca34) )
2106   ROM_LOAD( "02.bin",       0x0400, 0x0400, CRC(2bdf83a0) SHA1(01ffbd43964c41987e7d44816271308f9a70802b) )
20302107ROM_END
20312108
20322109ROM_START( laser )
r5046r5047
25372614   ROM_LOAD( "2708.7a",   0x1c00, 0x0400, CRC(aeca51c1) SHA1(767bca1e6bca41327b9ff6c3570edcabe46dec21) )
25382615ROM_END
25392616
2617ROM_START( steelwkr )
2618   ROM_REGION( 0x10000, "maincpu", 0 )
2619   ROM_LOAD( "1.36",             0x0000, 0x0400, CRC(5d78873a) SHA1(293cbc067937668148181453877239cb5ed57600) )
2620   ROM_LOAD( "2.35",             0x0400, 0x0400, CRC(99cd70c6) SHA1(a08bf4db6b39d22dfcf052cc6603aab041db0208) )
2621   ROM_LOAD( "3.34",             0x0800, 0x0400, CRC(18103b67) SHA1(45929ea56ab15769fc68873570aab3d403e8e913) )
2622   ROM_LOAD( "4.33",             0x0c00, 0x0400, CRC(c413ae82) SHA1(302b933b45b2aaa515434b5268fd74aec4160e3f) )
2623   ROM_LOAD( "5.32",             0x1000, 0x0400, CRC(ca7b07b5) SHA1(cbea221c4daf84825f99bbef6d731fc2ef88feeb) )
2624   ROM_LOAD( "6.31",             0x1400, 0x0400, CRC(f8181fa0) SHA1(a907611529a1500a2ae118e834c2d4b6d11974f1) )
2625   ROM_LOAD( "7.42",             0x1800, 0x0400, CRC(a35f113e) SHA1(53073037db55c14055810c0bee7b85eb75bbaa72) )
2626   ROM_LOAD( "8.41",             0x1c00, 0x0400, CRC(af208370) SHA1(ccbd002accda26cc0a02987d9801a47e5f49921a) )
2627
2628   ROM_REGION( 0x0800, "proms", 0 )      /* color maps player 1/player 2 (not used, but they were on the board) */
2629   ROM_LOAD( "la05.1",         0x0000, 0x0400, CRC(98f31392) SHA1(ccdd1bd2ddd24bd6b1f8255a87e138f937eaf5b4) )
2630   ROM_LOAD( "la06.2",         0x0400, 0x0400, CRC(98f31392) SHA1(ccdd1bd2ddd24bd6b1f8255a87e138f937eaf5b4) )
2631ROM_END
2632
25402633/* board #  rom       parent    machine   inp */
25412634
25422635/* Taito games */
r5046r5047
25642657GAME( 1980, polarisa, polaris,  polaris,  polaris,  0, ROT270, "Taito", "Polaris (set 2)", GAME_SUPPORTS_SAVE )
25652658GAME( 1980, ballbomb, 0,        ballbomb, ballbomb, 0, ROT270, "Taito", "Balloon Bomber", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS )    /* missing clouds */
25662659GAME( 1980, indianbt, 0,        indianbt, indianbt, 0, ROT270, "Taito", "Indian Battle", GAME_SUPPORTS_SAVE )
2660GAME( 1980, steelwkr, 0,        steelwkr, steelwkr, 0, ROT0  , "Taito", "Steel Worker", GAME_SUPPORTS_SAVE )
25672661
25682662/* Misc. manufacturers */
25692663
r5046r5047
25932687GAMEL(19??, invrvnge, 0,        invrvnge, invrvnge, 0, ROT270, "Zenitone-Microsec Ltd.", "Invader's Revenge",  GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND, layout_invrvnge )
25942688GAMEL(19??, invrvnga, invrvnge, invrvnge, invrvnge, 0, ROT270, "Zenitone-Microsec Ltd. (Dutchford license)", "Invader's Revenge (Dutchford)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_SOUND, layout_invrvnge )
25952689GAME( 1980, spclaser, 0,        invaders, spclaser, 0, ROT270, "Taito", "Space Laser", GAME_SUPPORTS_SAVE )
2596GAME( 1980, intruder, spclaser, invaders, spclaser, 0, ROT270, "GamePlan (Taito)", "Intruder", GAME_SUPPORTS_SAVE )
2690GAME( 1980, intruder, spclaser, invadpt2, spclaser, 0, ROT270, "GamePlan (Taito)", "Intruder", GAME_SUPPORTS_SAVE )
25972691GAME( 1980, laser,    spclaser, invaders, spclaser, 0, ROT270, "Leisure Time Electronics Inc.", "Astro Laser", GAME_SUPPORTS_SAVE )
25982692GAME( 1979, spcewarl, spclaser, invaders, spclaser, 0, ROT270, "Leijac Corporation (Konami)","Space War (Leijac Corporation)", GAME_SUPPORTS_SAVE )
25992693GAME( 1979, rollingc, 0,        rollingc, rollingc, 0, ROT270, "Nichibutsu", "Rolling Crash / Moon Base", GAME_SUPPORTS_SAVE )
src/mame/drivers/kingobox.c
r5046r5047
487487
488488   MDRV_CPU_ADD("audiocpu", Z80, 4000000)        /* 4.0 MHz */
489489   MDRV_CPU_PROGRAM_MAP(kingobox_sound_map)
490   MDRV_CPU_IO_MAP(ringking_sound_io_map)
490   MDRV_CPU_IO_MAP(kingobox_sound_io_map)
491491   MDRV_CPU_PERIODIC_INT(nmi_line_pulse, 6000)   /* Hz */
492492
493493   MDRV_QUANTUM_TIME(HZ(6000)) /* We really need heavy synching among the processors */
src/mame/drivers/polyplay.c
r5046r5047
356356
357357static TIMER_CALLBACK( polyplay_timer_callback )
358358{
359   cputag_set_input_line_and_vector(machine, "audiocpu", 0, HOLD_LINE, 0x4c);
359   cputag_set_input_line_and_vector(machine, "maincpu", 0, HOLD_LINE, 0x4c);
360360}
361361
362362/* game driver */
src/mame/drivers/thayers.c
r5046r5047
300300
301301    */
302302
303   if (!BIT(data, 2) & cart_present)
303   if ((!BIT(data, 2)) & cart_present)
304304   {
305305      cputag_set_input_line(space->machine, "maincpu", INPUT_LINE_NMI, HOLD_LINE);
306306   }
src/mame/drivers/merit.c
r5046r5047
240240}
241241
242242
243static MC6845_ON_HSYNC_CHANGED(hsync_changed)
243static WRITE_LINE_DEVICE_HANDLER(hsync_changed)
244244{
245245   /* update any video up to the current scanline */
246246   video_screen_update_now(device->machine->primary_screen);
247247}
248248
249static MC6845_ON_VSYNC_CHANGED(vsync_changed)
249static WRITE_LINE_DEVICE_HANDLER(vsync_changed)
250250{
251   cputag_set_input_line(device->machine, "maincpu", 0, vsync ? ASSERT_LINE : CLEAR_LINE);
251   cputag_set_input_line(device->machine, "maincpu", 0, state ? ASSERT_LINE : CLEAR_LINE);
252252}
253253
254254static const mc6845_interface mc6845_intf =
255255{
256   "screen",            /* screen we are acting on */
257   8,                  /* number of pixels per video memory address */
258   begin_update,         /* before pixel update callback */
259   update_row,            /* row update callback */
260   0,                  /* after pixel update callback */
261   0,                  /* callback for display state changes */
262   hsync_changed,         /* HSYNC callback */
263   vsync_changed         /* VSYNC callback */
256   "screen",               /* screen we are acting on */
257   8,                     /* number of pixels per video memory address */
258   begin_update,            /* before pixel update callback */
259   update_row,               /* row update callback */
260   NULL,                  /* after pixel update callback */
261   DEVCB_NULL,               /* callback for display state changes */
262   DEVCB_NULL,               /* callback for cursor state changes */
263   DEVCB_LINE(hsync_changed),   /* HSYNC callback */
264   DEVCB_LINE(vsync_changed),   /* VSYNC callback */
265   NULL                  /* update address callback */
264266};
265267
266268static WRITE8_DEVICE_HANDLER( led1_w )
src/mame/drivers/dambustr.c
r5046r5047
1515
1616#include "cpu/z80/z80.h"
1717#include "includes/galaxian.h"
18#include "galaxold.h"
18#include "includes/galaxold.h"
1919
2020
2121static int noise_data = 0;
r5046r5047
215215
216216ROM_START( dambustr )
217217   ROM_REGION( 0x10000, "maincpu", 0 )
218   ROM_LOAD( "db8a",   0x4000, 0x1000, CRC(fd041ff4) SHA1(8d27da7bf0c655633711b960cbc23950c8a371ae) )
219   ROM_LOAD( "db6a",   0x5000, 0x1000, CRC(448db54b) SHA1(c9afbf02bf4d4ac2972ab7ac6adfa4e951ae79c2) )
220   ROM_LOAD( "db7a",   0x6000, 0x1000, CRC(675b1f5e) SHA1(6a386212a640fb467b6956a4dc5a68476af1cf97) )
221   ROM_LOAD( "db5a",   0x7000, 0x1000, CRC(75659ecc) SHA1(b61254fb12f3999607abd88d1cc649dcfbf0384c) )
218   ROM_LOAD( "db8a.pr8",   0x4000, 0x1000, CRC(fd041ff4) SHA1(8d27da7bf0c655633711b960cbc23950c8a371ae) )
219   ROM_LOAD( "db6a.pr6",   0x5000, 0x1000, CRC(448db54b) SHA1(c9afbf02bf4d4ac2972ab7ac6adfa4e951ae79c2) )
220   ROM_LOAD( "db7a.pr7",   0x6000, 0x1000, CRC(675b1f5e) SHA1(6a386212a640fb467b6956a4dc5a68476af1cf97) )
221   ROM_LOAD( "db5a.pr5",   0x7000, 0x1000, CRC(75659ecc) SHA1(b61254fb12f3999607abd88d1cc649dcfbf0384c) )
222222
223223   ROM_REGION( 0x10000,"user1",0)
224    ROM_LOAD( "db11a",   0x0000, 0x1000, CRC(427bd3fb) SHA1(cdbaef4040fa2e0598a086e320d51ecb26a591dd) )
225   ROM_LOAD( "db9a",    0x1000, 0x1000, CRC(57164563) SHA1(8471d0660f39511d0afa3cdd63a1e84b0ea80fd0) )
226   ROM_LOAD( "db10a",   0x2000, 0x1000, CRC(075b9c5e) SHA1(ff6ce873897004c0e796813725e260df85a520f9) )
227   ROM_LOAD( "db12a",   0x3000, 0x1000, CRC(ed01a68b) SHA1(9dd37c2a25865717a7acdd7e2a3bef26a4cef3d9) )
224    ROM_LOAD( "db11a.pr11",  0x0000, 0x1000, CRC(427bd3fb) SHA1(cdbaef4040fa2e0598a086e320d51ecb26a591dd) )
225   ROM_LOAD( "db9a.pr9",    0x1000, 0x1000, CRC(57164563) SHA1(8471d0660f39511d0afa3cdd63a1e84b0ea80fd0) )
226   ROM_LOAD( "db10a.pr10",  0x2000, 0x1000, CRC(075b9c5e) SHA1(ff6ce873897004c0e796813725e260df85a520f9) )
227   ROM_LOAD( "db12a.pr12",  0x3000, 0x1000, CRC(ed01a68b) SHA1(9dd37c2a25865717a7acdd7e2a3bef26a4cef3d9) )
228228
229229   ROM_REGION( 0x4000, "gfx1", ROMREGION_DISPOSE )
230   ROM_LOAD( "db1a",   0x1000, 0x1000, CRC(4cb964cd) SHA1(1c90b14deb201a64b8ed4378b022e9e4574aed94) )
231   ROM_LOAD( "db2a",   0x3000, 0x1000, CRC(0a0a6af5) SHA1(ecd2a6696ce9154f030c830ccb45690787881a73) )
232   ROM_LOAD( "db3a",   0x0000, 0x1000, CRC(9e9a9710) SHA1(a9f67a05a2882b9f6f3378cc73e90539de4b8ca4) )
233   ROM_LOAD( "db4a",   0x2000, 0x1000, CRC(d9d2df33) SHA1(97057fe33c146898755b556558ff707b9f4551ec) )
230   ROM_LOAD( "db3a.pr3",   0x0000, 0x1000, CRC(9e9a9710) SHA1(a9f67a05a2882b9f6f3378cc73e90539de4b8ca4) )
231   ROM_LOAD( "db1a.pr1",   0x1000, 0x1000, CRC(4cb964cd) SHA1(1c90b14deb201a64b8ed4378b022e9e4574aed94) )
232   ROM_LOAD( "db4a.pr3",   0x2000, 0x1000, CRC(d9d2df33) SHA1(97057fe33c146898755b556558ff707b9f4551ec) )
233   ROM_LOAD( "db2a.pr2",   0x3000, 0x1000, CRC(0a0a6af5) SHA1(ecd2a6696ce9154f030c830ccb45690787881a73) )
234234
235   // This ROM needs to be dumped, only a guess at the moment:
236235   ROM_REGION( 0x0020, "proms", 0 )
237   ROM_LOAD( "dambustr.clr", 0x0000, 0x0020, BAD_DUMP CRC(cda7b558) SHA1(2977967917970dffa91e69db19c62ba8ff6c3053) )
236   ROM_LOAD( "mi-7603-5.ic4", 0x0000, 0x0020, CRC(f131f92f) SHA1(8b0f623d2ea09b5612dde0f330c5e473a7d72e06) ) /* near DB5 - DB8 */
237
238   ROM_REGION( 0x0020, "unk_prom", 0 ) //timing?
239   ROM_LOAD( "mi-7603-5.ic3", 0x0000, 0x0020, CRC(e2a54c47) SHA1(1e08f8e3d0ae0efb2d178ab11ec2bddaeb6d7478) ) /* near DB1 - DB4 */
238240ROM_END
239241
240242
243ROM_START( dambusta )
244   ROM_REGION( 0x10000, "maincpu", 0 )
245   ROM_LOAD( "db8a.pr8",   0x4000, 0x1000, CRC(fd041ff4) SHA1(8d27da7bf0c655633711b960cbc23950c8a371ae) )
246   ROM_LOAD( "db6.pr6",    0x5000, 0x1000, CRC(56d301a9) SHA1(a0839767af822ab1b8df1a7d0767e72b494974c6) ) /* This single rom had a yellow label, while all the rest were white */
247   ROM_LOAD( "db7a.pr7",   0x6000, 0x1000, CRC(675b1f5e) SHA1(6a386212a640fb467b6956a4dc5a68476af1cf97) )
248   ROM_LOAD( "db5a.pr5",   0x7000, 0x1000, CRC(75659ecc) SHA1(b61254fb12f3999607abd88d1cc649dcfbf0384c) )
249
250   ROM_REGION( 0x10000,"user1",0)
251    ROM_LOAD( "db11.pr11",   0x0000, 0x1000, CRC(427bd3fb) SHA1(cdbaef4040fa2e0598a086e320d51ecb26a591dd) )
252   ROM_LOAD( "db9a.pr9",    0x1000, 0x1000, CRC(57164563) SHA1(8471d0660f39511d0afa3cdd63a1e84b0ea80fd0) )
253   ROM_LOAD( "db10a.pr10",  0x2000, 0x1000, CRC(075b9c5e) SHA1(ff6ce873897004c0e796813725e260df85a520f9) ) /* Had a hand drawn "PLUS" symbol on the rom label */
254   ROM_LOAD( "db12a.pr12",  0x3000, 0x1000, CRC(ed01a68b) SHA1(9dd37c2a25865717a7acdd7e2a3bef26a4cef3d9) )
255
256   ROM_REGION( 0x4000, "gfx1", ROMREGION_DISPOSE )
257   ROM_LOAD( "db3a.rom",   0x0000, 0x1000, CRC(2347e26e) SHA1(85909c6cca7a5249d28668291a28e24d5b90293b) ) /* All roms, except for 6 & 11, had a hand drawn "A" on the label */
258   ROM_LOAD( "db1a.pr1",   0x1000, 0x1000, CRC(4cb964cd) SHA1(1c90b14deb201a64b8ed4378b022e9e4574aed94) )
259   ROM_LOAD( "db4a.pr3",   0x2000, 0x1000, CRC(d9d2df33) SHA1(97057fe33c146898755b556558ff707b9f4551ec) )
260   ROM_LOAD( "db2a.pr2",   0x3000, 0x1000, CRC(0a0a6af5) SHA1(ecd2a6696ce9154f030c830ccb45690787881a73) )
261
262   ROM_REGION( 0x0020, "proms", 0 )
263   ROM_LOAD( "mi-7603-5.ic4", 0x0000, 0x0020, CRC(f131f92f) SHA1(8b0f623d2ea09b5612dde0f330c5e473a7d72e06) ) /* near DB5 - DB8 */
264
265   ROM_REGION( 0x0020, "unk_prom", 0 ) //timing?
266   ROM_LOAD( "mi-7603-5.ic3", 0x0000, 0x0020, CRC(e2a54c47) SHA1(1e08f8e3d0ae0efb2d178ab11ec2bddaeb6d7478) ) /* near DB1 - DB4 */
267ROM_END
268
269
241270ROM_START( dambust )
242271   ROM_REGION( 0x10000, "maincpu", 0 )
243   ROM_LOAD( "db08.bin",   0x4000, 0x1000, CRC(fd041ff4) SHA1(8d27da7bf0c655633711b960cbc23950c8a371ae) )
244   ROM_LOAD( "db06p.bin",  0x5000, 0x1000, CRC(35dcee01) SHA1(2c23c727d9b38322a6d0548dfe6a2a254f3530af) )
245   ROM_LOAD( "db07.bin",   0x6000, 0x1000, CRC(675b1f5e) SHA1(6a386212a640fb467b6956a4dc5a68476af1cf97) )
246   ROM_LOAD( "db05.bin",   0x7000, 0x1000, CRC(75659ecc) SHA1(b61254fb12f3999607abd88d1cc649dcfbf0384c) )
272   ROM_LOAD( "db8.pr8",    0x4000, 0x1000, CRC(fd041ff4) SHA1(8d27da7bf0c655633711b960cbc23950c8a371ae) )
273   ROM_LOAD( "db6p.bin",   0x5000, 0x1000, CRC(35dcee01) SHA1(2c23c727d9b38322a6d0548dfe6a2a254f3530af) )
274   ROM_LOAD( "db7.pr7",    0x6000, 0x1000, CRC(675b1f5e) SHA1(6a386212a640fb467b6956a4dc5a68476af1cf97) )
275   ROM_LOAD( "db5.pr5",    0x7000, 0x1000, CRC(75659ecc) SHA1(b61254fb12f3999607abd88d1cc649dcfbf0384c) )
247276
248277   ROM_REGION( 0x10000,"user1",0)
249278    ROM_LOAD( "db11.bin",   0x0000, 0x1000, CRC(9e6b34fe) SHA1(5cf47f5a5280ac53490240df220edf6178e87f4f) )
250   ROM_LOAD( "db09.bin",   0x1000, 0x1000, CRC(57164563) SHA1(8471d0660f39511d0afa3cdd63a1e84b0ea80fd0) )
279   ROM_LOAD( "db9.pr9",    0x1000, 0x1000, CRC(57164563) SHA1(8471d0660f39511d0afa3cdd63a1e84b0ea80fd0) )
251280   ROM_LOAD( "db10p.bin",  0x2000, 0x1000, CRC(c129c57b) SHA1(c25abd7ee97b71941d9fa6acd0d92c116f1ff408) )
252281   ROM_LOAD( "db12.bin",   0x3000, 0x1000, CRC(ea4c65f5) SHA1(cb761e0543cacd6b437c6e88615f97df83245a34) )
253282
254283   ROM_REGION( 0x4000, "gfx1", ROMREGION_DISPOSE )
255   ROM_LOAD( "db1ap.bin",  0x1000, 0x1000, CRC(4cb964cd) SHA1(1c90b14deb201a64b8ed4378b022e9e4574aed94) )
256   ROM_LOAD( "db02.bin",   0x3000, 0x1000, CRC(0a0a6af5) SHA1(ecd2a6696ce9154f030c830ccb45690787881a73) )
257   ROM_LOAD( "db03.bin",   0x0000, 0x1000, CRC(9e9a9710) SHA1(a9f67a05a2882b9f6f3378cc73e90539de4b8ca4) )
258   ROM_LOAD( "db04.bin",   0x2000, 0x1000, CRC(d9d2df33) SHA1(97057fe33c146898755b556558ff707b9f4551ec) )
284   ROM_LOAD( "db3.pr3",   0x0000, 0x1000, CRC(9e9a9710) SHA1(a9f67a05a2882b9f6f3378cc73e90539de4b8ca4) )
285   ROM_LOAD( "db1ap.pr1", 0x1000, 0x1000, CRC(4cb964cd) SHA1(1c90b14deb201a64b8ed4378b022e9e4574aed94) )
286   ROM_LOAD( "db4.pr3",   0x2000, 0x1000, CRC(d9d2df33) SHA1(97057fe33c146898755b556558ff707b9f4551ec) )
287   ROM_LOAD( "db2.pr2",   0x3000, 0x1000, CRC(0a0a6af5) SHA1(ecd2a6696ce9154f030c830ccb45690787881a73) )
259288
260   // This ROM needs to be dumped, only a guess at the moment:
261289   ROM_REGION( 0x0020, "proms", 0 )
262   ROM_LOAD( "dambustr.clr", 0x0000, 0x0020, BAD_DUMP CRC(cda7b558) SHA1(2977967917970dffa91e69db19c62ba8ff6c3053) )
290   ROM_LOAD( "mi-7603-5.ic4", 0x0000, 0x0020, CRC(f131f92f) SHA1(8b0f623d2ea09b5612dde0f330c5e473a7d72e06) ) /* near DB5 - DB8 */
291
292   ROM_REGION( 0x0020, "unk_prom", 0 ) //timing?
293   ROM_LOAD( "mi-7603-5.ic3", 0x0000, 0x0020, CRC(e2a54c47) SHA1(1e08f8e3d0ae0efb2d178ab11ec2bddaeb6d7478) ) /* near DB1 - DB4 */
263294ROM_END
264295
265296
266GAME( 1981, dambustr, 0,        dambustr, dambustr, dambustr, ROT90, "South West Research", "Dambusters (US)", 0 )
297GAME( 1981, dambustr, 0,        dambustr, dambustr, dambustr, ROT90, "South West Research", "Dambusters (US, set 1)", 0 )
298GAME( 1981, dambusta, dambustr, dambustr, dambustr, dambustr, ROT90, "South West Research", "Dambusters (US, set 2)", 0 )
267299GAME( 1981, dambust,  dambustr, dambustr, dambustr, dambustr, ROT90, "South West Research", "Dambusters (UK)", 0 )
src/mame/drivers/r2dtank.c
r5046r5047
360360}
361361
362362
363static MC6845_ON_DE_CHANGED( display_enable_changed )
363static WRITE_LINE_DEVICE_HANDLER( display_enable_changed )
364364{
365   ttl74123_a_w(devtag_get_device(device->machine, "74123"), 0, display_enabled);
365   ttl74123_a_w(devtag_get_device(device->machine, "74123"), 0, state);
366366}
367367
368368
r5046r5047
372372   8,                  /* number of pixels per video memory address */
373373   begin_update,         /* before pixel update callback */
374374   update_row,            /* row update callback */
375   0,                  /* after pixel update callback */
376   display_enable_changed,   /* callback for display state changes */
377   NULL,               /* HSYNC callback */
378   NULL               /* VSYNC callback */
375   NULL,               /* after pixel update callback */
376   DEVCB_LINE(display_enable_changed),   /* callback for display state changes */
377   DEVCB_NULL,            /* callback for cursor state changes */
378   DEVCB_NULL,            /* HSYNC callback */
379   DEVCB_NULL,            /* VSYNC callback */
380   NULL               /* update address callback */
379381};
380382
381383
src/mame/drivers/aristmk4.c
r5046r5047
419419   /* in fact is a mc6845 driving 4 pixels by memory address.
420420       that's why the big horizontal parameters */
421421
422   "screen",/* screen we are acting on */
423   4,      /* number of pixels per video memory address */
424   NULL,   /* before pixel update callback */
425   NULL,   /* row update callback */
426   NULL,   /* after pixel update callback */
427   NULL,   /* callback for display state changes */
428   NULL,   /* HSYNC callback */
429   NULL   /* VSYNC callback */
422   "screen",   /* screen we are acting on */
423   4,         /* number of pixels per video memory address */
424   NULL,      /* before pixel update callback */
425   NULL,      /* row update callback */
426   NULL,      /* after pixel update callback */
427   DEVCB_NULL,   /* callback for display state changes */
428   DEVCB_NULL,   /* callback for cursor state changes */
429   DEVCB_NULL,   /* HSYNC callback */
430   DEVCB_NULL,   /* VSYNC callback */
431   NULL      /* update address callback */
430432};
431433
432434
src/mame/drivers/funworld.c
r5046r5047
20002000   NULL,      /* before pixel update callback */
20012001   NULL,      /* row update callback */
20022002   NULL,      /* after pixel update callback */
2003   NULL,      /* callback for display state changes */
2004   NULL,      /* HSYNC callback */
2005   NULL      /* VSYNC callback */
2003   DEVCB_NULL,   /* callback for display state changes */
2004   DEVCB_NULL,   /* callback for cursor state changes */
2005   DEVCB_NULL,   /* HSYNC callback */
2006   DEVCB_NULL,   /* VSYNC callback */
2007   NULL      /* update address callback */
20062008};
20072009
20082010
src/mame/drivers/thunderx.c
r5046r5047
945945GAME( 1988, thnderxa, thunderx, thunderx, thunderx, scontra, ROT0,  "Konami", "Thunder Cross (set 2)", 0 )
946946GAME( 1988, thnderxb, thunderx, thunderx, thunderx, scontra, ROT0,  "Konami", "Thunder Cross (set 3)", 0 )
947947GAME( 1988, thnderxj, thunderx, thunderx, thnderxj, scontra, ROT0,  "Konami", "Thunder Cross (Japan)", 0 )
948/*
949GAME( 1988, thndrxja, thunderx, thunderx, thndrxja, scontra, ROT0,  "Konami", "Thunder Cross (Japan, newer revision)", 0 )
950*/
948//GAME( 1988, thndrxja, thunderx, thunderx, thndrxja, scontra, ROT0,  "Konami", "Thunder Cross (Japan, newer revision)", 0 )
src/mame/drivers/exprraid.c
r5046r5047
66ernesto@imagina.com
77
88Memory Map:
9Main CPU: ( 6502 )
9Main CPU: ( DECO CPU-16 )
10100000-05ff RAM
11110600-07ff Sprites
12120800-0bff Videoram
r5046r5047
17171803-1803 DSW 1
18182100-2100 Sound latch write
19192800-2801 Protection
203800-3800 VBblank ( bootleg 1 only )
203800-3800 VBlank ( bootleg 1 only )
21214000-ffff SMH_ROM
22ffc0-ffc0 VBblank ( bootleg 2 only )
22ffc0-ffc0 VBlank ( bootleg 2 only )
2323
2424Sound Cpu: ( 6809 )
25250000-1fff RAM
r5046r5047
3030
3131NOTES:
3232The main 6502 cpu is a custom one. The differences with a regular 6502 is as follows:
33- Extra opcode ( $4b00 ), wich i think reads an external port. VBlank irq is on bit 1 ( 0x02 ).
33- Extra opcode ( $4b00 ), which i think reads an external port. VBlank irq is on bit 1 ( 0x02 ).
3434- Reset, IRQ and NMI vectors are moved.
3535
3636Also, there was some protection circuitry which is now emulated.
3737
38The way i dealt with the custom opcode was to change it to return memory
39position $ff (wich i verified is not used by the game). And i hacked in
40a read handler wich returns the vblank on bit 1. It's an ugly hack, but
41works fine.
38(Note (15/jun/09): CPU is actually a DECO CPU-16, used mostly by the liberate.c games -AS)
4239
4340The bootleg version patched the rom to get rid of the extra opcode ( bootlegs
4441used a regular 6502 ), the vectors hardcoded in place, and also had the
r5046r5047
257254}
258255
259256static ADDRESS_MAP_START( master_map, ADDRESS_SPACE_PROGRAM, 8 )
260   AM_RANGE(0x00ff, 0x00ff) AM_READ(vblank_r) /* HACK!!!! see init_exprraid below */
261257    AM_RANGE(0x0000, 0x05ff) AM_RAM AM_BASE(&main_ram)
262258    AM_RANGE(0x0600, 0x07ff) AM_RAM AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
263259    AM_RANGE(0x0800, 0x0bff) AM_RAM_WRITE(exprraid_videoram_w) AM_BASE(&videoram)
r5046r5047
280276    AM_RANGE(0x4000, 0xffff) AM_ROM
281277ADDRESS_MAP_END
282278
279static ADDRESS_MAP_START( master_io_map, ADDRESS_SPACE_IO, 8 )
280   AM_RANGE(0x01, 0x01) AM_READ_PORT("IN0")
281ADDRESS_MAP_END
282
283283static ADDRESS_MAP_START( slave_map, ADDRESS_SPACE_PROGRAM, 8 )
284284    AM_RANGE(0x0000, 0x1fff) AM_RAM
285285    AM_RANGE(0x2000, 0x2001) AM_DEVREADWRITE("ym1", ym2203_r, ym2203_w)
r5046r5047
462462static MACHINE_DRIVER_START( exprraid )
463463
464464   /* basic machine hardware */
465   MDRV_CPU_ADD("maincpu", M6502, 4000000)        /* 4 MHz ??? */
465   MDRV_CPU_ADD("maincpu", DECO16, 4000000)        /* 4 MHz ??? */
466466   MDRV_CPU_PROGRAM_MAP(master_map)
467   MDRV_CPU_IO_MAP(master_io_map)
467468   MDRV_CPU_VBLANK_INT("screen", exprraid_interrupt)
468469
469470   MDRV_CPU_ADD("slave", M6809, 2000000)        /* 2 MHz ??? */
r5046r5047
496497   MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.60)
497498MACHINE_DRIVER_END
498499
500static MACHINE_DRIVER_START( exprboot )
501   MDRV_IMPORT_FROM(exprraid)
499502
503   MDRV_CPU_REPLACE("maincpu", M6502, 4000000)        /* 4 MHz ??? */
504   MDRV_CPU_PROGRAM_MAP(master_map)
505   MDRV_CPU_IO_MAP(0)
506MACHINE_DRIVER_END
500507
508
501509/***************************************************************************
502510
503511  Game driver(s)
r5046r5047
713721   }
714722}
715723
716
717static void patch_rom1(running_machine *machine)
724static DRIVER_INIT( wexpress )
718725{
719726   UINT8 *rom = memory_region(machine, "maincpu");
720   int i;
721727
722   /* HACK!: Implement custom opcode as regular with a mapped io read */
723   for ( i = 0; i < 0x10000; i++ )
724   {
725      /* make sure is what we want to patch */
726      if ( rom[i] == 0x4b && rom[i+1] == 0x00 && rom[i+2] == 0x29 && rom[i+3] == 0x02 )
727      {
728         /* replace custom opcode with: LDA  $FF */
729         rom[i] = 0xa5;
730         i++;
731         rom[i] = 0xff;
732      }
733   }
734}
728   /* HACK: this set uses M6502 irq vectors but DECO CPU-16 opcodes??? */
729   rom[0xfff7] = rom[0xfffa];
730   rom[0xfff6] = rom[0xfffb];
735731
736static DRIVER_INIT( wexpress )
737{
738   patch_rom1(machine);
732   rom[0xfff1] = rom[0xfffc];
733   rom[0xfff0] = rom[0xfffd];
734
735   rom[0xfff3] = rom[0xfffe];
736   rom[0xfff2] = rom[0xffff];
737
739738   exprraid_gfx_expand(machine);
740739}
741740
742741static DRIVER_INIT( exprraid )
743742{
744   UINT8 *rom = memory_region(machine, "maincpu");
745
746
747   /* decode vectors */
748   rom[0xfffa] = rom[0xfff7];
749   rom[0xfffb] = rom[0xfff6];
750
751   rom[0xfffc] = rom[0xfff1];
752   rom[0xfffd] = rom[0xfff0];
753
754   rom[0xfffe] = rom[0xfff3];
755   rom[0xffff] = rom[0xfff2];
756
757   patch_rom1(machine);
758743   exprraid_gfx_expand(machine);
759744}
760745
r5046r5047
774759GAME( 1986, exprraid, 0,        exprraid, exprraid, exprraid, ROT0, "Data East USA", "Express Raider (US set 1)", 0 )
775760GAME( 1986, exprrada, exprraid, exprraid, exprraid, exprraid, ROT0, "Data East USA", "Express Raider (US set 2)", 0 )
776761GAME( 1986, wexpress, exprraid, exprraid, exprraid, wexpress, ROT0, "Data East Corporation", "Western Express (World?)", 0 )
777GAME( 1986, wexpresb, exprraid, exprraid, exprraid, wexpresb, ROT0, "bootleg", "Western Express (bootleg set 1)", 0 )
778GAME( 1986, wexpresc, exprraid, exprraid, exprraid, wexpresc, ROT0, "bootleg", "Western Express (bootleg set 2)", 0 )
762GAME( 1986, wexpresb, exprraid, exprboot, exprraid, wexpresb, ROT0, "bootleg", "Western Express (bootleg set 1)", 0 )
763GAME( 1986, wexpresc, exprraid, exprboot, exprraid, wexpresc, ROT0, "bootleg", "Western Express (bootleg set 2)", 0 )
src/mame/drivers/taitowlf.c
r5046r5047
365365}
366366
367367
368static DMA8237_HRQ_CHANGED( pc_dma_hrq_changed )
369{
370   cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
371
372   /* Assert HLDA */
373   dma8237_set_hlda( device, state );
374}
375
376
368377static DMA8237_MEM_READ( pc_dma_read_byte )
369378{
370379   const address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
r5046r5047
387396
388397static const struct dma8237_interface dma8237_1_config =
389398{
390   "maincpu",
391   1.0e-6, // 1us
399   XTAL_14_31818MHz/3,
392400
401   pc_dma_hrq_changed,
393402   pc_dma_read_byte,
394403   pc_dma_write_byte,
395404
396   { 0, 0, NULL, NULL },
397   { 0, 0, NULL, NULL },
405   { NULL, NULL, NULL, NULL },
406   { NULL, NULL, NULL, NULL },
398407   NULL
399408};
400409
401410
402411static const struct dma8237_interface dma8237_2_config =
403412{
404   "maincpu",
405   1.0e-6, // 1us
413   XTAL_14_31818MHz/3,
406414
407415   NULL,
408416   NULL,
417   NULL,
409418
410419   { NULL, NULL, NULL, NULL },
411420   { NULL, NULL, NULL, NULL },
src/mame/drivers/kingdrby.c
r5046r5047
631631   NULL,      /* before pixel update callback */
632632   NULL,      /* row update callback */
633633   NULL,      /* after pixel update callback */
634   NULL,      /* callback for display state changes */
635   NULL,      /* HSYNC callback */
636   NULL      /* VSYNC callback */
634   DEVCB_NULL,   /* callback for display state changes */
635   DEVCB_NULL,   /* callback for cursor state changes */
636   DEVCB_NULL,   /* HSYNC callback */
637   DEVCB_NULL,   /* VSYNC callback */
638   NULL      /* update address callback */
637639};
638640
639641/*************************************
src/mame/drivers/segas32.c
r5046r5047
289289Stadium Cross EPR15093  EPR15094  EPR15018  EPR15019  EPR15192  EPR15020  EPR15021  EPR15022  EPR15023  EPR15024  EPR15025  EPR15026  EPR15027  EPR15028  EPR15029  EPR15031  EPR15032  -
290290
291291
292*********************************************************************************************
293
294
295On "Super Visual Football: European Sega Cup" and "JLEAGUE" :
296
297JLEAGUE was the original code developed and released in early
2981994 in Japan which than got translated and updated to be
299released as the European Sega Cup.
300
301So, JLEAGUE is the Original.
302and
303"Super Visual Football: European Sega Cup" is the clone.
304
305My source of information?
306I wrote the simulation ( in assembly ) while working in the SEGA
307Haneda ( Tokyo ) office in 1993. We even filed a patent on the
308team/individual player task synchronization. After I finished JLEAGE,
309we handed it off to the satellite groups for localization.
310
311Cheers,
312
313MIB.42
314
292315***************************************************************************/
293316
294317#include "driver.h"
src/mame/drivers/peplus.c
r5046r5047
218218#define eeprom_NVRAM_SIZE   0x200 // 4k Bit
219219
220220/* prototypes */
221static MC6845_ON_VSYNC_CHANGED(crtc_vsync);
221static WRITE_LINE_DEVICE_HANDLER(crtc_vsync);
222222static MC6845_ON_UPDATE_ADDR_CHANGED(crtc_addr);
223223
224224static const mc6845_interface mc6845_intf =
r5046r5047
228228   NULL,               /* before pixel update callback */
229229   NULL,               /* row update callback */
230230   NULL,               /* after pixel update callback */
231   NULL,               /* callback for display state changes */
232   NULL,               /* HSYNC callback */
233   crtc_vsync,            /* VSYNC callback */
231   DEVCB_NULL,            /* callback for display state changes */
232   DEVCB_NULL,            /* callback for cursor state changes */
233   DEVCB_NULL,            /* HSYNC callback */
234   DEVCB_LINE(crtc_vsync),   /* VSYNC callback */
234235   crtc_addr            /* update address callback */
235236};
236237
r5046r5047
344345     timer_set(device->machine, video_screen_get_time_until_pos(device->machine->primary_screen, yt, xt), (void *) device, 0, assert_lp_cb);
345346 }
346347
347static MC6845_ON_VSYNC_CHANGED(crtc_vsync)
348static WRITE_LINE_DEVICE_HANDLER(crtc_vsync)
348349{
349   cputag_set_input_line(device->machine, "maincpu", 0, vsync ? ASSERT_LINE : CLEAR_LINE);
350   cputag_set_input_line(device->machine, "maincpu", 0, state ? ASSERT_LINE : CLEAR_LINE);
350351   handle_lightpen(device);
351352}
352353
src/mame/drivers/segas16a.c
r5046r5047
26212621    CPU: 68000
26222622    i8751 315-5194
26232623 */
2624ROM_START( quartet1 )
2624ROM_START( quarteta )
26252625   ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 code */
26262626   ROM_LOAD16_BYTE( "epr-7458.9b",  0x000000, 0x8000, CRC(0096499f) SHA1(dcf8e33513ce7c6660ea546c8e1c574fde629a22) )
26272627   ROM_LOAD16_BYTE( "epr-7455.6b",  0x000001, 0x8000, CRC(da934390) SHA1(d40eb65b6a36a4c1ebeadb76e47a61bd8b2e4b89) )
r5046r5047
26772677    CPU/Video/Sound Board: 171-5335
26782678    ROM Board:             171-5336
26792679 */
2680ROM_START( quart21 )
2680ROM_START( quartet2 )
26812681   ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 code */
26822682   ROM_LOAD16_BYTE( "epr-7695.b9",  0x000000, 0x8000, CRC(67177cd8) SHA1(c4ea001dfbeeb29a09d597fb50d71f54e4e9572a) )
26832683   ROM_LOAD16_BYTE( "epr-7692.b6",  0x000001, 0x8000, CRC(50f50b08) SHA1(646c0d545150b95e5d8d47bf63360f7326add08f) )
r5046r5047
27212721    Quartet 2, pre-System 16
27222722    CPU: 68000
27232723 */
2724ROM_START( quart2 )
2724ROM_START( quartet2a )
27252725   ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 code */
27262726   ROM_LOAD16_BYTE( "epr-7728.b9",  0x000000, 0x8000, CRC(56a8c88e) SHA1(33eaca5272f3588058952ca0b1fa298b89418e81) )
27272727   ROM_LOAD16_BYTE( "epr-7725.b6",  0x000001, 0x8000, CRC(ee15fcc9) SHA1(70d9755145245537f6aeb0d39abeda7811749b8c) )
r5046r5047
33903390 *************************************/
33913391
33923392/* "Pre-System 16" */
3393GAME( 1986, bodyslam, 0,        system16a_8751,   bodyslam, generic_16a, ROT0,   "Sega",           "Body Slam (8751 317-0015)", 0 )
3394GAME( 1986, dumpmtmt, bodyslam, system16a_8751,   bodyslam, dumpmtmt,    ROT0,   "Sega",           "Dump Matsumoto (Japan, 8751 317-unknown)", GAME_UNEMULATED_PROTECTION )
3395GAME( 1985, mjleague, 0,        system16a,        mjleague, mjleague,    ROT270, "Sega",           "Major League", 0 )
3396GAME( 1986, quartet,  0,        system16a_8751,   quartet,  quartet,     ROT0,   "Sega",           "Quartet (Rev A, 8751 315-5194)", GAME_UNEMULATED_PROTECTION )
3397GAME( 1986, quartet1, quartet,  system16a_8751,   quartet,  quartet,     ROT0,   "Sega",           "Quartet (8751 315-5194)", GAME_UNEMULATED_PROTECTION )
3398GAME( 1986, quart21,  quartet,  system16a_8751,   quart2,   generic_16a, ROT0,   "Sega",           "Quartet 2 (8751 317-0010)", 0 )
3399GAME( 1986, quart2,   quartet,  system16a,        quart2,   generic_16a, ROT0,   "Sega",           "Quartet 2 (unprotected)", 0 )
3393GAME( 1986, bodyslam,  0,        system16a_8751,   bodyslam, generic_16a, ROT0,   "Sega",          "Body Slam (8751 317-0015)", 0 )
3394GAME( 1986, dumpmtmt,  bodyslam, system16a_8751,   bodyslam, dumpmtmt,    ROT0,   "Sega",          "Dump Matsumoto (Japan, 8751 317-unknown)", GAME_UNEMULATED_PROTECTION )
3395GAME( 1985, mjleague,  0,        system16a,        mjleague, mjleague,    ROT270, "Sega",          "Major League", 0 )
3396GAME( 1986, quartet,   0,        system16a_8751,   quartet,  quartet,     ROT0,   "Sega",          "Quartet (Rev A, 8751 315-5194)", GAME_UNEMULATED_PROTECTION )
3397GAME( 1986, quarteta,  quartet,  system16a_8751,   quartet,  quartet,     ROT0,   "Sega",          "Quartet (8751 315-5194)", GAME_UNEMULATED_PROTECTION )
3398GAME( 1986, quartet2,  quartet,  system16a_8751,   quart2,   generic_16a, ROT0,   "Sega",          "Quartet 2 (8751 317-0010)", 0 )
3399GAME( 1986, quartet2a, quartet,  system16a,        quart2,   generic_16a, ROT0,   "Sega",          "Quartet 2 (unprotected)", 0 )
34003400
34013401/* System 16A */
34023402GAME( 1987, aliensy5, aliensyn, system16a,        aliensyn, fd1089b_16a, ROT0,   "Sega",           "Alien Syndrome (set 5, System 16A, FD1089B 317-0037)", 0 )
src/mame/drivers/triforce.c
r5046r5047
706706GAME( 2004, vs4j,     triforce, triforcegd,    triforce,    0, ROT0, "Sega",           "Virtua Striker 4 (Japan) (GDT-0013E)", GAME_NO_SOUND|GAME_NOT_WORKING )
707707GAME( 2004, vs4,      triforce, triforcegd,    triforce,    0, ROT0, "Sega",           "Virtua Striker 4 (Export) (GDT-0015)", GAME_NO_SOUND|GAME_NOT_WORKING )
708708GAME( 2004, avalon20, triforce, triforcegd,    triforce,    0, ROT0, "Sega",           "The Key Of Avalon 2.0 - Eutaxy and Commandment - Client (GDT-0017B) (V3.001)", GAME_NO_SOUND|GAME_NOT_WORKING )
709GAME( 2006, vs42006,  triforce, triforcegd,    triforce,    0, ROT0, "Sega",           "Virtua Striker 4 ver. 2006 (Rev D) (Japan) (GDT-0020D)", GAME_NO_SOUND|GAME_NOT_WORKING )
709//GAME( 2006, vs42006,  triforce, triforcegd,    triforce,    0, ROT0, "Sega",           "Virtua Striker 4 ver. 2006 (Rev D) (Japan) (GDT-0020D)", GAME_NO_SOUND|GAME_NOT_WORKING )
src/mame/drivers/carrera.c
r5046r5047
304304   NULL,      /* before pixel update callback */
305305   NULL,      /* row update callback */
306306   NULL,      /* after pixel update callback */
307   NULL,      /* callback for display state changes */
308   NULL,      /* HSYNC callback */
309   NULL      /* VSYNC callback */
307   DEVCB_NULL,   /* callback for display state changes */
308   DEVCB_NULL,   /* callback for cursor state changes */
309   DEVCB_NULL,   /* HSYNC callback */
310   DEVCB_NULL,   /* VSYNC callback */
311   NULL      /* update address callback */
310312};
311313
312314
src/mame/drivers/goldnpkr.c
r5046r5047
21542154   NULL,      /* before pixel update callback */
21552155   NULL,      /* row update callback */
21562156   NULL,      /* after pixel update callback */
2157   NULL,      /* callback for display state changes */
2158   NULL,      /* HSYNC callback */
2159   NULL      /* VSYNC callback */
2157   DEVCB_NULL,   /* callback for display state changes */
2158   DEVCB_NULL,   /* callback for cursor state changes */
2159   DEVCB_NULL,   /* HSYNC callback */
2160   DEVCB_NULL,   /* VSYNC callback */
2161   NULL      /* update address callback */
21602162};
21612163
21622164
src/mame/drivers/jokrwild.c
r5046r5047
351351   NULL,      /* before pixel update callback */
352352   NULL,      /* row update callback */
353353   NULL,      /* after pixel update callback */
354   NULL,      /* callback for display state changes */
355   NULL,      /* HSYNC callback */
356   NULL      /* VSYNC callback */
354   DEVCB_NULL,   /* callback for display state changes */
355   DEVCB_NULL,   /* callback for cursor state changes */
356   DEVCB_NULL,   /* HSYNC callback */
357   DEVCB_NULL,   /* VSYNC callback */
358   NULL      /* update address callback */
357359};
358360
359361
src/mame/drivers/gamecstl.c
r5046r5047
420420}
421421
422422
423static DMA8237_HRQ_CHANGED( pc_dma_hrq_changed )
424{
425   cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_HALT, state ? ASSERT_LINE : CLEAR_LINE);
426
427   /* Assert HLDA */
428   dma8237_set_hlda( device, state );
429}
430
431
423432static DMA8237_MEM_READ( pc_dma_read_byte )
424433{
425434   const address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM);
r5046r5047
442451
443452static const struct dma8237_interface dma8237_1_config =
444453{
445   "maincpu",
446   1.0e-6, // 1us
454   XTAL_14_31818MHz/3,
447455
456   pc_dma_hrq_changed,
448457   pc_dma_read_byte,
449458   pc_dma_write_byte,
450459
451   { 0, 0, NULL, NULL },
452   { 0, 0, NULL, NULL },
460   { NULL, NULL, NULL, NULL },
461   { NULL, NULL, NULL, NULL },
453462   NULL
454463};
455464
456465
457466static const struct dma8237_interface dma8237_2_config =
458467{
459   "maincpu",
460   1.0e-6, // 1us
468   XTAL_14_31818MHz/3,
461469
462470   NULL,
463471   NULL,
472   NULL,
464473
465474   { NULL, NULL, NULL, NULL },
466475   { NULL, NULL, NULL, NULL },
src/mame/drivers/vcombat.c
r5046r5047
528528INPUT_PORTS_END
529529
530530
531static MC6845_ON_HSYNC_CHANGED(sound_update)
531static WRITE_LINE_DEVICE_HANDLER(sound_update)
532532{
533533   /* Seems reasonable */
534   cpu_set_input_line(cputag_get_cpu(device->machine, "soundcpu"), M68K_IRQ_1, hsync ? ASSERT_LINE : CLEAR_LINE);
534   cpu_set_input_line(cputag_get_cpu(device->machine, "soundcpu"), M68K_IRQ_1, state ? ASSERT_LINE : CLEAR_LINE);
535535}
536536
537537static const mc6845_interface mc6845_intf =
538538{
539   "screen",      /* screen we are acting on */
540   16,         /* number of pixels per video memory address */
541   NULL,      /* before pixel update callback */
542   NULL,      /* row update callback */
543   NULL,      /* after pixel update callback */
544   NULL,      /* callback for display state changes */
545   sound_update,      /* HSYNC callback */
546   NULL      /* VSYNC callback */
539   "screen",               /* screen we are acting on */
540   16,                     /* number of pixels per video memory address */
541   NULL,                  /* before pixel update callback */
542   NULL,                  /* row update callback */
543   NULL,                  /* after pixel update callback */
544   DEVCB_NULL,               /* callback for display state changes */
545   DEVCB_NULL,               /* callback for cursor state changes */
546   DEVCB_LINE(sound_update),   /* HSYNC callback */
547   DEVCB_NULL,               /* VSYNC callback */
548   NULL                  /* update address callback */
547549};
548550
549551
src/mame/drivers/guab.c
r5046r5047
55    preliminary driver by Phil Bennett
66
77    Games supported:
8        * Give us a Break [2 sets]
8        * Give us a Break [8 sets]
99        * Ten Up [2 sets]
1010
1111    Looking for:
r5046r5047
805805   ROM_LOAD16_BYTE( "guab2b1.rom", 0x10001, 0x8000, CRC(29aa26a0) SHA1(8d425ad845ccfcd8995dbf6adc1ca17989a5d3ea) )
806806
807807   ROM_REGION( 0xb4000, "user1", 0 )
808   ROM_LOAD( "guab3.dsk", 0x00000, 0xb4000, CRC(ecb41e06) SHA1(2900a95046b38312c6035ea394b04b62c1d29f42) )
809ROM_END
810
811ROM_START( guab3a )
812   ROM_REGION( 0x20000, "maincpu", 0 )
813   ROM_LOAD16_BYTE( "guab1a1.rom", 0x00000, 0x8000, CRC(f23a9d7d) SHA1(f933e131bdcf21cfa6001c8e20fd11d94c7a9450) )
814   ROM_LOAD16_BYTE( "guab1b1.rom", 0x00001, 0x8000, CRC(af3b5492) SHA1(6fd7f29e6ed2fadccc9246f1ebd049c3f9aeff13) )
815   ROM_LOAD16_BYTE( "guab2a1.rom", 0x10000, 0x8000, CRC(ae7a162c) SHA1(d69721818b8e4daba776a678b62bc7f44f371a3f) )
816   ROM_LOAD16_BYTE( "guab2b1.rom", 0x10001, 0x8000, CRC(29aa26a0) SHA1(8d425ad845ccfcd8995dbf6adc1ca17989a5d3ea) )
817
818   ROM_REGION( 0xb4000, "user1", 0 )
819   ROM_LOAD( "guab7c.dsk", 0x00000, 0xb4000, CRC(f5f10f87) SHA1(80e540339efbfe59b656d6cd4f466a17df84c123) )
820ROM_END
821
822ROM_START( guab4 )
823   ROM_REGION( 0x20000, "maincpu", 0 )
824   ROM_LOAD16_BYTE( "guab1a1.rom", 0x00000, 0x8000, CRC(f23a9d7d) SHA1(f933e131bdcf21cfa6001c8e20fd11d94c7a9450) )
825   ROM_LOAD16_BYTE( "guab1b1.rom", 0x00001, 0x8000, CRC(af3b5492) SHA1(6fd7f29e6ed2fadccc9246f1ebd049c3f9aeff13) )
826   ROM_LOAD16_BYTE( "guab2a1.rom", 0x10000, 0x8000, CRC(ae7a162c) SHA1(d69721818b8e4daba776a678b62bc7f44f371a3f) )
827   ROM_LOAD16_BYTE( "guab2b1.rom", 0x10001, 0x8000, CRC(29aa26a0) SHA1(8d425ad845ccfcd8995dbf6adc1ca17989a5d3ea) )
828
829   ROM_REGION( 0xb4000, "user1", 0 )
830   ROM_LOAD( "guab8d.dsk", 0x00000, 0xb4000, CRC(b87c55ce) SHA1(20debbefae194276b0813518634cf52bed093e73) )
831ROM_END
832
833ROM_START( guab6 )
834   ROM_REGION( 0x20000, "maincpu", 0 )
835   ROM_LOAD16_BYTE( "guab1a1.rom", 0x00000, 0x8000, CRC(f23a9d7d) SHA1(f933e131bdcf21cfa6001c8e20fd11d94c7a9450) )
836   ROM_LOAD16_BYTE( "guab1b1.rom", 0x00001, 0x8000, CRC(af3b5492) SHA1(6fd7f29e6ed2fadccc9246f1ebd049c3f9aeff13) )
837   ROM_LOAD16_BYTE( "guab2a1.rom", 0x10000, 0x8000, CRC(ae7a162c) SHA1(d69721818b8e4daba776a678b62bc7f44f371a3f) )
838   ROM_LOAD16_BYTE( "guab2b1.rom", 0x10001, 0x8000, CRC(29aa26a0) SHA1(8d425ad845ccfcd8995dbf6adc1ca17989a5d3ea) )
839
840   ROM_REGION( 0xb4000, "user1", 0 )
808841   ROM_LOAD( "guabf6.dsk", 0x00000, 0xb4000, CRC(08804c28) SHA1(608d89d598b7acb133814540dba98cea29c6cad6) )
809842ROM_END
810843
811ROM_START( guab3 )
844ROM_START( guab6a )
812845   ROM_REGION( 0x20000, "maincpu", 0 )
813846   ROM_LOAD16_BYTE( "guab1a1.rom", 0x00000, 0x8000, CRC(f23a9d7d) SHA1(f933e131bdcf21cfa6001c8e20fd11d94c7a9450) )
814847   ROM_LOAD16_BYTE( "guab1b1.rom", 0x00001, 0x8000, CRC(af3b5492) SHA1(6fd7f29e6ed2fadccc9246f1ebd049c3f9aeff13) )
r5046r5047
816849   ROM_LOAD16_BYTE( "guab2b1.rom", 0x10001, 0x8000, CRC(29aa26a0) SHA1(8d425ad845ccfcd8995dbf6adc1ca17989a5d3ea) )
817850
818851   ROM_REGION( 0xb4000, "user1", 0 )
819   ROM_LOAD( "guab3.dsk", 0x00000, 0xb4000, CRC(ecb41e06) SHA1(2900a95046b38312c6035ea394b04b62c1d29f42) )
852   ROM_LOAD( "guab9f.dsk", 0x00000, 0xb4000, CRC(85329fe9) SHA1(f5ca1956c37b786fa0a4f8f0607a0a2b19d3fbb0) )
820853ROM_END
821854
855ROM_START( guab7 )
856   ROM_REGION( 0x20000, "maincpu", 0 )
857   ROM_LOAD16_BYTE( "guab1a1.rom", 0x00000, 0x8000, CRC(f23a9d7d) SHA1(f933e131bdcf21cfa6001c8e20fd11d94c7a9450) )
858   ROM_LOAD16_BYTE( "guab1b1.rom", 0x00001, 0x8000, CRC(af3b5492) SHA1(6fd7f29e6ed2fadccc9246f1ebd049c3f9aeff13) )
859   ROM_LOAD16_BYTE( "guab2a1.rom", 0x10000, 0x8000, CRC(ae7a162c) SHA1(d69721818b8e4daba776a678b62bc7f44f371a3f) )
860   ROM_LOAD16_BYTE( "guab2b1.rom", 0x10001, 0x8000, CRC(29aa26a0) SHA1(8d425ad845ccfcd8995dbf6adc1ca17989a5d3ea) )
861
862   ROM_REGION( 0xb4000, "user1", 0 )
863   ROM_LOAD( "guab9g.dsk", 0x00000, 0xb4000, CRC(6b8c36f9) SHA1(1d9f4d943f2962603bbe39e5b58befe15954a6d6) )
864ROM_END
865
866ROM_START( guab21 )
867   ROM_REGION( 0x20000, "maincpu", 0 )
868   ROM_LOAD16_BYTE( "guab1a1.rom", 0x00000, 0x8000, CRC(f23a9d7d) SHA1(f933e131bdcf21cfa6001c8e20fd11d94c7a9450) )
869   ROM_LOAD16_BYTE( "guab1b1.rom", 0x00001, 0x8000, CRC(af3b5492) SHA1(6fd7f29e6ed2fadccc9246f1ebd049c3f9aeff13) )
870   ROM_LOAD16_BYTE( "guab2a1.rom", 0x10000, 0x8000, CRC(ae7a162c) SHA1(d69721818b8e4daba776a678b62bc7f44f371a3f) )
871   ROM_LOAD16_BYTE( "guab2b1.rom", 0x10001, 0x8000, CRC(29aa26a0) SHA1(8d425ad845ccfcd8995dbf6adc1ca17989a5d3ea) )
872
873   ROM_REGION( 0xb4000, "user1", 0 )
874   ROM_LOAD( "guab21.dsk", 0x00000, 0xb4000, CRC(558ee009) SHA1(d2a02662216e10f80a215044f1929df7255b6136) )
875ROM_END
876
877ROM_START( guab43 )
878   ROM_REGION( 0x20000, "maincpu", 0 )
879   ROM_LOAD16_BYTE( "guab1a1.rom", 0x00000, 0x8000, CRC(f23a9d7d) SHA1(f933e131bdcf21cfa6001c8e20fd11d94c7a9450) )
880   ROM_LOAD16_BYTE( "guab1b1.rom", 0x00001, 0x8000, CRC(af3b5492) SHA1(6fd7f29e6ed2fadccc9246f1ebd049c3f9aeff13) )
881   ROM_LOAD16_BYTE( "guab2a1.rom", 0x10000, 0x8000, CRC(ae7a162c) SHA1(d69721818b8e4daba776a678b62bc7f44f371a3f) )
882   ROM_LOAD16_BYTE( "guab2b1.rom", 0x10001, 0x8000, CRC(29aa26a0) SHA1(8d425ad845ccfcd8995dbf6adc1ca17989a5d3ea) )
883
884   ROM_REGION( 0xb4000, "user1", 0 )
885   ROM_LOAD( "guab43.dsk", 0x00000, 0xb3f00, CRC(96167357) SHA1(9d5f66e05ed1086be9699c4149071038f6986e0c) )
886ROM_END
887
822888ROM_START( tenup )
823889   ROM_REGION( 0x20000, "maincpu", 0 )
824890   ROM_LOAD16_BYTE( "tu-11.bin", 0x00000, 0x8000, CRC(01843086) SHA1(106a226900e8cf929f89edf801c627f02e4afce3) )
r5046r5047
848914 *
849915 *************************************/
850916
851GAME( 1986, guab,   0,     guab, guab,  0, ROT0, "JPM", "Give us a Break (6th edition)", 0 )
852GAME( 1986, guab3,  guab,  guab, guab,  0, ROT0, "JPM", "Give us a Break (3rd edition)", 0 )
853GAME( 1988, tenup,  0,     guab, tenup, 0, ROT0, "JPM", "Ten Up (compendium 17)",        0 )
854GAME( 1988, tenup3, tenup, guab, tenup, 0, ROT0, "JPM", "Ten Up (compendium 3)",         0 )
917GAME( 1986, guab,   0,     guab, guab,  0, ROT0, "JPM", "Give us a Break (3rd edition)",      0 )
918GAME( 1986, guab3a, guab,  guab, guab,  0, ROT0, "JPM", "Give us a Break (3rd edition alt?)", 0 )
919GAME( 1986, guab4,  guab,  guab, guab,  0, ROT0, "JPM", "Give us a Break (4th edition)",      0 )
920GAME( 1986, guab6,  guab,  guab, guab,  0, ROT0, "JPM", "Give us a Break (6th edition)",      0 )
921GAME( 1986, guab6a, guab,  guab, guab,  0, ROT0, "JPM", "Give us a Break (6th edition alt?)", 0 )
922GAME( 1986, guab7,  guab,  guab, guab,  0, ROT0, "JPM", "Give us a Break (7th edition)",      0 )
923GAME( 1986, guab21, guab,  guab, guab,  0, ROT0, "JPM", "Give us a Break (21st edition)",     0 )
924GAME( 1986, guab43, guab,  guab, guab,  0, ROT0, "JPM", "Give us a Break (43rd edition)",     0 )
925GAME( 1988, tenup,  0,     guab, tenup, 0, ROT0, "JPM", "Ten Up (compendium 17)",             0 )
926GAME( 1988, tenup3, tenup, guab, tenup, 0, ROT0, "JPM", "Ten Up (compendium 3)",              0 )
src/mame/drivers/konamim2.c
r5046r5047
1414--------------------------------------------------------------------------------------
1515Battle Tryst                                         1998    636JAC02
1616Evil Night                                           1998    810UBA02
17Hell Night ((alt. Region title, same as Evil Night)  1998    810EAA02
17Hell Night (alt. Region title, same as Evil Night)   1998    810EAA02
1818Heat Of Eleven '98                                   1998    703EAA02
1919Polystars                                            1997    623JAA02     003894
2020Total Vice                                           1997    639AAB01
r5046r5047
12091209   ROM_REGION( 0x1000, "timekeep", 0 ) /* timekeeper SRAM */
12101210   ROM_LOAD( "m48t58y.u1",  0x000000, 0x001000, CRC(169bb8f4) SHA1(55c0bafab5d309fe69156489186e232aa87ca0dd) )
12111211
1212   ROM_REGION( 0x400000, "ymz", 0 ) /* YMZ280B sound rom on sub board. NOTE: May not be the same as evilngt! */
1212   ROM_REGION( 0x400000, "ymz", 0 ) /* YMZ280B sound rom on sub board */
12131213   ROM_LOAD( "810a03.16h",  0x000000, 0x400000, CRC(4cd79d98) SHA1(12fea41cfc5c1b883ffbeda7e428dd1d1bf54d7f) )
12141214
12151215   DISK_REGION( "cdrom" ) // TODO: Add correct CHD
r5046r5047
12181218
12191219ROM_START( totlvice )
12201220   ROM_REGION64_BE( 0x200000, "boot", 0 )
1221   ROM_LOAD16_WORD( "636a01.8q", 0x000000, 0x200000, CRC(7b1dc738) SHA1(32ae8e7ddd38fcc70b4410275a2cc5e9a0d7d33b) )
1221   ROM_LOAD16_WORD( "623b01.8q", 0x000000, 0x200000, CRC(bd879f93) SHA1(e2d63bfbd2b15260a2664082652442eadea3eab6) )
12221222
12231223   ROM_REGION( 0x100000, "ymz", 0 ) /* YMZ280B sound rom on sub board */
12241224   ROM_LOAD( "639jaa02.bin",  0x000000, 0x100000, CRC(c6163818) SHA1(b6f8f2d808b98610becc0a5be5443ece3908df0b) )
src/mame/drivers/slotcarn.c
r5046r5047
137137}
138138
139139
140static MC6845_ON_HSYNC_CHANGED(hsync_changed)
140static WRITE_LINE_DEVICE_HANDLER(hsync_changed)
141141{
142142   /* update any video up to the current scanline */
143143   video_screen_update_now(device->machine->primary_screen);
144144}
145145
146static MC6845_ON_VSYNC_CHANGED(vsync_changed)
146static WRITE_LINE_DEVICE_HANDLER(vsync_changed)
147147{
148   cputag_set_input_line(device->machine, "maincpu", 0, vsync ? ASSERT_LINE : CLEAR_LINE);
148   cputag_set_input_line(device->machine, "maincpu", 0, state ? ASSERT_LINE : CLEAR_LINE);
149149}
150150
151151static const mc6845_interface mc6845_intf =
152152{
153   "screen",            /* screen we are acting on */
154   8,                  /* number of pixels per video memory address */
155   begin_update,         /* before pixel update callback */
156   update_row,            /* row update callback */
157   0,                  /* after pixel update callback */
158   0,                  /* callback for display state changes */
159   hsync_changed,         /* HSYNC callback */
160   vsync_changed         /* VSYNC callback */
153   "screen",               /* screen we are acting on */
154   8,                     /* number of pixels per video memory address */
155   begin_update,            /* before pixel update callback */
156   update_row,               /* row update callback */
157   NULL,                  /* after pixel update callback */
158   DEVCB_NULL,               /* callback for display state changes */
159   DEVCB_NULL,               /* callback for cursor state changes */
160   DEVCB_LINE(hsync_changed),   /* HSYNC callback */
161   DEVCB_LINE(vsync_changed),   /* VSYNC callback */
162   NULL                  /* update address callback */
161163};
162164
163165
src/mame/drivers/starwars.c
r5046r5047
211211 *
212212 *  Port definitions
213213 *
214 *  Dips Manual Verified and Defaults
215 *  set for starwars and esb - 06/2009
216 *
214217 *************************************/
215218
219
220
221
216222static INPUT_PORTS_START( starwars )
217223   PORT_START("IN0")
218224   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 )
r5046r5047
237243   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(matrix_flag_r, NULL)
238244
239245   PORT_START("DSW0")
240   PORT_DIPNAME( 0x03, 0x00, "Starting Shields" )
246   PORT_DIPNAME( 0x03, 0x02, "Starting Shields" )  PORT_DIPLOCATION("10D:1,2")
241247   PORT_DIPSETTING(    0x00, "6" )
242248   PORT_DIPSETTING(    0x01, "7" )
243249   PORT_DIPSETTING(    0x02, "8" )
244250   PORT_DIPSETTING(    0x03, "9" )
245   PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Difficulty ) )
251   PORT_DIPNAME( 0x0c, 0x04, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("10D:3,4")
246252   PORT_DIPSETTING(    0x00, DEF_STR( Easy ) )
247253   PORT_DIPSETTING(    0x04, "Moderate" )
248254   PORT_DIPSETTING(    0x08, DEF_STR( Hard ) )
249255   PORT_DIPSETTING(    0x0c, DEF_STR( Hardest ) )
250   PORT_DIPNAME( 0x30, 0x00, "Bonus Shields" )
256   PORT_DIPNAME( 0x30, 0x10, "Bonus Shields" )  PORT_DIPLOCATION("10D:5,6")
251257   PORT_DIPSETTING(    0x00, "0" )
252258   PORT_DIPSETTING(    0x10, "1" )
253259   PORT_DIPSETTING(    0x20, "2" )
254260   PORT_DIPSETTING(    0x30, "3" )
255   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) )
261   PORT_DIPNAME( 0x40, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("10D:7")
256262   PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
257263   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
258   PORT_DIPNAME( 0x80, 0x80, "Freeze" )
264   PORT_DIPNAME( 0x80, 0x80, "Freeze" )  PORT_DIPLOCATION("10D:8")
259265   PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
260266   PORT_DIPSETTING(    0x00, DEF_STR( On ) )
261267
262268   PORT_START("DSW1")
263   PORT_DIPNAME( 0x03, 0x02, DEF_STR( Coinage ) )
269   PORT_DIPNAME( 0x03, 0x02, DEF_STR( Coinage ) )  PORT_DIPLOCATION("10EF:1,2")
264270   PORT_DIPSETTING(    0x03, DEF_STR( 2C_1C ) )
265271   PORT_DIPSETTING(    0x02, DEF_STR( 1C_1C ) )
266272   PORT_DIPSETTING(    0x01, DEF_STR( 1C_2C ) )
267273   PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
268   PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coin_B ) )
274        /* Manual shows Coin_B (Right) as Bit 4,5 - actually Bit 3,4 */
275   PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coin_B ) )  PORT_DIPLOCATION("10EF:3,4")
269276   PORT_DIPSETTING(    0x00, "*1" )
270277   PORT_DIPSETTING(    0x04, "*4" )
271278   PORT_DIPSETTING(    0x08, "*5" )
272279   PORT_DIPSETTING(    0x0c, "*6" )
273   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Coin_A ) )
280        /* Manual shows Coin_A (Left) as Bit 3 - actually Bit 5 */
281   PORT_DIPNAME( 0x10, 0x00, DEF_STR( Coin_A ) )  PORT_DIPLOCATION("10EF:5")
274282   PORT_DIPSETTING(    0x00, "*1" )
275283   PORT_DIPSETTING(    0x10, "*2" )
276   PORT_DIPNAME( 0xe0, 0x00, "Bonus Coinage" )
284   PORT_DIPNAME( 0xe0, 0x00, "Bonus Coin Adder" )  PORT_DIPLOCATION("10EF:6,7,8")
277285   PORT_DIPSETTING(    0x20, "2 gives 1" )
278286   PORT_DIPSETTING(    0x60, "4 gives 2" )
279287   PORT_DIPSETTING(    0xa0, "3 gives 1" )
r5046r5047
282290   PORT_DIPSETTING(    0x00, DEF_STR( None ) )
283291   /* 0xc0 and 0xe0 None */
284292
293
285294   PORT_START("STICKY")
286295   PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Y ) PORT_SENSITIVITY(70) PORT_KEYDELTA(30)
287296
r5046r5047
294303   PORT_INCLUDE( starwars )
295304
296305   PORT_MODIFY("DSW0")
297   PORT_DIPNAME( 0x03, 0x03, "Starting Shields" )
306   PORT_DIPNAME( 0x03, 0x03, "Starting Shields" )  PORT_DIPLOCATION("10D:1,2")
298307   PORT_DIPSETTING(    0x01, "2" )
299308   PORT_DIPSETTING(    0x00, "3" )
300309   PORT_DIPSETTING(    0x03, "4" )
301310   PORT_DIPSETTING(    0x02, "5" )
302   PORT_DIPNAME( 0x30, 0x30, "Jedi-Letter Mode" )
311   PORT_DIPNAME( 0x30, 0x30, "Jedi-Letter Mode" )  PORT_DIPLOCATION("10D:5,6")
303312   PORT_DIPSETTING(    0x00, "Level Only" )
304313   PORT_DIPSETTING(    0x10, "Level" )
305314   PORT_DIPSETTING(    0x20, "Increment Only" )
src/mame/drivers/royalmah.c
r5046r5047
33893389    ROM_LOAD( "1.bin",   0x0000, 0x2000, CRC(f36f4222) SHA1(ce18c273a59f86cb17ea6ba8a3daefc3d750df1e) )
33903390    ROM_LOAD( "2.bin",   0x2000, 0x2000, CRC(7d57cb48) SHA1(38b97c5d02e3ab6187e5e0f86c06b8a3747b51a8) )
33913391    ROM_LOAD( "3.bin",   0x4000, 0x2000, CRC(fb481d9a) SHA1(122e2b0d11fe1fe8cf219da9c8f96fe5a1016bb6) )
3392    ROM_LOAD( "7.bin",   0x6000, 0x1000, NO_DUMP ) // reads from here for the gfx data.
3392    ROM_LOAD( "7.bin",   0x6000, 0x1000, CRC(bb00fb9e) SHA1(4d2965a0339328d1700b39c166a5a92a96b05e67) )
33933393
33943394    ROM_REGION( 0x20, "proms", 0 )
33953395    /* taken from Royal Mahjong, might or might not be the same. */
r5046r5047
43414341   ROM_LOAD( "c8",       0x0000, 0x2000, CRC(a37ed493) SHA1(a3246c635ee77f96afd96285ef7091f6fc0d7636) )
43424342
43434343   ROM_REGION( 0x0040, "proms", 0 )
4344   ROM_LOAD( "18s030.45",  0x0000, 0x0020, CRC(c6a24ae9) SHA1(ec7a4dee2fec2f7151ddc39e40a3eee6a1c4992d) )
4345   ROM_LOAD( "18s030.44",  0x0020, 0x0020, CRC(d4eabf78) SHA1(f14778b552ff483e36e7c30ee67e8e2075790ea2) )
4344   ROM_LOAD( "18s030.44",  0x0000, 0x0020, CRC(d4eabf78) SHA1(f14778b552ff483e36e7c30ee67e8e2075790ea2) )
4345   ROM_LOAD( "18s030.45",  0x0020, 0x0020, CRC(c6a24ae9) SHA1(ec7a4dee2fec2f7151ddc39e40a3eee6a1c4992d) ) // another color prom?
43464346ROM_END
43474347
43484348/*
r5046r5047
46234623GAME( 1981?, openmj,   royalmj,  royalmah, royalmah, 0,        ROT0,   "Sapporo Mechanic",           "Open Mahjong [BET] (Japan)",            0 )
46244624GAME( 1982,  royalmah, royalmj,  royalmah, royalmah, 0,        ROT0,   "bootleg",                    "Royal Mahjong (Falcon bootleg, v1.01)", 0 )
46254625GAME( 1983,  janyoup2, royalmj,  ippatsu,  janyoup2, 0,        ROT0,   "Cosmo Denshi",               "Janyou Part II (ver 7.03, July 1 1983)",0 )
4626GAME( 1981,  janputer, 0,        royalmah, royalmah, 0,        ROT0,   "Taito Corporation",          "Janputer (Japan)",                      GAME_NOT_WORKING )
4626GAME( 1981,  janputer, 0,        royalmah, royalmah, 0,        ROT0,   "Ps Ltd. / Mes",              "New Double Bet Mahjong (Japan)",        0 )
46274627GAME( 1984,  janoh,    0,        royalmah, royalmah, 0,        ROT0,   "Toaplan",                    "Jan Oh (set 1)",                        GAME_NOT_WORKING )
46284628GAME( 1984,  janoha,   janoh,    janoh,    royalmah, 0,        ROT0,   "Toaplan",                    "Jan Oh (set 2)",                        GAME_NOT_WORKING ) // this one is complete?
46294629GAME( 1985,  jansou,   0,        jansou,   jansou,   0,        ROT180, "Dyna",                       "Jansou (set 1)",                        GAME_NOT_WORKING|GAME_NO_SOUND )
src/mame/drivers/miniboy7.c
r5046r5047
259259   NULL,      /* before pixel update callback */
260260   NULL,      /* row update callback */
261261   NULL,      /* after pixel update callback */
262   NULL,      /* callback for display state changes */
263   NULL,      /* HSYNC callback */
264   NULL      /* VSYNC callback */
262   DEVCB_NULL,   /* callback for display state changes */
263   DEVCB_NULL,   /* callback for cursor state changes */
264   DEVCB_NULL,   /* HSYNC callback */
265   DEVCB_NULL,   /* VSYNC callback */
266   NULL      /* update address callback */
265267};
266268
267269
src/emu/cpu/minx/minxops.h
r5046r5047
11#undef OP
2#define OP(nn) INLINE void minx_##nn(void)
2#define OP(nn) INLINE void minx_##nn(minx_state *minx)
33
4OP(00) { regs.BA = ( regs.BA & 0xFF00 ) | ADD8( ( regs.BA & 0x00FF ), ( regs.BA & 0xFF ) ); }
5OP(01) { regs.BA = ( regs.BA & 0xFF00 ) | ADD8( ( regs.BA & 0x00FF ), ( regs.BA >> 8 ) ); }
6OP(02) { regs.BA = ( regs.BA & 0xFF00 ) | ADD8( ( regs.BA & 0x00FF ), rdop() ); }
7OP(03) { AD2_IHL; regs.BA = ( regs.BA & 0xFF00 ) | ADD8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
8OP(04) { AD2_IN8; regs.BA = ( regs.BA & 0xFF00 ) | ADD8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
9OP(05) { AD2_I16; regs.BA = ( regs.BA & 0xFF00 ) | ADD8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
10OP(06) { AD2_XIX; regs.BA = ( regs.BA & 0xFF00 ) | ADD8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
11OP(07) { AD2_YIY; regs.BA = ( regs.BA & 0xFF00 ) | ADD8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
12OP(08) { regs.BA = ( regs.BA & 0xFF00 ) | ADDC8( ( regs.BA & 0x00FF ), ( regs.BA & 0xFF ) ); }
13OP(09) { regs.BA = ( regs.BA & 0xFF00 ) | ADDC8( ( regs.BA & 0x00FF ), ( regs.BA >> 8 ) ); }
14OP(0A) { regs.BA = ( regs.BA & 0xFF00 ) | ADDC8( ( regs.BA & 0x00FF ), rdop() ); }
15OP(0B) { AD2_IHL; regs.BA = ( regs.BA & 0xFF00 ) | ADDC8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
16OP(0C) { AD2_IN8; regs.BA = ( regs.BA & 0xFF00 ) | ADDC8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
17OP(0D) { AD2_I16; regs.BA = ( regs.BA & 0xFF00 ) | ADDC8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
18OP(0E) { AD2_XIX; regs.BA = ( regs.BA & 0xFF00 ) | ADDC8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
19OP(0F) { AD2_YIY; regs.BA = ( regs.BA & 0xFF00 ) | ADDC8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
4OP(00) { minx->BA = ( minx->BA & 0xFF00 ) | ADD8( minx, ( minx->BA & 0x00FF ), ( minx->BA & 0xFF ) ); }
5OP(01) { minx->BA = ( minx->BA & 0xFF00 ) | ADD8( minx, ( minx->BA & 0x00FF ), ( minx->BA >> 8 ) ); }
6OP(02) { minx->BA = ( minx->BA & 0xFF00 ) | ADD8( minx, ( minx->BA & 0x00FF ), rdop(minx) ); }
7OP(03) { AD2_IHL; minx->BA = ( minx->BA & 0xFF00 ) | ADD8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
8OP(04) { AD2_IN8; minx->BA = ( minx->BA & 0xFF00 ) | ADD8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
9OP(05) { AD2_I16; minx->BA = ( minx->BA & 0xFF00 ) | ADD8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
10OP(06) { AD2_XIX; minx->BA = ( minx->BA & 0xFF00 ) | ADD8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
11OP(07) { AD2_YIY; minx->BA = ( minx->BA & 0xFF00 ) | ADD8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
12OP(08) { minx->BA = ( minx->BA & 0xFF00 ) | ADDC8( minx, ( minx->BA & 0x00FF ), ( minx->BA & 0xFF ) ); }
13OP(09) { minx->BA = ( minx->BA & 0xFF00 ) | ADDC8( minx, ( minx->BA & 0x00FF ), ( minx->BA >> 8 ) ); }
14OP(0A) { minx->BA = ( minx->BA & 0xFF00 ) | ADDC8( minx, ( minx->BA & 0x00FF ), rdop(minx) ); }
15OP(0B) { AD2_IHL; minx->BA = ( minx->BA & 0xFF00 ) | ADDC8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
16OP(0C) { AD2_IN8; minx->BA = ( minx->BA & 0xFF00 ) | ADDC8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
17OP(0D) { AD2_I16; minx->BA = ( minx->BA & 0xFF00 ) | ADDC8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
18OP(0E) { AD2_XIX; minx->BA = ( minx->BA & 0xFF00 ) | ADDC8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
19OP(0F) { AD2_YIY; minx->BA = ( minx->BA & 0xFF00 ) | ADDC8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
2020
21OP(10) { regs.BA = ( regs.BA & 0xFF00 ) | SUB8( ( regs.BA & 0x00FF ), ( regs.BA & 0xFF ) ); }
22OP(11) { regs.BA = ( regs.BA & 0xFF00 ) | SUB8( ( regs.BA & 0x00FF ), ( regs.BA >> 8 ) ); }
23OP(12) { regs.BA = ( regs.BA & 0xFF00 ) | SUB8( ( regs.BA & 0x00FF ), rdop() ); }
24OP(13) { AD2_IHL; regs.BA = ( regs.BA & 0xFF00 ) | SUB8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
25OP(14) { AD2_IN8; regs.BA = ( regs.BA & 0xFF00 ) | SUB8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
26OP(15) { AD2_I16; regs.BA = ( regs.BA & 0xFF00 ) | SUB8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
27OP(16) { AD2_XIX; regs.BA = ( regs.BA & 0xFF00 ) | SUB8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
28OP(17) { AD2_YIY; regs.BA = ( regs.BA & 0xFF00 ) | SUB8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
29OP(18) { regs.BA = ( regs.BA & 0xFF00 ) | SUBC8( ( regs.BA & 0x00FF ), ( regs.BA & 0xFF ) ); }
30OP(19) { regs.BA = ( regs.BA & 0xFF00 ) | SUBC8( ( regs.BA & 0x00FF ), ( regs.BA >> 8 ) ); }
31OP(1A) { regs.BA = ( regs.BA & 0xFF00 ) | SUBC8( ( regs.BA & 0x00FF ), rdop() ); }
32OP(1B) { AD2_IHL; regs.BA = ( regs.BA & 0xFF00 ) | SUBC8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
33OP(1C) { AD2_IN8; regs.BA = ( regs.BA & 0xFF00 ) | SUBC8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
34OP(1D) { AD2_I16; regs.BA = ( regs.BA & 0xFF00 ) | SUBC8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
35OP(1E) { AD2_XIX; regs.BA = ( regs.BA & 0xFF00 ) | SUBC8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
36OP(1F) { AD2_YIY; regs.BA = ( regs.BA & 0xFF00 ) | SUBC8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
21OP(10) { minx->BA = ( minx->BA & 0xFF00 ) | SUB8( minx, ( minx->BA & 0x00FF ), ( minx->BA & 0xFF ) ); }
22OP(11) { minx->BA = ( minx->BA & 0xFF00 ) | SUB8( minx, ( minx->BA & 0x00FF ), ( minx->BA >> 8 ) ); }
23OP(12) { minx->BA = ( minx->BA & 0xFF00 ) | SUB8( minx, ( minx->BA & 0x00FF ), rdop(minx) ); }
24OP(13) { AD2_IHL; minx->BA = ( minx->BA & 0xFF00 ) | SUB8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
25OP(14) { AD2_IN8; minx->BA = ( minx->BA & 0xFF00 ) | SUB8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
26OP(15) { AD2_I16; minx->BA = ( minx->BA & 0xFF00 ) | SUB8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
27OP(16) { AD2_XIX; minx->BA = ( minx->BA & 0xFF00 ) | SUB8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
28OP(17) { AD2_YIY; minx->BA = ( minx->BA & 0xFF00 ) | SUB8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
29OP(18) { minx->BA = ( minx->BA & 0xFF00 ) | SUBC8( minx, ( minx->BA & 0x00FF ), ( minx->BA & 0xFF ) ); }
30OP(19) { minx->BA = ( minx->BA & 0xFF00 ) | SUBC8( minx, ( minx->BA & 0x00FF ), ( minx->BA >> 8 ) ); }
31OP(1A) { minx->BA = ( minx->BA & 0xFF00 ) | SUBC8( minx, ( minx->BA & 0x00FF ), rdop(minx) ); }
32OP(1B) { AD2_IHL; minx->BA = ( minx->BA & 0xFF00 ) | SUBC8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
33OP(1C) { AD2_IN8; minx->BA = ( minx->BA & 0xFF00 ) | SUBC8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
34OP(1D) { AD2_I16; minx->BA = ( minx->BA & 0xFF00 ) | SUBC8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
35OP(1E) { AD2_XIX; minx->BA = ( minx->BA & 0xFF00 ) | SUBC8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
36OP(1F) { AD2_YIY; minx->BA = ( minx->BA & 0xFF00 ) | SUBC8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
3737
38OP(20) { regs.BA = ( regs.BA & 0xFF00 ) | AND8( ( regs.BA & 0x00FF ), ( regs.BA & 0xFF ) ); }
39OP(21) { regs.BA = ( regs.BA & 0xFF00 ) | AND8( ( regs.BA & 0x00FF ), ( regs.BA >> 8 ) ); }
40OP(22) { regs.BA = ( regs.BA & 0xFF00 ) | AND8( ( regs.BA & 0x00FF ), rdop() ); }
41OP(23) { AD2_IHL; regs.BA = ( regs.BA & 0xFF00 ) | AND8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
42OP(24) { AD2_IN8; regs.BA = ( regs.BA & 0xFF00 ) | AND8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
43OP(25) { AD2_I16; regs.BA = ( regs.BA & 0xFF00 ) | AND8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
44OP(26) { AD2_XIX; regs.BA = ( regs.BA & 0xFF00 ) | AND8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
45OP(27) { AD2_YIY; regs.BA = ( regs.BA & 0xFF00 ) | AND8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
46OP(28) { regs.BA = ( regs.BA & 0xFF00 ) | OR8( ( regs.BA & 0x00FF ), ( regs.BA & 0xFF ) ); }
47OP(29) { regs.BA = ( regs.BA & 0xFF00 ) | OR8( ( regs.BA & 0x00FF ), ( regs.BA >> 8 ) ); }
48OP(2A) { regs.BA = ( regs.BA & 0xFF00 ) | OR8( ( regs.BA & 0x00FF ), rdop() ); }
49OP(2B) { AD2_IHL; regs.BA = ( regs.BA & 0xFF00 ) | OR8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
50OP(2C) { AD2_IN8; regs.BA = ( regs.BA & 0xFF00 ) | OR8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
51OP(2D) { AD2_I16; regs.BA = ( regs.BA & 0xFF00 ) | OR8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
52OP(2E) { AD2_XIX; regs.BA = ( regs.BA & 0xFF00 ) | OR8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
53OP(2F) { AD2_YIY; regs.BA = ( regs.BA & 0xFF00 ) | OR8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
38OP(20) { minx->BA = ( minx->BA & 0xFF00 ) | AND8( minx, ( minx->BA & 0x00FF ), ( minx->BA & 0xFF ) ); }
39OP(21) { minx->BA = ( minx->BA & 0xFF00 ) | AND8( minx, ( minx->BA & 0x00FF ), ( minx->BA >> 8 ) ); }
40OP(22) { minx->BA = ( minx->BA & 0xFF00 ) | AND8( minx, ( minx->BA & 0x00FF ), rdop(minx) ); }
41OP(23) { AD2_IHL; minx->BA = ( minx->BA & 0xFF00 ) | AND8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
42OP(24) { AD2_IN8; minx->BA = ( minx->BA & 0xFF00 ) | AND8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
43OP(25) { AD2_I16; minx->BA = ( minx->BA & 0xFF00 ) | AND8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
44OP(26) { AD2_XIX; minx->BA = ( minx->BA & 0xFF00 ) | AND8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
45OP(27) { AD2_YIY; minx->BA = ( minx->BA & 0xFF00 ) | AND8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
46OP(28) { minx->BA = ( minx->BA & 0xFF00 ) | OR8( minx, ( minx->BA & 0x00FF ), ( minx->BA & 0xFF ) ); }
47OP(29) { minx->BA = ( minx->BA & 0xFF00 ) | OR8( minx, ( minx->BA & 0x00FF ), ( minx->BA >> 8 ) ); }
48OP(2A) { minx->BA = ( minx->BA & 0xFF00 ) | OR8( minx, ( minx->BA & 0x00FF ), rdop(minx) ); }
49OP(2B) { AD2_IHL; minx->BA = ( minx->BA & 0xFF00 ) | OR8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
50OP(2C) { AD2_IN8; minx->BA = ( minx->BA & 0xFF00 ) | OR8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
51OP(2D) { AD2_I16; minx->BA = ( minx->BA & 0xFF00 ) | OR8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
52OP(2E) { AD2_XIX; minx->BA = ( minx->BA & 0xFF00 ) | OR8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
53OP(2F) { AD2_YIY; minx->BA = ( minx->BA & 0xFF00 ) | OR8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
5454
55OP(30) { SUB8( ( regs.BA & 0x00FF ), ( regs.BA & 0xFF ) ); }
56OP(31) { SUB8( ( regs.BA & 0x00FF ), ( regs.BA >> 8 ) ); }
57OP(32) { SUB8( ( regs.BA & 0x00FF ), rdop() ); }
58OP(33) { AD2_IHL; SUB8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
59OP(34) { AD2_IN8; SUB8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
60OP(35) { AD2_I16; SUB8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
61OP(36) { AD2_XIX; SUB8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
62OP(37) { AD2_YIY; SUB8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
63OP(38) { regs.BA = ( regs.BA & 0xFF00 ) | XOR8( ( regs.BA & 0x00FF ), ( regs.BA & 0xFF ) ); }
64OP(39) { regs.BA = ( regs.BA & 0xFF00 ) | XOR8( ( regs.BA & 0x00FF ), ( regs.BA >> 8 ) ); }
65OP(3A) { regs.BA = ( regs.BA & 0xFF00 ) | XOR8( ( regs.BA & 0x00FF ), rdop() ); }
66OP(3B) { AD2_IHL; regs.BA = ( regs.BA & 0xFF00 ) | XOR8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
67OP(3C) { AD2_IN8; regs.BA = ( regs.BA & 0xFF00 ) | XOR8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
68OP(3D) { AD2_I16; regs.BA = ( regs.BA & 0xFF00 ) | XOR8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
69OP(3E) { AD2_XIX; regs.BA = ( regs.BA & 0xFF00 ) | XOR8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
70OP(3F) { AD2_YIY; regs.BA = ( regs.BA & 0xFF00 ) | XOR8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
55OP(30) { SUB8( minx, ( minx->BA & 0x00FF ), ( minx->BA & 0xFF ) ); }
56OP(31) { SUB8( minx, ( minx->BA & 0x00FF ), ( minx->BA >> 8 ) ); }
57OP(32) { SUB8( minx, ( minx->BA & 0x00FF ), rdop(minx) ); }
58OP(33) { AD2_IHL; SUB8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
59OP(34) { AD2_IN8; SUB8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
60OP(35) { AD2_I16; SUB8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
61OP(36) { AD2_XIX; SUB8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
62OP(37) { AD2_YIY; SUB8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
63OP(38) { minx->BA = ( minx->BA & 0xFF00 ) | XOR8( minx, ( minx->BA & 0x00FF ), ( minx->BA & 0xFF ) ); }
64OP(39) { minx->BA = ( minx->BA & 0xFF00 ) | XOR8( minx, ( minx->BA & 0x00FF ), ( minx->BA >> 8 ) ); }
65OP(3A) { minx->BA = ( minx->BA & 0xFF00 ) | XOR8( minx, ( minx->BA & 0x00FF ), rdop(minx) ); }
66OP(3B) { AD2_IHL; minx->BA = ( minx->BA & 0xFF00 ) | XOR8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
67OP(3C) { AD2_IN8; minx->BA = ( minx->BA & 0xFF00 ) | XOR8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
68OP(3D) { AD2_I16; minx->BA = ( minx->BA & 0xFF00 ) | XOR8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
69OP(3E) { AD2_XIX; minx->BA = ( minx->BA & 0xFF00 ) | XOR8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
70OP(3F) { AD2_YIY; minx->BA = ( minx->BA & 0xFF00 ) | XOR8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
7171
72OP(40) { regs.BA = ( regs.BA & 0xFF00 ) | ( regs.BA & 0x00FF); }
73OP(41) { regs.BA = ( regs.BA & 0xFF00 ) | ( regs.BA >> 8 ); }
74OP(42) { regs.BA = ( regs.BA & 0xFF00 ) | ( regs.HL & 0x00FF); }
75OP(43) { regs.BA = ( regs.BA & 0xFF00 ) | ( regs.HL >> 8 ); }
76OP(44) { AD2_IN8; regs.BA = ( regs.BA & 0xFF00 ) | RD( addr2 ); }
77OP(45) { AD2_IHL; regs.BA = ( regs.BA & 0xFF00 ) | RD( addr2 ); }
78OP(46) { AD2_XIX; regs.BA = ( regs.BA & 0xFF00 ) | RD( addr2 ); }
79OP(47) { AD2_YIY; regs.BA = ( regs.BA & 0xFF00 ) | RD( addr2 ); }
80OP(48) { regs.BA = ( regs.BA & 0x00FF ) | ( ( regs.BA & 0x00FF) << 8 ); }
81OP(49) { regs.BA = ( regs.BA & 0x00FF ) | ( ( regs.BA >> 8 ) << 8 ); }
82OP(4A) { regs.BA = ( regs.BA & 0x00FF ) | ( ( regs.HL & 0x00FF) << 8 ); }
83OP(4B) { regs.BA = ( regs.BA & 0x00FF ) | ( ( regs.HL >> 8 ) << 8 ); }
84OP(4C) { AD2_IN8; regs.BA = ( regs.BA & 0x00FF ) | ( RD( addr2 ) << 8 ); }
85OP(4D) { AD2_IHL; regs.BA = ( regs.BA & 0x00FF ) | ( RD( addr2 ) << 8 ); }
86OP(4E) { AD2_XIX; regs.BA = ( regs.BA & 0x00FF ) | ( RD( addr2 ) << 8 ); }
87OP(4F) { AD2_YIY; regs.BA = ( regs.BA & 0x00FF ) | ( RD( addr2 ) << 8 ); }
72OP(40) { minx->BA = ( minx->BA & 0xFF00 ) | ( minx->BA & 0x00FF); }
73OP(41) { minx->BA = ( minx->BA & 0xFF00 ) | ( minx->BA >> 8 ); }
74OP(42) { minx->BA = ( minx->BA & 0xFF00 ) | ( minx->HL & 0x00FF); }
75OP(43) { minx->BA = ( minx->BA & 0xFF00 ) | ( minx->HL >> 8 ); }
76OP(44) { AD2_IN8; minx->BA = ( minx->BA & 0xFF00 ) | RD( addr2 ); }
77OP(45) { AD2_IHL; minx->BA = ( minx->BA & 0xFF00 ) | RD( addr2 ); }
78OP(46) { AD2_XIX; minx->BA = ( minx->BA & 0xFF00 ) | RD( addr2 ); }
79OP(47) { AD2_YIY; minx->BA = ( minx->BA & 0xFF00 ) | RD( addr2 ); }
80OP(48) { minx->BA = ( minx->BA & 0x00FF ) | ( ( minx->BA & 0x00FF) << 8 ); }
81OP(49) { minx->BA = ( minx->BA & 0x00FF ) | ( ( minx->BA >> 8 ) << 8 ); }
82OP(4A) { minx->BA = ( minx->BA & 0x00FF ) | ( ( minx->HL & 0x00FF) << 8 ); }
83OP(4B) { minx->BA = ( minx->BA & 0x00FF ) | ( ( minx->HL >> 8 ) << 8 ); }
84OP(4C) { AD2_IN8; minx->BA = ( minx->BA & 0x00FF ) | ( RD( addr2 ) << 8 ); }
85OP(4D) { AD2_IHL; minx->BA = ( minx->BA & 0x00FF ) | ( RD( addr2 ) << 8 ); }
86OP(4E) { AD2_XIX; minx->BA = ( minx->BA & 0x00FF ) | ( RD( addr2 ) << 8 ); }
87OP(4F) { AD2_YIY; minx->BA = ( minx->BA & 0x00FF ) | ( RD( addr2 ) << 8 ); }
8888
89OP(50) { regs.HL = ( regs.HL & 0xFF00 ) | ( regs.BA & 0x00FF); }
90OP(51) { regs.HL = ( regs.HL & 0xFF00 ) | ( regs.BA >> 8 ); }
91OP(52) { regs.HL = ( regs.HL & 0xFF00 ) | ( regs.HL & 0x00FF); }
92OP(53) { regs.HL = ( regs.HL & 0xFF00 ) | ( regs.HL >> 8 ); }
93OP(54) { AD2_IN8; regs.HL = ( regs.HL & 0xFF00 ) | RD( addr2 ); }
94OP(55) { AD2_IHL; regs.HL = ( regs.HL & 0xFF00 ) | RD( addr2 ); }
95OP(56) { AD2_XIX; regs.HL = ( regs.HL & 0xFF00 ) | RD( addr2 ); }
96OP(57) { AD2_YIY; regs.HL = ( regs.HL & 0xFF00 ) | RD( addr2 ); }
97OP(58) { regs.HL = ( regs.HL & 0x00FF ) | ( ( regs.BA & 0x00FF) << 8 ); }
98OP(59) { regs.HL = ( regs.HL & 0x00FF ) | ( ( regs.BA >> 8 ) << 8 ); }
99OP(5A) { regs.HL = ( regs.HL & 0x00FF ) | ( ( regs.HL & 0x00FF) << 8 ); }
100OP(5B) { regs.HL = ( regs.HL & 0x00FF ) | ( ( regs.HL >> 8 ) << 8 ); }
101OP(5C) { AD2_IN8; regs.HL = ( regs.HL & 0x00FF ) | ( RD( addr2 ) << 8 ); }
102OP(5D) { AD2_IHL; regs.HL = ( regs.HL & 0x00FF ) | ( RD( addr2 ) << 8 ); }
103OP(5E) { AD2_XIX; regs.HL = ( regs.HL & 0x00FF ) | ( RD( addr2 ) << 8 ); }
104OP(5F) { AD2_YIY; regs.HL = ( regs.HL & 0x00FF ) | ( RD( addr2 ) << 8 ); }
89OP(50) { minx->HL = ( minx->HL & 0xFF00 ) | ( minx->BA & 0x00FF); }
90OP(51) { minx->HL = ( minx->HL & 0xFF00 ) | ( minx->BA >> 8 ); }
91OP(52) { minx->HL = ( minx->HL & 0xFF00 ) | ( minx->HL & 0x00FF); }
92OP(53) { minx->HL = ( minx->HL & 0xFF00 ) | ( minx->HL >> 8 ); }
93OP(54) { AD2_IN8; minx->HL = ( minx->HL & 0xFF00 ) | RD( addr2 ); }
94OP(55) { AD2_IHL; minx->HL = ( minx->HL & 0xFF00 ) | RD( addr2 ); }
95OP(56) { AD2_XIX; minx->HL = ( minx->HL & 0xFF00 ) | RD( addr2 ); }
96OP(57) { AD2_YIY; minx->HL = ( minx->HL & 0xFF00 ) | RD( addr2 ); }
97OP(58) { minx->HL = ( minx->HL & 0x00FF ) | ( ( minx->BA & 0x00FF) << 8 ); }
98OP(59) { minx->HL = ( minx->HL & 0x00FF ) | ( ( minx->BA >> 8 ) << 8 ); }
99OP(5A) { minx->HL = ( minx->HL & 0x00FF ) | ( ( minx->HL & 0x00FF) << 8 ); }
100OP(5B) { minx->HL = ( minx->HL & 0x00FF ) | ( ( minx->HL >> 8 ) << 8 ); }
101OP(5C) { AD2_IN8; minx->HL = ( minx->HL & 0x00FF ) | ( RD( addr2 ) << 8 ); }
102OP(5D) { AD2_IHL; minx->HL = ( minx->HL & 0x00FF ) | ( RD( addr2 ) << 8 ); }
103OP(5E) { AD2_XIX; minx->HL = ( minx->HL & 0x00FF ) | ( RD( addr2 ) << 8 ); }
104OP(5F) { AD2_YIY; minx->HL = ( minx->HL & 0x00FF ) | ( RD( addr2 ) << 8 ); }
105105
106OP(60) { AD1_XIX; WR( addr1, ( regs.BA & 0x00FF ) ); }
107OP(61) { AD1_XIX; WR( addr1, ( regs.BA >> 8 ) ); }
108OP(62) { AD1_XIX; WR( addr1, ( regs.HL & 0x00FF ) ); }
109OP(63) { AD1_XIX; WR( addr1, ( regs.HL >> 8 ) ); }
106OP(60) { AD1_XIX; WR( addr1, ( minx->BA & 0x00FF ) ); }
107OP(61) { AD1_XIX; WR( addr1, ( minx->BA >> 8 ) ); }
108OP(62) { AD1_XIX; WR( addr1, ( minx->HL & 0x00FF ) ); }
109OP(63) { AD1_XIX; WR( addr1, ( minx->HL >> 8 ) ); }
110110OP(64) { AD1_XIX; AD2_IN8; WR( addr1, RD( addr2 ) ); }
111111OP(65) { AD1_XIX; AD2_IHL; WR( addr1, RD( addr2 ) ); }
112112OP(66) { AD1_XIX; AD2_XIX; WR( addr1, RD( addr2 ) ); }
113113OP(67) { AD1_XIX; AD2_YIY; WR( addr1, RD( addr2 ) ); }
114OP(68) { AD1_IHL; WR( addr1, ( regs.BA & 0x00FF ) ); }
115OP(69) { AD1_IHL; WR( addr1, ( regs.BA >> 8 ) ); }
116OP(6A) { AD1_IHL; WR( addr1, ( regs.HL & 0x00FF ) ); }
117OP(6B) { AD1_IHL; WR( addr1, ( regs.HL >> 8 ) ); }
114OP(68) { AD1_IHL; WR( addr1, ( minx->BA & 0x00FF ) ); }
115OP(69) { AD1_IHL; WR( addr1, ( minx->BA >> 8 ) ); }
116OP(6A) { AD1_IHL; WR( addr1, ( minx->HL & 0x00FF ) ); }
117OP(6B) { AD1_IHL; WR( addr1, ( minx->HL >> 8 ) ); }
118118OP(6C) { AD1_IHL; AD2_IN8; WR( addr1, RD( addr2 ) ); }
119119OP(6D) { AD1_IHL; AD2_IHL; WR( addr1, RD( addr2 ) ); }
120120OP(6E) { AD1_IHL; AD2_XIX; WR( addr1, RD( addr2 ) ); }
121121OP(6F) { AD1_IHL; AD2_YIY; WR( addr1, RD( addr2 ) ); }
122122
123OP(70) { AD1_YIY; WR( addr1, ( regs.BA & 0x00FF ) ); }
124OP(71) { AD1_YIY; WR( addr1, ( regs.BA >> 8 ) ); }
125OP(72) { AD1_YIY; WR( addr1, ( regs.HL & 0x00FF ) ); }
126OP(73) { AD1_YIY; WR( addr1, ( regs.HL >> 8 ) ); }
123OP(70) { AD1_YIY; WR( addr1, ( minx->BA & 0x00FF ) ); }
124OP(71) { AD1_YIY; WR( addr1, ( minx->BA >> 8 ) ); }
125OP(72) { AD1_YIY; WR( addr1, ( minx->HL & 0x00FF ) ); }
126OP(73) { AD1_YIY; WR( addr1, ( minx->HL >> 8 ) ); }
127127OP(74) { AD1_YIY; AD2_IN8; WR( addr1, RD( addr2 ) ); }
128128OP(75) { AD1_YIY; AD2_IHL; WR( addr1, RD( addr2 ) ); }
129129OP(76) { AD1_YIY; AD2_XIX; WR( addr1, RD( addr2 ) ); }
130130OP(77) { AD1_YIY; AD2_YIY; WR( addr1, RD( addr2 ) ); }
131OP(78) { AD1_IN8; WR( addr1, ( regs.BA & 0x00FF ) ); }
132OP(79) { AD1_IN8; WR( addr1, ( regs.BA >> 8 ) ); }
133OP(7A) { AD1_IN8; WR( addr1, ( regs.HL & 0x00FF ) ); }
134OP(7B) { AD1_IN8; WR( addr1, ( regs.HL >> 8 ) ); }
131OP(78) { AD1_IN8; WR( addr1, ( minx->BA & 0x00FF ) ); }
132OP(79) { AD1_IN8; WR( addr1, ( minx->BA >> 8 ) ); }
133OP(7A) { AD1_IN8; WR( addr1, ( minx->HL & 0x00FF ) ); }
134OP(7B) { AD1_IN8; WR( addr1, ( minx->HL >> 8 ) ); }
135135OP(7C) { /* illegal operation? */ }
136136OP(7D) { AD1_IN8; AD2_IHL; WR( addr1, RD( addr2 ) ); }
137137OP(7E) { AD1_IN8; AD2_XIX; WR( addr1, RD( addr2 ) ); }
138138OP(7F) { AD1_IN8; AD2_YIY; WR( addr1, RD( addr2 ) ); }
139139
140OP(80) { regs.BA = ( regs.BA & 0xFF00 ) | INC8( regs.BA & 0x00FF ); }
141OP(81) { regs.BA = ( regs.BA & 0x00FF ) | ( INC8( regs.BA >> 8 ) << 8 ); }
142OP(82) { regs.HL = ( regs.HL & 0xFF00 ) | INC8( regs.HL & 0x00FF ); }
143OP(83) { regs.HL = ( regs.HL & 0x00FF ) | ( INC8( regs.HL >> 8 ) << 8 ); }
144OP(84) { regs.N = INC8( regs.N ); }
145OP(85) { AD1_IN8; WR( addr1, INC8( RD( addr1 ) ) ); }
146OP(86) { AD1_IHL; WR( addr1, INC8( RD( addr1 ) ) ); }
147OP(87) { regs.SP = INC16( regs.SP ); }
148OP(88) { regs.BA = ( regs.BA & 0xFF00 ) | DEC8( regs.BA & 0x00FF ); }
149OP(89) { regs.BA = ( regs.BA & 0x00FF ) | ( DEC8( regs.BA >> 8 ) << 8 ); }
150OP(8A) { regs.HL = ( regs.HL & 0xFF00 ) | DEC8( regs.HL & 0x00FF ); }
151OP(8B) { regs.HL = ( regs.HL & 0x00FF ) | ( DEC8( regs.HL >> 8 ) << 8 ); }
152OP(8C) { regs.N = DEC8( regs.N ); }
153OP(8D) { AD1_IN8; WR( addr1, DEC8( RD( addr1 ) ) ); }
154OP(8E) { AD1_IHL; WR( addr1, DEC8( RD( addr1 ) ) ); }
155OP(8F) { regs.SP = DEC8( regs.SP ); }
140OP(80) { minx->BA = ( minx->BA & 0xFF00 ) | INC8( minx, minx->BA & 0x00FF ); }
141OP(81) { minx->BA = ( minx->BA & 0x00FF ) | ( INC8( minx, minx->BA >> 8 ) << 8 ); }
142OP(82) { minx->HL = ( minx->HL & 0xFF00 ) | INC8( minx, minx->HL & 0x00FF ); }
143OP(83) { minx->HL = ( minx->HL & 0x00FF ) | ( INC8( minx, minx->HL >> 8 ) << 8 ); }
144OP(84) { minx->N = INC8( minx, minx->N ); }
145OP(85) { AD1_IN8; WR( addr1, INC8( minx, RD( addr1 ) ) ); }
146OP(86) { AD1_IHL; WR( addr1, INC8( minx, RD( addr1 ) ) ); }
147OP(87) { minx->SP = INC16( minx, minx->SP ); }
148OP(88) { minx->BA = ( minx->BA & 0xFF00 ) | DEC8( minx, minx->BA & 0x00FF ); }
149OP(89) { minx->BA = ( minx->BA & 0x00FF ) | ( DEC8( minx, minx->BA >> 8 ) << 8 ); }
150OP(8A) { minx->HL = ( minx->HL & 0xFF00 ) | DEC8( minx, minx->HL & 0x00FF ); }
151OP(8B) { minx->HL = ( minx->HL & 0x00FF ) | ( DEC8( minx, minx->HL >> 8 ) << 8 ); }
152OP(8C) { minx->N = DEC8( minx, minx->N ); }
153OP(8D) { AD1_IN8; WR( addr1, DEC8( minx, RD( addr1 ) ) ); }
154OP(8E) { AD1_IHL; WR( addr1, DEC8( minx, RD( addr1 ) ) ); }
155OP(8F) { minx->SP = DEC8( minx, minx->SP ); }
156156
157OP(90) { regs.BA = INC16( regs.BA ); }
158OP(91) { regs.HL = INC16( regs.HL ); }
159OP(92) { regs.X = INC16( regs.X ); }
160OP(93) { regs.Y = INC16( regs.Y ); }
161OP(94) { regs.F = ( AND8( ( regs.BA & 0x00FF ), ( regs.BA >> 8 ) ) ) ? regs.F & ~FLAG_Z : regs.F | FLAG_Z;}
162OP(95) { AD1_IHL; regs.F = ( AND8( RD( addr1 ), rdop() ) ) ? regs.F & ~FLAG_Z : regs.F | FLAG_Z; }
163OP(96) { regs.F = ( AND8( ( regs.BA & 0x00FF ), rdop() ) ) ? regs.F & ~FLAG_Z : regs.F | FLAG_Z; }
164OP(97) { regs.F = ( AND8( ( regs.BA >> 8 ), rdop() ) ) ? regs.F & ~FLAG_Z : regs.F | FLAG_Z; }
165OP(98) { regs.BA = DEC16( regs.BA ); }
166OP(99) { regs.HL = DEC16( regs.HL ); }
167OP(9A) { regs.X = DEC16( regs.X ); }
168OP(9B) { regs.Y = DEC16( regs.Y ); }
169OP(9C) { regs.F = regs.F & rdop(); }
170OP(9D) { regs.F = regs.F | rdop(); }
171OP(9E) { regs.F = regs.F ^ rdop(); }
172OP(9F) { regs.F = rdop(); }
157OP(90) { minx->BA = INC16( minx, minx->BA ); }
158OP(91) { minx->HL = INC16( minx, minx->HL ); }
159OP(92) { minx->X = INC16( minx, minx->X ); }
160OP(93) { minx->Y = INC16( minx, minx->Y ); }
161OP(94) { minx->F = ( AND8( minx, ( minx->BA & 0x00FF ), ( minx->BA >> 8 ) ) ) ? minx->F & ~FLAG_Z : minx->F | FLAG_Z;}
162OP(95) { AD1_IHL; minx->F = ( AND8( minx, RD( addr1 ), rdop(minx) ) ) ? minx->F & ~FLAG_Z : minx->F | FLAG_Z; }
163OP(96) { minx->F = ( AND8( minx, ( minx->BA & 0x00FF ), rdop(minx) ) ) ? minx->F & ~FLAG_Z : minx->F | FLAG_Z; }
164OP(97) { minx->F = ( AND8( minx, ( minx->BA >> 8 ), rdop(minx) ) ) ? minx->F & ~FLAG_Z : minx->F | FLAG_Z; }
165OP(98) { minx->BA = DEC16( minx, minx->BA ); }
166OP(99) { minx->HL = DEC16( minx, minx->HL ); }
167OP(9A) { minx->X = DEC16( minx, minx->X ); }
168OP(9B) { minx->Y = DEC16( minx, minx->Y ); }
169OP(9C) { minx->F = minx->F & rdop(minx); }
170OP(9D) { minx->F = minx->F | rdop(minx); }
171OP(9E) { minx->F = minx->F ^ rdop(minx); }
172OP(9F) { minx->F = rdop(minx); }
173173
174OP(A0) { PUSH16( regs.BA ); }
175OP(A1) { PUSH16( regs.HL ); }
176OP(A2) { PUSH16( regs.X ); }
177OP(A3) { PUSH16( regs.Y ); }
178OP(A4) { PUSH8( regs.N ); }
179OP(A5) { PUSH8( regs.I ); }
180OP(A6) { PUSH8( regs.XI ); PUSH8( regs.YI ); }
181OP(A7) { PUSH8( regs.F ); }
182OP(A8) { regs.BA = POP16(); }
183OP(A9) { regs.HL = POP16();}
184OP(AA) { regs.X = POP16(); }
185OP(AB) { regs.Y = POP16(); }
186OP(AC) { regs.N = POP8(); }
187OP(AD) { regs.I = POP8(); }
188OP(AE) { regs.YI = POP8(); regs.XI = POP8(); }
189OP(AF) { regs.F = POP8(); }
174OP(A0) { PUSH16( minx, minx->BA ); }
175OP(A1) { PUSH16( minx, minx->HL ); }
176OP(A2) { PUSH16( minx, minx->X ); }
177OP(A3) { PUSH16( minx, minx->Y ); }
178OP(A4) { PUSH8( minx, minx->N ); }
179OP(A5) { PUSH8( minx, minx->I ); }
180OP(A6) { PUSH8( minx, minx->XI ); PUSH8( minx, minx->YI ); }
181OP(A7) { PUSH8( minx, minx->F ); }
182OP(A8) { minx->BA = POP16(minx); }
183OP(A9) { minx->HL = POP16(minx);}
184OP(AA) { minx->X = POP16(minx); }
185OP(AB) { minx->Y = POP16(minx); }
186OP(AC) { minx->N = POP8(minx); }
187OP(AD) { minx->I = POP8(minx); }
188OP(AE) { minx->YI = POP8(minx); minx->XI = POP8(minx); }
189OP(AF) { minx->F = POP8(minx); }
190190
191OP(B0) { UINT8 op = rdop(); regs.BA = ( regs.BA & 0xFF00 ) | op; }
192OP(B1) { UINT8 op = rdop(); regs.BA = ( regs.BA & 0x00FF ) | ( op << 8 ); }
193OP(B2) { UINT8 op = rdop(); regs.HL = ( regs.HL & 0xFF00 ) | op; }
194OP(B3) { UINT8 op = rdop(); regs.HL = ( regs.HL & 0x00FF ) | ( op << 8 ); }
195OP(B4) { UINT8 op = rdop(); regs.N = op; }
196OP(B5) { AD1_IHL; UINT8 op = rdop(); WR( addr1, op); }
197OP(B6) { AD1_XIX; UINT8 op = rdop(); WR( addr1, op ); }
198OP(B7) { AD1_YIY; UINT8 op = rdop(); WR( addr1, op ); }
199OP(B8) { AD2_I16; regs.BA = rd16( addr2 ); }
200OP(B9) { AD2_I16; regs.HL = rd16( addr2 ); }
201OP(BA) { AD2_I16; regs.X = rd16( addr2 ); }
202OP(BB) { AD2_I16; regs.Y = rd16( addr2 ); }
203OP(BC) { AD1_I16; wr16( addr1, regs.BA ); }
204OP(BD) { AD1_I16; wr16( addr1, regs.HL ); }
205OP(BE) { AD1_I16; wr16( addr1, regs.X ); }
206OP(BF) { AD1_I16; wr16( addr1, regs.Y ); }
191OP(B0) { UINT8 op = rdop(minx); minx->BA = ( minx->BA & 0xFF00 ) | op; }
192OP(B1) { UINT8 op = rdop(minx); minx->BA = ( minx->BA & 0x00FF ) | ( op << 8 ); }
193OP(B2) { UINT8 op = rdop(minx); minx->HL = ( minx->HL & 0xFF00 ) | op; }
194OP(B3) { UINT8 op = rdop(minx); minx->HL = ( minx->HL & 0x00FF ) | ( op << 8 ); }
195OP(B4) { UINT8 op = rdop(minx); minx->N = op; }
196OP(B5) { AD1_IHL; UINT8 op = rdop(minx); WR( addr1, op); }
197OP(B6) { AD1_XIX; UINT8 op = rdop(minx); WR( addr1, op ); }
198OP(B7) { AD1_YIY; UINT8 op = rdop(minx); WR( addr1, op ); }
199OP(B8) { AD2_I16; minx->BA = rd16( minx, addr2 ); }
200OP(B9) { AD2_I16; minx->HL = rd16( minx, addr2 ); }
201OP(BA) { AD2_I16; minx->X = rd16( minx, addr2 ); }
202OP(BB) { AD2_I16; minx->Y = rd16( minx, addr2 ); }
203OP(BC) { AD1_I16; wr16( minx, addr1, minx->BA ); }
204OP(BD) { AD1_I16; wr16( minx, addr1, minx->HL ); }
205OP(BE) { AD1_I16; wr16( minx, addr1, minx->X ); }
206OP(BF) { AD1_I16; wr16( minx, addr1, minx->Y ); }
207207
208OP(C0) { regs.BA = ADD16( regs.BA, rdop16() ); }
209OP(C1) { regs.HL = ADD16( regs.HL, rdop16() ); }
210OP(C2) { regs.X = ADD16( regs.X, rdop16() ); }
211OP(C3) { regs.Y = ADD16( regs.Y, rdop16() ); }
212OP(C4) { regs.BA = rdop16(); }
213OP(C5) { regs.HL = rdop16(); }
214OP(C6) { regs.X = rdop16(); }
215OP(C7) { regs.Y = rdop16(); }
216OP(C8) { UINT16 t = regs.BA; regs.BA = regs.HL; regs.HL = t; }
217OP(C9) { UINT16 t = regs.BA; regs.BA = regs.X; regs.X = t; }
218OP(CA) { UINT16 t = regs.BA; regs.BA = regs.Y; regs.Y = t; }
219OP(CB) { UINT16 t = regs.BA; regs.BA = regs.SP; regs.SP = t; }
220OP(CC) { regs.BA = ( regs.BA >> 8 ) | ( ( regs.BA & 0x00FF ) << 8 ); }
221OP(CD) { UINT8 t; AD2_IHL; t = RD( addr2 ); WR( addr2, ( regs.BA & 0x00FF ) ); regs.BA = ( regs.BA & 0xFF00 ) | t; }
222OP(CE) { UINT8 op = rdop(); insnminx_CE[op](); minx_icount -= insnminx_cycles_CE[op]; }
223OP(CF) { UINT8 op = rdop(); insnminx_CF[op](); minx_icount -= insnminx_cycles_CF[op]; }
208OP(C0) { minx->BA = ADD16( minx, minx->BA, rdop16(minx) ); }
209OP(C1) { minx->HL = ADD16( minx, minx->HL, rdop16(minx) ); }
210OP(C2) { minx->X = ADD16( minx, minx->X, rdop16(minx) ); }
211OP(C3) { minx->Y = ADD16( minx, minx->Y, rdop16(minx) ); }
212OP(C4) { minx->BA = rdop16(minx); }
213OP(C5) { minx->HL = rdop16(minx); }
214OP(C6) { minx->X = rdop16(minx); }
215OP(C7) { minx->Y = rdop16(minx); }
216OP(C8) { UINT16 t = minx->BA; minx->BA = minx->HL; minx->HL = t; }
217OP(C9) { UINT16 t = minx->BA; minx->BA = minx->X; minx->X = t; }
218OP(CA) { UINT16 t = minx->BA; minx->BA = minx->Y; minx->Y = t; }
219OP(CB) { UINT16 t = minx->BA; minx->BA = minx->SP; minx->SP = t; }
220OP(CC) { minx->BA = ( minx->BA >> 8 ) | ( ( minx->BA & 0x00FF ) << 8 ); }
221OP(CD) { UINT8 t; AD2_IHL; t = RD( addr2 ); WR( addr2, ( minx->BA & 0x00FF ) ); minx->BA = ( minx->BA & 0xFF00 ) | t; }
222OP(CE) { UINT8 op = rdop(minx); insnminx_CE[op](minx); minx->icount -= insnminx_cycles_CE[op]; }
223OP(CF) { UINT8 op = rdop(minx); insnminx_CF[op](minx); minx->icount -= insnminx_cycles_CF[op]; }
224224
225OP(D0) { regs.BA = SUB16( regs.BA, rdop16() ); }
226OP(D1) { regs.HL = SUB16( regs.HL, rdop16() ); }
227OP(D2) { regs.X = SUB16( regs.X, rdop16() ); }
228OP(D3) { regs.Y = SUB16( regs.Y, rdop16() ); }
229OP(D4) { SUB16( regs.BA, rdop16() ); }
230OP(D5) { SUB16( regs.HL, rdop16() ); }
231OP(D6) { SUB16( regs.X, rdop16() ); }
232OP(D7) { SUB16( regs.Y, rdop16() ); }
233OP(D8) { AD1_IN8; WR( addr1, AND8( RD( addr1 ), rdop() ) ); }
234OP(D9) { AD1_IN8; WR( addr1, OR8( RD( addr1 ), rdop() ) ); }
235OP(DA) { AD1_IN8; WR( addr1, XOR8( RD( addr1 ), rdop() ) ); }
236OP(DB) { AD1_IN8; SUB8( RD( addr1 ), rdop() ); }
237OP(DC) { AD1_IN8; regs.F = ( AND8( RD( addr1 ), rdop() ) ) ? regs.F & ~FLAG_Z : regs.F | FLAG_Z; }
238OP(DD) { AD1_IN8; WR( addr1, rdop() ); }
239OP(DE) { regs.BA = ( regs.BA & 0xFF00 ) | ( ( regs.BA & 0x000F ) | ( ( regs.BA & 0x0F00 ) >> 4 ) ); }
240OP(DF) { regs.BA = ( ( regs.BA & 0x0080 ) ? 0xFF00 : 0x0000 ) | ( regs.BA & 0x000F ); }
225OP(D0) { minx->BA = SUB16( minx, minx->BA, rdop16(minx) ); }
226OP(D1) { minx->HL = SUB16( minx, minx->HL, rdop16(minx) ); }
227OP(D2) { minx->X = SUB16( minx, minx->X, rdop16(minx) ); }
228OP(D3) { minx->Y = SUB16( minx, minx->Y, rdop16(minx) ); }
229OP(D4) { SUB16( minx, minx->BA, rdop16(minx) ); }
230OP(D5) { SUB16( minx, minx->HL, rdop16(minx) ); }
231OP(D6) { SUB16( minx, minx->X, rdop16(minx) ); }
232OP(D7) { SUB16( minx, minx->Y, rdop16(minx) ); }
233OP(D8) { AD1_IN8; WR( addr1, AND8( minx, RD( addr1 ), rdop(minx) ) ); }
234OP(D9) { AD1_IN8; WR( addr1, OR8( minx, RD( addr1 ), rdop(minx) ) ); }
235OP(DA) { AD1_IN8; WR( addr1, XOR8( minx, RD( addr1 ), rdop(minx) ) ); }
236OP(DB) { AD1_IN8; SUB8( minx, RD( addr1 ), rdop(minx) ); }
237OP(DC) { AD1_IN8; minx->F = ( AND8( minx, RD( addr1 ), rdop(minx) ) ) ? minx->F & ~FLAG_Z : minx->F | FLAG_Z; }
238OP(DD) { AD1_IN8; WR( addr1, rdop(minx) ); }
239OP(DE) { minx->BA = ( minx->BA & 0xFF00 ) | ( ( minx->BA & 0x000F ) | ( ( minx->BA & 0x0F00 ) >> 4 ) ); }
240OP(DF) { minx->BA = ( ( minx->BA & 0x0080 ) ? 0xFF00 : 0x0000 ) | ( minx->BA & 0x000F ); }
241241
242OP(E0) { INT8 d8 = rdop(); if ( regs.F & FLAG_C ) { CALL( regs.PC + d8 - 1 ); minx_icount -= 12; } }
243OP(E1) { INT8 d8 = rdop(); if ( ! ( regs.F & FLAG_C ) ) { CALL( regs.PC + d8- 1  ); minx_icount -= 12; } }
244OP(E2) { INT8 d8 = rdop(); if ( regs.F & FLAG_Z ) { CALL( regs.PC + d8 - 1 ); minx_icount -= 12; } }
245OP(E3) { INT8 d8 = rdop(); if ( ! ( regs.F & FLAG_Z ) ) { CALL( regs.PC + d8 - 1 ); minx_icount -= 12; } }
246OP(E4) { INT8 d8 = rdop(); if ( regs.F & FLAG_C ) { JMP( regs.PC + d8 - 1 ); } }
247OP(E5) { INT8 d8 = rdop(); if ( ! ( regs.F & FLAG_C ) ) { JMP( regs.PC + d8 - 1 ); } }
248OP(E6) { INT8 d8 = rdop(); if ( regs.F & FLAG_Z ) { JMP( regs.PC + d8 - 1 ); } }
249OP(E7) { INT8 d8 = rdop(); if ( ! ( regs.F & FLAG_Z ) ) { JMP( regs.PC + d8 - 1 ); } }
250OP(E8) { UINT16 d16 = rdop16(); if ( regs.F & FLAG_C ) { CALL( regs.PC + d16 - 1 ); minx_icount -= 12; } }
251OP(E9) { UINT16 d16 = rdop16(); if ( ! ( regs.F & FLAG_C ) ) { CALL( regs.PC + d16 - 1 ); minx_icount -= 12; } }
252OP(EA) { UINT16 d16 = rdop16(); if ( regs.F & FLAG_Z ) { CALL( regs.PC + d16 - 1 ); minx_icount -= 12; } }
253OP(EB) { UINT16 d16 = rdop16(); if ( ! ( regs.F & FLAG_Z ) ) { CALL( regs.PC + d16 - 1 ); minx_icount -= 12; } }
254OP(EC) { UINT16 d16 = rdop16(); if ( regs.F & FLAG_C ) { JMP( regs.PC + d16 - 1 ); } }
255OP(ED) { UINT16 d16 = rdop16(); if ( ! ( regs.F & FLAG_C ) ) { JMP( regs.PC + d16 - 1 ); } }
256OP(EE) { UINT16 d16 = rdop16(); if ( regs.F & FLAG_Z ) { JMP( regs.PC + d16 - 1 ); } }
257OP(EF) { UINT16 d16 = rdop16(); if ( ! ( regs.F & FLAG_Z ) ) { JMP( regs.PC + d16 - 1 ); } }
242OP(E0) { INT8 d8 = rdop(minx); if ( minx->F & FLAG_C ) { CALL( minx, minx->PC + d8 - 1 ); minx->icount -= 12; } }
243OP(E1) { INT8 d8 = rdop(minx); if ( ! ( minx->F & FLAG_C ) ) { CALL( minx, minx->PC + d8- 1  ); minx->icount -= 12; } }
244OP(E2) { INT8 d8 = rdop(minx); if ( minx->F & FLAG_Z ) { CALL( minx, minx->PC + d8 - 1 ); minx->icount -= 12; } }
245OP(E3) { INT8 d8 = rdop(minx); if ( ! ( minx->F & FLAG_Z ) ) { CALL( minx, minx->PC + d8 - 1 ); minx->icount -= 12; } }
246OP(E4) { INT8 d8 = rdop(minx); if ( minx->F & FLAG_C ) { JMP( minx, minx->PC + d8 - 1 ); } }
247OP(E5) { INT8 d8 = rdop(minx); if ( ! ( minx->F & FLAG_C ) ) { JMP( minx, minx->PC + d8 - 1 ); } }
248OP(E6) { INT8 d8 = rdop(minx); if ( minx->F & FLAG_Z ) { JMP( minx, minx->PC + d8 - 1 ); } }
249OP(E7) { INT8 d8 = rdop(minx); if ( ! ( minx->F & FLAG_Z ) ) { JMP( minx, minx->PC + d8 - 1 ); } }
250OP(E8) { UINT16 d16 = rdop16(minx); if ( minx->F & FLAG_C ) { CALL( minx, minx->PC + d16 - 1 ); minx->icount -= 12; } }
251OP(E9) { UINT16 d16 = rdop16(minx); if ( ! ( minx->F & FLAG_C ) ) { CALL( minx, minx->PC + d16 - 1 ); minx->icount -= 12; } }
252OP(EA) { UINT16 d16 = rdop16(minx); if ( minx->F & FLAG_Z ) { CALL( minx, minx->PC + d16 - 1 ); minx->icount -= 12; } }
253OP(EB) { UINT16 d16 = rdop16(minx); if ( ! ( minx->F & FLAG_Z ) ) { CALL( minx, minx->PC + d16 - 1 ); minx->icount -= 12; } }
254OP(EC) { UINT16 d16 = rdop16(minx); if ( minx->F & FLAG_C ) { JMP( minx, minx->PC + d16 - 1 ); } }
255OP(ED) { UINT16 d16 = rdop16(minx); if ( ! ( minx->F & FLAG_C ) ) { JMP( minx, minx->PC + d16 - 1 ); } }
256OP(EE) { UINT16 d16 = rdop16(minx); if ( minx->F & FLAG_Z ) { JMP( minx, minx->PC + d16 - 1 ); } }
257OP(EF) { UINT16 d16 = rdop16(minx); if ( ! ( minx->F & FLAG_Z ) ) { JMP( minx, minx->PC + d16 - 1 ); } }
258258
259OP(F0) { INT8 d8 = rdop(); CALL( regs.PC + d8 - 1 ); }
260OP(F1) { INT8 d8 = rdop(); JMP( regs.PC + d8 - 1 ); }
261OP(F2) { UINT16 d16 = rdop16(); CALL( regs.PC + d16 - 1 ); }
262OP(F3) { UINT16 d16 = rdop16(); JMP( regs.PC + d16 - 1 ); }
263OP(F4) { JMP( regs.HL ); }
264OP(F5) { INT8 d8 = rdop(); regs.BA = regs.BA - 0x0100; if ( regs.BA & 0xFF00 ) { JMP( regs.PC + d8 - 1 ); } }
265OP(F6) { regs.BA = ( regs.BA & 0xFF00 ) | ( ( regs.BA & 0x00F0 ) >> 4 ) | ( ( regs.BA & 0x000F ) << 4 ); }
259OP(F0) { INT8 d8 = rdop(minx); CALL( minx, minx->PC + d8 - 1 ); }
260OP(F1) { INT8 d8 = rdop(minx); JMP( minx, minx->PC + d8 - 1 ); }
261OP(F2) { UINT16 d16 = rdop16(minx); CALL( minx, minx->PC + d16 - 1 ); }
262OP(F3) { UINT16 d16 = rdop16(minx); JMP( minx, minx->PC + d16 - 1 ); }
263OP(F4) { JMP( minx, minx->HL ); }
264OP(F5) { INT8 d8 = rdop(minx); minx->BA = minx->BA - 0x0100; if ( minx->BA & 0xFF00 ) { JMP( minx, minx->PC + d8 - 1 ); } }
265OP(F6) { minx->BA = ( minx->BA & 0xFF00 ) | ( ( minx->BA & 0x00F0 ) >> 4 ) | ( ( minx->BA & 0x000F ) << 4 ); }
266266OP(F7) { UINT8 d; AD1_IHL; d = RD( addr1 ); WR( addr1, ( ( d & 0xF0 ) >> 4 ) | ( ( d & 0x0F ) << 4 ) ); }
267OP(F8) { regs.PC = POP16(); regs.V = POP8(); regs.U = regs.V; }
268OP(F9) { regs.F = POP8(); regs.PC = POP16(); regs.V = POP8(); regs.U = regs.V; }
269OP(FA) { regs.PC = POP16() + 2; regs.V = POP8(); regs.U = regs.V; }
270OP(FB) { AD1_I16; CALL( rd16( addr1 ) ); }
271OP(FC) { UINT8 i = rdop() & 0xFE; CALL( rd16(i) ); PUSH8( regs.F ); }
272OP(FD) { UINT8 i = rdop() & 0xFE; JMP( rd16(i) ); /* PUSH8( regs.F );?? */ }
267OP(F8) { minx->PC = POP16(minx); minx->V = POP8(minx); minx->U = minx->V; }
268OP(F9) { minx->F = POP8(minx); minx->PC = POP16(minx); minx->V = POP8(minx); minx->U = minx->V; }
269OP(FA) { minx->PC = POP16(minx) + 2; minx->V = POP8(minx); minx->U = minx->V; }
270OP(FB) { AD1_I16; CALL( minx, rd16( minx, addr1 ) ); }
271OP(FC) { UINT8 i = rdop(minx) & 0xFE; CALL( minx, rd16( minx, i ) ); PUSH8( minx, minx->F ); }
272OP(FD) { UINT8 i = rdop(minx) & 0xFE; JMP( minx, rd16( minx, i ) ); /* PUSH8( minx, minx->F );?? */ }
273273OP(FE) { /* illegal operation? */ }
274274OP(FF) { }
275275
276static void (*const insnminx[256])(void) = {
276static void (*const insnminx[256])(minx_state *minx) = {
277277   minx_00, minx_01, minx_02, minx_03, minx_04, minx_05, minx_06, minx_07,
278278   minx_08, minx_09, minx_0A, minx_0B, minx_0C, minx_0D, minx_0E, minx_0F,
279279   minx_10, minx_11, minx_12, minx_13, minx_14, minx_15, minx_16, minx_17,
src/emu/cpu/minx/minxopce.h
r5046r5047
11#undef OP
2#define OP(nn) INLINE void minx_CE_##nn(void)
2#define OP(nn) INLINE void minx_CE_##nn(minx_state *minx)
33
4OP(00) { AD2_X8; regs.BA = ( regs.BA & 0xFF00 ) | ADD8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
5OP(01) { AD2_Y8; regs.BA = ( regs.BA & 0xFF00 ) | ADD8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
6OP(02) { AD2_XL; regs.BA = ( regs.BA & 0xFF00 ) | ADD8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
7OP(03) { AD2_YL; regs.BA = ( regs.BA & 0xFF00 ) | ADD8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
8OP(04) { AD1_IHL; WR( addr1, ADD8( RD( addr1 ), ( regs.BA & 0x00FF ) ) ); }
9OP(05) { AD1_IHL; WR( addr1, ADD8( RD( addr1 ), rdop() ) ); }
10OP(06) { AD1_IHL; AD2_XIX; WR( addr1, ADD8( RD( addr1 ), RD( addr2 ) ) ); }
11OP(07) { AD1_IHL; AD2_YIY; WR( addr1, ADD8( RD( addr1 ), RD( addr2 ) ) ); }
12OP(08) { AD2_X8; regs.BA = ( regs.BA & 0xFF00 ) | ADDC8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
13OP(09) { AD2_Y8; regs.BA = ( regs.BA & 0xFF00 ) | ADDC8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
14OP(0A) { AD2_XL; regs.BA = ( regs.BA & 0xFF00 ) | ADDC8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
15OP(0B) { AD2_YL; regs.BA = ( regs.BA & 0xFF00 ) | ADDC8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
16OP(0C) { AD1_IHL; WR( addr1, ADDC8( RD( addr1 ), ( regs.BA & 0x00FF ) ) ); }
17OP(0D) { AD1_IHL; WR( addr1, ADDC8( RD( addr1 ), rdop() ) ); }
18OP(0E) { AD1_IHL; AD2_XIX; WR( addr1, ADDC8( RD( addr1 ), RD( addr2 ) ) ); }
19OP(0F) { AD1_IHL; AD2_YIY; WR( addr1, ADDC8( RD( addr1 ), RD( addr2 ) ) ); }
4OP(00) { AD2_X8; minx->BA = ( minx->BA & 0xFF00 ) | ADD8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
5OP(01) { AD2_Y8; minx->BA = ( minx->BA & 0xFF00 ) | ADD8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
6OP(02) { AD2_XL; minx->BA = ( minx->BA & 0xFF00 ) | ADD8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
7OP(03) { AD2_YL; minx->BA = ( minx->BA & 0xFF00 ) | ADD8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
8OP(04) { AD1_IHL; WR( addr1, ADD8( minx, RD( addr1 ), ( minx->BA & 0x00FF ) ) ); }
9OP(05) { AD1_IHL; WR( addr1, ADD8( minx, RD( addr1 ), rdop(minx) ) ); }
10OP(06) { AD1_IHL; AD2_XIX; WR( addr1, ADD8( minx, RD( addr1 ), RD( addr2 ) ) ); }
11OP(07) { AD1_IHL; AD2_YIY; WR( addr1, ADD8( minx, RD( addr1 ), RD( addr2 ) ) ); }
12OP(08) { AD2_X8; minx->BA = ( minx->BA & 0xFF00 ) | ADDC8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
13OP(09) { AD2_Y8; minx->BA = ( minx->BA & 0xFF00 ) | ADDC8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
14OP(0A) { AD2_XL; minx->BA = ( minx->BA & 0xFF00 ) | ADDC8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
15OP(0B) { AD2_YL; minx->BA = ( minx->BA & 0xFF00 ) | ADDC8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
16OP(0C) { AD1_IHL; WR( addr1, ADDC8( minx, RD( addr1 ), ( minx->BA & 0x00FF ) ) ); }
17OP(0D) { AD1_IHL; WR( addr1, ADDC8( minx, RD( addr1 ), rdop(minx) ) ); }
18OP(0E) { AD1_IHL; AD2_XIX; WR( addr1, ADDC8( minx, RD( addr1 ), RD( addr2 ) ) ); }
19OP(0F) { AD1_IHL; AD2_YIY; WR( addr1, ADDC8( minx, RD( addr1 ), RD( addr2 ) ) ); }
2020
21OP(10) { AD2_X8; regs.BA = ( regs.BA & 0xFF00 ) | SUB8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
22OP(11) { AD2_Y8; regs.BA = ( regs.BA & 0xFF00 ) | SUB8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
23OP(12) { AD2_XL; regs.BA = ( regs.BA & 0xFF00 ) | SUB8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
24OP(13) { AD2_YL; regs.BA = ( regs.BA & 0xFF00 ) | SUB8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
25OP(14) { AD1_IHL; WR( addr1, SUB8( RD( addr1 ), ( regs.BA & 0x00FF ) ) ); }
26OP(15) { AD1_IHL; WR( addr1, SUB8( RD( addr1 ), rdop() ) ); }
27OP(16) { AD1_IHL; AD2_XIX; WR( addr1, SUB8( RD( addr1 ), RD( addr2 ) ) ); }
28OP(17) { AD1_IHL; AD2_YIY; WR( addr1, SUB8( RD( addr1 ), RD( addr2 ) ) ); }
29OP(18) { AD2_X8; regs.BA = ( regs.BA & 0xFF00 ) | SUBC8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
30OP(19) { AD2_Y8; regs.BA = ( regs.BA & 0xFF00 ) | SUBC8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
31OP(1A) { AD2_XL; regs.BA = ( regs.BA & 0xFF00 ) | SUBC8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
32OP(1B) { AD2_YL; regs.BA = ( regs.BA & 0xFF00 ) | SUBC8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
33OP(1C) { AD1_IHL; WR( addr1, SUBC8( RD( addr1 ), ( regs.BA & 0x00FF ) ) ); }
34OP(1D) { AD1_IHL; WR( addr1, SUBC8( RD( addr1 ), rdop() ) ); }
35OP(1E) { AD1_IHL; AD2_XIX; WR( addr1, SUBC8( RD( addr1 ), RD( addr2 ) ) ); }
36OP(1F) { AD1_IHL; AD2_YIY; WR( addr1, SUBC8( RD( addr1 ), RD( addr2 ) ) ); }
21OP(10) { AD2_X8; minx->BA = ( minx->BA & 0xFF00 ) | SUB8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
22OP(11) { AD2_Y8; minx->BA = ( minx->BA & 0xFF00 ) | SUB8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
23OP(12) { AD2_XL; minx->BA = ( minx->BA & 0xFF00 ) | SUB8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
24OP(13) { AD2_YL; minx->BA = ( minx->BA & 0xFF00 ) | SUB8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
25OP(14) { AD1_IHL; WR( addr1, SUB8( minx, RD( addr1 ), ( minx->BA & 0x00FF ) ) ); }
26OP(15) { AD1_IHL; WR( addr1, SUB8( minx, RD( addr1 ), rdop(minx) ) ); }
27OP(16) { AD1_IHL; AD2_XIX; WR( addr1, SUB8( minx, RD( addr1 ), RD( addr2 ) ) ); }
28OP(17) { AD1_IHL; AD2_YIY; WR( addr1, SUB8( minx, RD( addr1 ), RD( addr2 ) ) ); }
29OP(18) { AD2_X8; minx->BA = ( minx->BA & 0xFF00 ) | SUBC8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
30OP(19) { AD2_Y8; minx->BA = ( minx->BA & 0xFF00 ) | SUBC8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
31OP(1A) { AD2_XL; minx->BA = ( minx->BA & 0xFF00 ) | SUBC8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
32OP(1B) { AD2_YL; minx->BA = ( minx->BA & 0xFF00 ) | SUBC8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
33OP(1C) { AD1_IHL; WR( addr1, SUBC8( minx, RD( addr1 ), ( minx->BA & 0x00FF ) ) ); }
34OP(1D) { AD1_IHL; WR( addr1, SUBC8( minx, RD( addr1 ), rdop(minx) ) ); }
35OP(1E) { AD1_IHL; AD2_XIX; WR( addr1, SUBC8( minx, RD( addr1 ), RD( addr2 ) ) ); }
36OP(1F) { AD1_IHL; AD2_YIY; WR( addr1, SUBC8( minx, RD( addr1 ), RD( addr2 ) ) ); }
3737
38OP(20) { AD2_X8; regs.BA = ( regs.BA & 0xFF00 ) | AND8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
39OP(21) { AD2_Y8; regs.BA = ( regs.BA & 0xFF00 ) | AND8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
40OP(22) { AD2_XL; regs.BA = ( regs.BA & 0xFF00 ) | AND8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
41OP(23) { AD2_YL; regs.BA = ( regs.BA & 0xFF00 ) | AND8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
42OP(24) { AD1_IHL; WR( addr1, AND8( RD( addr1 ), ( regs.BA & 0x00FF ) ) ); }
43OP(25) { AD1_IHL; WR( addr1, AND8( RD( addr1 ), rdop() ) ); }
44OP(26) { AD1_IHL; AD2_XIX; WR( addr1, AND8( RD( addr1 ), RD( addr2 ) ) ); }
45OP(27) { AD1_IHL; AD2_YIY; WR( addr1, AND8( RD( addr1 ), RD( addr2 ) ) ); }
46OP(28) { AD2_X8; regs.BA = ( regs.BA & 0xFF00 ) | OR8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
47OP(29) { AD2_Y8; regs.BA = ( regs.BA & 0xFF00 ) | OR8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
48OP(2A) { AD2_XL; regs.BA = ( regs.BA & 0xFF00 ) | OR8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
49OP(2B) { AD2_YL; regs.BA = ( regs.BA & 0xFF00 ) | OR8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
50OP(2C) { AD1_IHL; WR( addr1, OR8( RD( addr1 ), ( regs.BA & 0x00FF ) ) ); }
51OP(2D) { AD1_IHL; WR( addr1, OR8( RD( addr1 ), rdop() ) ); }
52OP(2E) { AD1_IHL; AD2_XIX; WR( addr1, OR8( RD( addr1 ), RD( addr2 ) ) ); }
53OP(2F) { AD1_IHL; AD2_YIY; WR( addr1, OR8( RD( addr1 ), RD( addr2 ) ) ); }
38OP(20) { AD2_X8; minx->BA = ( minx->BA & 0xFF00 ) | AND8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
39OP(21) { AD2_Y8; minx->BA = ( minx->BA & 0xFF00 ) | AND8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
40OP(22) { AD2_XL; minx->BA = ( minx->BA & 0xFF00 ) | AND8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
41OP(23) { AD2_YL; minx->BA = ( minx->BA & 0xFF00 ) | AND8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
42OP(24) { AD1_IHL; WR( addr1, AND8( minx, RD( addr1 ), ( minx->BA & 0x00FF ) ) ); }
43OP(25) { AD1_IHL; WR( addr1, AND8( minx, RD( addr1 ), rdop(minx) ) ); }
44OP(26) { AD1_IHL; AD2_XIX; WR( addr1, AND8( minx, RD( addr1 ), RD( addr2 ) ) ); }
45OP(27) { AD1_IHL; AD2_YIY; WR( addr1, AND8( minx, RD( addr1 ), RD( addr2 ) ) ); }
46OP(28) { AD2_X8; minx->BA = ( minx->BA & 0xFF00 ) | OR8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
47OP(29) { AD2_Y8; minx->BA = ( minx->BA & 0xFF00 ) | OR8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
48OP(2A) { AD2_XL; minx->BA = ( minx->BA & 0xFF00 ) | OR8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
49OP(2B) { AD2_YL; minx->BA = ( minx->BA & 0xFF00 ) | OR8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
50OP(2C) { AD1_IHL; WR( addr1, OR8( minx, RD( addr1 ), ( minx->BA & 0x00FF ) ) ); }
51OP(2D) { AD1_IHL; WR( addr1, OR8( minx, RD( addr1 ), rdop(minx) ) ); }
52OP(2E) { AD1_IHL; AD2_XIX; WR( addr1, OR8( minx, RD( addr1 ), RD( addr2 ) ) ); }
53OP(2F) { AD1_IHL; AD2_YIY; WR( addr1, OR8( minx, RD( addr1 ), RD( addr2 ) ) ); }
5454
55OP(30) { AD2_X8; SUB8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
56OP(31) { AD2_Y8; SUB8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
57OP(32) { AD2_XL; SUB8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
58OP(33) { AD2_YL; SUB8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
59OP(34) { AD1_IHL; SUB8( RD( addr1 ), ( regs.BA & 0x00FF ) ); }
60OP(35) { AD1_IHL; SUB8( RD( addr1 ), rdop() ); }
61OP(36) { AD1_IHL; AD2_XIX; SUB8( RD( addr1 ), RD( addr2 ) ); }
62OP(37) { AD1_IHL; AD2_YIY; SUB8( RD( addr1 ), RD( addr2 ) ); }
63OP(38) { AD2_X8; regs.BA = ( regs.BA & 0xFF00 ) | XOR8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
64OP(39) { AD2_Y8; regs.BA = ( regs.BA & 0xFF00 ) | XOR8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
65OP(3A) { AD2_XL; regs.BA = ( regs.BA & 0xFF00 ) | XOR8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
66OP(3B) { AD2_YL; regs.BA = ( regs.BA & 0xFF00 ) | XOR8( ( regs.BA & 0x00FF ), RD( addr2 ) ); }
67OP(3C) { AD1_IHL; WR( addr1, XOR8( RD( addr1 ), ( regs.BA & 0x00FF ) ) ); }
68OP(3D) { AD1_IHL; WR( addr1, XOR8( RD( addr1 ), rdop() ) ); }
69OP(3E) { AD1_IHL; AD2_XIX; WR( addr1, XOR8( RD( addr1 ), RD( addr2 ) ) ); }
70OP(3F) { AD1_IHL; AD2_YIY; WR( addr1, XOR8( RD( addr1 ), RD( addr2 ) ) ); }
55OP(30) { AD2_X8; SUB8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
56OP(31) { AD2_Y8; SUB8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
57OP(32) { AD2_XL; SUB8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
58OP(33) { AD2_YL; SUB8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
59OP(34) { AD1_IHL; SUB8( minx, RD( addr1 ), ( minx->BA & 0x00FF ) ); }
60OP(35) { AD1_IHL; SUB8( minx, RD( addr1 ), rdop(minx) ); }
61OP(36) { AD1_IHL; AD2_XIX; SUB8( minx, RD( addr1 ), RD( addr2 ) ); }
62OP(37) { AD1_IHL; AD2_YIY; SUB8( minx, RD( addr1 ), RD( addr2 ) ); }
63OP(38) { AD2_X8; minx->BA = ( minx->BA & 0xFF00 ) | XOR8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
64OP(39) { AD2_Y8; minx->BA = ( minx->BA & 0xFF00 ) | XOR8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
65OP(3A) { AD2_XL; minx->BA = ( minx->BA & 0xFF00 ) | XOR8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
66OP(3B) { AD2_YL; minx->BA = ( minx->BA & 0xFF00 ) | XOR8( minx, ( minx->BA & 0x00FF ), RD( addr2 ) ); }
67OP(3C) { AD1_IHL; WR( addr1, XOR8( minx, RD( addr1 ), ( minx->BA & 0x00FF ) ) ); }
68OP(3D) { AD1_IHL; WR( addr1, XOR8( minx, RD( addr1 ), rdop(minx) ) ); }
69OP(3E) { AD1_IHL; AD2_XIX; WR( addr1, XOR8( minx, RD( addr1 ), RD( addr2 ) ) ); }
70OP(3F) { AD1_IHL; AD2_YIY; WR( addr1, XOR8( minx, RD( addr1 ), RD( addr2 ) ) ); }
7171
72OP(40) { AD2_X8; regs.BA = ( regs.BA & 0xFF00 ) | RD( addr2 ); }
73OP(41) { AD2_Y8; regs.BA = ( regs.BA & 0xFF00 ) | RD( addr2 ); }
74OP(42) { AD2_XL; regs.BA = ( regs.BA & 0xFF00 ) | RD( addr2 ); }
75OP(43) { AD2_YL; regs.BA = ( regs.BA & 0xFF00 ) | RD( addr2 ); }
76OP(44) { AD1_X8; WR( addr1, ( regs.BA & 0x00FF ) ); }
77OP(45) { AD1_Y8; WR( addr1, ( regs.BA & 0x00FF ) ); }
78OP(46) { AD1_XL; WR( addr1, ( regs.BA & 0x00FF ) ); }
79OP(47) { AD1_YL; WR( addr1, ( regs.BA & 0x00FF ) ); }
80OP(48) { AD2_X8; regs.BA = ( regs.BA & 0x00FF ) | ( RD( addr2 ) << 8 ); }
81OP(49) { AD2_Y8; regs.BA = ( regs.BA & 0x00FF ) | ( RD( addr2 ) << 8 ); }
82OP(4A) { AD2_XL; regs.BA = ( regs.BA & 0x00FF ) | ( RD( addr2 ) << 8 ); }
83OP(4B) { AD2_YL; regs.BA = ( regs.BA & 0x00FF ) | ( RD( addr2 ) << 8 ); }
84OP(4C) { AD1_X8; WR( addr1, ( regs.BA >> 8 ) ); }
85OP(4D) { AD1_Y8; WR( addr1, ( regs.BA >> 8 ) ); }
86OP(4E) { AD1_XL; WR( addr1, ( regs.BA >> 8 ) ); }
87OP(4F) { AD1_YL; WR( addr1, ( regs.BA >> 8 ) ); }
72OP(40) { AD2_X8; minx->BA = ( minx->BA & 0xFF00 ) | RD( addr2 ); }
73OP(41) { AD2_Y8; minx->BA = ( minx->BA & 0xFF00 ) | RD( addr2 ); }
74OP(42) { AD2_XL; minx->BA = ( minx->BA & 0xFF00 ) | RD( addr2 ); }
75OP(43) { AD2_YL; minx->BA = ( minx->BA & 0xFF00 ) | RD( addr2 ); }
76OP(44) { AD1_X8; WR( addr1, ( minx->BA & 0x00FF ) ); }
77OP(45) { AD1_Y8; WR( addr1, ( minx->BA & 0x00FF ) ); }
78OP(46) { AD1_XL; WR( addr1, ( minx->BA & 0x00FF ) ); }
79OP(47) { AD1_YL; WR( addr1, ( minx->BA & 0x00FF ) ); }
80OP(48) { AD2_X8; minx->BA = ( minx->BA & 0x00FF ) | ( RD( addr2 ) << 8 ); }
81OP(49) { AD2_Y8; minx->BA = ( minx->BA & 0x00FF ) | ( RD( addr2 ) << 8 ); }
82OP(4A) { AD2_XL; minx->BA = ( minx->BA & 0x00FF ) | ( RD( addr2 ) << 8 ); }
83OP(4B) { AD2_YL; minx->BA = ( minx->BA & 0x00FF ) | ( RD( addr2 ) << 8 ); }
84OP(4C) { AD1_X8; WR( addr1, ( minx->BA >> 8 ) ); }
85OP(4D) { AD1_Y8; WR( addr1, ( minx->BA >> 8 ) ); }
86OP(4E) { AD1_XL; WR( addr1, ( minx->BA >> 8 ) ); }
87OP(4F) { AD1_YL; WR( addr1, ( minx->BA >> 8 ) ); }
8888
89OP(50) { AD2_X8; regs.HL = ( regs.HL & 0xFF00 ) | RD( addr2 ); }
90OP(51) { AD2_Y8; regs.HL = ( regs.HL & 0xFF00 ) | RD( addr2 ); }
91OP(52) { AD2_XL; regs.HL = ( regs.HL & 0xFF00 ) | RD( addr2 ); }
92OP(53) { AD2_YL; regs.HL = ( regs.HL & 0xFF00 ) | RD( addr2 ); }
93OP(54) { AD1_X8; WR( addr1, ( regs.HL & 0x00FF ) ); }
94OP(55) { AD1_Y8; WR( addr1, ( regs.HL & 0x00FF ) ); }
95OP(56) { AD1_XL; WR( addr1, ( regs.HL & 0x00FF ) ); }
96OP(57) { AD1_YL; WR( addr1, ( regs.HL & 0x00FF ) ); }
97OP(58) { AD2_X8; regs.HL = ( regs.HL & 0x00FF ) | ( RD( addr2 ) << 8 ); }
98OP(59) { AD2_Y8; regs.HL = ( regs.HL & 0x00FF ) | ( RD( addr2 ) << 8 ); }
99OP(5A) { AD2_XL; regs.HL = ( regs.HL & 0x00FF ) | ( RD( addr2 ) << 8 ); }
100OP(5B) { AD2_YL; regs.HL = ( regs.HL & 0x00FF ) | ( RD( addr2 ) << 8 ); }
101OP(5C) { AD1_X8; WR( addr1, ( regs.HL >> 8 ) ); }
102OP(5D) { AD1_Y8; WR( addr1, ( regs.HL >> 8 ) ); }
103OP(5E) { AD1_XL; WR( addr1, ( regs.HL >> 8 ) ); }
104OP(5F) { AD1_YL; WR( addr1, ( regs.HL >> 8 ) ); }
89OP(50) { AD2_X8; minx->HL = ( minx->HL & 0xFF00 ) | RD( addr2 ); }
90OP(51) { AD2_Y8; minx->HL = ( minx->HL & 0xFF00 ) | RD( addr2 ); }
91OP(52) { AD2_XL; minx->HL = ( minx->HL & 0xFF00 ) | RD( addr2 ); }
92OP(53) { AD2_YL; minx->HL = ( minx->HL & 0xFF00 ) | RD( addr2 ); }
93OP(54) { AD1_X8; WR( addr1, ( minx->HL & 0x00FF ) ); }
94OP(55) { AD1_Y8; WR( addr1, ( minx->HL & 0x00FF ) ); }
95OP(56) { AD1_XL; WR( addr1, ( minx->HL & 0x00FF ) ); }
96OP(57) { AD1_YL; WR( addr1, ( minx->HL & 0x00FF ) ); }
97OP(58) { AD2_X8; minx->HL = ( minx->HL & 0x00FF ) | ( RD( addr2 ) << 8 ); }
98OP(59) { AD2_Y8; minx->HL = ( minx->HL & 0x00FF ) | ( RD( addr2 ) << 8 ); }
99OP(5A) { AD2_XL; minx->HL = ( minx->HL & 0x00FF ) | ( RD( addr2 ) << 8 ); }
100OP(5B) { AD2_YL; minx->HL = ( minx->HL & 0x00FF ) | ( RD( addr2 ) << 8 ); }
101OP(5C) { AD1_X8; WR( addr1, ( minx->HL >> 8 ) ); }
102OP(5D) { AD1_Y8; WR( addr1, ( minx->HL >> 8 ) ); }
103OP(5E) { AD1_XL; WR( addr1, ( minx->HL >> 8 ) ); }
104OP(5F) { AD1_YL; WR( addr1, ( minx->HL >> 8 ) ); }
105105
106106OP(60) { AD1_IHL; AD2_X8; WR( addr1, RD( addr2 ) ); }
107107OP(61) { AD1_IHL; AD2_Y8; WR( addr1, RD( addr2 ) ); }
r5046r5047
137137OP(7E) { /* illegal operation? */ }
138138OP(7F) { /* illegal operation? */ }
139139
140OP(80) { regs.BA = ( regs.BA & 0xFF00 ) | SAL8( regs.BA & 0x00FF ); }
141OP(81) { regs.BA = ( regs.BA & 0x00FF ) | ( SAL8( regs.BA >> 8 )<< 8 ); }
142OP(82) { AD1_IN8; WR( addr1, SAL8( RD( addr1 ) ) ); }
143OP(83) { AD1_IHL; WR( addr1, SAL8( RD( addr1 ) ) ); }
144OP(84) { regs.BA = ( regs.BA & 0xFF00 ) | SHL8( regs.BA & 0x00FF ); }
145OP(85) { regs.BA = ( regs.BA & 0x00FF ) | ( SHL8( regs.BA >> 8 ) << 8 ); }
146OP(86) { AD1_IN8; WR( addr1, SHL8( RD( addr1 ) ) ); }
147OP(87) { AD1_IHL; WR( addr1, SHL8( RD( addr1 ) ) ); }
148OP(88) { regs.BA = ( regs.BA & 0xFF00 ) | SAR8( regs.BA & 0x00FF ); }
149OP(89) { regs.BA = ( regs.BA & 0x00FF ) | ( SAR8( regs.BA >> 8 ) << 8 ); }
150OP(8A) { AD1_IN8; WR( addr1, SAR8( RD( addr1 ) ) ); }
151OP(8B) { AD1_IHL; WR( addr1, SAR8( RD( addr1 ) ) ); }
152OP(8C) { regs.BA = ( regs.BA & 0xFF00 ) | SHR8( regs.BA & 0x00FF ); }
153OP(8D) { regs.BA = ( regs.BA & 0x00FF ) | ( SHR8( regs.BA >> 8 ) << 8 ); }
154OP(8E) { AD1_IN8; WR( addr1, SHR8( RD( addr1 ) ) ); }
155OP(8F) { AD1_IHL; WR( addr1, SHR8( RD( addr1 ) ) ); }
140OP(80) { minx->BA = ( minx->BA & 0xFF00 ) | SAL8( minx, minx->BA & 0x00FF ); }
141OP(81) { minx->BA = ( minx->BA & 0x00FF ) | ( SAL8( minx, minx->BA >> 8 )<< 8 ); }
142OP(82) { AD1_IN8; WR( addr1, SAL8( minx, RD( addr1 ) ) ); }
143OP(83) { AD1_IHL; WR( addr1, SAL8( minx, RD( addr1 ) ) ); }
144OP(84) { minx->BA = ( minx->BA & 0xFF00 ) | SHL8( minx, minx->BA & 0x00FF ); }
145OP(85) { minx->BA = ( minx->BA & 0x00FF ) | ( SHL8( minx, minx->BA >> 8 ) << 8 ); }
146OP(86) { AD1_IN8; WR( addr1, SHL8( minx, RD( addr1 ) ) ); }
147OP(87) { AD1_IHL; WR( addr1, SHL8( minx, RD( addr1 ) ) ); }
148OP(88) { minx->BA = ( minx->BA & 0xFF00 ) | SAR8( minx, minx->BA & 0x00FF ); }
149OP(89) { minx->BA = ( minx->BA & 0x00FF ) | ( SAR8( minx, minx->BA >> 8 ) << 8 ); }
150OP(8A) { AD1_IN8; WR( addr1, SAR8( minx, RD( addr1 ) ) ); }
151OP(8B) { AD1_IHL; WR( addr1, SAR8( minx, RD( addr1 ) ) ); }
152OP(8C) { minx->BA = ( minx->BA & 0xFF00 ) | SHR8( minx, minx->BA & 0x00FF ); }
153OP(8D) { minx->BA = ( minx->BA & 0x00FF ) | ( SHR8( minx, minx->BA >> 8 ) << 8 ); }
154OP(8E) { AD1_IN8; WR( addr1, SHR8( minx, RD( addr1 ) ) ); }
155OP(8F) { AD1_IHL; WR( addr1, SHR8( minx, RD( addr1 ) ) ); }
156156
157OP(90) { regs.BA = ( regs.BA & 0xFF00 ) | ROLC8( regs.BA & 0x00FF ); }
158OP(91) { regs.BA = ( regs.BA & 0x00FF ) | ( ROLC8( regs.BA >> 8 ) << 8 ); }
159OP(92) { AD1_IN8; WR( addr1, ROLC8( RD( addr1 ) ) ); }
160OP(93) { AD1_IHL; WR( addr1, ROLC8( RD( addr1 ) ) ); }
161OP(94) { regs.BA = ( regs.BA & 0xFF00 ) | ROL8( regs.BA & 0x00FF ); }
162OP(95) { regs.BA = ( regs.BA & 0x00FF ) | ( ROL8( regs.BA >> 8 ) << 8 ); }
163OP(96) { AD1_IN8; WR( addr1, ROL8( RD( addr1 ) ) ); }
164OP(97) { AD1_IHL; WR( addr1, ROL8( RD( addr1 ) ) ); }
165OP(98) { regs.BA = ( regs.BA & 0xFF00 ) | RORC8( regs.BA & 0x00FF ); }
166OP(99) { regs.BA = ( regs.BA & 0x00FF ) | ( RORC8( regs.BA >> 8 ) << 8 ); }
167OP(9A) { AD1_IN8; WR( addr1, RORC8( RD( addr1 ) ) ); }
168OP(9B) { AD1_IHL; WR( addr1, RORC8( RD( addr1 ) ) ); }
169OP(9C) { regs.BA = ( regs.BA & 0xFF00 ) | ROR8( regs.BA & 0x00FF ); }
170OP(9D) { regs.BA = ( regs.BA & 0x00FF ) | ( ROR8( regs.BA >> 8 ) << 8 ); }
171OP(9E) { AD1_IN8; WR( addr1, ROR8( RD( addr1 ) ) ); }
172OP(9F) { AD1_IHL; WR( addr1, ROR8( RD( addr1 ) ) ); }
157OP(90) { minx->BA = ( minx->BA & 0xFF00 ) | ROLC8( minx, minx->BA & 0x00FF ); }
158OP(91) { minx->BA = ( minx->BA & 0x00FF ) | ( ROLC8( minx, minx->BA >> 8 ) << 8 ); }
159OP(92) { AD1_IN8; WR( addr1, ROLC8( minx, RD( addr1 ) ) ); }
160OP(93) { AD1_IHL; WR( addr1, ROLC8( minx, RD( addr1 ) ) ); }
161OP(94) { minx->BA = ( minx->BA & 0xFF00 ) | ROL8( minx, minx->BA & 0x00FF ); }
162OP(95) { minx->BA = ( minx->BA & 0x00FF ) | ( ROL8( minx, minx->BA >> 8 ) << 8 ); }
163OP(96) { AD1_IN8; WR( addr1, ROL8( minx, RD( addr1 ) ) ); }
164OP(97) { AD1_IHL; WR( addr1, ROL8( minx, RD( addr1 ) ) ); }
165OP(98) { minx->BA = ( minx->BA & 0xFF00 ) | RORC8( minx, minx->BA & 0x00FF ); }
166OP(99) { minx->BA = ( minx->BA & 0x00FF ) | ( RORC8( minx, minx->BA >> 8 ) << 8 ); }
167OP(9A) { AD1_IN8; WR( addr1, RORC8( minx, RD( addr1 ) ) ); }
168OP(9B) { AD1_IHL; WR( addr1, RORC8( minx, RD( addr1 ) ) ); }
169OP(9C) { minx->BA = ( minx->BA & 0xFF00 ) | ROR8( minx, minx->BA & 0x00FF ); }
170OP(9D) { minx->BA = ( minx->BA & 0x00FF ) | ( ROR8( minx, minx->BA >> 8 ) << 8 ); }
171OP(9E) { AD1_IN8; WR( addr1, ROR8( minx, RD( addr1 ) ) ); }
172OP(9F) { AD1_IHL; WR( addr1, ROR8( minx, RD( addr1 ) ) ); }
173173
174OP(A0) { regs.BA = ( regs.BA & 0xFF00 ) | NOT8( regs.BA & 0x00FF ); }
175OP(A1) { regs.BA = ( regs.BA & 0x00FF ) | ( NOT8( regs.BA >> 8 ) << 8 ); }
176OP(A2) { AD1_IN8; WR( addr1, NOT8( RD( addr1 ) ) ); }
177OP(A3) { AD1_IHL; WR( addr1, NOT8( RD( addr1 ) ) ); }
178OP(A4) { regs.BA = ( regs.BA & 0xFF00 ) | NEG8( regs.BA & 0x00FF ); }
179OP(A5) { regs.BA = ( regs.BA & 0x00FF ) | ( NEG8( regs.BA >> 8 ) << 8 ); }
180OP(A6) { AD1_IN8; WR( addr1, NEG8( RD( addr1 ) ) ); }
181OP(A7) { AD1_IHL; WR( addr1, NEG8( RD( addr1 ) ) ); }
182OP(A8) { regs.BA = ( ( regs.BA & 0x0080 ) ? ( 0xFF00 | regs.BA ) : ( regs.BA & 0x00FF ) ); }
174OP(A0) { minx->BA = ( minx->BA & 0xFF00 ) | NOT8( minx, minx->BA & 0x00FF ); }
175OP(A1) { minx->BA = ( minx->BA & 0x00FF ) | ( NOT8( minx, minx->BA >> 8 ) << 8 ); }
176OP(A2) { AD1_IN8; WR( addr1, NOT8( minx, RD( addr1 ) ) ); }
177OP(A3) { AD1_IHL; WR( addr1, NOT8( minx, RD( addr1 ) ) ); }
178OP(A4) { minx->BA = ( minx->BA & 0xFF00 ) | NEG8( minx, minx->BA & 0x00FF ); }
179OP(A5) { minx->BA = ( minx->BA & 0x00FF ) | ( NEG8( minx, minx->BA >> 8 ) << 8 ); }
180OP(A6) { AD1_IN8; WR( addr1, NEG8( minx, RD( addr1 ) ) ); }
181OP(A7) { AD1_IHL; WR( addr1, NEG8( minx, RD( addr1 ) ) ); }
182OP(A8) { minx->BA = ( ( minx->BA & 0x0080 ) ? ( 0xFF00 | minx->BA ) : ( minx->BA & 0x00FF ) ); }
183183OP(A9) { /* illegal operation? */ }
184184OP(AA) { /* illegal operation? */ }
185185OP(AB) { /* illegal operation? */ }
186186OP(AC) { /* illegal operation? */ }
187187OP(AD) { /* illegal operation? */ }
188OP(AE) { /* HALT */ regs.halted = 1; }
188OP(AE) { /* HALT */ minx->halted = 1; }
189189OP(AF) { }
190190
191OP(B0) { regs.BA = ( regs.BA & 0x00FF ) | ( AND8( ( regs.BA >> 8 ), rdop() ) << 8 ); }
192OP(B1) { regs.HL = ( regs.HL & 0xFF00 ) | AND8( ( regs.HL & 0x00FF ), rdop() ); }
193OP(B2) { regs.HL = ( regs.HL & 0x00FF ) | ( AND8( ( regs.HL >> 8 ), rdop() ) << 8 ); }
191OP(B0) { minx->BA = ( minx->BA & 0x00FF ) | ( AND8( minx, ( minx->BA >> 8 ), rdop(minx) ) << 8 ); }
192OP(B1) { minx->HL = ( minx->HL & 0xFF00 ) | AND8( minx, ( minx->HL & 0x00FF ), rdop(minx) ); }
193OP(B2) { minx->HL = ( minx->HL & 0x00FF ) | ( AND8( minx, ( minx->HL >> 8 ), rdop(minx) ) << 8 ); }
194194OP(B3) { /* illegal operation? */ }
195OP(B4) { regs.BA = ( regs.BA & 0x00FF ) | ( OR8( ( regs.BA >> 8 ), rdop() ) << 8 ); }
196OP(B5) { regs.HL = ( regs.HL & 0xFF00 ) | OR8( ( regs.HL & 0x00FF ), rdop() ); }
197OP(B6) { regs.HL = ( regs.HL & 0x00FF ) | ( OR8( ( regs.HL >> 8 ), rdop() ) << 8 ); }
195OP(B4) { minx->BA = ( minx->BA & 0x00FF ) | ( OR8( minx, ( minx->BA >> 8 ), rdop(minx) ) << 8 ); }
196OP(B5) { minx->HL = ( minx->HL & 0xFF00 ) | OR8( minx, ( minx->HL & 0x00FF ), rdop(minx) ); }
197OP(B6) { minx->HL = ( minx->HL & 0x00FF ) | ( OR8( minx, ( minx->HL >> 8 ), rdop(minx) ) << 8 ); }
198198OP(B7) { /* illegal operation? */ }
199OP(B8) { regs.BA = ( regs.BA & 0x00FF ) | ( XOR8( ( regs.BA >> 8 ), rdop() ) << 8 ); }
200OP(B9) { regs.HL = ( regs.HL & 0xFF00 ) | XOR8( ( regs.HL & 0x00FF ), rdop() ); }
201OP(BA) { regs.HL = ( regs.HL & 0x00FF ) | ( XOR8( ( regs.HL >> 8 ), rdop() ) << 8 ); }
199OP(B8) { minx->BA = ( minx->BA & 0x00FF ) | ( XOR8( minx, ( minx->BA >> 8 ), rdop(minx) ) << 8 ); }
200OP(B9) { minx->HL = ( minx->HL & 0xFF00 ) | XOR8( minx, ( minx->HL & 0x00FF ), rdop(minx) ); }
201OP(BA) { minx->HL = ( minx->HL & 0x00FF ) | ( XOR8( minx, ( minx->HL >> 8 ), rdop(minx) ) << 8 ); }
202202OP(BB) { /* illegal operation? */ }
203OP(BC) { SUB8( ( regs.BA >> 8 ), rdop() ); }
204OP(BD) { SUB8( ( regs.HL & 0x00FF), rdop() ); }
205OP(BE) { SUB8( ( regs.HL >> 8 ), rdop() ); }
206OP(BF) { SUB8( regs.N, rdop() ); }
203OP(BC) { SUB8( minx, ( minx->BA >> 8 ), rdop(minx) ); }
204OP(BD) { SUB8( minx, ( minx->HL & 0x00FF), rdop(minx) ); }
205OP(BE) { SUB8( minx, ( minx->HL >> 8 ), rdop(minx) ); }
206OP(BF) { SUB8( minx, minx->N, rdop(minx) ); }
207207
208OP(C0) { regs.BA = ( regs.BA & 0xFF00 ) | regs.N; }
209OP(C1) { regs.BA = ( regs.BA & 0xFF00 ) | regs.F; }
210OP(C2) { regs.N = ( regs.BA & 0x00FF ); }
211OP(C3) { regs.F = ( regs.BA & 0x00FF ); }
212OP(C4) { regs.U = rdop(); }
213OP(C5) { regs.I = rdop(); }
214OP(C6) { regs.XI = rdop(); }
215OP(C7) { regs.YI = rdop(); }
216OP(C8) { regs.BA = ( regs.BA & 0xFF00 ) | regs.V; }
217OP(C9) { regs.BA = ( regs.BA & 0xFF00 ) | regs.I; }
218OP(CA) { regs.BA = ( regs.BA & 0xFF00 ) | regs.XI; }
219OP(CB) { regs.BA = ( regs.BA & 0xFF00 ) | regs.YI; }
220OP(CC) { regs.U = ( regs.BA & 0x00FF ); }
221OP(CD) { regs.I = ( regs.BA & 0x00FF ); }
222OP(CE) { regs.XI = ( regs.BA & 0x00FF ); }
223OP(CF) { regs.YI = ( regs.BA & 0x00FF ); }
208OP(C0) { minx->BA = ( minx->BA & 0xFF00 ) | minx->N; }
209OP(C1) { minx->BA = ( minx->BA & 0xFF00 ) | minx->F; }
210OP(C2) { minx->N = ( minx->BA & 0x00FF ); }
211OP(C3) { minx->F = ( minx->BA & 0x00FF ); }
212OP(C4) { minx->U = rdop(minx); }
213OP(C5) { minx->I = rdop(minx); }
214OP(C6) { minx->XI = rdop(minx); }
215OP(C7) { minx->YI = rdop(minx); }
216OP(C8) { minx->BA = ( minx->BA & 0xFF00 ) | minx->V; }
217OP(C9) { minx->BA = ( minx->BA & 0xFF00 ) | minx->I; }
218OP(CA) { minx->BA = ( minx->BA & 0xFF00 ) | minx->XI; }
219OP(CB) { minx->BA = ( minx->BA & 0xFF00 ) | minx->YI; }
220OP(CC) { minx->U = ( minx->BA & 0x00FF ); }
221OP(CD) { minx->I = ( minx->BA & 0x00FF ); }
222OP(CE) { minx->XI = ( minx->BA & 0x00FF ); }
223OP(CF) { minx->YI = ( minx->BA & 0x00FF ); }
224224
225OP(D0) { AD2_I16; regs.BA = ( regs.BA & 0xFF00 ) | RD( addr2 ); }
226OP(D1) { AD2_I16; regs.BA = ( regs.BA & 0x00FF ) | ( RD( addr2 ) << 8 ); }
227OP(D2) { AD2_I16; regs.HL = ( regs.HL & 0xFF00 ) | RD( addr2 ); }
228OP(D3) { AD2_I16; regs.HL = ( regs.HL & 0x00FF ) | ( RD( addr2 ) << 8 ); }
229OP(D4) { AD1_I16; WR( addr1, ( regs.BA & 0x00FF ) ); }
230OP(D5) { AD1_I16; WR( addr1, ( regs.BA >> 8 ) ); }
231OP(D6) { AD1_I16; WR( addr1, ( regs.HL & 0x00FF ) ); }
232OP(D7) { AD1_I16; WR( addr1, ( regs.HL >> 8 ) ); }
233OP(D8) { regs.HL = ( regs.HL & 0x00FF ) * ( regs.BA & 0x00FF );  }
234OP(D9) { int d = regs.HL / ( regs.BA & 0x00FF ); regs.HL = ( ( regs.HL - ( ( regs.BA & 0x00FF ) * d ) ) << 8 ) | d; }
225OP(D0) { AD2_I16; minx->BA = ( minx->BA & 0xFF00 ) | RD( addr2 ); }
226OP(D1) { AD2_I16; minx->BA = ( minx->BA & 0x00FF ) | ( RD( addr2 ) << 8 ); }
227OP(D2) { AD2_I16; minx->HL = ( minx->HL & 0xFF00 ) | RD( addr2 ); }
228OP(D3) { AD2_I16; minx->HL = ( minx->HL & 0x00FF ) | ( RD( addr2 ) << 8 ); }
229OP(D4) { AD1_I16; WR( addr1, ( minx->BA & 0x00FF ) ); }
230OP(D5) { AD1_I16; WR( addr1, ( minx->BA >> 8 ) ); }
231OP(D6) { AD1_I16; WR( addr1, ( minx->HL & 0x00FF ) ); }
232OP(D7) { AD1_I16; WR( addr1, ( minx->HL >> 8 ) ); }
233OP(D8) { minx->HL = ( minx->HL & 0x00FF ) * ( minx->BA & 0x00FF );  }
234OP(D9) { int d = minx->HL / ( minx->BA & 0x00FF ); minx->HL = ( ( minx->HL - ( ( minx->BA & 0x00FF ) * d ) ) << 8 ) | d; }
235235OP(DA) { /* illegal operation? */ }
236236OP(DB) { /* illegal operation? */ }
237237OP(DC) { /* illegal operation? */ }
r5046r5047
239239OP(DE) { /* illegal operation? */ }
240240OP(DF) { /* illegal operation? */ }
241241
242OP(E0) { INT8 d8 = rdop(); if ( ( ( regs.F & ( FLAG_S | FLAG_O ) ) == FLAG_S ) || ( ( regs.F & ( FLAG_S | FLAG_O ) ) == FLAG_O ) ) { JMP( regs.PC + d8 - 1 ); } }
243OP(E1) { INT8 d8 = rdop(); if ( ( regs.F & FLAG_Z ) || ( ( regs.F & ( FLAG_S | FLAG_O ) ) == FLAG_S ) || ( ( regs.F & ( FLAG_S | FLAG_O ) ) == FLAG_O ) ) { JMP( regs.PC + d8 - 1 ); } }
244OP(E2) { INT8 d8 = rdop(); if ( !( regs.F & FLAG_Z ) && ( ( ( regs.F & ( FLAG_S | FLAG_O ) ) == 0 ) || ( ( regs.F & ( FLAG_S | FLAG_O ) ) == ( FLAG_S | FLAG_O ) ) ) ) { JMP( regs.PC + d8 - 1 ); } }
245OP(E3) { INT8 d8 = rdop(); if ( ( ( regs.F & ( FLAG_S | FLAG_O ) ) == 0 ) || ( ( regs.F & ( FLAG_S | FLAG_O ) ) == ( FLAG_S | FLAG_O ) ) ) { JMP( regs.PC + d8 - 1 ); } }
246OP(E4) { INT8 d8 = rdop(); if ( ( regs.F & FLAG_O ) ) { JMP( regs.PC + d8 - 1 ); } }
247OP(E5) { INT8 d8 = rdop(); if ( ! ( regs.F & FLAG_O ) ) { JMP( regs.PC + d8 - 1 ); } }
248OP(E6) { INT8 d8 = rdop(); if ( ! ( regs.F & FLAG_S ) ) { JMP( regs.PC + d8 - 1 ); } }
249OP(E7) { INT8 d8 = rdop(); if ( ( regs.F & FLAG_S ) ) { JMP( regs.PC + d8 - 1 ); } }
250OP(E8) { INT8 d8 = rdop(); if ( ! ( regs.E & EXEC_X0 ) ) { JMP( regs.PC + d8 - 1 ); } }
251OP(E9) { INT8 d8 = rdop(); if ( ! ( regs.E & EXEC_X1 ) ) { JMP( regs.PC + d8 - 1 ); } }
252OP(EA) { INT8 d8 = rdop(); if ( ! ( regs.E & EXEC_X2 ) ) { JMP( regs.PC + d8 - 1 ); } }
253OP(EB) { INT8 d8 = rdop(); if ( ! ( regs.E & EXEC_DZ ) ) { JMP( regs.PC + d8 - 1 ); } }
254OP(EC) { INT8 d8 = rdop(); if ( ( regs.E & EXEC_X0 ) ) { JMP( regs.PC + d8 - 1 ); } }
255OP(ED) { INT8 d8 = rdop(); if ( ( regs.E & EXEC_X1 ) ) { JMP( regs.PC + d8 - 1 ); } }
256OP(EE) { INT8 d8 = rdop(); if ( ( regs.E & EXEC_X2 ) ) { JMP( regs.PC + d8 - 1 ); } }
257OP(EF) { INT8 d8 = rdop(); if ( ( regs.E & EXEC_DZ ) ) { JMP( regs.PC + d8 - 1 ); } }
242OP(E0) { INT8 d8 = rdop(minx); if ( ( ( minx->F & ( FLAG_S | FLAG_O ) ) == FLAG_S ) || ( ( minx->F & ( FLAG_S | FLAG_O ) ) == FLAG_O ) ) { JMP( minx, minx->PC + d8 - 1 ); } }
243OP(E1) { INT8 d8 = rdop(minx); if ( ( minx->F & FLAG_Z ) || ( ( minx->F & ( FLAG_S | FLAG_O ) ) == FLAG_S ) || ( ( minx->F & ( FLAG_S | FLAG_O ) ) == FLAG_O ) ) { JMP( minx, minx->PC + d8 - 1 ); } }
244OP(E2) { INT8 d8 = rdop(minx); if ( !( minx->F & FLAG_Z ) && ( ( ( minx->F & ( FLAG_S | FLAG_O ) ) == 0 ) || ( ( minx->F & ( FLAG_S | FLAG_O ) ) == ( FLAG_S | FLAG_O ) ) ) ) { JMP( minx, minx->PC + d8 - 1 ); } }
245OP(E3) { INT8 d8 = rdop(minx); if ( ( ( minx->F & ( FLAG_S | FLAG_O ) ) == 0 ) || ( ( minx->F & ( FLAG_S | FLAG_O ) ) == ( FLAG_S | FLAG_O ) ) ) { JMP( minx, minx->PC + d8 - 1 ); } }
246OP(E4) { INT8 d8 = rdop(minx); if ( ( minx->F & FLAG_O ) ) { JMP( minx, minx->PC + d8 - 1 ); } }
247OP(E5) { INT8 d8 = rdop(minx); if ( ! ( minx->F & FLAG_O ) ) { JMP( minx, minx->PC + d8 - 1 ); } }
248OP(E6) { INT8 d8 = rdop(minx); if ( ! ( minx->F & FLAG_S ) ) { JMP( minx, minx->PC + d8 - 1 ); } }
249OP(E7) { INT8 d8 = rdop(minx); if ( ( minx->F & FLAG_S ) ) { JMP( minx, minx->PC + d8 - 1 ); } }
250OP(E8) { INT8 d8 = rdop(minx); if ( ! ( minx->E & EXEC_X0 ) ) { JMP( minx, minx->PC + d8 - 1 ); } }
251OP(E9) { INT8 d8 = rdop(minx); if ( ! ( minx->E & EXEC_X1 ) ) { JMP( minx, minx->PC + d8 - 1 ); } }
252OP(EA) { INT8 d8 = rdop(minx); if ( ! ( minx->E & EXEC_X2 ) ) { JMP( minx, minx->PC + d8 - 1 ); } }
253OP(EB) { INT8 d8 = rdop(minx); if ( ! ( minx->E & EXEC_DZ ) ) { JMP( minx, minx->PC + d8 - 1 ); } }
254OP(EC) { INT8 d8 = rdop(minx); if ( ( minx->E & EXEC_X0 ) ) { JMP( minx, minx->PC + d8 - 1 ); } }
255OP(ED) { INT8 d8 = rdop(minx); if ( ( minx->E & EXEC_X1 ) ) { JMP( minx, minx->PC + d8 - 1 ); } }
256OP(EE) { INT8 d8 = rdop(minx); if ( ( minx->E & EXEC_X2 ) ) { JMP( minx, minx->PC + d8 - 1 ); } }
257OP(EF) { INT8 d8 = rdop(minx); if ( ( minx->E & EXEC_DZ ) ) { JMP( minx, minx->PC + d8 - 1 ); } }
258258
259OP(F0) { INT8 d8 = rdop(); if ( ( ( regs.F & ( FLAG_S | FLAG_O ) ) == FLAG_S ) || ( ( regs.F & ( FLAG_S | FLAG_O ) ) == FLAG_O ) ) { CALL( regs.PC + d8 - 1 ); minx_icount -= 12; } }
260OP(F1) { INT8 d8 = rdop(); if ( ( regs.F & FLAG_Z ) || ( ( regs.F & ( FLAG_S | FLAG_O ) ) == FLAG_S ) || ( ( regs.F & ( FLAG_S | FLAG_O ) ) == FLAG_O ) ) { CALL( regs.PC + d8 - 1 ); minx_icount -= 12; } }
261OP(F2) { INT8 d8 = rdop(); if ( !( regs.F & FLAG_Z ) && ( ( ( regs.F & ( FLAG_S | FLAG_O ) ) == 0 ) || ( ( regs.F & ( FLAG_S | FLAG_O ) ) == ( FLAG_S | FLAG_O ) ) ) ) { CALL( regs.PC + d8 - 1 ); minx_icount -= 12; } }
262OP(F3) { INT8 d8 = rdop(); if ( ( ( regs.F & ( FLAG_S | FLAG_O ) ) == 0 ) || ( ( regs.F & ( FLAG_S | FLAG_O ) ) == ( FLAG_S | FLAG_O ) ) ) { CALL( regs.PC + d8 - 1 ); } }
263OP(F4) { INT8 d8 = rdop(); if ( ( regs.F & FLAG_O ) ) { CALL( regs.PC + d8 - 1 ); minx_icount -= 12; } }
264OP(F5) { INT8 d8 = rdop(); if ( ! ( regs.F & FLAG_O ) ) { CALL( regs.PC + d8 - 1 ); minx_icount -= 12; } }
265OP(F6) { INT8 d8 = rdop(); if ( ! ( regs.F & FLAG_S ) ) { CALL( regs.PC + d8 - 1 ); minx_icount -= 12; } }
266OP(F7) { INT8 d8 = rdop(); if ( ( regs.F & FLAG_S ) ) { CALL( regs.PC + d8 - 1 ); minx_icount -= 12; } }
267OP(F8) { INT8 d8 = rdop(); if ( ! ( regs.E & EXEC_X0 ) ) { CALL( regs.PC + d8 - 1 ); minx_icount -= 12; } }
268OP(F9) { INT8 d8 = rdop(); if ( ! ( regs.E & EXEC_X1 ) ) { CALL( regs.PC + d8 - 1 ); minx_icount -= 12; } }
269OP(FA) { INT8 d8 = rdop(); if ( ! ( regs.E & EXEC_X2 ) ) { CALL( regs.PC + d8 - 1 ); minx_icount -= 12; } }
270OP(FB) { INT8 d8 = rdop(); if ( ! ( regs.E & EXEC_DZ ) ) { CALL( regs.PC + d8 - 1 ); minx_icount -= 12; } }
271OP(FC) { INT8 d8 = rdop(); if ( ( regs.E & EXEC_X0 ) ) { CALL( regs.PC + d8 - 1 ); minx_icount -= 12; } }
272OP(FD) { INT8 d8 = rdop(); if ( ( regs.E & EXEC_X1 ) ) { CALL( regs.PC + d8 - 1 ); minx_icount -= 12; } }
273OP(FE) { INT8 d8 = rdop(); if ( ( regs.E & EXEC_X2 ) ) { CALL( regs.PC + d8 - 1 ); minx_icount -= 12; } }
274OP(FF) { INT8 d8 = rdop(); if ( ( regs.E & EXEC_DZ ) ) { CALL( regs.PC + d8 - 1 ); minx_icount -= 12; } }
259OP(F0) { INT8 d8 = rdop(minx); if ( ( ( minx->F & ( FLAG_S | FLAG_O ) ) == FLAG_S ) || ( ( minx->F & ( FLAG_S | FLAG_O ) ) == FLAG_O ) ) { CALL( minx, minx->PC + d8 - 1 ); minx->icount -= 12; } }
260OP(F1) { INT8 d8 = rdop(minx); if ( ( minx->F & FLAG_Z ) || ( ( minx->F & ( FLAG_S | FLAG_O ) ) == FLAG_S ) || ( ( minx->F & ( FLAG_S | FLAG_O ) ) == FLAG_O ) ) { CALL( minx, minx->PC + d8 - 1 ); minx->icount -= 12; } }
261OP(F2) { INT8 d8 = rdop(minx); if ( !( minx->F & FLAG_Z ) && ( ( ( minx->F & ( FLAG_S | FLAG_O ) ) == 0 ) || ( ( minx->F & ( FLAG_S | FLAG_O ) ) == ( FLAG_S | FLAG_O ) ) ) ) { CALL( minx, minx->PC + d8 - 1 ); minx->icount -= 12; } }
262OP(F3) { INT8 d8 = rdop(minx); if ( ( ( minx->F & ( FLAG_S | FLAG_O ) ) == 0 ) || ( ( minx->F & ( FLAG_S | FLAG_O ) ) == ( FLAG_S | FLAG_O ) ) ) { CALL( minx, minx->PC + d8 - 1 ); } }
263OP(F4) { INT8 d8 = rdop(minx); if ( ( minx->F & FLAG_O ) ) { CALL( minx, minx->PC + d8 - 1 ); minx->icount -= 12; } }
264OP(F5) { INT8 d8 = rdop(minx); if ( ! ( minx->F & FLAG_O ) ) { CALL( minx, minx->PC + d8 - 1 ); minx->icount -= 12; } }
265OP(F6) { INT8 d8 = rdop(minx); if ( ! ( minx->F & FLAG_S ) ) { CALL( minx, minx->PC + d8 - 1 ); minx->icount -= 12; } }
266OP(F7) { INT8 d8 = rdop(minx); if ( ( minx->F & FLAG_S ) ) { CALL( minx, minx->PC + d8 - 1 ); minx->icount -= 12; } }
267OP(F8) { INT8 d8 = rdop(minx); if ( ! ( minx->E & EXEC_X0 ) ) { CALL( minx, minx->PC + d8 - 1 ); minx->icount -= 12; } }
268OP(F9) { INT8 d8 = rdop(minx); if ( ! ( minx->E & EXEC_X1 ) ) { CALL( minx, minx->PC + d8 - 1 ); minx->icount -= 12; } }
269OP(FA) { INT8 d8 = rdop(minx); if ( ! ( minx->E & EXEC_X2 ) ) { CALL( minx, minx->PC + d8 - 1 ); minx->icount -= 12; } }
270OP(FB) { INT8 d8 = rdop(minx); if ( ! ( minx->E & EXEC_DZ ) ) { CALL( minx, minx->PC + d8 - 1 ); minx->icount -= 12; } }
271OP(FC) { INT8 d8 = rdop(minx); if ( ( minx->E & EXEC_X0 ) ) { CALL( minx, minx->PC + d8 - 1 ); minx->icount -= 12; } }
272OP(FD) { INT8 d8 = rdop(minx); if ( ( minx->E & EXEC_X1 ) ) { CALL( minx, minx->PC + d8 - 1 ); minx->icount -= 12; } }
273OP(FE) { INT8 d8 = rdop(minx); if ( ( minx->E & EXEC_X2 ) ) { CALL( minx, minx->PC + d8 - 1 ); minx->icount -= 12; } }
274OP(FF) { INT8 d8 = rdop(minx); if ( ( minx->E & EXEC_DZ ) ) { CALL( minx, minx->PC + d8 - 1 ); minx->icount -= 12; } }
275275
276static void (*const insnminx_CE[256])(void) = {
276static void (*const insnminx_CE[256])(minx_state *minx) = {
277277   minx_CE_00, minx_CE_01, minx_CE_02, minx_CE_03, minx_CE_04, minx_CE_05, minx_CE_06, minx_CE_07,
278278   minx_CE_08, minx_CE_09, minx_CE_0A, minx_CE_0B, minx_CE_0C, minx_CE_0D, minx_CE_0E, minx_CE_0F,
279279   minx_CE_10, minx_CE_11, minx_CE_12, minx_CE_13, minx_CE_14, minx_CE_15, minx_CE_16, minx_CE_17,
src/emu/cpu/minx/minxopcf.h
r5046r5047
11#undef OP
2#define OP(nn) INLINE void minx_CF_##nn(void)
2#define OP(nn) INLINE void minx_CF_##nn(minx_state *minx)
33
4OP(00) { regs.BA = ADD16( regs.BA, regs.BA ); }
5OP(01) { regs.BA = ADD16( regs.BA, regs.HL ); }
6OP(02) { regs.BA = ADD16( regs.BA, regs.X ); }
7OP(03) { regs.BA = ADD16( regs.BA, regs.Y ); }
8OP(04) { regs.BA = ADDC16( regs.BA, regs.BA ); }
9OP(05) { regs.BA = ADDC16( regs.BA, regs.HL ); }
10OP(06) { regs.BA = ADDC16( regs.BA, regs.X ); }
11OP(07) { regs.BA = ADDC16( regs.BA, regs.Y ); }
12OP(08) { regs.BA = SUB16( regs.BA, regs.BA ); }
13OP(09) { regs.BA = SUB16( regs.BA, regs.HL ); }
14OP(0A) { regs.BA = SUB16( regs.BA, regs.X ); }
15OP(0B) { regs.BA = SUB16( regs.BA, regs.Y ); }
16OP(0C) { regs.BA = SUBC16( regs.BA, regs.BA ); }
17OP(0D) { regs.BA = SUBC16( regs.BA, regs.HL ); }
18OP(0E) { regs.BA = SUBC16( regs.BA, regs.X ); }
19OP(0F) { regs.BA = SUBC16( regs.BA, regs.Y ); }
4OP(00) { minx->BA = ADD16( minx, minx->BA, minx->BA ); }
5OP(01) { minx->BA = ADD16( minx, minx->BA, minx->HL ); }
6OP(02) { minx->BA = ADD16( minx, minx->BA, minx->X ); }
7OP(03) { minx->BA = ADD16( minx, minx->BA, minx->Y ); }
8OP(04) { minx->BA = ADDC16( minx, minx->BA, minx->BA ); }
9OP(05) { minx->BA = ADDC16( minx, minx->BA, minx->HL ); }
10OP(06) { minx->BA = ADDC16( minx, minx->BA, minx->X ); }
11OP(07) { minx->BA = ADDC16( minx, minx->BA, minx->Y ); }
12OP(08) { minx->BA = SUB16( minx, minx->BA, minx->BA ); }
13OP(09) { minx->BA = SUB16( minx, minx->BA, minx->HL ); }
14OP(0A) { minx->BA = SUB16( minx, minx->BA, minx->X ); }
15OP(0B) { minx->BA = SUB16( minx, minx->BA, minx->Y ); }
16OP(0C) { minx->BA = SUBC16( minx, minx->BA, minx->BA ); }
17OP(0D) { minx->BA = SUBC16( minx, minx->BA, minx->HL ); }
18OP(0E) { minx->BA = SUBC16( minx, minx->BA, minx->X ); }
19OP(0F) { minx->BA = SUBC16( minx, minx->BA, minx->Y ); }
2020
2121OP(10) { /* illegal instruction? */ }
2222OP(11) { /* illegal instruction? */ }
r5046r5047
2626OP(15) { /* illegal instruction? */ }
2727OP(16) { /* illegal instruction? */ }
2828OP(17) { /* illegal instruction? */ }
29OP(18) { SUB16( regs.BA, regs.BA ); }
30OP(19) { SUB16( regs.BA, regs.HL ); }
31OP(1A) { SUB16( regs.BA, regs.X ); }
32OP(1B) { SUB16( regs.BA, regs.Y ); }
29OP(18) { SUB16( minx, minx->BA, minx->BA ); }
30OP(19) { SUB16( minx, minx->BA, minx->HL ); }
31OP(1A) { SUB16( minx, minx->BA, minx->X ); }
32OP(1B) { SUB16( minx, minx->BA, minx->Y ); }
3333OP(1C) { /* illegal instruction? */ }
3434OP(1D) { /* illegal instruction? */ }
3535OP(1E) { /* illegal instruction? */ }
3636OP(1F) { /* illegal instruction? */ }
3737
38OP(20) { regs.HL = ADD16( regs.HL, regs.BA ); }
39OP(21) { regs.HL = ADD16( regs.HL, regs.HL ); }
40OP(22) { regs.HL = ADD16( regs.HL, regs.X ); }
41OP(23) { regs.HL = ADD16( regs.HL, regs.Y ); }
42OP(24) { regs.HL = ADDC16( regs.HL, regs.BA ); }
43OP(25) { regs.HL = ADDC16( regs.HL, regs.HL ); }
44OP(26) { regs.HL = ADDC16( regs.HL, regs.X ); }
45OP(27) { regs.HL = ADDC16( regs.HL, regs.Y ); }
46OP(28) { regs.HL = SUB16( regs.HL, regs.BA ); }
47OP(29) { regs.HL = SUB16( regs.HL, regs.HL ); }
48OP(2A) { regs.HL = SUB16( regs.HL, regs.X ); }
49OP(2B) { regs.HL = SUB16( regs.HL, regs.Y ); }
50OP(2C) { regs.HL = SUBC16( regs.HL, regs.BA ); }
51OP(2D) { regs.HL = SUBC16( regs.HL, regs.HL ); }
52OP(2E) { regs.HL = SUBC16( regs.HL, regs.X ); }
53OP(2F) { regs.HL = SUBC16( regs.HL, regs.Y ); }
38OP(20) { minx->HL = ADD16( minx, minx->HL, minx->BA ); }
39OP(21) { minx->HL = ADD16( minx, minx->HL, minx->HL ); }
40OP(22) { minx->HL = ADD16( minx, minx->HL, minx->X ); }
41OP(23) { minx->HL = ADD16( minx, minx->HL, minx->Y ); }
42OP(24) { minx->HL = ADDC16( minx, minx->HL, minx->BA ); }
43OP(25) { minx->HL = ADDC16( minx, minx->HL, minx->HL ); }
44OP(26) { minx->HL = ADDC16( minx, minx->HL, minx->X ); }
45OP(27) { minx->HL = ADDC16( minx, minx->HL, minx->Y ); }
46OP(28) { minx->HL = SUB16( minx, minx->HL, minx->BA ); }
47OP(29) { minx->HL = SUB16( minx, minx->HL, minx->HL ); }
48OP(2A) { minx->HL = SUB16( minx, minx->HL, minx->X ); }
49OP(2B) { minx->HL = SUB16( minx, minx->HL, minx->Y ); }
50OP(2C) { minx->HL = SUBC16( minx, minx->HL, minx->BA ); }
51OP(2D) { minx->HL = SUBC16( minx, minx->HL, minx->HL ); }
52OP(2E) { minx->HL = SUBC16( minx, minx->HL, minx->X ); }
53OP(2F) { minx->HL = SUBC16( minx, minx->HL, minx->Y ); }
5454
5555OP(30) { /* illegal instruction? */ }
5656OP(31) { /* illegal instruction? */ }
r5046r5047
6060OP(35) { /* illegal instruction? */ }
6161OP(36) { /* illegal instruction? */ }
6262OP(37) { /* illegal instruction? */ }
63OP(38) { SUB16( regs.HL, regs.BA ); }
64OP(39) { SUB16( regs.HL, regs.HL ); }
65OP(3A) { SUB16( regs.HL, regs.X ); }
66OP(3B) { SUB16( regs.HL, regs.Y ); }
63OP(38) { SUB16( minx, minx->HL, minx->BA ); }
64OP(39) { SUB16( minx, minx->HL, minx->HL ); }
65OP(3A) { SUB16( minx, minx->HL, minx->X ); }
66OP(3B) { SUB16( minx, minx->HL, minx->Y ); }
6767OP(3C) { /* illegal instruction? */ }
6868OP(3D) { /* illegal instruction? */ }
6969OP(3E) { /* illegal instruction? */ }
7070OP(3F) { /* illegal instruction? */ }
7171
72OP(40) { regs.X = ADD16( regs.X, regs.BA ); }
73OP(41) { regs.X = ADD16( regs.X, regs.HL ); }
74OP(42) { regs.Y = ADD16( regs.Y, regs.BA ); }
75OP(43) { regs.Y = ADD16( regs.Y, regs.HL ); }
76OP(44) { regs.SP = ADD16( regs.SP, regs.BA ); }
77OP(45) { regs.SP = ADD16( regs.SP, regs.HL ); }
72OP(40) { minx->X = ADD16( minx, minx->X, minx->BA ); }
73OP(41) { minx->X = ADD16( minx, minx->X, minx->HL ); }
74OP(42) { minx->Y = ADD16( minx, minx->Y, minx->BA ); }
75OP(43) { minx->Y = ADD16( minx, minx->Y, minx->HL ); }
76OP(44) { minx->SP = ADD16( minx, minx->SP, minx->BA ); }
77OP(45) { minx->SP = ADD16( minx, minx->SP, minx->HL ); }
7878OP(46) { /* illegal instruction? */ }
7979OP(47) { /* illegal instruction? */ }
80OP(48) { regs.X = SUB16( regs.X, regs.BA ); }
81OP(49) { regs.X = SUB16( regs.X, regs.HL ); }
82OP(4A) { regs.Y = SUB16( regs.Y, regs.BA ); }
83OP(4B) { regs.Y = SUB16( regs.Y, regs.HL ); }
84OP(4C) { regs.SP = SUB16( regs.SP, regs.BA ); }
85OP(4D) { regs.SP = SUB16( regs.SP, regs.HL ); }
80OP(48) { minx->X = SUB16( minx, minx->X, minx->BA ); }
81OP(49) { minx->X = SUB16( minx, minx->X, minx->HL ); }
82OP(4A) { minx->Y = SUB16( minx, minx->Y, minx->BA ); }
83OP(4B) { minx->Y = SUB16( minx, minx->Y, minx->HL ); }
84OP(4C) { minx->SP = SUB16( minx, minx->SP, minx->BA ); }
85OP(4D) { minx->SP = SUB16( minx, minx->SP, minx->HL ); }
8686OP(4E) { /* illegal instruction? */ }
8787OP(4F) { /* illegal instruction? */ }
8888
r5046r5047
9898OP(59) { /* illegal instruction? */ }
9999OP(5A) { /* illegal instruction? */ }
100100OP(5B) { /* illegal instruction? */ }
101OP(5C) { SUB16( regs.SP, regs.BA ); }
102OP(5D) { SUB16( regs.SP, regs.HL ); }
101OP(5C) { SUB16( minx, minx->SP, minx->BA ); }
102OP(5D) { SUB16( minx, minx->SP, minx->HL ); }
103103OP(5E) { /* illegal instruction? */ }
104104OP(5F) { /* illegal instruction? */ }
105105
106OP(60) { ADDC16( regs.BA, rdop16() ); /* ??? */ }
107OP(61) { ADDC16( regs.HL, rdop16() ); /* ??? */ }
108OP(62) { ADDC16( regs.X, rdop16() ); /* ??? */ }
109OP(63) { ADDC16( regs.Y, rdop16() ); /* ??? */ }
106OP(60) { ADDC16( minx, minx->BA, rdop16(minx) ); /* ??? */ }
107OP(61) { ADDC16( minx, minx->HL, rdop16(minx) ); /* ??? */ }
108OP(62) { ADDC16( minx, minx->X, rdop16(minx) ); /* ??? */ }
109OP(63) { ADDC16( minx, minx->Y, rdop16(minx) ); /* ??? */ }
110110OP(64) { /* illegal instruction? */ }
111111OP(65) { /* illegal instruction? */ }
112112OP(66) { /* illegal instruction? */ }
113113OP(67) { /* illegal instruction? */ }
114OP(68) { regs.SP = ADD16( regs.SP, rdop16() ); }
114OP(68) { minx->SP = ADD16( minx, minx->SP, rdop16(minx) ); }
115115OP(69) { /* illegal instruction? */ }
116OP(6A) { regs.SP = SUB16( regs.SP, rdop16() ); }
116OP(6A) { minx->SP = SUB16( minx, minx->SP, rdop16(minx) ); }
117117OP(6B) { /* illegal instruction? */ }
118OP(6C) { SUB16( regs.SP, rdop16() ); }
118OP(6C) { SUB16( minx, minx->SP, rdop16(minx) ); }
119119OP(6D) { /* illegal instruction? */ }
120OP(6E) { regs.SP = rdop16(); }
120OP(6E) { minx->SP = rdop16(minx); }
121121OP(6F) { /* illegal instruction? */ }
122122
123OP(70) { UINT8 ofs8 = rdop(); regs.BA = rd16( regs.SP + ofs8 ); }
124OP(71) { UINT8 ofs8 = rdop(); regs.HL = rd16( regs.SP + ofs8 ); }
125OP(72) { UINT8 ofs8 = rdop(); regs.X = rd16( regs.SP + ofs8 ); }
126OP(73) { UINT8 ofs8 = rdop(); regs.Y = rd16( regs.SP + ofs8 ); }
127OP(74) { UINT8 ofs8 = rdop(); wr16( regs.SP + ofs8, regs.BA ); }
128OP(75) { UINT8 ofs8 = rdop(); wr16( regs.SP + ofs8, regs.HL ); }
129OP(76) { UINT8 ofs8 = rdop(); wr16( regs.SP + ofs8, regs.X ); }
130OP(77) { UINT8 ofs8 = rdop(); wr16( regs.SP + ofs8, regs.Y ); }
131OP(78) { AD2_I16; regs.SP = rd16( addr2 ); }
123OP(70) { UINT8 ofs8 = rdop(minx); minx->BA = rd16( minx, minx->SP + ofs8 ); }
124OP(71) { UINT8 ofs8 = rdop(minx); minx->HL = rd16( minx, minx->SP + ofs8 ); }
125OP(72) { UINT8 ofs8 = rdop(minx); minx->X = rd16( minx, minx->SP + ofs8 ); }
126OP(73) { UINT8 ofs8 = rdop(minx); minx->Y = rd16( minx, minx->SP + ofs8 ); }
127OP(74) { UINT8 ofs8 = rdop(minx); wr16( minx, minx->SP + ofs8, minx->BA ); }
128OP(75) { UINT8 ofs8 = rdop(minx); wr16( minx, minx->SP + ofs8, minx->HL ); }
129OP(76) { UINT8 ofs8 = rdop(minx); wr16( minx, minx->SP + ofs8, minx->X ); }
130OP(77) { UINT8 ofs8 = rdop(minx); wr16( minx, minx->SP + ofs8, minx->Y ); }
131OP(78) { AD2_I16; minx->SP = rd16( minx, addr2 ); }
132132OP(79) { /* illegal instruction? */ }
133133OP(7A) { /* illegal instruction? */ }
134134OP(7B) { /* illegal instruction? */ }
135OP(7C) { AD1_I16; wr16( addr1, regs.SP ); }
135OP(7C) { AD1_I16; wr16( minx, addr1, minx->SP ); }
136136OP(7D) { /* illegal instruction? */ }
137137OP(7E) { /* illegal instruction? */ }
138138OP(7F) { /* illegal instruction? */ }
r5046r5047
188188OP(AE) { /* illegal instruction? */ }
189189OP(AF) { /* illegal instruction? */ }
190190
191OP(B0) { PUSH8( regs.BA & 0x00FF ); }
192OP(B1) { PUSH8( regs.BA >> 8 ); }
193OP(B2) { PUSH8( regs.HL & 0x00FF ); }
194OP(B3) { PUSH8( regs.HL >> 8 ); }
195OP(B4) { regs.BA = ( regs.BA & 0xFF00 ) | POP8(); }
196OP(B5) { regs.BA = ( regs.BA & 0x00FF ) | ( POP8() << 8 ); }
197OP(B6) { regs.HL = ( regs.HL & 0xFF00 ) | POP8(); }
198OP(B7) { regs.HL = ( regs.HL & 0x00FF ) | ( POP8() << 8 ); }
199OP(B8) { PUSH16( regs.BA ); PUSH16( regs.HL ); PUSH16( regs.X ); PUSH16( regs.Y ); PUSH8( regs.N ); }
200OP(B9) { PUSH16( regs.BA ); PUSH16( regs.HL ); PUSH16( regs.X ); PUSH16( regs.Y ); PUSH8( regs.N ); PUSH8( regs.I ); PUSH8( regs.XI ); PUSH8( regs.YI ); }
191OP(B0) { PUSH8( minx, minx->BA & 0x00FF ); }
192OP(B1) { PUSH8( minx, minx->BA >> 8 ); }
193OP(B2) { PUSH8( minx, minx->HL & 0x00FF ); }
194OP(B3) { PUSH8( minx, minx->HL >> 8 ); }
195OP(B4) { minx->BA = ( minx->BA & 0xFF00 ) | POP8(minx); }
196OP(B5) { minx->BA = ( minx->BA & 0x00FF ) | ( POP8(minx) << 8 ); }
197OP(B6) { minx->HL = ( minx->HL & 0xFF00 ) | POP8(minx); }
198OP(B7) { minx->HL = ( minx->HL & 0x00FF ) | ( POP8(minx) << 8 ); }
199OP(B8) { PUSH16( minx, minx->BA ); PUSH16( minx, minx->HL ); PUSH16( minx, minx->X ); PUSH16( minx, minx->Y ); PUSH8( minx, minx->N ); }
200OP(B9) { PUSH16( minx, minx->BA ); PUSH16( minx, minx->HL ); PUSH16( minx, minx->X ); PUSH16( minx, minx->Y ); PUSH8( minx, minx->N ); PUSH8( minx, minx->I ); PUSH8( minx, minx->XI ); PUSH8( minx, minx->YI ); }
201201OP(BA) { /* illegal instruction? */ }
202202OP(BB) { /* illegal instruction? */ }
203OP(BC) { regs.N = POP8(); regs.Y = POP16(); regs.X = POP16(); regs.HL = POP16(); regs.BA = POP16(); }
204OP(BD) { regs.YI = POP8(); regs.XI = POP8(); regs.I = POP8(); regs.N = POP8(); regs.Y = POP16(); regs.X = POP16(); regs.HL = POP16(); regs.BA = POP16(); }
203OP(BC) { minx->N = POP8(minx); minx->Y = POP16(minx); minx->X = POP16(minx); minx->HL = POP16(minx); minx->BA = POP16(minx); }
204OP(BD) { minx->YI = POP8(minx); minx->XI = POP8(minx); minx->I = POP8(minx); minx->N = POP8(minx); minx->Y = POP16(minx); minx->X = POP16(minx); minx->HL = POP16(minx); minx->BA = POP16(minx); }
205205OP(BE) { /* illegal instruction? */ }
206206OP(BF) { /* illegal instruction? */ }
207207
208OP(C0) { AD2_IHL; regs.BA = rd16( addr2 ); }
209OP(C1) { AD2_IHL; regs.HL = rd16( addr2 ); }
210OP(C2) { AD2_IHL; regs.X = rd16( addr2 ); }
211OP(C3) { AD2_IHL; regs.Y = rd16( addr2 ); }
212OP(C4) { AD1_IHL; wr16( addr1, regs.BA ); }
213OP(C5) { AD1_IHL; wr16( addr1, regs.HL ); }
214OP(C6) { AD1_IHL; wr16( addr1, regs.X ); }
215OP(C7) { AD1_IHL; wr16( addr1, regs.Y ); }
208OP(C0) { AD2_IHL; minx->BA = rd16( minx, addr2 ); }
209OP(C1) { AD2_IHL; minx->HL = rd16( minx, addr2 ); }
210OP(C2) { AD2_IHL; minx->X = rd16( minx, addr2 ); }
211OP(C3) { AD2_IHL; minx->Y = rd16( minx, addr2 ); }
212OP(C4) { AD1_IHL; wr16( minx, addr1, minx->BA ); }
213OP(C5) { AD1_IHL; wr16( minx, addr1, minx->HL ); }
214OP(C6) { AD1_IHL; wr16( minx, addr1, minx->X ); }
215OP(C7) { AD1_IHL; wr16( minx, addr1, minx->Y ); }
216216OP(C8) { /* illegal instruction? */ }
217217OP(C9) { /* illegal instruction? */ }
218218OP(CA) { /* illegal instruction? */ }
r5046r5047
222222OP(CE) { /* illegal instruction? */ }
223223OP(CF) { /* illegal instruction? */ }
224224
225OP(D0) { AD2_XIX; regs.BA = rd16( addr2 ); }
226OP(D1) { AD2_XIX; regs.HL = rd16( addr2 ); }
227OP(D2) { AD2_XIX; regs.X = rd16( addr2 ); }
228OP(D3) { AD2_XIX; regs.Y = rd16( addr2 ); }
229OP(D4) { AD1_XIX; wr16( addr1, regs.BA ); }
230OP(D5) { AD1_XIX; wr16( addr1, regs.HL ); }
231OP(D6) { AD1_XIX; wr16( addr1, regs.X ); }
232OP(D7) { AD1_XIX; wr16( addr1, regs.Y ); }
233OP(D8) { AD2_YIY; regs.BA = rd16( addr2 ); }
234OP(D9) { AD2_YIY; regs.HL = rd16( addr2 ); }
235OP(DA) { AD2_YIY; regs.X = rd16( addr2 ); }
236OP(DB) { AD2_YIY; regs.Y = rd16( addr2 ); }
237OP(DC) { AD1_YIY; wr16( addr1, regs.BA ); }
238OP(DD) { AD1_YIY; wr16( addr1, regs.HL ); }
239OP(DE) { AD1_YIY; wr16( addr1, regs.X ); }
240OP(DF) { AD1_YIY; wr16( addr1, regs.Y ); }
225OP(D0) { AD2_XIX; minx->BA = rd16( minx, addr2 ); }
226OP(D1) { AD2_XIX; minx->HL = rd16( minx, addr2 ); }
227OP(D2) { AD2_XIX; minx->X = rd16( minx, addr2 ); }
228OP(D3) { AD2_XIX; minx->Y = rd16( minx, addr2 ); }
229OP(D4) { AD1_XIX; wr16( minx, addr1, minx->BA ); }
230OP(D5) { AD1_XIX; wr16( minx, addr1, minx->HL ); }
231OP(D6) { AD1_XIX; wr16( minx, addr1, minx->X ); }
232OP(D7) { AD1_XIX; wr16( minx, addr1, minx->Y ); }
233OP(D8) { AD2_YIY; minx->BA = rd16( minx, addr2 ); }
234OP(D9) { AD2_YIY; minx->HL = rd16( minx, addr2 ); }
235OP(DA) { AD2_YIY; minx->X = rd16( minx, addr2 ); }
236OP(DB) { AD2_YIY; minx->Y = rd16( minx, addr2 ); }
237OP(DC) { AD1_YIY; wr16( minx, addr1, minx->BA ); }
238OP(DD) { AD1_YIY; wr16( minx, addr1, minx->HL ); }
239OP(DE) { AD1_YIY; wr16( minx, addr1, minx->X ); }
240OP(DF) { AD1_YIY; wr16( minx, addr1, minx->Y ); }
241241
242OP(E0) { regs.BA = regs.BA; }
243OP(E1) { regs.BA = regs.HL; }
244OP(E2) { regs.BA = regs.X; }
245OP(E3) { regs.BA = regs.Y; }
246OP(E4) { regs.HL = regs.BA; }
247OP(E5) { regs.HL = regs.HL; }
248OP(E6) { regs.HL = regs.X; }
249OP(E7) { regs.HL = regs.Y; }
250OP(E8) { regs.X = regs.BA; }
251OP(E9) { regs.X = regs.HL; }
252OP(EA) { regs.X = regs.X; }
253OP(EB) { regs.X = regs.Y; }
254OP(EC) { regs.Y = regs.BA; }
255OP(ED) { regs.Y = regs.HL; }
256OP(EE) { regs.Y = regs.X; }
257OP(EF) { regs.Y = regs.Y; }
242OP(E0) { minx->BA = minx->BA; }
243OP(E1) { minx->BA = minx->HL; }
244OP(E2) { minx->BA = minx->X; }
245OP(E3) { minx->BA = minx->Y; }
246OP(E4) { minx->HL = minx->BA; }
247OP(E5) { minx->HL = minx->HL; }
248OP(E6) { minx->HL = minx->X; }
249OP(E7) { minx->HL = minx->Y; }
250OP(E8) { minx->X = minx->BA; }
251OP(E9) { minx->X = minx->HL; }
252OP(EA) { minx->X = minx->X; }
253OP(EB) { minx->X = minx->Y; }
254OP(EC) { minx->Y = minx->BA; }
255OP(ED) { minx->Y = minx->HL; }
256OP(EE) { minx->Y = minx->X; }
257OP(EF) { minx->Y = minx->Y; }
258258
259OP(F0) { regs.SP = regs.BA; }
260OP(F1) { regs.SP = regs.HL; }
261OP(F2) { regs.SP = regs.X; }
262OP(F3) { regs.SP = regs.Y; }
263OP(F4) { regs.HL = regs.SP; }
264OP(F5) { regs.HL = regs.PC; }
259OP(F0) { minx->SP = minx->BA; }
260OP(F1) { minx->SP = minx->HL; }
261OP(F2) { minx->SP = minx->X; }
262OP(F3) { minx->SP = minx->Y; }
263OP(F4) { minx->HL = minx->SP; }
264OP(F5) { minx->HL = minx->PC; }
265265OP(F6) { /* illegal instruction? */ }
266266OP(F7) { /* illegal instruction? */ }
267OP(F8) { regs.BA = regs.SP; }
268OP(F9) { regs.BA = regs.PC; }
269OP(FA) { regs.X = regs.SP; }
267OP(F8) { minx->BA = minx->SP; }
268OP(F9) { minx->BA = minx->PC; }
269OP(FA) { minx->X = minx->SP; }
270270OP(FB) { /* illegal instruction? */ }
271271OP(FC) { /* illegal instruction? */ }
272272OP(FD) { /* illegal instruction? */ }
273OP(FE) { regs.Y = regs.SP; }
273OP(FE) { minx->Y = minx->SP; }
274274OP(FF) { /* illegal instruction? */ }
275275
276static void (*const insnminx_CF[256])(void) = {
276static void (*const insnminx_CF[256])(minx_state *minx) = {
277277   minx_CF_00, minx_CF_01, minx_CF_02, minx_CF_03, minx_CF_04, minx_CF_05, minx_CF_06, minx_CF_07,
278278   minx_CF_08, minx_CF_09, minx_CF_0A, minx_CF_0B, minx_CF_0C, minx_CF_0D, minx_CF_0E, minx_CF_0F,
279279   minx_CF_10, minx_CF_11, minx_CF_12, minx_CF_13, minx_CF_14, minx_CF_15, minx_CF_16, minx_CF_17,
src/emu/cpu/minx/minx.c
r5046r5047
8585   cpu_irq_callback irq_callback;
8686   const device_config *device;
8787   const address_space *program;
88} minx_regs;
88   int icount;
89} minx_state;
8990
90static minx_regs regs;
91static int minx_icount;
91#define RD(offset)      memory_read_byte_8be( minx->program, offset )
92#define WR(offset,data)   memory_write_byte_8be( minx->program, offset, data )
93#define GET_MINX_PC      ( ( minx->PC & 0x8000 ) ? ( minx->V << 15 ) | (minx->PC & 0x7FFF ) : minx->PC )
9294
93#define RD(offset)      memory_read_byte_8be( regs.program, offset )
94#define WR(offset,data)   memory_write_byte_8be( regs.program, offset, data )
95#define GET_MINX_PC      ( ( regs.PC & 0x8000 ) ? ( regs.V << 15 ) | (regs.PC & 0x7FFF ) : regs.PC )
95INLINE minx_state *get_safe_token(const device_config *device)
96{
97   assert(device != NULL);
98   assert(device->token != NULL);
99   assert(device->type == CPU);
100   assert(cpu_get_type(device) == CPU_MINX);
96101
102   return (minx_state *)device->token;
103}
97104
98INLINE UINT16 rd16( UINT32 offset )
105INLINE UINT16 rd16( minx_state *minx, UINT32 offset )
99106{
100107   return RD( offset ) | ( RD( offset + 1 ) << 8 );
101108}
102109
103110
104INLINE void wr16( UINT32 offset, UINT16 data )
111INLINE void wr16( minx_state *minx, UINT32 offset, UINT16 data )
105112{
106113   WR( offset, ( data & 0x00FF ) );
107114   WR( offset + 1, ( data >> 8 ) );
r5046r5047
110117
111118static CPU_INIT( minx )
112119{
113   regs.irq_callback = irqcallback;
114   regs.device = device;
115   regs.program = memory_find_address_space(device, ADDRESS_SPACE_PROGRAM);
120   minx_state *minx = get_safe_token(device);
121   minx->irq_callback = irqcallback;
122   minx->device = device;
123   minx->program = memory_find_address_space(device, ADDRESS_SPACE_PROGRAM);
116124   if ( device->static_config != NULL )
117125   {
118126   }
r5046r5047
124132
125133static CPU_RESET( minx )
126134{
127   regs.SP = regs.BA = regs.HL = regs.X = regs.Y = 0;
128   regs.U = regs.V = regs.F = regs.E = regs.I = regs.XI = regs.YI = 0;
129   regs.halted = regs.interrupt_pending = 0;
135   minx_state *minx = get_safe_token(device);
136   minx->SP = minx->BA = minx->HL = minx->X = minx->Y = 0;
137   minx->U = minx->V = minx->F = minx->E = minx->I = minx->XI = minx->YI = 0;
138   minx->halted = minx->interrupt_pending = 0;
130139
131   regs.PC = rd16( 0 );
140   minx->PC = rd16( minx, 0 );
132141}
133142
134143
r5046r5047
137146}
138147
139148
140INLINE UINT8 rdop( void )
149INLINE UINT8 rdop( minx_state *minx )
141150{
142151   UINT8 op = RD( GET_MINX_PC );
143   regs.PC++;
152   minx->PC++;
144153   return op;
145154}
146155
147156
148INLINE UINT16 rdop16( void )
157INLINE UINT16 rdop16( minx_state *minx )
149158{
150   UINT16 op = rdop();
151   op = op | ( rdop() << 8 );
159   UINT16 op = rdop(minx);
160   op = op | ( rdop(minx) << 8 );
152161   return op;
153162}
154163
r5046r5047
163172{
164173   UINT32   oldpc;
165174   UINT8   op;
175   minx_state *minx = get_safe_token(device);
166176
167   minx_icount = cycles;
177   minx->icount = cycles;
168178
169179   do
170180   {
171181      debugger_instruction_hook(device, GET_MINX_PC);
172182      oldpc = GET_MINX_PC;
173183
174      if ( regs.interrupt_pending )
184      if ( minx->interrupt_pending )
175185      {
176         regs.halted = 0;
177         if ( ! ( regs.F & 0xc0 ) && regs.U == regs.V )
186         minx->halted = 0;
187         if ( ! ( minx->F & 0xc0 ) && minx->U == minx->V )
178188         {
179189            //logerror("minx_execute(): taking IRQ\n");
180            PUSH8( regs.V );
181            PUSH16( regs.PC );
182            PUSH8( regs.F );
190            PUSH8( minx, minx->V );
191            PUSH16( minx, minx->PC );
192            PUSH8( minx, minx->F );
183193
184194            /* Set Interrupt Branch flag */
185            regs.F |= 0x80;
186            regs.V = 0;
187            regs.PC = rd16( regs.irq_callback( regs.device, 0 ) << 1 );
188            minx_icount -= 28;      /* This cycle count is a guess */
195            minx->F |= 0x80;
196            minx->V = 0;
197            minx->PC = rd16( minx, minx->irq_callback( minx->device, 0 ) << 1 );
198            minx->icount -= 28;      /* This cycle count is a guess */
189199         }
190200      }
191201
192      if ( regs.halted )
202      if ( minx->halted )
193203      {
194         minx_icount -= insnminx_cycles_CE[0xAE];
204         minx->icount -= insnminx_cycles_CE[0xAE];
195205      }
196206      else
197207      {
198         op = rdop();
199         insnminx[op]();
200         minx_icount -= insnminx_cycles[op];
208         op = rdop(minx);
209         insnminx[op](minx);
210         minx->icount -= insnminx_cycles[op];
201211      }
202   } while ( minx_icount > 0 );
203   return cycles - minx_icount;
212   } while ( minx->icount > 0 );
213   return cycles - minx->icount;
204214}
205215
206216
207217static CPU_BURN( minx )
208218{
209   minx_icount = 0;
219   minx_state *minx = get_safe_token(device);
220   minx->icount = 0;
210221}
211222
212223
213static unsigned minx_get_reg( int regnum )
224static unsigned minx_get_reg( minx_state *minx, int regnum )
214225{
215226   switch( regnum )
216227   {
217228   case REG_GENPC:   return GET_MINX_PC;
218   case MINX_PC:   return regs.PC;
229   case MINX_PC:   return minx->PC;
219230   case REG_GENSP:
220   case MINX_SP:   return regs.SP;
221   case MINX_BA:   return regs.BA;
222   case MINX_HL:   return regs.HL;
223   case MINX_X:   return regs.X;
224   case MINX_Y:   return regs.Y;
225   case MINX_U:   return regs.U;
226   case MINX_V:   return regs.V;
227   case MINX_F:   return regs.F;
228   case MINX_E:   return regs.E;
229   case MINX_N:   return regs.N;
230   case MINX_I:   return regs.I;
231   case MINX_XI:   return regs.XI;
232   case MINX_YI:   return regs.YI;
231   case MINX_SP:   return minx->SP;
232   case MINX_BA:   return minx->BA;
233   case MINX_HL:   return minx->HL;
234   case MINX_X:   return minx->X;
235   case MINX_Y:   return minx->Y;
236   case MINX_U:   return minx->U;
237   case MINX_V:   return minx->V;
238   case MINX_F:   return minx->F;
239   case MINX_E:   return minx->E;
240   case MINX_N:   return minx->N;
241   case MINX_I:   return minx->I;
242   case MINX_XI:   return minx->XI;
243   case MINX_YI:   return minx->YI;
233244   }
234245   return 0;
235246}
236247
237248
238static void minx_set_reg( int regnum, unsigned val )
249static void minx_set_reg( minx_state *minx, int regnum, unsigned val )
239250{
240251   switch( regnum )
241252   {
242253   case REG_GENPC:   break;
243   case MINX_PC:   regs.PC = val; break;
254   case MINX_PC:   minx->PC = val; break;
244255   case REG_GENSP:
245   case MINX_SP:   regs.SP = val; break;
246   case MINX_BA:   regs.BA = val; break;
247   case MINX_HL:   regs.HL = val; break;
248   case MINX_X:   regs.X = val; break;
249   case MINX_Y:   regs.Y = val; break;
250   case MINX_U:   regs.U = val; break;
251   case MINX_V:   regs.V = val; break;
252   case MINX_F:   regs.F = val; break;
253   case MINX_E:   regs.E = val; break;
254   case MINX_N:   regs.N = val; break;
255   case MINX_I:   regs.I = val; break;
256   case MINX_XI:   regs.XI = val; break;
257   case MINX_YI:   regs.YI = val; break;
256   case MINX_SP:   minx->SP = val; break;
257   case MINX_BA:   minx->BA = val; break;
258   case MINX_HL:   minx->HL = val; break;
259   case MINX_X:   minx->X = val; break;
260   case MINX_Y:   minx->Y = val; break;
261   case MINX_U:   minx->U = val; break;
262   case MINX_V:   minx->V = val; break;
263   case MINX_F:   minx->F = val; break;
264   case MINX_E:   minx->E = val; break;
265   case MINX_N:   minx->N = val; break;
266   case MINX_I:   minx->I = val; break;
267   case MINX_XI:   minx->XI = val; break;
268   case MINX_YI:   minx->YI = val; break;
258269   }
259270}
260271
261272
262static void minx_set_irq_line( int irqline, int state )
273static void minx_set_irq_line( minx_state *minx, int irqline, int state )
263274{
264275   if ( state == ASSERT_LINE )
265276   {
266      regs.interrupt_pending = 1;
277      minx->interrupt_pending = 1;
267278   }
268279   else
269280   {
270      regs.interrupt_pending = 0;
281      minx->interrupt_pending = 0;
271282   }
272283}
273284
274285
275286static CPU_SET_INFO( minx )
276287{
288   minx_state *minx = get_safe_token(device);
277289   switch( state )
278290   {
279291   case CPUINFO_INT_INPUT_STATE + 0:
280      minx_set_irq_line( state - CPUINFO_INT_INPUT_STATE, info->i ); break;
292      minx_set_irq_line( minx, state - CPUINFO_INT_INPUT_STATE, info->i ); break;
281293
282294   case CPUINFO_INT_REGISTER + MINX_PC:
283295   case CPUINFO_INT_REGISTER + MINX_SP:
r5046r5047
293305   case CPUINFO_INT_REGISTER + MINX_I:
294306   case CPUINFO_INT_REGISTER + MINX_XI:
295307   case CPUINFO_INT_REGISTER + MINX_YI:
296      minx_set_reg( state - CPUINFO_INT_REGISTER, info->i ); break;
308      minx_set_reg( minx, state - CPUINFO_INT_REGISTER, info->i ); break;
297309   }
298310}
299311
300312
301313CPU_GET_INFO( minx )
302314{
315   minx_state *minx = (device != NULL && device->token != NULL) ? get_safe_token(device) : NULL;
303316   switch( state )
304317   {
305   case CPUINFO_INT_CONTEXT_SIZE:                        info->i = sizeof(minx_regs); break;
318   case CPUINFO_INT_CONTEXT_SIZE:                        info->i = sizeof(minx_state); break;
306319   case CPUINFO_INT_INPUT_LINES:                        info->i = 1; break;
307320   case CPUINFO_INT_DEFAULT_IRQ_VECTOR:                  info->i = 0x00; break;
308321   case CPUINFO_INT_ENDIANNESS:                        info->i = ENDIANNESS_BIG; break;
r5046r5047
337350   case CPUINFO_INT_REGISTER + MINX_N:
338351   case CPUINFO_INT_REGISTER + MINX_I:
339352   case CPUINFO_INT_REGISTER + MINX_XI:
340   case CPUINFO_INT_REGISTER + MINX_YI:                  info->i = minx_get_reg( state - CPUINFO_INT_REGISTER ); break;
353   case CPUINFO_INT_REGISTER + MINX_YI:                  info->i = minx_get_reg( minx, state - CPUINFO_INT_REGISTER ); break;
341354   case CPUINFO_INT_PREVIOUSPC:                        info->i = 0x0000; break;
342355   case CPUINFO_FCT_SET_INFO:                           info->setinfo = CPU_SET_INFO_NAME(minx); break;
343356   case CPUINFO_FCT_INIT:                              info->init = CPU_INIT_NAME(minx); break;
r5046r5047
346359   case CPUINFO_FCT_EXECUTE:                           info->execute = CPU_EXECUTE_NAME(minx); break;
347360   case CPUINFO_FCT_BURN:                              info->burn = CPU_BURN_NAME(minx); break;
348361   case CPUINFO_FCT_DISASSEMBLE:                        info->disassemble = CPU_DISASSEMBLE_NAME(minx); break;
349   case CPUINFO_PTR_INSTRUCTION_COUNTER:                  info->icount = &minx_icount; break;
362   case CPUINFO_PTR_INSTRUCTION_COUNTER:                  info->icount = &minx->icount; break;
350363   case CPUINFO_STR_NAME:                              strcpy( info->s, "Minx" ); break;
351364   case CPUINFO_STR_CORE_FAMILY:                        strcpy( info->s, "Nintendo Minx" ); break;
352365   case CPUINFO_STR_CORE_VERSION:                        strcpy( info->s, "0.1" ); break;
r5046r5047
354367   case CPUINFO_STR_CORE_CREDITS:                        strcpy( info->s, "Copyright The MESS Team." ); break;
355368   case CPUINFO_STR_FLAGS:
356369      sprintf( info->s, "%c%c%c%c%c%c%c%c-%c%c%c%c%c",
357         regs.F & FLAG_I ? 'I' : '.',
358         regs.F & FLAG_D ? 'D' : '.',
359         regs.F & FLAG_L ? 'L' : '.',
360         regs.F & FLAG_B ? 'B' : '.',
361         regs.F & FLAG_S ? 'S' : '.',
362         regs.F & FLAG_O ? 'O' : '.',
363         regs.F & FLAG_C ? 'C' : '.',
364         regs.F & FLAG_Z ? 'Z' : '.',
365         regs.E & EXEC_X0 ? '0' : '.',
366         regs.E & EXEC_X1 ? '1' : '.',
367         regs.E & EXEC_X2 ? '2' : '.',
368         regs.E & EXEC_DZ ? 'z' : '.',
369         regs.E & EXEC_EN ? 'E' : '.' );
370         minx->F & FLAG_I ? 'I' : '.',
371         minx->F & FLAG_D ? 'D' : '.',
372         minx->F & FLAG_L ? 'L' : '.',
373         minx->F & FLAG_B ? 'B' : '.',
374         minx->F & FLAG_S ? 'S' : '.',
375         minx->F & FLAG_O ? 'O' : '.',
376         minx->F & FLAG_C ? 'C' : '.',
377         minx->F & FLAG_Z ? 'Z' : '.',
378         minx->E & EXEC_X0 ? '0' : '.',
379         minx->E & EXEC_X1 ? '1' : '.',
380         minx->E & EXEC_X2 ? '2' : '.',
381         minx->E & EXEC_DZ ? 'z' : '.',
382         minx->E & EXEC_EN ? 'E' : '.' );
370383      break;
371   case CPUINFO_STR_REGISTER + MINX_PC:                  sprintf( info->s, "PC:%04X", regs.PC ); break;
372   case CPUINFO_STR_REGISTER + MINX_SP:                  sprintf( info->s, "SP:%04X", regs.SP ); break;
373   case CPUINFO_STR_REGISTER + MINX_BA:                  sprintf( info->s, "BA:%04X", regs.BA ); break;
374   case CPUINFO_STR_REGISTER + MINX_HL:                  sprintf( info->s, "HL:%04X", regs.HL ); break;
375   case CPUINFO_STR_REGISTER + MINX_X:                     sprintf( info->s, "X:%04X", regs.X ); break;
376   case CPUINFO_STR_REGISTER + MINX_Y:                     sprintf( info->s, "Y:%04X", regs.Y ); break;
377   case CPUINFO_STR_REGISTER + MINX_U:                     sprintf( info->s, "U:%02X", regs.U ); break;
378   case CPUINFO_STR_REGISTER + MINX_V:                     sprintf( info->s, "V:%02X", regs.V ); break;
379   case CPUINFO_STR_REGISTER + MINX_F:                     sprintf( info->s, "F:%02X", regs.F ); break;
380   case CPUINFO_STR_REGISTER + MINX_E:                     sprintf( info->s, "E:%02X", regs.E ); break;
381   case CPUINFO_STR_REGISTER + MINX_N:                     sprintf( info->s, "N:%02X", regs.N ); break;
382   case CPUINFO_STR_REGISTER + MINX_I:                     sprintf( info->s, "I:%02X", regs.I ); break;
383   case CPUINFO_STR_REGISTER + MINX_XI:                  sprintf( info->s, "XI:%02X", regs.XI ); break;
384   case CPUINFO_STR_REGISTER + MINX_YI:                  sprintf( info->s, "YI:%02X", regs.YI ); break;
384   case CPUINFO_STR_REGISTER + MINX_PC:                  sprintf( info->s, "PC:%04X", minx->PC ); break;
385   case CPUINFO_STR_REGISTER + MINX_SP:                  sprintf( info->s, "SP:%04X", minx->SP ); break;
386   case CPUINFO_STR_REGISTER + MINX_BA:                  sprintf( info->s, "BA:%04X", minx->BA ); break;
387   case CPUINFO_STR_REGISTER + MINX_HL:                  sprintf( info->s, "HL:%04X", minx->HL ); break;
388   case CPUINFO_STR_REGISTER + MINX_X:                     sprintf( info->s, "X:%04X", minx->X ); break;
389   case CPUINFO_STR_REGISTER + MINX_Y:                     sprintf( info->s, "Y:%04X", minx->Y ); break;
390   case CPUINFO_STR_REGISTER + MINX_U:                     sprintf( info->s, "U:%02X", minx->U ); break;
391   case CPUINFO_STR_REGISTER + MINX_V:                     sprintf( info->s, "V:%02X", minx->V ); break;
392   case CPUINFO_STR_REGISTER + MINX_F:                     sprintf( info->s, "F:%02X", minx->F ); break;
393   case CPUINFO_STR_REGISTER + MINX_E:                     sprintf( info->s, "E:%02X", minx->E ); break;
394   case CPUINFO_STR_REGISTER + MINX_N:                     sprintf( info->s, "N:%02X", minx->N ); break;
395   case CPUINFO_STR_REGISTER + MINX_I:                     sprintf( info->s, "I:%02X", minx->I ); break;
396   case CPUINFO_STR_REGISTER + MINX_XI:                  sprintf( info->s, "XI:%02X", minx->XI ); break;
397   case CPUINFO_STR_REGISTER + MINX_YI:                  sprintf( info->s, "YI:%02X", minx->YI ); break;
385398   }
386399}
387400
src/emu/cpu/minx/minxfunc.h
r5046r5047
1INLINE UINT8 ADD8( UINT8 arg1, UINT8 arg2 )
1INLINE UINT8 ADD8( minx_state *minx, UINT8 arg1, UINT8 arg2 )
22{
33   UINT32 res = arg1 + arg2;
4   regs.F = ( regs.F & ~ ( FLAG_S | FLAG_O | FLAG_C | FLAG_Z ) )
4   minx->F = ( minx->F & ~ ( FLAG_S | FLAG_O | FLAG_C | FLAG_Z ) )
55      | ( ( res & 0x80 ) ? FLAG_S : 0 )
66      | ( ( ( arg2 ^ arg1 ^ 0x80 ) & ( arg2 ^ res ) & 0x80 ) ? FLAG_O : 0 )
77      | ( ( res & 0xFF00 ) ? FLAG_C : 0 )
r5046r5047
1111}
1212
1313
14INLINE UINT16 ADD16( UINT16 arg1, UINT16 arg2 )
14INLINE UINT16 ADD16( minx_state *minx, UINT16 arg1, UINT16 arg2 )
1515{
1616   UINT32 res = arg1 + arg2;
17   regs.F = ( regs.F & ~ ( FLAG_S | FLAG_O | FLAG_C | FLAG_Z ) )
17   minx->F = ( minx->F & ~ ( FLAG_S | FLAG_O | FLAG_C | FLAG_Z ) )
1818      | ( ( res & 0x8000 ) ? FLAG_S : 0 )
1919      | ( ( ( arg2 ^ arg1 ^ 0x8000 ) & ( arg2 ^ res ) & 0x8000 ) ? FLAG_O : 0 )
2020      | ( ( res & 0xFF0000 ) ? FLAG_C : 0 )
r5046r5047
2424}
2525
2626
27INLINE UINT8 ADDC8( UINT8 arg1, UINT8 arg2 )
27INLINE UINT8 ADDC8( minx_state *minx, UINT8 arg1, UINT8 arg2 )
2828{
29        UINT32 res = arg1 + arg2 + ( ( regs.F & FLAG_C ) ? 1 : 0 );
30   regs.F = ( regs.F & ~ ( FLAG_S | FLAG_O | FLAG_C | FLAG_Z ) )
29        UINT32 res = arg1 + arg2 + ( ( minx->F & FLAG_C ) ? 1 : 0 );
30   minx->F = ( minx->F & ~ ( FLAG_S | FLAG_O | FLAG_C | FLAG_Z ) )
3131      | ( ( res & 0x80 ) ? FLAG_S : 0 )
3232      | ( ( ( arg2 ^ arg1 ^ 0x80 ) & ( arg2 ^ res ) & 0x80 ) ? FLAG_O : 0 )
3333      | ( ( res & 0xFF00 ) ? FLAG_C : 0 )
r5046r5047
3737}
3838
3939
40INLINE UINT16 ADDC16( UINT16 arg1, UINT16 arg2 )
40INLINE UINT16 ADDC16( minx_state *minx, UINT16 arg1, UINT16 arg2 )
4141{
42   UINT32 res = arg1 + arg2 + ( ( regs.F & FLAG_C ) ? 1 : 0 );
43   regs.F = ( regs.F & ~ ( FLAG_S | FLAG_O | FLAG_C | FLAG_Z ) )
42   UINT32 res = arg1 + arg2 + ( ( minx->F & FLAG_C ) ? 1 : 0 );
43   minx->F = ( minx->F & ~ ( FLAG_S | FLAG_O | FLAG_C | FLAG_Z ) )
4444      | ( ( res & 0x8000 ) ? FLAG_S : 0 )
4545      | ( ( ( arg2 ^ arg1 ^ 0x8000 ) & ( arg2 ^ res ) & 0x8000 ) ? FLAG_O : 0 )
4646      | ( ( res & 0xFF0000 ) ? FLAG_C : 0 )
r5046r5047
5050}
5151
5252
53INLINE UINT8 INC8( UINT8 arg )
53INLINE UINT8 INC8( minx_state *minx, UINT8 arg )
5454{
55   UINT8 old_F = regs.F;
56   UINT8 res = ADD8( arg, 1 );
57   regs.F = ( old_F & ~ ( FLAG_Z ) )
55   UINT8 old_F = minx->F;
56   UINT8 res = ADD8( minx, arg, 1 );
57   minx->F = ( old_F & ~ ( FLAG_Z ) )
5858      | ( ( res ) ? 0 : FLAG_Z )
5959   ;
6060   return res;
6161}
6262
6363
64INLINE UINT16 INC16( UINT16 arg )
64INLINE UINT16 INC16( minx_state *minx, UINT16 arg )
6565{
66   UINT8 old_F = regs.F;
67   UINT16 res = ADD16( arg, 1 );
68   regs.F = ( old_F & ~ ( FLAG_Z ) )
66   UINT8 old_F = minx->F;
67   UINT16 res = ADD16( minx, arg, 1 );
68   minx->F = ( old_F & ~ ( FLAG_Z ) )
6969      | ( ( res ) ? 0 : FLAG_Z )
7070   ;
7171   return res;
7272}
7373
7474
75INLINE UINT8 SUB8( UINT8 arg1, UINT8 arg2 )
75INLINE UINT8 SUB8( minx_state *minx, UINT8 arg1, UINT8 arg2 )
7676{
7777   UINT32 res = arg1 - arg2;
78   regs.F = ( regs.F & ~ ( FLAG_S | FLAG_O | FLAG_C | FLAG_Z ) )
78   minx->F = ( minx->F & ~ ( FLAG_S | FLAG_O | FLAG_C | FLAG_Z ) )
7979      | ( ( res & 0x80 ) ? FLAG_S : 0 )
8080      | ( ( ( arg2 ^ arg1 ) & ( arg1 ^ res ) & 0x80 ) ? FLAG_O : 0 )
8181      | ( ( res & 0xFF00 ) ? FLAG_C : 0 )
r5046r5047
8585}
8686
8787
88INLINE UINT16 SUB16( UINT16 arg1, UINT16 arg2 )
88INLINE UINT16 SUB16( minx_state *minx, UINT16 arg1, UINT16 arg2 )
8989{
9090   UINT32 res = arg1 - arg2;
91   regs.F = ( regs.F & ~ ( FLAG_S | FLAG_O | FLAG_C | FLAG_Z ) )
91   minx->F = ( minx->F & ~ ( FLAG_S | FLAG_O | FLAG_C | FLAG_Z ) )
9292      | ( ( res & 0x8000 ) ? FLAG_S : 0 )
9393      | ( ( ( arg2 ^ arg1 ) & ( arg1 ^ res ) & 0x8000 ) ? FLAG_O : 0 )
9494      | ( ( res & 0xFF0000 ) ? FLAG_C : 0 )
r5046r5047
9898}
9999
100100
101INLINE UINT8 SUBC8( UINT8 arg1, UINT8 arg2 )
101INLINE UINT8 SUBC8( minx_state *minx, UINT8 arg1, UINT8 arg2 )
102102{
103   UINT32 res = arg1 - arg2 - ( ( regs.F & FLAG_C ) ? 1 : 0 );
104   regs.F = ( regs.F & ~ ( FLAG_S | FLAG_O | FLAG_C | FLAG_Z ) )
103   UINT32 res = arg1 - arg2 - ( ( minx->F & FLAG_C ) ? 1 : 0 );
104   minx->F = ( minx->F & ~ ( FLAG_S | FLAG_O | FLAG_C | FLAG_Z ) )
105105      | ( ( res & 0x80 ) ? FLAG_S : 0 )
106106      | ( ( ( arg2 ^ arg1 ) & ( arg1 ^ res ) & 0x80 ) ? FLAG_O : 0 )
107107      | ( ( res & 0xFF00 ) ? FLAG_C : 0 )
r5046r5047
111111}
112112
113113
114INLINE UINT16 SUBC16( UINT16 arg1, UINT16 arg2 )
114INLINE UINT16 SUBC16( minx_state *minx, UINT16 arg1, UINT16 arg2 )
115115{
116   UINT32 res = arg1 - arg2 - ( ( regs.F & FLAG_C ) ? 1 : 0 );
117   regs.F = ( regs.F & ~ ( FLAG_S | FLAG_O | FLAG_C | FLAG_Z ) )
116   UINT32 res = arg1 - arg2 - ( ( minx->F & FLAG_C ) ? 1 : 0 );
117   minx->F = ( minx->F & ~ ( FLAG_S | FLAG_O | FLAG_C | FLAG_Z ) )
118118      | ( ( res & 0x8000 ) ? FLAG_S : 0 )
119119      | ( ( ( arg2 ^ arg1 ) & ( arg1 ^ res ) & 0x8000 ) ? FLAG_O : 0 )
120120      | ( ( res & 0xFF0000 ) ? FLAG_C : 0 )
r5046r5047
124124}
125125
126126
127INLINE UINT8 DEC8( UINT8 arg )
127INLINE UINT8 DEC8( minx_state *minx, UINT8 arg )
128128{
129   UINT8 old_F = regs.F;
130   UINT8 res = SUB8( arg, 1 );
131   regs.F = ( old_F & ~ ( FLAG_Z ) )
129   UINT8 old_F = minx->F;
130   UINT8 res = SUB8( minx, arg, 1 );
131   minx->F = ( old_F & ~ ( FLAG_Z ) )
132132      | ( ( res ) ? 0 : FLAG_Z )
133133   ;
134134   return res;
135135}
136136
137137
138INLINE UINT16 DEC16( UINT16 arg )
138INLINE UINT16 DEC16( minx_state *minx, UINT16 arg )
139139{
140   UINT8 old_F = regs.F;
141   UINT16 res = SUB16( arg, 1 );
142   regs.F = ( old_F & ~ ( FLAG_Z ) )
140   UINT8 old_F = minx->F;
141   UINT16 res = SUB16( minx, arg, 1 );
142   minx->F = ( old_F & ~ ( FLAG_Z ) )
143143      | ( ( res ) ? 0 : FLAG_Z )
144144   ;
145145   return res;
146146}
147147
148148
149INLINE UINT8 AND8( UINT8 arg1, UINT8 arg2 )
149INLINE UINT8 AND8( minx_state *minx, UINT8 arg1, UINT8 arg2 )
150150{
151151   UINT8 res = arg1 & arg2;
152   regs.F = ( regs.F & ~ ( FLAG_S | FLAG_Z ) )
152   minx->F = ( minx->F & ~ ( FLAG_S | FLAG_Z ) )
153153      | ( ( res & 0x80 ) ? FLAG_S : 0 )
154154      | ( ( res ) ? 0 : FLAG_Z )
155155   ;
r5046r5047
157157}
158158
159159
160INLINE UINT8 OR8( UINT8 arg1, UINT8 arg2 )
160INLINE UINT8 OR8( minx_state *minx, UINT8 arg1, UINT8 arg2 )
161161{
162162   UINT8 res = arg1 | arg2;
163   regs.F = ( regs.F & ~ ( FLAG_S | FLAG_Z ) )
163   minx->F = ( minx->F & ~ ( FLAG_S | FLAG_Z ) )
164164      | ( ( res & 0x80 ) ? FLAG_S : 0 )
165165      | ( ( res ) ? 0 : FLAG_Z )
166166   ;
r5046r5047
168168}
169169
170170
171INLINE UINT8 XOR8( UINT8 arg1, UINT8 arg2 )
171INLINE UINT8 XOR8( minx_state *minx, UINT8 arg1, UINT8 arg2 )
172172{
173173   UINT8 res = arg1 ^ arg2;
174   regs.F = ( regs.F & ~ ( FLAG_S | FLAG_Z ) )
174   minx->F = ( minx->F & ~ ( FLAG_S | FLAG_Z ) )
175175      | ( ( res & 0x80 ) ? FLAG_S : 0 )
176176      | ( ( res ) ? 0 : FLAG_Z )
177177   ;
r5046r5047
179179}
180180
181181
182INLINE UINT8 NOT8( UINT8 arg )
182INLINE UINT8 NOT8( minx_state *minx, UINT8 arg )
183183{
184184   UINT8 res = ~arg;
185   regs.F = ( regs.F & ~ ( FLAG_S | FLAG_Z ) )
185   minx->F = ( minx->F & ~ ( FLAG_S | FLAG_Z ) )
186186      | ( ( res & 0x80 ) ? FLAG_S : 0 )
187187      | ( ( res ) ? 0 : FLAG_Z )
188188   ;
r5046r5047
190190}
191191
192192
193INLINE UINT8 NEG8( UINT8 arg )
193INLINE UINT8 NEG8( minx_state *minx, UINT8 arg )
194194{
195195   UINT8 res = -arg;
196   regs.F = ( regs.F & ~ ( FLAG_S | FLAG_O | FLAG_C | FLAG_Z ) )
196   minx->F = ( minx->F & ~ ( FLAG_S | FLAG_O | FLAG_C | FLAG_Z ) )
197197      | ( ( res & 0x80 ) ? FLAG_S : 0 )
198198      | ( ( res ) ? 0 : FLAG_Z )
199199   ;
r5046r5047
201201}
202202
203203
204INLINE UINT8 SAL8( UINT8 arg )
204INLINE UINT8 SAL8( minx_state *minx, UINT8 arg )
205205{
206206   UINT16 res = arg << 1;
207   regs.F = ( regs.F & ~ ( FLAG_S | FLAG_O | FLAG_C | FLAG_Z ) )
207   minx->F = ( minx->F & ~ ( FLAG_S | FLAG_O | FLAG_C | FLAG_Z ) )
208208      | ( ( res & 0x80 ) ? FLAG_S : 0 )
209209      | ( ( arg != 0 && res == 0 ) ? FLAG_O : 0 )
210210      | ( ( arg & 0x80 ) ? FLAG_C : 0 )
r5046r5047
214214}
215215
216216
217INLINE UINT8 SAR8( UINT8 arg )
217INLINE UINT8 SAR8( minx_state *minx, UINT8 arg )
218218{
219219   UINT16 res = ( arg >> 1 ) | ( arg & 0x80 );
220   regs.F = ( regs.F & ~ ( FLAG_S | FLAG_O | FLAG_C | FLAG_Z ) )
220   minx->F = ( minx->F & ~ ( FLAG_S | FLAG_O | FLAG_C | FLAG_Z ) )
221221      | ( ( res & 0x80 ) ? FLAG_S : 0 )
222222      | ( ( arg != 0x80 && res == 0x80 ) ? FLAG_O : 0 )
223223      | ( ( arg & 0x01 ) ? FLAG_C : 0 )
r5046r5047
227227}
228228
229229
230INLINE UINT8 SHL8( UINT8 arg )
230INLINE UINT8 SHL8( minx_state *minx, UINT8 arg )
231231{
232232   UINT16 res = arg << 1;
233   regs.F = ( regs.F & ~ ( FLAG_S | FLAG_C | FLAG_Z ) )
233   minx->F = ( minx->F & ~ ( FLAG_S | FLAG_C | FLAG_Z ) )
234234      | ( ( res & 0x80 ) ? FLAG_S : 0 )
235235      | ( ( arg & 0x80 ) ? FLAG_C : 0 )
236236      | ( ( res ) ? 0 : FLAG_Z )
r5046r5047
239239}
240240
241241
242INLINE UINT8 SHR8( UINT8 arg )
242INLINE UINT8 SHR8( minx_state *minx, UINT8 arg )
243243{
244244   UINT16 res = arg >> 1;
245   regs.F = ( regs.F & ~ ( FLAG_S | FLAG_C | FLAG_Z ) )
245   minx->F = ( minx->F & ~ ( FLAG_S | FLAG_C | FLAG_Z ) )
246246      | ( ( res & 0x80 ) ? FLAG_S : 0 )
247247      | ( ( arg & 0x01 ) ? FLAG_C : 0 )
248248      | ( ( res ) ? 0 : FLAG_Z )
r5046r5047
251251}
252252
253253
254INLINE UINT8 ROLC8( UINT8 arg )
254INLINE UINT8 ROLC8( minx_state *minx, UINT8 arg )
255255{
256   UINT16 res = ( arg << 1 ) | ( ( regs.F & FLAG_C ) ? 1 : 0 );
257   regs.F = ( regs.F & ~ ( FLAG_S | FLAG_C | FLAG_Z ) )
256   UINT16 res = ( arg << 1 ) | ( ( minx->F & FLAG_C ) ? 1 : 0 );
257   minx->F = ( minx->F & ~ ( FLAG_S | FLAG_C | FLAG_Z ) )
258258      | ( ( res & 0x80 ) ? FLAG_S : 0 )
259259      | ( ( arg & 0x80 ) ? FLAG_C : 0 )
260260      | ( ( res ) ? 0 : FLAG_Z )
r5046r5047
263263}
264264
265265
266INLINE UINT8 RORC8( UINT8 arg )
266INLINE UINT8 RORC8( minx_state *minx, UINT8 arg )
267267{
268   UINT16 res = ( arg >> 1 ) | ( ( regs.F & FLAG_C ) ? 0x80 : 0 );
269   regs.F = ( regs.F & ~ ( FLAG_S | FLAG_C | FLAG_Z ) )
268   UINT16 res = ( arg >> 1 ) | ( ( minx->F & FLAG_C ) ? 0x80 : 0 );
269   minx->F = ( minx->F & ~ ( FLAG_S | FLAG_C | FLAG_Z ) )
270270      | ( ( res & 0x80 ) ? FLAG_S : 0 )
271271      | ( ( arg & 0x01 ) ? FLAG_C : 0 )
272272      | ( ( res ) ? 0 : FLAG_Z )
r5046r5047
275275}
276276
277277
278INLINE UINT8 ROL8( UINT8 arg )
278INLINE UINT8 ROL8( minx_state *minx, UINT8 arg )
279279{
280280   UINT16 res = ( arg << 1 ) | ( ( arg & 0x80 ) ? 1 : 0 );
281   regs.F = ( regs.F & ~ ( FLAG_S | FLAG_C | FLAG_Z ) )
281   minx->F = ( minx->F & ~ ( FLAG_S | FLAG_C | FLAG_Z ) )
282282      | ( ( res & 0x80 ) ? FLAG_S : 0 )
283283      | ( ( arg & 0x80 ) ? FLAG_C : 0 )
284284      | ( ( res ) ? 0 : FLAG_Z )
r5046r5047
287287}
288288
289289
290INLINE UINT8 ROR8( UINT8 arg )
290INLINE UINT8 ROR8( minx_state *minx, UINT8 arg )
291291{
292292   UINT16 res = ( arg >> 1 ) | ( ( arg & 0x01 ) ? 0x80 : 0 );
293   regs.F = ( regs.F & ~ ( FLAG_S | FLAG_C | FLAG_Z ) )
293   minx->F = ( minx->F & ~ ( FLAG_S | FLAG_C | FLAG_Z ) )
294294      | ( ( res & 0x80 ) ? FLAG_S : 0 )
295295      | ( ( arg & 0x01 ) ? FLAG_C : 0 )
296296      | ( ( res ) ? 0 : FLAG_Z )
r5046r5047
299299}
300300
301301
302INLINE void PUSH8( UINT8 arg )
302INLINE void PUSH8( minx_state *minx, UINT8 arg )
303303{
304   regs.SP = regs.SP - 1;
305   WR( regs.SP, arg );
304   minx->SP = minx->SP - 1;
305   WR( minx->SP, arg );
306306}
307307
308308
309INLINE void PUSH16( UINT16 arg )
309INLINE void PUSH16( minx_state *minx, UINT16 arg )
310310{
311   PUSH8( arg >> 8 );
312   PUSH8( arg & 0x00FF );
311   PUSH8( minx, arg >> 8 );
312   PUSH8( minx, arg & 0x00FF );
313313}
314314
315315
316INLINE UINT8 POP8( void )
316INLINE UINT8 POP8( minx_state *minx )
317317{
318   UINT8 res = RD( regs.SP );
319   regs.SP = regs.SP + 1;
318   UINT8 res = RD( minx->SP );
319   minx->SP = minx->SP + 1;
320320   return res;
321321}
322322
323323
324INLINE UINT16 POP16( void )
324INLINE UINT16 POP16( minx_state *minx )
325325{
326   return POP8() | ( POP8() << 8 );
326   return POP8(minx) | ( POP8(minx) << 8 );
327327}
328328
329329
330INLINE void JMP( UINT16 arg )
330INLINE void JMP( minx_state *minx, UINT16 arg )
331331{
332   regs.V = regs.U;
333   regs.PC = arg;
332   minx->V = minx->U;
333   minx->PC = arg;
334334}
335335
336336
337INLINE void CALL( UINT16 arg )
337INLINE void CALL( minx_state *minx, UINT16 arg )
338338{
339   PUSH8( regs.V );
340   PUSH16( regs.PC );
341   JMP( arg );
339   PUSH8( minx, minx->V );
340   PUSH16( minx, minx->PC );
341   JMP( minx, arg );
342342}
343343
344344
345#define AD1_IHL   UINT32 addr1 = ( regs.I << 16 ) | regs.HL
346#define AD1_IN8   UINT32 addr1 = ( regs.I << 16 ) | ( regs.N << 8 ) | rdop()
347#define AD1_I16   UINT32 addr1 = ( regs.I << 16 ) | rdop16()
348#define AD1_XIX   UINT32 addr1 = ( regs.XI << 16 ) | regs.X
349#define AD1_YIY   UINT32 addr1 = ( regs.YI << 16 ) | regs.Y
350#define AD1_X8   UINT32 addr1 = ( regs.XI << 16 ) | ( regs.X + rdop() )
351#define AD1_Y8   UINT32 addr1 = ( regs.YI << 16 ) | ( regs.Y + rdop() )
352#define AD1_XL   UINT32 addr1 = ( regs.XI << 16 ) | ( regs.X + ( regs.HL & 0x00FF ) )
353#define AD1_YL   UINT32 addr1 = ( regs.YI << 16 ) | ( regs.Y + ( regs.HL & 0x00FF ) )
354#define AD2_IHL   UINT32 addr2 = ( regs.I << 16 ) | regs.HL
355#define AD2_IN8   UINT32 addr2 = ( regs.I << 16 ) | ( regs.N << 8 ) | rdop()
356#define AD2_I16   UINT32 addr2 = ( regs.I << 16 ) | rdop(); addr2 |= ( rdop() << 8 )
357#define AD2_XIX   UINT32 addr2 = ( regs.XI << 16 ) | regs.X
358#define AD2_YIY   UINT32 addr2 = ( regs.YI << 16 ) | regs.Y
359#define AD2_X8   UINT32 addr2 = ( regs.XI << 16 ) | ( regs.X + rdop() )
360#define AD2_Y8   UINT32 addr2 = ( regs.YI << 16 ) | ( regs.Y + rdop() )
361#define AD2_XL   UINT32 addr2 = ( regs.XI << 16 ) | ( regs.X + ( regs.HL & 0x00FF ) )
362#define AD2_YL   UINT32 addr2 = ( regs.YI << 16 ) | ( regs.Y + ( regs.HL & 0x00FF ) )
345#define AD1_IHL   UINT32 addr1 = ( minx->I << 16 ) | minx->HL
346#define AD1_IN8   UINT32 addr1 = ( minx->I << 16 ) | ( minx->N << 8 ) | rdop(minx)
347#define AD1_I16   UINT32 addr1 = ( minx->I << 16 ) | rdop16(minx)
348#define AD1_XIX   UINT32 addr1 = ( minx->XI << 16 ) | minx->X
349#define AD1_YIY   UINT32 addr1 = ( minx->YI << 16 ) | minx->Y
350#define AD1_X8   UINT32 addr1 = ( minx->XI << 16 ) | ( minx->X + rdop(minx) )
351#define AD1_Y8   UINT32 addr1 = ( minx->YI << 16 ) | ( minx->Y + rdop(minx) )
352#define AD1_XL   UINT32 addr1 = ( minx->XI << 16 ) | ( minx->X + ( minx->HL & 0x00FF ) )
353#define AD1_YL   UINT32 addr1 = ( minx->YI << 16 ) | ( minx->Y + ( minx->HL & 0x00FF ) )
354#define AD2_IHL   UINT32 addr2 = ( minx->I << 16 ) | minx->HL
355#define AD2_IN8   UINT32 addr2 = ( minx->I << 16 ) | ( minx->N << 8 ) | rdop(minx)
356#define AD2_I16   UINT32 addr2 = ( minx->I << 16 ) | rdop(minx); addr2 |= ( rdop(minx) << 8 )
357#define AD2_XIX   UINT32 addr2 = ( minx->XI << 16 ) | minx->X
358#define AD2_YIY   UINT32 addr2 = ( minx->YI << 16 ) | minx->Y
359#define AD2_X8   UINT32 addr2 = ( minx->XI << 16 ) | ( minx->X + rdop(minx) )
360#define AD2_Y8   UINT32 addr2 = ( minx->YI << 16 ) | ( minx->Y + rdop(minx) )
361#define AD2_XL   UINT32 addr2 = ( minx->XI << 16 ) | ( minx->X + ( minx->HL & 0x00FF ) )
362#define AD2_YL   UINT32 addr2 = ( minx->YI << 16 ) | ( minx->Y + ( minx->HL & 0x00FF ) )
src/emu/cpu/m6502/tdeco16.c
r5046r5047
142142OP(34) { RD_DUM; ILL; }                           /* 2 ILL / 4 bit zpx ?? */
143143OP(54) { RD_DUM; ILL; }                         /* 2 ILL */
144144OP(74) { RD_DUM; ILL; }                           /* 2 ILL / 4 stz zpx ?? */
145OP(94) { RD_DUM; ILL; }                           /* 2 ILL / 4 sty zpx ?? */
145#define deco16_94 m6502_94                        /* 4 sty zpx */
146146#define deco16_b4 m6502_b4                        /* 4 ldy zpx */
147147OP(d4) { RD_DUM; ILL; }                         /* 2 ILL */
148148OP(f4) { RD_DUM; ILL; }                            /* 2 ILL */
r5046r5047
272272              }
273273OP(2b) { RD_DUM; ILL; }                         /* 2 ILL */
274274OP(4b) { int tmp; cpustate->icount -= 1; RD_IMM;
275   logerror("%04x: OP4B %02x\n",PCW,tmp);
275   //logerror("%04x: OP4B %02x\n",PCW,tmp);
276   /* TODO: Maybe it's just read I/O 0 and do a logic AND with bit 1? */
277   cpustate->a=memory_read_byte_8le(cpustate->io,1);
276278
277//  cpustate->a=memory_read_byte_8le(cpustate->io,0);
278
279279//tilt??
280280
281281//VBL on expr-raider
r5046r5047
364364OP(4f) { RD_DUM; ILL; }                           /* 2 ILL / 5 BBR4 ZPG ?? */
365365OP(6f) { RD_DUM; ILL; }                           /* 2 ILL / 5 BBR6 ZPG ?? */
366366OP(8f) { int tmp; cpustate->icount -= 1; RD_IMM;
367   #ifdef MAME_DEBUG
367368   logerror("%04x: BANK (8F) %02x\n",PCW,tmp);
369   #endif
368370
369371   memory_write_byte_8le(cpustate->io,0,tmp);
370372
src/emu/cpu/tms9900/tms9900.h
r5046r5047
3131                          /* This chip is available in several variants (tms99105, tms99110...), */
3232                          /* which are similar but emulate additional instructions thanks */
3333                          /* to the so-called macrostore feature. */
34#define TMS99105A_ID   11
35#define TMS99110A_ID   12
3436
37
3538/* NPW 25-May-2002 - Added these to get it to compile under windows */
3639#define TI9940_ID      TMS9940_ID
3740#define TI9985_ID      TMS9985_ID
src/emu/video/tms9928a.c
r5046r5047
435435    /* when skipping frames, calculate sprite collision */
436436    if (video_skip_this_frame() ) {
437437      if (TMS_SPRITES_ENABLED) {
438         draw_sprites (NULL, NULL, NULL);
438         draw_sprites (machine->primary_screen, NULL, NULL);
439439      }
440440    }
441441
r5046r5047
670670    int p,x,y,size,i,j,large,yy,xx,limit[192],
671671        illegalsprite,illegalspriteline;
672672    UINT16 line,line2;
673    const pen_t *pens;
673674
675    pens = screen->machine->pens;
674676    attributeptr = tms.vMem + tms.spriteattribute;
675677    size = (tms.Regs[1] & 2) ? 16 : 8;
676678    large = (int)(tms.Regs[1] & 1);
r5046r5047
726728                            {
727729                                tms.dBackMem[yy*256+xx] |= 0x02;
728730                                if (bitmap)
729                                    *BITMAP_ADDR16(bitmap, TOP_BORDER+yy, LEFT_BORDER+xx) = c;
731                                    *BITMAP_ADDR16(bitmap, TOP_BORDER+yy, LEFT_BORDER+xx) = pens[c];
730732                            }
731733                        }
732734                    }
r5046r5047
765767                                    {
766768                                        tms.dBackMem[yy*256+xx] |= 0x02;
767769                                        if (bitmap)
768                                            *BITMAP_ADDR16(bitmap, TOP_BORDER+yy, LEFT_BORDER+xx) = c;
770                                            *BITMAP_ADDR16(bitmap, TOP_BORDER+yy, LEFT_BORDER+xx) = pens[c];
769771                                    }
770772                                }
771773                                if (((xx+1) >=0) && ((xx+1) < 256)) {
r5046r5047
778780                                    {
779781                                        tms.dBackMem[yy*256+xx+1] |= 0x02;
780782                                        if (bitmap)
781                                            *BITMAP_ADDR16(bitmap, TOP_BORDER+yy, LEFT_BORDER+xx+1) = c;
783                                            *BITMAP_ADDR16(bitmap, TOP_BORDER+yy, LEFT_BORDER+xx+1) = pens[c];
782784                                    }
783785                                }
784786                            }
src/emu/machine/74148.c
r5046r5047
8181      int bit0, bit1, bit2;
8282
8383      /* this comes straight off the data sheet schematics */
84      bit0 = !((!chips[which].input_lines[1] &
84      bit0 = !(((!chips[which].input_lines[1]) &
8585                 chips[which].input_lines[2] &
8686                 chips[which].input_lines[4] &
8787                 chips[which].input_lines[6])  |
88               (!chips[which].input_lines[3] &
88               ((!chips[which].input_lines[3]) &
8989                 chips[which].input_lines[4] &
9090                 chips[which].input_lines[6])  |
91               (!chips[which].input_lines[5] &
91               ((!chips[which].input_lines[5]) &
9292                 chips[which].input_lines[6])  |
9393               (!chips[which].input_lines[7]));
9494
95      bit1 = !((!chips[which].input_lines[2] &
95      bit1 = !(((!chips[which].input_lines[2]) &
9696                 chips[which].input_lines[4] &
9797                 chips[which].input_lines[5])  |
98               (!chips[which].input_lines[3] &
98               ((!chips[which].input_lines[3]) &
9999                 chips[which].input_lines[4] &
100100                 chips[which].input_lines[5])  |
101101               (!chips[which].input_lines[6])  |
src/emu/machine/74181.c
r5046r5047
7474   UINT8 mp = !c->inputs[TTL74181_INPUT_M];
7575
7676   UINT8 ap0 = !(a0 | (b0 & s0) | (s1 & !b0));
77   UINT8 bp0 = !((!b0 & s2 & a0) | (a0 & b0 & s3));
77   UINT8 bp0 = !(((!b0) & s2 & a0) | (a0 & b0 & s3));
7878   UINT8 ap1 = !(a1 | (b1 & s0) | (s1 & !b1));
79   UINT8 bp1 = !((!b1 & s2 & a1) | (a1 & b1 & s3));
79   UINT8 bp1 = !(((!b1) & s2 & a1) | (a1 & b1 & s3));
8080   UINT8 ap2 = !(a2 | (b2 & s0) | (s1 & !b2));
81   UINT8 bp2 = !((!b2 & s2 & a2) | (a2 & b2 & s3));
81   UINT8 bp2 = !(((!b2) & s2 & a2) | (a2 & b2 & s3));
8282   UINT8 ap3 = !(a3 | (b3 & s0) | (s1 & !b3));
83   UINT8 bp3 = !((!b3 & s2 & a3) | (a3 & b3 & s3));
83   UINT8 bp3 = !(((!b3) & s2 & a3) | (a3 & b3 & s3));
8484
85   UINT8 fp0 = !(cp & mp) ^ (!ap0 & bp0);
86   UINT8 fp1 = (!((mp & ap0) | (mp & bp0 & cp))) ^ (!ap1 & bp1);
87   UINT8 fp2 = (!((mp & ap1) | (mp & ap0 & bp1) | (mp & cp & bp0 & bp1))) ^ (!ap2 & bp2);
88   UINT8 fp3 = (!((mp & ap2) | (mp & ap1 & bp2) | (mp & ap0 & bp1 & bp2) | (mp & cp & bp0 & bp1 & bp2))) ^ (!ap3 & bp3);
85   UINT8 fp0 = !(cp & mp) ^ ((!ap0) & bp0);
86   UINT8 fp1 = (!((mp & ap0) | (mp & bp0 & cp))) ^ ((!ap1) & bp1);
87   UINT8 fp2 = (!((mp & ap1) | (mp & ap0 & bp1) | (mp & cp & bp0 & bp1))) ^ ((!ap2) & bp2);
88   UINT8 fp3 = (!((mp & ap2) | (mp & ap1 & bp2) | (mp & ap0 & bp1 & bp2) | (mp & cp & bp0 & bp1 & bp2))) ^ ((!ap3) & bp3);
8989
9090   UINT8 aeqb = fp0 & fp1 & fp2 & fp3;
9191   UINT8 pp = !(bp0 & bp1 & bp2 & bp3);
src/emu/machine/8237dma.c
r5046r5047
2727typedef enum {
2828   DMA8237_SI,         /* Idle state */
2929   DMA8237_S0,         /* HRQ has been triggered, waiting to receive HLDA */
30//   DMA8237_SW,         /* Wait state */
30//  DMA8237_SW,         /* Wait state */
3131
3232   /* Normal transfer states */
3333   DMA8237_S1,         /* Output A8-A15; only used when A8-A15 really needs to be output */
r5046r5047
3737
3838   /* Memory to memory transfer states */
3939   DMA8237_S11,      /* Output A8-A15 */
40//   DMA8237_S12,      /* Output A0-A7 */
41//   DMA8237_S13,      /* Initiate read */
42//   DMA8237_S14,      /* Perform read/write */
43//   DMA8237_S21,      /* Output A8-A15 */
44//   DMA8237_S22,      /* Output A0-A7 */
45//   DMA8237_S23,      /* Initiate read */
46//   DMA8237_S24,      /* Perform read/write */
40//  DMA8237_S12,        /* Output A0-A7 */
41//  DMA8237_S13,        /* Initiate read */
42//  DMA8237_S14,        /* Perform read/write */
43//  DMA8237_S21,        /* Output A8-A15 */
44//  DMA8237_S22,        /* Output A0-A7 */
45//  DMA8237_S23,        /* Initiate read */
46//  DMA8237_S24,        /* Perform read/write */
4747} dma8237_state;
4848
4949
r5046r5047
229229      /* Check if a new DMA request has been received. */
230230      {
231231         /* Bit 6 of the command register determines whether the DREQ signals are active
232           high or active low. */
232              high or active low. */
233233         UINT16 pending_request = ( ( dma8237->command & 0x40 ) ? ~dma8237->drq : dma8237->drq ) & ~dma8237->mask;
234234
235235         if ( pending_request & 0x0f )
r5046r5047
263263
264264   case DMA8237_S0:
265265      /* S0 is the first of the DMA service. We have requested a hold but are waiting
266        for confirmation. */
266          for confirmation. */
267267      if ( dma8237->hlda )
268268      {
269269         if ( dma8237->command & 0x01 )
src/emu/sound/sp0256.h
r5046r5047
1#pragma once
1/**********************************************************************
22
3#ifndef __SP0256_H__
4#define __SP0256_H__
3    SP0256 Narrator Speech Processor emulation
54
6#include "devcb.h"
5    Copyright MESS Team.
6    Visit http://mamedev.org for licensing and usage restrictions.
77
8**********************************************************************
9                            _____   _____
10                   Vss   1 |*    \_/     | 28  OSC 2
11                _RESET   2 |             | 27  OSC 1
12           ROM DISABLE   3 |             | 26  ROM CLOCK
13                    C1   4 |             | 25  _SBY RESET
14                    C2   5 |             | 24  DIGITAL OUT
15                    C3   6 |             | 23  Vdi
16                   Vdd   7 |    SP0256   | 22  TEST
17                   SBY   8 |             | 21  SER IN
18                  _LRQ   9 |             | 20  _ALD
19                    A8  10 |             | 19  SE
20                    A7  11 |             | 18  A1
21               SER OUT  12 |             | 17  A2
22                    A6  13 |             | 16  A3
23                    A5  14 |_____________| 15  A4
24
25**********************************************************************/
26
827/*
928   GI SP0256 Narrator Speech Processor
1029
r5046r5047
2544
2645*/
2746
47#pragma once
48
49#ifndef __SP0256_H__
50#define __SP0256_H__
51
52#include "devcb.h"
53
2854typedef struct _sp0256_interface sp0256_interface;
2955struct _sp0256_interface
3056{
docs/messnew.txt
r5046r5047
66- MMD-1 [Miodrag Milanovic]
77- Nuova Elettronica Z80NE + LX.388 + LX.390  [Roberto Lavarone]
88
9
10
911Skeleton drivers :
1012------------------
1113- Intel SDK-86
r5046r5047
1719- MMD-2
1820- MPF-1 Plus
1921
22
23
2024System Driver Changes:
2125----------------------
2226- [GENESIS] Save RAM emulation improved for several games (bugs #1691, #1696,
r5046r5047
2832  battery status [Xander]
2933
3034
35
3136User Interface Changes:
3237-----------------------
3338(none)
r5046r5047
4247
4348Source Changes:
4449----------------
50- The core is based on MAME 0.132u1.  This incorporates all features of the
51  update to this core.  [MAME team]
52
4553- Added support for passing around 'deleted address mark' information
4654  to the floppy system. [Roberto Lavarone]
4755
whatsnew.txt
r5046r5047
11681168  [Smitdogg, cricri_pingouin, incog, B. Sparks, ANY]
11691169Streets of Rage (Mega-Tech)
11701170  [Smitdogg, cricri_pingouin, incog, B. Sparks, ANY]
1171

Previous 15994 Revisions Next


© 1998-2018 The MESS Team