d0k3 d1ab7602b9 Improved TWL cart dumper code thanks to @Normmatt
... uses the internal timer for accurate timings now
2017-03-10 12:49:02 +01:00

28 lines
447 B
ArmAsm

// Copyright 2014 Normmatt
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
.arm
.global ioDelay
.type ioDelay STT_FUNC
@ioDelay ( u32 us )
ioDelay:
ldr r1, =0x18000000 @ VRAM
1:
@ Loop doing uncached reads from VRAM to make loop timing more reliable
ldr r2, [r1]
subs r0, #1
bgt 1b
bx lr
.global ioDelay2
.type ioDelay2 STT_FUNC
@ioDelay2 ( u32 us )
ioDelay2:
1:
subs r0, #1
bgt 1b
bx lr