From e1c619230f1a71675e58e70eda1fa8850c46f17e Mon Sep 17 00:00:00 2001 From: "R. Belmont" Date: Sat, 22 Nov 2008 20:16:52 +0000 Subject: [PATCH] Un-deprecat'ed the H8. --- src/emu/cpu/h83002/h8_8.c | 3 +-- src/emu/cpu/h83002/h8periph.c | 11 +++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/emu/cpu/h83002/h8_8.c b/src/emu/cpu/h83002/h8_8.c index 77bb31080e0..35d46e38027 100644 --- a/src/emu/cpu/h83002/h8_8.c +++ b/src/emu/cpu/h83002/h8_8.c @@ -10,7 +10,6 @@ ****************************************************************************/ #include "debugger.h" -#include "deprecat.h" #include "h8.h" #include "h8priv.h" @@ -240,7 +239,7 @@ static CPU_INIT(h8bit) state_save_register_item("H8/300", device->tag, 0, h8->h8TSTR); state_save_register_item_array("H8/300", device->tag, 0, h8->h8TCNT); - state_save_register_postload(Machine, h8_onstateload, h8); + state_save_register_postload(h8->device->machine, h8_onstateload, h8); } static CPU_RESET(h8bit) diff --git a/src/emu/cpu/h83002/h8periph.c b/src/emu/cpu/h83002/h8periph.c index 6201ef80131..0d81936ac62 100644 --- a/src/emu/cpu/h83002/h8periph.c +++ b/src/emu/cpu/h83002/h8periph.c @@ -9,7 +9,6 @@ ****************************************************************************/ #include "debugger.h" -#include "deprecat.h" #include "cpuexec.h" #include "h8.h" #include "h8priv.h" @@ -98,7 +97,7 @@ static void h8_itu_refresh_timer(h83xx_state *h8, int tnum) ourTCR = h8->per_regs[tcr[tnum]]; ourTVAL = h8->h8TCNT[tnum]; - period = attotime_mul(ATTOTIME_IN_HZ(cpu_get_clock(Machine->cpu[h8->cpu_number])), tscales[ourTCR & 3] * (65536 - ourTVAL)); + period = attotime_mul(ATTOTIME_IN_HZ(cpu_get_clock(h8->device->machine->cpu[h8->cpu_number])), tscales[ourTCR & 3] * (65536 - ourTVAL)); if (ourTCR & 4) { @@ -117,7 +116,7 @@ static void h8_itu_sync_timers(h83xx_state *h8, int tnum) ourTCR = h8->per_regs[tcr[tnum]]; // get the time per unit - cycle_time = attotime_mul(ATTOTIME_IN_HZ(cpu_get_clock(Machine->cpu[h8->cpu_number])), tscales[ourTCR & 3]); + cycle_time = attotime_mul(ATTOTIME_IN_HZ(cpu_get_clock(h8->device->machine->cpu[h8->cpu_number])), tscales[ourTCR & 3]); cur = timer_timeelapsed(h8->timer[tnum]); ratio = attotime_to_double(cur) / attotime_to_double(cycle_time); @@ -455,7 +454,7 @@ static void h8_3007_itu_refresh_timer(h83xx_state *h8, int tnum) attotime period; int ourTCR = h8->per_regs[0x68+(tnum*8)]; - period = attotime_mul(ATTOTIME_IN_HZ(cpu_get_clock(Machine->cpu[h8->cpu_number])), tscales[ourTCR & 3]); + period = attotime_mul(ATTOTIME_IN_HZ(cpu_get_clock(h8->device->machine->cpu[h8->cpu_number])), tscales[ourTCR & 3]); if (ourTCR & 4) { @@ -747,7 +746,7 @@ UINT8 h8_3007_register1_read8(h83xx_state *h8, UINT32 address) case 0xfee018: return h8->per_regs[0xF8]; // IPRA } - logerror("cpu #%d (PC=%08X): unmapped I/O(1) byte read from %08X\n",cpunum_get_active(),cpu_get_pc(Machine->activecpu),address); + logerror("cpu #%d (PC=%08X): unmapped I/O(1) byte read from %08X\n",cpunum_get_active(),cpu_get_pc(h8->device->machine->activecpu),address); return 0; } @@ -759,7 +758,7 @@ void h8_3007_register1_write8(h83xx_state *h8, UINT32 address, UINT8 val) case 0xfee016: h8_ISR_w(h8, val); return; // ISR case 0xfee018: h8->per_regs[0xF8] = val; return; // IPRA } - logerror("cpu #%d (PC=%08X): unmapped I/O(1) byte write to %08X = %02X\n",cpunum_get_active(),cpu_get_pc(Machine->activecpu),address,val); + logerror("cpu #%d (PC=%08X): unmapped I/O(1) byte write to %08X = %02X\n",cpunum_get_active(),cpu_get_pc(h8->device->machine->activecpu),address,val); } void h8_3007_itu_init(h83xx_state *h8)