summaryrefslogtreecommitdiffstats
path: root/src/irs.s
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-04-28 20:06:51 +0200
committerBad Diode <bd@badd10de.dev>2021-04-28 20:06:51 +0200
commit3beb8ab1693b8ecd2b34047fde915137feb57e22 (patch)
treec5094851ae2fd9a2ff5595e014912e12a32be0da /src/irs.s
parentdbb61a0a339306be380ff4b3bffad64b7e474d24 (diff)
downloadgba-experiments-3beb8ab1693b8ecd2b34047fde915137feb57e22.tar.gz
gba-experiments-3beb8ab1693b8ecd2b34047fde915137feb57e22.zip
Update master interrupt handler
Diffstat (limited to 'src/irs.s')
-rw-r--r--src/irs.s9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/irs.s b/src/irs.s
index 66ac0c2..5cccb6e 100644
--- a/src/irs.s
+++ b/src/irs.s
@@ -17,7 +17,7 @@ irs_main:
17 17
18 @ r0 = irs_table address pointer 18 @ r0 = irs_table address pointer
19 @ r2 = tmp 19 @ r2 = tmp
20 @ r3 = 0 (for r3; r3 < 14; r3++) 20 @ r3 = 0 (for r3; r3 < 14; r3++)
21 ldr r0, = irs_table 21 ldr r0, = irs_table
22irs_main_fp_search: 22irs_main_fp_search:
23 @ Check that the current index is an active IRQ. 23 @ Check that the current index is an active IRQ.
@@ -47,9 +47,8 @@ irs_main_handle_irs:
47 mov r0, #1 47 mov r0, #1
48 lsl r0, r0, r3 48 lsl r0, r0, r3
49 strh r0, [ip, #2] 49 strh r0, [ip, #2]
50 ldr r1, [ip, #-0x208] 50 ldr r1, mem_irq_ack_bios @ r1 = IRQ_ACK_BIOS
51 orr r1, r1, r0 51 str r0, [r1]
52 str r1, [ip, #-0x208]
53 52
54 @ Store the SPSR in one of the free registers and save it along with the 53 @ Store the SPSR in one of the free registers and save it along with the
55 @ return pointer. 54 @ return pointer.
@@ -86,3 +85,5 @@ irs_main_exit:
86 85
87mem_irq_base_reg: 86mem_irq_base_reg:
88 .word 0x04000200 @ IRQ_ENABLE 87 .word 0x04000200 @ IRQ_ENABLE
88mem_irq_ack_bios:
89 .word 0x03007FF8 @ IRQ_ACK_BIOS