From a44737c1876a7ad906d45e4ab65bd97f29366a05 Mon Sep 17 00:00:00 2001 From: notaz Date: Wed, 23 Sep 2009 21:32:20 +0000 Subject: [PATCH] 32x: change ppc handling for better logging git-svn-id: file:///home/notaz/opt/svn/PicoDrive@791 be3aeb3a-fb24-0410-a615-afba39da0efa --- cpu/sh2mame/sh2.c | 4 ++-- cpu/sh2mame/sh2pico.c | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cpu/sh2mame/sh2.c b/cpu/sh2mame/sh2.c index c4666454..1fb6fc43 100644 --- a/cpu/sh2mame/sh2.c +++ b/cpu/sh2mame/sh2.c @@ -367,7 +367,7 @@ INLINE void BRA(UINT32 d) #if BUSY_LOOP_HACKS if (disp == -2) { - UINT32 next_opcode = RW(sh2->ppc & AM); + UINT32 next_opcode = RW(sh2->pc & AM); /* BRA $ * NOP */ @@ -795,7 +795,7 @@ INLINE void DT(UINT32 n) sh2->sr &= ~T; #if BUSY_LOOP_HACKS { - UINT32 next_opcode = RW(sh2->ppc & AM); + UINT32 next_opcode = RW(sh2->pc & AM); /* DT Rn * BF $-2 */ diff --git a/cpu/sh2mame/sh2pico.c b/cpu/sh2mame/sh2pico.c index 414985c4..463261ec 100644 --- a/cpu/sh2mame/sh2pico.c +++ b/cpu/sh2mame/sh2pico.c @@ -71,15 +71,18 @@ int sh2_execute(SH2 *sh2_, int cycles) if (sh2->delay) { + sh2->ppc = sh2->delay; opcode = RW(sh2->delay); sh2->pc -= 2; } else + { + sh2->ppc = sh2->pc; opcode = RW(sh2->pc); + } sh2->delay = 0; sh2->pc += 2; - sh2->ppc = sh2->pc; switch (opcode & ( 15 << 12)) { -- 2.39.5