summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
author Scott Stone <tafoid@users.noreply.github.com>2011-10-05 01:30:01 +0000
committer Scott Stone <tafoid@users.noreply.github.com>2011-10-05 01:30:01 +0000
commit8e6dd97fda77ef339e8b9d30968c28bf40c291e2 (patch)
treea5d984ec2c884147072f3f1ea68e9503a4c16ecd /src/emu
parenta50c1fa1f906fe3a7bb2040f837e4bf016d64177 (diff)
Fixed some typos made in sh4.c - trap behavior definitely needs checking. According to both the sh3 and sh4 docs what we're doing was wrong. From Haze (nw)
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/cpu/sh4/sh4.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/emu/cpu/sh4/sh4.c b/src/emu/cpu/sh4/sh4.c
index 3aa94f92ec0..8aef285bc7c 100644
--- a/src/emu/cpu/sh4/sh4.c
+++ b/src/emu/cpu/sh4/sh4.c
@@ -1708,13 +1708,15 @@ INLINE void TRAPA(sh4_state *sh4, UINT32 i)
{
UINT32 imm = i & 0xff;
+ /* << 2 according to docs, but this doesn't seem to work any better? */
+
if (sh4->cpu_type == CPU_TYPE_SH4)
{
- sh4->m[SH3_TRA] = imm;
+ sh4->m[TRA] = imm << 2;
}
else /* SH3 */
{
- sh4->m_sh3internal_upper[SH3_TRA] = imm;
+ sh4->m_sh3internal_upper[SH3_TRA] = imm << 2;
}
@@ -1733,7 +1735,7 @@ INLINE void TRAPA(sh4_state *sh4, UINT32 i)
if (sh4->cpu_type == CPU_TYPE_SH4)
{
- sh4->m[SH3_EXPEVT] = 0x00000160;
+ sh4->m[EXPEVT] = 0x00000160;
}
else /* SH3 */
{