forked from pixel-stuck/arm9loaderhax
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from d0k3/master
Fix SD writes without breaking SDless boot
- Loading branch information
Showing
5 changed files
with
733 additions
and
432 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
// Copyright 2014 Normmatt | ||
// Licensed under GPLv2 or any later version | ||
// Refer to the license.txt file included. | ||
|
||
.arm | ||
.global ioDelay | ||
.type ioDelay STT_FUNC | ||
.global waitcycles | ||
.type waitcycles 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 | ||
@waitcycles ( u32 us ) | ||
waitcycles: | ||
PUSH {R0-R2,LR} | ||
STR R0, [SP,#4] | ||
waitcycles_loop: | ||
LDR R3, [SP,#4] | ||
SUBS R2, R3, #1 | ||
STR R2, [SP,#4] | ||
CMP R3, #0 | ||
BNE waitcycles_loop | ||
POP {R0-R2,PC} |
Oops, something went wrong.