GBA BIOS: Fix locked BIOS read on boot

This commit is contained in:
Vicki Pfau 2024-10-31 22:47:51 -07:00
parent 77e747ebf6
commit f89184d51f
3 changed files with 6 additions and 5 deletions

View File

@ -75,9 +75,9 @@ const uint8_t hleBios[GBA_SIZE_BIOS] = {
0xf0, 0x07, 0xbd, 0xe8, 0x1e, 0xff, 0x2f, 0xe1, 0xb0, 0x01, 0x00, 0x00, 0xf0, 0x07, 0xbd, 0xe8, 0x1e, 0xff, 0x2f, 0xe1, 0xb0, 0x01, 0x00, 0x00,
0x04, 0xb0, 0x5b, 0xe2, 0xfd, 0xff, 0xff, 0x8a, 0x1e, 0xff, 0x2f, 0xe1, 0x04, 0xb0, 0x5b, 0xe2, 0xfd, 0xff, 0xff, 0x8a, 0x1e, 0xff, 0x2f, 0xe1,
0xc2, 0xe3, 0xa0, 0xe3, 0x03, 0x10, 0x5e, 0xe4, 0x00, 0x00, 0x51, 0xe3, 0xc2, 0xe3, 0xa0, 0xe3, 0x03, 0x10, 0x5e, 0xe4, 0x00, 0x00, 0x51, 0xe3,
0x00, 0x10, 0xa0, 0x13, 0x1e, 0xff, 0x2f, 0x11, 0x1c, 0xe0, 0x9f, 0xe5, 0x00, 0x10, 0xa0, 0x13, 0x05, 0x00, 0x00, 0x1a, 0x1c, 0xe0, 0x9f, 0xe5,
0x00, 0x10, 0x9e, 0xe5, 0x00, 0x00, 0x51, 0xe3, 0x00, 0x10, 0xa0, 0xe3, 0x00, 0x10, 0x9e, 0xe5, 0x00, 0x00, 0x51, 0xe3, 0x00, 0x10, 0xa0, 0xe3,
0x1e, 0xff, 0x2f, 0x11, 0xc0, 0xe0, 0x4e, 0xe2, 0x1e, 0xff, 0x2f, 0xe1, 0x00, 0x00, 0x00, 0x1a, 0xc0, 0xe0, 0x4e, 0xe2, 0x1e, 0xff, 0x2f, 0xe1,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x29, 0xe1, 0xc0, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x29, 0xe1, 0xc0, 0x00, 0x00, 0x02,
0x4c, 0xd0, 0x9f, 0xe5, 0x00, 0x50, 0x2d, 0xe9, 0x00, 0xc0, 0x4f, 0xe1, 0x4c, 0xd0, 0x9f, 0xe5, 0x00, 0x50, 0x2d, 0xe9, 0x00, 0xc0, 0x4f, 0xe1,
0x00, 0xe0, 0x0f, 0xe1, 0x00, 0x50, 0x2d, 0xe9, 0x02, 0xe3, 0xa0, 0xe3, 0x00, 0xe0, 0x0f, 0xe1, 0x00, 0x50, 0x2d, 0xe9, 0x02, 0xe3, 0xa0, 0xe3,

View File

@ -318,13 +318,14 @@ mov lr, #0x8000003
ldrb r1, [lr], #-3 ldrb r1, [lr], #-3
cmp r1, #0 cmp r1, #0
movne r1, #0 movne r1, #0
bxne lr bne 1f
ldr lr, =0x20000C0 ldr lr, =0x20000C0
ldr r1, [lr] ldr r1, [lr]
cmp r1, #0 cmp r1, #0
mov r1, #0 mov r1, #0
bxne lr bne 1f
sub lr, #0xC0 sub lr, #0xC0
1:
bx lr bx lr
.word 0 .word 0
.word 0xE129F000 .word 0xE129F000

View File

@ -70,7 +70,7 @@ void GBAVideoReset(struct GBAVideo* video) {
} else { } else {
// TODO: Verify exact scanline on hardware // TODO: Verify exact scanline on hardware
video->vcount = 0x7E; video->vcount = 0x7E;
nextEvent = 117; nextEvent = 120;
} }
video->p->memory.io[GBA_REG(VCOUNT)] = video->vcount; video->p->memory.io[GBA_REG(VCOUNT)] = video->vcount;