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.
Temporarily revert "full A9NC support" because that borked SDless boot
This reverts commit 8e5cca1.
- Loading branch information
1 parent
8e5cca1
commit 3fcd257
Showing
5 changed files
with
451 additions
and
757 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 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,15 +1,17 @@ | ||
// Copyright 2014 Normmatt | ||
// Licensed under GPLv2 or any later version | ||
// Refer to the license.txt file included. | ||
|
||
.arm | ||
.global waitcycles | ||
.type waitcycles STT_FUNC | ||
.global ioDelay | ||
.type ioDelay STT_FUNC | ||
|
||
@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} | ||
@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 |
Oops, something went wrong.