mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-24 08:41:34 +11:00
Put everything in different sections
This commit is contained in:
parent
601360ca67
commit
2d90755090
|
@ -2,7 +2,7 @@
|
||||||
@ An interrupt handler that simply acknowledges all interrupts
|
@ An interrupt handler that simply acknowledges all interrupts
|
||||||
.arm
|
.arm
|
||||||
.global InterruptHandler
|
.global InterruptHandler
|
||||||
.section .iwram, "ax"
|
.section .iwram, "ax", %progbits
|
||||||
.align
|
.align
|
||||||
InterruptHandler:
|
InterruptHandler:
|
||||||
mov r2, #0x04000000 @ interrupt enable register location
|
mov r2, #0x04000000 @ interrupt enable register location
|
||||||
|
@ -50,7 +50,7 @@ InterruptHandler:
|
||||||
.pool
|
.pool
|
||||||
|
|
||||||
|
|
||||||
.section .iwram
|
.section .iwram.program_counter
|
||||||
.global agb_rs__program_counter
|
.global agb_rs__program_counter
|
||||||
.balign 4
|
.balign 4
|
||||||
agb_rs__program_counter:
|
agb_rs__program_counter:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
.macro agb_arm_func functionName:req
|
.macro agb_arm_func functionName:req
|
||||||
.section .iwram
|
.section .iwram.\functionName, "ax", %progbits
|
||||||
.arm
|
.arm
|
||||||
.align 2
|
.align 2
|
||||||
.global \functionName
|
.global \functionName
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.include "src/asm_include.s"
|
.include "src/asm_include.s"
|
||||||
|
|
||||||
.section .iwram
|
.section .iwram.buffer_size
|
||||||
.global agb_rs__buffer_size
|
.global agb_rs__buffer_size
|
||||||
.balign 4
|
.balign 4
|
||||||
agb_rs__buffer_size:
|
agb_rs__buffer_size:
|
||||||
|
@ -26,7 +26,8 @@ modifications_fallback:
|
||||||
orr r7, r7, r3, lsl #16 @ r7 now is the left channel followed by the right channel modifications.
|
orr r7, r7, r3, lsl #16 @ r7 now is the left channel followed by the right channel modifications.
|
||||||
|
|
||||||
mov r5, #0 @ current index we're reading from
|
mov r5, #0 @ current index we're reading from
|
||||||
ldr r8, agb_rs__buffer_size @ the number of steps left
|
ldr r8, =agb_rs__buffer_size @ the number of steps left
|
||||||
|
ldr r8, [r8]
|
||||||
|
|
||||||
|
|
||||||
1:
|
1:
|
||||||
|
@ -64,7 +65,8 @@ same_modification:
|
||||||
bne 1b
|
bne 1b
|
||||||
|
|
||||||
mov r5, #0 @ current index we're reading from
|
mov r5, #0 @ current index we're reading from
|
||||||
ldr r8, agb_rs__buffer_size @ the number of steps left
|
ldr r8, =agb_rs__buffer_size @ the number of steps left
|
||||||
|
ldr r8, [r8]
|
||||||
|
|
||||||
1:
|
1:
|
||||||
.rept 4
|
.rept 4
|
||||||
|
@ -99,7 +101,8 @@ agb_arm_func agb_rs__mixer_add_stereo
|
||||||
|
|
||||||
ldr r5, =0x00000FFF
|
ldr r5, =0x00000FFF
|
||||||
|
|
||||||
ldr r8, agb_rs__buffer_size
|
ldr r8, =agb_rs__buffer_size
|
||||||
|
ldr r8, [r8]
|
||||||
1:
|
1:
|
||||||
.rept 4
|
.rept 4
|
||||||
ldrsh r6, [r0], #2 @ load the current sound sample to r6
|
ldrsh r6, [r0], #2 @ load the current sound sample to r6
|
||||||
|
@ -184,7 +187,8 @@ SWAP_SIGN .req r11
|
||||||
ldr CONST_127, =127
|
ldr CONST_127, =127
|
||||||
ldr SWAP_SIGN, =0x80808080
|
ldr SWAP_SIGN, =0x80808080
|
||||||
|
|
||||||
ldr r2, agb_rs__buffer_size @ loop counter
|
ldr r2, =agb_rs__buffer_size @ loop counter
|
||||||
|
ldr r2, [r2]
|
||||||
mov r4, r2
|
mov r4, r2
|
||||||
|
|
||||||
@ The idea for this solution came from pimpmobile:
|
@ The idea for this solution came from pimpmobile:
|
||||||
|
|
Loading…
Reference in a new issue