mirror of
https://github.com/holub/mame
synced 2025-07-05 09:57:47 +03:00
6532riot.c: Made reg_r method debugger friendly. (nw)
This commit is contained in:
parent
dd3e7829b7
commit
0f67ea3758
@ -255,10 +255,10 @@ READ8_DEVICE_HANDLER( riot6532_r )
|
||||
|
||||
READ8_MEMBER( riot6532_device::read )
|
||||
{
|
||||
return reg_r(offset);
|
||||
return reg_r(offset, space.debugger_access());
|
||||
}
|
||||
|
||||
UINT8 riot6532_device::reg_r(UINT8 offset)
|
||||
UINT8 riot6532_device::reg_r(UINT8 offset, bool debugger_access)
|
||||
{
|
||||
UINT8 val = 0;
|
||||
|
||||
@ -267,9 +267,12 @@ UINT8 riot6532_device::reg_r(UINT8 offset)
|
||||
{
|
||||
val = m_irqstate;
|
||||
|
||||
/* implicitly clears the PA7 flag */
|
||||
m_irqstate &= ~PA7_FLAG;
|
||||
update_irqstate();
|
||||
if ( ! debugger_access )
|
||||
{
|
||||
/* implicitly clears the PA7 flag */
|
||||
m_irqstate &= ~PA7_FLAG;
|
||||
update_irqstate();
|
||||
}
|
||||
}
|
||||
|
||||
/* if A2 == 1 and A0 == 0, we are reading the timer */
|
||||
@ -277,22 +280,25 @@ UINT8 riot6532_device::reg_r(UINT8 offset)
|
||||
{
|
||||
val = get_timer();
|
||||
|
||||
/* A3 contains the timer IRQ enable */
|
||||
if (offset & 8)
|
||||
if ( ! debugger_access )
|
||||
{
|
||||
m_irqenable |= TIMER_FLAG;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_irqenable &= ~TIMER_FLAG;
|
||||
}
|
||||
/* A3 contains the timer IRQ enable */
|
||||
if (offset & 8)
|
||||
{
|
||||
m_irqenable |= TIMER_FLAG;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_irqenable &= ~TIMER_FLAG;
|
||||
}
|
||||
|
||||
/* implicitly clears the timer flag */
|
||||
if (m_timerstate != TIMER_FINISHING || val != 0xff)
|
||||
{
|
||||
m_irqstate &= ~TIMER_FLAG;
|
||||
/* implicitly clears the timer flag */
|
||||
if (m_timerstate != TIMER_FINISHING || val != 0xff)
|
||||
{
|
||||
m_irqstate &= ~TIMER_FLAG;
|
||||
}
|
||||
update_irqstate();
|
||||
}
|
||||
update_irqstate();
|
||||
}
|
||||
|
||||
/* if A2 == 0 and A0 == anything, we are reading from ports */
|
||||
@ -318,7 +324,10 @@ UINT8 riot6532_device::reg_r(UINT8 offset)
|
||||
/* changes to port A need to update the PA7 state */
|
||||
if (port == &m_port[0])
|
||||
{
|
||||
update_pa7_state();
|
||||
if ( ! debugger_access )
|
||||
{
|
||||
update_pa7_state();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
|
||||
UINT8 reg_r(UINT8 offset);
|
||||
UINT8 reg_r(UINT8 offset, bool debugger_access = false);
|
||||
void reg_w(UINT8 offset, UINT8 data);
|
||||
|
||||
void porta_in_set(UINT8 data, UINT8 mask);
|
||||
|
Loading…
Reference in New Issue
Block a user