summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/neogeo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/neogeo.c')
-rw-r--r--src/mame/drivers/neogeo.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/mame/drivers/neogeo.c b/src/mame/drivers/neogeo.c
index 34fb3f86138..40bfe45b2ee 100644
--- a/src/mame/drivers/neogeo.c
+++ b/src/mame/drivers/neogeo.c
@@ -224,7 +224,7 @@ void neogeo_set_display_counter_msb( address_space *space, UINT16 data )
state->m_display_counter = (state->m_display_counter & 0x0000ffff) | ((UINT32)data << 16);
- if (LOG_VIDEO_SYSTEM) logerror("PC %06x: set_display_counter %08x\n", cpu_get_pc(&space->device()), state->m_display_counter);
+ if (LOG_VIDEO_SYSTEM) logerror("PC %06x: set_display_counter %08x\n", space->device().safe_pc(), state->m_display_counter);
}
@@ -234,7 +234,7 @@ void neogeo_set_display_counter_lsb( address_space *space, UINT16 data )
state->m_display_counter = (state->m_display_counter & 0xffff0000) | data;
- if (LOG_VIDEO_SYSTEM) logerror("PC %06x: set_display_counter %08x\n", cpu_get_pc(&space->device()), state->m_display_counter);
+ if (LOG_VIDEO_SYSTEM) logerror("PC %06x: set_display_counter %08x\n", space->device().safe_pc(), state->m_display_counter);
if (state->m_display_position_interrupt_control & IRQ2CTRL_LOAD_RELATIVE)
{
@@ -434,7 +434,7 @@ WRITE16_MEMBER(neogeo_state::io_control_w)
// case 0x33: break; // coui lockout
default:
- logerror("PC: %x Unmapped I/O control write. Offset: %x Data: %x\n", cpu_get_pc(&space.device()), offset, data);
+ logerror("PC: %x Unmapped I/O control write. Offset: %x Data: %x\n", space.device().safe_pc(), offset, data);
break;
}
}
@@ -460,7 +460,7 @@ READ16_MEMBER(neogeo_state::neogeo_unmapped_r)
else
{
m_recurse = 1;
- ret = space.read_word(cpu_get_pc(&space.device()));
+ ret = space.read_word(space.device().safe_pc());
m_recurse = 0;
}
@@ -583,7 +583,7 @@ WRITE16_MEMBER(neogeo_state::audio_command_w)
/* boost the interleave to let the audio CPU read the command */
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(50));
- if (LOG_CPU_COMM) logerror("MAIN CPU PC %06x: audio_command_w %04x - %04x\n", cpu_get_pc(&space.device()), data, mem_mask);
+ if (LOG_CPU_COMM) logerror("MAIN CPU PC %06x: audio_command_w %04x - %04x\n", space.device().safe_pc(), data, mem_mask);
}
}
@@ -592,7 +592,7 @@ READ8_MEMBER(neogeo_state::audio_command_r)
{
UINT8 ret = soundlatch_byte_r(space, 0);
- if (LOG_CPU_COMM) logerror(" AUD CPU PC %04x: audio_command_r %02x\n", cpu_get_pc(&space.device()), ret);
+ if (LOG_CPU_COMM) logerror(" AUD CPU PC %04x: audio_command_r %02x\n", space.device().safe_pc(), ret);
/* this is a guess */
audio_cpu_clear_nmi_w(space, 0, 0);
@@ -604,7 +604,7 @@ READ8_MEMBER(neogeo_state::audio_command_r)
WRITE8_MEMBER(neogeo_state::audio_result_w)
{
- if (LOG_CPU_COMM && (m_audio_result != data)) logerror(" AUD CPU PC %04x: audio_result_w %02x\n", cpu_get_pc(&space.device()), data);
+ if (LOG_CPU_COMM && (m_audio_result != data)) logerror(" AUD CPU PC %04x: audio_result_w %02x\n", space.device().safe_pc(), data);
m_audio_result = data;
}
@@ -614,7 +614,7 @@ CUSTOM_INPUT_MEMBER(neogeo_state::get_audio_result)
{
UINT32 ret = m_audio_result;
-// if (LOG_CPU_COMM) logerror("MAIN CPU PC %06x: audio_result_r %02x\n", cpu_get_pc(machine().device("maincpu")), ret);
+// if (LOG_CPU_COMM) logerror("MAIN CPU PC %06x: audio_result_r %02x\n", machine().device("maincpu")->safe_pc(), ret);
return ret;
}
@@ -654,7 +654,7 @@ void neogeo_set_main_cpu_bank_address( address_space *space, UINT32 bank_address
{
neogeo_state *state = space->machine().driver_data<neogeo_state>();
- if (LOG_MAIN_CPU_BANKING) logerror("MAIN CPU PC %06x: neogeo_set_main_cpu_bank_address %06x\n", cpu_get_pc(&space->device()), bank_address);
+ if (LOG_MAIN_CPU_BANKING) logerror("MAIN CPU PC %06x: neogeo_set_main_cpu_bank_address %06x\n", space->device().safe_pc(), bank_address);
state->m_main_cpu_bank_address = bank_address;
@@ -668,14 +668,14 @@ WRITE16_MEMBER(neogeo_state::main_cpu_bank_select_w)
UINT32 len = memregion("maincpu")->bytes();
if ((len <= 0x100000) && (data & 0x07))
- logerror("PC %06x: warning: bankswitch to %02x but no banks available\n", cpu_get_pc(&space.device()), data);
+ logerror("PC %06x: warning: bankswitch to %02x but no banks available\n", space.device().safe_pc(), data);
else
{
bank_address = ((data & 0x07) + 1) * 0x100000;
if (bank_address >= len)
{
- logerror("PC %06x: warning: bankswitch to empty bank %02x\n", cpu_get_pc(&space.device()), data);
+ logerror("PC %06x: warning: bankswitch to empty bank %02x\n", space.device().safe_pc(), data);
bank_address = 0x100000;
}
@@ -721,7 +721,7 @@ static void audio_cpu_bank_select( address_space *space, int region, UINT8 bank
{
neogeo_state *state = space->machine().driver_data<neogeo_state>();
- if (LOG_AUDIO_CPU_BANKING) logerror("Audio CPU PC %03x: audio_cpu_bank_select: Region: %d Bank: %02x\n", cpu_get_pc(&space->device()), region, bank);
+ if (LOG_AUDIO_CPU_BANKING) logerror("Audio CPU PC %03x: audio_cpu_bank_select: Region: %d Bank: %02x\n", space->device().safe_pc(), region, bank);
state->m_audio_cpu_banks[region] = bank;
@@ -777,7 +777,7 @@ static void _set_audio_cpu_rom_source( address_space *space )
cputag_set_input_line(space->machine(), "audiocpu", INPUT_LINE_RESET, PULSE_LINE);
- if (LOG_AUDIO_CPU_BANKING) logerror("Audio CPU PC %03x: selectign %s ROM\n", cpu_get_pc(&space->device()), state->m_audio_cpu_rom_source ? "CARTRIDGE" : "BIOS");
+ if (LOG_AUDIO_CPU_BANKING) logerror("Audio CPU PC %03x: selectign %s ROM\n", space->device().safe_pc(), state->m_audio_cpu_rom_source ? "CARTRIDGE" : "BIOS");
}
}
@@ -858,11 +858,11 @@ WRITE16_MEMBER(neogeo_state::system_control_w)
case 0x02: /* unknown - HC32 middle pin 1 */
case 0x03: /* unknown - uPD4990 pin ? */
case 0x04: /* unknown - HC32 middle pin 10 */
- logerror("PC: %x Unmapped system control write. Offset: %x Data: %x\n", cpu_get_pc(&space.device()), offset & 0x07, bit);
+ logerror("PC: %x Unmapped system control write. Offset: %x Data: %x\n", space.device().safe_pc(), offset & 0x07, bit);
break;
}
- if (LOG_VIDEO_SYSTEM && ((offset & 0x07) != 0x06)) logerror("PC: %x System control write. Offset: %x Data: %x\n", cpu_get_pc(&space.device()), offset & 0x07, bit);
+ if (LOG_VIDEO_SYSTEM && ((offset & 0x07) != 0x06)) logerror("PC: %x System control write. Offset: %x Data: %x\n", space.device().safe_pc(), offset & 0x07, bit);
}
}