mirror of
https://github.com/LNH-team/pico-loader.git
synced 2026-06-02 09:16:49 +02:00
Add support for Slot 2 flashcarts using Compact Flash (#84)
- Supercard CF (SUPERCARDCF) - GBA Media Player CF (MPCF) - M3 Adapter CF (M3CF) - Max Media Dock CF (MMCF)
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
.cpu arm7tdmi
|
||||
.syntax unified
|
||||
.thumb
|
||||
.section "sccf_lock_unlock", "ax"
|
||||
|
||||
.global sccf_lockUnlockCard
|
||||
.type sccf_lockUnlockCard, %function
|
||||
sccf_lockUnlockCard:
|
||||
cmp r0, #1
|
||||
bne unlock
|
||||
@ void sc_change_mode(uint16_t mode);
|
||||
sccf_changeMode:
|
||||
push {r1-r3, lr}
|
||||
ldr r2,= 0x09FFFFFE
|
||||
ldr r3,= 0xA55A
|
||||
strh r3, [r2]
|
||||
strh r3, [r2]
|
||||
strh r0, [r2]
|
||||
strh r0, [r2]
|
||||
pop {r1-r3, pc}
|
||||
|
||||
unlock:
|
||||
movs r0, #3
|
||||
b sccf_changeMode
|
||||
|
||||
.pool
|
||||
Reference in New Issue
Block a user