From fe4f937c05243975e4fc012cf134f84a523b44d5 Mon Sep 17 00:00:00 2001 From: Sandro Ronco Date: Thu, 14 Feb 2013 18:18:36 +0000 Subject: [PATCH] Fixed H8S regression, cybikoxt now works again. (nw) --- src/emu/cpu/h83002/h8speriph.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/emu/cpu/h83002/h8speriph.c b/src/emu/cpu/h83002/h8speriph.c index 97cdb25b77d..933cde525ca 100644 --- a/src/emu/cpu/h83002/h8speriph.c +++ b/src/emu/cpu/h83002/h8speriph.c @@ -406,7 +406,6 @@ void h8s_dtce_check(h83xx_state *h8, int vecnum) void h8s_periph_reset(h83xx_state *h8) { int tpu_max = h8->tpu_max; - h8->tpu_max = tpu_max; if ((h8->device->type() == H8S2241) || (h8->device->type() == H8S2246)) { memcpy( h8->per_regs, H8S_RESET_H8S_IO_224x, sizeof( h8->per_regs)); @@ -661,8 +660,8 @@ static TIMER_CALLBACK( h8s_tmr_callback) void h8s_tpu_init(h83xx_state *h8) { - const int tpu_max = ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394) || (h8->device->type() == H8S2655)) ? 6 : 3; - for (int i = 0; i < tpu_max; i++) + h8->tpu_max = ((h8->device->type() == H8S2323) || (h8->device->type() == H8S2394) || (h8->device->type() == H8S2655)) ? 6 : 3; + for (int i = 0; i < h8->tpu_max; i++) { h8->tpu[i].timer = h8->device->machine().scheduler().timer_alloc(FUNC(h8s_tpu_callback), h8); h8->tpu[i].timer->adjust(attotime::never, i);