-
Notifications
You must be signed in to change notification settings - Fork 561
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Seems to be more reliable in all conditions
- Loading branch information
1 parent
e9410c8
commit 8ce395c
Showing
6 changed files
with
36 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
|
||
#include "common.h" | ||
|
||
void waitcycles(u32 us); | ||
void ioDelay(u32 us); |
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,10 +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: | ||
waitcycles_loop: | ||
subs r0, #1 | ||
bgt waitcycles_loop | ||
bx lr | ||
@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 |
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 |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
|
||
#include "common.h" | ||
|
||
void waitcycles(u32 us); | ||
void ioDelay(u32 us); |
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,10 +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: | ||
waitcycles_loop: | ||
subs r0, #1 | ||
bgt waitcycles_loop | ||
bx lr | ||
@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 |
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