trunk/src/emu/machine/6532riot.c
r18313 | r18314 | |
255 | 255 | |
256 | 256 | READ8_MEMBER( riot6532_device::read ) |
257 | 257 | { |
258 | | return reg_r(offset); |
| 258 | return reg_r(offset, space.debugger_access()); |
259 | 259 | } |
260 | 260 | |
261 | | UINT8 riot6532_device::reg_r(UINT8 offset) |
| 261 | UINT8 riot6532_device::reg_r(UINT8 offset, bool debugger_access) |
262 | 262 | { |
263 | 263 | UINT8 val = 0; |
264 | 264 | |
r18313 | r18314 | |
267 | 267 | { |
268 | 268 | val = m_irqstate; |
269 | 269 | |
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 | } |
273 | 276 | } |
274 | 277 | |
275 | 278 | /* if A2 == 1 and A0 == 0, we are reading the timer */ |
r18313 | r18314 | |
277 | 280 | { |
278 | 281 | val = get_timer(); |
279 | 282 | |
280 | | /* A3 contains the timer IRQ enable */ |
281 | | if (offset & 8) |
| 283 | if ( ! debugger_access ) |
282 | 284 | { |
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 | } |
289 | 294 | |
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(); |
294 | 301 | } |
295 | | update_irqstate(); |
296 | 302 | } |
297 | 303 | |
298 | 304 | /* if A2 == 0 and A0 == anything, we are reading from ports */ |
r18313 | r18314 | |
318 | 324 | /* changes to port A need to update the PA7 state */ |
319 | 325 | if (port == &m_port[0]) |
320 | 326 | { |
321 | | update_pa7_state(); |
| 327 | if ( ! debugger_access ) |
| 328 | { |
| 329 | update_pa7_state(); |
| 330 | } |
322 | 331 | } |
323 | 332 | } |
324 | 333 | |