From 22e7eff33cd2b2a42f4422acf51fa79c1ed64222 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Wed, 26 Nov 2014 00:34:28 -0800 Subject: [PATCH] GBA BIOS: Clear BIOS-acknowledged interrupt flag before IntrWait --- src/gba/hle-bios.c | 5 +++-- src/gba/hle-bios.s | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gba/hle-bios.c b/src/gba/hle-bios.c index 1e08acaa3..dc79d1d9b 100644 --- a/src/gba/hle-bios.c +++ b/src/gba/hle-bios.c @@ -17,12 +17,13 @@ const uint8_t hleBios[SIZE_BIOS] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0c, 0x01, 0x00, 0x00, 0x9c, 0x01, 0x00, 0x00, 0x0f, 0x50, 0x2d, 0xe9, + 0x18, 0x01, 0x00, 0x00, 0xa8, 0x01, 0x00, 0x00, 0x0f, 0x50, 0x2d, 0xe9, 0x01, 0x03, 0xa0, 0xe3, 0x00, 0xe0, 0x8f, 0xe2, 0x04, 0xf0, 0x10, 0xe5, 0x0f, 0x50, 0xbd, 0xe8, 0x04, 0xf0, 0x5e, 0xe2, 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, - 0x00, 0x00, 0x00, 0x0a, 0x01, 0x03, 0xcc, 0xe5, 0x08, 0x02, 0xcc, 0xe5, + 0x03, 0x00, 0x00, 0x0a, 0xb8, 0x30, 0x5c, 0xe1, 0x01, 0x30, 0xc3, 0xe1, + 0xb8, 0x30, 0x4c, 0xe1, 0x01, 0x03, 0xcc, 0xe5, 0x08, 0x02, 0xcc, 0xe5, 0xb8, 0x30, 0x5c, 0xe1, 0x01, 0x30, 0x13, 0xe0, 0x01, 0x30, 0x23, 0x10, 0xb8, 0x30, 0x4c, 0x11, 0x08, 0x22, 0xcc, 0xe5, 0xf7, 0xff, 0xff, 0x0a, 0x0c, 0x80, 0xbd, 0xe8, 0x00, 0x40, 0x2d, 0xe9, 0x02, 0x36, 0xa0, 0xe1, diff --git a/src/gba/hle-bios.s b/src/gba/hle-bios.s index 653bcfb8b..0d6478f4f 100644 --- a/src/gba/hle-bios.s +++ b/src/gba/hle-bios.s @@ -73,6 +73,9 @@ cmp r0, #0 mov r0, #0 mov r2, #1 beq 1f +ldrh r3, [r12, #-8] +bic r3, r1 +strh r3, [r12, #-8] # Halt 0: strb r0, [r12, #0x301]