From 5e30a7bfd8d5da214a1230803a23ac549c8c13ee Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Tue, 18 Feb 2020 23:29:30 -0800 Subject: [PATCH] GBA BIOS: Fix register clobbering in HLE Halt --- src/gba/hle-bios.c | 4 ++-- src/gba/hle-bios.s | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gba/hle-bios.c b/src/gba/hle-bios.c index 920f7b92f..8422f629d 100644 --- a/src/gba/hle-bios.c +++ b/src/gba/hle-bios.c @@ -39,8 +39,8 @@ const uint8_t hleBios[SIZE_BIOS] = { 0x00, 0xe0, 0x8f, 0xe2, 0x04, 0xf0, 0x10, 0xe5, 0x0f, 0x50, 0xbd, 0xe8, 0x04, 0xf0, 0x5e, 0xe2, 0x00, 0x00, 0x00, 0x00, 0x02, 0xc0, 0x5e, 0xe5, 0x04, 0xf0, 0x5e, 0xe2, 0x00, 0x00, 0x00, 0x00, 0x04, 0xe0, 0xa0, 0x03, - 0x1e, 0xff, 0x2f, 0xe1, 0x00, 0x20, 0xa0, 0xe3, 0x01, 0xc3, 0xa0, 0xe3, - 0x01, 0x23, 0xcc, 0xe5, 0x1e, 0xff, 0x2f, 0xe1, 0x01, 0x00, 0xa0, 0xe3, + 0x1e, 0xff, 0x2f, 0xe1, 0x00, 0xb0, 0xa0, 0xe3, 0x01, 0xc3, 0xa0, 0xe3, + 0x01, 0xb3, 0xcc, 0xe5, 0x1e, 0xff, 0x2f, 0xe1, 0x01, 0x00, 0xa0, 0xe3, 0x01, 0x10, 0xa0, 0xe3, 0x0c, 0x40, 0x2d, 0xe9, 0x01, 0xc3, 0xa0, 0xe3, 0x00, 0x00, 0x50, 0xe3, 0x00, 0x00, 0xa0, 0xe3, 0x01, 0x20, 0xa0, 0xe3, 0x03, 0x00, 0x00, 0x0a, 0xb8, 0x30, 0x5c, 0xe1, 0x01, 0x30, 0xc3, 0xe1, diff --git a/src/gba/hle-bios.s b/src/gba/hle-bios.s index e8902cc69..e14e2d4c4 100644 --- a/src/gba/hle-bios.s +++ b/src/gba/hle-bios.s @@ -170,9 +170,9 @@ NopCall: bx lr Halt: -mov r2, #0 +mov r11, #0 mov r12, #0x04000000 -strb r2, [r12, #0x301] +strb r11, [r12, #0x301] bx lr VBlankIntrWait: