Viewing File: <root>/src/mame/drivers/dec8.c

    1  /***************************************************************************
    2  
    3  Various Data East 8 bit games:
    4  
    5      Last Mission (rev 6)        (c) 1986 Data East USA (2*6809 + I8751)
    6      Last Mission (rev 5)        (c) 1986 Data East USA (2*6809 + I8751)
    7      Last Mission (Japan)        (c) 1986 Data East Corporation (2*6809 + I8751)
    8      Shackled                    (c) 1986 Data East USA (2*6809 + I8751)
    9      Breywood                    (c) 1986 Data East Corporation (2*6809 + I8751)
   10      Gondomania                  (c) 1987 Data East USA (6809 + I8751)
   11      Makyou Senshi               (c) 1987 Data East Corporation (6809 + I8751)
   12      Garyo Retsuden              (c) 1987 Data East Corporation (6809 + I8751)
   13      The Real Ghostbusters (2p)  (c) 1987 Data East USA (6809 + I8751)
   14      The Real Ghostbusters (3p)  (c) 1987 Data East USA (6809 + I8751)
   15      Meikyuu Hunter G            (c) 1987 Data East Corporation (6809 + I8751)
   16      Captain Silver (World)      (c) 1987 Data East Corporation (2*6809 + I8751)
   17      Captain Silver (Japan)      (c) 1987 Data East Corporation (2*6809 + I8751)
   18      Psycho-Nics Oscar (World)   (c) 1987 Data East Corporation (2*6809 + I8751)
   19      Psycho-Nics Oscar (US)      (c) 1988 Data East USA (2*6809 + I8751)
   20      Psycho-Nics Oscar (Japan)   (c) 1987 Data East Corporation (2*6809 + I8751)
   21      Super Real Darwin (World)   (c) 1987 Data East Corporation (6809 + I8751)
   22      Super Real Darwin (Japan)   (c) 1987 Data East Corporation (6809 + I8751)
   23      Cobra Command (World)       (c) 1988 Data East Corporation (6809)
   24      Cobra Command (Japan)       (c) 1988 Data East Corporation (6809)
   25  
   26      All games use a 6502 for sound (some are encrypted), all games except Cobracom
   27      use an Intel 8751 for protection & coinage. For the games without (fake) MCU,
   28      the coinage dip switch (sometimes based on the manual) is simulated.
   29  
   30      Meikyuu Hunter G was formerly known as Mazehunter.
   31  
   32      Emulation by Bryan McPhail, mish@tendril.co.uk
   33  
   34  To do:
   35      Super Real Darwin 'Double' sprites appearing from the top of the screen are clipped
   36      Strangely coloured butterfly on Garyo Retsuden water levels!
   37  
   38    Thanks to Jose Miguel Morales Farreras for Super Real Darwin information!
   39  
   40  ***************************************************************************/
   41  
   42  #include "emu.h"
   43  #include "cpu/hd6309/hd6309.h"
   44  #include "cpu/m6809/m6809.h"
   45  #include "cpu/m6502/m6502.h"
   46  #include "cpu/mcs51/mcs51.h"
   47  #include "sound/2203intf.h"
   48  #include "sound/3812intf.h"
   49  #include "sound/3526intf.h"
   50  #include "sound/msm5205.h"
   51  #include "includes/dec8.h"
   52  #include "video/decbac06.h"
   53  #include "video/decmxc06.h"
   54  #include "video/deckarn.h"
   55  #include "machine/deco222.h"
   56  
   57  
   58  /******************************************************************************/
   59  
   60  
   61  WRITE8_MEMBER(dec8_state::dec8_mxc06_karn_buffer_spriteram_w)
   62  {
   63      UINT8* spriteram = m_spriteram->live();
   64      // copy to a 16-bit region for the sprite chip
   65      for (int i=0;i<0x800/2;i++)
   66      {
   67          m_buffered_spriteram16[i] = spriteram[(i*2)+1] | (spriteram[(i*2)+0] <<8);
   68      }
   69  }
   70  
   71  /* Only used by ghostb, gondo, garyoret, other games can control buffering */
   72  void dec8_state::screen_eof_dec8(screen_device &screen, bool state)
   73  {
   74      // rising edge
   75      if (state)
   76      {
   77          address_space &space = machine().device("maincpu")->memory().space(AS_PROGRAM);
   78          dec8_mxc06_karn_buffer_spriteram_w(space, 0, 0);
   79      }
   80  }
   81  
   82  READ8_MEMBER(dec8_state::i8751_h_r)
   83  {
   84      return m_i8751_return >> 8; /* MSB */
   85  }
   86  
   87  READ8_MEMBER(dec8_state::i8751_l_r)
   88  {
   89      return m_i8751_return & 0xff; /* LSB */
   90  }
   91  
   92  WRITE8_MEMBER(dec8_state::i8751_reset_w)
   93  {
   94      m_i8751_return = 0;
   95  }
   96  
   97  /******************************************************************************/
   98  
   99  READ8_MEMBER(dec8_state::gondo_player_1_r)
  100  {
  101      int val = 1 << ioport("AN0")->read();
  102  
  103      switch (offset)
  104      {
  105          case 0: /* Rotary low byte */
  106              return ~(val & 0xff);
  107          case 1: /* Joystick = bottom 4 bits, rotary = top 4 */
  108              return ((~val >> 4) & 0xf0) | (ioport("IN0")->read() & 0xf);
  109      }
  110      return 0xff;
  111  }
  112  
  113  READ8_MEMBER(dec8_state::gondo_player_2_r)
  114  {
  115      int val = 1 << ioport("AN1")->read();
  116  
  117      switch (offset)
  118      {
  119          case 0: /* Rotary low byte */
  120              return ~(val & 0xff);
  121          case 1: /* Joystick = bottom 4 bits, rotary = top 4 */
  122              return ((~val >> 4) & 0xf0) | (ioport("IN1")->read() & 0xf);
  123      }
  124      return 0xff;
  125  }
  126  
  127  /******************************************************************************/
  128  
  129  /***************************************************
  130  *
  131  * Hook-up for games that we have a proper MCU dump.
  132  *
  133  ***************************************************/
  134  
  135  TIMER_CALLBACK_MEMBER(dec8_state::dec8_i8751_timer_callback)
  136  {
  137      // The schematics show a clocked LS194 shift register (3A) is used to automatically
  138      // clear the IRQ request.  The MCU does not clear it itself.
  139      m_mcu->execute().set_input_line(MCS51_INT1_LINE, CLEAR_LINE);
  140  }
  141  
  142  WRITE8_MEMBER(dec8_state::dec8_i8751_w)
  143  {
  144      switch (offset)
  145      {
  146      case 0: /* High byte - SECIRQ is trigged on activating this latch */
  147          m_i8751_value = (m_i8751_value & 0xff) | (data << 8);
  148          m_mcu->execute().set_input_line(MCS51_INT1_LINE, ASSERT_LINE);
  149          machine().scheduler().timer_set(m_mcu->clocks_to_attotime(64), timer_expired_delegate(FUNC(dec8_state::dec8_i8751_timer_callback),this)); // 64 clocks not confirmed
  150          break;
  151      case 1: /* Low byte */
  152          m_i8751_value = (m_i8751_value & 0xff00) | data;
  153          break;
  154      }
  155  }
  156  
  157  /********************************
  158  *
  159  * MCU simulations
  160  *
  161  ********************************/
  162  
  163  WRITE8_MEMBER(dec8_state::lastmisn_i8751_w)
  164  {
  165      /* Japan coinage first, then World coinage - US coinage shall be the same as the Japan one */
  166      int lneed1[2][4] = {{1, 1, 1, 2}, {1, 1, 1, 1}};   /* slot 1 : coins needed */
  167      int lcred1[2][4] = {{1, 2, 3, 1}, {1, 2, 3, 5}};   /* slot 1 : credits awarded */
  168      int lneed2[2][4] = {{1, 1, 1, 2}, {1, 2, 3, 4}};   /* slot 2 : coins needed */
  169      int lcred2[2][4] = {{1, 2, 3, 1}, {1, 1, 1, 1}};   /* slot 2 : credits awarded */
  170  
  171      m_i8751_return = 0;
  172  
  173      switch (offset)
  174      {
  175      case 0: /* High byte */
  176          m_i8751_value = (m_i8751_value & 0xff) | (data << 8);
  177          m_maincpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE); /* Signal main cpu */
  178          break;
  179      case 1: /* Low byte */
  180          m_i8751_value = (m_i8751_value & 0xff00) | data;
  181          break;
  182      }
  183  
  184      /* Coins are controlled by the i8751 */
  185      if ((ioport("IN2")->read() & 3) == 3) m_latch = 1;
  186      if ((ioport("IN2")->read() & 1) != 1 && m_latch)
  187      {
  188          m_coin1++;
  189          m_latch = 0;
  190          m_snd = 0x400;
  191          m_i8751_return = 0x400;
  192          if (m_coin1>=m_need1)
  193          {
  194              m_coin1-=m_need1;
  195              m_credits+=m_cred1;
  196          }
  197      }
  198      if ((ioport("IN2")->read() & 2) != 2 && m_latch)
  199      {
  200          m_coin2++;
  201          m_latch = 0;
  202          m_snd = 0x400;
  203          m_i8751_return = 0x400;
  204          if (m_coin2>=m_need2)
  205          {
  206              m_coin2-=m_need2;
  207              m_credits+=m_cred2;
  208          }
  209      }
  210      if (m_credits>99) m_credits=99; /* not handled by main CPU */
  211  
  212      if (m_i8751_value == 0x0401) m_i8751_return = 0;    /* ??? */
  213  
  214      if (m_i8751_value == 0x007a) { m_i8751_return = 0x85; m_coinage_id = 0; }  /* Japanese version ID */
  215      if (m_i8751_value == 0x007b) { m_i8751_return = 0x84; m_coinage_id = 0; }  /* US version ID */
  216  
  217      if (offset == 0)
  218      {
  219          if ((m_i8751_value >> 8) == 0x01) /* Coinage settings */
  220          {
  221              m_i8751_return = m_i8751_value;
  222              m_need1 = lneed1[m_coinage_id][(m_i8751_value & 0x03) >> 0];
  223              m_need2 = lneed2[m_coinage_id][(m_i8751_value & 0x0c) >> 2];
  224              m_cred1 = lcred1[m_coinage_id][(m_i8751_value & 0x03) >> 0];
  225              m_cred2 = lcred2[m_coinage_id][(m_i8751_value & 0x0c) >> 2];
  226          }
  227          if ((m_i8751_value >> 8) == 0x02) { m_i8751_return = m_snd | ((m_credits / 10) << 4) | (m_credits % 10); m_snd = 0; }   /* Credits request */
  228          if ((m_i8751_value >> 8) == 0x03 && m_credits) { m_i8751_return = 0; m_credits--; } /* Credits clear */
  229      }
  230  }
  231  
  232  WRITE8_MEMBER(dec8_state::shackled_i8751_w)
  233  {
  234      m_i8751_return = 0;
  235  
  236      switch (offset)
  237      {
  238      case 0: /* High byte */
  239          m_i8751_value = (m_i8751_value & 0xff) | (data << 8);
  240          m_subcpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE); /* Signal sub cpu */
  241          break;
  242      case 1: /* Low byte */
  243          m_i8751_value = (m_i8751_value & 0xff00) | data;
  244          break;
  245      }
  246  
  247      /* Coins are controlled by the i8751 */
  248      if (/*(ioport("IN2")->read() & 3) == 3*/!m_latch) { m_latch = 1; m_coin1 = m_coin2 = 0; }
  249      if ((ioport("IN2")->read() & 1) != 1 && m_latch)  { m_coin1 = 1; m_latch = 0; }
  250      if ((ioport("IN2")->read() & 2) != 2 && m_latch)  { m_coin2 = 1; m_latch = 0; }
  251  
  252      if (m_i8751_value == 0x0102) m_i8751_return = 0;    /* ??? */
  253      if (m_i8751_value == 0x0101) m_i8751_return = 0;    /* ??? */
  254      if (m_i8751_value == 0x0400) m_i8751_return = 0;    /* ??? */
  255  
  256      if (m_i8751_value == 0x0050) m_i8751_return = 0; /* Japanese version (Breywood) ID */
  257      if (m_i8751_value == 0x0051) m_i8751_return = 0; /* US version (Shackled) ID */
  258  
  259      if (m_i8751_value == 0x8101) m_i8751_return = ((((m_coin2 / 10) << 4) | (m_coin2 % 10)) << 0) |
  260                                                                  ((((m_coin1 / 10) << 4) | (m_coin1 % 10)) << 8);    /* Coins */
  261  }
  262  
  263  WRITE8_MEMBER(dec8_state::csilver_i8751_w)
  264  {
  265      /* Japan coinage first, then World coinage - US coinage shall be the same as the Japan one */
  266      int lneed1[2][4] = {{1, 1, 1, 2}, {1, 1, 1, 1}};   /* slot 1 : coins needed */
  267      int lcred1[2][4] = {{1, 2, 3, 1}, {2, 3, 4, 6}};   /* slot 1 : credits awarded */
  268      int lneed2[2][4] = {{1, 1, 1, 2}, {1, 2, 3, 4}};   /* slot 2 : coins needed */
  269      int lcred2[2][4] = {{1, 2, 3, 1}, {1, 1, 1, 1}};   /* slot 2 : credits awarded */
  270  
  271      m_i8751_return = 0;
  272  
  273      switch (offset)
  274      {
  275      case 0: /* High byte */
  276          m_i8751_value = (m_i8751_value & 0xff) | (data << 8);
  277          m_maincpu->set_input_line(M6809_FIRQ_LINE, HOLD_LINE); /* Signal main cpu */
  278          break;
  279      case 1: /* Low byte */
  280          m_i8751_value = (m_i8751_value & 0xff00) | data;
  281          break;
  282      }
  283  
  284      /* Coins are controlled by the i8751 */
  285      if ((ioport("IN2")->read() & 3) == 3) m_latch = 1;
  286      if ((ioport("IN2")->read() & 1) != 1 && m_latch)
  287      {
  288          m_coin1++;
  289          m_latch = 0;
  290          m_snd = 0x1200;
  291          m_i8751_return = 0x1200;
  292          if (m_coin1>=m_need1)
  293          {
  294              m_coin1-=m_need1;
  295              m_credits+=m_cred1;
  296          }
  297      }
  298      if ((ioport("IN2")->read() & 2) != 2 && m_latch)
  299      {
  300          m_coin2++;
  301          m_latch = 0;
  302          m_snd = 0x1200;
  303          m_i8751_return = 0x1200;
  304          if (m_coin2>=m_need2)
  305          {
  306              m_coin2-=m_need2;
  307              m_credits+=m_cred2;
  308          }
  309      }
  310      if (m_credits>99) m_credits=99; /* not handled by main CPU */
  311  
  312      if (m_i8751_value == 0x054a) { m_i8751_return = 0xb5; m_coinage_id = 0; }  /* Japanese version ID */
  313      if (m_i8751_value == 0x054c) { m_i8751_return = 0xb3; m_coinage_id = 1; }  /* World version ID */
  314  
  315      if (offset == 0)
  316      {
  317          if ((m_i8751_value >> 8) == 0x01) /* Coinage settings */
  318          {
  319              m_i8751_return = m_i8751_value;
  320              m_need1 = lneed1[m_coinage_id][(m_i8751_value & 0x03) >> 0];
  321              m_need2 = lneed2[m_coinage_id][(m_i8751_value & 0x0c) >> 2];
  322              m_cred1 = lcred1[m_coinage_id][(m_i8751_value & 0x03) >> 0];
  323              m_cred2 = lcred2[m_coinage_id][(m_i8751_value & 0x0c) >> 2];
  324          }
  325          if ((m_i8751_value >> 8) == 0x02) { m_i8751_return = m_snd | m_credits; m_snd = 0; }   /* Credits request */
  326          if ((m_i8751_value >> 8) == 0x03 && m_credits) { m_i8751_return = 0; m_credits--; } /* Credits clear */
  327      }
  328  }
  329  
  330  WRITE8_MEMBER(dec8_state::srdarwin_i8751_w)
  331  {
  332      /* Japan coinage first, then World coinage - US coinage shall be the same as the Japan one */
  333      int lneed1[2][4] = {{1, 1, 1, 2}, {1, 1, 1, 1}};   /* slot 1 : coins needed */
  334      int lcred1[2][4] = {{1, 2, 3, 1}, {2, 3, 4, 6}};   /* slot 1 : credits awarded */
  335      int lneed2[2][4] = {{1, 1, 1, 2}, {1, 2, 3, 4}};   /* slot 2 : coins needed */
  336      int lcred2[2][4] = {{1, 2, 3, 1}, {1, 1, 1, 1}};   /* slot 2 : credits awarded */
  337  
  338      m_i8751_return = 0;
  339  
  340      switch (offset)
  341      {
  342      case 0: /* High byte */
  343          m_i8751_value = (m_i8751_value & 0xff) | (data << 8);
  344          break;
  345      case 1: /* Low byte */
  346          m_i8751_value = (m_i8751_value & 0xff00) | data;
  347          break;
  348      }
  349  
  350      /* Coins are controlled by the i8751 */
  351      if ((ioport("I8751")->read() & 3) == 3) m_latch = 1;
  352      if ((ioport("I8751")->read() & 1) != 1 && m_latch)
  353      {
  354          m_coin1++;
  355          m_latch = 0;
  356          if (m_coin1>=m_need1)
  357          {
  358              m_coin1-=m_need1;
  359              m_credits+=m_cred1;
  360          }
  361      }
  362      if ((ioport("I8751")->read() & 2) != 2 && m_latch)
  363      {
  364          m_coin2++;
  365          m_latch = 0;
  366          if (m_coin2>=m_need2)
  367          {
  368              m_coin2-=m_need2;
  369              m_credits+=m_cred2;
  370          }
  371      }
  372      if (m_credits>99) m_credits=99; /* not handled by main CPU */
  373  
  374      if (m_i8751_value == 0x0000) m_i8751_return = 0;    /* ??? */
  375  
  376      if (m_i8751_value == 0x3063)    { m_i8751_return = 0x9c; m_coinage_id = 0; }  /* Japanese version ID */
  377      if (m_i8751_value == 0x306b)    { m_i8751_return = 0x94; m_coinage_id = 1; }  /* World version ID */
  378  
  379      if ((m_i8751_value >> 8) == 0x40) /* Coinage settings */
  380      {
  381          m_i8751_return = m_i8751_value;
  382          m_need1 = lneed1[m_coinage_id][(m_i8751_value & 0x03) >> 0];
  383          m_need2 = lneed2[m_coinage_id][(m_i8751_value & 0x0c) >> 2];
  384          m_cred1 = lcred1[m_coinage_id][(m_i8751_value & 0x03) >> 0];
  385          m_cred2 = lcred2[m_coinage_id][(m_i8751_value & 0x0c) >> 2];
  386      }
  387      if (m_i8751_value == 0x5000) { m_i8751_return = ((m_credits / 10) << 4) | (m_credits % 10); } /* Credits request */
  388      if (m_i8751_value == 0x6000 && m_credits) { m_i8751_value = -1; m_credits--; }     /* Credits clear */
  389  
  390  /*
  391      This next value is the index to a series of tables,
  392      each table controls the end of level bad guy,
  393      wrong values crash the cpu right away via a bogus jump.
  394  
  395      Level number requested is in low byte
  396  
  397      Addresses on left hand side are from the protection vector table which is
  398      stored at location 0xf580 in rom dy_01.rom
  399  
  400  ba5e (lda #00) = Level 0?
  401  ba82 (lda #01) = Pyramid boss, Level 1?
  402  baaa           = No boss appears, game hangs
  403  bacc (lda #04) = Killer Bee boss, Level 4?
  404  bae0 (lda #03) = Snake type boss, Level 3?
  405  baf9           = Double grey thing boss...!
  406  bb0a           = Single grey thing boss!
  407  bb18 (lda #00) = Hailstorm from top of screen.
  408  bb31 (lda #28) = Small hailstorm
  409  bb47 (ldb #05) = Small hailstorm
  410  bb5a (lda #08) = Weird square things..
  411  bb63           = Square things again
  412  (24)           = Another square things boss..
  413  (26)           = Clock boss! (level 3)
  414  (28)           = Big dragon boss, perhaps an end-of-game baddy
  415  (30)           = 4 things appear at corners, seems to fit with attract mode (level 1)
  416  (32)           = Grey things teleport onto screen..
  417  (34)           = Grey thing appears in middle of screen
  418  (36)           = As above
  419  (38)           = Circle thing with two pincers
  420  (40)           = Grey bird
  421  (42)           = Crash (end of table)
  422  
  423      The table below is hopefully correct thanks to Jose Miguel Morales Farreras,
  424      but Boss #6 is uncomfirmed as correct.
  425  */
  426      if (m_i8751_value == 0x8000) m_i8751_return = 0xf580 +  0; /* Boss #1: Snake + Bees */
  427      if (m_i8751_value == 0x8001) m_i8751_return = 0xf580 + 30; /* Boss #2: 4 Corners */
  428      if (m_i8751_value == 0x8002) m_i8751_return = 0xf580 + 26; /* Boss #3: Clock */
  429      if (m_i8751_value == 0x8003) m_i8751_return = 0xf580 +  2; /* Boss #4: Pyramid */
  430      if (m_i8751_value == 0x8004) m_i8751_return = 0xf580 +  6; /* Boss #5: Snake + Head Combo */
  431      if (m_i8751_value == 0x8005) m_i8751_return = 0xf580 + 24; /* Boss #6: LED Panels */
  432      if (m_i8751_value == 0x8006) m_i8751_return = 0xf580 + 28; /* Boss #7: Dragon */
  433      if (m_i8751_value == 0x8007) m_i8751_return = 0xf580 + 32; /* Boss #8: Teleport */
  434      if (m_i8751_value == 0x8008) m_i8751_return = 0xf580 + 38; /* Boss #9: Octopus (Pincer) */
  435      if (m_i8751_value == 0x8009) m_i8751_return = 0xf580 + 40; /* Boss #10: Bird */
  436      if (m_i8751_value == 0x800a) m_i8751_return = 0xf580 + 42; /* End Game(bad address?) */
  437  }
  438  
  439  /******************************************************************************/
  440  
  441  WRITE8_MEMBER(dec8_state::dec8_bank_w)
  442  {
  443      membank("bank1")->set_entry(data & 0x0f);
  444  }
  445  
  446  /* Used by Ghostbusters, Meikyuu Hunter G & Gondomania */
  447  WRITE8_MEMBER(dec8_state::ghostb_bank_w)
  448  {
  449      /* Bit 0: SECCLR - acknowledge interrupt from I8751
  450         Bit 1: NMI enable/disable
  451         Bit 2: Not connected according to schematics
  452         Bit 3: Screen flip
  453         Bits 4-7: Bank switch
  454      */
  455  
  456      membank("bank1")->set_entry(data >> 4);
  457  
  458      if ((data&1)==0) m_maincpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
  459      m_nmi_enable = (data & 2) >> 1;
  460      flip_screen_set(data & 0x08);
  461  }
  462  
  463  WRITE8_MEMBER(dec8_state::csilver_control_w)
  464  {
  465      /*
  466          Bit 0x0f - ROM bank switch.
  467          Bit 0x10 - Always set(?)
  468          Bit 0x20 - Unused.
  469          Bit 0x40 - Unused.
  470          Bit 0x80 - Hold subcpu reset line high if clear, else low?  (Not needed anyway)
  471      */
  472      membank("bank1")->set_entry(data & 0x0f);
  473  }
  474  
  475  WRITE8_MEMBER(dec8_state::dec8_sound_w)
  476  {
  477      soundlatch_byte_w(space, 0, data);
  478      m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
  479  }
  480  
  481  static void csilver_adpcm_int( device_t *device )
  482  {
  483      dec8_state *state = device->machine().driver_data<dec8_state>();
  484      state->m_toggle ^= 1;
  485      if (state->m_toggle)
  486          state->m_audiocpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE);
  487  
  488      msm5205_data_w(device, state->m_msm5205next >> 4);
  489      state->m_msm5205next <<= 4;
  490  }
  491  
  492  READ8_MEMBER(dec8_state::csilver_adpcm_reset_r)
  493  {
  494      device_t *device = machine().device("msm");
  495      msm5205_reset_w(device, 0);
  496      return 0;
  497  }
  498  
  499  WRITE8_MEMBER(dec8_state::csilver_adpcm_data_w)
  500  {
  501      m_msm5205next = data;
  502  }
  503  
  504  WRITE8_MEMBER(dec8_state::csilver_sound_bank_w)
  505  {
  506      membank("bank3")->set_entry((data & 0x08) >> 3);
  507  }
  508  
  509  /******************************************************************************/
  510  
  511  WRITE8_MEMBER(dec8_state::oscar_int_w)
  512  {
  513      /* Deal with interrupts, coins also generate NMI to CPU 0 */
  514      switch (offset)
  515      {
  516      case 0: /* IRQ2 */
  517          m_subcpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
  518          return;
  519      case 1: /* IRC 1 */
  520          m_maincpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
  521          return;
  522      case 2: /* IRQ 1 */
  523          m_maincpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
  524          return;
  525      case 3: /* IRC 2 */
  526          m_subcpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
  527          return;
  528      }
  529  }
  530  
  531  /* Used by Shackled, Last Mission, Captain Silver */
  532  WRITE8_MEMBER(dec8_state::shackled_int_w)
  533  {
  534      switch (offset)
  535      {
  536      case 0: /* CPU 2 - IRQ acknowledge */
  537          m_subcpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
  538          return;
  539      case 1: /* CPU 1 - IRQ acknowledge */
  540          m_maincpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
  541          return;
  542      case 2: /* i8751 - FIRQ acknowledge */
  543          return;
  544      case 3: /* IRQ 1 */
  545          m_maincpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
  546          return;
  547      case 4: /* IRQ 2 */
  548          m_subcpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
  549          return;
  550      }
  551  }
  552  
  553  /******************************************************************************/
  554  
  555  WRITE8_MEMBER(dec8_state::flip_screen_w){ flip_screen_set(data); }
  556  
  557  /******************************************************************************/
  558  
  559  
  560  static ADDRESS_MAP_START( lastmisn_map, AS_PROGRAM, 8, dec8_state )
  561      AM_RANGE(0x0000, 0x0fff) AM_RAM AM_SHARE("share1")
  562      AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_split_lo_w) AM_SHARE("paletteram")
  563      AM_RANGE(0x1400, 0x17ff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_split_hi_w) AM_SHARE("paletteram2")
  564      AM_RANGE(0x1800, 0x1800) AM_READ_PORT("IN0")
  565      AM_RANGE(0x1801, 0x1801) AM_READ_PORT("IN1")
  566      AM_RANGE(0x1802, 0x1802) AM_READ_PORT("IN2")
  567      AM_RANGE(0x1803, 0x1803) AM_READ_PORT("DSW0")   /* Dip 1 */
  568      AM_RANGE(0x1804, 0x1804) AM_READ_PORT("DSW1")   /* Dip 2 */
  569      AM_RANGE(0x1800, 0x1804) AM_WRITE(shackled_int_w)
  570      AM_RANGE(0x1805, 0x1805) AM_WRITE(dec8_mxc06_karn_buffer_spriteram_w) /* DMA */
  571      AM_RANGE(0x1806, 0x1806) AM_READ(i8751_h_r)
  572      AM_RANGE(0x1807, 0x1807) AM_READWRITE(i8751_l_r, flip_screen_w)
  573      AM_RANGE(0x1809, 0x1809) AM_WRITE(lastmisn_scrollx_w) /* Scroll LSB */
  574      AM_RANGE(0x180b, 0x180b) AM_WRITE(lastmisn_scrolly_w) /* Scroll LSB */
  575      AM_RANGE(0x180c, 0x180c) AM_WRITE(dec8_sound_w)
  576      AM_RANGE(0x180d, 0x180d) AM_WRITE(lastmisn_control_w) /* Bank switch + Scroll MSB */
  577      AM_RANGE(0x180e, 0x180f) AM_WRITE(lastmisn_i8751_w)
  578      AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w) AM_SHARE("videoram")
  579      AM_RANGE(0x2800, 0x2fff) AM_RAM AM_SHARE("spriteram")
  580      AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE("share2")
  581      AM_RANGE(0x3800, 0x3fff) AM_READWRITE(dec8_bg_data_r, dec8_bg_data_w) AM_SHARE("bg_data")
  582      AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
  583      AM_RANGE(0x8000, 0xffff) AM_ROM
  584  ADDRESS_MAP_END
  585  
  586  static ADDRESS_MAP_START( lastmisn_sub_map, AS_PROGRAM, 8, dec8_state )
  587      AM_RANGE(0x0000, 0x0fff) AM_RAM AM_SHARE("share1")
  588      AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_split_lo_w) AM_SHARE("paletteram")
  589      AM_RANGE(0x1400, 0x17ff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_split_hi_w) AM_SHARE("paletteram2")
  590      AM_RANGE(0x1800, 0x1800) AM_READ_PORT("IN0")
  591      AM_RANGE(0x1801, 0x1801) AM_READ_PORT("IN1")
  592      AM_RANGE(0x1802, 0x1802) AM_READ_PORT("IN2")
  593      AM_RANGE(0x1803, 0x1803) AM_READ_PORT("DSW0")   /* Dip 1 */
  594      AM_RANGE(0x1804, 0x1804) AM_READ_PORT("DSW1")   /* Dip 2 */
  595      AM_RANGE(0x1800, 0x1804) AM_WRITE(shackled_int_w)
  596      AM_RANGE(0x1805, 0x1805) AM_WRITE(dec8_mxc06_karn_buffer_spriteram_w) /* DMA */
  597      AM_RANGE(0x1807, 0x1807) AM_WRITE(flip_screen_w)
  598      AM_RANGE(0x180c, 0x180c) AM_WRITE(dec8_sound_w)
  599      AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w)
  600      AM_RANGE(0x2800, 0x2fff) AM_WRITEONLY AM_SHARE("spriteram")
  601      AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE("share2")
  602      AM_RANGE(0x3800, 0x3fff) AM_READWRITE(dec8_bg_data_r, dec8_bg_data_w)
  603      AM_RANGE(0x4000, 0xffff) AM_ROM
  604  ADDRESS_MAP_END
  605  
  606  static ADDRESS_MAP_START( shackled_map, AS_PROGRAM, 8, dec8_state )
  607      AM_RANGE(0x0000, 0x0fff) AM_RAM AM_SHARE("share1")
  608      AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_split_lo_w) AM_SHARE("paletteram")
  609      AM_RANGE(0x1400, 0x17ff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_split_hi_w) AM_SHARE("paletteram2")
  610      AM_RANGE(0x1800, 0x1800) AM_READ_PORT("IN0")
  611      AM_RANGE(0x1801, 0x1801) AM_READ_PORT("IN1")
  612      AM_RANGE(0x1802, 0x1802) AM_READ_PORT("IN2")
  613      AM_RANGE(0x1803, 0x1803) AM_READ_PORT("DSW0")
  614      AM_RANGE(0x1804, 0x1804) AM_READ_PORT("DSW1")
  615      AM_RANGE(0x1800, 0x1804) AM_WRITE(shackled_int_w)
  616      AM_RANGE(0x1805, 0x1805) AM_WRITE(dec8_mxc06_karn_buffer_spriteram_w) /* DMA */
  617      AM_RANGE(0x1807, 0x1807) AM_WRITE(flip_screen_w)
  618      AM_RANGE(0x1809, 0x1809) AM_WRITE(lastmisn_scrollx_w) /* Scroll LSB */
  619      AM_RANGE(0x180b, 0x180b) AM_WRITE(lastmisn_scrolly_w) /* Scroll LSB */
  620      AM_RANGE(0x180c, 0x180c) AM_WRITE(dec8_sound_w)
  621      AM_RANGE(0x180d, 0x180d) AM_WRITE(shackled_control_w) /* Bank switch + Scroll MSB */
  622      AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w)
  623      AM_RANGE(0x2800, 0x2fff) AM_RAM AM_SHARE("spriteram")
  624      AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE("share2")
  625      AM_RANGE(0x3800, 0x3fff) AM_READWRITE(dec8_bg_data_r, dec8_bg_data_w) AM_SHARE("bg_data")
  626      AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
  627      AM_RANGE(0x8000, 0xffff) AM_ROM
  628  ADDRESS_MAP_END
  629  
  630  static ADDRESS_MAP_START( shackled_sub_map, AS_PROGRAM, 8, dec8_state )
  631      AM_RANGE(0x0000, 0x0fff) AM_RAM AM_SHARE("share1")
  632      AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_split_lo_w) AM_SHARE("paletteram")
  633      AM_RANGE(0x1400, 0x17ff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_split_hi_w) AM_SHARE("paletteram2")
  634      AM_RANGE(0x1800, 0x1800) AM_READ_PORT("IN0")
  635      AM_RANGE(0x1801, 0x1801) AM_READ_PORT("IN1")
  636      AM_RANGE(0x1802, 0x1802) AM_READ_PORT("IN2")
  637      AM_RANGE(0x1803, 0x1803) AM_READ_PORT("DSW0")
  638      AM_RANGE(0x1804, 0x1804) AM_READ_PORT("DSW1")
  639      AM_RANGE(0x1800, 0x1804) AM_WRITE(shackled_int_w)
  640      AM_RANGE(0x1805, 0x1805) AM_WRITE(dec8_mxc06_karn_buffer_spriteram_w) /* DMA */
  641      AM_RANGE(0x1806, 0x1806) AM_READ(i8751_h_r)
  642      AM_RANGE(0x1807, 0x1807) AM_READWRITE(i8751_l_r, flip_screen_w)
  643      AM_RANGE(0x1809, 0x1809) AM_WRITE(lastmisn_scrollx_w) /* Scroll LSB */
  644      AM_RANGE(0x180b, 0x180b) AM_WRITE(lastmisn_scrolly_w) /* Scroll LSB */
  645      AM_RANGE(0x180c, 0x180c) AM_WRITE(dec8_sound_w)
  646      AM_RANGE(0x180d, 0x180d) AM_WRITE(shackled_control_w) /* Bank switch + Scroll MSB */
  647      AM_RANGE(0x180e, 0x180f) AM_WRITE(shackled_i8751_w)
  648      AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w) AM_SHARE("videoram")
  649      AM_RANGE(0x2800, 0x2fff) AM_RAM AM_SHARE("spriteram")
  650      AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE("share2")
  651      AM_RANGE(0x3800, 0x3fff) AM_READWRITE(dec8_bg_data_r, dec8_bg_data_w)
  652      AM_RANGE(0x4000, 0xffff) AM_ROM
  653  ADDRESS_MAP_END
  654  
  655  static ADDRESS_MAP_START( gondo_map, AS_PROGRAM, 8, dec8_state )
  656      AM_RANGE(0x0000, 0x17ff) AM_RAM
  657      AM_RANGE(0x1800, 0x1fff) AM_RAM_WRITE(dec8_videoram_w) AM_SHARE("videoram")
  658      AM_RANGE(0x2000, 0x27ff) AM_READWRITE(dec8_bg_data_r, dec8_bg_data_w) AM_SHARE("bg_data")
  659      AM_RANGE(0x2800, 0x2bff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_split_lo_w) AM_SHARE("paletteram")
  660      AM_RANGE(0x2c00, 0x2fff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_split_hi_w) AM_SHARE("paletteram2")
  661      AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE("spriteram")   /* Sprites */
  662      AM_RANGE(0x3800, 0x3800) AM_READ_PORT("DSW0")       /* Dip 1 */
  663      AM_RANGE(0x3801, 0x3801) AM_READ_PORT("DSW1")       /* Dip 2 */
  664      AM_RANGE(0x380a, 0x380b) AM_READ(gondo_player_1_r)  /* Player 1 rotary */
  665      AM_RANGE(0x380c, 0x380d) AM_READ(gondo_player_2_r)  /* Player 2 rotary */
  666      AM_RANGE(0x380e, 0x380e) AM_READ_PORT("IN3")        /* VBL */
  667      AM_RANGE(0x380f, 0x380f) AM_READ_PORT("IN2")        /* Fire buttons */
  668      AM_RANGE(0x3810, 0x3810) AM_WRITE(dec8_sound_w)
  669      AM_RANGE(0x3818, 0x382f) AM_WRITE(gondo_scroll_w)
  670      AM_RANGE(0x3830, 0x3830) AM_WRITE(ghostb_bank_w) /* Bank + NMI enable */
  671      AM_RANGE(0x3838, 0x3838) AM_READ(i8751_h_r)
  672      AM_RANGE(0x3839, 0x3839) AM_READ(i8751_l_r)
  673      AM_RANGE(0x383a, 0x383b) AM_WRITE(dec8_i8751_w)
  674      AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
  675      AM_RANGE(0x8000, 0xffff) AM_ROM
  676  ADDRESS_MAP_END
  677  
  678  static ADDRESS_MAP_START( garyoret_map, AS_PROGRAM, 8, dec8_state )
  679      AM_RANGE(0x0000, 0x17ff) AM_RAM
  680      AM_RANGE(0x1800, 0x1fff) AM_RAM_WRITE(dec8_videoram_w) AM_SHARE("videoram")
  681      AM_RANGE(0x2000, 0x27ff) AM_READWRITE(dec8_bg_data_r, dec8_bg_data_w) AM_SHARE("bg_data")
  682      AM_RANGE(0x2800, 0x2bff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_split_lo_w) AM_SHARE("paletteram")
  683      AM_RANGE(0x2c00, 0x2fff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_split_hi_w) AM_SHARE("paletteram2")
  684      AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE("spriteram") /* Sprites */
  685      AM_RANGE(0x3800, 0x3800) AM_READ_PORT("DSW0")   /* Dip 1 */
  686      AM_RANGE(0x3801, 0x3801) AM_READ_PORT("DSW1")   /* Dip 2 */
  687      AM_RANGE(0x3808, 0x3808) AM_READNOP     /* ? */
  688      AM_RANGE(0x380a, 0x380a) AM_READ_PORT("IN1")    /* Player 2 + VBL */
  689      AM_RANGE(0x380b, 0x380b) AM_READ_PORT("IN0")    /* Player 1 */
  690      AM_RANGE(0x3810, 0x3810) AM_WRITE(dec8_sound_w)
  691      AM_RANGE(0x3818, 0x382f) AM_WRITE(gondo_scroll_w)
  692      AM_RANGE(0x3830, 0x3830) AM_WRITE(ghostb_bank_w) /* Bank + NMI enable */
  693      AM_RANGE(0x3838, 0x3839) AM_WRITE(dec8_i8751_w)
  694      AM_RANGE(0x383a, 0x383a) AM_READ(i8751_h_r)
  695      AM_RANGE(0x383b, 0x383b) AM_READ(i8751_l_r)
  696      AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
  697      AM_RANGE(0x8000, 0xffff) AM_ROM
  698  ADDRESS_MAP_END
  699  
  700  static ADDRESS_MAP_START( meikyuh_map, AS_PROGRAM, 8, dec8_state )
  701      AM_RANGE(0x0000, 0x0fff) AM_RAM
  702      AM_RANGE(0x1000, 0x17ff) AM_RAM
  703      AM_RANGE(0x1800, 0x1fff) AM_RAM_WRITE(dec8_videoram_w) AM_SHARE("videoram")
  704      AM_RANGE(0x2000, 0x27ff) AM_DEVREADWRITE_LEGACY("tilegen1", deco_bac06_pf_data_8bit_r, deco_bac06_pf_data_8bit_w)
  705      AM_RANGE(0x2800, 0x2bff) AM_RAM // colscroll? mirror?
  706      AM_RANGE(0x2c00, 0x2fff) AM_DEVREADWRITE_LEGACY("tilegen1", deco_bac06_pf_rowscroll_8bit_r, deco_bac06_pf_rowscroll_8bit_w)
  707      AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE("spriteram")
  708      AM_RANGE(0x3800, 0x3800) AM_READ_PORT("IN0")    /* Player 1 */
  709      AM_RANGE(0x3800, 0x3800) AM_WRITE(dec8_sound_w)
  710      AM_RANGE(0x3801, 0x3801) AM_READ_PORT("IN1")    /* Player 2 */
  711      AM_RANGE(0x3802, 0x3802) AM_READ_PORT("IN2")    /* Player 3 */
  712      AM_RANGE(0x3803, 0x3803) AM_READ_PORT("DSW0")   /* Start buttons + VBL */
  713      AM_RANGE(0x3820, 0x3820) AM_READ_PORT("DSW1")   /* Dip */
  714      AM_RANGE(0x3820, 0x3827) AM_DEVWRITE_LEGACY("tilegen1", deco_bac06_pf_control0_8bit_w)
  715      AM_RANGE(0x3830, 0x383f) AM_DEVREADWRITE_LEGACY("tilegen1", deco_bac06_pf_control1_8bit_r, deco_bac06_pf_control1_8bit_w)
  716      AM_RANGE(0x3840, 0x3840) AM_READ(i8751_h_r)
  717      AM_RANGE(0x3840, 0x3840) AM_WRITE(ghostb_bank_w)
  718      AM_RANGE(0x3860, 0x3860) AM_READ(i8751_l_r)
  719      AM_RANGE(0x3860, 0x3861) AM_WRITE(dec8_i8751_w)
  720      AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
  721      AM_RANGE(0x8000, 0xffff) AM_ROM
  722  ADDRESS_MAP_END
  723  
  724  static ADDRESS_MAP_START( csilver_map, AS_PROGRAM, 8, dec8_state )
  725      AM_RANGE(0x0000, 0x0fff) AM_RAM AM_SHARE("share1")
  726      AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_split_lo_w) AM_SHARE("paletteram")
  727      AM_RANGE(0x1400, 0x17ff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_split_hi_w) AM_SHARE("paletteram2")
  728      AM_RANGE(0x1800, 0x1800) AM_READ_PORT("IN1")
  729      AM_RANGE(0x1801, 0x1801) AM_READ_PORT("IN0")
  730      AM_RANGE(0x1803, 0x1803) AM_READ_PORT("IN2")
  731      AM_RANGE(0x1804, 0x1804) AM_READ_PORT("DSW1")   /* Dip 2 */
  732      AM_RANGE(0x1800, 0x1804) AM_WRITE(shackled_int_w)
  733      AM_RANGE(0x1805, 0x1805) AM_READ_PORT("DSW0") AM_WRITE(dec8_mxc06_karn_buffer_spriteram_w) /* Dip 1, DMA */
  734      AM_RANGE(0x1807, 0x1807) AM_WRITE(flip_screen_w)
  735      AM_RANGE(0x1808, 0x180b) AM_WRITE(dec8_scroll2_w)
  736      AM_RANGE(0x180c, 0x180c) AM_WRITE(dec8_sound_w)
  737      AM_RANGE(0x180d, 0x180d) AM_WRITE(csilver_control_w)
  738      AM_RANGE(0x180e, 0x180f) AM_WRITE(csilver_i8751_w)
  739      AM_RANGE(0x1c00, 0x1c00) AM_READ(i8751_h_r)
  740      AM_RANGE(0x1e00, 0x1e00) AM_READ(i8751_l_r)
  741      AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w)
  742      AM_RANGE(0x2800, 0x2fff) AM_RAM AM_SHARE("spriteram")
  743      AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE("share2")
  744      AM_RANGE(0x3800, 0x3fff) AM_READWRITE(dec8_bg_data_r, dec8_bg_data_w) AM_SHARE("bg_data")
  745      AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
  746      AM_RANGE(0x8000, 0xffff) AM_ROM
  747  ADDRESS_MAP_END
  748  
  749  static ADDRESS_MAP_START( csilver_sub_map, AS_PROGRAM, 8, dec8_state )
  750      AM_RANGE(0x0000, 0x0fff) AM_RAM AM_SHARE("share1")
  751      AM_RANGE(0x1000, 0x13ff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_split_lo_w) AM_SHARE("paletteram")
  752      AM_RANGE(0x1400, 0x17ff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_split_hi_w) AM_SHARE("paletteram2")
  753      AM_RANGE(0x1803, 0x1803) AM_READ_PORT("IN2")
  754      AM_RANGE(0x1804, 0x1804) AM_READ_PORT("DSW1")
  755      AM_RANGE(0x1800, 0x1804) AM_WRITE(shackled_int_w)
  756      AM_RANGE(0x1805, 0x1805) AM_READ_PORT("DSW0") AM_WRITE(dec8_mxc06_karn_buffer_spriteram_w) /* DMA */
  757      AM_RANGE(0x180c, 0x180c) AM_WRITE(dec8_sound_w)
  758      AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w) AM_SHARE("videoram")
  759      AM_RANGE(0x2800, 0x2fff) AM_RAM AM_SHARE("spriteram")
  760      AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE("share2")
  761      AM_RANGE(0x3800, 0x3fff) AM_READWRITE(dec8_bg_data_r, dec8_bg_data_w)
  762      AM_RANGE(0x4000, 0xffff) AM_ROM
  763  ADDRESS_MAP_END
  764  
  765  static ADDRESS_MAP_START( oscar_map, AS_PROGRAM, 8, dec8_state )
  766      AM_RANGE(0x0000, 0x0eff) AM_RAM AM_SHARE("share1")
  767      AM_RANGE(0x0f00, 0x0fff) AM_RAM
  768      AM_RANGE(0x1000, 0x1fff) AM_RAM AM_SHARE("share2")
  769      AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w) AM_SHARE("videoram")
  770      AM_RANGE(0x2800, 0x2fff) AM_DEVREADWRITE_LEGACY("tilegen1", deco_bac06_pf_data_8bit_r, deco_bac06_pf_data_8bit_w)
  771      AM_RANGE(0x3000, 0x37ff) AM_RAM AM_SHARE("spriteram") /* Sprites */
  772      AM_RANGE(0x3800, 0x3bff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_be_w) AM_SHARE("paletteram")
  773      AM_RANGE(0x3c00, 0x3c00) AM_READ_PORT("IN0")
  774      AM_RANGE(0x3c01, 0x3c01) AM_READ_PORT("IN1")
  775      AM_RANGE(0x3c02, 0x3c02) AM_READ_PORT("IN2")    /* VBL & coins */
  776      AM_RANGE(0x3c03, 0x3c03) AM_READ_PORT("DSW0")   /* Dip 1 */
  777      AM_RANGE(0x3c04, 0x3c04) AM_READ_PORT("DSW1")
  778      AM_RANGE(0x3c00, 0x3c07) AM_DEVWRITE_LEGACY("tilegen1", deco_bac06_pf_control0_8bit_w)
  779      AM_RANGE(0x3c10, 0x3c1f) AM_DEVWRITE_LEGACY("tilegen1", deco_bac06_pf_control1_8bit_w)
  780      AM_RANGE(0x3c80, 0x3c80) AM_WRITE(dec8_mxc06_karn_buffer_spriteram_w)   /* DMA */
  781      AM_RANGE(0x3d00, 0x3d00) AM_WRITE(dec8_bank_w)          /* BNKS */
  782      AM_RANGE(0x3d80, 0x3d80) AM_WRITE(dec8_sound_w)         /* SOUN */
  783      AM_RANGE(0x3e00, 0x3e00) AM_WRITENOP            /* COINCL */
  784      AM_RANGE(0x3e80, 0x3e83) AM_WRITE(oscar_int_w)
  785      AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
  786      AM_RANGE(0x8000, 0xffff) AM_ROM
  787  ADDRESS_MAP_END
  788  
  789  static ADDRESS_MAP_START( oscar_sub_map, AS_PROGRAM, 8, dec8_state )
  790      AM_RANGE(0x0000, 0x0eff) AM_RAM AM_SHARE("share1")
  791      AM_RANGE(0x0f00, 0x0fff) AM_RAM
  792      AM_RANGE(0x1000, 0x1fff) AM_RAM AM_SHARE("share2")
  793      AM_RANGE(0x3e80, 0x3e83) AM_WRITE(oscar_int_w)
  794      AM_RANGE(0x4000, 0xffff) AM_ROM
  795  ADDRESS_MAP_END
  796  
  797  static ADDRESS_MAP_START( srdarwin_map, AS_PROGRAM, 8, dec8_state )
  798      AM_RANGE(0x0000, 0x05ff) AM_RAM
  799      AM_RANGE(0x0600, 0x07ff) AM_RAM AM_SHARE("spriteram")
  800      AM_RANGE(0x0800, 0x0fff) AM_RAM_WRITE(srdarwin_videoram_w) AM_SHARE("videoram")
  801      AM_RANGE(0x1000, 0x13ff) AM_RAM
  802      AM_RANGE(0x1400, 0x17ff) AM_READWRITE(dec8_bg_data_r, dec8_bg_data_w) AM_SHARE("bg_data")
  803      AM_RANGE(0x1800, 0x1801) AM_WRITE(srdarwin_i8751_w)
  804      AM_RANGE(0x1802, 0x1802) AM_WRITE(i8751_reset_w)        /* Maybe.. */
  805      AM_RANGE(0x1803, 0x1803) AM_WRITENOP            /* NMI ack */
  806      AM_RANGE(0x1804, 0x1804) AM_DEVWRITE("spriteram", buffered_spriteram8_device, write) /* DMA */
  807      AM_RANGE(0x1805, 0x1806) AM_WRITE(srdarwin_control_w) /* Scroll & Bank */
  808      AM_RANGE(0x2000, 0x2000) AM_READWRITE(i8751_h_r, dec8_sound_w)  /* Sound */
  809      AM_RANGE(0x2001, 0x2001) AM_READWRITE(i8751_l_r, flip_screen_w)     /* Flipscreen */
  810      AM_RANGE(0x2800, 0x288f) AM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_split_lo_w) AM_SHARE("paletteram")
  811      AM_RANGE(0x3000, 0x308f) AM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_split_hi_w) AM_SHARE("paletteram2")
  812      AM_RANGE(0x3800, 0x3800) AM_READ_PORT("DSW0")   /* Dip 1 */
  813      AM_RANGE(0x3801, 0x3801) AM_READ_PORT("IN0")    /* Player 1 */
  814      AM_RANGE(0x3802, 0x3802) AM_READ_PORT("IN1")    /* Player 2 (cocktail) + VBL */
  815      AM_RANGE(0x3803, 0x3803) AM_READ_PORT("DSW1")   /* Dip 2 */
  816      AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
  817      AM_RANGE(0x8000, 0xffff) AM_ROM
  818  ADDRESS_MAP_END
  819  
  820  static ADDRESS_MAP_START( cobra_map, AS_PROGRAM, 8, dec8_state )
  821      AM_RANGE(0x0000, 0x07ff) AM_RAM
  822      AM_RANGE(0x0800, 0x0fff) AM_DEVREADWRITE_LEGACY("tilegen1", deco_bac06_pf_data_8bit_r, deco_bac06_pf_data_8bit_w)
  823      AM_RANGE(0x1000, 0x17ff) AM_DEVREADWRITE_LEGACY("tilegen2", deco_bac06_pf_data_8bit_r, deco_bac06_pf_data_8bit_w)
  824      AM_RANGE(0x1800, 0x1fff) AM_RAM
  825      AM_RANGE(0x2000, 0x27ff) AM_RAM_WRITE(dec8_videoram_w) AM_SHARE("videoram")
  826      AM_RANGE(0x2800, 0x2fff) AM_RAM AM_SHARE("spriteram")
  827      AM_RANGE(0x3000, 0x31ff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_be_w) AM_SHARE("paletteram")
  828      AM_RANGE(0x3200, 0x37ff) AM_WRITEONLY /* Unused */
  829      AM_RANGE(0x3800, 0x3800) AM_READ_PORT("IN0")    /* Player 1 */
  830      AM_RANGE(0x3801, 0x3801) AM_READ_PORT("IN1")    /* Player 2 */
  831      AM_RANGE(0x3802, 0x3802) AM_READ_PORT("DSW0")   /* Dip 1 */
  832      AM_RANGE(0x3803, 0x3803) AM_READ_PORT("DSW1")   /* Dip 2 */
  833      AM_RANGE(0x3800, 0x3807) AM_DEVWRITE_LEGACY("tilegen1", deco_bac06_pf_control0_8bit_w)
  834      AM_RANGE(0x3810, 0x381f) AM_DEVWRITE_LEGACY("tilegen1", deco_bac06_pf_control1_8bit_w)
  835      AM_RANGE(0x3a00, 0x3a00) AM_READ_PORT("IN2")    /* VBL & coins */
  836      AM_RANGE(0x3a00, 0x3a07) AM_DEVWRITE_LEGACY("tilegen2", deco_bac06_pf_control0_8bit_w)
  837      AM_RANGE(0x3a10, 0x3a1f) AM_DEVWRITE_LEGACY("tilegen2", deco_bac06_pf_control1_8bit_w)
  838      AM_RANGE(0x3c00, 0x3c00) AM_WRITE(dec8_bank_w)
  839      AM_RANGE(0x3c02, 0x3c02) AM_WRITE(dec8_mxc06_karn_buffer_spriteram_w) /* DMA */
  840      AM_RANGE(0x3e00, 0x3e00) AM_WRITE(dec8_sound_w)
  841      AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1")
  842      AM_RANGE(0x8000, 0xffff) AM_ROM
  843  ADDRESS_MAP_END
  844  
  845  /******************************************************************************/
  846  
  847  /* Used for Cobra Command, Maze Hunter, Super Real Darwin etc */
  848  static ADDRESS_MAP_START( dec8_s_map, AS_PROGRAM, 8, dec8_state )
  849      AM_RANGE(0x0000, 0x05ff) AM_RAM
  850      AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
  851      AM_RANGE(0x4000, 0x4001) AM_DEVWRITE_LEGACY("ym2", ym3812_w)
  852      AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r)
  853      AM_RANGE(0x8000, 0xffff) AM_ROM
  854  ADDRESS_MAP_END
  855  
  856  /* Used by Gondomania, Psycho-Nics Oscar & Garyo Retsuden */
  857  static ADDRESS_MAP_START( oscar_s_map, AS_PROGRAM, 8, dec8_state )
  858      AM_RANGE(0x0000, 0x05ff) AM_RAM
  859      AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
  860      AM_RANGE(0x4000, 0x4001) AM_DEVWRITE_LEGACY("ym2", ym3526_w)
  861      AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r)
  862      AM_RANGE(0x8000, 0xffff) AM_ROM
  863  ADDRESS_MAP_END
  864  
  865  /* Used by Last Mission, Shackled & Breywood */
  866  static ADDRESS_MAP_START( ym3526_s_map, AS_PROGRAM, 8, dec8_state )
  867      AM_RANGE(0x0000, 0x05ff) AM_RAM
  868      AM_RANGE(0x0800, 0x0801) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
  869      AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym2", ym3526_w)
  870      AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r)
  871      AM_RANGE(0x8000, 0xffff) AM_ROM
  872  ADDRESS_MAP_END
  873  
  874  /* Captain Silver - same sound system as Pocket Gal */
  875  static ADDRESS_MAP_START( csilver_s_map, AS_PROGRAM, 8, dec8_state )
  876      AM_RANGE(0x0000, 0x07ff) AM_RAM
  877      AM_RANGE(0x0800, 0x0801) AM_DEVWRITE_LEGACY("ym1", ym2203_w)
  878      AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym2", ym3526_w)
  879      AM_RANGE(0x1800, 0x1800) AM_WRITE(csilver_adpcm_data_w) /* ADPCM data for the MSM5205 chip */
  880      AM_RANGE(0x2000, 0x2000) AM_WRITE(csilver_sound_bank_w)
  881      AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r)
  882      AM_RANGE(0x3400, 0x3400) AM_READ(csilver_adpcm_reset_r) /* ? not sure */
  883      AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank3")
  884      AM_RANGE(0x8000, 0xffff) AM_ROM
  885  ADDRESS_MAP_END
  886  
  887  /******************************************************************************/
  888  
  889  /*
  890      Gondomania schematics show the following:
  891  
  892      Port P0 - attached to 2 * LS374 at location 4C & 1C
  893      Port P1 - attached to 2 * LS374 at location 3C & 2C
  894      Port P2.2 -> SECIRQ (IRQ to main CPU)
  895      Port P2.3 -> 'COUNT' (Enable coin counter - also wired directly to coinage) [not emulated]
  896      Port P2.4-7 -> Enable latches 4C, 1C, 3C, 2C
  897      Port P3.4-7 -> Directly attached to coinage connector (3 coins & service)
  898  
  899  */
  900  
  901  READ8_MEMBER(dec8_state::dec8_mcu_from_main_r)
  902  {
  903      switch (offset)
  904      {
  905          case 0:
  906              return m_i8751_port0;
  907          case 1:
  908              return m_i8751_port1;
  909          case 2:
  910              return 0xff;
  911          case 3:
  912              return ioport("I8751")->read();
  913      }
  914  
  915      return 0xff; //compile safe.
  916  }
  917  
  918  WRITE8_MEMBER(dec8_state::dec8_mcu_to_main_w)
  919  {
  920      // Outputs P0 and P1 are latched
  921      if (offset==0) m_i8751_port0=data;
  922      else if (offset==1) m_i8751_port1=data;
  923  
  924      // P2 - controls latches for main CPU communication
  925      if (offset==2 && (data&0x10)==0)
  926          m_i8751_port0 = m_i8751_value>>8;
  927      if (offset==2 && (data&0x20)==0)
  928          m_i8751_port1 = m_i8751_value&0xff;
  929      if (offset==2 && (data&0x40)==0)
  930          m_i8751_return = (m_i8751_return & 0xff) | (m_i8751_port0 << 8);
  931      if (offset==2 && (data&0x80)==0)
  932          m_i8751_return = (m_i8751_return & 0xff00) | m_i8751_port1;
  933  
  934      // P2 - IRQ to main CPU
  935      if (offset==2 && (data&4)==0)
  936          m_maincpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
  937  }
  938  
  939  static ADDRESS_MAP_START( dec8_mcu_io_map, AS_IO, 8, dec8_state )
  940      AM_RANGE(MCS51_PORT_P0,MCS51_PORT_P3) AM_READWRITE(dec8_mcu_from_main_r, dec8_mcu_to_main_w)
  941  ADDRESS_MAP_END
  942  
  943  /******************************************************************************/
  944  
  945  #define PLAYER1_JOYSTICK /* Player 1 controls */ \
  946      PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY \
  947      PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY \
  948      PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY \
  949      PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
  950  
  951  #define PLAYER2_JOYSTICK /* Player 2 controls */ \
  952      PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_COCKTAIL \
  953      PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_COCKTAIL \
  954      PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_COCKTAIL \
  955      PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
  956  
  957  
  958  /* verified from M6809 code - coinage needs further checking when the MCU is available */
  959  static INPUT_PORTS_START( lastmisn )
  960      PORT_START("IN0")
  961      PLAYER1_JOYSTICK
  962      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )                 /* shoot */
  963      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )                 /* bomb */
  964      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )                 /* select */
  965      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  966  
  967      PORT_START("IN1")
  968      PLAYER2_JOYSTICK
  969      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL   /* shoot */
  970      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL   /* bomb */
  971      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL   /* select */
  972      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  973  
  974      PORT_START("IN2")
  975      PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  976      PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  977      PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
  978      PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
  979      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
  980      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  981      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  982      PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
  983  
  984      PORT_START("DSW0")
  985      PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
  986      PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
  987      PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
  988      PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
  989      PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
  990      PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
  991      PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
  992      PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
  993      PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
  994      PORT_DIPSETTING(    0x04, DEF_STR( 1C_3C ) )
  995      PORT_DIPNAME( 0x10, 0x00, DEF_STR( Demo_Sounds ) )
  996      PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  997      PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  998      PORT_DIPNAME( 0x20, 0x00, DEF_STR( Cabinet ) )
  999      PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
 1000      PORT_DIPSETTING(    0x20, DEF_STR( Cocktail ) )
 1001      PORT_DIPNAME( 0x40, 0x40, "Invulnerability (Cheat)")
 1002      PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
 1003      PORT_DIPSETTING(    0x00, DEF_STR( On ) )
 1004      PORT_DIPNAME( 0x80, 0x80, "Infinite Lives (Cheat)")
 1005      PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
 1006      PORT_DIPSETTING(    0x00, DEF_STR( On ) )
 1007  
 1008      PORT_START("DSW1")
 1009      PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) )
 1010      PORT_DIPSETTING(    0x01, "3" )
 1011      PORT_DIPSETTING(    0x00, "5" )
 1012      PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) )       /* tables at 0x82c1 (4 words) and 0xde38 (3 words) in 'lastmisn', 0x82c1 and 0xde17 in 'lastmisno' */
 1013      PORT_DIPSETTING(    0x06, "30k 70k 70k+" )
 1014      PORT_DIPSETTING(    0x04, "40k 90k 90k+" )
 1015      PORT_DIPSETTING(    0x02, "40k and 80k" )
 1016      PORT_DIPSETTING(    0x00, "50k only" )
 1017      PORT_DIPNAME( 0x18, 0x18, DEF_STR( Difficulty ) )
 1018      PORT_DIPSETTING(    0x18, DEF_STR( Easy ) )
 1019      PORT_DIPSETTING(    0x10, DEF_STR( Normal ) )
 1020      PORT_DIPSETTING(    0x08, DEF_STR( Hard ) )
 1021      PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
 1022      PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW )
 1023      PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW )
 1024      PORT_DIPNAME( 0x80, 0x00, DEF_STR( Allow_Continue ) )
 1025      PORT_DIPSETTING(    0x80, DEF_STR( No ) )
 1026      PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
 1027  INPUT_PORTS_END
 1028  
 1029  /* verified from M6809 code - coinage needs further checking when the MCU is available */
 1030  static INPUT_PORTS_START( lastmisnj )
 1031      PORT_INCLUDE(lastmisn)
 1032  
 1033      PORT_MODIFY("DSW1")
 1034      PORT_DIPNAME( 0x06, 0x06, DEF_STR( Bonus_Life ) )       /* tables at 0x82b7 (4 words) and 0xdd29 (3 words) */
 1035      PORT_DIPSETTING(    0x06, "30k 50k 50k+" )
 1036      PORT_DIPSETTING(    0x04, "30k 70k 70k+" )
 1037      PORT_DIPSETTING(    0x02, "50k 100k 100k+" )
 1038      PORT_DIPSETTING(    0x00, "50k only" )
 1039      PORT_DIPNAME( 0x18, 0x18, DEF_STR( Difficulty ) )
 1040      PORT_DIPSETTING(    0x18, DEF_STR( Normal ) )
 1041      PORT_DIPSETTING(    0x10, DEF_STR( Hard ) )             /* "difficult" */
 1042      PORT_DIPSETTING(    0x08, DEF_STR( Very_Hard ) )        /* "very difficult" */
 1043      PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )          /* "top difficult" */
 1044      PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW )
 1045  INPUT_PORTS_END
 1046  
 1047  
 1048  /* verified from M6809 code */
 1049  static INPUT_PORTS_START( shackled )
 1050      PORT_START("IN0")
 1051      PLAYER1_JOYSTICK
 1052      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
 1053      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
 1054      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
 1055      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
 1056  
 1057      PORT_START("IN1")
 1058      PLAYER2_JOYSTICK
 1059      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
 1060      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
 1061      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
 1062      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
 1063  
 1064      PORT_START("IN2")
 1065      PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
 1066      PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
 1067      PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
 1068      PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
 1069      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
 1070      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
 1071      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
 1072      PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
 1073  
 1074      PORT_START("DSW0")
 1075      PORT_DIPNAME( 0x01, 0x01, DEF_STR( Flip_Screen ) )
 1076      PORT_DIPSETTING(    0x01, DEF_STR( Off ) )
 1077      PORT_DIPSETTING(    0x00, DEF_STR( On ) )
 1078      PORT_DIPUNUSED( 0x02, IP_ACTIVE_LOW )
 1079      PORT_DIPUNUSED( 0x04, IP_ACTIVE_LOW )
 1080      PORT_DIPUNUSED( 0x08, IP_ACTIVE_LOW )
 1081      PORT_DIPNAME( 0x10, 0x10, "Leave Off" )                 /* game doesn't boot when this is On - code at 0x401a - related to MCU - "dias" in Dip Switches page */
 1082      PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
 1083      PORT_DIPSETTING(    0x00, DEF_STR( On ) )
 1084      PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW )
 1085      PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW )
 1086      PORT_DIPNAME( 0x80, 0x80, "Freeze" )
 1087      PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
 1088      PORT_DIPSETTING(    0x00, DEF_STR( On ) )
 1089  
 1090      PORT_START("DSW1")
 1091      /* tables in main CPU : 0x859b (Help), 0x85e9 (6-Help), 0x8fbe (Coin), 0x91b6 (Heart) */
 1092      PORT_DIPNAME( 0x07, 0x07, "Coin/Heart/Help/6-Help" )    /* name from Dip Switches page */
 1093      PORT_DIPSETTING( 0x00, "2/100/50/200" )
 1094      PORT_DIPSETTING( 0x01, "4/100/60/300" )
 1095      PORT_DIPSETTING( 0x02, "6/200/70/300" )
 1096      PORT_DIPSETTING( 0x03, "8/200/80/400" )
 1097      PORT_DIPSETTING( 0x07, "10/200/100/500" )
 1098      PORT_DIPSETTING( 0x06, "12/300/100/600" )
 1099      PORT_DIPSETTING( 0x05, "18/400/200/700" )
 1100      PORT_DIPSETTING( 0x04, "20/500/200/800" )
 1101      PORT_DIPUNUSED( 0x08, IP_ACTIVE_LOW )
 1102      PORT_DIPNAME( 0x30, 0x30, DEF_STR( Difficulty ) )
 1103      PORT_DIPSETTING(    0x30, DEF_STR( Normal ) )
 1104      PORT_DIPSETTING(    0x20, DEF_STR( Hard ) )
 1105      PORT_DIPSETTING(    0x10, DEF_STR( Very_Hard ) )
 1106      PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
 1107      PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW )
 1108      PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) )
 1109      PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
 1110      PORT_DIPSETTING(    0x00, DEF_STR( On ) )
 1111  INPUT_PORTS_END
 1112  
 1113  /* verified from M6809 code */
 1114  static INPUT_PORTS_START( breywood )
 1115      PORT_INCLUDE(shackled)
 1116  
 1117      PORT_MODIFY("DSW1")
 1118      PORT_DIPNAME( 0x0f, 0x0f, "Power" )                     /* table at 0x41be in sub CPU */
 1119      PORT_DIPSETTING( 0x07, "200" )
 1120      PORT_DIPSETTING( 0x0b, "300" )
 1121      PORT_DIPSETTING( 0x03, "400" )
 1122      PORT_DIPSETTING( 0x0d, "500" )
 1123      PORT_DIPSETTING( 0x05, "600" )
 1124      PORT_DIPSETTING( 0x09, "700" )
 1125      PORT_DIPSETTING( 0x01, "800" )
 1126      PORT_DIPSETTING( 0x0e, "900" )
 1127      PORT_DIPSETTING( 0x0f, "1000" )
 1128      PORT_DIPSETTING( 0x06, "2000" )
 1129      PORT_DIPSETTING( 0x0a, "3000" )
 1130      PORT_DIPSETTING( 0x02, "4000" )
 1131      PORT_DIPSETTING( 0x0c, "5000" )
 1132      PORT_DIPSETTING( 0x04, "6000" )
 1133      PORT_DIPSETTING( 0x08, "7000" )
 1134      PORT_DIPSETTING( 0x00, "8000" )
 1135  INPUT_PORTS_END
 1136  
 1137  
 1138  /* verified from HD6309 code - 'makyosen' coinage needs further checking when its REAL MCU is available */
 1139  static INPUT_PORTS_START( gondo )
 1140      PORT_START("IN0")
 1141      PLAYER1_JOYSTICK
 1142      /* Top 4 bits are rotary controller */
 1143  
 1144      PORT_START("IN1")
 1145      PLAYER2_JOYSTICK
 1146      /* Top 4 bits are rotary controller */
 1147  
 1148      PORT_START("IN2")
 1149      PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )
 1150      PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 )
 1151      PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
 1152      PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
 1153      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1154      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1155      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1156      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1157  
 1158      PORT_START("IN3")
 1159      PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
 1160      PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
 1161      PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1162      PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1163      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1164      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1165      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1166      PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
 1167  
 1168      PORT_START("I8751") /* hooked up on the i8751 */
 1169      /* Low 4 bits not connected on schematics */
 1170      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
 1171      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
 1172      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
 1173      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 )              /* produces sound but gives 0 credits - coinage not initialised in the MCU */
 1174  
 1175      PORT_START("AN0")   /* player 1 12-way rotary control */
 1176      PORT_BIT( 0x0f, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(15) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_REVERSE PORT_FULL_TURN_COUNT(12)
 1177  
 1178      PORT_START("AN1")   /* player 2 12-way rotary control */
 1179      PORT_BIT( 0x0f, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(15) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_N) PORT_CODE_INC(KEYCODE_M) PORT_PLAYER(2) PORT_REVERSE PORT_FULL_TURN_COUNT(12)
 1180  
 1181      PORT_START("DSW0")
 1182      PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )           /* table at 0x01b8 in MCU (4 bytes : coins in 4 MSbits and credits in 4 LSbits) */
 1183      PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
 1184      PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
 1185      PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
 1186      PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
 1187      PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )           /* table at 0x01bc in MCU (4 bytes : coins in 4 MSbits and credits in 4 LSbits) */
 1188      PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
 1189      PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
 1190      PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
 1191      PORT_DIPSETTING(    0x04, DEF_STR( 1C_3C ) )
 1192      PORT_DIPUNUSED( 0x10, IP_ACTIVE_LOW )
 1193      PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
 1194      PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
 1195      PORT_DIPSETTING(    0x20, DEF_STR( On ) )
 1196      PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) )
 1197      PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
 1198      PORT_DIPSETTING(    0x00, DEF_STR( On ) )
 1199      PORT_DIPNAME( 0x80, 0x80, "Swap buttons" )              /* code at 0x8a2b in 'gondo', 0x88c5 in 'makyosen' - undocumented in the manual */
 1200      PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
 1201      PORT_DIPSETTING(    0x00, DEF_STR( On ) )
 1202  
 1203      PORT_START("DSW1")
 1204      PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
 1205      PORT_DIPSETTING(    0x01, "1" )
 1206      PORT_DIPSETTING(    0x03, "3" )
 1207      PORT_DIPSETTING(    0x02, "5" )
 1208      PORT_DIPSETTING(    0x00, "Infinite (Cheat)")           /* gives 99 lives */
 1209      PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) )
 1210      PORT_DIPSETTING(    0x08, DEF_STR( Easy ) )
 1211      PORT_DIPSETTING(    0x0c, DEF_STR( Normal ) )
 1212      PORT_DIPSETTING(    0x04, DEF_STR( Hard ) )
 1213      PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
 1214      PORT_DIPNAME( 0x10, 0x00, DEF_STR( Allow_Continue ) )
 1215      PORT_DIPSETTING(    0x10, DEF_STR( No ) )
 1216      PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
 1217      PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW )
 1218      PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW )
 1219      PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW )
 1220  INPUT_PORTS_END
 1221  
 1222  
 1223  /* verified from HD6309 code - coinage needs further checking when the MCU is available */
 1224  static INPUT_PORTS_START( garyoret )
 1225      PORT_START("IN0")
 1226      PLAYER1_JOYSTICK
 1227      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )                 /* shoot */
 1228      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )                 /* bomb */
 1229      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
 1230      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
 1231  
 1232      PORT_START("IN1")
 1233      PLAYER2_JOYSTICK
 1234      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)  /* shoot */
 1235      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)  /* bomb */
 1236      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1237      PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
 1238  
 1239      PORT_START("I8751") /* hooked up on the (fake) i8751 */
 1240      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
 1241      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
 1242      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
 1243      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 )              /* produces sound but gives 0 credits - coinage not initialised in the (fake) MCU */
 1244  
 1245      PORT_START("DSW0")
 1246      PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
 1247      PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
 1248      PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
 1249      PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
 1250      PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
 1251      PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
 1252      PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
 1253      PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
 1254      PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
 1255      PORT_DIPSETTING(    0x04, DEF_STR( 1C_3C ) )
 1256      PORT_DIPUNUSED( 0x10, IP_ACTIVE_LOW )
 1257      PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
 1258      PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
 1259      PORT_DIPSETTING(    0x20, DEF_STR( On ) )
 1260      PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) )
 1261      PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
 1262      PORT_DIPSETTING(    0x00, DEF_STR( On ) )
 1263      PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW )                   /* not tested - no cocktail when simultaneous players anyway */
 1264  
 1265      PORT_START("DSW1")
 1266      PORT_DIPNAME( 0x01, 0x01, DEF_STR( Lives ) )
 1267      PORT_DIPSETTING(    0x01, "3" )
 1268      PORT_DIPSETTING(    0x00, "5" )
 1269      PORT_DIPUNUSED( 0x02, IP_ACTIVE_LOW )
 1270      PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) )
 1271      PORT_DIPSETTING(    0x08, DEF_STR( Easy ) )
 1272      PORT_DIPSETTING(    0x0c, DEF_STR( Normal ) )
 1273      PORT_DIPSETTING(    0x04, DEF_STR( Hard ) )
 1274      PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
 1275      PORT_DIPUNUSED( 0x10, IP_ACTIVE_LOW )
 1276      PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW )
 1277      PORT_DIPNAME( 0x40, 0x40, "Leave Off" )                 /* game doesn't boot when this is On - code at 0x807f and test at 0x819e */
 1278      PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
 1279      PORT_DIPSETTING(    0x00, DEF_STR( On ) )
 1280      PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW )
 1281  INPUT_PORTS_END
 1282  
 1283  
 1284  /* verified from HD6309 code */
 1285  static INPUT_PORTS_START( ghostb )
 1286      PORT_START("IN0")
 1287      PLAYER1_JOYSTICK
 1288      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)  /* "FIRE" */
 1289      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)  /* beam / upgradable shot when out of energy */
 1290      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1291      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1292  
 1293      PORT_START("IN1")
 1294      PLAYER2_JOYSTICK
 1295      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)  /* "FIRE" */
 1296      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)  /* beam / upgradable shot when out of energy */
 1297      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1298      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1299  
 1300      PORT_START("IN2")
 1301      PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1302      PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1303      PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1304      PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1305      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1306      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1307      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1308      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1309  
 1310      PORT_START("I8751")
 1311      /* Low 4 bits not connected on schematics */
 1312      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
 1313      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
 1314      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
 1315      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 )              /* produce sound but gives 0 credits - "ANDA" instruction at 0x8a5a */
 1316  
 1317      PORT_START("DSW0")
 1318      PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
 1319      PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
 1320      PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1321      PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
 1322      PORT_DIPUNUSED( 0x10, IP_ACTIVE_LOW )
 1323      PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
 1324      PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
 1325      PORT_DIPSETTING(    0x20, DEF_STR( On ) )
 1326      PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) )
 1327      PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
 1328      PORT_DIPSETTING(    0x00, DEF_STR( On ) )
 1329      PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW )                   /* not tested - no cocktail when simultaneous players anyway */
 1330  
 1331      PORT_START("DSW1")
 1332      PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )            /* lives are added when STARTn is pressed */
 1333      PORT_DIPSETTING(    0x01, "1" )
 1334      PORT_DIPSETTING(    0x03, "3" )
 1335      PORT_DIPSETTING(    0x02, "5" )
 1336      PORT_DIPSETTING(    0x00, "Invulnerability (Cheat)")    /* gives 1 life */
 1337      PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) )
 1338      PORT_DIPSETTING(    0x08, DEF_STR( Easy ) )
 1339      PORT_DIPSETTING(    0x0c, DEF_STR( Normal ) )
 1340      PORT_DIPSETTING(    0x04, DEF_STR( Hard ) )
 1341      PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
 1342      PORT_DIPNAME( 0x30, 0x30, "Max Scene Time" )            /* 1:00 is added when STARTn is pressed until max scene time is reached */
 1343      PORT_DIPSETTING(    0x00, "4:00" )
 1344      PORT_DIPSETTING(    0x10, "4:30" )
 1345      PORT_DIPSETTING(    0x30, "5:00" )
 1346      PORT_DIPSETTING(    0x20, "6:00" )
 1347      PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) )
 1348      PORT_DIPSETTING(    0x40, DEF_STR( No ) )
 1349      PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
 1350      PORT_DIPNAME( 0x80, 0x80, "Energy Bonus" )              /* energy is set to value each new life */
 1351      PORT_DIPSETTING(    0x80, DEF_STR( None ) )             /* 0x0100 */
 1352      PORT_DIPSETTING(    0x00, "+25%" )                      /* 0x0140 */
 1353  INPUT_PORTS_END
 1354  
 1355  /* verified from HD6309 code */
 1356  static INPUT_PORTS_START( ghostb2a )
 1357      PORT_INCLUDE(ghostb)
 1358  
 1359      /* BUTTON1 : upgradable shot - BUTTON2 : beam (provided you have energy) */
 1360  
 1361      PORT_MODIFY("I8751")
 1362      /* Low 4 bits not connected on schematics */
 1363      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
 1364      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
 1365      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
 1366      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 )              /* produce sound but gives 0 lives - "ANDA" instruction at 0x8a20 */
 1367  
 1368      PORT_MODIFY("DSW0")
 1369      /* NO start buttons - to start a game, press any button from any player */
 1370      PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1371      PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1372  
 1373      PORT_MODIFY("DSW1")
 1374      /* lives are added when COINn is pressed */
 1375      /* 1:00 is added when COINn is pressed until max scene time is reached */
 1376      PORT_DIPNAME( 0x80, 0x80, "Energy Bonus" )              /* energy is added when COINn is pressed */
 1377      PORT_DIPSETTING(    0x80, DEF_STR( None ) )             /* 0x0040 */
 1378      PORT_DIPSETTING(    0x00, "+50%" )                      /* 0x0060 */
 1379  INPUT_PORTS_END
 1380  
 1381  /* verified from HD6309 code */
 1382  static INPUT_PORTS_START( ghostb3 )
 1383      PORT_INCLUDE(ghostb2a)
 1384  
 1385      PORT_MODIFY("IN2")
 1386      PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_PLAYER(3)
 1387      PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_PLAYER(3)
 1388      PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_PLAYER(3)
 1389      PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(3)
 1390      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)  /* upgradable shot */
 1391      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)  /* beam (provided you have energy) */
 1392  
 1393      PORT_MODIFY("I8751")
 1394      /* Low 4 bits not connected on schematics */
 1395      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
 1396      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
 1397      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
 1398      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 )
 1399  INPUT_PORTS_END
 1400  
 1401  /* verified from HD6309 code */
 1402  static INPUT_PORTS_START( meikyuh )
 1403      PORT_INCLUDE(ghostb)
 1404  
 1405      PORT_MODIFY("I8751")
 1406      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
 1407      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3 )              /* gives 4 credits for 14 coins ! */
 1408      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
 1409      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
 1410  
 1411      /* BUTTON1 : upgradable shot - BUTTON2 : circular fire (provided you have energy) - BUTTON1 + BUTTON2 : beam (provided you have energy) */
 1412  
 1413      PORT_MODIFY("DSW1")
 1414      /* lives are added when STARTn is pressed - 1 extra life is awarded on 2nd credit and after for the same player who gets then 2, 4 or 6 additional lives */
 1415      /* max time scene is always 6:00 at start - 0:30 is subed every 8 levels - 1:00 is added when STARTn is pressed until max scene time is reached */
 1416      PORT_DIPNAME( 0x10, 0x10, "Energy Bonus" )              /* energy is added when STARTn is pressed */
 1417      PORT_DIPSETTING(    0x10, DEF_STR( None ) )             /* 0x0020 */
 1418      PORT_DIPSETTING(    0x00, "+50%" )                      /* 0x0030 */
 1419      PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW )
 1420      PORT_DIPNAME( 0x80, 0x80, "Freeze" )
 1421      PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
 1422      PORT_DIPSETTING(    0x00, DEF_STR( On ) )
 1423  INPUT_PORTS_END
 1424  
 1425  
 1426  /* verified from M6809 code - coinage needs further checking when the MCU is available */
 1427  static INPUT_PORTS_START( csilver )
 1428      PORT_START("IN0")
 1429      PLAYER1_JOYSTICK
 1430      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )                 /* sword */
 1431      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )                 /* jump */
 1432      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1433      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1434  
 1435      PORT_START("IN1")
 1436      PLAYER2_JOYSTICK
 1437      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL   /* sword */
 1438      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL   /* jump */
 1439      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1440      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1441  
 1442      PORT_START("IN2")
 1443      PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
 1444      PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
 1445      PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
 1446      PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START2 )
 1447      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1448      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1449      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1450      PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
 1451  
 1452      PORT_START("DSW0")
 1453      PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
 1454      PORT_DIPSETTING(    0x03, DEF_STR( 1C_2C ) )
 1455      PORT_DIPSETTING(    0x02, DEF_STR( 1C_3C ) )
 1456      PORT_DIPSETTING(    0x01, DEF_STR( 1C_4C ) )
 1457      PORT_DIPSETTING(    0x00, DEF_STR( 1C_6C ) )
 1458      PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
 1459      PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
 1460      PORT_DIPSETTING(    0x04, DEF_STR( 3C_1C ) )
 1461      PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
 1462      PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
 1463      PORT_DIPUNUSED( 0x10, IP_ACTIVE_LOW )
 1464      PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
 1465      PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
 1466      PORT_DIPSETTING(    0x20, DEF_STR( On ) )
 1467      PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) )
 1468      PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
 1469      PORT_DIPSETTING(    0x00, DEF_STR( On ) )
 1470      PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )
 1471      PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
 1472      PORT_DIPSETTING(    0x80, DEF_STR( Cocktail ) )
 1473  
 1474      PORT_START("DSW1")
 1475      PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
 1476      PORT_DIPSETTING(    0x01, "1" )
 1477      PORT_DIPSETTING(    0x03, "3" )
 1478      PORT_DIPSETTING(    0x02, "5" )
 1479      PORT_DIPSETTING(    0x00, "255 (Cheat)")
 1480      PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) )
 1481      PORT_DIPSETTING(    0x08, DEF_STR( Easy ) )
 1482      PORT_DIPSETTING(    0x0c, DEF_STR( Normal ) )
 1483      PORT_DIPSETTING(    0x04, DEF_STR( Hard ) )
 1484      PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
 1485      PORT_DIPNAME( 0x10, 0x10, DEF_STR( Allow_Continue ) )
 1486      PORT_DIPSETTING(    0x00, DEF_STR( No ) )
 1487      PORT_DIPSETTING(    0x10, DEF_STR( Yes ) )
 1488      PORT_DIPUNUSED( 0x20, IP_ACTIVE_LOW )
 1489      PORT_DIPNAME( 0x40, 0x40, "No Key for Door (Cheat)")    /* code at 0x9816 in sub CPU */
 1490      PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
 1491      PORT_DIPSETTING(    0x00, DEF_STR( On ) )
 1492      PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW )
 1493  INPUT_PORTS_END
 1494  
 1495  /* verified from M6809 code - coinage needs further checking when the MCU is available */
 1496  static INPUT_PORTS_START( csilverj )
 1497      PORT_INCLUDE(csilver)
 1498  
 1499      PORT_MODIFY("DSW0")
 1500      PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
 1501      PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
 1502      PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
 1503      PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
 1504      PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
 1505      PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
 1506      PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
 1507      PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
 1508      PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
 1509      PORT_DIPSETTING(    0x04, DEF_STR( 1C_3C ) )
 1510  INPUT_PORTS_END
 1511  
 1512  
 1513  /* verified from HD6309 code */
 1514  static INPUT_PORTS_START( oscar )
 1515      PORT_START("IN0")
 1516      PLAYER1_JOYSTICK
 1517      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )                 /* shoot */
 1518      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )                 /* jump */
 1519      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )                 /* select */
 1520      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
 1521  
 1522      PORT_START("IN1")
 1523      PLAYER2_JOYSTICK
 1524      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL   /* shoot */
 1525      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL   /* jump */
 1526      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL   /* select */
 1527      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
 1528  
 1529      PORT_START("IN2")
 1530      PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
 1531      PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
 1532      PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )           /* always adds 1 credit */
 1533      PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1534      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1535      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1536      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1537      PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
 1538  
 1539      PORT_START("DSW0")
 1540      PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )           /* table at 0xf8e3 (4 * 2 bytes : coins then credits) */
 1541      PORT_DIPSETTING(    0x03, DEF_STR( 1C_2C ) )
 1542      PORT_DIPSETTING(    0x02, DEF_STR( 1C_3C ) )
 1543      PORT_DIPSETTING(    0x01, DEF_STR( 1C_4C ) )
 1544      PORT_DIPSETTING(    0x00, DEF_STR( 1C_6C ) )
 1545      PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )           /* table at 0xf8eb (4 * 2 bytes : coins then credits) */
 1546      PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
 1547      PORT_DIPSETTING(    0x04, DEF_STR( 3C_1C ) )
 1548      PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
 1549      PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
 1550      PORT_DIPNAME( 0x10, 0x10, "Freeze Mode" )
 1551      PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
 1552      PORT_DIPSETTING(    0x00, DEF_STR( On ) )
 1553      PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
 1554      PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
 1555      PORT_DIPSETTING(    0x20, DEF_STR( On ) )
 1556      PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) )
 1557      PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
 1558      PORT_DIPSETTING(    0x00, DEF_STR( On ) )
 1559      PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )
 1560      PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
 1561      PORT_DIPSETTING(    0x80, DEF_STR( Cocktail ) )
 1562  
 1563      PORT_START("DSW1")
 1564      PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
 1565      PORT_DIPSETTING(    0x01, "1" )
 1566      PORT_DIPSETTING(    0x03, "3" )
 1567      PORT_DIPSETTING(    0x02, "5" )
 1568      PORT_DIPSETTING(    0x00, "Infinite (Cheat)")
 1569      PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) )
 1570      PORT_DIPSETTING(    0x08, DEF_STR( Easy ) )
 1571      PORT_DIPSETTING(    0x0c, DEF_STR( Normal ) )
 1572      PORT_DIPSETTING(    0x04, DEF_STR( Hard ) )
 1573      PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
 1574      PORT_DIPNAME( 0x30, 0x30, DEF_STR( Bonus_Life ) )       /* tables at 0x82d8 (4 words) and 0xf3fe (3 words) */
 1575      PORT_DIPSETTING(    0x30, "40k 100k 60k+" )
 1576      PORT_DIPSETTING(    0x20, "60k 160k 100k+" )
 1577      PORT_DIPSETTING(    0x10, "90k 240k 150k+" )
 1578      PORT_DIPSETTING(    0x00, "50k only" )
 1579      PORT_DIPNAME( 0x40, 0x40, "Invulnerability (Cheat)")    /* not when falling into void or water - also gives infinite time */
 1580      PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
 1581      PORT_DIPSETTING(    0x00, DEF_STR( On ) )
 1582      PORT_DIPNAME( 0x80, 0x80, DEF_STR( Allow_Continue ) )
 1583      PORT_DIPSETTING(    0x00, DEF_STR( No ) )
 1584      PORT_DIPSETTING(    0x80, DEF_STR( Yes ) )
 1585  INPUT_PORTS_END
 1586  
 1587  /* verified from HD6309 code */
 1588  static INPUT_PORTS_START( oscarj )
 1589      PORT_INCLUDE(oscar)
 1590  
 1591      PORT_MODIFY("DSW0")
 1592      PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )           /* table at 0xf8d6 (4 * 2 bytes : coins then credits) in 'oscarj1', 0xf8e6 in 'oscarj2', 0xf8f2 in 'oscaru' */
 1593      PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
 1594      PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
 1595      PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
 1596      PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
 1597      PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )           /* table at 0xf8de (4 * 2 bytes : coins then credits) in 'oscarj1', 0xf8ee in 'oscarj2', 0xf8fa in 'oscaru' */
 1598      PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
 1599      PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
 1600      PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
 1601      PORT_DIPSETTING(    0x04, DEF_STR( 1C_3C ) )
 1602  
 1603      /* bonus lives : tables at 0x82d8 (4 words) and 0xf3f1 (3 words) in 'oscarj1', 0x82de and 0xf401 in 'orscarj2', 0x82d8 and 0xf412 in 'orscaru' - same as in 'oscar' */
 1604  INPUT_PORTS_END
 1605  
 1606  
 1607  /* verified from M6809 code - coinage needs further checking when the MCU is available */
 1608  static INPUT_PORTS_START( srdarwin )
 1609      PORT_START("IN0")
 1610      PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
 1611      PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY
 1612      PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY
 1613      PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY
 1614      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
 1615      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
 1616      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
 1617      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
 1618  
 1619      PORT_START("IN1")
 1620      PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
 1621      PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )  PORT_8WAY PORT_COCKTAIL
 1622      PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )    PORT_8WAY PORT_COCKTAIL
 1623      PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )  PORT_8WAY PORT_COCKTAIL
 1624      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
 1625      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
 1626      PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
 1627      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1628  
 1629      PORT_START("I8751") /* Fake port for i8751 */
 1630      PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
 1631      PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
 1632  
 1633      PORT_START("DSW0")
 1634      PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
 1635      PORT_DIPSETTING(    0x03, DEF_STR( 1C_2C ) )
 1636      PORT_DIPSETTING(    0x02, DEF_STR( 1C_3C ) )
 1637      PORT_DIPSETTING(    0x01, DEF_STR( 1C_4C ) )
 1638      PORT_DIPSETTING(    0x00, DEF_STR( 1C_6C ) )
 1639      PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
 1640      PORT_DIPSETTING(    0x00, DEF_STR( 4C_1C ) )
 1641      PORT_DIPSETTING(    0x04, DEF_STR( 3C_1C ) )
 1642      PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
 1643      PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
 1644      PORT_DIPUNUSED( 0x10, IP_ACTIVE_LOW )
 1645      PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
 1646      PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
 1647      PORT_DIPSETTING(    0x20, DEF_STR( On ) )
 1648      PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) )
 1649      PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
 1650      PORT_DIPSETTING(    0x00, DEF_STR( On ) )
 1651      PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )
 1652      PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
 1653      PORT_DIPSETTING(    0x80, DEF_STR( Cocktail ) )
 1654  
 1655      PORT_START("DSW1")
 1656      PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
 1657      PORT_DIPSETTING(    0x01, "1" )
 1658      PORT_DIPSETTING(    0x03, "3" )
 1659      PORT_DIPSETTING(    0x02, "5" )
 1660      PORT_DIPSETTING(    0x00, "28 (Cheat)")
 1661      PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) )
 1662      PORT_DIPSETTING(    0x08, DEF_STR( Easy ) )
 1663      PORT_DIPSETTING(    0x0c, DEF_STR( Normal ) )
 1664      PORT_DIPSETTING(    0x04, DEF_STR( Hard ) )
 1665      PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
 1666      PORT_DIPNAME( 0x10, 0x10, DEF_STR( Bonus_Life ) )
 1667      PORT_DIPSETTING(    0x10, "Every 50k" )                 /* table at 0xab06 - last bonus life at 850k */
 1668      PORT_DIPSETTING(    0x00, "Every 100k" )                /* table at 0xab17 - last bonus life at 900k */
 1669      PORT_DIPNAME( 0x20, 0x20, "After Stage 10" )            /* code at 0xab94 */
 1670      PORT_DIPSETTING(    0x20, "Back to Stage 1" )
 1671      PORT_DIPSETTING(    0x00, "Game Over" )
 1672      PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW )
 1673      PORT_DIPNAME( 0x80, 0x80, DEF_STR( Allow_Continue ) )
 1674      PORT_DIPSETTING(    0x00, DEF_STR( No ) )
 1675      PORT_DIPSETTING(    0x80, DEF_STR( Yes ) )
 1676  INPUT_PORTS_END
 1677  
 1678  /* verified from M6809 code - coinage needs further checking when the MCU is available */
 1679  static INPUT_PORTS_START( srdarwinj )
 1680      PORT_INCLUDE(srdarwin)
 1681  
 1682      PORT_MODIFY("DSW0")
 1683      PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
 1684      PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
 1685      PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
 1686      PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
 1687      PORT_DIPSETTING(    0x01, DEF_STR( 1C_3C ) )
 1688      PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )
 1689      PORT_DIPSETTING(    0x00, DEF_STR( 2C_1C ) )
 1690      PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
 1691      PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
 1692      PORT_DIPSETTING(    0x04, DEF_STR( 1C_3C ) )
 1693  INPUT_PORTS_END
 1694  
 1695  
 1696  /* verified from M6809 code */
 1697  static INPUT_PORTS_START( cobracom )
 1698      PORT_START("IN0")
 1699      PLAYER1_JOYSTICK
 1700      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )                 /* fire */
 1701      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )                 /* missile */
 1702      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1703      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
 1704  
 1705      PORT_START("IN1")
 1706      PLAYER2_JOYSTICK
 1707      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)  /* fire */
 1708      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)  /* missile */
 1709      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1710      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
 1711  
 1712      PORT_START("IN2")
 1713      PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
 1714      PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
 1715      PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )           /* always adds 1 credit */
 1716      PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1717      PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1718      PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1719      PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
 1720      PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen")
 1721  
 1722      PORT_START("DSW0")
 1723      PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )           /* code at 0x88b7 in 'cobracom', 0x890e in 'cobracomj' */
 1724      PORT_DIPSETTING(    0x00, DEF_STR( 3C_1C ) )
 1725      PORT_DIPSETTING(    0x01, DEF_STR( 2C_1C ) )
 1726      PORT_DIPSETTING(    0x03, DEF_STR( 1C_1C ) )
 1727      PORT_DIPSETTING(    0x02, DEF_STR( 1C_2C ) )
 1728      PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) )           /* code at 0x889b in 'cobracom', 0x88f2 in 'cobracomj' */
 1729      PORT_DIPSETTING(    0x00, DEF_STR( 3C_1C ) )
 1730      PORT_DIPSETTING(    0x04, DEF_STR( 2C_1C ) )
 1731      PORT_DIPSETTING(    0x0c, DEF_STR( 1C_1C ) )
 1732      PORT_DIPSETTING(    0x08, DEF_STR( 1C_2C ) )
 1733      PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
 1734      PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
 1735      PORT_DIPSETTING(    0x00, DEF_STR( On ) )
 1736      PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) )
 1737      PORT_DIPSETTING(    0x00, DEF_STR( Off ) )
 1738      PORT_DIPSETTING(    0x20, DEF_STR( On ) )
 1739      PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) )
 1740      PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
 1741      PORT_DIPSETTING(    0x00, DEF_STR( On ) )
 1742      PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) )
 1743      PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
 1744      PORT_DIPSETTING(    0x80, DEF_STR( Cocktail ) )
 1745  
 1746      PORT_START("DSW1")
 1747      PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
 1748      PORT_DIPSETTING(    0x03, "3" )
 1749      PORT_DIPSETTING(    0x02, "4" )
 1750      PORT_DIPSETTING(    0x01, "5" )
 1751      PORT_DIPSETTING(    0x00, "99 (Cheat)")                 /* lose a life before getting 2nd bonus life ! */
 1752      PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) )
 1753      PORT_DIPSETTING(    0x08, DEF_STR( Easy ) )
 1754      PORT_DIPSETTING(    0x0c, DEF_STR( Normal ) )
 1755      PORT_DIPSETTING(    0x04, DEF_STR( Hard ) )
 1756      PORT_DIPSETTING(    0x00, DEF_STR( Hardest ) )
 1757      PORT_DIPNAME( 0x10, 0x10, DEF_STR( Allow_Continue ) )
 1758      PORT_DIPSETTING(    0x00, DEF_STR( No ) )
 1759      PORT_DIPSETTING(    0x10, DEF_STR( Yes ) )
 1760      PORT_DIPNAME( 0x20, 0x20, DEF_STR( Bonus_Life ) )       /* table at 0xa898 (2* 2 words) in 'cobracomj', 0xa8fe in 'cobracomj' */
 1761      PORT_DIPSETTING(    0x20, "50k and 150k" )
 1762      PORT_DIPSETTING(    0x00, "100k and 200k" )
 1763      PORT_DIPUNUSED( 0x40, IP_ACTIVE_LOW )
 1764      PORT_DIPUNUSED( 0x80, IP_ACTIVE_LOW )                   /* previously "Freeze" : code at 0x8849 in 'cobracomj', 0x88a0 in 'cobracomj' */
 1765  INPUT_PORTS_END
 1766  
 1767  /******************************************************************************/
 1768  
 1769  static const gfx_layout charlayout_32k =
 1770  {
 1771      8,8,
 1772      1024,
 1773      2,
 1774      { 0x4000*8,0x0000*8 },
 1775      { 0, 1, 2, 3, 4, 5, 6, 7 },
 1776      { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
 1777      8*8 /* every sprite takes 8 consecutive bytes */
 1778  };
 1779  
 1780  static const gfx_layout chars_3bpp =
 1781  {
 1782      8,8,
 1783      1024,
 1784      3,
 1785      { 0x6000*8,0x4000*8,0x2000*8 },
 1786      { 0, 1, 2, 3, 4, 5, 6, 7 },
 1787      { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
 1788      8*8 /* every sprite takes 8 consecutive bytes */
 1789  };
 1790  
 1791  /* SRDarwin characters - very unusual layout for Data East */
 1792  static const gfx_layout charlayout_16k =
 1793  {
 1794      8,8,    /* 8*8 characters */
 1795      1024,
 1796      2,  /* 2 bits per pixel */
 1797      { 0, 4 },   /* the two bitplanes for 4 pixels are packed into one byte */
 1798      { 0x2000*8+0, 0x2000*8+1, 0x2000*8+2, 0x2000*8+3, 0, 1, 2, 3 },
 1799      { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
 1800      8*8 /* every char takes 8 consecutive bytes */
 1801  };
 1802  
 1803  static const gfx_layout oscar_charlayout =
 1804  {
 1805      8,8,
 1806      1024,
 1807      3,
 1808      { 0x3000*8,0x2000*8,0x1000*8 },
 1809      { 0, 1, 2, 3, 4, 5, 6, 7 },
 1810      { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
 1811      8*8 /* every sprite takes 8 consecutive bytes */
 1812  };
 1813  
 1814  /* Darwin sprites - only 3bpp */
 1815  static const gfx_layout sr_sprites =
 1816  {
 1817      16,16,
 1818      2048,
 1819      3,
 1820      { 0x10000*8,0x20000*8,0x00000*8 },
 1821      { 16*8, 1+(16*8), 2+(16*8), 3+(16*8), 4+(16*8), 5+(16*8), 6+(16*8), 7+(16*8),
 1822          0,1,2,3,4,5,6,7 },
 1823      { 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 },
 1824      16*16
 1825  };
 1826  
 1827  static const gfx_layout srdarwin_tiles =
 1828  {
 1829      16,16,
 1830      256,
 1831      4,
 1832      { 0x8000*8, 0x8000*8+4, 0, 4 },
 1833      { 0, 1, 2, 3, 1024*8*8+0, 1024*8*8+1, 1024*8*8+2, 1024*8*8+3,
 1834              16*8+0, 16*8+1, 16*8+2, 16*8+3, 16*8+1024*8*8+0, 16*8+1024*8*8+1, 16*8+1024*8*8+2, 16*8+1024*8*8+3 },
 1835      { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8,
 1836              8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8, 15*8 },
 1837      32*8    /* every tile takes 32 consecutive bytes */
 1838  };
 1839  
 1840  static const gfx_layout tiles =
 1841  {
 1842      16,16,
 1843      4096,
 1844      4,
 1845      { 0x60000*8,0x40000*8,0x20000*8,0x00000*8 },
 1846      { 16*8, 1+(16*8), 2+(16*8), 3+(16*8), 4+(16*8), 5+(16*8), 6+(16*8), 7+(16*8),
 1847          0,1,2,3,4,5,6,7 },
 1848      { 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},
 1849      16*16
 1850  };
 1851  
 1852  /* X flipped on Ghostbusters tiles */
 1853  static const gfx_layout tiles_r =
 1854  {
 1855      16,16,
 1856      2048,
 1857      4,
 1858      { 0x20000*8,0x00000*8,0x30000*8,0x10000*8 },
 1859      { 7,6,5,4,3,2,1,0,
 1860          7+(16*8), 6+(16*8), 5+(16*8), 4+(16*8), 3+(16*8), 2+(16*8), 1+(16*8), 0+(16*8) },
 1861      { 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},
 1862      16*16
 1863  };
 1864  
 1865  static GFXDECODE_START( cobracom )
 1866      GFXDECODE_ENTRY( "gfx1", 0, charlayout_32k, 0, 8 )
 1867      GFXDECODE_ENTRY( "gfx2", 0, tiles,       64, 4 )
 1868      GFXDECODE_ENTRY( "gfx4", 0, tiles,      128, 4 )
 1869      GFXDECODE_ENTRY( "gfx3", 0, tiles,      192, 4 )
 1870  GFXDECODE_END
 1871  
 1872  static GFXDECODE_START( ghostb )
 1873      GFXDECODE_ENTRY( "gfx1", 0, chars_3bpp, 0,  4 )
 1874      GFXDECODE_ENTRY( "gfx2", 0, tiles,   256, 16 )
 1875      GFXDECODE_ENTRY( "gfx3", 0, tiles_r,   512, 16 )
 1876  GFXDECODE_END
 1877  
 1878  static GFXDECODE_START( srdarwin )
 1879      GFXDECODE_ENTRY( "gfx1", 0x00000, charlayout_16k,128, 4 ) /* Only 1 used so far :/ */
 1880      GFXDECODE_ENTRY( "gfx2", 0x00000, sr_sprites,    64, 8 )
 1881      GFXDECODE_ENTRY( "gfx3", 0x00000, srdarwin_tiles,  0, 8 )
 1882      GFXDECODE_ENTRY( "gfx3", 0x10000, srdarwin_tiles,  0, 8 )
 1883      GFXDECODE_ENTRY( "gfx3", 0x20000, srdarwin_tiles,  0, 8 )
 1884      GFXDECODE_ENTRY( "gfx3", 0x30000, srdarwin_tiles,  0, 8 )
 1885  GFXDECODE_END
 1886  
 1887  static GFXDECODE_START( gondo )
 1888      GFXDECODE_ENTRY( "gfx1", 0, chars_3bpp,  0, 16 ) /* Chars */
 1889      GFXDECODE_ENTRY( "gfx2", 0, tiles,   256, 32 ) /* Sprites */
 1890      GFXDECODE_ENTRY( "gfx3", 0, tiles,   768, 16 ) /* Tiles */
 1891  GFXDECODE_END
 1892  
 1893  static GFXDECODE_START( oscar )
 1894      GFXDECODE_ENTRY( "gfx1", 0, oscar_charlayout, 256,  8 ) /* Chars */
 1895      GFXDECODE_ENTRY( "gfx2", 0, tiles,            0, 16 ) /* Sprites */
 1896      GFXDECODE_ENTRY( "gfx3", 0, tiles,          384,  8 ) /* Tiles */
 1897  GFXDECODE_END
 1898  
 1899  static GFXDECODE_START( shackled )
 1900      GFXDECODE_ENTRY( "gfx1", 0, chars_3bpp,   0,  4 )
 1901      GFXDECODE_ENTRY( "gfx2", 0, tiles,    256, 16 )
 1902      GFXDECODE_ENTRY( "gfx3", 0, tiles,    768, 16 )
 1903  GFXDECODE_END
 1904  
 1905  /******************************************************************************/
 1906  
 1907  /* handler called by the 3812 emulator when the internal timers cause an IRQ */
 1908  static void irqhandler( device_t *device, int linestate )
 1909  {
 1910      dec8_state *state = device->machine().driver_data<dec8_state>();
 1911      state->m_audiocpu->set_input_line(0, linestate); /* M6502_IRQ_LINE */
 1912  }
 1913  
 1914  static const ym3526_interface ym3526_config =
 1915  {
 1916      DEVCB_CPU_INPUT_LINE("audiocpu", M6502_IRQ_LINE)
 1917  };
 1918  
 1919  static const ym3812_interface ym3812_config =
 1920  {
 1921      irqhandler
 1922  };
 1923  
 1924  static const msm5205_interface msm5205_config =
 1925  {
 1926      csilver_adpcm_int,  /* interrupt function */
 1927      MSM5205_S48_4B      /* 8KHz            */
 1928  };
 1929  
 1930  /******************************************************************************/
 1931  
 1932  INTERRUPT_GEN_MEMBER(dec8_state::gondo_interrupt)
 1933  {
 1934      if (m_nmi_enable)
 1935          device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE); /* VBL */
 1936  }
 1937  
 1938  /* Coins generate NMI's */
 1939  INTERRUPT_GEN_MEMBER(dec8_state::oscar_interrupt)
 1940  {
 1941      if ((ioport("IN2")->read() & 0x7) == 0x7) m_latch = 1;
 1942      if (m_latch && (ioport("IN2")->read() & 0x7) != 0x7)
 1943      {
 1944          m_latch = 0;
 1945          device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
 1946      }
 1947  }
 1948  
 1949  /******************************************************************************/
 1950  
 1951  
 1952  void dec8_state::machine_start()
 1953  {
 1954      m_maincpu = machine().device<cpu_device>("maincpu");
 1955      m_subcpu = machine().device<cpu_device>("sub");
 1956      m_audiocpu = machine().device<cpu_device>("audiocpu");
 1957      m_mcu = machine().device("mcu");
 1958  
 1959      save_item(NAME(m_latch));
 1960      save_item(NAME(m_nmi_enable));
 1961      save_item(NAME(m_i8751_port0));
 1962      save_item(NAME(m_i8751_port1));
 1963      save_item(NAME(m_i8751_return));
 1964      save_item(NAME(m_i8751_value));
 1965      save_item(NAME(m_coinage_id));
 1966      save_item(NAME(m_coin1));
 1967      save_item(NAME(m_coin2));
 1968      save_item(NAME(m_need1));
 1969      save_item(NAME(m_need2));
 1970      save_item(NAME(m_cred1));
 1971      save_item(NAME(m_cred2));
 1972      save_item(NAME(m_credits));
 1973      save_item(NAME(m_snd));
 1974      save_item(NAME(m_msm5205next));
 1975      save_item(NAME(m_toggle));
 1976  
 1977      save_item(NAME(m_scroll2));
 1978      save_item(NAME(m_bg_control));
 1979      save_item(NAME(m_pf1_control));
 1980  }
 1981  
 1982  void dec8_state::machine_reset()
 1983  {
 1984      int i;
 1985  
 1986      m_nmi_enable = m_i8751_port0 = m_i8751_port1 = 0;
 1987      m_i8751_return = m_i8751_value = 0;
 1988      m_coinage_id = 0;
 1989      m_coin1 = m_coin2 = m_credits = m_snd = 0;
 1990      m_need1 = m_need2 = m_cred1 = m_cred2 = 1;
 1991      m_msm5205next = 0;
 1992      m_toggle = 0;
 1993  
 1994      m_scroll2[0] = m_scroll2[1] = m_scroll2[2] = m_scroll2[3] = 0;
 1995      for (i = 0; i < 0x20; i++)
 1996      {
 1997          m_bg_control[i] = 0;
 1998          m_pf1_control[i] = 0;
 1999      }
 2000  }
 2001  
 2002  
 2003  /* TODO: These are raw guesses, only to get ~57,41 Hz, assume to be the same as dec0 */
 2004  #define DEC8_PIXEL_CLOCK XTAL_20MHz/4
 2005  #define DEC8_HTOTAL 256+74
 2006  #define DEC8_HBEND 0
 2007  #define DEC8_HBSTART 256
 2008  #define DEC8_VTOTAL 264
 2009  #define DEC8_VBEND 8
 2010  #define DEC8_VBSTART 256-8
 2011  
 2012  static MACHINE_CONFIG_START( lastmisn, dec8_state )
 2013  
 2014      /* basic machine hardware */
 2015      MCFG_CPU_ADD("maincpu", M6809, 2000000)
 2016      MCFG_CPU_PROGRAM_MAP(lastmisn_map)
 2017  
 2018      MCFG_CPU_ADD("sub", M6809, 2000000)
 2019      MCFG_CPU_PROGRAM_MAP(lastmisn_sub_map)
 2020  
 2021      MCFG_CPU_ADD("audiocpu", M6502, 1500000)
 2022      MCFG_CPU_PROGRAM_MAP(ym3526_s_map)
 2023                                  /* NMIs are caused by the main CPU */
 2024      MCFG_QUANTUM_TIME(attotime::from_hz(12000))
 2025  
 2026  
 2027      /* video hardware */
 2028      MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
 2029  
 2030      MCFG_DEVICE_ADD("spritegen", DECO_KARNOVSPRITES, 0)
 2031      deco_karnovsprites_device::set_gfx_region(*device, 1);
 2032  
 2033      MCFG_SCREEN_ADD("screen", RASTER)
 2034  //  MCFG_SCREEN_REFRESH_RATE(58)
 2035  //  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */)
 2036  //  MCFG_SCREEN_SIZE(32*8, 32*8)
 2037  //  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
 2038      MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART)
 2039      MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_lastmisn)
 2040  
 2041      MCFG_GFXDECODE(shackled)
 2042      MCFG_PALETTE_LENGTH(1024)
 2043  
 2044      MCFG_VIDEO_START_OVERRIDE(dec8_state,lastmisn)
 2045  
 2046      /* sound hardware */
 2047      MCFG_SPEAKER_STANDARD_MONO("mono")
 2048  
 2049      MCFG_SOUND_ADD("ym1", YM2203, 1500000)
 2050      MCFG_SOUND_ROUTE(0, "mono", 0.23)
 2051      MCFG_SOUND_ROUTE(1, "mono", 0.23)
 2052      MCFG_SOUND_ROUTE(2, "mono", 0.23)
 2053      MCFG_SOUND_ROUTE(3, "mono", 0.20)
 2054  
 2055      MCFG_SOUND_ADD("ym2", YM3526, 3000000)
 2056      MCFG_SOUND_CONFIG(ym3526_config)
 2057      MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
 2058  MACHINE_CONFIG_END
 2059  
 2060  static MACHINE_CONFIG_START( shackled, dec8_state )
 2061  
 2062      /* basic machine hardware */
 2063      MCFG_CPU_ADD("maincpu", M6809, 2000000)
 2064      MCFG_CPU_PROGRAM_MAP(shackled_map)
 2065  
 2066      MCFG_CPU_ADD("sub", M6809, 2000000)
 2067      MCFG_CPU_PROGRAM_MAP(shackled_sub_map)
 2068  
 2069      MCFG_CPU_ADD("audiocpu", M6502, 1500000)
 2070      MCFG_CPU_PROGRAM_MAP(ym3526_s_map)
 2071                                  /* NMIs are caused by the main CPU */
 2072  
 2073  //  MCFG_QUANTUM_TIME(attotime::from_hz(100000))
 2074      MCFG_QUANTUM_PERFECT_CPU("maincpu") // needs heavy sync, otherwise one of the two CPUs will miss an irq and makes the game to hang
 2075  
 2076      /* video hardware */
 2077      MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
 2078  
 2079      MCFG_DEVICE_ADD("spritegen", DECO_KARNOVSPRITES, 0)
 2080      deco_karnovsprites_device::set_gfx_region(*device, 1);
 2081  
 2082      MCFG_SCREEN_ADD("screen", RASTER)
 2083  //  MCFG_SCREEN_REFRESH_RATE(58)
 2084  //  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */)
 2085  //  MCFG_SCREEN_SIZE(32*8, 32*8)
 2086  //  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
 2087      MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART)
 2088      MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_shackled)
 2089  
 2090      MCFG_GFXDECODE(shackled)
 2091      MCFG_PALETTE_LENGTH(1024)
 2092  
 2093      MCFG_VIDEO_START_OVERRIDE(dec8_state,shackled)
 2094  
 2095      /* sound hardware */
 2096      MCFG_SPEAKER_STANDARD_MONO("mono")
 2097  
 2098      MCFG_SOUND_ADD("ym1", YM2203, 1500000)
 2099      MCFG_SOUND_ROUTE(0, "mono", 0.23)
 2100      MCFG_SOUND_ROUTE(1, "mono", 0.23)
 2101      MCFG_SOUND_ROUTE(2, "mono", 0.23)
 2102      MCFG_SOUND_ROUTE(3, "mono", 0.20)
 2103  
 2104      MCFG_SOUND_ADD("ym2", YM3526, 3000000)
 2105      MCFG_SOUND_CONFIG(ym3526_config)
 2106      MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
 2107  MACHINE_CONFIG_END
 2108  
 2109  static MACHINE_CONFIG_START( gondo, dec8_state )
 2110  
 2111      /* basic machine hardware */
 2112      MCFG_CPU_ADD("maincpu", HD6309,3000000*4) /* HD63C09EP */
 2113      MCFG_CPU_PROGRAM_MAP(gondo_map)
 2114      MCFG_CPU_VBLANK_INT_DRIVER("screen", dec8_state,  gondo_interrupt)
 2115  
 2116      MCFG_CPU_ADD("audiocpu", M6502, 1500000)
 2117      MCFG_CPU_PROGRAM_MAP(oscar_s_map)
 2118                                  /* NMIs are caused by the main CPU */
 2119  
 2120      MCFG_CPU_ADD("mcu", I8751, XTAL_8MHz)
 2121      MCFG_CPU_IO_MAP(dec8_mcu_io_map)
 2122  
 2123  
 2124      /* video hardware */
 2125      MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
 2126  
 2127      MCFG_DEVICE_ADD("spritegen", DECO_KARNOVSPRITES, 0)
 2128      deco_karnovsprites_device::set_gfx_region(*device, 1);
 2129  
 2130      MCFG_SCREEN_ADD("screen", RASTER)
 2131  //  MCFG_SCREEN_REFRESH_RATE(58)
 2132  //  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */)
 2133  //  MCFG_SCREEN_SIZE(32*8, 32*8)
 2134  //  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
 2135      MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART)
 2136      MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_gondo)
 2137      MCFG_SCREEN_VBLANK_DRIVER(dec8_state, screen_eof_dec8)
 2138  
 2139      MCFG_GFXDECODE(gondo)
 2140      MCFG_PALETTE_LENGTH(1024)
 2141  
 2142      MCFG_VIDEO_START_OVERRIDE(dec8_state,gondo)
 2143  
 2144      /* sound hardware */
 2145      MCFG_SPEAKER_STANDARD_MONO("mono")
 2146  
 2147      MCFG_SOUND_ADD("ym1", YM2203, 1500000)
 2148      MCFG_SOUND_ROUTE(0, "mono", 0.23)
 2149      MCFG_SOUND_ROUTE(1, "mono", 0.23)
 2150      MCFG_SOUND_ROUTE(2, "mono", 0.23)
 2151      MCFG_SOUND_ROUTE(3, "mono", 0.20)
 2152  
 2153      MCFG_SOUND_ADD("ym2", YM3526, 3000000)
 2154      MCFG_SOUND_CONFIG(ym3526_config)
 2155      MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
 2156  MACHINE_CONFIG_END
 2157  
 2158  static MACHINE_CONFIG_START( garyoret, dec8_state )
 2159  
 2160      /* basic machine hardware */
 2161      MCFG_CPU_ADD("maincpu", HD6309,3000000*4) /* HD63C09EP */
 2162      MCFG_CPU_PROGRAM_MAP(garyoret_map)
 2163      MCFG_CPU_VBLANK_INT_DRIVER("screen", dec8_state,  gondo_interrupt)
 2164  
 2165      MCFG_CPU_ADD("audiocpu", M6502, 1500000)
 2166      MCFG_CPU_PROGRAM_MAP(oscar_s_map)
 2167                                  /* NMIs are caused by the main CPU */
 2168  
 2169      MCFG_CPU_ADD("mcu", I8751, XTAL_8MHz)
 2170      MCFG_CPU_IO_MAP(dec8_mcu_io_map)
 2171  
 2172  
 2173      /* video hardware */
 2174      MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
 2175  
 2176      MCFG_DEVICE_ADD("spritegen", DECO_KARNOVSPRITES, 0)
 2177      deco_karnovsprites_device::set_gfx_region(*device, 1);
 2178  
 2179      MCFG_SCREEN_ADD("screen", RASTER)
 2180  //  MCFG_SCREEN_REFRESH_RATE(58)
 2181  //  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */)
 2182  //  MCFG_SCREEN_SIZE(32*8, 32*8)
 2183  //  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
 2184      MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART)
 2185      MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_garyoret)
 2186      MCFG_SCREEN_VBLANK_DRIVER(dec8_state, screen_eof_dec8)
 2187  
 2188      MCFG_GFXDECODE(gondo)
 2189      MCFG_PALETTE_LENGTH(1024)
 2190  
 2191      MCFG_VIDEO_START_OVERRIDE(dec8_state,garyoret)
 2192  
 2193      /* sound hardware */
 2194      MCFG_SPEAKER_STANDARD_MONO("mono")
 2195  
 2196      MCFG_SOUND_ADD("ym1", YM2203, 1500000)
 2197      MCFG_SOUND_ROUTE(0, "mono", 0.23)
 2198      MCFG_SOUND_ROUTE(1, "mono", 0.23)
 2199      MCFG_SOUND_ROUTE(2, "mono", 0.23)
 2200      MCFG_SOUND_ROUTE(3, "mono", 0.20)
 2201  
 2202      MCFG_SOUND_ADD("ym2", YM3526, 3000000)
 2203      MCFG_SOUND_CONFIG(ym3526_config)
 2204      MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
 2205  MACHINE_CONFIG_END
 2206  
 2207  static MACHINE_CONFIG_START( ghostb, dec8_state )
 2208  
 2209      /* basic machine hardware */
 2210      MCFG_CPU_ADD("maincpu", HD6309, 3000000*4)
 2211      MCFG_CPU_PROGRAM_MAP(meikyuh_map)
 2212      MCFG_CPU_VBLANK_INT_DRIVER("screen", dec8_state,  gondo_interrupt)
 2213  
 2214      MCFG_CPU_ADD("audiocpu", DECO_222, 1500000)
 2215      MCFG_CPU_PROGRAM_MAP(dec8_s_map)
 2216                                  /* NMIs are caused by the main CPU */
 2217  
 2218      MCFG_CPU_ADD("mcu", I8751, 3000000*4)
 2219      MCFG_CPU_IO_MAP(dec8_mcu_io_map)
 2220  
 2221  
 2222      /* video hardware */
 2223      MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
 2224  
 2225      MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
 2226      deco_bac06_device::set_gfx_region_wide(*device, 2,2,0);
 2227  
 2228      MCFG_DEVICE_ADD("spritegen", DECO_KARNOVSPRITES, 0)
 2229      deco_karnovsprites_device::set_gfx_region(*device, 1);
 2230  
 2231      MCFG_SCREEN_ADD("screen", RASTER)
 2232  //  MCFG_SCREEN_REFRESH_RATE(58)
 2233  //  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */)
 2234  //  MCFG_SCREEN_SIZE(32*8, 32*8)
 2235  //  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
 2236      MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART)
 2237      MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_ghostb)
 2238      MCFG_SCREEN_VBLANK_DRIVER(dec8_state, screen_eof_dec8)
 2239  
 2240      MCFG_GFXDECODE(ghostb)
 2241      MCFG_PALETTE_LENGTH(1024)
 2242  
 2243      MCFG_PALETTE_INIT_OVERRIDE(dec8_state,ghostb)
 2244      MCFG_VIDEO_START_OVERRIDE(dec8_state,ghostb)
 2245  
 2246      /* sound hardware */
 2247      MCFG_SPEAKER_STANDARD_MONO("mono")
 2248  
 2249      MCFG_SOUND_ADD("ym1", YM2203, 1500000)
 2250      MCFG_SOUND_ROUTE(0, "mono", 0.23)
 2251      MCFG_SOUND_ROUTE(1, "mono", 0.23)
 2252      MCFG_SOUND_ROUTE(2, "mono", 0.23)
 2253      MCFG_SOUND_ROUTE(3, "mono", 0.20)
 2254  
 2255      MCFG_SOUND_ADD("ym2", YM3812, 3000000)
 2256      MCFG_SOUND_CONFIG(ym3812_config)
 2257      MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
 2258  MACHINE_CONFIG_END
 2259  
 2260  static MACHINE_CONFIG_START( csilver, dec8_state )
 2261  
 2262      /* basic machine hardware */
 2263      MCFG_CPU_ADD("maincpu", M6809, XTAL_12MHz/8) /* verified on pcb */
 2264      MCFG_CPU_PROGRAM_MAP(csilver_map)
 2265  
 2266      MCFG_CPU_ADD("sub", M6809, XTAL_12MHz/8) /* verified on pcb */
 2267      MCFG_CPU_PROGRAM_MAP(csilver_sub_map)
 2268      MCFG_CPU_VBLANK_INT_DRIVER("screen", dec8_state,  nmi_line_pulse)
 2269  
 2270      MCFG_CPU_ADD("audiocpu", M6502, XTAL_12MHz/8) /* verified on pcb */
 2271      MCFG_CPU_PROGRAM_MAP(csilver_s_map)
 2272                                  /* NMIs are caused by the main CPU */
 2273      MCFG_QUANTUM_TIME(attotime::from_hz(6000))
 2274  
 2275  
 2276      /* video hardware */
 2277      MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
 2278  
 2279      MCFG_DEVICE_ADD("spritegen", DECO_KARNOVSPRITES, 0)
 2280      deco_karnovsprites_device::set_gfx_region(*device, 1);
 2281  
 2282      MCFG_SCREEN_ADD("screen", RASTER)
 2283  //  MCFG_SCREEN_REFRESH_RATE(58)
 2284  //  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */)
 2285  //  MCFG_SCREEN_SIZE(32*8, 32*8)
 2286  //  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
 2287      MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART)
 2288      MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_lastmisn)
 2289  
 2290      MCFG_GFXDECODE(shackled)
 2291      MCFG_PALETTE_LENGTH(1024)
 2292  
 2293      MCFG_VIDEO_START_OVERRIDE(dec8_state,lastmisn)
 2294  
 2295      /* sound hardware */
 2296      MCFG_SPEAKER_STANDARD_MONO("mono")
 2297  
 2298      MCFG_SOUND_ADD("ym1", YM2203, XTAL_12MHz/8) /* verified on pcb */
 2299      MCFG_SOUND_ROUTE(0, "mono", 0.23)
 2300      MCFG_SOUND_ROUTE(1, "mono", 0.23)
 2301      MCFG_SOUND_ROUTE(2, "mono", 0.23)
 2302      MCFG_SOUND_ROUTE(3, "mono", 0.20)
 2303  
 2304      MCFG_SOUND_ADD("ym2", YM3526, XTAL_12MHz/4) /* verified on pcb */
 2305      MCFG_SOUND_CONFIG(ym3526_config)
 2306      MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
 2307  
 2308      MCFG_SOUND_ADD("msm", MSM5205, XTAL_384kHz) /* verified on pcb */
 2309      MCFG_SOUND_CONFIG(msm5205_config)
 2310      MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.88)
 2311  MACHINE_CONFIG_END
 2312  
 2313  static MACHINE_CONFIG_START( oscar, dec8_state )
 2314  
 2315      /* basic machine hardware */
 2316      MCFG_CPU_ADD("maincpu", HD6309, XTAL_12MHz/2) /* verified on pcb */
 2317      MCFG_CPU_PROGRAM_MAP(oscar_map)
 2318      MCFG_CPU_VBLANK_INT_DRIVER("screen", dec8_state,  oscar_interrupt)
 2319  
 2320      MCFG_CPU_ADD("sub", HD6309, XTAL_12MHz/2) /* verified on pcb */
 2321      MCFG_CPU_PROGRAM_MAP(oscar_sub_map)
 2322  
 2323      MCFG_CPU_ADD("audiocpu", DECO_222, XTAL_12MHz/8)
 2324      MCFG_CPU_PROGRAM_MAP(oscar_s_map)
 2325                                  /* NMIs are caused by the main CPU */
 2326      MCFG_QUANTUM_TIME(attotime::from_hz(2400)) /* 40 CPU slices per frame */
 2327  
 2328  
 2329      /* video hardware */
 2330      MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
 2331  
 2332      MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
 2333      deco_bac06_device::set_gfx_region_wide(*device, 2,2,0);
 2334  
 2335      MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
 2336      deco_mxc06_device::set_gfx_region(*device, 1);
 2337  
 2338      MCFG_SCREEN_ADD("screen", RASTER)
 2339  //  MCFG_SCREEN_REFRESH_RATE(58)
 2340  //  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */)
 2341  //  MCFG_SCREEN_SIZE(32*8, 32*8)
 2342  //  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
 2343      MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART)
 2344      MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_oscar)
 2345  
 2346      MCFG_GFXDECODE(oscar)
 2347      MCFG_PALETTE_LENGTH(512)
 2348  
 2349      MCFG_VIDEO_START_OVERRIDE(dec8_state,oscar)
 2350  
 2351      /* sound hardware */
 2352      MCFG_SPEAKER_STANDARD_MONO("mono")
 2353  
 2354      MCFG_SOUND_ADD("ym1", YM2203, XTAL_12MHz/8) /* verified on pcb */
 2355      MCFG_SOUND_ROUTE(0, "mono", 0.23)
 2356      MCFG_SOUND_ROUTE(1, "mono", 0.23)
 2357      MCFG_SOUND_ROUTE(2, "mono", 0.23)
 2358      MCFG_SOUND_ROUTE(3, "mono", 0.20)
 2359  
 2360      MCFG_SOUND_ADD("ym2", YM3526, XTAL_12MHz/4) /* verified on pcb */
 2361      MCFG_SOUND_CONFIG(ym3526_config)
 2362      MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
 2363  MACHINE_CONFIG_END
 2364  
 2365  static MACHINE_CONFIG_START( srdarwin, dec8_state )
 2366  
 2367      /* basic machine hardware */
 2368      MCFG_CPU_ADD("maincpu", M6809,2000000)  /* MC68A09EP */
 2369      MCFG_CPU_PROGRAM_MAP(srdarwin_map)
 2370      MCFG_CPU_VBLANK_INT_DRIVER("screen", dec8_state,  nmi_line_pulse)
 2371  
 2372      MCFG_CPU_ADD("audiocpu", DECO_222, 1500000)
 2373      MCFG_CPU_PROGRAM_MAP(dec8_s_map)
 2374                                  /* NMIs are caused by the main CPU */
 2375  
 2376  
 2377      /* video hardware */
 2378      MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
 2379  
 2380      MCFG_SCREEN_ADD("screen", RASTER)
 2381  //  MCFG_SCREEN_REFRESH_RATE(58)
 2382  //  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */)
 2383  //  MCFG_SCREEN_SIZE(32*8, 32*8)
 2384  //  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
 2385      MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART)
 2386      MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_srdarwin)
 2387  
 2388      MCFG_GFXDECODE(srdarwin)
 2389      MCFG_PALETTE_LENGTH(144)
 2390  
 2391      MCFG_VIDEO_START_OVERRIDE(dec8_state,srdarwin)
 2392  
 2393      /* sound hardware */
 2394      MCFG_SPEAKER_STANDARD_MONO("mono")
 2395  
 2396      MCFG_SOUND_ADD("ym1", YM2203, 1500000)
 2397      MCFG_SOUND_ROUTE(0, "mono", 0.23)
 2398      MCFG_SOUND_ROUTE(1, "mono", 0.23)
 2399      MCFG_SOUND_ROUTE(2, "mono", 0.23)
 2400      MCFG_SOUND_ROUTE(3, "mono", 0.20)
 2401  
 2402      MCFG_SOUND_ADD("ym2", YM3812, 3000000)
 2403      MCFG_SOUND_CONFIG(ym3812_config)
 2404      MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
 2405  MACHINE_CONFIG_END
 2406  
 2407  static MACHINE_CONFIG_START( cobracom, dec8_state )
 2408  
 2409      /* basic machine hardware */
 2410      MCFG_CPU_ADD("maincpu", M6809, 2000000)
 2411      MCFG_CPU_PROGRAM_MAP(cobra_map)
 2412      MCFG_CPU_VBLANK_INT_DRIVER("screen", dec8_state,  nmi_line_pulse)
 2413  
 2414      MCFG_CPU_ADD("audiocpu", M6502, 1500000)
 2415      MCFG_CPU_PROGRAM_MAP(dec8_s_map)
 2416                                  /* NMIs are caused by the main CPU */
 2417  
 2418  
 2419      /* video hardware */
 2420      MCFG_BUFFERED_SPRITERAM8_ADD("spriteram")
 2421  
 2422      MCFG_DEVICE_ADD("tilegen1", DECO_BAC06, 0)
 2423      deco_bac06_device::set_gfx_region_wide(*device, 2,2,0);
 2424      MCFG_DEVICE_ADD("tilegen2", DECO_BAC06, 0)
 2425      deco_bac06_device::set_gfx_region_wide(*device, 3,3,0);
 2426  
 2427      MCFG_DEVICE_ADD("spritegen", DECO_MXC06, 0)
 2428      deco_mxc06_device::set_gfx_region(*device, 1);
 2429  
 2430  
 2431      MCFG_SCREEN_ADD("screen", RASTER)
 2432  //  MCFG_SCREEN_REFRESH_RATE(58)
 2433  //  MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */)
 2434  //  MCFG_SCREEN_SIZE(32*8, 32*8)
 2435  //  MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1)
 2436      MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART)
 2437      MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_cobracom)
 2438  
 2439      MCFG_GFXDECODE(cobracom)
 2440      MCFG_PALETTE_LENGTH(256)
 2441  
 2442      MCFG_VIDEO_START_OVERRIDE(dec8_state,cobracom)
 2443  
 2444      /* sound hardware */
 2445      MCFG_SPEAKER_STANDARD_MONO("mono")
 2446  
 2447      MCFG_SOUND_ADD("ym1", YM2203, 1500000)
 2448      MCFG_SOUND_ROUTE(0, "mono", 0.53)
 2449      MCFG_SOUND_ROUTE(1, "mono", 0.53)
 2450      MCFG_SOUND_ROUTE(2, "mono", 0.53)
 2451      MCFG_SOUND_ROUTE(3, "mono", 0.50)
 2452  
 2453      MCFG_SOUND_ADD("ym2", YM3812, 3000000)
 2454      MCFG_SOUND_CONFIG(ym3812_config)
 2455      MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.70)
 2456  MACHINE_CONFIG_END
 2457  
 2458  /******************************************************************************/
 2459  
 2460  ROM_START( lastmisn )
 2461      ROM_REGION( 0x20000, "maincpu", 0 )
 2462      ROM_LOAD( "dl03-6.13h",  0x08000, 0x08000, CRC(47751a5e) SHA1(190970a6eb849781e8853f2bed7b34ac44e569ca) ) /* Rev 6 roms */
 2463      ROM_LOAD( "lm_dl04.7h",  0x10000, 0x10000, CRC(7dea1552) SHA1(920684413e2ba4313111e79821c5714977b26b1a) )
 2464  
 2465      ROM_REGION( 0x10000, "sub", 0 )    /* CPU 2, 1st 16k is empty */
 2466      ROM_LOAD( "lm_dl02.18h", 0x0000, 0x10000, CRC(ec9b5daf) SHA1(86d47bad123676abc82dd7c92943878c54c33075) )
 2467  
 2468      ROM_REGION( 0x10000, "audiocpu", 0 )
 2469      ROM_LOAD( "dl05-.5h",    0x8000, 0x8000, CRC(1a5df8c0) SHA1(83d36b1d5fb87f50c44f3110804d6bbdbbc0da99) )
 2470  
 2471      ROM_REGION( 0x1000, "mcu", 0 )    /* ID8751H MCU */
 2472      ROM_LOAD( "id8751h.mcu", 0x0000, 0x1000, NO_DUMP )
 2473  
 2474      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 2475      ROM_LOAD( "dl01-.2a",    0x00000, 0x2000, CRC(f3787a5d) SHA1(3701df42cb2aca951963703e72c6c7b272eed82b) )
 2476      ROM_CONTINUE(             0x06000, 0x2000 )
 2477      ROM_CONTINUE(              0x04000, 0x2000 )
 2478      ROM_CONTINUE(              0x02000, 0x2000 )
 2479  
 2480      ROM_REGION( 0x80000, "gfx2", 0 )    /* sprites */
 2481      ROM_LOAD( "dl11-.13f",   0x00000, 0x08000, CRC(36579d3b) SHA1(8edf952dafcd5bc66e08074687f0bec809fd4c2f) )
 2482      ROM_LOAD( "dl12-.9f",    0x20000, 0x08000, CRC(2ba6737e) SHA1(c5e4c27726bf14e9cd60d62e2f17ea5be8093c37) )
 2483      ROM_LOAD( "dl13-.8f",    0x40000, 0x08000, CRC(39a7dc93) SHA1(3b7968fd06ac0379525c1d3e73f8bbe18ea36439) )
 2484      ROM_LOAD( "dl10-.16f",   0x60000, 0x08000, CRC(fe275ea8) SHA1(2f089f96583235f1f5226ef2a64b430d84efbeee) )
 2485  
 2486      ROM_REGION( 0x80000, "gfx3", 0 )    /* tiles */
 2487      ROM_LOAD( "dl09-.12k",   0x00000, 0x10000, CRC(6a5a0c5d) SHA1(0106cf693c284be5faf96e56b651fab92a410915) )
 2488      ROM_LOAD( "dl08-.14k",   0x20000, 0x10000, CRC(3b38cfce) SHA1(d6829bed6916fb301c08031bd466ee4dcc05b275) )
 2489      ROM_LOAD( "dl07-.15k",   0x40000, 0x10000, CRC(1b60604d) SHA1(1ee15cfdac87f7eeb92050766293b894cfad1466) )
 2490      ROM_LOAD( "dl06-.17k",   0x60000, 0x10000, CRC(c43c26a7) SHA1(896e278935b100edc12cd970469f2e8293eb96cc) )
 2491  
 2492      ROM_REGION( 256, "proms", 0 )
 2493      ROM_LOAD( "dl-14.9c",    0x00000,  0x100,  CRC(2e55aa12) SHA1(c0f2b9649467eb9d2c1e47589b5990f5c5e8cc93) )    /* Priority (Not yet used) */
 2494  ROM_END
 2495  
 2496  ROM_START( lastmisno )
 2497      ROM_REGION( 0x20000, "maincpu", 0 )
 2498      ROM_LOAD( "lm_dl03.13h", 0x08000, 0x08000, CRC(357f5f6b) SHA1(a114aac50db62a6bcb943681e517ad7c88ec47f4) ) /* Rev 5 roms */
 2499      ROM_LOAD( "lm_dl04.7h",  0x10000, 0x10000, CRC(7dea1552) SHA1(920684413e2ba4313111e79821c5714977b26b1a) )
 2500  
 2501      ROM_REGION( 0x10000, "sub", 0 )    /* CPU 2, 1st 16k is empty */
 2502      ROM_LOAD( "lm_dl02.18h", 0x0000, 0x10000, CRC(ec9b5daf) SHA1(86d47bad123676abc82dd7c92943878c54c33075) )
 2503  
 2504      ROM_REGION( 0x10000, "audiocpu", 0 )
 2505      ROM_LOAD( "dl05-.5h",    0x8000, 0x8000, CRC(1a5df8c0) SHA1(83d36b1d5fb87f50c44f3110804d6bbdbbc0da99) )
 2506  
 2507      ROM_REGION( 0x1000, "mcu", 0 )    /* ID8751H MCU */
 2508      ROM_LOAD( "id8751h.mcu", 0x0000, 0x1000, NO_DUMP )
 2509  
 2510      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 2511      ROM_LOAD( "dl01-.2a",    0x00000, 0x2000, CRC(f3787a5d) SHA1(3701df42cb2aca951963703e72c6c7b272eed82b) )
 2512      ROM_CONTINUE(             0x06000, 0x2000 )
 2513      ROM_CONTINUE(              0x04000, 0x2000 )
 2514      ROM_CONTINUE(              0x02000, 0x2000 )
 2515  
 2516      ROM_REGION( 0x80000, "gfx2", 0 )    /* sprites */
 2517      ROM_LOAD( "dl11-.13f",   0x00000, 0x08000, CRC(36579d3b) SHA1(8edf952dafcd5bc66e08074687f0bec809fd4c2f) )
 2518      ROM_LOAD( "dl12-.9f",    0x20000, 0x08000, CRC(2ba6737e) SHA1(c5e4c27726bf14e9cd60d62e2f17ea5be8093c37) )
 2519      ROM_LOAD( "dl13-.8f",    0x40000, 0x08000, CRC(39a7dc93) SHA1(3b7968fd06ac0379525c1d3e73f8bbe18ea36439) )
 2520      ROM_LOAD( "dl10-.16f",   0x60000, 0x08000, CRC(fe275ea8) SHA1(2f089f96583235f1f5226ef2a64b430d84efbeee) )
 2521  
 2522      ROM_REGION( 0x80000, "gfx3", 0 )    /* tiles */
 2523      ROM_LOAD( "dl09-.12k",   0x00000, 0x10000, CRC(6a5a0c5d) SHA1(0106cf693c284be5faf96e56b651fab92a410915) )
 2524      ROM_LOAD( "dl08-.14k",   0x20000, 0x10000, CRC(3b38cfce) SHA1(d6829bed6916fb301c08031bd466ee4dcc05b275) )
 2525      ROM_LOAD( "dl07-.15k",   0x40000, 0x10000, CRC(1b60604d) SHA1(1ee15cfdac87f7eeb92050766293b894cfad1466) )
 2526      ROM_LOAD( "dl06-.17k",   0x60000, 0x10000, CRC(c43c26a7) SHA1(896e278935b100edc12cd970469f2e8293eb96cc) )
 2527  
 2528      ROM_REGION( 256, "proms", 0 )
 2529      ROM_LOAD( "dl-14.9c",    0x00000,  0x100,  CRC(2e55aa12) SHA1(c0f2b9649467eb9d2c1e47589b5990f5c5e8cc93) )    /* Priority (Not yet used) */
 2530  ROM_END
 2531  
 2532  ROM_START( lastmisnj )
 2533      ROM_REGION( 0x20000, "maincpu", 0 )
 2534      ROM_LOAD( "dl03-.13h",   0x08000, 0x08000, CRC(4be5e7e1) SHA1(9f943658663da31947cebdcbcb5f4e2be0714c06) )
 2535      ROM_LOAD( "dl04-.7h",    0x10000, 0x10000, CRC(f026adf9) SHA1(4ccd0e714a6eb7cee388c93beee2d5510407c961) )
 2536  
 2537      ROM_REGION( 0x10000, "sub", 0 )    /* CPU 2, 1st 16k is empty */
 2538      ROM_LOAD( "dl02-.18h",   0x0000, 0x10000, CRC(d0de2b5d) SHA1(e0bb34c2a2ef6fc6f05ab9a98bd23a39004c0c05) )
 2539  
 2540      ROM_REGION( 0x10000, "audiocpu", 0 )
 2541      ROM_LOAD( "dl05-.5h",    0x8000, 0x8000, CRC(1a5df8c0) SHA1(83d36b1d5fb87f50c44f3110804d6bbdbbc0da99) )
 2542  
 2543      ROM_REGION( 0x1000, "mcu", 0 )    /* ID8751H MCU */
 2544      ROM_LOAD( "id8751h.mcu", 0x0000, 0x1000, NO_DUMP )
 2545  
 2546      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 2547      ROM_LOAD( "dl01-.2a",    0x00000, 0x2000, CRC(f3787a5d) SHA1(3701df42cb2aca951963703e72c6c7b272eed82b) )
 2548      ROM_CONTINUE(             0x06000, 0x2000 )
 2549      ROM_CONTINUE(              0x04000, 0x2000 )
 2550      ROM_CONTINUE(              0x02000, 0x2000 )
 2551  
 2552      ROM_REGION( 0x80000, "gfx2", 0 )    /* sprites */
 2553      ROM_LOAD( "dl11-.13f",   0x00000, 0x08000, CRC(36579d3b) SHA1(8edf952dafcd5bc66e08074687f0bec809fd4c2f) )
 2554      ROM_LOAD( "dl12-.9f",    0x20000, 0x08000, CRC(2ba6737e) SHA1(c5e4c27726bf14e9cd60d62e2f17ea5be8093c37) )
 2555      ROM_LOAD( "dl13-.8f",    0x40000, 0x08000, CRC(39a7dc93) SHA1(3b7968fd06ac0379525c1d3e73f8bbe18ea36439) )
 2556      ROM_LOAD( "dl10-.16f",   0x60000, 0x08000, CRC(fe275ea8) SHA1(2f089f96583235f1f5226ef2a64b430d84efbeee) )
 2557  
 2558      ROM_REGION( 0x80000, "gfx3", 0 )    /* tiles */
 2559      ROM_LOAD( "dl09-.12k",   0x00000, 0x10000, CRC(6a5a0c5d) SHA1(0106cf693c284be5faf96e56b651fab92a410915) )
 2560      ROM_LOAD( "dl08-.14k",   0x20000, 0x10000, CRC(3b38cfce) SHA1(d6829bed6916fb301c08031bd466ee4dcc05b275) )
 2561      ROM_LOAD( "dl07-.15k",   0x40000, 0x10000, CRC(1b60604d) SHA1(1ee15cfdac87f7eeb92050766293b894cfad1466) )
 2562      ROM_LOAD( "dl06-.17k",   0x60000, 0x10000, CRC(c43c26a7) SHA1(896e278935b100edc12cd970469f2e8293eb96cc) )
 2563  
 2564      ROM_REGION( 256, "proms", 0 )
 2565      ROM_LOAD( "dl-14.9c",    0x00000,  0x100,  CRC(2e55aa12) SHA1(c0f2b9649467eb9d2c1e47589b5990f5c5e8cc93) )    /* Priority (Not yet used) */
 2566  ROM_END
 2567  
 2568  ROM_START( shackled )
 2569      ROM_REGION( 0x48000, "maincpu", 0 )
 2570      ROM_LOAD( "dk-02.13h", 0x08000, 0x08000, CRC(87f8fa85) SHA1(1cb93a60eefdb453a3cc6ec9c5cc2e367fb8aeb0) )
 2571      ROM_LOAD( "dk-06.7h",  0x10000, 0x10000, CRC(69ad62d1) SHA1(1aa23b12ab4f1908cddd25f091e1f9bd70a5113c) )
 2572      ROM_LOAD( "dk-05.8h",  0x20000, 0x10000, CRC(598dd128) SHA1(10843c5352eef03c8675df6abaf23c9c9c795aa3) )
 2573      ROM_LOAD( "dk-04.10h", 0x30000, 0x10000, CRC(36d305d4) SHA1(17586c316aff405cf20c1467d69c98fa2a3c2630) )
 2574      ROM_LOAD( "dk-03.11h", 0x40000, 0x08000, CRC(6fd90fd1) SHA1(2f8db17e5545c82d243a7e23e7bda2c2a9101360) )
 2575  
 2576      ROM_REGION( 0x10000, "sub", 0 )    /* CPU 2, 1st 16k is empty */
 2577      ROM_LOAD( "dk-01.18h", 0x00000, 0x10000, CRC(71fe3bda) SHA1(959cce01362b2c670c2e15b03a78a1ff9cea4ee9) )
 2578  
 2579      ROM_REGION( 0x10000, "audiocpu", 0 )
 2580      ROM_LOAD( "dk-07.5h", 0x08000, 0x08000, CRC(887e4bcc) SHA1(6427396080e9cd8647adff47c8ed04593a14268c) )
 2581  
 2582      ROM_REGION( 0x1000, "mcu", 0 )    /* ID8751H MCU */
 2583      ROM_LOAD( "dk.18a", 0x0000, 0x1000, NO_DUMP )
 2584  
 2585      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 2586      ROM_LOAD( "dk-00.2a", 0x00000, 0x08000, CRC(69b975aa) SHA1(38cb96768c79ff1aa1b4b190e08ec9155baf698a) )
 2587  
 2588      ROM_REGION( 0x80000, "gfx2", 0 )    /* sprites */
 2589      ROM_LOAD( "dk-12.15k", 0x00000, 0x10000, CRC(615c2371) SHA1(30b25dc27d34646d886a465c77622eaa894d83c3) )
 2590      ROM_LOAD( "dk-13.14k", 0x10000, 0x10000, CRC(479aa503) SHA1(1167f0d15439c95a1094f81855203e863ce0488d) )
 2591      ROM_LOAD( "dk-14.13k", 0x20000, 0x10000, CRC(cdc24246) SHA1(1a4189bc2b1fa99740dd7921608159936ba3bd07) )
 2592      ROM_LOAD( "dk-15.11k", 0x30000, 0x10000, CRC(88db811b) SHA1(7d3c4a80925f323efb589798b4a341d1a2ca95f9) )
 2593      ROM_LOAD( "dk-16.10k", 0x40000, 0x10000, CRC(061a76bd) SHA1(5bcb513e48bed9b7c4207d94531be691a85e295d) )
 2594      ROM_LOAD( "dk-17.9k",  0x50000, 0x10000, CRC(a6c5d8af) SHA1(58f3fece9a5ef8b39090a2f39610381b8e7cdbf7) )
 2595      ROM_LOAD( "dk-18.8k",  0x60000, 0x10000, CRC(4d466757) SHA1(701d79bebbba4f266e19080d16ff2f93ffa94287) )
 2596      ROM_LOAD( "dk-19.6k",  0x70000, 0x10000, CRC(1911e83e) SHA1(174e9db3f2211ecbbb93c6bda8f6185dbfdbc818) )
 2597  
 2598      ROM_REGION( 0x80000, "gfx3", 0 )    /* tiles */
 2599      ROM_LOAD( "dk-11.12k", 0x00000, 0x10000, CRC(5cf5719f) SHA1(8c7582ac19010421ec748391a193aa18e51b981f) )
 2600      ROM_LOAD( "dk-10.14k", 0x20000, 0x10000, CRC(408e6d08) SHA1(28cb76792e5f84bd101a91cb82597a5939804f84) )
 2601      ROM_LOAD( "dk-09.15k", 0x40000, 0x10000, CRC(c1557fac) SHA1(7d39ec793113a48baf45c2ea07abb07e2e48985a) )
 2602      ROM_LOAD( "dk-08.17k", 0x60000, 0x10000, CRC(5e54e9f5) SHA1(1ab41a3bde1f2c2be670e89cf402be28001c17d1) )
 2603  
 2604      ROM_REGION( 256, "proms", 0 )
 2605      ROM_LOAD( "dk-20.9c", 0x00000, 0x100, CRC(ff3cd588) SHA1(7360a9f046d517885d456d89026d047fb1fd8d5a) )    /* Priority (Not yet used) BPROM type MB7052 */
 2606  ROM_END
 2607  
 2608  ROM_START( breywood )
 2609      ROM_REGION( 0x48000, "maincpu", 0 )
 2610      ROM_LOAD( "dj02-2.13h", 0x08000, 0x08000, CRC(c19856b9) SHA1(766994703bb59879c311675353d7231ad27c7c16) )
 2611      ROM_LOAD( "dj06-2.7h",  0x10000, 0x10000, CRC(2860ea02) SHA1(7ac090c3ae9d71baa6227ec9555f1c9f2d25ea0d) )
 2612      ROM_LOAD( "dj05-2.8h",  0x20000, 0x10000, CRC(0fdd915e) SHA1(262df956dfc727c710ade28af7f33fddaafd7ee2) )
 2613      ROM_LOAD( "dj04-2.10h", 0x30000, 0x10000, CRC(71036579) SHA1(c58ff3222b5bcd75d58c5f282554e92103e80916) )
 2614      ROM_LOAD( "dj03-2.11h", 0x40000, 0x08000, CRC(308f4893) SHA1(539c138ff01c5718cc8a982482b989468d532699) )
 2615  
 2616      ROM_REGION( 0x10000, "sub", 0 )    /* CPU 2, 1st 16k is empty */
 2617      ROM_LOAD( "dj1-2y.18h", 0x0000, 0x10000, CRC(3d9fb623) SHA1(6e5eaad9bb0a432e2da5da5b18a2ed36617bdde2) )
 2618  
 2619      ROM_REGION( 0x10000, "audiocpu", 0 )
 2620      ROM_LOAD( "dj07-1.5h", 0x8000, 0x8000, CRC(4a471c38) SHA1(963ed7b6afeefdfc2cf0d65b0998f973330e6495) )
 2621  
 2622      ROM_REGION( 0x1000, "mcu", 0 )    /* ID8751H MCU */
 2623      ROM_LOAD( "dj.18a", 0x0000, 0x1000, NO_DUMP )
 2624  
 2625      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 2626      ROM_LOAD( "dj-00.2a",  0x00000, 0x08000, CRC(815a891a) SHA1(e557d6a35821a8589d9e3df0f42131b58b08c8ca) )
 2627  
 2628      ROM_REGION( 0x80000, "gfx2", 0 )    /* sprites */
 2629      ROM_LOAD( "dj12.15k", 0x00000, 0x10000, CRC(2b7634f2) SHA1(56d963d4960d9b3e888c8107340763e176adfa9b) )
 2630      ROM_LOAD( "dj13.14k", 0x10000, 0x10000, CRC(4530a952) SHA1(99251a21347815cba465669e18df31262bcdaba1) )
 2631      ROM_LOAD( "dj14.13k", 0x20000, 0x10000, CRC(87c28833) SHA1(3f1a294065326389d304e540bc880844c6c7cb06) )
 2632      ROM_LOAD( "dj15.11k", 0x30000, 0x10000, CRC(bfb43a4d) SHA1(56092935147a3b643a9b39eb7cfc067a764644c5) )
 2633      ROM_LOAD( "dj16.10k", 0x40000, 0x10000, CRC(f9848cc4) SHA1(6d8e77b67ce4d418defba6f6979632f31d2307c6) )
 2634      ROM_LOAD( "dj17.9k",  0x50000, 0x10000, CRC(baa3d218) SHA1(3c31df23cc871cffd9a4dafae106e4a98f5af848) )
 2635      ROM_LOAD( "dj18.8k",  0x60000, 0x10000, CRC(12afe533) SHA1(6df3471c16a714d118717da549a7523aa388ddd3) )
 2636      ROM_LOAD( "dj19.6k",  0x70000, 0x10000, CRC(03373755) SHA1(d2541dd957803168f246d96b7cd74eae7fd43188) )
 2637  
 2638      ROM_REGION( 0x80000, "gfx3", 0 )    /* tiles */
 2639      ROM_LOAD( "dj11.12k", 0x00000, 0x10000, CRC(067e2a43) SHA1(f1da7455aab21f94ed25a93b0ebfde69baa475d1) )
 2640      ROM_LOAD( "dj10.14k", 0x20000, 0x10000, CRC(c19733aa) SHA1(3dfcfd33c5c4f792bb941ac933301c03ddd72b03) )
 2641      ROM_LOAD( "dj09.15k", 0x40000, 0x10000, CRC(e37d5dbe) SHA1(ff79b4f6d8b0a3061e78d15480df0155650f347f) )
 2642      ROM_LOAD( "dj08.17k", 0x60000, 0x10000, CRC(beee880f) SHA1(9a818a75cbec425a13f629bda6d50aa341aa1896) )
 2643  
 2644      ROM_REGION( 256, "proms", 0 )
 2645      ROM_LOAD( "dk-20.9c", 0x00000, 0x100, CRC(ff3cd588) SHA1(7360a9f046d517885d456d89026d047fb1fd8d5a) )    /* Priority (Not yet used) BPROM type MB7052 */
 2646  ROM_END
 2647  
 2648  ROM_START( gondo )
 2649      ROM_REGION( 0x40000, "maincpu", 0 )
 2650      ROM_LOAD( "dt-00.256", 0x08000, 0x08000, CRC(a8cf9118) SHA1(865744c9866957d686a31608d356e279fe58934e) )
 2651      ROM_LOAD( "dt-01.512", 0x10000, 0x10000, CRC(c39bb877) SHA1(9beb59ba19f38417c5d4d36e8f3c41f2b017d2d6) )
 2652      ROM_LOAD( "dt-02.512", 0x20000, 0x10000, CRC(bb5e674b) SHA1(8057dc7464a8b6987536f248d607957923b223cf) )
 2653      ROM_LOAD( "dt-03.512", 0x30000, 0x10000, CRC(99c32b13) SHA1(3d79f48e7d198cb2e519d592a89eda505044bce5) )
 2654  
 2655      ROM_REGION( 0x10000, "audiocpu", 0 )
 2656      ROM_LOAD( "dt-05.256", 0x8000, 0x8000, CRC(ec08aa29) SHA1(ce83974ae095d9518d1ebf9f7e712f0cbc2c1b42) )
 2657  
 2658      ROM_REGION( 0x1000, "mcu", 0 )    /* ID8751H MCU */
 2659      ROM_LOAD( "dt-a.b1", 0x0000, 0x1000, CRC(03abceeb) SHA1(a16b779d7cea1c1437f85fa6b6e08894a46a5674) )
 2660  
 2661      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 2662      ROM_LOAD( "dt-14.256", 0x00000, 0x08000, CRC(4bef16e1) SHA1(b8157a7a1b8f36cea1fd353267a4e03d920cb4aa) )
 2663  
 2664      ROM_REGION( 0x80000, "gfx2", 0 )    /* sprites */
 2665      ROM_LOAD( "dt-19.512", 0x00000, 0x10000, CRC(da2abe4b) SHA1(d53e4769671f3fd437edcff7e7ea05156bbcb45d) )
 2666      ROM_LOAD( "dt-20.256", 0x10000, 0x08000, CRC(42d01002) SHA1(5a289ffdc83c05f21908a5d0b6247da5b51c1ddd) )
 2667      ROM_LOAD( "dt-16.512", 0x20000, 0x10000, CRC(e9955d8f) SHA1(aeef5e18f9d36c1bab3000e95205ce1b18cfbf0b) )
 2668      ROM_LOAD( "dt-18.256", 0x30000, 0x08000, CRC(c0c5df1c) SHA1(5b0f71f590434cdd0545ce098666798927727469) )
 2669      ROM_LOAD( "dt-15.512", 0x40000, 0x10000, CRC(a54b2eb6) SHA1(25cb61f67135672154f1ad8e0c49ec04655e91de) )
 2670      ROM_LOAD( "dt-17.256", 0x50000, 0x08000, CRC(3bbcff0d) SHA1(a8f7aa56ff49ed6b29240c3504d6c9945944953b) )
 2671      ROM_LOAD( "dt-21.512", 0x60000, 0x10000, CRC(1c5f682d) SHA1(4b7022cce930a9e9a0087c91e8344269fe7ed889) )
 2672      ROM_LOAD( "dt-22.256", 0x70000, 0x08000, CRC(c1876a5f) SHA1(66122ce765723765e20036bd4d461a210c8b94d3) )
 2673  
 2674      ROM_REGION( 0x80000, "gfx3", 0 )    /* tiles */
 2675      ROM_LOAD( "dt-08.512", 0x00000, 0x08000, CRC(aec483f5) SHA1(1d6de823ab0eeb9c89e9c227428ff278663627f3) )
 2676      ROM_CONTINUE(          0x10000, 0x08000 )
 2677      ROM_LOAD( "dt-09.256", 0x08000, 0x08000, CRC(446f0ce0) SHA1(072b88d6de5aa0ed6b1d60c266bcf170dea927d5) )
 2678      ROM_LOAD( "dt-06.512", 0x20000, 0x08000, CRC(3fe1527f) SHA1(b8df4bef2b1a879b65214025fc3b5998ef5c8886) )
 2679      ROM_CONTINUE(          0x30000, 0x08000 )
 2680      ROM_LOAD( "dt-07.256", 0x28000, 0x08000, CRC(61f9bce5) SHA1(ef8a5f5e4c66a143304bcab50ca87579f1507864) )
 2681      ROM_LOAD( "dt-12.512", 0x40000, 0x08000, CRC(1a72ca8d) SHA1(f412758452cb3417e85c355ccb8794fde7edf1cc) )
 2682      ROM_CONTINUE(          0x50000, 0x08000 )
 2683      ROM_LOAD( "dt-13.256", 0x48000, 0x08000, CRC(ccb81aec) SHA1(56e524ed4373b7bd1074a0d22ff75ede379f1696) )
 2684      ROM_LOAD( "dt-10.512", 0x60000, 0x08000, CRC(cfcfc9ed) SHA1(57f43d638cf864d68420f0203740be7bda9da5ca) )
 2685      ROM_CONTINUE(          0x70000, 0x08000 )
 2686      ROM_LOAD( "dt-11.256", 0x68000, 0x08000, CRC(53e9cf17) SHA1(8cbb45154a60f42f1b1e7299b12d2e92fc194df8) )
 2687  
 2688      ROM_REGION( 1024, "proms", 0 )
 2689      ROM_LOAD( "ds-23.b10", 0x00000,  0x400,  CRC(dcbfec4e) SHA1(a375caef4575746870e285d90ba991ea7daefad6) ) /* BPROM type MB7122E for Priority (Not yet used) */
 2690  ROM_END
 2691  
 2692  ROM_START( makyosen )
 2693      ROM_REGION( 0x40000, "maincpu", 0 )
 2694      ROM_LOAD( "ds00.f3",  0x08000, 0x08000, CRC(33bb16fe) SHA1(5d3873b66e0d08b35d56a8b508c774b27368a100) )
 2695      ROM_LOAD( "dt-01.512",0x10000, 0x10000, CRC(c39bb877) SHA1(9beb59ba19f38417c5d4d36e8f3c41f2b017d2d6) ) // ds01.f5
 2696      ROM_LOAD( "ds02.f6",  0x20000, 0x10000, CRC(925307a4) SHA1(1e8b8eb21df1a11b14c981b343b34c6cc3676517) )
 2697      ROM_LOAD( "ds03.f7",  0x30000, 0x10000, CRC(9c0fcbf6) SHA1(bfe42b5277fea111840a9f59b2cb8dfe44444029) )
 2698  
 2699      ROM_REGION( 0x10000, "audiocpu", 0 )
 2700      ROM_LOAD( "ds05.h5",  0x8000, 0x8000, CRC(e6e28ca9) SHA1(3b1f8219331db1910bfb428f8964f8fc1063df6f) )
 2701  
 2702      ROM_REGION( 0x1000, "mcu", 0 )    /* ID8751H (fake) MCU based on 'gondo' one */
 2703      ROM_LOAD( "ds-a.b1",  0x0000, 0x1000, BAD_DUMP CRC(f61b77cf) SHA1(2d3549876ea08623ce9da1d637853cb4c740300a)) // ds.b1
 2704  
 2705      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 2706      ROM_LOAD( "ds14.b18", 0x00000, 0x08000, CRC(00cbe9c8) SHA1(de7b640de8fd54ee79194945c96d5768d09f483b) )
 2707  
 2708      ROM_REGION( 0x80000, "gfx2", 0 )    /* sprites */
 2709      ROM_LOAD( "dt-19.512",0x00000, 0x10000, CRC(da2abe4b) SHA1(d53e4769671f3fd437edcff7e7ea05156bbcb45d) ) // ds19.f13
 2710      ROM_LOAD( "ds20.f15", 0x10000, 0x08000, CRC(0eef7f56) SHA1(05c23aa6a598478cd4822634cff96055c585e9d2) )
 2711      ROM_LOAD( "dt-16.512",0x20000, 0x10000, CRC(e9955d8f) SHA1(aeef5e18f9d36c1bab3000e95205ce1b18cfbf0b) ) // ds16.f9
 2712      ROM_LOAD( "ds18.f12", 0x30000, 0x08000, CRC(2b2d1468) SHA1(a144ac1b367e1fec876156230e9ab1c99416962e) )
 2713      ROM_LOAD( "dt-15.512",0x40000, 0x10000, CRC(a54b2eb6) SHA1(25cb61f67135672154f1ad8e0c49ec04655e91de) ) // ds15.f8
 2714      ROM_LOAD( "ds17.f11", 0x50000, 0x08000, CRC(75ae349a) SHA1(15755a28925d5ed37fab4bd988716fcc5d20c290) )
 2715      ROM_LOAD( "dt-21.512",0x60000, 0x10000, CRC(1c5f682d) SHA1(4b7022cce930a9e9a0087c91e8344269fe7ed889) ) // ds21.f16
 2716      ROM_LOAD( "ds22.f18", 0x70000, 0x08000, CRC(c8ffb148) SHA1(ae1a8b3cd1f5e423dc1a3c7d05f9fe7c689432e3) )
 2717  
 2718      ROM_REGION( 0x80000, "gfx3", 0 )    /* tiles */
 2719      ROM_LOAD( "dt-08.512",0x00000, 0x08000, CRC(aec483f5) SHA1(1d6de823ab0eeb9c89e9c227428ff278663627f3) ) // ds08.h10
 2720      ROM_CONTINUE(         0x10000, 0x08000 )
 2721      ROM_LOAD( "dt-09.256",0x08000, 0x08000, CRC(446f0ce0) SHA1(072b88d6de5aa0ed6b1d60c266bcf170dea927d5) ) // ds09.h12
 2722      ROM_LOAD( "dt-06.512",0x20000, 0x08000, CRC(3fe1527f) SHA1(b8df4bef2b1a879b65214025fc3b5998ef5c8886) ) // ds06.h7
 2723      ROM_CONTINUE(         0x30000, 0x08000 )
 2724      ROM_LOAD( "dt-07.256",0x28000, 0x08000, CRC(61f9bce5) SHA1(ef8a5f5e4c66a143304bcab50ca87579f1507864) ) // ds07.h9
 2725      ROM_LOAD( "dt-12.512",0x40000, 0x08000, CRC(1a72ca8d) SHA1(f412758452cb3417e85c355ccb8794fde7edf1cc) ) // ds12.h16
 2726      ROM_CONTINUE(         0x50000, 0x08000 )
 2727      ROM_LOAD( "dt-13.256",0x48000, 0x08000, CRC(ccb81aec) SHA1(56e524ed4373b7bd1074a0d22ff75ede379f1696) ) // ds13.h18
 2728      ROM_LOAD( "dt-10.512",0x60000, 0x08000, CRC(cfcfc9ed) SHA1(57f43d638cf864d68420f0203740be7bda9da5ca) ) // ds10.h13
 2729      ROM_CONTINUE(         0x70000, 0x08000 )
 2730      ROM_LOAD( "dt-11.256",0x68000, 0x08000, CRC(53e9cf17) SHA1(8cbb45154a60f42f1b1e7299b12d2e92fc194df8) ) // ds11.h15
 2731  
 2732      ROM_REGION( 1024, "proms", 0 )
 2733      ROM_LOAD( "ds-23.b10", 0x00000,  0x400,  CRC(dcbfec4e) SHA1(a375caef4575746870e285d90ba991ea7daefad6) ) /* BPROM type MB7122E for Priority (Not yet used) */
 2734  
 2735      ROM_REGION( 0x0600, "plds", 0 )
 2736      ROM_LOAD( "pal16r4nc.u10", 0x0000, 0x0104, NO_DUMP ) /* PAL is read protected */
 2737      ROM_LOAD( "pal16r4nc.g11", 0x0200, 0x0104, NO_DUMP ) /* PAL is read protected */
 2738      ROM_LOAD( "pal16r4nc.s1",  0x0400, 0x0104, NO_DUMP ) /* PAL is read protected */
 2739  ROM_END
 2740  
 2741  ROM_START( garyoret )
 2742      ROM_REGION( 0x50000, "maincpu", 0 )
 2743      ROM_LOAD( "dv00", 0x08000, 0x08000, CRC(cceaaf05) SHA1(b8f54638feab77d023e01ced947e1269f0d19fd8) )
 2744      ROM_LOAD( "dv01", 0x10000, 0x10000, CRC(c33fc18a) SHA1(0d9594b0e6c39aea5b9f15f6aa364b31604f1066) )
 2745      ROM_LOAD( "dv02", 0x20000, 0x10000, CRC(f9e26ce7) SHA1(8589594ebc7ae16942739382273a222dfa30b3b7) )
 2746      ROM_LOAD( "dv03", 0x30000, 0x10000, CRC(55d8d699) SHA1(da1519cd54d27cc406420ce0845e43f7228cfd4e) )
 2747      ROM_LOAD( "dv04", 0x40000, 0x10000, CRC(ed3d00ee) SHA1(6daa2ee509235ad03d3012a00382820279add620) )
 2748  
 2749      ROM_REGION( 0x10000, "audiocpu", 0 )
 2750      ROM_LOAD( "dv05", 0x08000, 0x08000, CRC(c97c347f) SHA1(a1b22733dc15d524af97db3e608a82503a49b182) )
 2751  
 2752      ROM_REGION( 0x1000, "mcu", 0 )    /* ID8751H (fake) MCU based on 'gondo' one */
 2753      ROM_LOAD( "dv__.mcu", 0x0000, 0x1000, BAD_DUMP CRC(37cacec6) SHA1(d81fe36939ccac784a83a69dfc6898b22a4515ec) )
 2754  
 2755      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 2756      ROM_LOAD( "dv14", 0x00000, 0x08000, CRC(fb2bc581) SHA1(d597976c5ae586166c49051cc3de8cf0c2e5a5e1) )    /* Characters */
 2757  
 2758      ROM_REGION( 0x80000, "gfx2", 0 )    /* sprites */
 2759      ROM_LOAD( "dv22", 0x00000, 0x10000, CRC(cef0367e) SHA1(8beb3a6b91ec0a6ec052243c8f626a581d349f65) )
 2760      ROM_LOAD( "dv21", 0x10000, 0x08000, CRC(90042fb7) SHA1(f19bbf158c92030e8fddb5087b5b69b71956baf8) )
 2761      ROM_LOAD( "dv20", 0x20000, 0x10000, CRC(451a2d8c) SHA1(f4eea444b797d394edeb514ddc1c494fd7ccc2f2) )
 2762      ROM_LOAD( "dv19", 0x30000, 0x08000, CRC(14e1475b) SHA1(f0aec5b7b4be0da06a73ed382e7e851654e47e47) )
 2763      ROM_LOAD( "dv18", 0x40000, 0x10000, CRC(7043bead) SHA1(5d1be8b9cd56ae43d60406b05258d20de980096d) )
 2764      ROM_LOAD( "dv17", 0x50000, 0x08000, CRC(28f449d7) SHA1(cf1bc690b67910c42ad09531ab1d88461d00b944) )
 2765      ROM_LOAD( "dv16", 0x60000, 0x10000, CRC(37e4971e) SHA1(9442c315b7cdbcc046d9e6838cb793c1857174ed) )
 2766      ROM_LOAD( "dv15", 0x70000, 0x08000, CRC(ca41b6ac) SHA1(d7a9ef6c89741c1e8e17a668a9d39ea089f5c73f) )
 2767  
 2768      ROM_REGION( 0x80000, "gfx3", 0 )    /* tiles */
 2769      ROM_LOAD( "dv08", 0x00000, 0x08000, CRC(89c13e15) SHA1(6507e60de5cd78a5b46090e4825a44c2a23631d7) )
 2770      ROM_CONTINUE(     0x10000, 0x08000 )
 2771      ROM_LOAD( "dv09", 0x08000, 0x08000, CRC(6a345a23) SHA1(b86f81b9fe25acd833ca3e2cff6cfa853c02280a) )
 2772      ROM_CONTINUE(     0x18000, 0x08000 )
 2773  
 2774      ROM_LOAD( "dv06", 0x20000, 0x08000, CRC(1eb52a20) SHA1(46670ed973f794be9c2c7e6bf5d97db51211e9a9) )
 2775      ROM_CONTINUE(     0x30000, 0x08000 )
 2776      ROM_LOAD( "dv07", 0x28000, 0x08000, CRC(e7346ef8) SHA1(8083a7a182e8ed904daf2f692115d01b3d0830eb) )
 2777      ROM_CONTINUE(     0x38000, 0x08000 )
 2778  
 2779      ROM_LOAD( "dv12", 0x40000, 0x08000, CRC(46ba5af4) SHA1(a1c13e7e3c85060202120b64e3cee32c1f733270) )
 2780      ROM_CONTINUE(     0x50000, 0x08000 )
 2781      ROM_LOAD( "dv13", 0x48000, 0x08000, CRC(a7af6dfd) SHA1(fa41bdafb64c79bd9769903fd37d4d5172b66a52) )
 2782      ROM_CONTINUE(     0x58000, 0x08000 )
 2783  
 2784      ROM_LOAD( "dv10", 0x60000, 0x08000, CRC(68b6d75c) SHA1(ac719ef6b30ac9e63fab13cb359e6114493f274d) )
 2785      ROM_CONTINUE(     0x70000, 0x08000 )
 2786      ROM_LOAD( "dv11", 0x68000, 0x08000, CRC(b5948aee) SHA1(587afbfeda985bede9e4b5f57dad6763f4294962) )
 2787      ROM_CONTINUE(     0x78000, 0x08000 )
 2788  ROM_END
 2789  
 2790  ROM_START( ghostb )
 2791      ROM_REGION( 0x50000, "maincpu", 0 )
 2792      ROM_LOAD( "dz01-22.1d", 0x08000, 0x08000, CRC(fc65fdf2) SHA1(b6ffe2043d5dbff061a9806631646428eed95dd3) )
 2793      ROM_LOAD( "dz02.3d",    0x10000, 0x10000, CRC(8e117541) SHA1(7dfa6eabb29f39a615f3e5123bddcc7197ab82d0) )
 2794      ROM_LOAD( "dz03.4d",    0x20000, 0x10000, CRC(5606a8f4) SHA1(e46e887f13f648fe2162cb853b3c20fa60e3d215) )
 2795      ROM_LOAD( "dz04-21.6d", 0x30000, 0x10000, CRC(7d46582f) SHA1(22e70675d76e2a93a732370fa42cc4b79381f4b0) )
 2796      ROM_LOAD( "dz05-21.7d", 0x40000, 0x10000, CRC(23e1c758) SHA1(c6432682e1d4429d0cfa8de6a05ca0152611b5b1) )
 2797  
 2798      ROM_REGION( 2*0x10000, "audiocpu", 0 )    /* 64K for sound CPU + 64k for decrypted opcodes */
 2799      ROM_LOAD( "dz06.5f", 0x8000, 0x8000, CRC(798f56df) SHA1(aee33cd0c102015114e17f6cb98945e7cc806f55) )
 2800  
 2801      ROM_REGION( 0x1000, "mcu", 0 )    /* ID8751H (fake) MCU */
 2802      ROM_LOAD( "dz-1.1b", 0x0000, 0x1000, BAD_DUMP CRC(18b7e1e6) SHA1(46b6d914ecee5e743ac805be1545ca44fb016d7d) ) /* Verfied label, but is it different the other DZ */
 2803  
 2804      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 2805      ROM_LOAD( "dz00.16b", 0x00000, 0x08000, CRC(992b4f31) SHA1(a9f255286193ccc261a9b6983aabf3c76ebe5ce5) )
 2806  
 2807      ROM_REGION( 0x80000, "gfx2", 0 )    /* sprites */
 2808      ROM_LOAD( "dz15.14f", 0x00000, 0x10000, CRC(a01a5fd9) SHA1(c15e11fbc0ede9e4a232abe37e6d221d5789ce8e) )
 2809      ROM_LOAD( "dz16.15f", 0x10000, 0x10000, CRC(5a9a344a) SHA1(f4e8c2bae023ce996e99383873eba23ab6f972a8) )
 2810      ROM_LOAD( "dz12.9f",  0x20000, 0x10000, CRC(817fae99) SHA1(4179501aedbdf5bb0824bf1c13e033685e57a207) )
 2811      ROM_LOAD( "dz14.12f", 0x30000, 0x10000, CRC(0abbf76d) SHA1(fefb0cb7b866452b890bcf8c47b1ed95df35095e) )
 2812      ROM_LOAD( "dz11.8f",  0x40000, 0x10000, CRC(a5e19c24) SHA1(a4aae81a116577ee3cdd9e1a46cae413ae252b76) )
 2813      ROM_LOAD( "dz13.1f",  0x50000, 0x10000, CRC(3e7c0405) SHA1(2cdcb9a902acecec0729a906b7edb44baf130d32) )
 2814      ROM_LOAD( "dz17.17f", 0x60000, 0x10000, CRC(40361b8b) SHA1(6ee59129e236ead3d9b828fb9726311b7a4f2ff6) )
 2815      ROM_LOAD( "dz18.18f", 0x70000, 0x10000, CRC(8d219489) SHA1(0490ad84085d1a60ece1b8ab45f0c551d2ac219d) )
 2816  
 2817      ROM_REGION( 0x40000, "gfx3", 0 )    /* tiles */
 2818      ROM_LOAD( "dz07.12f", 0x00000, 0x10000, CRC(e7455167) SHA1(a4582ced57862563ef626a25ced4072bc2c95750) )
 2819      ROM_LOAD( "dz08.14f", 0x10000, 0x10000, CRC(32f9ddfe) SHA1(2b8c228b0ca938ab7495d53e1a39275a8b872828) )
 2820      ROM_LOAD( "dz09.15f", 0x20000, 0x10000, CRC(bb6efc02) SHA1(ec501cd4a624d9c36a545dd100bc4f2f8b1e5cc0) )
 2821      ROM_LOAD( "dz10.17f", 0x30000, 0x10000, CRC(6ef9963b) SHA1(f12a2e2b0451a118234b2995185bb14d4998d430) )
 2822  
 2823      ROM_REGION( 0x0800, "proms", 0 )
 2824      ROM_LOAD( "dz19a.10d", 0x0000, 0x0400, CRC(47e1f83b) SHA1(f073eea1f33ed7a4862e4efd143debf1e0ee64b4) )
 2825      ROM_LOAD( "dz20a.11d", 0x0400, 0x0400, CRC(d8fe2d99) SHA1(56f8fcf2f871c7d52d4299a5b9988401ada4319d) )
 2826  ROM_END
 2827  
 2828  ROM_START( ghostb2a )
 2829      ROM_REGION( 0x50000, "maincpu", 0 )
 2830      ROM_LOAD( "dz01.1d", 0x08000, 0x08000, CRC(7c5bb4b1) SHA1(75865102c9bfbf9bd341b8ea54f49904c727f474) )
 2831      ROM_LOAD( "dz02.3d", 0x10000, 0x10000, CRC(8e117541) SHA1(7dfa6eabb29f39a615f3e5123bddcc7197ab82d0) )
 2832      ROM_LOAD( "dz03.4d", 0x20000, 0x10000, CRC(5606a8f4) SHA1(e46e887f13f648fe2162cb853b3c20fa60e3d215) )
 2833      ROM_LOAD( "dz04.6d", 0x30000, 0x10000, CRC(d09bad99) SHA1(bde8e4316cedf1d292f0aed8627b0dc6794c6e07) )
 2834      ROM_LOAD( "dz05.7d", 0x40000, 0x10000, CRC(0315f691) SHA1(3bfad18b9f230e64c608a22af20c3b00dca3e6da) )
 2835  
 2836      ROM_REGION( 2*0x10000, "audiocpu", 0 )    /* 64K for sound CPU + 64k for decrypted opcodes */
 2837      ROM_LOAD( "dz06.5f", 0x8000, 0x8000, CRC(798f56df) SHA1(aee33cd0c102015114e17f6cb98945e7cc806f55) )
 2838  
 2839      ROM_REGION( 0x1000, "mcu", 0 )    /* ID8751H (fake) MCU */
 2840      ROM_LOAD( "dz.1b", 0x0000, 0x1000, BAD_DUMP CRC(18b7e1e6) SHA1(46b6d914ecee5e743ac805be1545ca44fb016d7d) )
 2841  
 2842      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 2843      ROM_LOAD( "dz00.16b", 0x00000, 0x08000, CRC(992b4f31) SHA1(a9f255286193ccc261a9b6983aabf3c76ebe5ce5) )
 2844  
 2845      ROM_REGION( 0x80000, "gfx2", 0 )    /* sprites */
 2846      ROM_LOAD( "dz15.14f", 0x00000, 0x10000, CRC(a01a5fd9) SHA1(c15e11fbc0ede9e4a232abe37e6d221d5789ce8e) )
 2847      ROM_LOAD( "dz16.15f", 0x10000, 0x10000, CRC(5a9a344a) SHA1(f4e8c2bae023ce996e99383873eba23ab6f972a8) )
 2848      ROM_LOAD( "dz12.9f",  0x20000, 0x10000, CRC(817fae99) SHA1(4179501aedbdf5bb0824bf1c13e033685e57a207) )
 2849      ROM_LOAD( "dz14.12f", 0x30000, 0x10000, CRC(0abbf76d) SHA1(fefb0cb7b866452b890bcf8c47b1ed95df35095e) )
 2850      ROM_LOAD( "dz11.8f",  0x40000, 0x10000, CRC(a5e19c24) SHA1(a4aae81a116577ee3cdd9e1a46cae413ae252b76) )
 2851      ROM_LOAD( "dz13.1f",  0x50000, 0x10000, CRC(3e7c0405) SHA1(2cdcb9a902acecec0729a906b7edb44baf130d32) )
 2852      ROM_LOAD( "dz17.17f", 0x60000, 0x10000, CRC(40361b8b) SHA1(6ee59129e236ead3d9b828fb9726311b7a4f2ff6) )
 2853      ROM_LOAD( "dz18.18f", 0x70000, 0x10000, CRC(8d219489) SHA1(0490ad84085d1a60ece1b8ab45f0c551d2ac219d) )
 2854  
 2855      ROM_REGION( 0x40000, "gfx3", 0 )    /* tiles */
 2856      ROM_LOAD( "dz07.12f", 0x00000, 0x10000, CRC(e7455167) SHA1(a4582ced57862563ef626a25ced4072bc2c95750) )
 2857      ROM_LOAD( "dz08.14f", 0x10000, 0x10000, CRC(32f9ddfe) SHA1(2b8c228b0ca938ab7495d53e1a39275a8b872828) )
 2858      ROM_LOAD( "dz09.15f", 0x20000, 0x10000, CRC(bb6efc02) SHA1(ec501cd4a624d9c36a545dd100bc4f2f8b1e5cc0) )
 2859      ROM_LOAD( "dz10.17f", 0x30000, 0x10000, CRC(6ef9963b) SHA1(f12a2e2b0451a118234b2995185bb14d4998d430) )
 2860  
 2861      ROM_REGION( 0x0800, "proms", 0 )
 2862      ROM_LOAD( "dz19a.10d", 0x0000, 0x0400, CRC(47e1f83b) SHA1(f073eea1f33ed7a4862e4efd143debf1e0ee64b4) )
 2863      ROM_LOAD( "dz20a.11d", 0x0400, 0x0400, CRC(d8fe2d99) SHA1(56f8fcf2f871c7d52d4299a5b9988401ada4319d) )
 2864  ROM_END
 2865  
 2866  ROM_START( ghostb3 )
 2867      ROM_REGION( 0x50000, "maincpu", 0 )
 2868      ROM_LOAD( "dz01-3b.1d", 0x08000, 0x08000, CRC(c8cc862a) SHA1(e736107beb11a12cdf413655c6874df28d5a9c70) )
 2869      ROM_LOAD( "dz02.3d",    0x10000, 0x10000, CRC(8e117541) SHA1(7dfa6eabb29f39a615f3e5123bddcc7197ab82d0) )
 2870      ROM_LOAD( "dz03.4d",    0x20000, 0x10000, CRC(5606a8f4) SHA1(e46e887f13f648fe2162cb853b3c20fa60e3d215) )
 2871      ROM_LOAD( "dz04-1.6d",  0x30000, 0x10000, CRC(3c3eb09f) SHA1(ae4975992698fa97c68a857a25b470a05539160a) )
 2872      ROM_LOAD( "dz05-1.7d",  0x40000, 0x10000, CRC(b4971d33) SHA1(25e052c4b414c7bd7b6e3ae9c211873902afb5f7) )
 2873  
 2874      ROM_REGION( 2*0x10000, "audiocpu", 0 )    /* 64K for sound CPU + 64k for decrypted opcodes */
 2875      ROM_LOAD( "dz06.5f", 0x8000, 0x8000, CRC(798f56df) SHA1(aee33cd0c102015114e17f6cb98945e7cc806f55) )
 2876  
 2877      ROM_REGION( 0x1000, "mcu", 0 )    /* ID8751H (fake) MCU */
 2878      ROM_LOAD( "dz.1b", 0x0000, 0x1000, BAD_DUMP CRC(18b7e1e6) SHA1(46b6d914ecee5e743ac805be1545ca44fb016d7d) )
 2879  
 2880      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 2881      ROM_LOAD( "dz00.16b", 0x00000, 0x08000, CRC(992b4f31) SHA1(a9f255286193ccc261a9b6983aabf3c76ebe5ce5) )
 2882  
 2883      ROM_REGION( 0x80000, "gfx2", 0 )    /* sprites */
 2884      ROM_LOAD( "dz15.14f", 0x00000, 0x10000, CRC(a01a5fd9) SHA1(c15e11fbc0ede9e4a232abe37e6d221d5789ce8e) )
 2885      ROM_LOAD( "dz16.15f", 0x10000, 0x10000, CRC(5a9a344a) SHA1(f4e8c2bae023ce996e99383873eba23ab6f972a8) )
 2886      ROM_LOAD( "dz12.9f",  0x20000, 0x10000, CRC(817fae99) SHA1(4179501aedbdf5bb0824bf1c13e033685e57a207) )
 2887      ROM_LOAD( "dz14.12f", 0x30000, 0x10000, CRC(0abbf76d) SHA1(fefb0cb7b866452b890bcf8c47b1ed95df35095e) )
 2888      ROM_LOAD( "dz11.8f",  0x40000, 0x10000, CRC(a5e19c24) SHA1(a4aae81a116577ee3cdd9e1a46cae413ae252b76) )
 2889      ROM_LOAD( "dz13.1f",  0x50000, 0x10000, CRC(3e7c0405) SHA1(2cdcb9a902acecec0729a906b7edb44baf130d32) )
 2890      ROM_LOAD( "dz17.17f", 0x60000, 0x10000, CRC(40361b8b) SHA1(6ee59129e236ead3d9b828fb9726311b7a4f2ff6) )
 2891      ROM_LOAD( "dz18.18f", 0x70000, 0x10000, CRC(8d219489) SHA1(0490ad84085d1a60ece1b8ab45f0c551d2ac219d) )
 2892  
 2893      ROM_REGION( 0x40000, "gfx3", 0 )    /* tiles */
 2894      ROM_LOAD( "dz07.12f", 0x00000, 0x10000, CRC(e7455167) SHA1(a4582ced57862563ef626a25ced4072bc2c95750) )
 2895      ROM_LOAD( "dz08.14f", 0x10000, 0x10000, CRC(32f9ddfe) SHA1(2b8c228b0ca938ab7495d53e1a39275a8b872828) )
 2896      ROM_LOAD( "dz09.15f", 0x20000, 0x10000, CRC(bb6efc02) SHA1(ec501cd4a624d9c36a545dd100bc4f2f8b1e5cc0) )
 2897      ROM_LOAD( "dz10.17f", 0x30000, 0x10000, CRC(6ef9963b) SHA1(f12a2e2b0451a118234b2995185bb14d4998d430) )
 2898  
 2899      ROM_REGION( 0x0800, "proms", 0 )
 2900      ROM_LOAD( "dz19a.10d", 0x0000, 0x0400, CRC(47e1f83b) SHA1(f073eea1f33ed7a4862e4efd143debf1e0ee64b4) )
 2901      ROM_LOAD( "dz20a.11d", 0x0400, 0x0400, CRC(d8fe2d99) SHA1(56f8fcf2f871c7d52d4299a5b9988401ada4319d) )
 2902  ROM_END
 2903  
 2904  
 2905  /*
 2906  Meikyuu Hunter G (also known as Maze Hunter)
 2907  Data East, 1987
 2908  
 2909  PCB Layout
 2910  ----------
 2911  
 2912  DE-0273-1
 2913  |-------------------------------------------------------------|
 2914  |  2018           DW09                       DW00             |
 2915  |  2018                                                       |
 2916  |                 DW08                                      |-|
 2917  |   |---------|                                    6264     | |
 2918  |   |         |   DW07                                      | |
 2919  |   |L7A0072  |                                             | |
 2920  |   |DATA EAST|   DW06                                      | |
 2921  |   |BAC 06   |                                             | |
 2922  |J  |---------|                                             | |
 2923  |A                             DW19                         |-|
 2924  |M                                                            |
 2925  |M   DSW1      DSW2        DW18                               |
 2926  |A                                                          |-|
 2927  |                6116    |---|                              | |
 2928  |                        | H |                              | |
 2929  |                DW05    | D | DW04                         | |
 2930  |                        | 6 |                       2018   | |
 2931  |   65C02        YM3812  | 3 | DW03                         | |
 2932  |                        | C |                              | |
 2933  |   YM2203      YM3014   | 0 | DW02                         |-|
 2934  |                YM3014  | 9 |                                |
 2935  |        VOL  UPC324     |---| DW01-5           i8751H  8MHz  |
 2936  |-------------------------------------------------------------|
 2937  Notes:
 2938        2018         - 2K x8 SRAM (DIP24)
 2939        6116         - 2K x8 SRAM (DIP24)
 2940        6264         - 8K x8 SRAM (DIP28)
 2941        6502 CPU clock - 1.500MHz
 2942        6309 CPU clock - 3.000MHz
 2943        YM2203 clock   - 1.500MHz
 2944        8751 clock     - 8.000MHz (contents secured)
 2945        YM3812 clock   - 3.000MHz
 2946        VSync       - 58Hz
 2947        HSync       - 15.68kHz
 2948        ROMs -
 2949              DW00/DW01/DW05    - 27C256
 2950              DW02/DW03/DW04    \
 2951              DW06/DW07/DW08/DW09 / 27C512
 2952              DW18 - Fujitsu MB7132, compatible with Philips 82S181
 2953              DW19 - Fujitsu MB7122, compatible with Philips 82S137
 2954  
 2955  
 2956  DE-0259-1
 2957  |-------------------------------------------------------------|
 2958  |                                                             |
 2959  |                       2018                                  |
 2960  |   2018                                                    |-|
 2961  |                       2018                                | |
 2962  |                                         2018              | |
 2963  |   2018                                   2018             | |
 2964  |                                                           | |
 2965  |                       DW10                    |-------|   | |
 2966  |                                               |       |   | |
 2967  |                       DW11  2018              | DRL40 |   |-|
 2968  |                                               |       |     |
 2969  |                       DW12                    |-------|     |
 2970  |                                                           |-|
 2971  |                       DW13  2018                          | |
 2972  |     VSC30                                     |-------|   | |
 2973  |                       DW14                    |       |   | |
 2974  |                                               | DRL40 |   | |
 2975  |                       DW15  2018              |       |   | |
 2976  | HMC20                                         |-------|   | |
 2977  |                       DW16                                |-|
 2978  |                                                             |
 2979  |12MHz                 DW17  2018                             |
 2980  |-------------------------------------------------------------|
 2981  Notes:
 2982        2018 - 2K x8 SRAM (DIP24)
 2983        All ROMs 27512
 2984        DECO Custom ICs -
 2985                          DECO VSC30 M60348 6102 (DIP40)
 2986                          DECO HMC20 M60232 722001 (DIP28)
 2987                          DATA EAST DRL40 TC17G042AF 8053 8702A (x2, QFP144)
 2988  */
 2989  
 2990  ROM_START( meikyuh )
 2991      ROM_REGION( 0x40000, "maincpu", 0 )
 2992      ROM_LOAD( "dw01-5.1d", 0x08000, 0x08000, CRC(87610c39) SHA1(47b83e7decd18f117d00a9f55c42da93b337c04a) )
 2993      ROM_LOAD( "dw02.3d",   0x10000, 0x10000, CRC(40c9b0b8) SHA1(81deb25e00eb4d4c5133ea42cda279c318ee771c) )
 2994      ROM_LOAD( "dw03.4d",   0x20000, 0x10000, CRC(5606a8f4) SHA1(e46e887f13f648fe2162cb853b3c20fa60e3d215) )
 2995      ROM_LOAD( "dw04.6d",   0x30000, 0x10000, CRC(235c0c36) SHA1(f0635f8348459cb8a56eb6184f1bc31c3a82de6a) )
 2996  
 2997      ROM_REGION( 0x10000, "audiocpu", 0 )
 2998      ROM_LOAD( "dw05.5f", 0x8000, 0x8000, CRC(c28c4d82) SHA1(ad88506bcbc9763e39d6e6bb25ef2bd6aa929f30) )
 2999  
 3000      ROM_REGION( 0x1000, "mcu", 0 )    /* ID8751H MCU */
 3001      ROM_LOAD( "dw.1b", 0x0000, 0x1000, CRC(28e9ced9) SHA1(a3d6dfa1e44fa93c0f30fa0a88b6dd3d6e5c4dda) )
 3002  
 3003      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 3004      ROM_LOAD( "dw00.16b", 0x00000, 0x8000, CRC(3d25f15c) SHA1(590518460d069bc235b5efebec81731d7a2375de) )
 3005  
 3006      ROM_REGION( 0x80000, "gfx2", 0 )    /* sprites */
 3007      ROM_LOAD( "dw14.14f", 0x00000, 0x10000, CRC(9b0dbfa9) SHA1(c9db6e70b217a34fbc2bf17da3f5ec6f0130514a) )
 3008      ROM_LOAD( "dw15.15f", 0x10000, 0x10000, CRC(95683fda) SHA1(aa91ad1cd685790e29e16d64bd75a5b4367cf87b) )
 3009      ROM_LOAD( "dw11.9f",  0x20000, 0x10000, CRC(1b1fcca7) SHA1(17e510c1b3efa0f6da49461c286b89295db6b9a6) )
 3010      ROM_LOAD( "dw13.12f", 0x30000, 0x10000, CRC(e7413056) SHA1(62048a9648cbb6b651e3409f77cee268822fd2e1) )
 3011      ROM_LOAD( "dw10.8f",  0x40000, 0x10000, CRC(57667546) SHA1(e7756997ea04204e62404ce8069f8cdb33cb4565) )
 3012      ROM_LOAD( "dw12.1f",  0x50000, 0x10000, CRC(4c548db8) SHA1(988411ab41884c926ca971e7b58f406f85be3b54) )
 3013      ROM_LOAD( "dw16.17f", 0x60000, 0x10000, CRC(e5bcf927) SHA1(b96bd4c124c9745fae1c1f35bdbbdec9f97ab4a5) )
 3014      ROM_LOAD( "dw17.18f", 0x70000, 0x10000, CRC(9e10f723) SHA1(159c5e3d821a10b64cd6d538d19063d0f5b057c0) )
 3015  
 3016      ROM_REGION( 0x40000, "gfx3", 0 )    /* tiles */
 3017      ROM_LOAD( "dw06.12f", 0x00000, 0x10000, CRC(b65e029d) SHA1(f8791d57f688f16e0f076361603510e7133f4e36) )
 3018      ROM_LOAD( "dw07.14f", 0x10000, 0x10000, CRC(668d995d) SHA1(dc6221de6103168c8e19f2c6eb159b8989ca2208) )
 3019      ROM_LOAD( "dw08.15f", 0x20000, 0x10000, CRC(bb2cf4a0) SHA1(78806adb6a9ad9fc0707ead567a3220eb2bdb32f) )
 3020      ROM_LOAD( "dw09.17f", 0x30000, 0x10000, CRC(6a528d13) SHA1(f1ef592f1efea637abde26bb8e3d02d552582a43) )
 3021  
 3022      ROM_REGION( 0x0800, "proms", 0 )
 3023      ROM_LOAD( "dw18.9d",  0x0000, 0x0400, CRC(75f1945f) SHA1(6fa436ae21851ec30847d57c31bdd2fd695e08af)  )
 3024      ROM_LOAD( "dw19.10d", 0x0400, 0x0400, CRC(cc16f3fa) SHA1(4562106ff752f5fc5ae00ff098141e5d74fe4700)  )
 3025  ROM_END
 3026  
 3027  /*
 3028  
 3029  Meikyuu Hunter G (Japan, set 2)
 3030  
 3031  set 2 - the code is very different, but is this an original board? it lacks original labels
 3032          and the IC positions are different on the sprite roms
 3033  
 3034  this version lacks the linescroll effects when starting the game / demoplay, but the demoplay seems
 3035  more complete, whereas in set 1 the players appear to get stuck before reaching the boss
 3036  
 3037  also is 27512.15f a good dump? graphic roms usually match, might be a good idea to check 27512.6d too
 3038  
 3039  CPU
 3040  ---
 3041  
 3042  CPUs PCB (AT0789A):
 3043  1x MC68B09EP (main)
 3044  1x 8751H (missing, the socket is empty!)
 3045  1x UM6502 (sound)
 3046  1x YM2203 (sound)
 3047  1x YM3526 (sound)
 3048  2x Y3414B (sound)
 3049  1x CA324E (sound)
 3050  1x oscillator 8.0000MHz
 3051  
 3052  ROMs PCB (AT0789B):
 3053  1x oscillator 12.000MHz
 3054  
 3055  
 3056  ROMs
 3057  ----
 3058  
 3059  CPUs PCB (AT0789A):
 3060  3x P27256
 3061  2x TMM24512
 3062  5x M27512ZB
 3063  3x N82S137N (not dumped)
 3064  
 3065  ROMs PCB (AT0789B):
 3066  8x M27512ZB
 3067  3x PAL16R4ANC (not dumped)
 3068  Note    CPUs PCB (AT0789A):
 3069  1x 28x2 JAMMA edge connector
 3070  1x trimmer (volume)
 3071  2x 8 switches dip
 3072  2x 50 pins flat cable connector to ROMs PCB
 3073  
 3074  ROMs PCB (AT0789B):
 3075  2x 50 pins flat cable connector to CPUs PCB
 3076  
 3077  ------------------------------------
 3078  There is a small piggyback attached under CPUs PCB full of 74Sxx
 3079  
 3080  This boards looks like a legit PCB from Data East, even if a Data East logo is not present.
 3081  
 3082  ALL MEMORIES ARE MASKROMS!
 3083  
 3084  */
 3085  ROM_START( meikyuha )
 3086      ROM_REGION( 0x40000, "maincpu", 0 )
 3087      ROM_LOAD( "27256.1d", 0x08000, 0x08000, CRC(d5b5e8a2) SHA1(0155d1d0ddbd764b960148c3c9ef34223e101659) ) // dw-01-5.1d matched 6.552124%
 3088      ROM_LOAD( "24512.3d", 0x10000, 0x10000, CRC(40c9b0b8) SHA1(81deb25e00eb4d4c5133ea42cda279c318ee771c) )
 3089      ROM_LOAD( "24512.4d", 0x20000, 0x10000, CRC(5606a8f4) SHA1(e46e887f13f648fe2162cb853b3c20fa60e3d215) )
 3090      ROM_LOAD( "27512.6d", 0x30000, 0x10000, CRC(8ca6055d) SHA1(37dc5d3b158dc5d7c9677fc4f82e10804181619f) ) // dw-04.6d matched 99.995422%
 3091  
 3092      ROM_REGION( 0x10000, "audiocpu", 0 )
 3093      ROM_LOAD( "27256.5f", 0x8000, 0x8000, CRC(c28c4d82) SHA1(ad88506bcbc9763e39d6e6bb25ef2bd6aa929f30) )
 3094  
 3095      ROM_REGION( 0x1000, "mcu", 0 )    /* ID8751H MCU */
 3096      ROM_LOAD( "dw.1b", 0x0000, 0x1000, CRC(28e9ced9) SHA1(a3d6dfa1e44fa93c0f30fa0a88b6dd3d6e5c4dda) )
 3097  
 3098      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 3099      ROM_LOAD( "27256.16b", 0x00000, 0x8000, CRC(3d25f15c) SHA1(590518460d069bc235b5efebec81731d7a2375de) )
 3100  
 3101      ROM_REGION( 0x80000, "gfx2", 0 )    /* sprites */
 3102      ROM_LOAD( "92.6m", 0x00000, 0x10000, CRC(9b0dbfa9) SHA1(c9db6e70b217a34fbc2bf17da3f5ec6f0130514a) )
 3103      ROM_LOAD( "93.6o", 0x10000, 0x10000, CRC(95683fda) SHA1(aa91ad1cd685790e29e16d64bd75a5b4367cf87b) )
 3104      ROM_LOAD( "89.6i", 0x20000, 0x10000, CRC(1b1fcca7) SHA1(17e510c1b3efa0f6da49461c286b89295db6b9a6) )
 3105      ROM_LOAD( "91.6l", 0x30000, 0x10000, CRC(e7413056) SHA1(62048a9648cbb6b651e3409f77cee268822fd2e1) )
 3106      ROM_LOAD( "88.6h", 0x40000, 0x10000, CRC(57667546) SHA1(e7756997ea04204e62404ce8069f8cdb33cb4565) )
 3107      ROM_LOAD( "90.6k", 0x50000, 0x10000, CRC(4c548db8) SHA1(988411ab41884c926ca971e7b58f406f85be3b54) )
 3108      ROM_LOAD( "94.6p", 0x60000, 0x10000, CRC(e5bcf927) SHA1(b96bd4c124c9745fae1c1f35bdbbdec9f97ab4a5) )
 3109      ROM_LOAD( "95.6r", 0x70000, 0x10000, CRC(9e10f723) SHA1(159c5e3d821a10b64cd6d538d19063d0f5b057c0) )
 3110  
 3111      ROM_REGION( 0x40000, "gfx3", 0 )    /* tiles */
 3112      ROM_LOAD( "27512.12f", 0x00000, 0x10000, CRC(b65e029d) SHA1(f8791d57f688f16e0f076361603510e7133f4e36) )
 3113      ROM_LOAD( "27512.14f", 0x10000, 0x10000, CRC(668d995d) SHA1(dc6221de6103168c8e19f2c6eb159b8989ca2208) )
 3114      ROM_LOAD( "27512.15f", 0x20000, 0x10000, CRC(547fe4e2) SHA1(f8406e7d2bbd2243fcfe27c7ba401f04536dadc9) ) // dw-08.15f matched 99.996948% (bad?)
 3115      ROM_LOAD( "27512.17f", 0x30000, 0x10000, CRC(6a528d13) SHA1(f1ef592f1efea637abde26bb8e3d02d552582a43) )
 3116  
 3117      ROM_REGION( 0x0800, "proms", 0 ) // taken from other set
 3118      ROM_LOAD( "dw18.9d",  0x0000, 0x0400, CRC(75f1945f) SHA1(6fa436ae21851ec30847d57c31bdd2fd695e08af)  )
 3119      ROM_LOAD( "dw19.10d", 0x0400, 0x0400, CRC(cc16f3fa) SHA1(4562106ff752f5fc5ae00ff098141e5d74fe4700)  )
 3120  ROM_END
 3121  
 3122  /*
 3123  Main Compoennts
 3124  ---------------
 3125  
 3126  Top board (DATA EAST DE-0250-3):
 3127  2x MC68B09EP (18e,19e)(main)
 3128  1x RP65C02A (3f)(sound)
 3129  1x YM3812 (1e)(sound)
 3130  1x YM2203 (1f)(sound)
 3131  2x Y30148 (1j,2j)(sound)
 3132  1x OKI M5205 (3j)(sound)
 3133  1x NEC PC3403C (1j)(sound)
 3134  1x C4558C (2j)(sound)
 3135  1x oscillator 8.000 (x1)
 3136  1x ID8751H (read protected)
 3137  
 3138  Lower board (DATA EAST DE-0251-2):
 3139  1x DECO TC15G032AY-0013-8644a-DSPC10 (square component, with 135 pass-through pins)(14h)
 3140  1x DECO VSC30-M60348-6102 (DIL40)(9a)
 3141  1x DECO HMC20-M60232-6902 (DIL28)(14a)
 3142  1x oscillator 12.000 (x1)
 3143  
 3144  ROMs
 3145  ----
 3146  
 3147  Top board (DATA EAST DE-0250-3):
 3148  2x MBM27256 (00,03)
 3149  10x MBM27C512 (01,02,04,05,06,07,08,09,10,11)
 3150  1x MB7122 (DIL18) (15)
 3151  
 3152  Lower board (DATA EAST DE-0251-2):
 3153  3x MBM27C512
 3154  
 3155  Notes
 3156  -----
 3157  
 3158  Top board (DATA EAST DE-0250-3):
 3159  1x JAMMA edge connector
 3160  2x 25x2 legs connectors to lower board (cn1,cn2)
 3161  1x trimmer (volume)
 3162  2x 8 switches dip (7k,16k)
 3163  
 3164  Lower board (DATA EAST DE-0251-2):
 3165  2x 25x2 legs connectors to top board (cn1,cn2)
 3166  
 3167  */
 3168  
 3169  ROM_START( csilver )
 3170      ROM_REGION( 0x48000, "maincpu", 0 )
 3171      ROM_LOAD( "dx03-12.18d", 0x08000, 0x08000, CRC(2d926e7c) SHA1(cf38e92904edb1870b0a4965f9049d67efe8cf6a) )
 3172      ROM_LOAD( "dx01.12d", 0x10000, 0x10000, CRC(570fb50c) SHA1(3002f53182834a060fc282be1bc5767906e19ba2) )
 3173      ROM_LOAD( "dx02.13d", 0x20000, 0x10000, CRC(58625890) SHA1(503a969085f6dcb16687217c48136ea22d07c89f) )
 3174  
 3175      ROM_REGION( 0x10000, "sub", 0 )    /* CPU 2, 1st 16k is empty */
 3176      ROM_LOAD( "dx04-1.19d", 0x0000, 0x10000,  CRC(29432691) SHA1(a76ecd27d217c66a0e43f93e29efe83c657925c3) )
 3177  
 3178      ROM_REGION( 0x18000, "audiocpu", 0 )
 3179      ROM_LOAD( "dx05.3f", 0x10000, 0x08000,  CRC(eb32cf25) SHA1(9390c88033259c65eb15320e31f5d696970987cc) )
 3180      ROM_CONTINUE(   0x08000, 0x08000 )
 3181  
 3182      ROM_REGION( 0x1000, "mcu", 0 )    /* ID8751H MCU */
 3183      ROM_LOAD( "id8751h.mcu", 0x0000, 0x1000, NO_DUMP ) // dx-8.19a ?
 3184  
 3185      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 3186      ROM_LOAD( "dx00.3d",  0x00000, 0x08000, CRC(f01ef985) SHA1(d5b823bd7c0efcf3137f8643c5d99a260bed5675) )
 3187  
 3188      ROM_REGION( 0x80000, "gfx2", 0 )    /* sprites (3bpp) */
 3189      ROM_LOAD( "dx14.15k",  0x00000, 0x10000, CRC(80f07915) SHA1(ea100f12ef3a68110af911fa9beeb73b388f069d) )
 3190      /* 0x10000-0x1ffff empy */
 3191      ROM_LOAD( "dx13.13k",  0x20000, 0x10000, CRC(d32c02e7) SHA1(d0518ec31e9e3f7b4e76fba5d7c05c33c61a9c72) )
 3192      /* 0x30000-0x3ffff empy */
 3193      ROM_LOAD( "dx12.10k",  0x40000, 0x10000, CRC(ac78b76b) SHA1(c2be347fd950894401123ada8b27bfcfce53e66b) )
 3194      /* 0x50000-0x5ffff empy */
 3195      /* 0x60000-0x7ffff empy (no 4th plane) */
 3196  
 3197      ROM_REGION( 0x80000, "gfx3", 0 )    /* tiles (3bpp) */
 3198      ROM_LOAD( "dx06.5f",  0x00000, 0x10000, CRC(b6fb208c) SHA1(027d33f0b5feb6f0433134213cfcef96790eaace) )
 3199      ROM_LOAD( "dx07.7f",  0x10000, 0x10000, CRC(ee3e1817) SHA1(013496976a9ffacf1587b3a6fc0f548becb1ab0e) )
 3200      ROM_LOAD( "dx08.8f",  0x20000, 0x10000, CRC(705900fe) SHA1(53b9d09f9780a3bf3545bc27a2855ebee3884124) )
 3201      ROM_LOAD( "dx09.10f", 0x30000, 0x10000, CRC(3192571d) SHA1(240c6c099f1e6edbf0be7d5a4ec396b056c9f70f) )
 3202      ROM_LOAD( "dx10.12f",  0x40000, 0x10000, CRC(3ef77a32) SHA1(97b97c35a6ca994d2e7a6e7a63101eda9709bcb1) )
 3203      ROM_LOAD( "dx11.13f",  0x50000, 0x10000, CRC(9cf3d5b8) SHA1(df4974f8412ab1cf65871b8e4e3dbee478bf4d21) )
 3204  ROM_END
 3205  
 3206  /* Different IC positions to World set? */
 3207  ROM_START( csilverj )
 3208      ROM_REGION( 0x48000, "maincpu", 0 )
 3209      ROM_LOAD( "dx03-3.a4", 0x08000, 0x08000, CRC(02dd8cfc) SHA1(f29c0d9dd03e8c52672c0f3dbee44a93c5b4261d) )
 3210      ROM_LOAD( "dx01.a2", 0x10000, 0x10000, CRC(570fb50c) SHA1(3002f53182834a060fc282be1bc5767906e19ba2) )
 3211      ROM_LOAD( "dx02.a3", 0x20000, 0x10000, CRC(58625890) SHA1(503a969085f6dcb16687217c48136ea22d07c89f) )
 3212  
 3213      ROM_REGION( 0x10000, "sub", 0 )    /* CPU 2, 1st 16k is empty */
 3214      ROM_LOAD( "dx04-1.a5", 0x0000, 0x10000,  CRC(29432691) SHA1(a76ecd27d217c66a0e43f93e29efe83c657925c3) )
 3215  
 3216      ROM_REGION( 0x18000, "audiocpu", 0 )
 3217      ROM_LOAD( "dx05.a6", 0x10000, 0x08000,  CRC(eb32cf25) SHA1(9390c88033259c65eb15320e31f5d696970987cc) )
 3218      ROM_CONTINUE(   0x08000, 0x08000 )
 3219  
 3220      ROM_REGION( 0x1000, "mcu", 0 )    /* ID8751H MCU */
 3221      ROM_LOAD( "id8751h.mcu", 0x0000, 0x1000, NO_DUMP )
 3222  
 3223      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 3224      ROM_LOAD( "dx00.a1",  0x00000, 0x08000, CRC(f01ef985) SHA1(d5b823bd7c0efcf3137f8643c5d99a260bed5675) )
 3225  
 3226      ROM_REGION( 0x80000, "gfx2", 0 )    /* sprites (3bpp) */
 3227      ROM_LOAD( "dx14.b5",  0x00000, 0x10000, CRC(80f07915) SHA1(ea100f12ef3a68110af911fa9beeb73b388f069d) )
 3228      /* 0x10000-0x1ffff empy */
 3229      ROM_LOAD( "dx13.b4",  0x20000, 0x10000, CRC(d32c02e7) SHA1(d0518ec31e9e3f7b4e76fba5d7c05c33c61a9c72) )
 3230      /* 0x30000-0x3ffff empy */
 3231      ROM_LOAD( "dx12.b3",  0x40000, 0x10000, CRC(ac78b76b) SHA1(c2be347fd950894401123ada8b27bfcfce53e66b) )
 3232      /* 0x50000-0x5ffff empy */
 3233      /* 0x60000-0x7ffff empy (no 4th plane) */
 3234  
 3235      ROM_REGION( 0x80000, "gfx3", 0 )    /* tiles (3bpp) */
 3236      ROM_LOAD( "dx06.a7",  0x00000, 0x10000, CRC(b6fb208c) SHA1(027d33f0b5feb6f0433134213cfcef96790eaace) )
 3237      ROM_LOAD( "dx07.a8",  0x10000, 0x10000, CRC(ee3e1817) SHA1(013496976a9ffacf1587b3a6fc0f548becb1ab0e) )
 3238      ROM_LOAD( "dx08.a9",  0x20000, 0x10000, CRC(705900fe) SHA1(53b9d09f9780a3bf3545bc27a2855ebee3884124) )
 3239      ROM_LOAD( "dx09.a10", 0x30000, 0x10000, CRC(3192571d) SHA1(240c6c099f1e6edbf0be7d5a4ec396b056c9f70f) )
 3240      ROM_LOAD( "dx10.b1",  0x40000, 0x10000, CRC(3ef77a32) SHA1(97b97c35a6ca994d2e7a6e7a63101eda9709bcb1) )
 3241      ROM_LOAD( "dx11.b2",  0x50000, 0x10000, CRC(9cf3d5b8) SHA1(df4974f8412ab1cf65871b8e4e3dbee478bf4d21) )
 3242  ROM_END
 3243  
 3244  ROM_START( oscar )
 3245      ROM_REGION( 0x20000, "maincpu", 0 )
 3246      ROM_LOAD( "du10", 0x08000, 0x08000, CRC(120040d8) SHA1(22d5f84f3ca724cbf39dfc4790f2175ba4945aaf) ) /* Is "DU" code correct for "World" or is   */
 3247      ROM_LOAD( "ed09", 0x10000, 0x10000, CRC(e2d4bba9) SHA1(99f0310debe51f4bcd00b5fdaedc1caf2eeccdeb) ) /* this set really the first rev Japan set? */
 3248  
 3249      ROM_REGION( 0x10000, "sub", 0 )    /* CPU 2, 1st 16k is empty */
 3250      ROM_LOAD( "du11", 0x0000, 0x10000, CRC(ff45c440) SHA1(4769944bcfebcdcba7ed7d5133d4d9f98890d75c) )
 3251  
 3252      ROM_REGION( 2*0x10000, "audiocpu", 0 )    /* 64K for sound CPU + 64k for decrypted opcodes */
 3253      ROM_LOAD( "ed12", 0x8000, 0x8000, CRC(432031c5) SHA1(af2deea48b98eb0f9e85a4fb1486021f999f9abd) )
 3254  
 3255      ROM_REGION( 0x1000, "mcu", 0 )    /* ID8751H MCU */
 3256      ROM_LOAD( "id8751h.mcu", 0x0000, 0x1000, NO_DUMP )
 3257  
 3258      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 3259      ROM_LOAD( "ed08", 0x00000, 0x04000, CRC(308ac264) SHA1(fd1c4ec4e4f99c33e93cd15e178c4714251a9b7e) )
 3260  
 3261      ROM_REGION( 0x80000, "gfx2", 0 )    /* sprites */
 3262      ROM_LOAD( "ed04", 0x00000, 0x10000, CRC(416a791b) SHA1(e6541b713225289a43962363029eb0e22a1ecb4a) )
 3263      ROM_LOAD( "ed05", 0x20000, 0x10000, CRC(fcdba431) SHA1(0be2194519c36ddf136610f60890506eda1faf0b) )
 3264      ROM_LOAD( "ed06", 0x40000, 0x10000, CRC(7d50bebc) SHA1(06375f3273c48c7c7d81f1c15cbc5d3f3e05b8ed) )
 3265      ROM_LOAD( "ed07", 0x60000, 0x10000, CRC(8fdf0fa5) SHA1(2b4d1ca1436864e89b13b3fa151a4a3708592e0a) )
 3266  
 3267      ROM_REGION( 0x80000, "gfx3", 0 )    /* tiles */
 3268      ROM_LOAD( "ed01", 0x00000, 0x10000, CRC(d3a58e9e) SHA1(35eda2aa630fc2c11a1aff2b00bcfabe2f3d4249) )
 3269      ROM_LOAD( "ed03", 0x20000, 0x10000, CRC(4fc4fb0f) SHA1(0906762a3adbffe765e072255262fedaa78bdb2a) )
 3270      ROM_LOAD( "ed00", 0x40000, 0x10000, CRC(ac201f2d) SHA1(77f13eb6a1a44444ca9b25363031451b0d68c988) )
 3271      ROM_LOAD( "ed02", 0x60000, 0x10000, CRC(7ddc5651) SHA1(f5ec5245cf3d9d4d9c1df6a8128c24565e331317) )
 3272  ROM_END
 3273  
 3274  ROM_START( oscaru )
 3275      ROM_REGION( 0x20000, "maincpu", 0 )
 3276      ROM_LOAD( "ed10", 0x08000, 0x08000, CRC(f9b0d4d4) SHA1(dc2aba978ba96f365027c7be5714728d5d7fb802) )
 3277      ROM_LOAD( "ed09", 0x10000, 0x10000, CRC(e2d4bba9) SHA1(99f0310debe51f4bcd00b5fdaedc1caf2eeccdeb) )
 3278  
 3279      ROM_REGION( 0x10000, "sub", 0 )    /* CPU 2, 1st 16k is empty */
 3280      ROM_LOAD( "ed11", 0x0000, 0x10000,  CRC(10e5d919) SHA1(13bc3497cb4aaa6dd272853819212ad63656f8a7) )
 3281  
 3282      ROM_REGION( 2*0x10000, "audiocpu", 0 )    /* 64K for sound CPU + 64k for decrypted opcodes */
 3283      ROM_LOAD( "ed12", 0x8000, 0x8000,  CRC(432031c5) SHA1(af2deea48b98eb0f9e85a4fb1486021f999f9abd) )
 3284  
 3285      ROM_REGION( 0x1000, "mcu", 0 )    /* ID8751H MCU */
 3286      ROM_LOAD( "id8751h.mcu", 0x0000, 0x1000, NO_DUMP )
 3287  
 3288      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 3289      ROM_LOAD( "ed08", 0x00000, 0x04000, CRC(308ac264) SHA1(fd1c4ec4e4f99c33e93cd15e178c4714251a9b7e) )
 3290  
 3291      ROM_REGION( 0x80000, "gfx2", 0 )    /* sprites */
 3292      ROM_LOAD( "ed04", 0x00000, 0x10000, CRC(416a791b) SHA1(e6541b713225289a43962363029eb0e22a1ecb4a) )
 3293      ROM_LOAD( "ed05", 0x20000, 0x10000, CRC(fcdba431) SHA1(0be2194519c36ddf136610f60890506eda1faf0b) )
 3294      ROM_LOAD( "ed06", 0x40000, 0x10000, CRC(7d50bebc) SHA1(06375f3273c48c7c7d81f1c15cbc5d3f3e05b8ed) )
 3295      ROM_LOAD( "ed07", 0x60000, 0x10000, CRC(8fdf0fa5) SHA1(2b4d1ca1436864e89b13b3fa151a4a3708592e0a) )
 3296  
 3297      ROM_REGION( 0x80000, "gfx3", 0 )    /* tiles */
 3298      ROM_LOAD( "ed01", 0x00000, 0x10000, CRC(d3a58e9e) SHA1(35eda2aa630fc2c11a1aff2b00bcfabe2f3d4249) )
 3299      ROM_LOAD( "ed03", 0x20000, 0x10000, CRC(4fc4fb0f) SHA1(0906762a3adbffe765e072255262fedaa78bdb2a) )
 3300      ROM_LOAD( "ed00", 0x40000, 0x10000, CRC(ac201f2d) SHA1(77f13eb6a1a44444ca9b25363031451b0d68c988) )
 3301      ROM_LOAD( "ed02", 0x60000, 0x10000, CRC(7ddc5651) SHA1(f5ec5245cf3d9d4d9c1df6a8128c24565e331317) )
 3302  
 3303      ROM_REGION( 512, "proms", 0 )
 3304      ROM_LOAD( "du-13.bin", 0x00000,  0x200,  CRC(bea1f87e) SHA1(f5215992e4b53c9cd4c7e0b20ff5cfdce3ab6d02) )    /* Priority (Not yet used) */
 3305  ROM_END
 3306  
 3307  ROM_START( oscarj1 )
 3308      ROM_REGION( 0x20000, "maincpu", 0 )
 3309      ROM_LOAD( "du10-1", 0x08000, 0x08000, CRC(4ebc9f7a) SHA1(df8fdc4b4b203dc1bdd048f069fb6b723bdea0d2) )
 3310      ROM_LOAD( "ed09",   0x10000, 0x10000, CRC(e2d4bba9) SHA1(99f0310debe51f4bcd00b5fdaedc1caf2eeccdeb) )
 3311  
 3312      ROM_REGION( 0x10000, "sub", 0 )    /* CPU 2, 1st 16k is empty */
 3313      ROM_LOAD( "du11", 0x0000, 0x10000, CRC(ff45c440) SHA1(4769944bcfebcdcba7ed7d5133d4d9f98890d75c) )
 3314  
 3315      ROM_REGION( 2*0x10000, "audiocpu", 0 )    /* 64K for sound CPU + 64k for decrypted opcodes */
 3316      ROM_LOAD( "ed12", 0x8000, 0x8000, CRC(432031c5) SHA1(af2deea48b98eb0f9e85a4fb1486021f999f9abd) )
 3317  
 3318      ROM_REGION( 0x1000, "mcu", 0 )    /* ID8751H MCU */
 3319      ROM_LOAD( "id8751h.mcu", 0x0000, 0x1000, NO_DUMP )
 3320  
 3321      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 3322      ROM_LOAD( "ed08", 0x00000, 0x04000, CRC(308ac264) SHA1(fd1c4ec4e4f99c33e93cd15e178c4714251a9b7e) )
 3323  
 3324      ROM_REGION( 0x80000, "gfx2", 0 )    /* sprites */
 3325      ROM_LOAD( "ed04", 0x00000, 0x10000, CRC(416a791b) SHA1(e6541b713225289a43962363029eb0e22a1ecb4a) )
 3326      ROM_LOAD( "ed05", 0x20000, 0x10000, CRC(fcdba431) SHA1(0be2194519c36ddf136610f60890506eda1faf0b) )
 3327      ROM_LOAD( "ed06", 0x40000, 0x10000, CRC(7d50bebc) SHA1(06375f3273c48c7c7d81f1c15cbc5d3f3e05b8ed) )
 3328      ROM_LOAD( "ed07", 0x60000, 0x10000, CRC(8fdf0fa5) SHA1(2b4d1ca1436864e89b13b3fa151a4a3708592e0a) )
 3329  
 3330      ROM_REGION( 0x80000, "gfx3", 0 )    /* tiles */
 3331      ROM_LOAD( "ed01", 0x00000, 0x10000, CRC(d3a58e9e) SHA1(35eda2aa630fc2c11a1aff2b00bcfabe2f3d4249) )
 3332      ROM_LOAD( "ed03", 0x20000, 0x10000, CRC(4fc4fb0f) SHA1(0906762a3adbffe765e072255262fedaa78bdb2a) )
 3333      ROM_LOAD( "ed00", 0x40000, 0x10000, CRC(ac201f2d) SHA1(77f13eb6a1a44444ca9b25363031451b0d68c988) )
 3334      ROM_LOAD( "ed02", 0x60000, 0x10000, CRC(7ddc5651) SHA1(f5ec5245cf3d9d4d9c1df6a8128c24565e331317) )
 3335  
 3336      ROM_REGION( 512, "proms", 0 )
 3337      ROM_LOAD( "du-13.bin", 0x00000,  0x200,  CRC(bea1f87e) SHA1(f5215992e4b53c9cd4c7e0b20ff5cfdce3ab6d02) )    /* Priority (Not yet used) */
 3338  ROM_END
 3339  
 3340  ROM_START( oscarj2 )
 3341      ROM_REGION( 0x20000, "maincpu", 0 )
 3342      ROM_LOAD( "du10-2", 0x08000, 0x08000, CRC(114e898d) SHA1(1072ccabe6d53c50cdfa1e27d5d848ecdd6559cc) )
 3343      ROM_LOAD( "ed09",   0x10000, 0x10000, CRC(e2d4bba9) SHA1(99f0310debe51f4bcd00b5fdaedc1caf2eeccdeb) )
 3344  
 3345      ROM_REGION( 0x10000, "sub", 0 )    /* CPU 2, 1st 16k is empty */
 3346      ROM_LOAD( "du11", 0x0000, 0x10000, CRC(ff45c440) SHA1(4769944bcfebcdcba7ed7d5133d4d9f98890d75c) )
 3347  
 3348      ROM_REGION( 2*0x10000, "audiocpu", 0 )    /* 64K for sound CPU + 64k for decrypted opcodes */
 3349      ROM_LOAD( "ed12", 0x8000, 0x8000, CRC(432031c5) SHA1(af2deea48b98eb0f9e85a4fb1486021f999f9abd) )
 3350  
 3351      ROM_REGION( 0x1000, "mcu", 0 )    /* ID8751H MCU */
 3352      ROM_LOAD( "id8751h.mcu", 0x0000, 0x1000, NO_DUMP )
 3353  
 3354      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 3355      ROM_LOAD( "ed08", 0x00000, 0x04000, CRC(308ac264) SHA1(fd1c4ec4e4f99c33e93cd15e178c4714251a9b7e) )
 3356  
 3357      ROM_REGION( 0x80000, "gfx2", 0 )    /* sprites */
 3358      ROM_LOAD( "ed04", 0x00000, 0x10000, CRC(416a791b) SHA1(e6541b713225289a43962363029eb0e22a1ecb4a) )
 3359      ROM_LOAD( "ed05", 0x20000, 0x10000, CRC(fcdba431) SHA1(0be2194519c36ddf136610f60890506eda1faf0b) )
 3360      ROM_LOAD( "ed06", 0x40000, 0x10000, CRC(7d50bebc) SHA1(06375f3273c48c7c7d81f1c15cbc5d3f3e05b8ed) )
 3361      ROM_LOAD( "ed07", 0x60000, 0x10000, CRC(8fdf0fa5) SHA1(2b4d1ca1436864e89b13b3fa151a4a3708592e0a) )
 3362  
 3363      ROM_REGION( 0x80000, "gfx3", 0 )    /* tiles */
 3364      ROM_LOAD( "ed01", 0x00000, 0x10000, CRC(d3a58e9e) SHA1(35eda2aa630fc2c11a1aff2b00bcfabe2f3d4249) )
 3365      ROM_LOAD( "ed03", 0x20000, 0x10000, CRC(4fc4fb0f) SHA1(0906762a3adbffe765e072255262fedaa78bdb2a) )
 3366      ROM_LOAD( "ed00", 0x40000, 0x10000, CRC(ac201f2d) SHA1(77f13eb6a1a44444ca9b25363031451b0d68c988) )
 3367      ROM_LOAD( "ed02", 0x60000, 0x10000, CRC(7ddc5651) SHA1(f5ec5245cf3d9d4d9c1df6a8128c24565e331317) )
 3368  
 3369      ROM_REGION( 512, "proms", 0 )
 3370      ROM_LOAD( "du-13.bin", 0x00000,  0x200,  CRC(bea1f87e) SHA1(f5215992e4b53c9cd4c7e0b20ff5cfdce3ab6d02) )    /* Priority (Not yet used) */
 3371  ROM_END
 3372  
 3373  ROM_START( srdarwin )
 3374      ROM_REGION( 0x28000, "maincpu", 0 )
 3375      ROM_LOAD( "dy01-e.b14", 0x20000, 0x08000, CRC(176e9299) SHA1(20cd44ab610e384ab4f0172054c9adc432b12e9c) )
 3376      ROM_CONTINUE(           0x08000, 0x08000 )
 3377      ROM_LOAD( "dy00.b16", 0x10000, 0x10000, CRC(2bf6b461) SHA1(435d922c7b9df7f2b2f774346caed81d330be8a0) )
 3378  
 3379      ROM_REGION( 2*0x10000, "audiocpu", 0 )    /* 64K for sound CPU + 64k for decrypted opcodes */
 3380      ROM_LOAD( "dy04.d7", 0x8000, 0x8000, CRC(2ae3591c) SHA1(f21b06d84e2c3d3895be0812024641fd006e45cf) )
 3381  
 3382      ROM_REGION( 0x1000, "mcu", 0 )    /* ID8751H MCU */
 3383      ROM_LOAD( "id8751h.mcu", 0x0000, 0x1000, NO_DUMP )
 3384  
 3385      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 3386      ROM_LOAD( "dy05.b6", 0x00000, 0x4000, CRC(8780e8a3) SHA1(03ea91fdc5aba8e139201604fb3bf9b69f71f056) )
 3387  
 3388      ROM_REGION( 0x30000, "gfx2", 0 )    /* sprites */
 3389      ROM_LOAD( "dy07.h16", 0x00000, 0x8000, CRC(97eaba60) SHA1(e3252b67bad7babcf4ece39f46ae4aeb950eb92b) )
 3390      ROM_LOAD( "dy06.h14", 0x08000, 0x8000, CRC(c279541b) SHA1(eb3737413499d07b6c2af99a95b27b2590e670c5) )
 3391      ROM_LOAD( "dy09.k13", 0x10000, 0x8000, CRC(d30d1745) SHA1(647b6121ab6fa812368da45e1295cc41f73be89d) )
 3392      ROM_LOAD( "dy08.k11", 0x18000, 0x8000, CRC(71d645fd) SHA1(a74a9b9697fc39b4e675e732a9d7d82976cc95dd) )
 3393      ROM_LOAD( "dy11.k16", 0x20000, 0x8000, CRC(fd9ccc5b) SHA1(b38c44c01acdc455d4192e4c8be1d68d9eb0c7b6) )
 3394      ROM_LOAD( "dy10.k14", 0x28000, 0x8000, CRC(88770ab8) SHA1(0a4a807a8d3b0653864bd984872d5567836f8cf8) )
 3395  
 3396      ROM_REGION( 0x40000, "gfx3", 0 )    /* tiles */
 3397      ROM_LOAD( "dy03.b4",  0x00000, 0x4000, CRC(44f2a4f9) SHA1(97368dd112451cd630f2fa5ba54679e84e7d4d97) )
 3398      ROM_CONTINUE(         0x10000, 0x4000 )
 3399      ROM_CONTINUE(         0x20000, 0x4000 )
 3400      ROM_CONTINUE(         0x30000, 0x4000 )
 3401      ROM_LOAD( "dy02.b5",  0x08000, 0x4000, CRC(522d9a9e) SHA1(248274ed6df604357cad386fcf0521b26810aa0e) )
 3402      ROM_CONTINUE(         0x18000, 0x4000 )
 3403      ROM_CONTINUE(         0x28000, 0x4000 )
 3404      ROM_CONTINUE(         0x38000, 0x4000 )
 3405  
 3406      ROM_REGION( 256, "proms", 0 )
 3407      ROM_LOAD( "dy12.f4",  0x00000,  0x100,  CRC(ebfaaed9) SHA1(5723dbfa3eb3fc4df8c8975b320a5c49848309d8) )    /* Priority (Not yet used) */
 3408  ROM_END
 3409  
 3410  ROM_START( srdarwinj )
 3411      ROM_REGION( 0x28000, "maincpu", 0 )
 3412      ROM_LOAD( "dy_01.rom", 0x20000, 0x08000, CRC(1eeee4ff) SHA1(89a70de8bd61c671582b11773ce69b2edcd9c2f8) )
 3413      ROM_CONTINUE(          0x08000, 0x08000 )
 3414      ROM_LOAD( "dy00.b16", 0x10000, 0x10000, CRC(2bf6b461) SHA1(435d922c7b9df7f2b2f774346caed81d330be8a0) )
 3415  
 3416      ROM_REGION( 2*0x10000, "audiocpu", 0 )    /* 64K for sound CPU + 64k for decrypted opcodes */
 3417      ROM_LOAD( "dy04.d7", 0x8000, 0x8000, CRC(2ae3591c) SHA1(f21b06d84e2c3d3895be0812024641fd006e45cf) )
 3418  
 3419      ROM_REGION( 0x1000, "mcu", 0 )    /* ID8751H MCU */
 3420      ROM_LOAD( "id8751h.mcu", 0x0000, 0x1000, NO_DUMP )
 3421  
 3422      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 3423      ROM_LOAD( "dy05.b6", 0x00000, 0x4000, CRC(8780e8a3) SHA1(03ea91fdc5aba8e139201604fb3bf9b69f71f056) )
 3424  
 3425      ROM_REGION( 0x30000, "gfx2", 0 )    /* sprites */
 3426      ROM_LOAD( "dy07.h16", 0x00000, 0x8000, CRC(97eaba60) SHA1(e3252b67bad7babcf4ece39f46ae4aeb950eb92b) )
 3427      ROM_LOAD( "dy06.h14", 0x08000, 0x8000, CRC(c279541b) SHA1(eb3737413499d07b6c2af99a95b27b2590e670c5) )
 3428      ROM_LOAD( "dy09.k13", 0x10000, 0x8000, CRC(d30d1745) SHA1(647b6121ab6fa812368da45e1295cc41f73be89d) )
 3429      ROM_LOAD( "dy08.k11", 0x18000, 0x8000, CRC(71d645fd) SHA1(a74a9b9697fc39b4e675e732a9d7d82976cc95dd) )
 3430      ROM_LOAD( "dy11.k16", 0x20000, 0x8000, CRC(fd9ccc5b) SHA1(b38c44c01acdc455d4192e4c8be1d68d9eb0c7b6) )
 3431      ROM_LOAD( "dy10.k14", 0x28000, 0x8000, CRC(88770ab8) SHA1(0a4a807a8d3b0653864bd984872d5567836f8cf8) )
 3432  
 3433      ROM_REGION( 0x40000, "gfx3", 0 )    /* tiles */
 3434      ROM_LOAD( "dy03.b4",  0x00000, 0x4000, CRC(44f2a4f9) SHA1(97368dd112451cd630f2fa5ba54679e84e7d4d97) )
 3435      ROM_CONTINUE(         0x10000, 0x4000 )
 3436      ROM_CONTINUE(         0x20000, 0x4000 )
 3437      ROM_CONTINUE(         0x30000, 0x4000 )
 3438      ROM_LOAD( "dy02.b5",  0x08000, 0x4000, CRC(522d9a9e) SHA1(248274ed6df604357cad386fcf0521b26810aa0e) )
 3439      ROM_CONTINUE(         0x18000, 0x4000 )
 3440      ROM_CONTINUE(         0x28000, 0x4000 )
 3441      ROM_CONTINUE(         0x38000, 0x4000 )
 3442  
 3443      ROM_REGION( 256, "proms", 0 )
 3444      ROM_LOAD( "dy12.f4",  0x00000,  0x100,  CRC(ebfaaed9) SHA1(5723dbfa3eb3fc4df8c8975b320a5c49848309d8) )    /* Priority (Not yet used) */
 3445  ROM_END
 3446  
 3447  ROM_START( cobracom )
 3448      ROM_REGION( 0x30000, "maincpu", 0 )
 3449      ROM_LOAD( "el11-5.bin",  0x08000, 0x08000, CRC(af0a8b05) SHA1(096e4e7f2785a20bfaec14277413ce4e20e90214) )
 3450      ROM_LOAD( "el12-4.bin",  0x10000, 0x10000, CRC(7a44ef38) SHA1(d7dc277dce08f9d073290e100be4a7ca2e2b82cb) )
 3451      ROM_LOAD( "el13.bin",    0x20000, 0x10000, CRC(04505acb) SHA1(2220efb277884588859375dab9960f04f07273a7) )
 3452  
 3453      ROM_REGION( 0x10000, "audiocpu", 0 )
 3454      ROM_LOAD( "el10-4.bin",  0x8000,  0x8000,  CRC(edfad118) SHA1(10de8805472346fead62460a3fdc09ae26a4e0d5) )
 3455  
 3456      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 3457      ROM_LOAD( "el14.bin",    0x00000, 0x08000, CRC(47246177) SHA1(51b025740dc03b04009ac97d8d110ab521894386) )
 3458  
 3459      ROM_REGION( 0x80000, "gfx2", 0 )    /* sprites */
 3460      ROM_LOAD( "el00-4.bin",  0x00000, 0x10000, CRC(122da2a8) SHA1(ce72f16abf7e5449c7d044d4b827e8735c3be0ff) )
 3461      ROM_LOAD( "el01-4.bin",  0x20000, 0x10000, CRC(27bf705b) SHA1(196c35aaf3816d3eef4c2af6d146a90a48365d33) )
 3462      ROM_LOAD( "el02-4.bin",  0x40000, 0x10000, CRC(c86fede6) SHA1(97584fa19591651fcfb39d1b2b6306165e93554c) )
 3463      ROM_LOAD( "el03-4.bin",  0x60000, 0x10000, CRC(1d8a855b) SHA1(429261c200dddc62a330be8aea150b2037133188) )
 3464  
 3465      ROM_REGION( 0x80000, "gfx3", 0 )    /* tiles 1 */
 3466      ROM_LOAD( "el05.bin",    0x00000, 0x10000, CRC(1c4f6033) SHA1(4a7dece911166d1ff5f41df6ec5140596206d8d4) )
 3467      ROM_LOAD( "el06.bin",    0x20000, 0x10000, CRC(d24ba794) SHA1(b34b7bbaab4ebdd81c87d363f087cc92e27e8d1c) )
 3468      ROM_LOAD( "el04.bin",    0x40000, 0x10000, CRC(d80a49ce) SHA1(1a92413b5ab53f80e44a954433e69ec5fe2c0aa6) )
 3469      ROM_LOAD( "el07.bin",    0x60000, 0x10000, CRC(6d771fc3) SHA1(f29979f3aa07bdb544fb0c1d773c5558b4533390) )
 3470  
 3471      ROM_REGION( 0x80000, "gfx4", 0 )    /* tiles 2 */
 3472      ROM_LOAD( "el08.bin",    0x00000, 0x08000, CRC(cb0dcf4c) SHA1(e14853f83ee9ba5cbf2eb1e085fee4e65af3cc25) )
 3473      ROM_CONTINUE(            0x40000, 0x08000 )
 3474      ROM_LOAD( "el09.bin",    0x20000, 0x08000, CRC(1fae5be7) SHA1(be6e090b0b82648b385d9b6d11775f3ff40f0af3) )
 3475      ROM_CONTINUE(            0x60000, 0x08000 )
 3476  ROM_END
 3477  
 3478  ROM_START( cobracomj )
 3479      ROM_REGION( 0x30000, "maincpu", 0 )
 3480      ROM_LOAD( "eh-11.rom",    0x08000, 0x08000, CRC(868637e1) SHA1(8b1e3e045e341bb94b1f6c7d89198b22e6c19de7) )
 3481      ROM_LOAD( "eh-12.rom",    0x10000, 0x10000, CRC(7c878a83) SHA1(9b2a3083c6dae69626fdab16d97517d30eaa1859) )
 3482      ROM_LOAD( "el13.bin",     0x20000, 0x10000, CRC(04505acb) SHA1(2220efb277884588859375dab9960f04f07273a7) )
 3483  
 3484      ROM_REGION( 0x10000, "audiocpu", 0 )
 3485      ROM_LOAD( "eh-10.rom",    0x8000,  0x8000,  CRC(62ca5e89) SHA1(b04acaccc58846e0d277868a873a440b7f8071b0) )
 3486  
 3487      ROM_REGION( 0x08000, "gfx1", 0 )    /* characters */
 3488      ROM_LOAD( "el14.bin",    0x00000, 0x08000, CRC(47246177) SHA1(51b025740dc03b04009ac97d8d110ab521894386) )
 3489  
 3490      ROM_REGION( 0x80000, "gfx2", 0 )    /* sprites */
 3491      ROM_LOAD( "eh-00.rom",    0x00000, 0x10000, CRC(d96b6797) SHA1(01c4a9f2bebb13cba14636690cd5356db73f045e) )
 3492      ROM_LOAD( "eh-01.rom",    0x20000, 0x10000, CRC(3fef9c02) SHA1(e4b731faf6a2f4e5fed8ba9bd07e0f203981ffec) )
 3493      ROM_LOAD( "eh-02.rom",    0x40000, 0x10000, CRC(bfae6c34) SHA1(9503a120e11e9466cd9a2931fd44a631d72ca5f0) )
 3494      ROM_LOAD( "eh-03.rom",    0x60000, 0x10000, CRC(d56790f8) SHA1(1cc7cb9f7102158de14a737e9317a54f01790ba8) )
 3495  
 3496      ROM_REGION( 0x80000, "gfx3", 0 )    /* tiles 1 */
 3497      ROM_LOAD( "el05.bin",    0x00000, 0x10000, CRC(1c4f6033) SHA1(4a7dece911166d1ff5f41df6ec5140596206d8d4) )
 3498      ROM_LOAD( "el06.bin",    0x20000, 0x10000, CRC(d24ba794) SHA1(b34b7bbaab4ebdd81c87d363f087cc92e27e8d1c) )
 3499      ROM_LOAD( "el04.bin",    0x40000, 0x10000, CRC(d80a49ce) SHA1(1a92413b5ab53f80e44a954433e69ec5fe2c0aa6) )
 3500      ROM_LOAD( "el07.bin",    0x60000, 0x10000, CRC(6d771fc3) SHA1(f29979f3aa07bdb544fb0c1d773c5558b4533390) )
 3501  
 3502      ROM_REGION( 0x80000, "gfx4", 0 )    /* tiles 2 */
 3503      ROM_LOAD( "el08.bin",    0x00000, 0x08000, CRC(cb0dcf4c) SHA1(e14853f83ee9ba5cbf2eb1e085fee4e65af3cc25) )
 3504      ROM_CONTINUE(            0x40000, 0x08000 )
 3505      ROM_LOAD( "el09.bin",    0x20000, 0x08000, CRC(1fae5be7) SHA1(be6e090b0b82648b385d9b6d11775f3ff40f0af3) )
 3506      ROM_CONTINUE(            0x60000, 0x08000 )
 3507  ROM_END
 3508  
 3509  /******************************************************************************/
 3510  
 3511  DRIVER_INIT_MEMBER(dec8_state,dec8)
 3512  {
 3513      m_latch = 0;
 3514  }
 3515  
 3516  /* Below, I set up the correct number of banks depending on the "maincpu" region size */
 3517  DRIVER_INIT_MEMBER(dec8_state,lastmisn)
 3518  {
 3519      UINT8 *ROM = machine().root_device().memregion("maincpu")->base();
 3520      machine().root_device().membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x4000);
 3521      DRIVER_INIT_CALL(dec8);
 3522  }
 3523  
 3524  DRIVER_INIT_MEMBER(dec8_state,shackled)
 3525  {
 3526      UINT8 *ROM = machine().root_device().memregion("maincpu")->base();
 3527      machine().root_device().membank("bank1")->configure_entries(0, 14, &ROM[0x10000], 0x4000);
 3528      DRIVER_INIT_CALL(dec8);
 3529  }
 3530  
 3531  DRIVER_INIT_MEMBER(dec8_state,gondo)
 3532  {
 3533      UINT8 *ROM = machine().root_device().memregion("maincpu")->base();
 3534      machine().root_device().membank("bank1")->configure_entries(0, 12, &ROM[0x10000], 0x4000);
 3535      DRIVER_INIT_CALL(dec8);
 3536  }
 3537  
 3538  DRIVER_INIT_MEMBER(dec8_state,garyoret)
 3539  {
 3540      UINT8 *ROM = machine().root_device().memregion("maincpu")->base();
 3541      machine().root_device().membank("bank1")->configure_entries(0, 16, &ROM[0x10000], 0x4000);
 3542      DRIVER_INIT_CALL(dec8);
 3543  }
 3544  
 3545  DRIVER_INIT_MEMBER(dec8_state,ghostb)
 3546  {
 3547      UINT8 *ROM = machine().root_device().memregion("maincpu")->base();
 3548      UINT8 *RAM = machine().root_device().memregion("proms")->base();
 3549  
 3550      /* Blank out unused garbage in colour prom to avoid colour overflow */
 3551      memset(RAM + 0x20, 0, 0xe0);
 3552  
 3553      machine().root_device().membank("bank1")->configure_entries(0, 16, &ROM[0x10000], 0x4000);
 3554      DRIVER_INIT_CALL(dec8);
 3555  }
 3556  
 3557  DRIVER_INIT_MEMBER(dec8_state,meikyuh)
 3558  {
 3559      UINT8 *ROM = machine().root_device().memregion("maincpu")->base();
 3560      UINT8 *RAM = machine().root_device().memregion("proms")->base();
 3561  
 3562      /* Blank out unused garbage in colour prom to avoid colour overflow */
 3563      memset(RAM + 0x20, 0, 0xe0);
 3564  
 3565      machine().root_device().membank("bank1")->configure_entries(0, 12, &ROM[0x10000], 0x4000);
 3566      DRIVER_INIT_CALL(dec8);
 3567  }
 3568  
 3569  DRIVER_INIT_MEMBER(dec8_state,csilver)
 3570  {
 3571      UINT8 *ROM = machine().root_device().memregion("maincpu")->base();
 3572      UINT8 *RAM = machine().root_device().memregion("audiocpu")->base();
 3573  
 3574      machine().root_device().membank("bank1")->configure_entries(0, 14, &ROM[0x10000], 0x4000);
 3575      machine().root_device().membank("bank3")->configure_entries(0, 2, &RAM[0x10000], 0x4000);
 3576      DRIVER_INIT_CALL(dec8);
 3577  }
 3578  
 3579  DRIVER_INIT_MEMBER(dec8_state,oscar)
 3580  {
 3581      UINT8 *ROM = machine().root_device().memregion("maincpu")->base();
 3582      machine().root_device().membank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x4000);
 3583      DRIVER_INIT_CALL(dec8);
 3584  }
 3585  
 3586  DRIVER_INIT_MEMBER(dec8_state,srdarwin)
 3587  {
 3588      UINT8 *ROM = machine().root_device().memregion("maincpu")->base();
 3589      machine().root_device().membank("bank1")->configure_entries(0, 6, &ROM[0x10000], 0x4000);
 3590      DRIVER_INIT_CALL(dec8);
 3591  }
 3592  
 3593  DRIVER_INIT_MEMBER(dec8_state,cobracom)
 3594  {
 3595      UINT8 *ROM = machine().root_device().memregion("maincpu")->base();
 3596      machine().root_device().membank("bank1")->configure_entries(0, 8, &ROM[0x10000], 0x4000);
 3597      DRIVER_INIT_CALL(dec8);
 3598  }
 3599  
 3600  
 3601  /******************************************************************************/
 3602  
 3603  GAME( 1986, lastmisn, 0,        lastmisn, lastmisn, dec8_state,  lastmisn,    ROT270, "Data East USA", "Last Mission (US revision 6)", GAME_SUPPORTS_SAVE )
 3604  GAME( 1986, lastmisno,lastmisn, lastmisn, lastmisn, dec8_state,  lastmisn,    ROT270, "Data East USA", "Last Mission (US revision 5)", GAME_SUPPORTS_SAVE )
 3605  GAME( 1986, lastmisnj,lastmisn, lastmisn, lastmisnj, dec8_state, lastmisn,    ROT270, "Data East Corporation", "Last Mission (Japan)", GAME_SUPPORTS_SAVE )
 3606  GAME( 1986, shackled, 0,        shackled, shackled, dec8_state,  shackled,    ROT0,   "Data East USA", "Shackled (US)", GAME_SUPPORTS_SAVE )
 3607  GAME( 1986, breywood, shackled, shackled, breywood, dec8_state,  shackled,    ROT0,   "Data East Corporation", "Breywood (Japan revision 2)", GAME_SUPPORTS_SAVE )
 3608  GAME( 1987, gondo,    0,        gondo,    gondo, dec8_state,     gondo,       ROT270, "Data East USA", "Gondomania (US)", GAME_SUPPORTS_SAVE )
 3609  GAME( 1987, makyosen, gondo,    gondo,    gondo, dec8_state,     gondo,       ROT270, "Data East Corporation", "Makyou Senshi (Japan)", GAME_SUPPORTS_SAVE )
 3610  GAME( 1987, garyoret, 0,        garyoret, garyoret, dec8_state,  garyoret,    ROT0,   "Data East Corporation", "Garyo Retsuden (Japan)", GAME_SUPPORTS_SAVE )
 3611  GAME( 1987, ghostb,   0,        ghostb,   ghostb, dec8_state,    ghostb,      ROT0,   "Data East USA", "The Real Ghostbusters (US 2 Players, revision 2)", GAME_SUPPORTS_SAVE )
 3612  GAME( 1987, ghostb2a, ghostb,   ghostb,   ghostb2a, dec8_state,  ghostb,      ROT0,   "Data East USA", "The Real Ghostbusters (US 2 Players)", GAME_SUPPORTS_SAVE )
 3613  GAME( 1987, ghostb3,  ghostb,   ghostb,   ghostb3, dec8_state,   ghostb,      ROT0,   "Data East USA", "The Real Ghostbusters (US 3 Players)", GAME_SUPPORTS_SAVE )
 3614  GAME( 1987, meikyuh,  ghostb,   ghostb,   meikyuh, dec8_state,   meikyuh,     ROT0,   "Data East Corporation", "Meikyuu Hunter G (Japan, set 1)", GAME_SUPPORTS_SAVE )
 3615  GAME( 1987, meikyuha, ghostb,   ghostb,   meikyuh, dec8_state,   meikyuh,     ROT0,   "Data East Corporation", "Meikyuu Hunter G (Japan, set 2)", GAME_SUPPORTS_SAVE )
 3616  GAME( 1987, csilver,  0,        csilver,  csilver, dec8_state,   csilver,     ROT0,   "Data East Corporation", "Captain Silver (World)", GAME_SUPPORTS_SAVE )
 3617  GAME( 1987, csilverj, csilver,  csilver,  csilverj, dec8_state,  csilver,     ROT0,   "Data East Corporation", "Captain Silver (Japan)", GAME_SUPPORTS_SAVE )
 3618  GAME( 1987, oscar,    0,        oscar,    oscar, dec8_state,     oscar,       ROT0,   "Data East Corporation", "Psycho-Nics Oscar (World revision 0)", GAME_SUPPORTS_SAVE )
 3619  GAME( 1988, oscaru,   oscar,    oscar,    oscarj, dec8_state,    oscar,       ROT0,   "Data East USA", "Psycho-Nics Oscar (US)", GAME_SUPPORTS_SAVE )
 3620  GAME( 1987, oscarj1,  oscar,    oscar,    oscarj, dec8_state,    oscar,       ROT0,   "Data East Corporation", "Psycho-Nics Oscar (Japan revision 1)", GAME_SUPPORTS_SAVE )
 3621  GAME( 1987, oscarj2,  oscar,    oscar,    oscarj, dec8_state,    oscar,       ROT0,   "Data East Corporation", "Psycho-Nics Oscar (Japan revision 2)", GAME_SUPPORTS_SAVE )
 3622  GAME( 1987, srdarwin, 0,        srdarwin, srdarwin, dec8_state,  srdarwin,    ROT270, "Data East Corporation", "Super Real Darwin (World)", GAME_SUPPORTS_SAVE )
 3623  GAME( 1987, srdarwinj,srdarwin, srdarwin, srdarwinj, dec8_state, srdarwin,    ROT270, "Data East Corporation", "Super Real Darwin (Japan)", GAME_SUPPORTS_SAVE )
 3624  GAME( 1988, cobracom, 0,        cobracom, cobracom, dec8_state,  cobracom,    ROT0,   "Data East Corporation", "Cobra-Command (World revision 5)", GAME_SUPPORTS_SAVE )
 3625  GAME( 1988, cobracomj,cobracom, cobracom, cobracom, dec8_state,  cobracom,    ROT0,   "Data East Corporation", "Cobra-Command (Japan)", GAME_SUPPORTS_SAVE )