all repos — mgba @ 1e4a82ef5b9938ceb8901b3d3ec385ea0a656d92

mGBA Game Boy Advance Emulator

Update GBA BIOS from GBA.js
Jeffrey Pfau jeffrey@endrift.com
Thu, 18 Jul 2013 02:14:22 -0700
commit

1e4a82ef5b9938ceb8901b3d3ec385ea0a656d92

parent

6a1afbda50aa57118c752a953f1e3e741991be4a

2 files changed, 31 insertions(+), 29 deletions(-)

jump to
M src/gba/hle-bios.csrc/gba/hle-bios.c

@@ -1,6 +1,6 @@

#include "hle-bios.h" -const unsigned int hleBiosLength = 216; +const unsigned int hleBiosLength = 220; const unsigned char hleBios[] = { 0x06, 0x00, 0x00, 0xea, 0xfe, 0xff, 0xff, 0xea, 0x05, 0x00, 0x00, 0xea, 0xfe, 0xff, 0xff, 0xea, 0xfe, 0xff, 0xff, 0xea, 0x00, 0x00, 0xa0, 0xe1,

@@ -10,14 +10,15 @@ 0x00, 0x40, 0x2d, 0xe9, 0x02, 0x00, 0x5e, 0xe5, 0x04, 0x00, 0x50, 0xe3,

0x09, 0x00, 0x00, 0x0b, 0x05, 0x00, 0x50, 0xe3, 0x07, 0x00, 0x00, 0x0b, 0x00, 0x40, 0xbd, 0xe8, 0x0e, 0xf0, 0xb0, 0xe1, 0x0f, 0x50, 0x2d, 0xe9, 0x01, 0x03, 0xa0, 0xe3, 0x00, 0xe0, 0x8f, 0xe2, 0x04, 0xf0, 0x10, 0xe5, - 0x0f, 0x50, 0xbd, 0xe8, 0x04, 0xf0, 0x5e, 0xe2, 0x04, 0x40, 0x2d, 0xe9, - 0x04, 0xd0, 0x4d, 0xe2, 0xb0, 0x10, 0xcd, 0xe1, 0x01, 0x23, 0xa0, 0xe3, - 0x02, 0x2c, 0x82, 0xe2, 0xb0, 0x00, 0xd2, 0xe1, 0xb2, 0x00, 0xcd, 0xe1, - 0xb0, 0x10, 0xdd, 0xe1, 0x01, 0x10, 0x80, 0xe1, 0xb0, 0x10, 0xc2, 0xe1, - 0x1f, 0x00, 0xa0, 0xe3, 0x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, 0xe1, 0x04, 0xd0, 0x8d, 0xe2, + 0x10, 0x80, 0xbd, 0xe8 };
M src/gba/hle-bios.ssrc/gba/hle-bios.s

@@ -36,32 +36,33 @@ ldmfd sp!, {r0-r3, r12, lr}

subs pc, lr, #4 IntrWait: -stmfd sp!, {r2,lr} +stmfd sp!, {r4, lr} add sp, #-4 strh r1, [sp, #0] -IntrWaitLoop: -mov r2, #0x04000000 -add r2, #0x200 -ldrh r0, [r2, #0] +mov r4, #0x04000000 +add r4, #0x200 +ldrh r0, [r4, #0] strh r0, [sp, #2] ldrh r1, [sp, #0] -orr r1, r0, r1 -strh r1, [r2, #0] +orr r0, r1 +strh r0, [r4, #0x0] +mov r4, #0x04000000 +IntrWaitLoop: mov r0, #0x1F msr cpsr, r0 -swi #0x020000 +mov r0, #0 +strb r0, [r4, #0x301] mov r0, #0xD3 msr cpsr, r0 -mov r0, #0x04000000 -ldrh r2, [r0, #-8] +ldrh r0, [r4, #-8] ldrh r1, [sp, #0] -ands r1, r2 -eorne r1, r2 -strneh r1, [r0, #-8] -ldrh r0, [sp, #2] -mov r1, #0x04000000 -add r1, #0x200 -strh r0, [r1, #0] +ands r1, r0 +eorne r1, r0 +strneh r1, [r4, #-8] beq IntrWaitLoop +mov r4, #0x04000000 +add r4, #0x200 +ldrh r0, [sp, #2] +strh r0, [r4, #0] add sp, #4 -ldmfd sp!, {r2,pc} +ldmfd sp!, {r4, pc}