summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/arm7/arm7thmb.cpp
diff options
context:
space:
mode:
author Firehawke <Firehawke@users.noreply.github.com>2017-12-13 21:31:27 -0700
committer Firehawke <Firehawke@users.noreply.github.com>2017-12-13 21:31:27 -0700
commit9ece34eb218c5c1960468294c733fd00ac7fa696 (patch)
tree7160ed8d2cbe2127aaaef0a21f8736403b0f8a7c /src/devices/cpu/arm7/arm7thmb.cpp
parent54155441e9ba9941e85d80c4834a66376a11e791 (diff)
Revert "Revert "Merge branch 'master' of https://github.com/mamedev/mame""
This reverts commit 54155441e9ba9941e85d80c4834a66376a11e791.
Diffstat (limited to 'src/devices/cpu/arm7/arm7thmb.cpp')
-rw-r--r--src/devices/cpu/arm7/arm7thmb.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/devices/cpu/arm7/arm7thmb.cpp b/src/devices/cpu/arm7/arm7thmb.cpp
index 0d25d62fcf3..a6fe0400721 100644
--- a/src/devices/cpu/arm7/arm7thmb.cpp
+++ b/src/devices/cpu/arm7/arm7thmb.cpp
@@ -1307,8 +1307,7 @@ void arm7_cpu_device::tg0b_f(uint32_t pc, uint32_t op)
// "The address should normally be a word aligned quantity and non-word aligned addresses do not affect the instruction."
// "However, the bottom 2 bits of the address will appear on A[1:0] and might be interpreted by the memory system."
-// GBA "BB Ball" performs an unaligned read with A[1:0] = 2 and expects A[1] not to be ignored [BP 800B90A,(R4&3)!=0]
-// GBA "Gadget Racers" performs an unaligned read with A[1:0] = 1 and expects A[0] to be ignored [BP B72,(R0&3)!=0]
+// Endrift says LDMIA/STMIA ignore the low 2 bits and GBA Test Suite assumes it.
void arm7_cpu_device::tg0c_0(uint32_t pc, uint32_t op) /* Store */
{
@@ -1335,7 +1334,7 @@ void arm7_cpu_device::tg0c_1(uint32_t pc, uint32_t op) /* Load */
{
if (op & (1 << offs))
{
- SetRegister(offs, READ32(ld_st_address & ~1));
+ SetRegister(offs, READ32(ld_st_address & ~3));
ld_st_address += 4;
}
}