Previous 199869 Revisions Next

r18314 Saturday 6th October, 2012 at 18:15:58 UTC by Wilbert Pol
6532riot.c: Made reg_r method debugger friendly. (nw)
[src/emu/machine]6532riot.c 6532riot.h

trunk/src/emu/machine/6532riot.c
r18313r18314
255255
256256READ8_MEMBER( riot6532_device::read )
257257{
258   return reg_r(offset);
258   return reg_r(offset, space.debugger_access());
259259}
260260
261UINT8 riot6532_device::reg_r(UINT8 offset)
261UINT8 riot6532_device::reg_r(UINT8 offset, bool debugger_access)
262262{
263263   UINT8 val = 0;
264264
r18313r18314
267267   {
268268      val = m_irqstate;
269269
270      /* implicitly clears the PA7 flag */
271      m_irqstate &= ~PA7_FLAG;
272      update_irqstate();
270      if ( ! debugger_access )
271      {
272         /* implicitly clears the PA7 flag */
273         m_irqstate &= ~PA7_FLAG;
274         update_irqstate();
275      }
273276   }
274277
275278   /* if A2 == 1 and A0 == 0, we are reading the timer */
r18313r18314
277280   {
278281      val = get_timer();
279282
280      /* A3 contains the timer IRQ enable */
281      if (offset & 8)
283      if ( ! debugger_access )
282284      {
283         m_irqenable |= TIMER_FLAG;
284      }
285      else
286      {
287         m_irqenable &= ~TIMER_FLAG;
288      }
285         /* A3 contains the timer IRQ enable */
286         if (offset & 8)
287         {
288            m_irqenable |= TIMER_FLAG;
289         }
290         else
291         {
292            m_irqenable &= ~TIMER_FLAG;
293         }
289294
290      /* implicitly clears the timer flag */
291      if (m_timerstate != TIMER_FINISHING || val != 0xff)
292      {
293         m_irqstate &= ~TIMER_FLAG;
295         /* implicitly clears the timer flag */
296         if (m_timerstate != TIMER_FINISHING || val != 0xff)
297         {
298            m_irqstate &= ~TIMER_FLAG;
299         }
300         update_irqstate();
294301      }
295      update_irqstate();
296302   }
297303
298304   /* if A2 == 0 and A0 == anything, we are reading from ports */
r18313r18314
318324            /* changes to port A need to update the PA7 state */
319325            if (port == &m_port[0])
320326            {
321               update_pa7_state();
327               if ( ! debugger_access )
328               {
329                  update_pa7_state();
330               }
322331            }
323332         }
324333
trunk/src/emu/machine/6532riot.h
r18313r18314
5353   DECLARE_READ8_MEMBER( read );
5454   DECLARE_WRITE8_MEMBER( write );
5555
56    UINT8 reg_r(UINT8 offset);
56    UINT8 reg_r(UINT8 offset, bool debugger_access = false);
5757    void reg_w(UINT8 offset, UINT8 data);
5858
5959    void porta_in_set(UINT8 data, UINT8 mask);

Previous 199869 Revisions Next


© 1997-2024 The MAME Team