Created
April 26, 2020 12:04
-
-
Save profi200/0d1ec9c51b528b0655b313e78b2869ae to your computer and use it in GitHub Desktop.
VBlank time test for citra
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
#include "asmfunc.h" | |
.arm | |
.cpu mpcore | |
.fpu vfpv2 | |
@ u32 vblankTest(void) | |
ASM_FUNC vblankTest | |
ldr r1, =0x17E00000 | |
mov r2, #0xFFFFFFFF | |
mov r12, #1 | |
str r2, [r1, #0x600] @ REG_TIMER_LOAD | |
mov r0, #0 | |
cpsid i | |
wfi | |
str r12, [r1, #0x608] @ REG_TIMER_CNT start | |
ldr r12, [r1, #0x10C] @ REG_CPU_II_AKN | |
str r12, [r1, #0x110] @ REG_CPU_II_EOI | |
wfi | |
str r0, [r1, #0x608] @ REG_TIMER_CNT stop | |
ldr r12, [r1, #0x10C] @ REG_CPU_II_AKN | |
str r12, [r1, #0x110] @ REG_CPU_II_EOI | |
ldr r3, [r1, #0x604] @ REG_TIMER_COUNTER | |
cpsie i | |
sub r0, r2, r3 | |
bx lr | |
.pool |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment