Previous 199869 Revisions Next

r41853 Tuesday 24th November, 2015 at 22:39:51 UTC by Angelo Salese
Implemented sound hand-shake flag for Hot Chase, and removed irq hack. Fixes for good gameplay speed in it. [Angelo Salese]
Added SOUND-ON and SOUND-RST preliminary mechanisms for WEC Le Mans 24/Hot Chase HW, fixes hanging sound if entering into service mode for both. [Angelo Salese]
[src/mame/drivers]wecleman.cpp
[src/mame/includes]wecleman.h

trunk/src/mame/drivers/wecleman.cpp
r250364r250365
336336         m_subcpu->set_input_line(4, HOLD_LINE);
337337
338338      // Bit 1 : NSUBRST
339      if (data & 2)
340         m_subcpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
341      else
342         m_subcpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
343
344      // Bit 2 : SOUND-ON
345      // Bit 3 : SOUNDRST
339      m_subcpu->set_input_line(INPUT_LINE_RESET,  (data & 2) ? CLEAR_LINE : ASSERT_LINE);
340     
341      // Bit 2 : SOUND-ON: send a interrupt to sound CPU, 0 -> 1 transition
342      if ( (m_irqctrl & 4) && (!(data & 4)) )
343      {
344         if(m_sound_hw_type == 0) // wec le mans
345            m_audiocpu->set_input_line(0, HOLD_LINE);
346         else // hot chase
347         {
348            m_hotchase_sound_hs = false;
349            // TODO: ASSERT_LINE here?
350            m_audiocpu->set_input_line(M6809_IRQ_LINE, HOLD_LINE);
351         }
352      }
353      // Bit 3 : SOUNDRST, pc=0x18ea in Hot Chase POST, 1 -> 0 -> 1
354      m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 8) ? CLEAR_LINE : ASSERT_LINE);
346355      // Bit 4 : SCR-HCNT
347      // Bit 5 : SCR-VCNT
348      // Bit 6 : TV-KILL
356      // Bit 5 : SCR-VCNT: active in WEC Le Mans, disabled in Hot Chase (where's the latch anyway?)
357      // Bit 6 : TV-KILL: active low, disables screen.
349358      m_irqctrl = data;   // latch the value
350359   }
351360}
r250364r250365
545554   AM_RANGE(0x140014, 0x140015) AM_READ_PORT("DSW2")   // DSW 2
546555   AM_RANGE(0x140016, 0x140017) AM_READ_PORT("DSW1")   // DSW 1
547556   AM_RANGE(0x140020, 0x140021) AM_READ(selected_ip_r) AM_WRITENOP // Paired with writes to $140003
548   AM_RANGE(0x140022, 0x140023) AM_READNOP // ??
557   AM_RANGE(0x140022, 0x140023) AM_READNOP // read and written at $601c0, unknown purpose
549558   AM_RANGE(0x140030, 0x140031) AM_WRITENOP    // signal to cabinet vibration motors?
550559ADDRESS_MAP_END
551560
r250364r250365
584593   if (ACCESSING_BITS_0_7)
585594   {
586595      soundlatch_byte_w(space, 0, data & 0xFF);
587      m_audiocpu->set_input_line(0, HOLD_LINE);
588596   }
589597}
590598
r250364r250365
650658   if (ACCESSING_BITS_0_7)
651659   {
652660      soundlatch_byte_w(space, 0, data & 0xFF);
653      m_audiocpu->set_input_line(M6809_IRQ_LINE, HOLD_LINE);
654661   }
655662}
656663
r250364r250365
704711   }
705712}
706713
714WRITE8_MEMBER(wecleman_state::hotchase_sound_hs_w)
715{
716   m_hotchase_sound_hs = true;
717}
718
707719/* Read and write handlers for one K007232 chip:
708720   even and odd register are mapped swapped */
709721READ8_MEMBER(wecleman_state::hotchase_1_k007232_r)
r250364r250365
742754   AM_RANGE(0x2000, 0x200d) AM_READWRITE(hotchase_2_k007232_r, hotchase_2_k007232_w)
743755   AM_RANGE(0x3000, 0x300d) AM_READWRITE(hotchase_3_k007232_r, hotchase_3_k007232_w)
744756   AM_RANGE(0x4000, 0x4007) AM_WRITE(hotchase_sound_control_w) // Sound volume, banking, etc.
745   AM_RANGE(0x5000, 0x5000) AM_WRITENOP    // ? (written with 0 on IRQ, 1 on FIRQ)
757   AM_RANGE(0x5000, 0x5000) AM_WRITENOP   // 0 at start of IRQ service, 1 at end (irq mask?)
746758   AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) // From main CPU (Read on IRQ)
747   AM_RANGE(0x7000, 0x7000) AM_WRITENOP    // Command acknowledge ?
759   AM_RANGE(0x7000, 0x7000) AM_WRITE(hotchase_sound_hs_w)    // Command acknowledge ?
748760   AM_RANGE(0x8000, 0xffff) AM_ROM
749761ADDRESS_MAP_END
750762
r250364r250365
765777   PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
766778
767779   PORT_START("IN1")   /* Motor? - $140013.b */
768   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE2 )   // right sw
769   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE3 )   // left sw
770   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE4 )   // thermo
780   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Right SW")  // right sw
781   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Left SW")  // left sw
782   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE4 ) PORT_NAME("Thermo SW")  // thermo
771783   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL )   // from sound cpu ?
772784   PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN )
773785
r250364r250365
845857                            Hot Chase Input Ports
846858***************************************************************************/
847859
860CUSTOM_INPUT_MEMBER(wecleman_state::hotchase_sound_status_r)
861{
862   return m_hotchase_sound_hs;
863}
864
848865static INPUT_PORTS_START( hotchase )
849866   PORT_START("IN0")   /* $140011.b */
850867   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
r250364r250365
857874   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
858875
859876   PORT_START("IN1")   /* Motor? - $140013.b */
860   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE2 )   // right sw
861   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE3 )   // left sw
862   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE4 )   // thermo
863   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL )   // from sound cpu ?
864   PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN )
877   PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Right SW")   // right sw
878   PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Left SW")  // left sw
879   PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE4 ) PORT_NAME("Thermo SW")  // thermo
880   PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) // from sound cpu
881   PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wecleman_state,hotchase_sound_status_r, NULL)
882   PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN )
865883
866884   PORT_START("DSW2")  /* $140015.b */
867885   PORT_DIPNAME( 0x01, 0x01, "Speed Unit" )
r250364r250365
10261044
10271045   if(scanline == 232) // vblank irq
10281046      m_maincpu->set_input_line(4, HOLD_LINE);
1029   else if(((scanline % 64) == 0)) // timer irq TODO: timings
1047   else if(((scanline % 64) == 0)) // timer irq TODO: timings (and actually I believe it's from the blitter device)
10301048      m_maincpu->set_input_line(5, HOLD_LINE);
10311049}
10321050
r250364r250365
10361054
10371055   if(scanline == 224) // vblank irq
10381056      m_maincpu->set_input_line(4, HOLD_LINE);
1039   else if(((scanline % 64) == 0)) // timer irq TODO: timings
1040      m_maincpu->set_input_line(5, HOLD_LINE);
10411057}
10421058
10431059
r250364r250365
14031419         20,19,18,17,16,15,14,7,12,4,2,5,6,13,8,9,11,3,10,1,0);
14041420
14051421   m_spr_color_offs = 0x40;
1422   m_sound_hw_type = 0;
14061423}
14071424
14081425
r250364r250365
16801697   hotchase_sprite_decode(3,0x80000*2);  // num banks, bank len
16811698
16821699   m_spr_color_offs = 0;
1700   m_sound_hw_type = 1;
16831701}
16841702
16851703
trunk/src/mame/includes/wecleman.h
r250364r250365
5959   int m_cloud_blend;
6060   int m_cloud_ds;
6161   int m_cloud_visible;
62   int m_sound_hw_type;
63   bool m_hotchase_sound_hs;
6264   pen_t m_black_pen;
6365   struct sprite *m_sprite_list;
6466   struct sprite **m_spr_ptr_list;
r250364r250365
112114   void hotchase_draw_road(bitmap_ind16 &bitmap, const rectangle &cliprect);
113115   K051316_CB_MEMBER(hotchase_zoom_callback_1);
114116   K051316_CB_MEMBER(hotchase_zoom_callback_2);
117   DECLARE_CUSTOM_INPUT_MEMBER(hotchase_sound_status_r);
118   DECLARE_WRITE8_MEMBER(hotchase_sound_hs_w);
115119
116120   required_device<cpu_device> m_maincpu;
117121   required_device<cpu_device> m_audiocpu;


Previous 199869 Revisions Next


© 1997-2024 The MAME Team