Skip to content

Commit 2e6be0e

Browse files
sukus21ISSOtm
andauthored
Added some missing bit number defines (#22)
* Add missing bit number defines Registers OCPS, BCPS and LCDC now have bit number defines Co-authored-by: Eldred Habert <[email protected]>
1 parent baee332 commit 2e6be0e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

hardware.inc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
;* Rev 4.2 - 04-Sep-21 : Added CH3- and CH4-specific audio registers flags (ISSOtm)
3131
;* Rev 4.3 - 07-Nov-21 : Deprecate VRAM address constants (Eievui)
3232
;* Rev 4.4 - 11-Jan-22 : Deprecate VRAM CART_SRAM_2KB constant (avivace)
33+
;* Rev 4.5 - 03-Mar-22 : Added bit number definitions for OCPS, BCPS and LCDC (sukus)
3334

3435
IF __RGBDS_MAJOR__ == 0 && __RGBDS_MINOR__ < 5
3536
FAIL "This version of 'hardware.inc' requires RGBDS version 0.5.0 or later."
@@ -146,6 +147,8 @@ DEF TACF_16KHZ EQU %00000011
146147
DEF TACF_65KHZ EQU %00000010
147148
DEF TACF_262KHZ EQU %00000001
148149

150+
DEF TACB_START EQU 2
151+
149152

150153
; --
151154
; -- IF ($FF0F)
@@ -451,6 +454,15 @@ DEF LCDCF_OBJOFF EQU %00000000 ; OBJ Display
451454
DEF LCDCF_OBJON EQU %00000010 ; OBJ Display
452455
DEF LCDCF_BGOFF EQU %00000000 ; BG Display
453456
DEF LCDCF_BGON EQU %00000001 ; BG Display
457+
458+
DEF LCDCB_ON EQU 7 ; LCD Control Operation
459+
DEF LCDCB_WIN9C00 EQU 6 ; Window Tile Map Display Select
460+
DEF LCDCB_WINON EQU 5 ; Window Display
461+
DEF LCDCB_BG8000 EQU 4 ; BG & Window Tile Data Select
462+
DEF LCDCB_BG9C00 EQU 3 ; BG Tile Map Display Select
463+
DEF LCDCB_OBJ16 EQU 2 ; OBJ Construction
464+
DEF LCDCB_OBJON EQU 1 ; OBJ Display
465+
DEF LCDCF_BGON EQU 0 ; BG Display
454466
; "Window Character Data Select" follows BG
455467

456468

@@ -631,6 +643,7 @@ DEF rHDMA5 EQU $FF55
631643

632644
DEF HDMA5F_MODE_GP EQU %00000000 ; General Purpose DMA (W)
633645
DEF HDMA5F_MODE_HBL EQU %10000000 ; HBlank DMA (W)
646+
DEF HDMA5B_MODE EQU 7 ; DMA mode select (W)
634647

635648
; -- Once DMA has started, use HDMA5F_BUSY to check when the transfer is complete
636649
DEF HDMA5F_BUSY EQU %10000000 ; 0=Busy (DMA still in progress), 1=Transfer complete (R)
@@ -656,6 +669,7 @@ DEF RPF_WRITE_LO EQU %00000000
656669
DEF rBCPS EQU $FF68
657670

658671
DEF BCPSF_AUTOINC EQU %10000000 ; Auto Increment (0=Disabled, 1=Increment after Writing)
672+
DEF BCPSB_AUTOINC EQU 7
659673

660674

661675
; --
@@ -672,6 +686,7 @@ DEF rBCPD EQU $FF69
672686
DEF rOCPS EQU $FF6A
673687

674688
DEF OCPSF_AUTOINC EQU %10000000 ; Auto Increment (0=Disabled, 1=Increment after Writing)
689+
DEF OCPSB_AUTOINC EQU 7
675690

676691

677692
; --

0 commit comments

Comments
 (0)