mirror of
https://github.com/LNH-team/pico-loader.git
synced 2026-06-02 09:16:49 +02:00
DATEL: Make read sector function vram safe (#80)
* DATEL: Make read sector function vram safe The platform code was performing reads in single byte units, breaking in case the destination buffer was in vram. This caused issues with some games (e.g. Castelvania Order of Ecclesia), and also broke soft resetting. * Halve wait timeout on sector read since we read 2 bytes at the time
This commit is contained in:
@@ -29,6 +29,16 @@ BEGIN_ASM_FUNC datel_readWriteSpiByte
|
||||
cmp r0, #0
|
||||
pop {r1-r3, pc}
|
||||
|
||||
@u16 datel_readWriteSpiShort();
|
||||
BEGIN_ASM_FUNC datel_readSpiShort
|
||||
push {r1-r7, lr}
|
||||
bl datel_readSpiByte
|
||||
movs r1, r0
|
||||
bl datel_readSpiByte
|
||||
lsls r0, #8
|
||||
orrs r0, r1
|
||||
pop {r1-r7, pc}
|
||||
|
||||
@u8 datel_readSpiByteTimeout(void);
|
||||
BEGIN_ASM_FUNC datel_readSpiByteTimeout
|
||||
push {r1-r4, lr}
|
||||
|
||||
Reference in New Issue
Block a user