Inserted checks to prevent debugger access. (nw)

This commit is contained in:
Michael Zapf 2013-06-09 13:20:44 +00:00
parent e9b9169c36
commit 220da4e3d7
2 changed files with 28 additions and 10 deletions

View File

@ -1673,6 +1673,9 @@ WRITE_LINE_MEMBER( tms5220_device::wsq_w )
WRITE8_MEMBER( tms5220_device::data_w )
{
// prevent debugger from changing the internal state
if (space.debugger_access()) return;
#ifdef DEBUG_RS_WS
logerror("tms5220_data_w: data %02x\n", data);
#endif
@ -1703,6 +1706,9 @@ WRITE8_MEMBER( tms5220_device::data_w )
READ8_MEMBER( tms5220_device::status_r )
{
// prevent debugger from changing the internal state
if (space.debugger_access()) return 0;
if (!m_true_timing)
{
/* bring up to date first */

View File

@ -116,6 +116,9 @@ tms9928a_device::tms9928a_device( const machine_config &mconfig, const char *tag
READ8_MEMBER( tms9928a_device::vram_read )
{
// prevent debugger from changing the address base
if (space.debugger_access()) return 0;
UINT8 data = m_ReadAhead;
m_ReadAhead = m_vram_space->read_byte(m_Addr);
@ -128,6 +131,9 @@ READ8_MEMBER( tms9928a_device::vram_read )
WRITE8_MEMBER( tms9928a_device::vram_write )
{
// prevent debugger from changing the address base
if (space.debugger_access()) return;
m_vram_space->write_byte(m_Addr, data);
m_Addr = (m_Addr + 1) & (m_vram_size - 1);
m_ReadAhead = data;
@ -137,6 +143,9 @@ WRITE8_MEMBER( tms9928a_device::vram_write )
READ8_MEMBER( tms9928a_device::register_read )
{
// prevent debugger from changing the internal state
if (space.debugger_access()) return 0;
UINT8 data = m_StatusReg;
m_StatusReg = m_FifthSprite;
@ -262,6 +271,9 @@ void tms9928a_device::change_register(UINT8 reg, UINT8 val)
WRITE8_MEMBER( tms9928a_device::register_write )
{
// prevent debugger from changing the internal state
if (space.debugger_access()) return;
if (m_latch)
{
/* set high part of read/write address */