summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2013-08-27 23:37:24 -0400
committeryenatch <yenatch@gmail.com>2013-08-27 23:37:24 -0400
commite48899c1f4e59db41b5647f03c6651d39d7dd44d (patch)
tree5786d233e8fea64dda0556d0dd1c58bdf0436897
parent651e0a4245d8749e7926fce01110a12bb7453246 (diff)
gbhw: flag constants for interrupts and timer registers
-rw-r--r--gbhw.asm14
1 files changed, 14 insertions, 0 deletions
diff --git a/gbhw.asm b/gbhw.asm
index 6f2c68c97..0f12e4842 100644
--- a/gbhw.asm
+++ b/gbhw.asm
@@ -21,15 +21,29 @@ RTC_DH EQU $0c ; Upper 1 bit of Day Counter, Carry Bit, Halt Flag
; Bit 6 Halt (0=Active, 1=Stop Timer)
; Bit 7 Day Counter Carry Bit (1=Counter Overflow)
+; interrupt flags
+VBLANK EQU 0
+LCD_STAT EQU 1
+TIMER EQU 2
+SERIAL EQU 3
+JOYPAD EQU 4
; Hardware registers
rJOYP EQU $ff00 ; Joypad (R/W)
rSB EQU $ff01 ; Serial transfer data (R/W)
rSC EQU $ff02 ; Serial Transfer Control (R/W)
+rSC_ON EQU 7
+rSC_CGB EQU 1
+rSC_CLOCK EQU 0
rDIV EQU $ff04 ; Divider Register (R/W)
rTIMA EQU $ff05 ; Timer counter (R/W)
rTMA EQU $ff06 ; Timer Modulo (R/W)
rTAC EQU $ff07 ; Timer Control (R/W)
+rTAC_ON EQU 2
+rTAC_4096_HZ EQU 0
+rTAC_262144_HZ EQU 1
+rTAC_65536_HZ EQU 2
+rTAC_16384_HZ EQU 3
rIF EQU $ff0f ; Interrupt Flag (R/W)
rNR10 EQU $ff10 ; Channel 1 Sweep register (R/W)
rNR11 EQU $ff11 ; Channel 1 Sound length/Wave pattern duty (R/W)