Previous 199869 Revisions Next

r34213 Tuesday 6th January, 2015 at 07:13:39 UTC by Osso
Greatly reduced tagmap lookups in namcos2 and namcos21 (nw)
[src/mame/includes]namcos2.h
[src/mame/machine]namcos2.c

trunk/src/mame/includes/namcos2.h
r242724r242725
9999         m_dspmaster(*this, "dspmaster"),
100100         m_dspslave(*this, "dspslave"),
101101         m_c68(*this, "c68"),
102         m_gpu(*this, "gpu"),
102103         m_gametype(0),
103104         m_c169_roz_videoram(*this, "rozvideoram", 0),
104105         m_c169_roz_gfxbank(0),
r242724r242725
116117   optional_device<cpu_device> m_dspmaster;
117118   optional_device<cpu_device> m_dspslave;
118119   optional_device<m37450_device> m_c68;
120   optional_device<cpu_device> m_gpu; //to be moved to namco21_state after disentangling
119121
120122   // game type helpers
121123   bool is_system21();
trunk/src/mame/machine/namcos2.c
r242724r242725
451451   UINT16 *pC148RegAlt = NULL;
452452   UINT16 result = 0;
453453
454   if (&space.device() == space.machine().device("maincpu"))
454   if (&space.device() == m_maincpu)
455455   {
456456      pC148Reg = m_68k_master_C148;
457      altcpu = space.machine().device("slave");
457      altcpu = m_slave;
458458      pC148RegAlt = m_68k_slave_C148;
459459   }
460   else if (&space.device() == space.machine().device("slave"))
460   else if (&space.device() == m_slave)
461461   {
462462      pC148Reg = m_68k_slave_C148;
463      altcpu = space.machine().device("maincpu");
463      altcpu = m_maincpu;
464464      pC148RegAlt = m_68k_master_C148;
465465   }
466   else if (&space.device() == space.machine().device("gpu"))
466   else if (&space.device() == m_gpu)
467467   {
468468      pC148Reg = m_68k_gpu_C148;
469      altcpu = space.machine().device("maincpu");
469      altcpu = m_maincpu;
470470      pC148RegAlt = m_68k_master_C148;
471471   }
472472
r242724r242725
548548      break;
549549
550550   case 0x1e2000: /* Sound CPU Reset control */
551      if (&space.device() == space.machine().device("maincpu")) /* ? */
551      if (&space.device() == m_maincpu) /* ? */
552552      {
553553         if (data & 0x01)
554554         {
555555            /* Resume execution */
556            space.machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
556            m_audiocpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
557557            space.device().execute().yield();
558558         }
559559         else
560560         {
561561            /* Suspend execution */
562            space.machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
562            m_audiocpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
563563         }
564564         if (namcos2_kickstart != NULL)
565565         {
r242724r242725
573573      break;
574574
575575   case 0x1e4000: /* Alt 68000 & IO CPU Reset */
576      if (&space.device() == space.machine().device("maincpu")) /* ? */
576      if (&space.device() == m_maincpu) /* ? */
577577      {
578578         if (data & 0x01)
579579         { /* Resume execution */
r242724r242725
640640   if (is_system21()) {
641641      if (m_68k_gpu_C148[NAMCOS2_C148_POSIRQ]) {
642642         m_screen->update_partial(param);
643         machine().device("gpu")->execute().set_input_line(m_68k_gpu_C148[NAMCOS2_C148_POSIRQ] , ASSERT_LINE);
643         m_gpu->set_input_line(m_68k_gpu_C148[NAMCOS2_C148_POSIRQ] , ASSERT_LINE);
644644      }
645645      return;
646646   }


Previous 199869 Revisions Next


© 1997-2024 The MAME Team