summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/megadrive/rom.cpp
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2017-12-30 14:04:05 +0100
committer Olivier Galibert <galibert@pobox.com>2017-12-30 14:04:21 +0100
commit35fffe0d2e847c6c1ecf6a6467535c15efd250bb (patch)
tree9b15eec6ea02d0f16e52c60919ee1248ef1cb6d0 /src/devices/bus/megadrive/rom.cpp
parent62aef15114ff476cfeb14da5281f8128f5ad3a76 (diff)
Remove a bunch of space.device().safe_pc() from devices (nw)
Diffstat (limited to 'src/devices/bus/megadrive/rom.cpp')
-rw-r--r--src/devices/bus/megadrive/rom.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/devices/bus/megadrive/rom.cpp b/src/devices/bus/megadrive/rom.cpp
index b508b67a036..ac54cfcc8fd 100644
--- a/src/devices/bus/megadrive/rom.cpp
+++ b/src/devices/bus/megadrive/rom.cpp
@@ -628,47 +628,47 @@ READ16_MEMBER(md_rom_chinf3_device::read)
04dc10 chifi3, prot_r? 2800
04cefa chifi3, prot_r? 65262
*/
- if (machine().device("maincpu")->safe_pc() == 0x01782) // makes 'VS' screen appear
+ if (machine().device<cpu_device>("maincpu")->pc() == 0x01782) // makes 'VS' screen appear
{
- retdat = machine().device("maincpu")->state().state_int(M68K_D3) & 0xff;
+ retdat = machine().device<cpu_device>("maincpu")->state_int(M68K_D3) & 0xff;
retdat <<= 8;
return retdat;
}
- else if (machine().device("maincpu")->safe_pc() == 0x1c24) // background gfx etc.
+ else if (machine().device<cpu_device>("maincpu")->pc() == 0x1c24) // background gfx etc.
{
- retdat = machine().device("maincpu")->state().state_int(M68K_D3) & 0xff;
+ retdat = machine().device<cpu_device>("maincpu")->state_int(M68K_D3) & 0xff;
retdat <<= 8;
return retdat;
}
- else if (machine().device("maincpu")->safe_pc() == 0x10c4a) // unknown
+ else if (machine().device<cpu_device>("maincpu")->pc() == 0x10c4a) // unknown
{
return machine().rand();
}
- else if (machine().device("maincpu")->safe_pc() == 0x10c50) // unknown
+ else if (machine().device<cpu_device>("maincpu")->pc() == 0x10c50) // unknown
{
return machine().rand();
}
- else if (machine().device("maincpu")->safe_pc() == 0x10c52) // relates to the game speed..
+ else if (machine().device<cpu_device>("maincpu")->pc() == 0x10c52) // relates to the game speed..
{
- retdat = machine().device("maincpu")->state().state_int(M68K_D4) & 0xff;
+ retdat = machine().device<cpu_device>("maincpu")->state_int(M68K_D4) & 0xff;
retdat <<= 8;
return retdat;
}
- else if (machine().device("maincpu")->safe_pc() == 0x061ae)
+ else if (machine().device<cpu_device>("maincpu")->pc() == 0x061ae)
{
- retdat = machine().device("maincpu")->state().state_int(M68K_D3) & 0xff;
+ retdat = machine().device<cpu_device>("maincpu")->state_int(M68K_D3) & 0xff;
retdat <<= 8;
return retdat;
}
- else if (machine().device("maincpu")->safe_pc() == 0x061b0)
+ else if (machine().device<cpu_device>("maincpu")->pc() == 0x061b0)
{
- retdat = machine().device("maincpu")->state().state_int(M68K_D3) & 0xff;
+ retdat = machine().device<cpu_device>("maincpu")->state_int(M68K_D3) & 0xff;
retdat <<= 8;
return retdat;
}
else
{
- logerror("%06x chifi3, prot_r? %04x\n", machine().device("maincpu")->safe_pc(), offset);
+ logerror("%06x chifi3, prot_r? %04x\n", machine().device<cpu_device>("maincpu")->pc(), offset);
}
return 0;
}
@@ -693,7 +693,7 @@ WRITE16_MEMBER(md_rom_chinf3_device::write)
else if (data == 0x0000)
m_bank = 0;
else
- logerror("%06x chifi3, bankw? %04x %04x\n", space.device().safe_pc(), offset, data);
+ logerror("%06x chifi3, bankw? %04x %04x\n", machine().device<cpu_device>("maincpu")->pc(), offset, data);
}
}
@@ -1293,22 +1293,22 @@ READ16_MEMBER(md_rom_topf_device::read)
cpu #0 (PC=001771A2): unmapped program memory word read from 006BD294 & 00FF
*/
- if (space.device().safe_pc()==0x1771a2) return 0x50;
+ if (machine().device<cpu_device>("maincpu")->pc()==0x1771a2) return 0x50;
else
{
m_latch++;
- logerror("%06x topfig_6BD294_r %04x\n",space.device().safe_pc(), m_latch);
+ logerror("%06x topfig_6BD294_r %04x\n",machine().device<cpu_device>("maincpu")->pc(), m_latch);
return m_latch;
}
}
if (offset == 0x6f5344/2)
{
- if (space.device().safe_pc()==0x4C94E)
- return machine().device("maincpu")->state().state_int((M68K_D0)) & 0xff;
+ if (machine().device<cpu_device>("maincpu")->pc()==0x4C94E)
+ return machine().device<cpu_device>("maincpu")->state_int((M68K_D0)) & 0xff;
else
{
m_latch++;
- logerror("%06x topfig_6F5344_r %04x\n", space.device().safe_pc(), m_latch);
+ logerror("%06x topfig_6F5344_r %04x\n", machine().device<cpu_device>("maincpu")->pc(), m_latch);
return m_latch;
}
}
@@ -1346,7 +1346,7 @@ WRITE16_MEMBER(md_rom_topf_device::write)
m_bank[2] = 0;
}
else
- logerror("%06x offset %06x, data %04x\n", space.device().safe_pc(), offset, data);
+ logerror("%06x offset %06x, data %04x\n", machine().device<cpu_device>("maincpu")->pc(), offset, data);
}
}