Skip to content

Commit faae298

Browse files
authored
Tagged RTC DH bits as r/w
Also moved affected RAMB_RTC_DH bit constants to rRTCREG, since their placement under rRAMB is clearly an error
1 parent bbeee52 commit faae298

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

hardware.inc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -768,12 +768,6 @@ def RAMB_RTC_M equ $09 ; minutes counter (0-59)
768768
def RAMB_RTC_H equ $0A ; hours counter (0-23)
769769
def RAMB_RTC_DL equ $0B ; days counter, low byte (0-255)
770770
def RAMB_RTC_DH equ $0C ; days counter, high bit and other flags
771-
def B_RAMB_RTC_DH_CARRY equ 7 ; 1 = days counter overflowed [wo]
772-
def B_RAMB_RTC_DH_HALT equ 6 ; 0 = run timer, 1 = stop timer [wo]
773-
def B_RAMB_RTC_DH_HIGH equ 0 ; days counter, high bit (bit 8) [wo]
774-
def RAMB_RTC_DH_CARRY equ 1 << B_RAMB_RTC_DH_CARRY
775-
def RAMB_RTC_DH_HALT equ 1 << B_RAMB_RTC_DH_HALT
776-
def RAMB_RTC_DH_HIGH equ 1 << B_RAMB_RTC_DH_HIGH
777771

778772
def B_RAMB_RUMBLE equ 3 ; (MBC5 and MBC7 only) enable the rumble motor (if any)
779773
def RAMB_RUMBLE equ 1 << B_RAMB_RUMBLE
@@ -812,6 +806,14 @@ def RTCLATCH_FINISH equ $01
812806
; RTC register [r/w]
813807
def rRTCREG equ $A000
814808

809+
; bits in RAMB_RTC_DH
810+
def B_RTCREG_DH_CARRY equ 7 ; 1 = days counter overflowed [r/w]
811+
def B_RTCREG_DH_HALT equ 6 ; 0 = run timer, 1 = stop timer [r/w]
812+
def B_RTCREG_DH_HIGH equ 0 ; days counter, high bit (bit 8) [r/w]
813+
def RTCREG_DH_CARRY equ 1 << B_RTCREG_DH_CARRY
814+
def RTCREG_DH_HALT equ 1 << B_RTCREG_DH_HALT
815+
def RTCREG_DH_HIGH equ 1 << B_RTCREG_DH_HIGH
816+
815817

816818
; ** MBC5 only ****************************************************************
817819

0 commit comments

Comments
 (0)