summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author smf- <smf-@users.noreply.github.com>2016-11-19 22:14:09 +0000
committer smf- <smf-@users.noreply.github.com>2016-11-19 22:18:58 +0000
commit5f05fbf61348c65204fde1e2aeed72de4cb56593 (patch)
treee98dcf5c22a2f62424673d90fd9cee2ecfc6ec0d
parent53df201f3241d619ed62ff6fdb88a8939fb2be85 (diff)
moved debugger_access() from address space to machine & removed the anti-patterns that updated cascading address spaces. [smf]
-rw-r--r--src/devices/bus/a2bus/a2bus.cpp4
-rw-r--r--src/devices/bus/a2bus/pc_xporter.cpp2
-rw-r--r--src/devices/bus/c64/currah_speech.cpp2
-rw-r--r--src/devices/bus/isa/ega.cpp2
-rw-r--r--src/devices/bus/isa/sb16.cpp2
-rw-r--r--src/devices/bus/msx_cart/holy_quran.cpp2
-rw-r--r--src/devices/bus/ti99_peb/bwg.cpp6
-rw-r--r--src/devices/bus/ti99_peb/evpc.cpp2
-rw-r--r--src/devices/bus/ti99_peb/hfdc.cpp6
-rw-r--r--src/devices/bus/ti99_peb/hsgpl.cpp4
-rw-r--r--src/devices/bus/ti99_peb/pcode.cpp4
-rw-r--r--src/devices/bus/ti99_peb/spchsyn.cpp4
-rw-r--r--src/devices/bus/ti99_peb/ti_fdc.cpp8
-rw-r--r--src/devices/bus/ti99_peb/tn_ide.cpp4
-rw-r--r--src/devices/bus/ti99_peb/tn_usbsm.cpp4
-rw-r--r--src/devices/bus/ti99x/datamux.cpp4
-rw-r--r--src/devices/bus/ti99x/genboard.cpp18
-rw-r--r--src/devices/bus/vcs/dpc.cpp2
-rwxr-xr-xsrc/devices/bus/vcs/rom.cpp28
-rw-r--r--src/devices/bus/vcs/scharger.cpp2
-rw-r--r--src/devices/cpu/alto2/a2hw.cpp10
-rw-r--r--src/devices/cpu/alto2/a2kbd.cpp4
-rw-r--r--src/devices/cpu/alto2/a2mem.cpp19
-rw-r--r--src/devices/cpu/apexc/apexc.cpp5
-rw-r--r--src/devices/cpu/e0c6200/e0c6s46.cpp4
-rw-r--r--src/devices/cpu/i386/i386.cpp2
-rw-r--r--src/devices/cpu/lc8670/lc8670.cpp12
-rw-r--r--src/devices/cpu/m6800/m6800.cpp18
-rw-r--r--src/devices/cpu/psx/psx.cpp4
-rw-r--r--src/devices/cpu/tms32051/tms32051.cpp4
-rw-r--r--src/devices/cpu/tms7000/tms7000.cpp4
-rw-r--r--src/devices/cpu/tms7000/tms7000.h4
-rw-r--r--src/devices/cpu/tms9900/tms9900.cpp14
-rw-r--r--src/devices/cpu/tms9900/tms9980a.cpp15
-rw-r--r--src/devices/cpu/tms9900/tms9995.cpp34
-rw-r--r--src/devices/machine/6522via.cpp2
-rw-r--r--src/devices/machine/6532riot.cpp2
-rw-r--r--src/devices/machine/autoconfig.cpp4
-rw-r--r--src/devices/machine/bankdev.cpp8
-rw-r--r--src/devices/machine/mb8421.cpp4
-rw-r--r--src/devices/machine/mm58167.cpp2
-rw-r--r--src/devices/machine/mos6526.cpp2
-rw-r--r--src/devices/machine/mos6530n.cpp6
-rw-r--r--src/devices/machine/mos6551.cpp2
-rw-r--r--src/devices/machine/s2636.cpp2
-rw-r--r--src/devices/machine/smpc.cpp2
-rw-r--r--src/devices/sound/tms5220.cpp4
-rw-r--r--src/devices/video/315_5124.cpp4
-rw-r--r--src/devices/video/clgd542x.cpp2
-rw-r--r--src/devices/video/gb_lcd.cpp8
-rw-r--r--src/devices/video/hd44780.cpp6
-rw-r--r--src/devices/video/pc_vga.cpp2
-rw-r--r--src/devices/video/stvvdp1.cpp2
-rw-r--r--src/devices/video/stvvdp2.cpp8
-rw-r--r--src/devices/video/t6a04.cpp2
-rw-r--r--src/devices/video/tms9928a.cpp8
-rw-r--r--src/emu/debug/debugcpu.cpp26
-rw-r--r--src/emu/debug/debugcpu.h2
-rw-r--r--src/emu/emumem.cpp5
-rw-r--r--src/emu/emumem.h30
-rw-r--r--src/emu/machine.cpp10
-rw-r--r--src/emu/machine.h1
-rw-r--r--src/mame/drivers/a2600.cpp4
-rw-r--r--src/mame/drivers/apple2.cpp12
-rw-r--r--src/mame/drivers/apple2e.cpp26
-rw-r--r--src/mame/drivers/atarist.cpp2
-rw-r--r--src/mame/drivers/c65.cpp4
-rw-r--r--src/mame/drivers/cdi.cpp4
-rw-r--r--src/mame/drivers/cmi.cpp12
-rw-r--r--src/mame/drivers/esq5505.cpp4
-rw-r--r--src/mame/drivers/fm7.cpp2
-rw-r--r--src/mame/drivers/hyperscan.cpp4
-rw-r--r--src/mame/drivers/megasys1.cpp12
-rw-r--r--src/mame/drivers/model2.cpp2
-rw-r--r--src/mame/drivers/next.cpp10
-rw-r--r--src/mame/drivers/pc8801.cpp4
-rw-r--r--src/mame/drivers/pc9801.cpp2
-rw-r--r--src/mame/drivers/pcd.cpp8
-rw-r--r--src/mame/drivers/psion.cpp2
-rw-r--r--src/mame/drivers/rainbow.cpp2
-rw-r--r--src/mame/drivers/sc2.cpp2
-rw-r--r--src/mame/drivers/skylncr.cpp3
-rw-r--r--src/mame/drivers/snk.cpp4
-rw-r--r--src/mame/drivers/stv.cpp14
-rw-r--r--src/mame/drivers/sun2.cpp14
-rw-r--r--src/mame/drivers/sun3.cpp14
-rw-r--r--src/mame/drivers/sun4.cpp14
-rw-r--r--src/mame/drivers/superqix.cpp4
-rw-r--r--src/mame/drivers/supracan.cpp26
-rw-r--r--src/mame/drivers/symbolics.cpp2
-rw-r--r--src/mame/drivers/ti99_4p.cpp8
-rw-r--r--src/mame/drivers/tk2000.cpp2
-rw-r--r--src/mame/drivers/vixen.cpp10
-rw-r--r--src/mame/drivers/vt240.cpp2
-rw-r--r--src/mame/drivers/wicat.cpp4
-rw-r--r--src/mame/drivers/x68k.cpp12
-rw-r--r--src/mame/drivers/xor100.cpp2
-rw-r--r--src/mame/machine/3do.cpp4
-rw-r--r--src/mame/machine/amigakbd.cpp2
-rw-r--r--src/mame/machine/apple2.cpp34
-rw-r--r--src/mame/machine/apple2gs.cpp6
-rw-r--r--src/mame/machine/apple3.cpp10
-rw-r--r--src/mame/machine/isbc_215g.cpp4
-rw-r--r--src/mame/machine/msx_matsushita.cpp2
-rw-r--r--src/mame/machine/msx_s1985.cpp2
-rw-r--r--src/mame/machine/n64.cpp2
-rw-r--r--src/mame/machine/osborne1.cpp9
-rw-r--r--src/mame/machine/saturn.cpp14
-rw-r--r--src/mame/machine/thomson.cpp30
-rw-r--r--src/mame/machine/z80ne.cpp3
-rw-r--r--src/mame/video/zx.cpp4
111 files changed, 354 insertions, 444 deletions
diff --git a/src/devices/bus/a2bus/a2bus.cpp b/src/devices/bus/a2bus/a2bus.cpp
index b1c97c08693..a33f8c65585 100644
--- a/src/devices/bus/a2bus/a2bus.cpp
+++ b/src/devices/bus/a2bus/a2bus.cpp
@@ -248,15 +248,11 @@ void a2bus_device::set_maincpu_halt(int state)
uint8_t a2bus_device::dma_r(address_space &space, uint16_t offset)
{
- m_maincpu_space->set_debugger_access(space.debugger_access());
-
return m_maincpu_space->read_byte(offset);
}
void a2bus_device::dma_w(address_space &space, uint16_t offset, uint8_t data)
{
- m_maincpu_space->set_debugger_access(space.debugger_access());
-
m_maincpu_space->write_byte(offset, data);
}
diff --git a/src/devices/bus/a2bus/pc_xporter.cpp b/src/devices/bus/a2bus/pc_xporter.cpp
index 08533d22f60..c847da9be90 100644
--- a/src/devices/bus/a2bus/pc_xporter.cpp
+++ b/src/devices/bus/a2bus/pc_xporter.cpp
@@ -315,7 +315,7 @@ uint8_t a2bus_pcxporter_device::read_c800(address_space &space, uint16_t offset)
case 0x703: // read with increment
rv = m_ram[m_offset];
// don't increment if the debugger's reading
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
m_offset++;
}
diff --git a/src/devices/bus/c64/currah_speech.cpp b/src/devices/bus/c64/currah_speech.cpp
index ffee35fc9c0..1c47523f568 100644
--- a/src/devices/bus/c64/currah_speech.cpp
+++ b/src/devices/bus/c64/currah_speech.cpp
@@ -212,7 +212,7 @@ uint8_t c64_currah_speech_cartridge_device::c64_cd_r(address_space &space, offs_
data = m_nsp->sby_r() << 7;
}
- if (!space.debugger_access() && (offset == 0xa7f0))
+ if (!machine().debugger_access() && (offset == 0xa7f0))
{
m_game = !m_game;
m_exrom = !m_exrom;
diff --git a/src/devices/bus/isa/ega.cpp b/src/devices/bus/isa/ega.cpp
index e782c18573b..5e88c01d6af 100644
--- a/src/devices/bus/isa/ega.cpp
+++ b/src/devices/bus/isa/ega.cpp
@@ -963,7 +963,7 @@ READ8_MEMBER( isa8_ega_device::read )
{
uint8_t data = 0xFF;
- if ( !space.debugger_access() && ! ( m_sequencer.data[4] & 0x04 ) )
+ if ( !machine().debugger_access() && ! ( m_sequencer.data[4] & 0x04 ) )
{
/* Fill read latches */
m_read_latch[0] = m_plane[0][offset & 0xffff];
diff --git a/src/devices/bus/isa/sb16.cpp b/src/devices/bus/isa/sb16.cpp
index b1ccd4cfd84..4a5f7f1df5d 100644
--- a/src/devices/bus/isa/sb16.cpp
+++ b/src/devices/bus/isa/sb16.cpp
@@ -12,7 +12,7 @@ const device_type ISA16_SB16 = &device_creator<sb16_lle_device>;
READ8_MEMBER( sb16_lle_device::dsp_data_r )
{
- if(!space.debugger_access())
+ if(!machine().debugger_access())
m_data_in = false;
return m_in_byte;
diff --git a/src/devices/bus/msx_cart/holy_quran.cpp b/src/devices/bus/msx_cart/holy_quran.cpp
index 3c5ae04dc0c..e06b0a2bb17 100644
--- a/src/devices/bus/msx_cart/holy_quran.cpp
+++ b/src/devices/bus/msx_cart/holy_quran.cpp
@@ -81,7 +81,7 @@ READ8_MEMBER(msx_cart_holy_quran::read_cart)
// The decryption should actually start working after the first M1 cycle executing something
// from the cartridge.
- if (offset == ((m_rom[3] << 8) | m_rom[2]) && !space.debugger_access())
+ if (offset == ((m_rom[3] << 8) | m_rom[2]) && !machine().debugger_access())
{
m_decrypt = true;
}
diff --git a/src/devices/bus/ti99_peb/bwg.cpp b/src/devices/bus/ti99_peb/bwg.cpp
index d2a04e0c6d0..9882e821f71 100644
--- a/src/devices/bus/ti99_peb/bwg.cpp
+++ b/src/devices/bus/ti99_peb/bwg.cpp
@@ -137,7 +137,7 @@ WRITE_LINE_MEMBER( snug_bwg_device::fdc_drq_w )
SETADDRESS_DBIN_MEMBER( snug_bwg_device::setaddress_dbin )
{
// Do not allow setaddress for debugger
- if (space.debugger_access()) return;
+ if (machine().debugger_access()) return;
// Selection login in the PAL and some circuits on the board
@@ -216,7 +216,7 @@ void snug_bwg_device::debug_write(offs_t offset, uint8_t data)
*/
READ8Z_MEMBER(snug_bwg_device::readz)
{
- if (space.debugger_access())
+ if (machine().debugger_access())
{
debug_read(offset, value);
return;
@@ -286,7 +286,7 @@ READ8Z_MEMBER(snug_bwg_device::readz)
*/
WRITE8_MEMBER(snug_bwg_device::write)
{
- if (space.debugger_access())
+ if (machine().debugger_access())
{
debug_write(offset, data);
return;
diff --git a/src/devices/bus/ti99_peb/evpc.cpp b/src/devices/bus/ti99_peb/evpc.cpp
index aedabb6e172..dafd28757e7 100644
--- a/src/devices/bus/ti99_peb/evpc.cpp
+++ b/src/devices/bus/ti99_peb/evpc.cpp
@@ -64,7 +64,7 @@ SETADDRESS_DBIN_MEMBER( snug_enhanced_video_device::setaddress_dbin )
{
// Do not allow setaddress for the debugger. It will mess up the
// setaddress/memory access pairs when the CPU enters wait states.
- if (space.debugger_access()) return;
+ if (machine().debugger_access()) return;
if (TRACE_ADDRESS) logerror("set address %04x, %s\n", offset, (state==ASSERT_LINE)? "read" : "write");
diff --git a/src/devices/bus/ti99_peb/hfdc.cpp b/src/devices/bus/ti99_peb/hfdc.cpp
index f3ea9740a16..36eac4d8a45 100644
--- a/src/devices/bus/ti99_peb/hfdc.cpp
+++ b/src/devices/bus/ti99_peb/hfdc.cpp
@@ -105,7 +105,7 @@ SETADDRESS_DBIN_MEMBER( myarc_hfdc_device::setaddress_dbin )
{
// Do not allow setaddress for the debugger. It will mess up the
// setaddress/memory access pairs when the CPU enters wait states.
- if (space.debugger_access()) return;
+ if (machine().debugger_access()) return;
// Selection login in the PAL and some circuits on the board
@@ -197,7 +197,7 @@ void myarc_hfdc_device::debug_write(offs_t offset, uint8_t data)
*/
READ8Z_MEMBER(myarc_hfdc_device::readz)
{
- if (space.debugger_access())
+ if (machine().debugger_access())
{
debug_read(offset, value);
return;
@@ -276,7 +276,7 @@ READ8Z_MEMBER(myarc_hfdc_device::readz)
*/
WRITE8_MEMBER( myarc_hfdc_device::write )
{
- if (space.debugger_access())
+ if (machine().debugger_access())
{
debug_write(offset, data);
return;
diff --git a/src/devices/bus/ti99_peb/hsgpl.cpp b/src/devices/bus/ti99_peb/hsgpl.cpp
index 2602df19f36..45a57953e9e 100644
--- a/src/devices/bus/ti99_peb/hsgpl.cpp
+++ b/src/devices/bus/ti99_peb/hsgpl.cpp
@@ -341,7 +341,7 @@ void snug_high_speed_gpl_device::cartspace_readz(address_space& space, offs_t of
*/
void snug_high_speed_gpl_device::grom_readz(address_space& space, offs_t offset, uint8_t* value, uint8_t mem_mask)
{
- if (space.debugger_access()) return;
+ if (machine().debugger_access()) return;
//activedevice_adjust_icount(-4);
@@ -527,7 +527,7 @@ void snug_high_speed_gpl_device::cartspace_write(address_space& space, offs_t of
*/
void snug_high_speed_gpl_device::grom_write(address_space& space, offs_t offset, uint8_t data, uint8_t mem_mask)
{
- if (space.debugger_access()) return;
+ if (machine().debugger_access()) return;
//activedevice_adjust_icount(-4);
diff --git a/src/devices/bus/ti99_peb/pcode.cpp b/src/devices/bus/ti99_peb/pcode.cpp
index 3b18f9a41b7..8f5f99bd6c6 100644
--- a/src/devices/bus/ti99_peb/pcode.cpp
+++ b/src/devices/bus/ti99_peb/pcode.cpp
@@ -153,7 +153,7 @@ void ti_pcode_card_device::debugger_read(address_space& space, uint16_t offset,
READ8Z_MEMBER( ti_pcode_card_device::readz )
{
// Care for debugger
- if (space.debugger_access())
+ if (machine().debugger_access())
{
debugger_read(space, offset, *value);
}
@@ -196,7 +196,7 @@ READ8Z_MEMBER( ti_pcode_card_device::readz )
*/
WRITE8_MEMBER( ti_pcode_card_device::write )
{
- if (space.debugger_access()) return;
+ if (machine().debugger_access()) return;
if (m_active && m_isgrom && m_selected)
{
for (auto & elem : m_grom) elem->write(space, m_address, data);
diff --git a/src/devices/bus/ti99_peb/spchsyn.cpp b/src/devices/bus/ti99_peb/spchsyn.cpp
index 1ce0f3faeb8..760b0d8a360 100644
--- a/src/devices/bus/ti99_peb/spchsyn.cpp
+++ b/src/devices/bus/ti99_peb/spchsyn.cpp
@@ -43,7 +43,7 @@ ti_speech_synthesizer_device::ti_speech_synthesizer_device(const machine_config
READ8Z_MEMBER( ti_speech_synthesizer_device::readz )
{
- if (space.debugger_access()) return;
+ if (machine().debugger_access()) return;
if (m_sbe)
{
@@ -62,7 +62,7 @@ READ8Z_MEMBER( ti_speech_synthesizer_device::readz )
*/
WRITE8_MEMBER( ti_speech_synthesizer_device::write )
{
- if (space.debugger_access()) return;
+ if (machine().debugger_access()) return;
if (m_sbe)
{
diff --git a/src/devices/bus/ti99_peb/ti_fdc.cpp b/src/devices/bus/ti99_peb/ti_fdc.cpp
index c8d71dbd9a4..249482db886 100644
--- a/src/devices/bus/ti99_peb/ti_fdc.cpp
+++ b/src/devices/bus/ti99_peb/ti_fdc.cpp
@@ -142,7 +142,7 @@ void ti_fdc_device::debug_read(offs_t offset, uint8_t* value)
READ8Z_MEMBER(ti_fdc_device::readz)
{
- if (space.debugger_access())
+ if (machine().debugger_access())
{
debug_read(offset, value);
return;
@@ -156,7 +156,7 @@ READ8Z_MEMBER(ti_fdc_device::readz)
if (m_WDsel && ((m_address & 9)==0))
{
- if (!space.debugger_access()) reply = m_fd1771->gen_r((offset >> 1)&0x03);
+ if (!machine().debugger_access()) reply = m_fd1771->gen_r((offset >> 1)&0x03);
if (TRACE_DATA)
{
if ((m_address & 0xffff)==0x5ff6)
@@ -183,7 +183,7 @@ READ8Z_MEMBER(ti_fdc_device::readz)
WRITE8_MEMBER(ti_fdc_device::write)
{
- if (space.debugger_access()) return;
+ if (machine().debugger_access()) return;
if (m_inDsrArea && m_selected)
{
@@ -201,7 +201,7 @@ WRITE8_MEMBER(ti_fdc_device::write)
{
// As this is a memory-mapped access we must prevent the debugger
// from messing with the operation
- if (!space.debugger_access()) m_fd1771->gen_w((offset >> 1)&0x03, data);
+ if (!machine().debugger_access()) m_fd1771->gen_w((offset >> 1)&0x03, data);
}
}
}
diff --git a/src/devices/bus/ti99_peb/tn_ide.cpp b/src/devices/bus/ti99_peb/tn_ide.cpp
index dfe277ea6df..6eb17226b5d 100644
--- a/src/devices/bus/ti99_peb/tn_ide.cpp
+++ b/src/devices/bus/ti99_peb/tn_ide.cpp
@@ -128,7 +128,7 @@ WRITE8_MEMBER(nouspikel_ide_interface_device::cruwrite)
READ8Z_MEMBER(nouspikel_ide_interface_device::readz)
{
uint8_t reply = 0;
- if (space.debugger_access()) return;
+ if (machine().debugger_access()) return;
if (((offset & m_select_mask)==m_select_value) && m_selected)
{
@@ -194,7 +194,7 @@ READ8Z_MEMBER(nouspikel_ide_interface_device::readz)
*/
WRITE8_MEMBER(nouspikel_ide_interface_device::write)
{
- if (space.debugger_access()) return;
+ if (machine().debugger_access()) return;
if (((offset & m_select_mask)==m_select_value) && m_selected)
{
diff --git a/src/devices/bus/ti99_peb/tn_usbsm.cpp b/src/devices/bus/ti99_peb/tn_usbsm.cpp
index 22978be8625..61827d5394a 100644
--- a/src/devices/bus/ti99_peb/tn_usbsm.cpp
+++ b/src/devices/bus/ti99_peb/tn_usbsm.cpp
@@ -179,7 +179,7 @@ WRITE8_MEMBER(nouspikel_usb_smartmedia_device::cruwrite)
*/
READ8Z_MEMBER(nouspikel_usb_smartmedia_device::readz)
{
- if (space.debugger_access()) return;
+ if (machine().debugger_access()) return;
if (((offset & m_select_mask)==m_select_value) && m_selected)
{
@@ -230,7 +230,7 @@ READ8Z_MEMBER(nouspikel_usb_smartmedia_device::readz)
*/
WRITE8_MEMBER(nouspikel_usb_smartmedia_device::write)
{
- if (space.debugger_access()) return;
+ if (machine().debugger_access()) return;
if (((offset & m_select_mask)==m_select_value) && m_selected)
{
diff --git a/src/devices/bus/ti99x/datamux.cpp b/src/devices/bus/ti99x/datamux.cpp
index 34f25a89c91..bc1c74ce4d2 100644
--- a/src/devices/bus/ti99x/datamux.cpp
+++ b/src/devices/bus/ti99x/datamux.cpp
@@ -322,7 +322,7 @@ READ16_MEMBER( ti99_datamux_device::read )
uint16_t value = 0;
// Care for debugger
- if (space.debugger_access())
+ if (machine().debugger_access())
{
return debugger_read(space, offset);
}
@@ -371,7 +371,7 @@ READ16_MEMBER( ti99_datamux_device::read )
*/
WRITE16_MEMBER( ti99_datamux_device::write )
{
- if (space.debugger_access())
+ if (machine().debugger_access())
{
debugger_write(space, offset, data);
return;
diff --git a/src/devices/bus/ti99x/genboard.cpp b/src/devices/bus/ti99x/genboard.cpp
index 3878f95bd77..b9219d8fdca 100644
--- a/src/devices/bus/ti99x/genboard.cpp
+++ b/src/devices/bus/ti99x/genboard.cpp
@@ -486,7 +486,7 @@ READ8_MEMBER( geneve_mapper_device::readm )
decdata debug;
// For the debugger, do the decoding here with no wait states
- if (space.debugger_access())
+ if (machine().debugger_access())
{
if (m_cpu->is_onchip(offset)) return m_cpu->debug_read_onchip_memory(offset&0xff);
dec = &debug;
@@ -503,7 +503,7 @@ READ8_MEMBER( geneve_mapper_device::readm )
switch (dec->function)
{
case MLGVIDEO:
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
value = m_video->read(space, dec->offset>>1);
if (TRACE_READ) logerror("Read video %04x -> %02x\n", dec->offset, value);
@@ -521,7 +521,7 @@ READ8_MEMBER( geneve_mapper_device::readm )
case MLGKEY:
// key
- if (!space.debugger_access()) value = m_keyboard->get_recent_key();
+ if (!machine().debugger_access()) value = m_keyboard->get_recent_key();
if (TRACE_READ) logerror("Read keyboard -> %02x\n", value);
break;
@@ -541,7 +541,7 @@ READ8_MEMBER( geneve_mapper_device::readm )
case MLTKEY:
// key
- if (!space.debugger_access()) value = m_keyboard->get_recent_key();
+ if (!machine().debugger_access()) value = m_keyboard->get_recent_key();
if (TRACE_READ) logerror("Read keyboard -> %02x\n", value);
break;
@@ -563,7 +563,7 @@ READ8_MEMBER( geneve_mapper_device::readm )
// video
// ++++ ++-- ---- ---+
// 1000 1000 0000 00x0
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
value = m_video->read(space, dec->offset>>1);
if (TRACE_READ) logerror("Read video %04x -> %02x\n", dec->offset, value);
@@ -586,7 +586,7 @@ READ8_MEMBER( geneve_mapper_device::readm )
// grom simulation
// ++++ ++-- ---- ---+
// 1001 1000 0000 00x0
- if (!space.debugger_access()) value = read_grom(space, dec->offset, 0xff);
+ if (!machine().debugger_access()) value = read_grom(space, dec->offset, 0xff);
if (TRACE_READ) logerror("Read GROM %04x -> %02x\n", dec->offset, value);
break;
@@ -673,7 +673,7 @@ WRITE8_MEMBER( geneve_mapper_device::writem )
decdata debug;
// For the debugger, do the decoding here with no wait states
- if (space.debugger_access())
+ if (machine().debugger_access())
{
dec = &debug;
m_debug_no_ws = true;
@@ -693,7 +693,7 @@ WRITE8_MEMBER( geneve_mapper_device::writem )
// ++++ ++++ ++++ ---+
// 1111 0001 0000 .cc0
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
m_video->write(space, dec->offset>>1, data);
if (TRACE_WRITE) logerror("Write video %04x <- %02x\n", offset, data);
@@ -739,7 +739,7 @@ WRITE8_MEMBER( geneve_mapper_device::writem )
// ++++ ++-- ---- ---+
// 1000 1100 0000 00c0
// Initialize waitstate timer
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
m_video->write(space, dec->offset>>1, data);
if (TRACE_WRITE) logerror("Write video %04x <- %02x\n", offset, data);
diff --git a/src/devices/bus/vcs/dpc.cpp b/src/devices/bus/vcs/dpc.cpp
index 476f102456c..925214267e7 100644
--- a/src/devices/bus/vcs/dpc.cpp
+++ b/src/devices/bus/vcs/dpc.cpp
@@ -294,7 +294,7 @@ WRITE8_MEMBER(a26_rom_dpc_device::write_bank)
DIRECT_UPDATE_MEMBER(a26_rom_dpc_device::cart_opbase)
{
- if (!direct.space().debugger_access())
+ if (!machine().debugger_access())
{
uint8_t new_bit;
new_bit = (m_dpc->m_shift_reg & 0x80) ^ ((m_dpc->m_shift_reg & 0x20) << 2);
diff --git a/src/devices/bus/vcs/rom.cpp b/src/devices/bus/vcs/rom.cpp
index 65ff0715fa8..80947bb881e 100755
--- a/src/devices/bus/vcs/rom.cpp
+++ b/src/devices/bus/vcs/rom.cpp
@@ -360,7 +360,7 @@ READ8_MEMBER(a26_rom_f4_device::read_rom)
}
// update banks
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
switch (offset)
{
@@ -426,7 +426,7 @@ READ8_MEMBER(a26_rom_f6_device::read_rom)
}
// update banks
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
switch (offset)
{
@@ -469,7 +469,7 @@ DIRECT_UPDATE_MEMBER(a26_rom_f6_device::cart_opbase)
{
if ((address & 0x1fff) >= 0x1ff6 && (address & 0x1fff) <= 0x1ff9)
{
- if (!direct.space().debugger_access())
+ if (!machine().debugger_access())
write_bank(direct.space(), (address & 0x1fff) - 0x1ff6, 0);
}
return address;
@@ -494,7 +494,7 @@ READ8_MEMBER(a26_rom_f8_device::read_rom)
}
// update banks
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
switch (offset)
{
@@ -550,7 +550,7 @@ READ8_MEMBER(a26_rom_fa_device::read_rom)
}
// update banks
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
switch (offset)
{
@@ -618,7 +618,7 @@ READ8_MEMBER(a26_rom_fe_device::read_rom)
data = m_rom[offset + (m_base_bank * 0x1000)];
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
if (m_trigger_on_next_access)
{
@@ -643,7 +643,7 @@ READ8_MEMBER(a26_rom_fe_device::read_bank)
{
uint8_t data = space.read_byte(0xfe + offset);
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
switch (offset & 1)
{
@@ -667,7 +667,7 @@ READ8_MEMBER(a26_rom_fe_device::read_bank)
WRITE8_MEMBER(a26_rom_fe_device::write_bank)
{
space.write_byte(0xfe, data);
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
// The next byte on the data bus determines which bank to switch to
m_trigger_on_next_access = 1;
@@ -753,7 +753,7 @@ WRITE8_MEMBER(a26_rom_3f_device::write_bank)
READ8_MEMBER(a26_rom_e0_device::read_rom)
{
// update banks
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
if (offset >= 0xfe0 && offset <= 0xff8)
m_base_banks[(offset >> 3) & 3] = offset & 7;
@@ -792,7 +792,7 @@ WRITE8_MEMBER(a26_rom_e0_device::write_bank)
READ8_MEMBER(a26_rom_e7_device::read_rom)
{
// update banks
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
if (offset >= 0xfe0 && offset <= 0xfe7)
m_base_bank = offset - 0xfe0;
@@ -858,7 +858,7 @@ READ8_MEMBER(a26_rom_ua_device::read_rom)
READ8_MEMBER(a26_rom_ua_device::read_bank)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
m_base_bank = offset >> 6;
return 0;
@@ -913,7 +913,7 @@ WRITE8_MEMBER(a26_rom_cv_device::write_bank)
READ8_MEMBER(a26_rom_dc_device::read_rom)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
if (offset == 0xff0)
m_base_bank = (m_base_bank + 1) & 0x0f;
@@ -943,7 +943,7 @@ WRITE8_MEMBER(a26_rom_dc_device::write_bank)
READ8_MEMBER(a26_rom_fv_device::read_rom)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
if (offset == 0xfd0)
{
@@ -1027,7 +1027,7 @@ READ8_MEMBER(a26_rom_4in1_device::read_rom)
READ8_MEMBER(a26_rom_8in1_device::read_rom)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
switch (offset)
{
diff --git a/src/devices/bus/vcs/scharger.cpp b/src/devices/bus/vcs/scharger.cpp
index 49c27b2f311..c459280e64e 100644
--- a/src/devices/bus/vcs/scharger.cpp
+++ b/src/devices/bus/vcs/scharger.cpp
@@ -116,7 +116,7 @@ inline uint8_t a26_rom_ss_device::read_byte(uint32_t offset)
READ8_MEMBER(a26_rom_ss_device::read_rom)
{
- if (space.debugger_access())
+ if (machine().debugger_access())
return read_byte(offset);
// Bankswitch
diff --git a/src/devices/cpu/alto2/a2hw.cpp b/src/devices/cpu/alto2/a2hw.cpp
index 43dc4709a38..62f38c65f17 100644
--- a/src/devices/cpu/alto2/a2hw.cpp
+++ b/src/devices/cpu/alto2/a2hw.cpp
@@ -241,7 +241,7 @@ READ16_MEMBER( alto2_cpu_device::utilin_r )
data = m_hw.utilin;
- if (!space.debugger_access()) {
+ if (!machine().debugger_access()) {
LOG((this,LOG_HW,2," UTILIN rd %#o (%#o)\n", offset, data));
}
return data;
@@ -257,7 +257,7 @@ READ16_MEMBER( alto2_cpu_device::xbus_r )
{
uint16_t data = m_hw.xbus[offset & 3];
- if (!space.debugger_access()) {
+ if (!machine().debugger_access()) {
LOG((this,LOG_HW,2," XBUS[%d] rd %#o (%#o)\n", offset & 3, offset, data));
}
return data;
@@ -273,7 +273,7 @@ READ16_MEMBER( alto2_cpu_device::xbus_r )
*/
WRITE16_MEMBER( alto2_cpu_device::xbus_w )
{
- if (!space.debugger_access()) {
+ if (!machine().debugger_access()) {
LOG((this,LOG_HW,2," XBUS[%d] wr %#o (%#o)\n", offset & 3, offset, data));
}
m_hw.xbus[offset&3] = data;
@@ -288,7 +288,7 @@ WRITE16_MEMBER( alto2_cpu_device::xbus_w )
READ16_MEMBER( alto2_cpu_device::utilout_r )
{
uint16_t data = m_hw.utilout ^ 0177777;
- if (!space.debugger_access()) {
+ if (!machine().debugger_access()) {
LOG((this,0,2," UTILOUT rd %#o (%#o)\n", offset, data));
}
return data;
@@ -304,7 +304,7 @@ READ16_MEMBER( alto2_cpu_device::utilout_r )
*/
WRITE16_MEMBER( alto2_cpu_device::utilout_w )
{
- if (!space.debugger_access()) {
+ if (!machine().debugger_access()) {
LOG((this,LOG_HW,2," UTILOUT wr %#o (%#o)\n", offset, data));
}
m_hw.utilout = data ^ 0177777;
diff --git a/src/devices/cpu/alto2/a2kbd.cpp b/src/devices/cpu/alto2/a2kbd.cpp
index bb7105686fe..dce135fcbc9 100644
--- a/src/devices/cpu/alto2/a2kbd.cpp
+++ b/src/devices/cpu/alto2/a2kbd.cpp
@@ -31,11 +31,11 @@ READ16_MEMBER( alto2_cpu_device::kbd_ad_r )
break;
}
m_kbd.matrix[offset & 03] = data;
- if (!space.debugger_access()) {
+ if (!machine().debugger_access()) {
LOG((this,LOG_KBD,2," read KBDAD+%o (%#o)\n", offset & 3, data));
}
if (0 == (offset & 3) && (m_kbd.bootkey != 0177777)) {
- if (!space.debugger_access()) {
+ if (!machine().debugger_access()) {
LOG((this,0,2," boot keys (%#o & %#o)\n", data, m_kbd.bootkey));
}
data &= m_kbd.bootkey;
diff --git a/src/devices/cpu/alto2/a2mem.cpp b/src/devices/cpu/alto2/a2mem.cpp
index 1f5f5609374..4e766097b42 100644
--- a/src/devices/cpu/alto2/a2mem.cpp
+++ b/src/devices/cpu/alto2/a2mem.cpp
@@ -6,6 +6,7 @@
*
*****************************************************************************/
#include "alto2cpu.h"
+#include "debug/debugcpu.h"
#define PUT_EVEN(dword,word) X_WRBITS(dword,32, 0,15,word)
#define GET_EVEN(dword) X_RDBITS(dword,32, 0,15)
@@ -484,7 +485,7 @@ uint32_t alto2_cpu_device::hamming_code(bool write, uint32_t dw_addr, uint32_t d
READ16_MEMBER( alto2_cpu_device::mear_r )
{
int data = m_mem.error ? m_mem.mear : m_mem.mar;
- if (!space.debugger_access()) {
+ if (!machine().debugger_access()) {
LOG((this,LOG_MEM,2," MEAR read %07o\n", data));
}
return data;
@@ -509,7 +510,7 @@ READ16_MEMBER( alto2_cpu_device::mear_r )
READ16_MEMBER( alto2_cpu_device::mesr_r )
{
uint16_t data = m_mem.mesr ^ 0177777;
- if (!space.debugger_access()) {
+ if (!machine().debugger_access()) {
LOG((this,LOG_MEM,2," MESR read %07o\n", data));
LOG((this,LOG_MEM,6," Hamming code read : %#o\n", GET_MESR_HAMMING(data)));
LOG((this,LOG_MEM,6," Parity error : %o\n", GET_MESR_PERR(data)));
@@ -522,7 +523,7 @@ READ16_MEMBER( alto2_cpu_device::mesr_r )
WRITE16_MEMBER( alto2_cpu_device::mesr_w )
{
- if (!space.debugger_access()) {
+ if (!machine().debugger_access()) {
LOG((this,LOG_MEM,2," MESR write %07o (clear MESR; was %07o)\n", data, m_mem.mesr));
m_mem.mesr = 0; // set all bits to 0
m_mem.error = 0; // reset the error flag
@@ -557,7 +558,7 @@ WRITE16_MEMBER( alto2_cpu_device::mecr_w )
// clear spare bits
X_WRBITS(m_mem.mecr,16, 0, 3,0);
X_WRBITS(m_mem.mecr,16,15,15,0);
- if (!space.debugger_access()) {
+ if (!machine().debugger_access()) {
LOG((this,LOG_MEM,2," MECR write %07o\n", data));
LOG((this,LOG_MEM,6," Test Hamming code : %#o\n", GET_MECR_TEST_CODE(m_mem.mecr)));
LOG((this,LOG_MEM,6," Test mode : %s\n", GET_MECR_TEST_MODE(m_mem.mecr) ? "on" : "off"));
@@ -574,7 +575,7 @@ READ16_MEMBER( alto2_cpu_device::mecr_r )
{
uint16_t data = m_mem.mecr ^ 0177777;
// all spare bits are set
- if (!space.debugger_access()) {
+ if (!machine().debugger_access()) {
LOG((this,LOG_MEM,2," MECR read %07o\n", data));
LOG((this,LOG_MEM,6," Test Hamming code : %#o\n", GET_MECR_TEST_CODE(data)));
LOG((this,LOG_MEM,6," Test mode : %s\n", GET_MECR_TEST_MODE(data) ? "on" : "off"));
@@ -771,9 +772,7 @@ uint16_t alto2_cpu_device::debug_read_mem(uint32_t addr)
int base_addr = addr & 0177777;
int data;
if (addr >= ALTO2_IO_PAGE_BASE && addr < ALTO2_RAM_SIZE) {
- space(AS_2).set_debugger_access(true);
- data = m_iomem->read_word(m_iomem->address_to_byte(base_addr));
- space(AS_2).set_debugger_access(false);
+ data = machine().debugger().cpu().read_word(*m_iomem, m_iomem->address_to_byte(base_addr), true);
} else {
data = (addr & ALTO2_MEM_ODD) ? GET_ODD(m_mem.ram[addr/2]) : GET_EVEN(m_mem.ram[addr/2]);
}
@@ -790,9 +789,7 @@ void alto2_cpu_device::debug_write_mem(uint32_t addr, uint16_t data)
{
int base_addr = addr & 0177777;
if (addr >= ALTO2_IO_PAGE_BASE && addr < ALTO2_RAM_SIZE) {
- space(AS_2).set_debugger_access(true);
- m_iomem->write_word(m_iomem->address_to_byte(base_addr), data);
- space(AS_2).set_debugger_access(false);
+ machine().debugger().cpu().write_word(*m_iomem, m_iomem->address_to_byte(base_addr), data, true);
} else if (addr & ALTO2_MEM_ODD) {
PUT_ODD(m_mem.ram[addr/2], data);
} else {
diff --git a/src/devices/cpu/apexc/apexc.cpp b/src/devices/cpu/apexc/apexc.cpp
index cbd824d5978..4e8f0cca659 100644
--- a/src/devices/cpu/apexc/apexc.cpp
+++ b/src/devices/cpu/apexc/apexc.cpp
@@ -326,8 +326,9 @@ field: X address D Function Y address D (part 2)
*/
#include "emu.h"
-#include "debugger.h"
#include "apexc.h"
+#include "debugger.h"
+#include "debug/debugcpu.h"
const device_type APEXC = &device_creator<apexc_cpu_device>;
@@ -802,7 +803,7 @@ void apexc_cpu_device::state_import(const device_state_entry &entry)
}
/* fetch current instruction into control register */
- m_cr = m_program->read_dword(m_pc);
+ m_cr = machine().debugger().cpu().read_dword(*m_program, m_pc, true);
break;
case APEXC_ML:
diff --git a/src/devices/cpu/e0c6200/e0c6s46.cpp b/src/devices/cpu/e0c6200/e0c6s46.cpp
index 7563f4bc4a3..495e2c989fe 100644
--- a/src/devices/cpu/e0c6200/e0c6s46.cpp
+++ b/src/devices/cpu/e0c6200/e0c6s46.cpp
@@ -627,7 +627,7 @@ READ8_MEMBER(e0c6s46_device::io_r)
{
// irq flags are reset(acked) when read
uint8_t flag = m_irqflag[offset];
- if (!space.debugger_access())
+ if (!machine().debugger_access())
m_irqflag[offset] = 0;
return flag;
}
@@ -704,7 +704,7 @@ READ8_MEMBER(e0c6s46_device::io_r)
break;
default:
- if (!space.debugger_access())
+ if (!machine().debugger_access())
logerror("%s unknown io_r from $0F%02X at $%04X\n", tag(), offset, m_prev_pc);
break;
}
diff --git a/src/devices/cpu/i386/i386.cpp b/src/devices/cpu/i386/i386.cpp
index 46daedf256d..98ad81ac427 100644
--- a/src/devices/cpu/i386/i386.cpp
+++ b/src/devices/cpu/i386/i386.cpp
@@ -22,8 +22,6 @@
#include "i386priv.h"
#include "i386.h"
-#include "debug/debugcpu.h"
-
/* seems to be defined on mingw-gcc */
#undef i386
diff --git a/src/devices/cpu/lc8670/lc8670.cpp b/src/devices/cpu/lc8670/lc8670.cpp
index 71e674c9221..a5a1c46329b 100644
--- a/src/devices/cpu/lc8670/lc8670.cpp
+++ b/src/devices/cpu/lc8670/lc8670.cpp
@@ -914,7 +914,7 @@ WRITE8_MEMBER(lc8670_cpu_device::mram_w)
READ8_MEMBER(lc8670_cpu_device::xram_r)
{
- if (!(REG_VCCR & 0x40) || space.debugger_access()) // XRAM access enabled
+ if (!(REG_VCCR & 0x40) || machine().debugger_access()) // XRAM access enabled
{
uint8_t * xram_bank = m_xram + (REG_XBNK & 0x03) * 0x60;
@@ -937,7 +937,7 @@ READ8_MEMBER(lc8670_cpu_device::xram_r)
WRITE8_MEMBER(lc8670_cpu_device::xram_w)
{
- if (!(REG_VCCR & 0x40) || space.debugger_access()) // XRAM access enabled
+ if (!(REG_VCCR & 0x40) || machine().debugger_access()) // XRAM access enabled
{
uint8_t * xram_bank = m_xram + (REG_XBNK & 0x03) * 0x60;
@@ -977,7 +977,7 @@ READ8_MEMBER(lc8670_cpu_device::regs_r)
case 0x66:
{
uint8_t data = m_vtrbf[((REG_VRMAD2<<8) | REG_VRMAD1) & 0x1ff];
- if (!space.debugger_access() && (REG_VSEL & 0x10))
+ if (!machine().debugger_access() && (REG_VSEL & 0x10))
{
uint16_t vrmad = (REG_VRMAD1 | (REG_VRMAD2<<8)) + 1;
REG_VRMAD1 = vrmad & 0xff;
@@ -989,7 +989,7 @@ READ8_MEMBER(lc8670_cpu_device::regs_r)
// write-only registers
case 0x20: case 0x23: case 0x24: case 0x27:
case 0x45: case 0x46: case 0x4d:
- if(!space.debugger_access()) logerror("%s: read write-only SFR %04x\n", machine().describe_context(), offset);
+ if(!machine().debugger_access()) logerror("%s: read write-only SFR %04x\n", machine().describe_context(), offset);
return 0xff;
}
return m_sfr[offset];
@@ -1044,7 +1044,7 @@ WRITE8_MEMBER(lc8670_cpu_device::regs_w)
break;
case 0x66:
m_vtrbf[((REG_VRMAD2<<8) | REG_VRMAD1) & 0x1ff] = data;
- if (!space.debugger_access() && (REG_VSEL & 0x10))
+ if (!machine().debugger_access() && (REG_VSEL & 0x10))
{
uint16_t vrmad = (REG_VRMAD1 | (REG_VRMAD2<<8)) + 1;
REG_VRMAD1 = vrmad & 0xff;
@@ -1058,7 +1058,7 @@ WRITE8_MEMBER(lc8670_cpu_device::regs_w)
// read-only registers
case 0x12: case 0x14: case 0x5c:
- if(!space.debugger_access()) logerror("%s: write read-only SFR %04x = %02x\n", machine().describe_context(), offset, data);
+ if(!machine().debugger_access()) logerror("%s: write read-only SFR %04x = %02x\n", machine().describe_context(), offset, data);
return;
}
diff --git a/src/devices/cpu/m6800/m6800.cpp b/src/devices/cpu/m6800/m6800.cpp
index 4fbdc76c58a..cde4bb70a92 100644
--- a/src/devices/cpu/m6800/m6800.cpp
+++ b/src/devices/cpu/m6800/m6800.cpp
@@ -1341,7 +1341,7 @@ READ8_MEMBER( m6800_cpu_device::m6801_io_r )
break;
case IO_P3DATA:
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
if (m_p3csr_is3_flag_read)
{
@@ -1362,7 +1362,7 @@ READ8_MEMBER( m6800_cpu_device::m6801_io_r )
data = (m_io->read_byte(M6801_PORT3) & (m_port3_ddr ^ 0xff))
| (m_port3_data & m_port3_ddr);
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
m_port3_latched = 0;
@@ -1387,7 +1387,7 @@ READ8_MEMBER( m6800_cpu_device::m6801_io_r )
break;
case IO_CH:
- if(!(m_pending_tcsr&TCSR_TOF) && !space.debugger_access())
+ if(!(m_pending_tcsr&TCSR_TOF) && !machine().debugger_access())
{
m_tcsr &= ~TCSR_TOF;
MODIFIED_tcsr;
@@ -1400,7 +1400,7 @@ READ8_MEMBER( m6800_cpu_device::m6801_io_r )
// HACK there should be a break here, but Coleco Adam won't boot with it present, proper fix required to the free-running counter
case IO_OCRH:
- if(!(m_pending_tcsr&TCSR_OCF) && !space.debugger_access())
+ if(!(m_pending_tcsr&TCSR_OCF) && !machine().debugger_access())
{
m_tcsr &= ~TCSR_OCF;
MODIFIED_tcsr;
@@ -1409,7 +1409,7 @@ READ8_MEMBER( m6800_cpu_device::m6801_io_r )
break;
case IO_OCRL:
- if(!(m_pending_tcsr&TCSR_OCF) && !space.debugger_access())
+ if(!(m_pending_tcsr&TCSR_OCF) && !machine().debugger_access())
{
m_tcsr &= ~TCSR_OCF;
MODIFIED_tcsr;
@@ -1418,7 +1418,7 @@ READ8_MEMBER( m6800_cpu_device::m6801_io_r )
break;
case IO_ICRH:
- if(!(m_pending_tcsr&TCSR_ICF) && !space.debugger_access())
+ if(!(m_pending_tcsr&TCSR_ICF) && !machine().debugger_access())
{
m_tcsr &= ~TCSR_ICF;
MODIFIED_tcsr;
@@ -1431,7 +1431,7 @@ READ8_MEMBER( m6800_cpu_device::m6801_io_r )
break;
case IO_P3CSR:
- if ((m_p3csr & M6801_P3CSR_IS3_FLAG) && !space.debugger_access())
+ if ((m_p3csr & M6801_P3CSR_IS3_FLAG) && !machine().debugger_access())
{
m_p3csr_is3_flag_read = 1;
}
@@ -1444,7 +1444,7 @@ READ8_MEMBER( m6800_cpu_device::m6801_io_r )
break;
case IO_TRCSR:
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
if (m_trcsr & M6800_TRCSR_TDRE)
{
@@ -1466,7 +1466,7 @@ READ8_MEMBER( m6800_cpu_device::m6801_io_r )
break;
case IO_RDR:
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
if (m_trcsr_read_orfe)
{
diff --git a/src/devices/cpu/psx/psx.cpp b/src/devices/cpu/psx/psx.cpp
index f69e2bf8d00..9db209dc393 100644
--- a/src/devices/cpu/psx/psx.cpp
+++ b/src/devices/cpu/psx/psx.cpp
@@ -194,14 +194,14 @@ static const uint32_t mtc0_writemask[]=
READ32_MEMBER( psxcpu_device::berr_r )
{
- if( !space.debugger_access() )
+ if( !machine().debugger_access() )
m_berr = 1;
return 0;
}
WRITE32_MEMBER( psxcpu_device::berr_w )
{
- if( !space.debugger_access() )
+ if( !machine().debugger_access() )
m_berr = 1;
}
diff --git a/src/devices/cpu/tms32051/tms32051.cpp b/src/devices/cpu/tms32051/tms32051.cpp
index 9707b5d6270..c57b7df4794 100644
--- a/src/devices/cpu/tms32051/tms32051.cpp
+++ b/src/devices/cpu/tms32051/tms32051.cpp
@@ -513,7 +513,7 @@ READ16_MEMBER( tms32051_device::cpuregs_r )
return m_io->read_word(offset << 1);
default:
- if (!space.debugger_access())
+ if (!machine().debugger_access())
fatalerror("32051: cpuregs_r: unimplemented memory-mapped register %02X at %04X\n", offset, m_pc-1);
}
@@ -625,7 +625,7 @@ WRITE16_MEMBER( tms32051_device::cpuregs_w )
break;
default:
- if (!space.debugger_access())
+ if (!machine().debugger_access())
fatalerror("32051: cpuregs_w: unimplemented memory-mapped register %02X, data %04X at %04X\n", offset, data, m_pc-1);
}
}
diff --git a/src/devices/cpu/tms7000/tms7000.cpp b/src/devices/cpu/tms7000/tms7000.cpp
index 61943fa717f..5598b393bd8 100644
--- a/src/devices/cpu/tms7000/tms7000.cpp
+++ b/src/devices/cpu/tms7000/tms7000.cpp
@@ -505,7 +505,7 @@ READ8_MEMBER(tms7000_device::tms7000_pf_r)
{
// note: port B is write-only, reading it returns the output value as if ddr is 0xff
int port = offset / 2 - 2;
- if (!space.debugger_access())
+ if (!machine().debugger_access())
return (m_io->read_byte(port) & ~m_port_ddr[port]) | (m_port_latch[port] & m_port_ddr[port]);
break;
}
@@ -515,7 +515,7 @@ READ8_MEMBER(tms7000_device::tms7000_pf_r)
return m_port_ddr[offset / 2 - 2];
default:
- if (!space.debugger_access())
+ if (!machine().debugger_access())
logerror("'%s' (%04X): tms7000_pf_r @ $%04x\n", tag(), m_pc, offset);
break;
}
diff --git a/src/devices/cpu/tms7000/tms7000.h b/src/devices/cpu/tms7000/tms7000.h
index 1d7c04e024f..4f6fb1e8760 100644
--- a/src/devices/cpu/tms7000/tms7000.h
+++ b/src/devices/cpu/tms7000/tms7000.h
@@ -48,7 +48,7 @@ public:
tms7000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
tms7000_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, address_map_constructor internal, uint32_t info_flags, const char *shortname, const char *source);
- DECLARE_READ8_MEMBER(tms7000_unmapped_rf_r) { if (!space.debugger_access()) logerror("'%s' (%04X): unmapped_rf_r @ $%04x\n", tag(), m_pc, offset + 0x80); return 0; };
+ DECLARE_READ8_MEMBER(tms7000_unmapped_rf_r) { if (!machine().debugger_access()) logerror("'%s' (%04X): unmapped_rf_r @ $%04x\n", tag(), m_pc, offset + 0x80); return 0; };
DECLARE_WRITE8_MEMBER(tms7000_unmapped_rf_w) { logerror("'%s' (%04X): unmapped_rf_w @ $%04x = $%02x\n", tag(), m_pc, offset + 0x80, data); };
DECLARE_READ8_MEMBER(tms7000_pf_r);
@@ -318,7 +318,7 @@ public:
DECLARE_WRITE8_MEMBER(dockbus_data_w);
// access I/O port E if databus is disabled
- DECLARE_READ8_MEMBER(e_bus_data_r) { return (space.debugger_access()) ? 0xff : ((m_control & 0x20) ? 0xff : m_io->read_byte(TMS7000_PORTE)); }
+ DECLARE_READ8_MEMBER(e_bus_data_r) { return (machine().debugger_access()) ? 0xff : ((m_control & 0x20) ? 0xff : m_io->read_byte(TMS7000_PORTE)); }
DECLARE_WRITE8_MEMBER(e_bus_data_w) { if (~m_control & 0x20) m_io->write_byte(TMS7000_PORTE, data); }
protected:
diff --git a/src/devices/cpu/tms9900/tms9900.cpp b/src/devices/cpu/tms9900/tms9900.cpp
index 9bac8fdf937..8bc409b801a 100644
--- a/src/devices/cpu/tms9900/tms9900.cpp
+++ b/src/devices/cpu/tms9900/tms9900.cpp
@@ -109,6 +109,7 @@
*/
#include "tms9900.h"
+#include "debug/debugcpu.h"
#define NOPRG -1
@@ -418,21 +419,12 @@ void tms99xx_device::state_string_export(const device_state_entry &entry, std::s
uint16_t tms99xx_device::read_workspace_register_debug(int reg)
{
- int temp = m_icount;
- m_prgspace->set_debugger_access(true);
- uint16_t value = m_prgspace->read_word((WP+(reg<<1)) & m_prgaddr_mask & 0xfffe);
- m_prgspace->set_debugger_access(false);
- m_icount = temp;
- return value;
+ return machine().debugger().cpu().read_word(*m_prgspace, (WP+(reg<<1)) & m_prgaddr_mask & 0xfffe, true);
}
void tms99xx_device::write_workspace_register_debug(int reg, uint16_t data)
{
- int temp = m_icount;
- m_prgspace->set_debugger_access(true);
- m_prgspace->write_word((WP+(reg<<1)) & m_prgaddr_mask & 0xfffe, data);
- m_prgspace->set_debugger_access(false);
- m_icount = temp;
+ machine().debugger().cpu().write_word(*m_prgspace, (WP+(reg<<1)) & m_prgaddr_mask & 0xfffe, data, true);
}
const address_space_config *tms99xx_device::memory_space_config(address_spacenum spacenum) const
diff --git a/src/devices/cpu/tms9900/tms9980a.cpp b/src/devices/cpu/tms9900/tms9980a.cpp
index 5cb028e543a..a71beebd9cf 100644
--- a/src/devices/cpu/tms9900/tms9980a.cpp
+++ b/src/devices/cpu/tms9900/tms9980a.cpp
@@ -52,6 +52,7 @@
*/
#include "tms9980a.h"
+#include "debug/debugcpu.h"
/*
The following defines can be set to 0 or 1 to disable or enable certain
@@ -94,20 +95,18 @@ void tms9980a_device::resolve_lines()
uint16_t tms9980a_device::read_workspace_register_debug(int reg)
{
- int temp = m_icount;
int addr = (WP+(reg<<1)) & 0xfffe & m_prgaddr_mask;
- uint16_t value = (m_prgspace->read_byte(addr) << 8) | (m_prgspace->read_byte(addr+1) & 0xff);
- m_icount = temp;
- return value;
+
+ return (machine().debugger().cpu().read_byte(*m_prgspace, addr, true) << 8) |
+ (machine().debugger().cpu().read_byte(*m_prgspace, addr+1, true) & 0xff);
}
void tms9980a_device::write_workspace_register_debug(int reg, uint16_t data)
{
- int temp = m_icount;
int addr = (WP+(reg<<1)) & 0xfffe & m_prgaddr_mask;
- m_prgspace->write_byte(addr, data>>8);
- m_prgspace->write_byte(addr+1, data & 0xff);
- m_icount = temp;
+
+ machine().debugger().cpu().write_byte(*m_prgspace, addr, data>>8, true);
+ machine().debugger().cpu().write_byte(*m_prgspace, addr+1, data & 0xff, true);
}
/*
diff --git a/src/devices/cpu/tms9900/tms9995.cpp b/src/devices/cpu/tms9900/tms9995.cpp
index b161ec05ce3..1ea07f9728b 100644
--- a/src/devices/cpu/tms9900/tms9995.cpp
+++ b/src/devices/cpu/tms9900/tms9995.cpp
@@ -90,6 +90,7 @@
*/
#include "tms9995.h"
+#include "debug/debugcpu.h"
#define NOPRG -1
@@ -363,10 +364,10 @@ void tms9995_device::device_reset()
const char* tms9995_device::s_statename[20] =
{
- "PC ", "WP ", "ST ", "IR ",
- "R0 ", "R1 ", "R2 ", "R3 ",
- "R4 ", "R5 ", "R6 ", "R7 ",
- "R8 ", "R9 ", "R10", "R11",
+ "PC", "WP", "ST", "IR",
+ "R0", "R1", "R2", "R3",
+ "R4", "R5", "R6", "R7",
+ "R8", "R9", "R10", "R11",
"R12", "R13", "R14", "R15"
};
@@ -461,29 +462,19 @@ void tms9995_device::state_string_export(const device_state_entry &entry, std::s
*/
uint16_t tms9995_device::read_workspace_register_debug(int reg)
{
- int temp = m_icount;
- uint16_t value;
-
int addrb = (WP + (reg << 1)) & 0xfffe;
if (is_onchip(addrb))
{
- value = (m_onchip_memory[addrb & 0x00fe]<<8) | m_onchip_memory[(addrb & 0x00fe) + 1];
+ return (m_onchip_memory[addrb & 0x00fe]<<8) | m_onchip_memory[(addrb & 0x00fe) + 1];
}
- else
- {
- m_prgspace->set_debugger_access(true);
- value = (m_prgspace->read_byte(addrb) << 8) & 0xff00;
- value |= m_prgspace->read_byte(addrb+1);
- m_prgspace->set_debugger_access(false);
- }
- m_icount = temp;
- return value;
+
+ return (machine().debugger().cpu().read_byte(*m_prgspace, addrb, true) << 8) |
+ machine().debugger().cpu().read_byte(*m_prgspace, addrb + 1, true);
}
void tms9995_device::write_workspace_register_debug(int reg, uint16_t data)
{
- int temp = m_icount;
int addrb = (WP + (reg << 1)) & 0xfffe;
if (is_onchip(addrb))
@@ -493,12 +484,9 @@ void tms9995_device::write_workspace_register_debug(int reg, uint16_t data)
}
else
{
- m_prgspace->set_debugger_access(true);
- m_prgspace->write_byte(addrb, (data >> 8) & 0xff);
- m_prgspace->write_byte(addrb+1, data & 0xff);
- m_prgspace->set_debugger_access(false);
+ machine().debugger().cpu().write_byte(*m_prgspace, addrb, (data >> 8) & 0xff, true);
+ machine().debugger().cpu().write_byte(*m_prgspace, addrb + 1, data & 0xff, true);
}
- m_icount = temp;
}
const address_space_config *tms9995_device::memory_space_config(address_spacenum spacenum) const
diff --git a/src/devices/machine/6522via.cpp b/src/devices/machine/6522via.cpp
index 2949b77c594..835b29243af 100644
--- a/src/devices/machine/6522via.cpp
+++ b/src/devices/machine/6522via.cpp
@@ -495,7 +495,7 @@ void via6522_device::output_pb()
READ8_MEMBER( via6522_device::read )
{
int val = 0;
- if (space.debugger_access())
+ if (machine().debugger_access())
return 0;
offset &= 0xf;
diff --git a/src/devices/machine/6532riot.cpp b/src/devices/machine/6532riot.cpp
index 94b56366d6d..0b207f49b65 100644
--- a/src/devices/machine/6532riot.cpp
+++ b/src/devices/machine/6532riot.cpp
@@ -233,7 +233,7 @@ void riot6532_device::reg_w(uint8_t offset, uint8_t data)
READ8_MEMBER( riot6532_device::read )
{
- return reg_r(offset, space.debugger_access());
+ return reg_r(offset, machine().debugger_access());
}
uint8_t riot6532_device::reg_r(uint8_t offset, bool debugger_access)
diff --git a/src/devices/machine/autoconfig.cpp b/src/devices/machine/autoconfig.cpp
index e05d153be63..4f70c2f4975 100644
--- a/src/devices/machine/autoconfig.cpp
+++ b/src/devices/machine/autoconfig.cpp
@@ -123,7 +123,7 @@ READ16_MEMBER( amiga_autoconfig::autoconfig_read )
{
uint16_t data = m_cfg[offset] | 0x0fff;
- if (VERBOSE && !space.debugger_access())
+ if (VERBOSE && !space.machine().debugger_access())
space.device().logerror("autoconfig_read %04x @ %02x [mask = %04x]\n", data, offset, mem_mask);
return data;
@@ -131,7 +131,7 @@ READ16_MEMBER( amiga_autoconfig::autoconfig_read )
WRITE16_MEMBER( amiga_autoconfig::autoconfig_write )
{
- if (VERBOSE && !space.debugger_access())
+ if (VERBOSE && !space.machine().debugger_access())
space.device().logerror("autoconfig_write %04x @ %02x [mask = %04x]\n", data, offset, mem_mask);
switch (offset)
diff --git a/src/devices/machine/bankdev.cpp b/src/devices/machine/bankdev.cpp
index be9bc47d63d..67b066abf3b 100644
--- a/src/devices/machine/bankdev.cpp
+++ b/src/devices/machine/bankdev.cpp
@@ -35,49 +35,41 @@ ADDRESS_MAP_END
WRITE8_MEMBER(address_map_bank_device::write8)
{
- m_program->set_debugger_access(space.debugger_access());
m_program->write_byte(m_offset + offset, data);
}
WRITE16_MEMBER(address_map_bank_device::write16)
{
- m_program->set_debugger_access(space.debugger_access());
m_program->write_word(m_offset + (offset * 2), data, mem_mask);
}
WRITE32_MEMBER(address_map_bank_device::write32)
{
- m_program->set_debugger_access(space.debugger_access());
m_program->write_dword(m_offset + (offset * 4), data, mem_mask);
}
WRITE64_MEMBER(address_map_bank_device::write64)
{
- m_program->set_debugger_access(space.debugger_access());
m_program->write_qword(m_offset + (offset * 8), data, mem_mask);
}
READ8_MEMBER(address_map_bank_device::read8)
{
- m_program->set_debugger_access(space.debugger_access());
return m_program->read_byte(m_offset + offset);
}
READ16_MEMBER(address_map_bank_device::read16)
{
- m_program->set_debugger_access(space.debugger_access());
return m_program->read_word(m_offset + (offset * 2), mem_mask);
}
READ32_MEMBER(address_map_bank_device::read32)
{
- m_program->set_debugger_access(space.debugger_access());
return m_program->read_dword(m_offset + (offset * 4), mem_mask);
}
READ64_MEMBER(address_map_bank_device::read64)
{
- m_program->set_debugger_access(space.debugger_access());
return m_program->read_qword(m_offset + (offset * 8), mem_mask);
}
diff --git a/src/devices/machine/mb8421.cpp b/src/devices/machine/mb8421.cpp
index d50240db362..7646d4021d3 100644
--- a/src/devices/machine/mb8421.cpp
+++ b/src/devices/machine/mb8421.cpp
@@ -68,7 +68,7 @@ READ8_MEMBER(mb8421_device::left_r)
{
offset &= 0x7ff;
- if (offset == 0x7fe && !space.debugger_access())
+ if (offset == 0x7fe && !machine().debugger_access())
m_intl_handler(0);
return m_ram[offset];
@@ -87,7 +87,7 @@ READ8_MEMBER(mb8421_device::right_r)
{
offset &= 0x7ff;
- if (offset == 0x7ff && !space.debugger_access())
+ if (offset == 0x7ff && !machine().debugger_access())
m_intr_handler(0);
return m_ram[offset];
diff --git a/src/devices/machine/mm58167.cpp b/src/devices/machine/mm58167.cpp
index b9174c75344..3ac6c77bfde 100644
--- a/src/devices/machine/mm58167.cpp
+++ b/src/devices/machine/mm58167.cpp
@@ -183,7 +183,7 @@ READ8_MEMBER(mm58167_device::read)
{
// printf("read reg %x = %02x\n", offset, m_regs[offset]);
- if (offset == R_CTL_IRQSTATUS && !space.debugger_access())
+ if (offset == R_CTL_IRQSTATUS && !machine().debugger_access())
{
// reading the IRQ status clears IRQ line and IRQ status
uint8_t data = m_regs[offset];
diff --git a/src/devices/machine/mos6526.cpp b/src/devices/machine/mos6526.cpp
index 74b86246812..6f992cb05cb 100644
--- a/src/devices/machine/mos6526.cpp
+++ b/src/devices/machine/mos6526.cpp
@@ -801,7 +801,7 @@ void mos6526_device::execute_run()
READ8_MEMBER( mos6526_device::read )
{
- if (space.debugger_access())
+ if (machine().debugger_access())
return 0xff;
uint8_t data = 0;
diff --git a/src/devices/machine/mos6530n.cpp b/src/devices/machine/mos6530n.cpp
index c28cf6a0d7d..21fe16c41a9 100644
--- a/src/devices/machine/mos6530n.cpp
+++ b/src/devices/machine/mos6530n.cpp
@@ -633,7 +633,7 @@ WRITE8_MEMBER( mos6530_base_t::pb_ddr_w )
READ8_MEMBER( mos6530_base_t::timer_off_r )
{
- if (space.debugger_access())
+ if (machine().debugger_access())
return 0;
return timer_r(false);
@@ -641,7 +641,7 @@ READ8_MEMBER( mos6530_base_t::timer_off_r )
READ8_MEMBER( mos6530_base_t::timer_on_r )
{
- if (space.debugger_access())
+ if (machine().debugger_access())
return 0;
return timer_r(true);
@@ -678,7 +678,7 @@ READ8_MEMBER( mos6530_base_t::irq_r )
{
uint8_t data = get_irq_flags();
- if (!space.debugger_access()) {
+ if (!machine().debugger_access()) {
if (m_irq_edge) {
m_irq_edge = false;
update_irq();
diff --git a/src/devices/machine/mos6551.cpp b/src/devices/machine/mos6551.cpp
index 43201fb1d2b..83ece745233 100644
--- a/src/devices/machine/mos6551.cpp
+++ b/src/devices/machine/mos6551.cpp
@@ -377,7 +377,7 @@ void mos6551_device::write_command(uint8_t data)
READ8_MEMBER( mos6551_device::read )
{
- if (space.debugger_access())
+ if (machine().debugger_access())
return 0xff;
switch (offset & 0x03)
diff --git a/src/devices/machine/s2636.cpp b/src/devices/machine/s2636.cpp
index 569f9d12599..97facc8e66a 100644
--- a/src/devices/machine/s2636.cpp
+++ b/src/devices/machine/s2636.cpp
@@ -414,7 +414,7 @@ READ8_MEMBER( s2636_device::read_data )
{
case REG_COL_BG_CMPL:
case REG_VBL_COL_OBJ:
- if (!space.debugger_access())
+ if (!machine().debugger_access())
m_registers[offset] = 0x00; // collision/completion/VRESET flags reset on read
break;
}
diff --git a/src/devices/machine/smpc.cpp b/src/devices/machine/smpc.cpp
index 749f5bc8f8b..da0ee33dd2a 100644
--- a/src/devices/machine/smpc.cpp
+++ b/src/devices/machine/smpc.cpp
@@ -873,7 +873,7 @@ READ8_MEMBER( saturn_state::saturn_SMPC_r )
{
uint8_t cur_ddr;
- if (((m_ctrl1 && m_ctrl1->read_id(0) != 0x02) || (m_ctrl2 && m_ctrl2->read_id(0) != 0x02)) && !(space.debugger_access()))
+ if (((m_ctrl1 && m_ctrl1->read_id(0) != 0x02) || (m_ctrl2 && m_ctrl2->read_id(0) != 0x02)) && !(machine().debugger_access()))
{
popmessage("Warning: read with SH-2 direct mode with a non-pad device");
return 0;
diff --git a/src/devices/sound/tms5220.cpp b/src/devices/sound/tms5220.cpp
index b1a9b8aa325..1ec10df94bf 100644
--- a/src/devices/sound/tms5220.cpp
+++ b/src/devices/sound/tms5220.cpp
@@ -2016,7 +2016,7 @@ WRITE8_MEMBER( tms5220_device::combined_rsq_wsq_w )
WRITE8_MEMBER( tms5220_device::data_w )
{
// prevent debugger from changing the internal state
- if (space.debugger_access()) return;
+ if (machine().debugger_access()) return;
#ifdef DEBUG_RS_WS
logerror("tms5220_data_w: data %02x\n", data);
@@ -2049,7 +2049,7 @@ 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 (machine().debugger_access()) return 0;
if (!m_true_timing)
{
diff --git a/src/devices/video/315_5124.cpp b/src/devices/video/315_5124.cpp
index eb6985203e2..6f47e2bc596 100644
--- a/src/devices/video/315_5124.cpp
+++ b/src/devices/video/315_5124.cpp
@@ -565,7 +565,7 @@ READ8_MEMBER( sega315_5124_device::vram_read )
/* Return read buffer contents */
temp = m_buffer;
- if ( !space.debugger_access() )
+ if ( !machine().debugger_access() )
{
/* Load read buffer */
m_buffer = this->space().read_byte(m_addr & 0x3fff);
@@ -632,7 +632,7 @@ READ8_MEMBER( sega315_5124_device::register_read )
check_pending_flags();
temp = m_status;
- if ( !space.debugger_access() )
+ if ( !machine().debugger_access() )
{
/* Clear pending write flag */
m_pending_reg_write = 0;
diff --git a/src/devices/video/clgd542x.cpp b/src/devices/video/clgd542x.cpp
index 163c80ccccf..ad6deda2f5a 100644
--- a/src/devices/video/clgd542x.cpp
+++ b/src/devices/video/clgd542x.cpp
@@ -1264,7 +1264,7 @@ READ8_MEMBER(cirrus_gd5428_device::mem_r)
if(vga.sequencer.data[4] & 4)
{
int data;
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
vga.gc.latch[0]=vga.memory[(offset+addr) % vga.svga_intf.vram_size];
vga.gc.latch[1]=vga.memory[((offset+addr)+0x10000) % vga.svga_intf.vram_size];
diff --git a/src/devices/video/gb_lcd.cpp b/src/devices/video/gb_lcd.cpp
index 6be32fc7588..3a8145d24f0 100644
--- a/src/devices/video/gb_lcd.cpp
+++ b/src/devices/video/gb_lcd.cpp
@@ -2883,7 +2883,7 @@ void dmg_ppu_device::lcd_switch_on(uint8_t new_data)
READ8_MEMBER(dmg_ppu_device::vram_r)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
update_state();
LOG(("vram_r: offset=0x%04x\n", offset));
@@ -2905,7 +2905,7 @@ WRITE8_MEMBER(dmg_ppu_device::vram_w)
READ8_MEMBER(dmg_ppu_device::oam_r)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
update_state();
LOG(("oam_r: offset=0x%02x\n", offset));
@@ -2928,7 +2928,7 @@ WRITE8_MEMBER(dmg_ppu_device::oam_w)
READ8_MEMBER(dmg_ppu_device::video_r)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
update_state();
if (offset == 1) LOG(("STAT read\n"));
@@ -3200,7 +3200,7 @@ WRITE8_MEMBER(dmg_ppu_device::video_w)
READ8_MEMBER(cgb_ppu_device::video_r)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
update_state();
if (offset == 1) LOG(("STAT read\n"));
diff --git a/src/devices/video/hd44780.cpp b/src/devices/video/hd44780.cpp
index 65aef6fc39a..122522a9e0d 100644
--- a/src/devices/video/hd44780.cpp
+++ b/src/devices/video/hd44780.cpp
@@ -487,7 +487,7 @@ READ8_MEMBER(hd44780_device::control_read)
{
if (m_data_len == 4)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
update_nibble(0, 1);
if (m_nibble)
@@ -549,7 +549,7 @@ READ8_MEMBER(hd44780_device::data_read)
if (m_data_len == 4)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
update_nibble(1, 1);
if (m_nibble)
@@ -558,7 +558,7 @@ READ8_MEMBER(hd44780_device::data_read)
data = (data << 4) & 0xf0;
}
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
update_ac(m_direction);
set_busy_flag(41);
diff --git a/src/devices/video/pc_vga.cpp b/src/devices/video/pc_vga.cpp
index 4e31bf99514..c9a1a0dce0d 100644
--- a/src/devices/video/pc_vga.cpp
+++ b/src/devices/video/pc_vga.cpp
@@ -1986,7 +1986,7 @@ READ8_MEMBER(vga_device::mem_r)
if(vga.sequencer.data[4] & 4)
{
int data;
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
vga.gc.latch[0]=vga.memory[(offset)];
vga.gc.latch[1]=vga.memory[(offset)+0x10000];
diff --git a/src/devices/video/stvvdp1.cpp b/src/devices/video/stvvdp1.cpp
index bbf5d601921..b5ebdb6db7a 100644
--- a/src/devices/video/stvvdp1.cpp
+++ b/src/devices/video/stvvdp1.cpp
@@ -174,7 +174,7 @@ READ16_MEMBER( saturn_state::saturn_vdp1_regs_r )
return modr;
default:
- if(!space.debugger_access())
+ if(!machine().debugger_access())
printf ("cpu %s (PC=%08X) VDP1: Read from Registers, Offset %04x\n", space.device().tag(), space.device().safe_pc(), offset*2);
break;
}
diff --git a/src/devices/video/stvvdp2.cpp b/src/devices/video/stvvdp2.cpp
index 6e78b89bef3..79280ee5852 100644
--- a/src/devices/video/stvvdp2.cpp
+++ b/src/devices/video/stvvdp2.cpp
@@ -5717,7 +5717,7 @@ READ16_MEMBER ( saturn_state::saturn_vdp2_regs_r )
/* latch h/v signals through HV latch*/
if(!STV_VDP2_EXLTEN)
{
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
m_vdp2.h_count = get_hcounter();
m_vdp2.v_count = get_vcounter();
@@ -5744,7 +5744,7 @@ READ16_MEMBER ( saturn_state::saturn_vdp2_regs_r )
m_vdp2_regs[offset] |= 1 << 3;
/* HV latches clears if this register is read */
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
m_vdp2.exltfg &= ~1;
m_vdp2.exsyfg &= ~1;
@@ -5758,7 +5758,7 @@ READ16_MEMBER ( saturn_state::saturn_vdp2_regs_r )
/* Games basically r/w the entire VDP2 register area when this is tripped. (example: Silhouette Mirage)
Disable log for the time being. */
- //if(!space.debugger_access())
+ //if(!machine().debugger_access())
// printf("Warning: VDP2 version read\n");
break;
}
@@ -5778,7 +5778,7 @@ READ16_MEMBER ( saturn_state::saturn_vdp2_regs_r )
}
default:
- //if(!space.debugger_access())
+ //if(!machine().debugger_access())
// printf("VDP2: read from register %08x %08x\n",offset*4,mem_mask);
break;
}
diff --git a/src/devices/video/t6a04.cpp b/src/devices/video/t6a04.cpp
index 72df41a52d9..70f3e0522f1 100644
--- a/src/devices/video/t6a04.cpp
+++ b/src/devices/video/t6a04.cpp
@@ -229,7 +229,7 @@ READ8_MEMBER(t6a04_device::data_read)
output_reg = ((((*ti82_video)<<8)+ti82_video[1])>>(10-pos_bit));
}
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
m_output_reg = output_reg;
diff --git a/src/devices/video/tms9928a.cpp b/src/devices/video/tms9928a.cpp
index cb39a6659c5..2a9ea588056 100644
--- a/src/devices/video/tms9928a.cpp
+++ b/src/devices/video/tms9928a.cpp
@@ -135,7 +135,7 @@ WRITE8_MEMBER( tms9928a_device::write )
READ8_MEMBER( tms9928a_device::vram_read )
{
// prevent debugger from changing the address base
- if (space.debugger_access()) return 0;
+ if (machine().debugger_access()) return 0;
uint8_t data = m_ReadAhead;
@@ -150,7 +150,7 @@ READ8_MEMBER( tms9928a_device::vram_read )
WRITE8_MEMBER( tms9928a_device::vram_write )
{
// prevent debugger from changing the address base
- if (space.debugger_access()) return;
+ if (machine().debugger_access()) return;
m_vram_space->write_byte(m_Addr, data);
m_Addr = (m_Addr + 1) & (m_vram_size - 1);
@@ -162,7 +162,7 @@ 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;
+ if (machine().debugger_access()) return 0;
uint8_t data = m_StatusReg;
@@ -290,7 +290,7 @@ void tms9928a_device::change_register(uint8_t reg, uint8_t val)
WRITE8_MEMBER( tms9928a_device::register_write )
{
// prevent debugger from changing the internal state
- if (space.debugger_access()) return;
+ if (machine().debugger_access()) return;
if (m_latch)
{
diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp
index ba1b6d4f9a7..e324ad8fd10 100644
--- a/src/emu/debug/debugcpu.cpp
+++ b/src/emu/debug/debugcpu.cpp
@@ -366,7 +366,6 @@ u8 debugger_cpu::read_byte(address_space &space, offs_t address, bool apply_tran
/* all accesses from this point on are for the debugger */
m_debugger_access = true;
- space.set_debugger_access(true);
/* translate if necessary; if not mapped, return 0xff */
u64 custom;
@@ -386,7 +385,6 @@ u8 debugger_cpu::read_byte(address_space &space, offs_t address, bool apply_tran
/* no longer accessing via the debugger */
m_debugger_access = false;
- space.set_debugger_access(false);
return result;
}
@@ -419,7 +417,6 @@ u16 debugger_cpu::read_word(address_space &space, offs_t address, bool apply_tra
/* all accesses from this point on are for the debugger */
m_debugger_access = true;
- space.set_debugger_access(true);
/* translate if necessary; if not mapped, return 0xffff */
u64 custom;
@@ -438,7 +435,6 @@ u16 debugger_cpu::read_word(address_space &space, offs_t address, bool apply_tra
/* no longer accessing via the debugger */
m_debugger_access = false;
- space.set_debugger_access(false);
}
return result;
@@ -473,7 +469,6 @@ u32 debugger_cpu::read_dword(address_space &space, offs_t address, bool apply_tr
/* all accesses from this point on are for the debugger */
m_debugger_access = true;
- space.set_debugger_access(true);
u64 custom;
if (apply_translation && !memory.translate(space.spacenum(), TRANSLATE_READ_DEBUG, address))
@@ -491,7 +486,6 @@ u32 debugger_cpu::read_dword(address_space &space, offs_t address, bool apply_tr
/* no longer accessing via the debugger */
m_debugger_access = false;
- space.set_debugger_access(false);
}
return result;
@@ -526,7 +520,6 @@ u64 debugger_cpu::read_qword(address_space &space, offs_t address, bool apply_tr
/* all accesses from this point on are for the debugger */
m_debugger_access = true;
- space.set_debugger_access(true);
/* translate if necessary; if not mapped, return 0xffffffffffffffff */
u64 custom;
@@ -545,7 +538,6 @@ u64 debugger_cpu::read_qword(address_space &space, offs_t address, bool apply_tr
/* no longer accessing via the debugger */
m_debugger_access = false;
- space.set_debugger_access(false);
}
return result;
@@ -585,7 +577,6 @@ void debugger_cpu::write_byte(address_space &space, offs_t address, u8 data, boo
/* all accesses from this point on are for the debugger */
m_debugger_access = true;
- space.set_debugger_access(true);
/* translate if necessary; if not mapped, we're done */
if (apply_translation && !memory.translate(space.spacenum(), TRANSLATE_WRITE_DEBUG, address))
@@ -601,7 +592,6 @@ void debugger_cpu::write_byte(address_space &space, offs_t address, u8 data, boo
/* no longer accessing via the debugger */
m_debugger_access = false;
- space.set_debugger_access(false);
m_memory_modified = true;
}
@@ -639,7 +629,6 @@ void debugger_cpu::write_word(address_space &space, offs_t address, u16 data, bo
/* all accesses from this point on are for the debugger */
m_debugger_access = true;
- space.set_debugger_access(true);
/* translate if necessary; if not mapped, we're done */
if (apply_translation && !memory.translate(space.spacenum(), TRANSLATE_WRITE_DEBUG, address))
@@ -655,7 +644,6 @@ void debugger_cpu::write_word(address_space &space, offs_t address, u16 data, bo
/* no longer accessing via the debugger */
m_debugger_access = false;
- space.set_debugger_access(false);
m_memory_modified = true;
}
@@ -693,7 +681,7 @@ void debugger_cpu::write_dword(address_space &space, offs_t address, u32 data, b
device_memory_interface &memory = space.device().memory();
/* all accesses from this point on are for the debugger */
- space.set_debugger_access(m_debugger_access = true);
+ m_debugger_access = true;
/* translate if necessary; if not mapped, we're done */
if (apply_translation && !memory.translate(space.spacenum(), TRANSLATE_WRITE_DEBUG, address))
@@ -709,7 +697,6 @@ void debugger_cpu::write_dword(address_space &space, offs_t address, u32 data, b
/* no longer accessing via the debugger */
m_debugger_access = false;
- space.set_debugger_access(false);
m_memory_modified = true;
}
@@ -748,7 +735,6 @@ void debugger_cpu::write_qword(address_space &space, offs_t address, u64 data, b
/* all accesses from this point on are for the debugger */
m_debugger_access = true;
- space.set_debugger_access(true);
/* translate if necessary; if not mapped, we're done */
if (apply_translation && !memory.translate(space.spacenum(), TRANSLATE_WRITE_DEBUG, address))
@@ -764,7 +750,6 @@ void debugger_cpu::write_qword(address_space &space, offs_t address, u64 data, b
/* no longer accessing via the debugger */
m_debugger_access = false;
- space.set_debugger_access(false);
m_memory_modified = true;
}
@@ -804,11 +789,9 @@ u64 debugger_cpu::read_opcode(address_space &space, offs_t address, int size)
/* return early if we got the result directly */
m_debugger_access = true;
- space.set_debugger_access(true);
if (memory.readop(address, size, result2))
{
m_debugger_access = false;
- space.set_debugger_access(false);
return result2;
}
@@ -885,11 +868,7 @@ u64 debugger_cpu::read_opcode(address_space &space, offs_t address, int size)
}
/* turn on debugger access */
- if (!m_debugger_access)
- {
- m_debugger_access = true;
- space.set_debugger_access(true);
- }
+ m_debugger_access = true;
/* switch off the size and handle unaligned accesses */
switch (size)
@@ -939,7 +918,6 @@ u64 debugger_cpu::read_opcode(address_space &space, offs_t address, int size)
/* no longer accessing via the debugger */
m_debugger_access = false;
- space.set_debugger_access(false);
return result;
}
diff --git a/src/emu/debug/debugcpu.h b/src/emu/debug/debugcpu.h
index 079b17d1fd0..6f89ed3f18a 100644
--- a/src/emu/debug/debugcpu.h
+++ b/src/emu/debug/debugcpu.h
@@ -482,6 +482,8 @@ public:
/* return true if the current execution state is stopped */
bool is_stopped();
+ /* return true if the debugger is accessing memory */
+ bool debugger_access() { return m_debugger_access; }
/* ----- symbol table interfaces ----- */
diff --git a/src/emu/emumem.cpp b/src/emu/emumem.cpp
index af4b1f8883d..a195666ebd1 100644
--- a/src/emu/emumem.cpp
+++ b/src/emu/emumem.cpp
@@ -714,7 +714,7 @@ private:
template<typename _UintType>
_UintType unmap_r(address_space &space, offs_t offset, _UintType mask)
{
- if (m_space.log_unmap() && !m_space.debugger_access())
+ if (m_space.log_unmap() && !m_space.machine().debugger_access())
{
m_space.device().logerror(
m_space.is_octal()
@@ -785,7 +785,7 @@ private:
template<typename _UintType>
void unmap_w(address_space &space, offs_t offset, _UintType data, _UintType mask)
{
- if (m_space.log_unmap() && !m_space.debugger_access())
+ if (m_space.log_unmap() && !m_space.machine().debugger_access())
{
m_space.device().logerror(
m_space.is_octal()
@@ -1739,7 +1739,6 @@ address_space::address_space(memory_manager &manager, device_memory_interface &m
m_logbytemask(address_to_byte_end(m_logaddrmask)),
m_unmap(0),
m_spacenum(spacenum),
- m_debugger_access(false),
m_log_unmap(true),
m_direct(std::make_unique<direct_read_data>(*this)),
m_name(memory.space_config(spacenum)->name()),
diff --git a/src/emu/emumem.h b/src/emu/emumem.h
index 6112bbdd5f5..946623f0c8b 100644
--- a/src/emu/emumem.h
+++ b/src/emu/emumem.h
@@ -290,8 +290,6 @@ public:
// debug helpers
const char *get_handler_string(read_or_write readorwrite, offs_t byteaddress);
- bool debugger_access() const { return m_debugger_access; }
- void set_debugger_access(bool debugger) { m_debugger_access = debugger; }
bool log_unmap() const { return m_log_unmap; }
void set_log_unmap(bool log) { m_log_unmap = log; }
void dump_map(FILE *file, read_or_write readorwrite);
@@ -462,7 +460,6 @@ protected:
offs_t m_logbytemask; // byte-converted logical address mask
u64 m_unmap; // unmapped value
address_spacenum m_spacenum; // address space index
- bool m_debugger_access; // treat accesses as coming from the debugger
bool m_log_unmap; // log unmapped accesses in this space?
std::unique_ptr<direct_read_data> m_direct; // fast direct-access read info
const char * m_name; // friendly name of the address space
@@ -475,33 +472,6 @@ private:
};
-// ======================> address_space_debug_wrapper
-
-// wrapper for temporarily setting the debug flag on a memory space (especially one being accessed through another space)
-class address_space_debug_wrapper
-{
-public:
- // construction
- address_space_debug_wrapper(address_space &space, bool debugger_access)
- : m_target(space)
- , m_prev_debugger_access(space.debugger_access())
- {
- space.set_debugger_access(debugger_access);
- }
-
- // destruction
- ~address_space_debug_wrapper() { m_target.set_debugger_access(m_prev_debugger_access); }
-
- // getter
- address_space &space() const { return m_target; }
-
-private:
- // internal state
- address_space &m_target;
- const bool m_prev_debugger_access;
-};
-
-
// ======================> memory_block
// a memory block is a chunk of RAM associated with a range of memory in a device's address space
diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp
index 91999a8307e..5ef806d2249 100644
--- a/src/emu/machine.cpp
+++ b/src/emu/machine.cpp
@@ -767,6 +767,16 @@ void running_machine::strlog(const char *str) const
//-------------------------------------------------
+// debugger_access - return true if the debugger
+// is accessing memory
+//-------------------------------------------------
+
+bool running_machine::debugger_access() const
+{
+ return m_debugger->cpu().debugger_access();
+}
+
+//-------------------------------------------------
// debug_break - breaks into the debugger, if
// enabled
//-------------------------------------------------
diff --git a/src/emu/machine.h b/src/emu/machine.h
index cac9a3f38b6..2543a15f6d5 100644
--- a/src/emu/machine.h
+++ b/src/emu/machine.h
@@ -258,6 +258,7 @@ public:
// misc
address_space &dummy_space() const { return m_dummy_space.space(AS_PROGRAM); }
+ bool debugger_access() const;
void popmessage() const { popmessage(static_cast<char const *>(nullptr)); }
template <typename Format, typename... Params> void popmessage(Format &&fmt, Params &&... args) const;
template <typename Format, typename... Params> void logerror(Format &&fmt, Params &&... args) const;
diff --git a/src/mame/drivers/a2600.cpp b/src/mame/drivers/a2600.cpp
index 3613753f6e4..25bad6af756 100644
--- a/src/mame/drivers/a2600.cpp
+++ b/src/mame/drivers/a2600.cpp
@@ -118,7 +118,7 @@ ADDRESS_MAP_END
READ8_MEMBER(a2600_state::cart_over_all_r)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
m_cart->write_bank(space, offset, 0);
int masked_offset = offset &~ 0x0d00;
@@ -340,7 +340,7 @@ WRITE16_MEMBER(a2600_state::a2600_tia_vsync_callback_pal)
// TODO: is this the correct behavior for the real hardware?!?
READ8_MEMBER(a2600_state::cart_over_riot_r)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
m_cart->write_bank(space, offset, 0);
return m_riot_ram[0x20 + offset];
}
diff --git a/src/mame/drivers/apple2.cpp b/src/mame/drivers/apple2.cpp
index 17a77f3ba3a..6f864e0e061 100644
--- a/src/mame/drivers/apple2.cpp
+++ b/src/mame/drivers/apple2.cpp
@@ -473,7 +473,7 @@ uint32_t napple2_state::screen_update_jp(screen_device &screen, bitmap_ind16 &bi
// most softswitches don't care about read vs write, so handle them here
void napple2_state::do_io(address_space &space, int offset)
{
- if(space.debugger_access())
+ if(machine().debugger_access())
{
return;
}
@@ -642,7 +642,7 @@ WRITE8_MEMBER(napple2_state::c000_w)
READ8_MEMBER(napple2_state::c080_r)
{
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
int slot;
@@ -679,7 +679,7 @@ READ8_MEMBER(napple2_state::c100_r)
if (m_slotdevice[slotnum] != nullptr)
{
- if ((m_slotdevice[slotnum]->take_c800()) && (!space.debugger_access()))
+ if ((m_slotdevice[slotnum]->take_c800()) && (!machine().debugger_access()))
{
m_cnxx_slot = slotnum;
}
@@ -698,7 +698,7 @@ WRITE8_MEMBER(napple2_state::c100_w)
if (m_slotdevice[slotnum] != nullptr)
{
- if ((m_slotdevice[slotnum]->take_c800()) && (!space.debugger_access()))
+ if ((m_slotdevice[slotnum]->take_c800()) && (!machine().debugger_access()))
{
m_cnxx_slot = slotnum;
}
@@ -711,7 +711,7 @@ READ8_MEMBER(napple2_state::c800_r)
{
if (offset == 0x7ff)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
m_cnxx_slot = -1;
}
@@ -731,7 +731,7 @@ WRITE8_MEMBER(napple2_state::c800_w)
{
if (offset == 0x7ff)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
m_cnxx_slot = -1;
}
diff --git a/src/mame/drivers/apple2e.cpp b/src/mame/drivers/apple2e.cpp
index d1fd1dc9e56..2faf0f16987 100644
--- a/src/mame/drivers/apple2e.cpp
+++ b/src/mame/drivers/apple2e.cpp
@@ -1057,7 +1057,7 @@ void apple2e_state::lc_update(int offset)
// most softswitches don't care about read vs write, so handle them here
void apple2e_state::do_io(address_space &space, int offset, bool is_iic)
{
- if(space.debugger_access()) return;
+ if(machine().debugger_access()) return;
// Handle C058-C05F according to IOUDIS
if ((offset & 0x58) == 0x58)
@@ -1258,7 +1258,7 @@ void apple2e_state::do_io(address_space &space, int offset, bool is_iic)
READ8_MEMBER(apple2e_state::c000_r)
{
- if(space.debugger_access()) return read_floatingbus();
+ if(machine().debugger_access()) return read_floatingbus();
switch (offset)
{
@@ -1369,7 +1369,7 @@ READ8_MEMBER(apple2e_state::c000_r)
WRITE8_MEMBER(apple2e_state::c000_w)
{
- if(space.debugger_access()) return;
+ if(machine().debugger_access()) return;
switch (offset)
{
@@ -1487,7 +1487,7 @@ WRITE8_MEMBER(apple2e_state::c000_w)
READ8_MEMBER(apple2e_state::c000_iic_r)
{
- if(space.debugger_access()) return read_floatingbus();
+ if(machine().debugger_access()) return read_floatingbus();
switch (offset)
{
@@ -1631,7 +1631,7 @@ READ8_MEMBER(apple2e_state::c000_iic_r)
WRITE8_MEMBER(apple2e_state::c000_iic_w)
{
- if(space.debugger_access()) return;
+ if(machine().debugger_access()) return;
switch (offset)
{
@@ -1829,7 +1829,7 @@ void apple2e_state::update_iic_mouse()
READ8_MEMBER(apple2e_state::c080_r)
{
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
int slot;
@@ -1878,7 +1878,7 @@ uint8_t apple2e_state::read_slot_rom(address_space &space, int slotbias, int off
if (m_slotdevice[slotnum] != nullptr)
{
- if ((m_cnxx_slot == CNXX_UNCLAIMED) && (m_slotdevice[slotnum]->take_c800()) && (!space.debugger_access()))
+ if ((m_cnxx_slot == CNXX_UNCLAIMED) && (m_slotdevice[slotnum]->take_c800()) && (!machine().debugger_access()))
{
m_cnxx_slot = slotnum;
update_slotrom_banks();
@@ -1896,7 +1896,7 @@ void apple2e_state::write_slot_rom(address_space &space, int slotbias, int offse
if (m_slotdevice[slotnum] != nullptr)
{
- if ((m_cnxx_slot == CNXX_UNCLAIMED) && (m_slotdevice[slotnum]->take_c800()) && (!space.debugger_access()))
+ if ((m_cnxx_slot == CNXX_UNCLAIMED) && (m_slotdevice[slotnum]->take_c800()) && (!machine().debugger_access()))
{
m_cnxx_slot = slotnum;
update_slotrom_banks();
@@ -1908,7 +1908,7 @@ void apple2e_state::write_slot_rom(address_space &space, int slotbias, int offse
uint8_t apple2e_state::read_int_rom(address_space &space, int slotbias, int offset)
{
- if ((m_cnxx_slot == CNXX_UNCLAIMED) && (!space.debugger_access()))
+ if ((m_cnxx_slot == CNXX_UNCLAIMED) && (!machine().debugger_access()))
{
m_cnxx_slot = CNXX_INTROM;
update_slotrom_banks();
@@ -1965,7 +1965,7 @@ READ8_MEMBER(apple2e_state::c800_r)
if (offset == 0x7ff)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
m_cnxx_slot = CNXX_UNCLAIMED;
update_slotrom_banks();
@@ -1989,7 +1989,7 @@ READ8_MEMBER(apple2e_state::c800_int_r)
return m_iicplus_ce00[offset-0x600];
}
- if ((offset == 0x7ff) && !space.debugger_access())
+ if ((offset == 0x7ff) && !machine().debugger_access())
{
m_cnxx_slot = CNXX_UNCLAIMED;
update_slotrom_banks();
@@ -2005,7 +2005,7 @@ READ8_MEMBER(apple2e_state::c800_b2_int_r)
return m_iicplus_ce00[offset-0x600];
}
- if ((offset == 0x7ff) && !space.debugger_access())
+ if ((offset == 0x7ff) && !machine().debugger_access())
{
m_cnxx_slot = CNXX_UNCLAIMED;
update_slotrom_banks();
@@ -2024,7 +2024,7 @@ WRITE8_MEMBER(apple2e_state::c800_w)
if (offset == 0x7ff)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
m_cnxx_slot = CNXX_UNCLAIMED;
update_slotrom_banks();
diff --git a/src/mame/drivers/atarist.cpp b/src/mame/drivers/atarist.cpp
index 1e22354365d..0df2e811f85 100644
--- a/src/mame/drivers/atarist.cpp
+++ b/src/mame/drivers/atarist.cpp
@@ -430,7 +430,7 @@ WRITE16_MEMBER( st_state::berr_w )
READ16_MEMBER( st_state::berr_r )
{
- if(!space.debugger_access()) {
+ if(!machine().debugger_access()) {
m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
}
diff --git a/src/mame/drivers/c65.cpp b/src/mame/drivers/c65.cpp
index 0c2362ce6a5..711ac9b390a 100644
--- a/src/mame/drivers/c65.cpp
+++ b/src/mame/drivers/c65.cpp
@@ -184,7 +184,7 @@ READ8_MEMBER(c65_state::vic4567_dummy_r)
return m_VIC3_ControlB;
}
- if(!space.debugger_access())
+ if(!machine().debugger_access())
printf("%02x\n",offset); // TODO: PC
return res;
}
@@ -219,7 +219,7 @@ WRITE8_MEMBER(c65_state::vic4567_dummy_w)
m_VIC3_ControlB = data;
break;
default:
- if(!space.debugger_access())
+ if(!machine().debugger_access())
printf("%02x %02x\n",offset,data);
break;
}
diff --git a/src/mame/drivers/cdi.cpp b/src/mame/drivers/cdi.cpp
index 0b2e23a1031..a1a17928e05 100644
--- a/src/mame/drivers/cdi.cpp
+++ b/src/mame/drivers/cdi.cpp
@@ -417,7 +417,7 @@ MACHINE_RESET_MEMBER( cdi_state, quizard4r42 )
READ8_MEMBER( cdi_state::servo_io_r )
{
- if (space.debugger_access())
+ if (machine().debugger_access())
{
return 0;
}
@@ -617,7 +617,7 @@ WRITE8_MEMBER( cdi_state::servo_io_w )
READ8_MEMBER( cdi_state::slave_io_r )
{
- if (space.debugger_access())
+ if (machine().debugger_access())
{
return 0;
}
diff --git a/src/mame/drivers/cmi.cpp b/src/mame/drivers/cmi.cpp
index b9456f79688..0416b9bf109 100644
--- a/src/mame/drivers/cmi.cpp
+++ b/src/mame/drivers/cmi.cpp
@@ -830,7 +830,7 @@ void cmi_state::video_write(int offset)
READ8_MEMBER( cmi_state::video_r )
{
- if (space.debugger_access())
+ if (machine().debugger_access())
return m_video_data;
m_video_data = m_video_ram[m_y_pos * (512 / 8) + (m_x_pos / 8)];
@@ -876,7 +876,7 @@ WRITE8_MEMBER( cmi_state::vram_w )
READ8_MEMBER( cmi_state::vram_r )
{
- if (space.debugger_access())
+ if (machine().debugger_access())
return m_video_ram[offset];
/* Latch the current video position */
@@ -945,7 +945,7 @@ READ8_MEMBER( cmi_state::irq_ram_r )
{
int cpunum = (&space.device() == m_maincpu1) ? 0 : 1;
- if (space.debugger_access())
+ if (machine().debugger_access())
return m_scratch_ram[cpunum][0xf8 + offset];
if (m_m6809_bs_hack_cnt > 0 && m_m6809_bs_hack_cpu == cpunum)
@@ -1581,7 +1581,7 @@ WRITE8_MEMBER( cmi_state::fdc_w )
READ8_MEMBER( cmi_state::fdc_r )
{
- if (space.debugger_access())
+ if (machine().debugger_access())
return 0;
if (offset == 0)
@@ -2003,7 +2003,7 @@ WRITE8_MEMBER( cmi01a_device::write )
READ8_MEMBER( cmi01a_device::read )
{
- if (space.debugger_access())
+ if (machine().debugger_access())
return 0;
uint8_t data = 0;
@@ -2077,7 +2077,7 @@ WRITE_LINE_MEMBER( cmi_state::cmi02_ptm_o1 )
READ8_MEMBER( cmi_state::cmi02_r )
{
- if (space.debugger_access())
+ if (machine().debugger_access())
return 0;
if (offset <= 0x1f)
diff --git a/src/mame/drivers/esq5505.cpp b/src/mame/drivers/esq5505.cpp
index b09ea857a02..6626bc7a0df 100644
--- a/src/mame/drivers/esq5505.cpp
+++ b/src/mame/drivers/esq5505.cpp
@@ -336,7 +336,7 @@ READ16_MEMBER(esq5505_state::lower_r)
m_ram = (uint16_t *)(void *)memshare("osram")->ptr();
}
- if (!space.debugger_access() && m_maincpu->get_fc() == 0x6) // supervisor mode = ROM
+ if (!machine().debugger_access() && m_maincpu->get_fc() == 0x6) // supervisor mode = ROM
{
return m_rom[offset];
}
@@ -352,7 +352,7 @@ WRITE16_MEMBER(esq5505_state::lower_w)
if (offset < 0x4000)
{
- if (space.debugger_access() || m_maincpu->get_fc() != 0x6) // if not supervisor mode, RAM
+ if (machine().debugger_access() || m_maincpu->get_fc() != 0x6) // if not supervisor mode, RAM
{
COMBINE_DATA(&m_ram[offset]);
}
diff --git a/src/mame/drivers/fm7.cpp b/src/mame/drivers/fm7.cpp
index 2bb98c7c881..33f4821f5cf 100644
--- a/src/mame/drivers/fm7.cpp
+++ b/src/mame/drivers/fm7.cpp
@@ -366,7 +366,7 @@ READ8_MEMBER(fm7_state::fm7_fd04_r)
*/
READ8_MEMBER(fm7_state::fm7_rom_en_r)
{
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
uint8_t* RAM = memregion("maincpu")->base();
diff --git a/src/mame/drivers/hyperscan.cpp b/src/mame/drivers/hyperscan.cpp
index 6e8ba37bb1e..a7ce5e8a035 100644
--- a/src/mame/drivers/hyperscan.cpp
+++ b/src/mame/drivers/hyperscan.cpp
@@ -223,7 +223,7 @@ READ32_MEMBER(hyperscan_state::spg290_regs_r)
#if LOG_SPG290_REGISTER_ACCESS
//else
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
log_spg290_regs(this,(offset >> 14) & 0xff, (offset<<2) & 0xffff, mem_mask, false);
}
#endif
@@ -386,7 +386,7 @@ WRITE32_MEMBER(hyperscan_state::spg290_regs_w)
#if LOG_SPG290_REGISTER_ACCESS
//else
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
log_spg290_regs(this,(offset >> 14) & 0xff, (offset<<2) & 0xffff, mem_mask, true, data);
}
#endif
diff --git a/src/mame/drivers/megasys1.cpp b/src/mame/drivers/megasys1.cpp
index 121d4a0a0c7..a1de636080a 100644
--- a/src/mame/drivers/megasys1.cpp
+++ b/src/mame/drivers/megasys1.cpp
@@ -4208,7 +4208,7 @@ READ16_MEMBER(megasys1_state::megasys1A_mcu_hs_r)
{
if(m_mcu_hs && ((m_mcu_hs_ram[8/2] << 6) & 0x3ffc0) == ((offset*2) & 0x3ffc0))
{
- if(MCU_HS_LOG && !space.debugger_access())
+ if(MCU_HS_LOG && !machine().debugger_access())
printf("MCU HS R (%04x) <- [%02x]\n",mem_mask,offset*2);
return 0x889e;
@@ -4236,7 +4236,7 @@ WRITE16_MEMBER(megasys1_state::megasys1A_mcu_hs_w)
else
m_mcu_hs = 0;
- if(MCU_HS_LOG && !space.debugger_access())
+ if(MCU_HS_LOG && !machine().debugger_access())
printf("MCU HS W %04x (%04x) -> [%02x]\n",data,mem_mask,offset*2);
}
@@ -4355,7 +4355,7 @@ READ16_MEMBER(megasys1_state::iganinju_mcu_hs_r)
{
if(m_mcu_hs && ((m_mcu_hs_ram[8/2] << 6) & 0x3ffc0) == ((offset*2) & 0x3ffc0))
{
- if(MCU_HS_LOG && !space.debugger_access())
+ if(MCU_HS_LOG && !machine().debugger_access())
printf("MCU HS R (%04x) <- [%02x]\n",mem_mask,offset*2);
return 0x835d;
@@ -4380,7 +4380,7 @@ WRITE16_MEMBER(megasys1_state::iganinju_mcu_hs_w)
else
m_mcu_hs = 0;
- if(MCU_HS_LOG && !space.debugger_access())
+ if(MCU_HS_LOG && !machine().debugger_access())
printf("MCU HS W %04x (%04x) -> [%02x]\n",data,mem_mask,offset*2);
}
@@ -4504,7 +4504,7 @@ READ16_MEMBER(megasys1_state::stdragon_mcu_hs_r)
{
if(m_mcu_hs && ((m_mcu_hs_ram[8/2] << 6) & 0x3ffc0) == ((offset*2) & 0x3ffc0))
{
- if(MCU_HS_LOG && !space.debugger_access())
+ if(MCU_HS_LOG && !machine().debugger_access())
printf("MCU HS R (%04x) <- [%02x]\n",mem_mask,offset*2);
return 0x835d;
@@ -4522,7 +4522,7 @@ WRITE16_MEMBER(megasys1_state::stdragon_mcu_hs_w)
else
m_mcu_hs = 0;
- if(MCU_HS_LOG && !space.debugger_access())
+ if(MCU_HS_LOG && !machine().debugger_access())
printf("MCU HS W %04x (%04x) -> [%02x]\n",data,mem_mask,offset*2);
}
diff --git a/src/mame/drivers/model2.cpp b/src/mame/drivers/model2.cpp
index 94b37e4e9a6..204c63e91c6 100644
--- a/src/mame/drivers/model2.cpp
+++ b/src/mame/drivers/model2.cpp
@@ -1183,7 +1183,7 @@ WRITE32_MEMBER(model2_state::model2o_serial_w)
{
if(mem_mask == 0xffff0000)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
//m_soundack++;
}
diff --git a/src/mame/drivers/next.cpp b/src/mame/drivers/next.cpp
index 7fff206f5c8..89b52e32f98 100644
--- a/src/mame/drivers/next.cpp
+++ b/src/mame/drivers/next.cpp
@@ -79,7 +79,7 @@ uint32_t next_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
/* Dummy catcher for any unknown r/w */
READ8_MEMBER( next_state::io_r )
{
- if(!space.debugger_access())
+ if(!machine().debugger_access())
printf("io_r %08x (%08x)\n",offset+0x02000000, space.device().safe_pc());
if(offset == 0xc0)
@@ -90,21 +90,21 @@ READ8_MEMBER( next_state::io_r )
WRITE8_MEMBER( next_state::io_w )
{
- if(!space.debugger_access())
+ if(!machine().debugger_access())
printf("io_w %08x, %02x (%08x)\n",offset+0x02000000,data, space.device().safe_pc());
}
/* map ROM at 0x01000000-0x0101ffff? */
READ32_MEMBER( next_state::rom_map_r )
{
- if(0 && !space.debugger_access())
+ if(0 && !machine().debugger_access())
printf("%08x ROM MAP?\n",space.device().safe_pc());
return 0x01000000;
}
READ32_MEMBER( next_state::scr2_r )
{
- if(0 && !space.debugger_access())
+ if(0 && !machine().debugger_access())
printf("%08x\n",space.device().safe_pc());
/*
x--- ---- ---- ---- ---- ---- ---- ---- dsp reset
@@ -141,7 +141,7 @@ READ32_MEMBER( next_state::scr2_r )
WRITE32_MEMBER( next_state::scr2_w )
{
- if(0 && !space.debugger_access())
+ if(0 && !machine().debugger_access())
printf("scr2_w %08x (%08x)\n", data, space.device().safe_pc());
COMBINE_DATA(&scr2);
diff --git a/src/mame/drivers/pc8801.cpp b/src/mame/drivers/pc8801.cpp
index 3cc9201134d..eced196609c 100644
--- a/src/mame/drivers/pc8801.cpp
+++ b/src/mame/drivers/pc8801.cpp
@@ -1065,7 +1065,7 @@ READ8_MEMBER(pc8801_state::pc8801_mem_r)
if(m_misc_ctrl & 0x40)
{
- if(!space.debugger_access())
+ if(!machine().debugger_access())
m_vram_sel = 3;
if(m_alu_ctrl2 & 0x80)
@@ -1127,7 +1127,7 @@ WRITE8_MEMBER(pc8801_state::pc8801_mem_w)
{
if(m_misc_ctrl & 0x40)
{
- if(!space.debugger_access())
+ if(!machine().debugger_access())
m_vram_sel = 3;
if(m_alu_ctrl2 & 0x80)
diff --git a/src/mame/drivers/pc9801.cpp b/src/mame/drivers/pc9801.cpp
index ccedaeac890..442c5a3628c 100644
--- a/src/mame/drivers/pc9801.cpp
+++ b/src/mame/drivers/pc9801.cpp
@@ -1459,7 +1459,7 @@ READ16_MEMBER(pc9801_state::upd7220_grcg_r)
{
uint16_t res = 0;
- if(!(m_grcg.mode & 0x80) || space.debugger_access())
+ if(!(m_grcg.mode & 0x80) || machine().debugger_access())
res = m_video_ram_2[offset];
else if(m_ex_video_ff[2])
res = egc_blit_r(offset, mem_mask);
diff --git a/src/mame/drivers/pcd.cpp b/src/mame/drivers/pcd.cpp
index ab8e25c8eb1..650a3619bfd 100644
--- a/src/mame/drivers/pcd.cpp
+++ b/src/mame/drivers/pcd.cpp
@@ -157,7 +157,7 @@ WRITE_LINE_MEMBER( pcd_state::i186_timer1_w )
READ8_MEMBER( pcd_state::nmi_io_r )
{
- if(space.debugger_access())
+ if(machine().debugger_access())
return 0;
logerror("%s: unmapped %s %04x\n", machine().describe_context(), space.name(), offset);
m_stat |= 0xfd;
@@ -167,7 +167,7 @@ READ8_MEMBER( pcd_state::nmi_io_r )
WRITE8_MEMBER( pcd_state::nmi_io_w )
{
- if(space.debugger_access())
+ if(machine().debugger_access())
return;
logerror("%s: unmapped %s %04x\n", machine().describe_context(), space.name(), offset);
m_stat |= 0xfd;
@@ -389,7 +389,7 @@ WRITE16_MEMBER(pcd_state::mem_w)
reg = m_mmu.regs[((offset >> 10) & 0xff) | ((m_mmu.ctl & 0x18) << 5)];
else
reg = m_mmu.regs[((offset >> 10) & 0x7f) | ((m_mmu.ctl & 0x1c) << 5)];
- if(!reg && !space.debugger_access())
+ if(!reg && !machine().debugger_access())
{
offset <<= 1;
logerror("%s: Null mmu entry %06x\n", machine().describe_context(), offset);
@@ -411,7 +411,7 @@ READ16_MEMBER(pcd_state::mem_r)
reg = m_mmu.regs[((offset >> 10) & 0xff) | ((m_mmu.ctl & 0x18) << 5)];
else
reg = m_mmu.regs[((offset >> 10) & 0x7f) | ((m_mmu.ctl & 0x1c) << 5)];
- if(!reg && !space.debugger_access())
+ if(!reg && !machine().debugger_access())
{
offset <<= 1;
logerror("%s: Null mmu entry %06x\n", machine().describe_context(), offset);
diff --git a/src/mame/drivers/psion.cpp b/src/mame/drivers/psion.cpp
index 32cb938fb87..66303c71884 100644
--- a/src/mame/drivers/psion.cpp
+++ b/src/mame/drivers/psion.cpp
@@ -134,7 +134,7 @@ READ8_MEMBER( psion_state::hd63701_int_reg_r )
/* Read/Write common */
void psion_state::io_rw(address_space &space, uint16_t offset)
{
- if (space.debugger_access())
+ if (machine().debugger_access())
return;
switch (offset & 0xffc0)
diff --git a/src/mame/drivers/rainbow.cpp b/src/mame/drivers/rainbow.cpp
index c9c00fc0f01..d443ba86987 100644
--- a/src/mame/drivers/rainbow.cpp
+++ b/src/mame/drivers/rainbow.cpp
@@ -2680,7 +2680,7 @@ WRITE_LINE_MEMBER(rainbow_state::irq_hi_w)
READ16_MEMBER(rainbow_state::vram_r)
{
- if((!(m_GDC_MODE_REGISTER & GDC_MODE_VECTOR)) || space.debugger_access()) // (NOT VECTOR MODE)
+ if((!(m_GDC_MODE_REGISTER & GDC_MODE_VECTOR)) || machine().debugger_access()) // (NOT VECTOR MODE)
{
// SCROLL_MAP IN BITMAP MODE ONLY...?
if(m_GDC_MODE_REGISTER & GDC_MODE_HIGHRES)
diff --git a/src/mame/drivers/sc2.cpp b/src/mame/drivers/sc2.cpp
index c91c070f141..7c3b993b7f8 100644
--- a/src/mame/drivers/sc2.cpp
+++ b/src/mame/drivers/sc2.cpp
@@ -45,7 +45,7 @@ public:
READ8_MEMBER( sc2_state::sc2_beep )
{
- //if (!space.debugger_access())
+ //if (!machine().debugger_access())
{
m_beep_state = ~m_beep_state;
diff --git a/src/mame/drivers/skylncr.cpp b/src/mame/drivers/skylncr.cpp
index 995fa3d821d..23aa8d603cc 100644
--- a/src/mame/drivers/skylncr.cpp
+++ b/src/mame/drivers/skylncr.cpp
@@ -432,8 +432,7 @@ READ_LINE_MEMBER(skylncr_state::mbutrfly_prot_r)
READ8_MEMBER(skylncr_state::bdream97_opcode_r)
{
- address_space_debug_wrapper program(m_maincpu->space(AS_PROGRAM), space.debugger_access());
- return program.space().read_byte(offset) ^ 0x80;
+ return m_maincpu->space(AS_PROGRAM).read_byte(offset) ^ 0x80;
}
diff --git a/src/mame/drivers/snk.cpp b/src/mame/drivers/snk.cpp
index 7681ce0b8b0..195fab3775b 100644
--- a/src/mame/drivers/snk.cpp
+++ b/src/mame/drivers/snk.cpp
@@ -284,7 +284,7 @@ TODO:
READ8_MEMBER(snk_state::snk_cpuA_nmi_trigger_r)
{
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
@@ -298,7 +298,7 @@ WRITE8_MEMBER(snk_state::snk_cpuA_nmi_ack_w)
READ8_MEMBER(snk_state::snk_cpuB_nmi_trigger_r)
{
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
m_subcpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
}
diff --git a/src/mame/drivers/stv.cpp b/src/mame/drivers/stv.cpp
index c6ffc5efbc2..e5cd4ea1891 100644
--- a/src/mame/drivers/stv.cpp
+++ b/src/mame/drivers/stv.cpp
@@ -93,7 +93,7 @@ READ8_MEMBER(stv_state::stv_ioga_r)
uint8_t res;
res = 0xff;
- if(offset & 0x20 && !space.debugger_access())
+ if(offset & 0x20 && !machine().debugger_access())
printf("Reading from mirror %08x?\n",offset);
offset &= 0x1f; // mirror?
@@ -114,7 +114,7 @@ READ8_MEMBER(stv_state::stv_ioga_r)
WRITE8_MEMBER(stv_state::stv_ioga_w)
{
- if(offset & 0x20 && !space.debugger_access())
+ if(offset & 0x20 && !machine().debugger_access())
printf("Writing to mirror %08x %02x?\n",offset,data);
offset &= 0x1f; // mirror?
@@ -271,7 +271,7 @@ READ32_MEMBER(stv_state::critcrsh_ioga_r32)
res |= critcrsh_ioga_r(space,offset*4+3);
if(ACCESSING_BITS_8_15 || ACCESSING_BITS_24_31)
if(!(ACCESSING_BITS_16_23 || ACCESSING_BITS_0_7))
- if(!space.debugger_access())
+ if(!machine().debugger_access())
printf("Warning: IOGA reads from odd offset %02x %08x!\n",offset*4,mem_mask);
return res;
@@ -288,7 +288,7 @@ READ32_MEMBER(stv_state::stvmp_ioga_r32)
res |= stvmp_ioga_r(space,offset*4+3);
if(ACCESSING_BITS_8_15 || ACCESSING_BITS_24_31)
if(!(ACCESSING_BITS_16_23 || ACCESSING_BITS_0_7))
- if(!space.debugger_access())
+ if(!machine().debugger_access())
printf("Warning: IOGA reads from odd offset %02x %08x!\n",offset*4,mem_mask);
return res;
@@ -302,7 +302,7 @@ WRITE32_MEMBER(stv_state::stvmp_ioga_w32)
stvmp_ioga_w(space,offset*4+3,data);
if(ACCESSING_BITS_8_15 || ACCESSING_BITS_24_31)
if(!(ACCESSING_BITS_16_23 || ACCESSING_BITS_0_7))
- if(!space.debugger_access())
+ if(!machine().debugger_access())
printf("Warning: IOGA writes to odd offset %02x (%08x) -> %08x!",offset*4,mem_mask,data);
}
@@ -317,7 +317,7 @@ READ32_MEMBER(stv_state::magzun_ioga_r32)
res |= magzun_ioga_r(space,offset*4+3);
if(ACCESSING_BITS_8_15 || ACCESSING_BITS_24_31)
if(!(ACCESSING_BITS_16_23 || ACCESSING_BITS_0_7))
- if(!space.debugger_access())
+ if(!machine().debugger_access())
printf("Warning: IOGA reads from odd offset %02x %08x!\n",offset*4,mem_mask);
return res;
@@ -331,7 +331,7 @@ WRITE32_MEMBER(stv_state::magzun_ioga_w32)
magzun_ioga_w(space,offset*4+3,data);
if(ACCESSING_BITS_8_15 || ACCESSING_BITS_24_31)
if(!(ACCESSING_BITS_16_23 || ACCESSING_BITS_0_7))
- if(!space.debugger_access())
+ if(!machine().debugger_access())
printf("Warning: IOGA writes to odd offset %02x (%08x) -> %08x!",offset*4,mem_mask,data);
}
diff --git a/src/mame/drivers/sun2.cpp b/src/mame/drivers/sun2.cpp
index e438a07a01f..05df363fd67 100644
--- a/src/mame/drivers/sun2.cpp
+++ b/src/mame/drivers/sun2.cpp
@@ -194,7 +194,7 @@ READ16_MEMBER( sun2_state::tl_mmu_r )
{
uint8_t fc = m_maincpu->get_fc();
- if ((fc == 3) && !space.debugger_access())
+ if ((fc == 3) && !machine().debugger_access())
{
if (offset & 0x4) // set for CPU space
{
@@ -253,7 +253,7 @@ READ16_MEMBER( sun2_state::tl_mmu_r )
}
// debugger hack
- if ((space.debugger_access()) && (offset >= (0xef0000>>1)) && (offset <= (0xef8000>>1)))
+ if ((machine().debugger_access()) && (offset >= (0xef0000>>1)) && (offset <= (0xef8000>>1)))
{
return m_rom_ptr[offset & 0x3fff];
}
@@ -273,7 +273,7 @@ READ16_MEMBER( sun2_state::tl_mmu_r )
uint32_t tmp = (m_pagemap[entry] & 0xfff) << 10;
tmp |= (offset & 0x3ff);
- // if (!space.debugger_access())
+ // if (!machine().debugger_access())
// printf("sun2: Translated addr: %08x, type %d (page %d page entry %08x, orig virt %08x, FC %d)\n", tmp << 1, (m_pagemap[entry] >> 22) & 7, entry, m_pagemap[entry], offset<<1, fc);
switch ((m_pagemap[entry] >> 22) & 7)
@@ -316,10 +316,10 @@ READ16_MEMBER( sun2_state::tl_mmu_r )
}
else
{
- if (!space.debugger_access()) printf("sun2: pagemap entry not valid!\n");
+ if (!machine().debugger_access()) printf("sun2: pagemap entry not valid!\n");
}
- if (!space.debugger_access()) printf("sun2: Unmapped read @ %08x (FC %d, mask %04x, PC=%x, seg %x)\n", offset<<1, fc, mem_mask, m_maincpu->pc, offset>>15);
+ if (!machine().debugger_access()) printf("sun2: Unmapped read @ %08x (FC %d, mask %04x, PC=%x, seg %x)\n", offset<<1, fc, mem_mask, m_maincpu->pc, offset>>15);
return 0xffff;
}
@@ -419,7 +419,7 @@ WRITE16_MEMBER( sun2_state::tl_mmu_w )
uint32_t tmp = (m_pagemap[entry] & 0xfff) << 10;
tmp |= (offset & 0x3ff);
- //if (!space.debugger_access()) printf("sun2: Translated addr: %08x, type %d (page entry %08x, orig virt %08x)\n", tmp << 1, (m_pagemap[entry] >> 22) & 7, m_pagemap[entry], offset<<1);
+ //if (!machine().debugger_access()) printf("sun2: Translated addr: %08x, type %d (page entry %08x, orig virt %08x)\n", tmp << 1, (m_pagemap[entry] >> 22) & 7, m_pagemap[entry], offset<<1);
switch ((m_pagemap[entry] >> 22) & 7)
{
@@ -443,7 +443,7 @@ WRITE16_MEMBER( sun2_state::tl_mmu_w )
}
else
{
- if (!space.debugger_access()) printf("sun2: pagemap entry not valid!\n");
+ if (!machine().debugger_access()) printf("sun2: pagemap entry not valid!\n");
}
printf("sun2: Unmapped write %04x (FC %d, mask %04x, PC=%x) to %08x\n", data, fc, mem_mask, m_maincpu->pc, offset<<1);
diff --git a/src/mame/drivers/sun3.cpp b/src/mame/drivers/sun3.cpp
index acd6a799872..17812008f7a 100644
--- a/src/mame/drivers/sun3.cpp
+++ b/src/mame/drivers/sun3.cpp
@@ -387,7 +387,7 @@ READ32_MEMBER( sun3_state::tl_mmu_r )
{
uint8_t fc = m_maincpu->get_fc();
- if ((fc == 3) && !space.debugger_access())
+ if ((fc == 3) && !machine().debugger_access())
{
int page;
@@ -453,7 +453,7 @@ READ32_MEMBER( sun3_state::tl_mmu_r )
}
// debugger hack
- if ((space.debugger_access()) && (offset >= (0xfef0000>>2)) && (offset <= (0xfefffff>>2)))
+ if ((machine().debugger_access()) && (offset >= (0xfef0000>>2)) && (offset <= (0xfefffff>>2)))
{
return m_rom_ptr[offset & 0x3fff];
}
@@ -482,7 +482,7 @@ READ32_MEMBER( sun3_state::tl_mmu_r )
//printf("pmeg %d, entry %d = %08x, virt %08x => tmp %08x\n", pmeg, entry, m_pagemap[entry], offset << 2, tmp);
- // if (!space.debugger_access())
+ // if (!machine().debugger_access())
//printf("sun3: Translated addr: %08x, type %d (page %d page entry %08x, orig virt %08x, FC %d)\n", tmp << 2, (m_pagemap[entry] >> 26) & 3, entry, m_pagemap[entry], offset<<2, fc);
switch ((m_pagemap[entry] >> 26) & 3)
@@ -507,7 +507,7 @@ READ32_MEMBER( sun3_state::tl_mmu_r )
}
else
{
-// if (!space.debugger_access()) printf("sun3: pagemap entry not valid! (PC=%x)\n", m_maincpu->pc);
+// if (!machine().debugger_access()) printf("sun3: pagemap entry not valid! (PC=%x)\n", m_maincpu->pc);
m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
m_buserr = BE_INVALID;
@@ -515,7 +515,7 @@ READ32_MEMBER( sun3_state::tl_mmu_r )
return 0xffffffff;
}
- if (!space.debugger_access()) logerror("sun3: Unmapped read @ %08x (FC %d, mask %08x, PC=%x, seg %x)\n", offset<<2, fc, mem_mask, m_maincpu->pc, offset>>15);
+ if (!machine().debugger_access()) logerror("sun3: Unmapped read @ %08x (FC %d, mask %08x, PC=%x, seg %x)\n", offset<<2, fc, mem_mask, m_maincpu->pc, offset>>15);
return 0xffffffff;
}
@@ -633,7 +633,7 @@ WRITE32_MEMBER( sun3_state::tl_mmu_w )
uint32_t tmp = (m_pagemap[entry] & 0x7ffff) << 11;
tmp |= (offset & 0x7ff);
- //if (!space.debugger_access()) printf("sun3: Translated addr: %08x, type %d (page entry %08x, orig virt %08x)\n", tmp << 2, (m_pagemap[entry] >> 26) & 3, m_pagemap[entry], offset<<2);
+ //if (!machine().debugger_access()) printf("sun3: Translated addr: %08x, type %d (page entry %08x, orig virt %08x)\n", tmp << 2, (m_pagemap[entry] >> 26) & 3, m_pagemap[entry], offset<<2);
switch ((m_pagemap[entry] >> 26) & 3)
{
@@ -657,7 +657,7 @@ WRITE32_MEMBER( sun3_state::tl_mmu_w )
}
else
{
- //if (!space.debugger_access()) printf("sun3: pagemap entry not valid!\n");
+ //if (!machine().debugger_access()) printf("sun3: pagemap entry not valid!\n");
m_buserr = BE_INVALID;
m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
diff --git a/src/mame/drivers/sun4.cpp b/src/mame/drivers/sun4.cpp
index 3e77d8e21da..466075483b9 100644
--- a/src/mame/drivers/sun4.cpp
+++ b/src/mame/drivers/sun4.cpp
@@ -712,7 +712,7 @@ uint32_t sun4_state::read_insn_data_4c(uint8_t asi, address_space &space, uint32
}
else
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
printf("sun4c: INVALID PTE entry %d %08x accessed! vaddr=%x PC=%x\n", entry, m_pagemap[entry], offset <<2, m_maincpu->pc());
//m_maincpu->trap(SPARC_DATA_ACCESS_EXCEPTION);
@@ -779,7 +779,7 @@ READ32_MEMBER( sun4_state::sun4c_mmu_r )
uint32_t retval = 0;
// make debugger fetches emulate supervisor program for best compatibility with boot PROM execution
- if (space.debugger_access()) asi = 9;
+ if (machine().debugger_access()) asi = 9;
// supervisor program fetches in boot state are special
if ((!(m_system_enable & ENA_NOTBOOT)) && (asi == 9))
@@ -858,7 +858,7 @@ READ32_MEMBER( sun4_state::sun4c_mmu_r )
return read_insn_data_4c(asi, space, offset, mem_mask);
default:
- if (!space.debugger_access()) printf("sun4c: ASI %d unhandled read @ %x (PC=%x)\n", asi, offset<<2, m_maincpu->pc());
+ if (!machine().debugger_access()) printf("sun4c: ASI %d unhandled read @ %x (PC=%x)\n", asi, offset<<2, m_maincpu->pc());
return 0;
}
@@ -1003,7 +1003,7 @@ uint32_t sun4_state::read_insn_data(uint8_t asi, address_space &space, uint32_t
}
else
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
printf("sun4: INVALID PTE entry %d %08x accessed! vaddr=%x PC=%x\n", entry, m_pagemap[entry], offset <<2, m_maincpu->pc());
//m_maincpu->trap(SPARC_DATA_ACCESS_EXCEPTION);
@@ -1060,7 +1060,7 @@ READ32_MEMBER( sun4_state::sun4_mmu_r )
int page;
// make debugger fetches emulate supervisor program for best compatibility with boot PROM execution
- if (space.debugger_access()) asi = 9;
+ if (machine().debugger_access()) asi = 9;
// supervisor program fetches in boot state are special
if ((!(m_system_enable & ENA_NOTBOOT)) && (asi == 9))
@@ -1139,7 +1139,7 @@ READ32_MEMBER( sun4_state::sun4_mmu_r )
return read_insn_data(asi, space, offset, mem_mask);
default:
- if (!space.debugger_access()) printf("sun4: ASI %d unhandled read @ %x (PC=%x)\n", asi, offset<<2, m_maincpu->pc());
+ if (!machine().debugger_access()) printf("sun4: ASI %d unhandled read @ %x (PC=%x)\n", asi, offset<<2, m_maincpu->pc());
return 0;
}
@@ -1474,7 +1474,7 @@ ADDRESS_MAP_END
READ8_MEMBER( sun4_state::fdc_r )
{
- if (space.debugger_access())
+ if (machine().debugger_access())
return 0;
switch(offset)
diff --git a/src/mame/drivers/superqix.cpp b/src/mame/drivers/superqix.cpp
index 736b5b64da1..1c11277da83 100644
--- a/src/mame/drivers/superqix.cpp
+++ b/src/mame/drivers/superqix.cpp
@@ -413,7 +413,7 @@ WRITE8_MEMBER(superqix_state::sqixu_mcu_p2_w)
READ8_MEMBER(superqix_state::sqixu_mcu_p3_r)
{
// logerror("%04x: read Z80 command %02x\n",space.device().safe_pc(),m_fromZ80);
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
m_Z80HasWritten = 0;
}
@@ -423,7 +423,7 @@ READ8_MEMBER(superqix_state::sqixu_mcu_p3_r)
READ8_MEMBER(superqix_state::nmi_ack_r)
{
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
}
diff --git a/src/mame/drivers/supracan.cpp b/src/mame/drivers/supracan.cpp
index 2459e7229aa..5e85d6f72ad 100644
--- a/src/mame/drivers/supracan.cpp
+++ b/src/mame/drivers/supracan.cpp
@@ -1133,7 +1133,6 @@ ADDRESS_MAP_END
READ8_MEMBER( supracan_state::_6502_soundmem_r )
{
- address_space &mem = m_maincpu->space(AS_PROGRAM);
uint8_t data = m_soundram[offset];
switch(offset)
@@ -1145,8 +1144,8 @@ READ8_MEMBER( supracan_state::_6502_soundmem_r )
case 0x410: // Sound IRQ enable
data = m_sound_irq_enable_reg;
- if(!mem.debugger_access()) verboselog(m_hack_68k_to_6502_access ? "maincpu" : "soundcpu", 0, "supracan_soundreg_r: IRQ enable: %04x\n", data);
- if(!mem.debugger_access())
+ if(!machine().debugger_access()) verboselog(m_hack_68k_to_6502_access ? "maincpu" : "soundcpu", 0, "supracan_soundreg_r: IRQ enable: %04x\n", data);
+ if(!machine().debugger_access())
{
if(m_sound_irq_enable_reg & m_sound_irq_source_reg)
{
@@ -1161,17 +1160,17 @@ READ8_MEMBER( supracan_state::_6502_soundmem_r )
case 0x411: // Sound IRQ source
data = m_sound_irq_source_reg;
m_sound_irq_source_reg = 0;
- if(!mem.debugger_access()) verboselog(m_hack_68k_to_6502_access ? "maincpu" : "soundcpu", 3, "supracan_soundreg_r: IRQ source: %04x\n", data);
- if(!mem.debugger_access())
+ if(!machine().debugger_access()) verboselog(m_hack_68k_to_6502_access ? "maincpu" : "soundcpu", 3, "supracan_soundreg_r: IRQ source: %04x\n", data);
+ if(!machine().debugger_access())
{
m_soundcpu->set_input_line(0, CLEAR_LINE);
}
break;
case 0x420:
- if(!mem.debugger_access()) verboselog(m_hack_68k_to_6502_access ? "maincpu" : "soundcpu", 3, "supracan_soundreg_r: Sound hardware status? (not yet implemented): %02x\n", 0);
+ if(!machine().debugger_access()) verboselog(m_hack_68k_to_6502_access ? "maincpu" : "soundcpu", 3, "supracan_soundreg_r: Sound hardware status? (not yet implemented): %02x\n", 0);
break;
case 0x422:
- if(!mem.debugger_access()) verboselog(m_hack_68k_to_6502_access ? "maincpu" : "soundcpu", 3, "supracan_soundreg_r: Sound hardware data? (not yet implemented): %02x\n", 0);
+ if(!machine().debugger_access()) verboselog(m_hack_68k_to_6502_access ? "maincpu" : "soundcpu", 3, "supracan_soundreg_r: Sound hardware data? (not yet implemented): %02x\n", 0);
break;
case 0x404:
case 0x405:
@@ -1182,7 +1181,7 @@ READ8_MEMBER( supracan_state::_6502_soundmem_r )
default:
if(offset >= 0x300 && offset < 0x500)
{
- if(!mem.debugger_access()) verboselog(m_hack_68k_to_6502_access ? "maincpu" : "soundcpu", 0, "supracan_soundreg_r: Unknown register %04x\n", offset);
+ if(!machine().debugger_access()) verboselog(m_hack_68k_to_6502_access ? "maincpu" : "soundcpu", 0, "supracan_soundreg_r: Unknown register %04x\n", offset);
}
break;
}
@@ -1459,13 +1458,12 @@ WRITE16_MEMBER( supracan_state::sound_w )
READ16_MEMBER( supracan_state::video_r )
{
- address_space &mem = m_maincpu->space(AS_PROGRAM);
uint16_t data = m_video_regs[offset];
switch(offset)
{
case 0x00/2: // Video IRQ flags
- if(!mem.debugger_access())
+ if(!machine().debugger_access())
{
//verboselog("maincpu", 0, "read video IRQ flags (%04x)\n", data);
m_maincpu->set_input_line(7, CLEAR_LINE);
@@ -1477,16 +1475,16 @@ READ16_MEMBER( supracan_state::video_r )
//data = 0;
break;
case 0x100/2:
- if(!mem.debugger_access()) verboselog("maincpu", 0, "read tilemap_flags[0] (%04x)\n", data);
+ if(!machine().debugger_access()) verboselog("maincpu", 0, "read tilemap_flags[0] (%04x)\n", data);
break;
case 0x106/2:
- if(!mem.debugger_access()) verboselog("maincpu", 0, "read tilemap_scrolly[0] (%04x)\n", data);
+ if(!machine().debugger_access()) verboselog("maincpu", 0, "read tilemap_scrolly[0] (%04x)\n", data);
break;
case 0x120/2:
- if(!mem.debugger_access()) verboselog("maincpu", 0, "read tilemap_flags[1] (%04x)\n", data);
+ if(!machine().debugger_access()) verboselog("maincpu", 0, "read tilemap_flags[1] (%04x)\n", data);
break;
default:
- if(!mem.debugger_access()) verboselog("maincpu", 0, "video_r: Unknown register: %08x (%04x & %04x)\n", 0xf00000 + (offset << 1), data, mem_mask);
+ if(!machine().debugger_access()) verboselog("maincpu", 0, "video_r: Unknown register: %08x (%04x & %04x)\n", 0xf00000 + (offset << 1), data, mem_mask);
break;
}
diff --git a/src/mame/drivers/symbolics.cpp b/src/mame/drivers/symbolics.cpp
index 99050a1597a..b3ecc5914f4 100644
--- a/src/mame/drivers/symbolics.cpp
+++ b/src/mame/drivers/symbolics.cpp
@@ -90,7 +90,7 @@ public:
READ16_MEMBER(symbolics_state::buserror_r)
{
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
m_maincpu->set_input_line(M68K_LINE_BUSERROR, CLEAR_LINE);
diff --git a/src/mame/drivers/ti99_4p.cpp b/src/mame/drivers/ti99_4p.cpp
index a4e43e1c0b8..2a7a9e81e07 100644
--- a/src/mame/drivers/ti99_4p.cpp
+++ b/src/mame/drivers/ti99_4p.cpp
@@ -455,7 +455,7 @@ READ16_MEMBER( ti99_4p_state::memread )
int addr_off8k = m_addr_buf & 0x1fff;
// If we use the debugger, decode the address now (normally done in setaddress)
- if (space.debugger_access())
+ if (machine().debugger_access())
{
m_addr_buf = offset << 1;
m_decode = decode_address(m_addr_buf);
@@ -498,7 +498,7 @@ READ16_MEMBER( ti99_4p_state::memread )
break;
case SGCPU_PEB:
- if (space.debugger_access()) return debugger_read(space, offset);
+ if (machine().debugger_access()) return debugger_read(space, offset);
// The byte from the odd address has already been read into the latch
// Reading the even address now
m_peribox->readz(space, m_addr_buf, &hbyte);
@@ -516,7 +516,7 @@ WRITE16_MEMBER( ti99_4p_state::memwrite )
int address = 0;
// If we use the debugger, decode the address now (normally done in setaddress)
- if (space.debugger_access())
+ if (machine().debugger_access())
{
m_addr_buf = offset << 1;
m_decode = decode_address(m_addr_buf);
@@ -560,7 +560,7 @@ WRITE16_MEMBER( ti99_4p_state::memwrite )
break;
case SGCPU_PEB:
- if (space.debugger_access()) { debugger_write(space, offset, data); return; }
+ if (machine().debugger_access()) { debugger_write(space, offset, data); return; }
// Writing the even address now (addr)
// The databus multplexer puts the even value into the latch and outputs the odd value now.
diff --git a/src/mame/drivers/tk2000.cpp b/src/mame/drivers/tk2000.cpp
index f83f6058186..64cad281af8 100644
--- a/src/mame/drivers/tk2000.cpp
+++ b/src/mame/drivers/tk2000.cpp
@@ -164,7 +164,7 @@ uint32_t tk2000_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
// most softswitches don't care about read vs write, so handle them here
void tk2000_state::do_io(address_space &space, int offset)
{
- if(space.debugger_access())
+ if(machine().debugger_access())
{
return;
}
diff --git a/src/mame/drivers/vixen.cpp b/src/mame/drivers/vixen.cpp
index 612ed90bace..20266464582 100644
--- a/src/mame/drivers/vixen.cpp
+++ b/src/mame/drivers/vixen.cpp
@@ -75,18 +75,14 @@ void vixen_state::update_interrupt()
READ8_MEMBER( vixen_state::opram_r )
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
membank("bank3")->set_entry(0); // read videoram
- bool const prev_debugger_access(m_program->debugger_access());
- m_program->set_debugger_access(space.debugger_access());
- uint8_t const data(m_program->read_byte(offset));
- m_program->set_debugger_access(prev_debugger_access);
- return data;
+ return m_program->read_byte(offset);
}
READ8_MEMBER( vixen_state::oprom_r )
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
membank("bank3")->set_entry(1); // read rom
return m_rom[offset];
}
diff --git a/src/mame/drivers/vt240.cpp b/src/mame/drivers/vt240.cpp
index 9a60e923277..6cb1e917e38 100644
--- a/src/mame/drivers/vt240.cpp
+++ b/src/mame/drivers/vt240.cpp
@@ -374,7 +374,7 @@ WRITE8_MEMBER(vt240_state::vom_w)
READ16_MEMBER(vt240_state::vram_r)
{
- if(!BIT(m_reg0, 3) || space.debugger_access())
+ if(!BIT(m_reg0, 3) || machine().debugger_access())
{
offset = ((offset & 0x18000) >> 1) | (offset & 0x3fff);
return m_video_ram[offset & 0x7fff];
diff --git a/src/mame/drivers/wicat.cpp b/src/mame/drivers/wicat.cpp
index 41b82014385..b64eb189a26 100644
--- a/src/mame/drivers/wicat.cpp
+++ b/src/mame/drivers/wicat.cpp
@@ -396,7 +396,7 @@ WRITE8_MEMBER( wicat_state::via_b_w )
READ16_MEMBER( wicat_state::invalid_r )
{
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
m_maincpu->set_buserror_details(0x300000+offset*2-2,0,m_maincpu->get_fc());
m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
@@ -407,7 +407,7 @@ READ16_MEMBER( wicat_state::invalid_r )
WRITE16_MEMBER( wicat_state::invalid_w )
{
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
m_maincpu->set_buserror_details(0x300000+offset*2-2,1,m_maincpu->get_fc());
m_maincpu->set_input_line(M68K_LINE_BUSERROR, ASSERT_LINE);
diff --git a/src/mame/drivers/x68k.cpp b/src/mame/drivers/x68k.cpp
index d6c74f5640b..c7c094c6b62 100644
--- a/src/mame/drivers/x68k.cpp
+++ b/src/mame/drivers/x68k.cpp
@@ -977,7 +977,7 @@ READ16_MEMBER(x68k_state::x68k_rom0_r)
{
/* this location contains the address of some expansion device ROM, if no ROM exists,
then access causes a bus error */
- if((m_options->read() & 0x02) && !space.debugger_access())
+ if((m_options->read() & 0x02) && !machine().debugger_access())
set_bus_error((offset << 1) + 0xbffffc, 0, mem_mask);
return 0xff;
}
@@ -986,7 +986,7 @@ WRITE16_MEMBER(x68k_state::x68k_rom0_w)
{
/* this location contains the address of some expansion device ROM, if no ROM exists,
then access causes a bus error */
- if((m_options->read() & 0x02) && !space.debugger_access())
+ if((m_options->read() & 0x02) && !machine().debugger_access())
set_bus_error((offset << 1) + 0xbffffc, 1, mem_mask);
}
@@ -994,7 +994,7 @@ READ16_MEMBER(x68k_state::x68k_emptyram_r)
{
/* this location is unused RAM, access here causes a bus error
Often a method for detecting amount of installed RAM, is to read or write at 1MB intervals, until a bus error occurs */
- if((m_options->read() & 0x02) && !space.debugger_access())
+ if((m_options->read() & 0x02) && !machine().debugger_access())
set_bus_error((offset << 1), 0, mem_mask);
return 0xff;
}
@@ -1003,14 +1003,14 @@ WRITE16_MEMBER(x68k_state::x68k_emptyram_w)
{
/* this location is unused RAM, access here causes a bus error
Often a method for detecting amount of installed RAM, is to read or write at 1MB intervals, until a bus error occurs */
- if((m_options->read() & 0x02) && !space.debugger_access())
+ if((m_options->read() & 0x02) && !machine().debugger_access())
set_bus_error((offset << 1), 1, mem_mask);
}
READ16_MEMBER(x68k_state::x68k_exp_r)
{
/* These are expansion devices, if not present, they cause a bus error */
- if((m_options->read() & 0x02) && !space.debugger_access())
+ if((m_options->read() & 0x02) && !machine().debugger_access())
set_bus_error((offset << 1) + 0xeafa00, 0, mem_mask);
return 0xff;
}
@@ -1018,7 +1018,7 @@ READ16_MEMBER(x68k_state::x68k_exp_r)
WRITE16_MEMBER(x68k_state::x68k_exp_w)
{
/* These are expansion devices, if not present, they cause a bus error */
- if((m_options->read() & 0x02) && !space.debugger_access())
+ if((m_options->read() & 0x02) && !machine().debugger_access())
set_bus_error((offset << 1) + 0xeafa00, 1, mem_mask);
}
diff --git a/src/mame/drivers/xor100.cpp b/src/mame/drivers/xor100.cpp
index 8365b6a3b0c..e64d2501849 100644
--- a/src/mame/drivers/xor100.cpp
+++ b/src/mame/drivers/xor100.cpp
@@ -184,7 +184,7 @@ READ8_MEMBER( xor100_state::fdc_wait_r )
*/
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
if (!m_fdc_irq && !m_fdc_drq)
{
diff --git a/src/mame/machine/3do.cpp b/src/mame/machine/3do.cpp
index 9f1ef4208da..e668dc23227 100644
--- a/src/mame/machine/3do.cpp
+++ b/src/mame/machine/3do.cpp
@@ -653,7 +653,7 @@ WRITE32_MEMBER(_3do_state::_3do_madam_w){
READ32_MEMBER(_3do_state::_3do_clio_r)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
if(offset != 0x200/4 && offset != 0x40/4 && offset != 0x44/4 && offset != 0x48/4 && offset != 0x4c/4 &&
offset != 0x118/4 && offset != 0x11c/4)
@@ -771,7 +771,7 @@ READ32_MEMBER(_3do_state::_3do_clio_r)
return m_clio.uncle_rom;
default:
- if (!space.debugger_access())
+ if (!machine().debugger_access())
logerror( "%08X: unhandled CLIO read offset = %08X\n", m_maincpu->pc(), offset * 4 );
break;
}
diff --git a/src/mame/machine/amigakbd.cpp b/src/mame/machine/amigakbd.cpp
index 21d1c11d71e..1bf969a6e61 100644
--- a/src/mame/machine/amigakbd.cpp
+++ b/src/mame/machine/amigakbd.cpp
@@ -515,7 +515,7 @@ WRITE8_MEMBER( amigakbd_device::latch_w )
READ8_MEMBER( amigakbd_device::counter_r )
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
m_control &= ~COUNTER_OVERFLOW;
update_irqs();
diff --git a/src/mame/machine/apple2.cpp b/src/mame/machine/apple2.cpp
index 6ed41ea5d9b..1810cc2805d 100644
--- a/src/mame/machine/apple2.cpp
+++ b/src/mame/machine/apple2.cpp
@@ -288,7 +288,7 @@ void apple2_state::apple2_update_memory_postload()
READ8_MEMBER(apple2_state::apple2_c0xx_r)
{
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
read8_delegate handlers[] =
{
@@ -341,7 +341,7 @@ WRITE8_MEMBER(apple2_state::apple2_c0xx_w)
READ8_MEMBER(apple2_state::apple2_c080_r)
{
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
device_a2bus_card_interface *slotdevice;
int slot;
@@ -517,7 +517,7 @@ int8_t apple2_state::apple2_slotram_r(address_space &space, int slotnum, int off
{
if (m_slot_ram)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
// printf("slotram_r: taking cnxx_slot to -1\n");
m_a2_cnxx_slot = -1;
@@ -541,7 +541,7 @@ READ8_MEMBER(apple2_state::apple2_c1xx_r )
if (slotdevice != nullptr)
{
- if ((slotdevice->take_c800()) && (!space.debugger_access()))
+ if ((slotdevice->take_c800()) && (!machine().debugger_access()))
{
// printf("c1xx_r: taking cnxx_slot to %d\n", slotnum);
m_a2_cnxx_slot = slotnum;
@@ -591,7 +591,7 @@ READ8_MEMBER(apple2_state::apple2_c3xx_r )
// is a card installed in this slot?
if (slotdevice != nullptr)
{
- if ((slotdevice->take_c800()) && (!space.debugger_access()))
+ if ((slotdevice->take_c800()) && (!machine().debugger_access()))
{
// printf("c3xx_r: taking cnxx_slot to %d\n", slotnum);
m_a2_cnxx_slot = slotnum;
@@ -619,7 +619,7 @@ WRITE8_MEMBER(apple2_state::apple2_c3xx_w )
if (slotdevice != nullptr)
{
- if ((slotdevice->take_c800()) && (!space.debugger_access()))
+ if ((slotdevice->take_c800()) && (!machine().debugger_access()))
{
// printf("c3xx_w: taking cnxx_slot to %d\n", slotnum);
m_a2_cnxx_slot = slotnum;
@@ -645,7 +645,7 @@ READ8_MEMBER(apple2_state::apple2_c4xx_r )
// is a card installed in this slot?
if (slotdevice != nullptr)
{
- if (slotdevice->take_c800() && (m_a2_cnxx_slot != slotnum) && (!space.debugger_access()))
+ if (slotdevice->take_c800() && (m_a2_cnxx_slot != slotnum) && (!machine().debugger_access()))
{
m_a2_cnxx_slot = slotnum;
apple2_update_memory();
@@ -672,7 +672,7 @@ WRITE8_MEMBER ( apple2_state::apple2_c4xx_w )
if (slotdevice != nullptr)
{
- if ((slotdevice->take_c800()) && (!space.debugger_access()))
+ if ((slotdevice->take_c800()) && (!machine().debugger_access()))
{
// printf("c4xx_w: taking cnxx_slot to %d\n", slotnum);
m_a2_cnxx_slot = slotnum;
@@ -690,7 +690,7 @@ WRITE8_MEMBER ( apple2_state::apple2_c4xx_w )
READ8_MEMBER(apple2_state::apple2_cfff_r)
{
// debugger guard
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
// printf("cfff_r: taking cnxx_slot to -1\n");
m_a2_cnxx_slot = -1;
@@ -702,7 +702,7 @@ READ8_MEMBER(apple2_state::apple2_cfff_r)
WRITE8_MEMBER(apple2_state::apple2_cfff_w)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
// printf("cfff_w: taking cnxx_slot to -1\n");
m_a2_cnxx_slot = -1;
@@ -1745,7 +1745,7 @@ READ8_MEMBER ( apple2_state::apple2_c00x_r )
{
uint8_t result = 0;
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
/* Read the keyboard data and strobe */
g_profiler.start(PROFILER_C00X);
@@ -1799,7 +1799,7 @@ READ8_MEMBER( apple2_state::apple2_c01x_r )
{
uint8_t result = apple2_getfloatingbusvalue() & 0x7F;
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
g_profiler.start(PROFILER_C01X);
@@ -1852,7 +1852,7 @@ WRITE8_MEMBER( apple2_state::apple2_c01x_w )
READ8_MEMBER( apple2_state::apple2_c02x_r )
{
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
apple2_c02x_w(space, offset, 0, 0);
}
@@ -1883,7 +1883,7 @@ WRITE8_MEMBER( apple2_state::apple2_c02x_w )
READ8_MEMBER ( apple2_state::apple2_c03x_r )
{
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
if (!offset)
{
@@ -1915,7 +1915,7 @@ WRITE8_MEMBER ( apple2_state::apple2_c03x_w )
READ8_MEMBER ( apple2_state::apple2_c05x_r )
{
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
uint32_t mask;
@@ -1963,7 +1963,7 @@ WRITE8_MEMBER ( apple2_state::apple2_c05x_w )
READ8_MEMBER ( apple2_state::apple2_c06x_r )
{
int result = 0;
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
switch (offset & 0x0F)
{
@@ -2026,7 +2026,7 @@ READ8_MEMBER ( apple2_state::apple2_c06x_r )
READ8_MEMBER ( apple2_state::apple2_c07x_r )
{
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
double x_calibration = attotime::from_usec(12).as_double();
double y_calibration = attotime::from_usec(13).as_double();
diff --git a/src/mame/machine/apple2gs.cpp b/src/mame/machine/apple2gs.cpp
index 3e20664986f..0115cde6937 100644
--- a/src/mame/machine/apple2gs.cpp
+++ b/src/mame/machine/apple2gs.cpp
@@ -896,7 +896,7 @@ READ8_MEMBER( apple2gs_state::apple2gs_c0xx_r )
{
uint8_t result;
- if(space.debugger_access())
+ if(machine().debugger_access())
{
return 0;
}
@@ -1671,7 +1671,7 @@ uint8_t apple2gs_state::apple2gs_xxCxxx_r(address_space &space, offs_t address)
slotdevice = nullptr;
// if CFFF accessed, reset C800 area to internal ROM
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
if ((address & 0xfff) == 0xfff)
{
@@ -1705,7 +1705,7 @@ void apple2gs_state::apple2gs_xxCxxx_w(address_space &space, offs_t address, uin
int slot;
// if CFFF accessed, reset C800 area to internal ROM
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
if ((address & 0xfff) == 0xfff)
{
diff --git a/src/mame/machine/apple3.cpp b/src/mame/machine/apple3.cpp
index 238e0f46f27..daa626a3e0d 100644
--- a/src/mame/machine/apple3.cpp
+++ b/src/mame/machine/apple3.cpp
@@ -787,7 +787,7 @@ READ8_MEMBER(apple3_state::apple3_memory_r)
uint8_t rv = 0xff;
// (zp), y or (zp,x) read
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
if ((m_indir_bank & 0x80) && (offset >= 0x100))
{
@@ -831,7 +831,7 @@ READ8_MEMBER(apple3_state::apple3_memory_r)
{
if (m_via_0_a & ENV_IOENABLE)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
rv = apple3_c0xx_r(space, offset-0xc000);
}
@@ -956,7 +956,7 @@ WRITE8_MEMBER(apple3_state::apple3_memory_w)
{
if (m_via_0_a & ENV_IOENABLE)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
apple3_c0xx_w(space, offset-0xc000, data);
}
@@ -1048,14 +1048,14 @@ WRITE8_MEMBER(apple3_state::apple3_memory_w)
}
else if (offset >= 0xffd0 && offset <= 0xffdf)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
m_via_0->write(space, offset, data);
}
}
else if (offset >= 0xffe0 && offset <= 0xffef)
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
m_via_1->write(space, offset, data);
}
diff --git a/src/mame/machine/isbc_215g.cpp b/src/mame/machine/isbc_215g.cpp
index e94622e9367..0f7b084955d 100644
--- a/src/mame/machine/isbc_215g.cpp
+++ b/src/mame/machine/isbc_215g.cpp
@@ -132,7 +132,7 @@ READ16_MEMBER(isbc_215g_device::io_r)
break;
case 0x0c:
// reset channel 2
- if(space.debugger_access()) // reading this is bad
+ if(machine().debugger_access()) // reading this is bad
break;
m_dmac->sel_w(1);
m_dmac->ca_w(1);
@@ -294,7 +294,7 @@ WRITE16_MEMBER(isbc_215g_device::io_w)
READ16_MEMBER(isbc_215g_device::mem_r)
{
// XXX: hack to permit debugger to disassemble rom
- if(space.debugger_access() && (offset < 0x1fff))
+ if(machine().debugger_access() && (offset < 0x1fff))
return m_dmac->space(AS_IO).read_word_unaligned(offset*2);
switch(offset)
diff --git a/src/mame/machine/msx_matsushita.cpp b/src/mame/machine/msx_matsushita.cpp
index 3c6db780f42..3a00b2d793a 100644
--- a/src/mame/machine/msx_matsushita.cpp
+++ b/src/mame/machine/msx_matsushita.cpp
@@ -85,7 +85,7 @@ READ8_MEMBER(msx_matsushita_device::switched_read)
{
uint8_t result = (((m_pattern & 0x80) ? m_nibble1 : m_nibble2) << 4) | ((m_pattern & 0x40) ? m_nibble1 : m_nibble2);
- if (!space.debugger_access())
+ if (!machine().debugger_access())
m_pattern = (m_pattern << 2) | (m_pattern >> 6);
return result;
diff --git a/src/mame/machine/msx_s1985.cpp b/src/mame/machine/msx_s1985.cpp
index 6096b6a9f76..77c871e9a6d 100644
--- a/src/mame/machine/msx_s1985.cpp
+++ b/src/mame/machine/msx_s1985.cpp
@@ -67,7 +67,7 @@ READ8_MEMBER(msx_s1985_device::switched_read)
// Pattern and foreground/background color read
uint8_t data = (m_pattern & 0x80) ? m_color2 : m_color1;
- if(!space.debugger_access())
+ if(!machine().debugger_access())
m_pattern = (m_pattern << 1) | (m_pattern >> 7);
return data;
diff --git a/src/mame/machine/n64.cpp b/src/mame/machine/n64.cpp
index 2e38a7e2815..d12c726edb7 100644
--- a/src/mame/machine/n64.cpp
+++ b/src/mame/machine/n64.cpp
@@ -2656,7 +2656,7 @@ WRITE32_MEMBER( n64_periphs::dd_reg_w )
READ32_MEMBER( n64_periphs::pif_ram_r )
{
- if(!space.debugger_access())
+ if(!machine().debugger_access())
{
if( offset == ( 0x24 / 4 ) )
{
diff --git a/src/mame/machine/osborne1.cpp b/src/mame/machine/osborne1.cpp
index cd649cef91a..039758b7868 100644
--- a/src/mame/machine/osborne1.cpp
+++ b/src/mame/machine/osborne1.cpp
@@ -102,7 +102,7 @@ WRITE8_MEMBER( osborne1_state::videoram_w )
READ8_MEMBER( osborne1_state::opcode_r )
{
- if (!space.debugger_access())
+ if (!machine().debugger_access())
{
// Update the flipflops that control bank selection and NMI
uint8_t const new_ub6a_q = (m_btn_reset->read() & 0x80) ? 1 : 0;
@@ -116,12 +116,7 @@ READ8_MEMBER( osborne1_state::opcode_r )
}
// Now that's sorted out we can call the normal read handler
- address_space &program_space(m_maincpu->space(AS_PROGRAM));
- bool const prev_debugger_access(program_space.debugger_access());
- program_space.set_debugger_access(space.debugger_access());
- uint8_t const data(program_space.read_byte(offset));
- program_space.set_debugger_access(prev_debugger_access);
- return data;
+ return m_maincpu->space(AS_PROGRAM).read_byte(offset);
}
WRITE8_MEMBER( osborne1_state::bankswitch_w )
diff --git a/src/mame/machine/saturn.cpp b/src/mame/machine/saturn.cpp
index 37b7a92ac84..4aae0910fb7 100644
--- a/src/mame/machine/saturn.cpp
+++ b/src/mame/machine/saturn.cpp
@@ -232,26 +232,26 @@ READ32_MEMBER(saturn_state::saturn_scu_r)
{
case 0x5c/4:
// Super Major League and Shin Megami Tensei - Akuma Zensho reads from there (undocumented), DMA status mirror?
- if(LOG_SCU && !space.debugger_access()) logerror("(PC=%08x) DMA status reg read\n",space.device().safe_pc());
+ if(LOG_SCU && !machine().debugger_access()) logerror("(PC=%08x) DMA status reg read\n",space.device().safe_pc());
res = m_scu.status;
break;
case 0x7c/4:
- if(LOG_SCU && !space.debugger_access()) logerror("(PC=%08x) DMA status reg read\n",space.device().safe_pc());
+ if(LOG_SCU && !machine().debugger_access()) logerror("(PC=%08x) DMA status reg read\n",space.device().safe_pc());
res = m_scu.status;
break;
case 0x80/4:
res = m_scudsp->program_control_r(space, 0, mem_mask);
break;
case 0x8c/4:
- if(LOG_SCU && !space.debugger_access()) logerror( "DSP mem read at %08X\n", m_scu_regs[34]);
+ if(LOG_SCU && !machine().debugger_access()) logerror( "DSP mem read at %08X\n", m_scu_regs[34]);
res = m_scudsp->ram_address_r(space, 0, mem_mask);
break;
case 0xa0/4:
- if(LOG_SCU && !space.debugger_access()) logerror("(PC=%08x) IRQ mask reg read %08x MASK=%08x\n",space.device().safe_pc(),mem_mask,m_scu_regs[0xa0/4]);
+ if(LOG_SCU && !machine().debugger_access()) logerror("(PC=%08x) IRQ mask reg read %08x MASK=%08x\n",space.device().safe_pc(),mem_mask,m_scu_regs[0xa0/4]);
res = m_scu.ism;
break;
case 0xa4/4:
- if(LOG_SCU && !space.debugger_access()) logerror("(PC=%08x) IRQ status reg read MASK=%08x IST=%08x | ISM=%08x\n",space.device().safe_pc(),mem_mask,m_scu.ist,m_scu.ism);
+ if(LOG_SCU && !machine().debugger_access()) logerror("(PC=%08x) IRQ status reg read MASK=%08x IST=%08x | ISM=%08x\n",space.device().safe_pc(),mem_mask,m_scu.ist,m_scu.ism);
/* TODO: Bug! trips an HW fault. Basically, it tries to read the IST bit 1 with that irq enabled.
Densetsu no Ogre Battle doesn't like this, so it needs investigation ...
*/
@@ -259,11 +259,11 @@ READ32_MEMBER(saturn_state::saturn_scu_r)
res = m_scu.ist;
break;
case 0xc8/4:
- if(LOG_SCU && !space.debugger_access()) logerror("(PC=%08x) SCU version reg read\n",space.device().safe_pc());
+ if(LOG_SCU && !machine().debugger_access()) logerror("(PC=%08x) SCU version reg read\n",space.device().safe_pc());
res = 0x00000004;/*SCU Version 4, OK? */
break;
default:
- if(LOG_SCU && !space.debugger_access()) logerror("(PC=%08x) SCU reg read at %d = %08x\n",space.device().safe_pc(),offset,m_scu_regs[offset]);
+ if(LOG_SCU && !machine().debugger_access()) logerror("(PC=%08x) SCU reg read at %d = %08x\n",space.device().safe_pc(),offset,m_scu_regs[offset]);
res = m_scu_regs[offset];
break;
}
diff --git a/src/mame/machine/thomson.cpp b/src/mame/machine/thomson.cpp
index 95387a7668a..65a35c4fb45 100644
--- a/src/mame/machine/thomson.cpp
+++ b/src/mame/machine/thomson.cpp
@@ -462,7 +462,7 @@ READ8_MEMBER( thomson_state::to7_cartridge_r )
{
uint8_t* pos = memregion( "maincpu" )->base() + 0x10000;
uint8_t data = pos[offset + (m_thom_cart_bank % m_thom_cart_nb_banks) * 0x4000];
- if ( !space.debugger_access() )
+ if ( !machine().debugger_access() )
{
m_thom_cart_bank = offset & 3;
to7_update_cart_bank();
@@ -759,7 +759,7 @@ void thomson_state::to7_modem_init()
READ8_MEMBER( thomson_state::to7_modem_mea8000_r )
{
- if ( space.debugger_access() )
+ if ( machine().debugger_access() )
{
return 0;
}
@@ -1632,7 +1632,7 @@ READ8_MEMBER( thomson_state::mo5_cartridge_r )
{
uint8_t* pos = memregion( "maincpu" )->base() + 0x10000;
uint8_t data = pos[offset + 0xbffc + (m_thom_cart_bank % m_thom_cart_nb_banks) * 0x4000];
- if ( !space.debugger_access() )
+ if ( !machine().debugger_access() )
{
m_thom_cart_bank = offset & 3;
mo5_update_cart_bank();
@@ -1856,7 +1856,7 @@ READ8_MEMBER( thomson_state::to9_vreg_r )
case 0: /* palette data */
{
uint8_t c = m_to9_palette_data[ m_to9_palette_idx ];
- if ( !space.debugger_access() )
+ if ( !machine().debugger_access() )
{
m_to9_palette_idx = ( m_to9_palette_idx + 1 ) & 31;
}
@@ -2036,7 +2036,7 @@ READ8_MEMBER( thomson_state::to9_cartridge_r )
{
uint8_t* pos = memregion( "maincpu" )->base() + 0x10000;
uint8_t data = pos[offset + (m_thom_cart_bank % m_thom_cart_nb_banks) * 0x4000];
- if ( !space.debugger_access() )
+ if ( !machine().debugger_access() )
{
m_thom_cart_bank = offset & 3;
to9_update_cart_bank();
@@ -2190,7 +2190,7 @@ READ8_MEMBER( thomson_state::to9_kbd_r )
return m_to9_kbd_status;
case 1: /* get input data */
- if ( !space.debugger_access() )
+ if ( !machine().debugger_access() )
{
m_to9_kbd_status &= ~(ACIA_6850_irq | ACIA_6850_PE);
if ( m_to9_kbd_overrun )
@@ -3241,7 +3241,7 @@ READ8_MEMBER( thomson_state::to8_cartridge_r )
{
uint8_t* pos = memregion( "maincpu" )->base() + 0x10000;
uint8_t data = pos[offset + (m_thom_cart_bank % m_thom_cart_nb_banks) * 0x4000];
- if ( !space.debugger_access() )
+ if ( !machine().debugger_access() )
{
m_thom_cart_bank = offset & 3;
to8_update_cart_bank();
@@ -3275,7 +3275,7 @@ void thomson_state::to8_floppy_reset()
READ8_MEMBER( thomson_state::to8_floppy_r )
{
- if ( space.debugger_access() )
+ if ( machine().debugger_access() )
return 0;
if ( (m_to8_reg_sys1 & 0x80) && THOM_FLOPPY_EXT )
@@ -3334,7 +3334,7 @@ READ8_MEMBER( thomson_state::to8_gatearray_r )
case 1: /* ram register / lightpen register 2 */
if ( m_to7_lightpen )
{
- if ( !space.debugger_access() )
+ if ( !machine().debugger_access() )
{
thom_firq_2( 0 );
m_to8_lightpen_intr = 0;
@@ -3419,7 +3419,7 @@ READ8_MEMBER( thomson_state::to8_vreg_r )
/* 0xe7dc from external floppy drive aliases the video gate-array */
if ( ( offset == 3 ) && ( m_to8_reg_ram & 0x80 ) && ( m_to8_reg_sys1 & 0x80 ) )
{
- if ( space.debugger_access() )
+ if ( machine().debugger_access() )
return 0;
if ( THOM_FLOPPY_EXT )
@@ -3433,7 +3433,7 @@ READ8_MEMBER( thomson_state::to8_vreg_r )
case 0: /* palette data */
{
uint8_t c = m_to9_palette_data[ m_to9_palette_idx ];
- if ( !space.debugger_access() )
+ if ( !machine().debugger_access() )
{
m_to9_palette_idx = ( m_to9_palette_idx + 1 ) & 31;
}
@@ -4115,7 +4115,7 @@ READ8_MEMBER( thomson_state::mo6_cartridge_r )
{
uint8_t* pos = memregion( "maincpu" )->base() + 0x10000;
uint8_t data = pos[offset + 0xbffc + (m_thom_cart_bank % m_thom_cart_nb_banks) * 0x4000];
- if ( !space.debugger_access() )
+ if ( !machine().debugger_access() )
{
m_thom_cart_bank = offset & 3;
mo6_update_cart_bank();
@@ -4289,7 +4289,7 @@ READ8_MEMBER( thomson_state::mo6_gatearray_r )
case 1: /* ram register / lightpen register 2 */
if ( m_to7_lightpen )
{
- if ( !space.debugger_access() )
+ if ( !machine().debugger_access() )
{
thom_firq_2( 0 );
m_to8_lightpen_intr = 0;
@@ -4371,7 +4371,7 @@ READ8_MEMBER( thomson_state::mo6_vreg_r )
/* 0xa7dc from external floppy drive aliases the video gate-array */
if ( ( offset == 3 ) && ( m_to8_reg_ram & 0x80 ) )
{
- if ( !space.debugger_access() )
+ if ( !machine().debugger_access() )
return to7_floppy_r( space, 0xc );
}
@@ -4552,7 +4552,7 @@ MACHINE_START_MEMBER( thomson_state, mo6 )
READ8_MEMBER( thomson_state::mo5nr_net_r )
{
- if ( space.debugger_access() )
+ if ( machine().debugger_access() )
return 0;
if ( to7_controller_type )
diff --git a/src/mame/machine/z80ne.cpp b/src/mame/machine/z80ne.cpp
index 571dae53262..abfeda0ab0d 100644
--- a/src/mame/machine/z80ne.cpp
+++ b/src/mame/machine/z80ne.cpp
@@ -179,12 +179,11 @@ DIRECT_UPDATE_MEMBER(z80ne_state::z80ne_nmi_delay_count)
*/
DIRECT_UPDATE_MEMBER(z80ne_state::z80ne_reset_delay_count)
{
- address_space &space = m_maincpu->space(AS_PROGRAM);
/*
* TODO: when debugger is active, his memory access causes this callback
*
*/
- if(!space.debugger_access())
+ if(!machine().debugger_access())
m_reset_delay_counter--;
if (!m_reset_delay_counter)
diff --git a/src/mame/video/zx.cpp b/src/mame/video/zx.cpp
index 197e1cd0120..36947d975af 100644
--- a/src/mame/video/zx.cpp
+++ b/src/mame/video/zx.cpp
@@ -94,7 +94,7 @@ void zx_state::recalc_hsync()
READ8_MEMBER(zx_state::ula_low_r)
{
uint8_t cdata = m_program->read_byte(offset);
- if(space.debugger_access())
+ if(machine().debugger_access())
return cdata;
if(m_maincpu->state_int(Z80_HALT))
@@ -113,7 +113,7 @@ READ8_MEMBER(zx_state::ula_high_r)
{
uint8_t cdata = m_program->read_byte(offset);
- if(space.debugger_access())
+ if(machine().debugger_access())
return cdata;
if(m_maincpu->state_int(Z80_HALT))