summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2017-02-17 10:56:19 -0800
committerYamaArashi <shadow962@live.com>2017-02-17 10:56:19 -0800
commit73bf7791f8b3989d599c8e625a49ee7304979ee5 (patch)
tree5c883553c6ffc5dd34fa5d997baa872c953f2013 /src
parenta60e850a861f686b7eccdd6bc942d9ad8d713429 (diff)
use i/o register constants
Diffstat (limited to 'src')
-rw-r--r--src/main.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 18cccfe08..cfc6ac6a9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -202,10 +202,9 @@ u16 GetTrainerId(void)
void EnableVCountIntrAtLine150(void)
{
- u16 gpuReg = GetGpuReg(0x4) & 0xFF | 0x9600;
-
- SetGpuReg(4, gpuReg | 0x20);
- EnableInterrupts(0x4); // please use IRQ_MASK_VCOUNT
+ u16 gpuReg = (GetGpuReg(REG_OFFSET_DISPSTAT) & 0xFF) | (150 << 8);
+ SetGpuReg(REG_OFFSET_DISPSTAT, gpuReg | DISPSTAT_VCOUNT_INTR);
+ EnableInterrupts(INTR_FLAG_VCOUNT);
}
void InitKeys(void)