From eaad5276ec34df9e58c0b42748e75fb49984e653 Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Sun, 29 Jun 2025 23:09:14 -0400 Subject: [PATCH 01/10] Changed `_AUD3WAVERAM` to `AUD3WAVERAM` --- HISTORY.md | 2 ++ hardware.inc | 4 ++-- hardware_compat.inc | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index fd55eca..9afa9a4 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -104,3 +104,5 @@ - Added `PAD_*` constants for combined button and Control Pad masks - Added `B_COLOR_*` red/green/blue bit numbers - Corrected comments on `B_BG_PRIO` and `B_OAM_PRIO` +- **Rev 6.0.0** - 2025-06-30 *(Rangi42)* + - Changed `_AUD3WAVERAM` to `AUD3WAVERAM` diff --git a/hardware.inc b/hardware.inc index 628b682..f6d2e02 100644 --- a/hardware.inc +++ b/hardware.inc @@ -22,7 +22,7 @@ endc ; Define the include guard and the current hardware.inc version ; (do this after the RGBDS version check since the `def` syntax depends on it) def HARDWARE_INC equ 1 -def HARDWARE_INC_VERSION equs "5.1.0" +def HARDWARE_INC_VERSION equs "6.0.0" ; Usage: rev_Check_hardware_inc ; Examples: @@ -422,7 +422,7 @@ def B_AUDENA_ENABLE_CH1 equ 0 ; 1 = channel 1 is running [ro] ; -- AUD3WAVE ($FF30-$FF3F) --------------------------------------------------- ; Audio channel 3 wave pattern RAM [r/w] -def _AUD3WAVERAM equ $FF30 ; $FF30-$FF3F +def AUD3WAVERAM equ $FF30 ; $FF30-$FF3F def rAUD3WAVE_0 equ $FF30 def rAUD3WAVE_1 equ $FF31 diff --git a/hardware_compat.inc b/hardware_compat.inc index 704777d..5923057 100644 --- a/hardware_compat.inc +++ b/hardware_compat.inc @@ -139,6 +139,8 @@ def AUD2HIGHF_PERIOD_HIGH equ AUD2HIGH_PERIOD_HIGH def AUD3ENAB_ENABLE equ B_AUD3ENA_ENABLE +def _AUD3WAVERAM equ AUD3WAVERAM + def AUD3LEVELF_VOLUME equ AUD3LEVEL_VOLUME def AUD3HIGHB_RESTART equ B_AUD3HIGH_RESTART From 2c379cba5e50338cdf252d60ae245f9d47f3db5e Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Tue, 1 Jul 2025 15:26:15 -0400 Subject: [PATCH 02/10] Fix comment --- hardware.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware.inc b/hardware.inc index f6d2e02..44499a2 100644 --- a/hardware.inc +++ b/hardware.inc @@ -606,7 +606,7 @@ def rVDMA_SRC_LOW equ $FF52 ; (CGB only) VRAM DMA destination address (high 8 bits) [wo] def rVDMA_DEST_HIGH equ $FF53 -; -- VDMA_DEST_LOW / HDMA3 ($FF54) -------------------------------------------- +; -- VDMA_DEST_LOW / HDMA4 ($FF54) -------------------------------------------- ; (CGB only) VRAM DMA destination address (low 8 bits) [wo] def rVDMA_DEST_LOW equ $FF54 From 4af67b020d1412504da46efe6abacdf10c79262d Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Tue, 1 Jul 2025 15:51:47 -0400 Subject: [PATCH 03/10] Add more comments --- hardware.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hardware.inc b/hardware.inc index 44499a2..0dc9bae 100644 --- a/hardware.inc +++ b/hardware.inc @@ -66,7 +66,7 @@ def B_JOYP_DOWN equ 3 ; 0 = Down is pressed (if reading Control Pad) [ro] def B_JOYP_UP equ 2 ; 0 = Up is pressed (if reading Control Pad) [ro] def B_JOYP_LEFT equ 1 ; 0 = Left is pressed (if reading Control Pad) [ro] def B_JOYP_RIGHT equ 0 ; 0 = Right is pressed (if reading Control Pad) [ro] - def JOYP_INPUTS equ %0000_1111 + def JOYP_INPUTS equ %0000_1111 ; 0 bits are pressed (if reading inputs) def JOYP_START equ 1 << B_JOYP_START def JOYP_SELECT equ 1 << B_JOYP_SELECT def JOYP_B equ 1 << B_JOYP_B @@ -441,7 +441,7 @@ def rAUD3WAVE_D equ $FF3D def rAUD3WAVE_E equ $FF3E def rAUD3WAVE_F equ $FF3F -def AUD3WAVE_SIZE equ 16 +def AUD3WAVE_SIZE equ 16 ; size of wave pattern RAM in bytes ; -- LCDC ($FF40) ------------------------------------------------------------- ; PPU graphics control @@ -868,12 +868,14 @@ def RAMREG_ENABLE equ $40 ; Latch accelerometer start [wo] def rACCLATCH0 equ $A000 +; Write $55 to ACCLATCH0 to erase the latched data def ACCLATCH0_START equ $55 ; -- ACCLATCH1 ($Ax1x) -------------------------------------------------------- ; Latch accelerometer finish [wo] def rACCLATCH1 equ $A010 +; Write $AA to ACCLATCH1 to latch the accelerometer and update ACCEL* def ACCLATCH1_FINISH equ $AA ; -- ACCELX0 ($Ax2x) ---------------------------------------------------------- @@ -903,6 +905,7 @@ def rEEPROM equ $A080 ; IR register [r/w] def rIRREG equ $A000 +; whether the IR transmitter sees light def IR_LED_OFF equ $C0 def IR_LED_ON equ $C1 From ad04dceebf6265c8fd807ab28be322e831d71846 Mon Sep 17 00:00:00 2001 From: Rangi <35663410+Rangi42@users.noreply.github.com> Date: Wed, 2 Jul 2025 09:34:55 -0400 Subject: [PATCH 04/10] Update comment Co-authored-by: Eldred Habert --- hardware.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware.inc b/hardware.inc index 0dc9bae..120d318 100644 --- a/hardware.inc +++ b/hardware.inc @@ -66,7 +66,7 @@ def B_JOYP_DOWN equ 3 ; 0 = Down is pressed (if reading Control Pad) [ro] def B_JOYP_UP equ 2 ; 0 = Up is pressed (if reading Control Pad) [ro] def B_JOYP_LEFT equ 1 ; 0 = Left is pressed (if reading Control Pad) [ro] def B_JOYP_RIGHT equ 0 ; 0 = Right is pressed (if reading Control Pad) [ro] - def JOYP_INPUTS equ %0000_1111 ; 0 bits are pressed (if reading inputs) + def JOYP_INPUTS equ %0000_1111 ; bits equal to 0 indicate pressed (when reading inputs) def JOYP_START equ 1 << B_JOYP_START def JOYP_SELECT equ 1 << B_JOYP_SELECT def JOYP_B equ 1 << B_JOYP_B From 5dcb17533efef8fd008ac2f18270494612ba9a61 Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Wed, 2 Jul 2025 23:33:48 -0400 Subject: [PATCH 05/10] Add constants for color shades --- HISTORY.md | 3 ++- hardware.inc | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 9afa9a4..50298dc 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -104,5 +104,6 @@ - Added `PAD_*` constants for combined button and Control Pad masks - Added `B_COLOR_*` red/green/blue bit numbers - Corrected comments on `B_BG_PRIO` and `B_OAM_PRIO` -- **Rev 6.0.0** - 2025-06-30 *(Rangi42)* +- **Rev 6.0.0** - 2025-07-03 *(Rangi42)* - Changed `_AUD3WAVERAM` to `AUD3WAVERAM` + - Added `SHADE_*` constants for grayscale shades diff --git a/hardware.inc b/hardware.inc index 120d318..4990bd1 100644 --- a/hardware.inc +++ b/hardware.inc @@ -941,6 +941,12 @@ def COLOR_SIZE equ 2 ; size of color in bytes (little-endian BGR555) def PAL_COLORS equ 4 ; colors per palette def PAL_SIZE equ COLOR_SIZE * PAL_COLORS ; size of palette in bytes +; (DMG only) grayscale shade indexes for BGP, OBP0, and OBP1 +def SHADE_WHITE equ %00 +def SHADE_LIGHT equ %01 +def SHADE_DARK equ %10 +def SHADE_BLACK equ %11 + ; Tilemaps the BG or Window can read from (controlled by LCDC) def TILEMAP0 equ $9800 ; $9800-$9BFF def TILEMAP1 equ $9C00 ; $9C00-$9FFF From 7fc573fec8f86c59b5185550e8311c15be504b41 Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Thu, 3 Jul 2025 09:48:54 -0400 Subject: [PATCH 06/10] Fix comment --- hardware.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware.inc b/hardware.inc index 4990bd1..766a674 100644 --- a/hardware.inc +++ b/hardware.inc @@ -812,7 +812,7 @@ def rRTCREG equ $A000 ; ** MBC5 only **************************************************************** -; -- ROMB0 ($2000-$3FFF) ------------------------------------------------------ +; -- ROMB0 ($2000-$2FFF) ------------------------------------------------------ ; ROM bank number low byte (bits 0-7) [wo] def rROMB0 equ $2000 From ea37d000969004b482501429d353d469ce81591c Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Mon, 14 Jul 2025 16:22:06 -0400 Subject: [PATCH 07/10] Add `AUD1RAM`-`AUD4RAM` audio channel RAM address constants --- HISTORY.md | 3 ++- hardware.inc | 18 ++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 50298dc..31400ba 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -104,6 +104,7 @@ - Added `PAD_*` constants for combined button and Control Pad masks - Added `B_COLOR_*` red/green/blue bit numbers - Corrected comments on `B_BG_PRIO` and `B_OAM_PRIO` -- **Rev 6.0.0** - 2025-07-03 *(Rangi42)* +- **Rev 6.0.0** - 2025-07-14 *(Rangi42)* - Changed `_AUD3WAVERAM` to `AUD3WAVERAM` + - Added `AUD1RAM`-`AUD4RAM` address constants - Added `SHADE_*` constants for grayscale shades diff --git a/hardware.inc b/hardware.inc index 766a674..2b4a143 100644 --- a/hardware.inc +++ b/hardware.inc @@ -422,8 +422,6 @@ def B_AUDENA_ENABLE_CH1 equ 0 ; 1 = channel 1 is running [ro] ; -- AUD3WAVE ($FF30-$FF3F) --------------------------------------------------- ; Audio channel 3 wave pattern RAM [r/w] -def AUD3WAVERAM equ $FF30 ; $FF30-$FF3F - def rAUD3WAVE_0 equ $FF30 def rAUD3WAVE_1 equ $FF31 def rAUD3WAVE_2 equ $FF32 @@ -441,8 +439,6 @@ def rAUD3WAVE_D equ $FF3D def rAUD3WAVE_E equ $FF3E def rAUD3WAVE_F equ $FF3F -def AUD3WAVE_SIZE equ 16 ; size of wave pattern RAM in bytes - ; -- LCDC ($FF40) ------------------------------------------------------------- ; PPU graphics control def rLCDC equ $FF40 @@ -995,6 +991,20 @@ def OAM_COUNT equ 40 ; how many OBJs there are room for in OAM def OAM_SIZE equ OBJ_SIZE * OAM_COUNT +;****************************************************************************** +; Audio channel RAM addresses +;****************************************************************************** + +def AUD1RAM equ $FF10 ; $FF10-$FF14 +def AUD2RAM equ $FF15 ; $FF15-$FF19 +def AUD3RAM equ $FF1A ; $FF1A-$FF1E +def AUD4RAM equ $FF1F ; $FF1F-$FF23 +def AUDRAM_SIZE equ 5 ; size of each audio channel RAM in bytes + +def AUD3WAVERAM equ $FF30 ; $FF30-$FF3F +def AUD3WAVE_SIZE equ 16 ; size of wave pattern RAM in bytes + + ;****************************************************************************** ; Interrupt vector addresses ;****************************************************************************** From c65c765563027cdbda41d79d18a188928cab9903 Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Fri, 18 Jul 2025 09:20:37 -0400 Subject: [PATCH 08/10] Correct comments --- HISTORY.md | 3 ++- hardware.inc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 31400ba..1220962 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -104,7 +104,8 @@ - Added `PAD_*` constants for combined button and Control Pad masks - Added `B_COLOR_*` red/green/blue bit numbers - Corrected comments on `B_BG_PRIO` and `B_OAM_PRIO` -- **Rev 6.0.0** - 2025-07-14 *(Rangi42)* +- **Rev 6.0.0** - 2025-07-18 *(Rangi42)* - Changed `_AUD3WAVERAM` to `AUD3WAVERAM` - Added `AUD1RAM`-`AUD4RAM` address constants - Added `SHADE_*` constants for grayscale shades + - Corrected comments on `WX_OFS`, `VDMA_DEST_LOW`, and `ROMB0` diff --git a/hardware.inc b/hardware.inc index 2b4a143..0066b3e 100644 --- a/hardware.inc +++ b/hardware.inc @@ -547,7 +547,7 @@ def rWY equ $FF4A ; X coordinate of the Window's top-left pixel, plus 7 (7-166) [r/w] def rWX equ $FF4B -def WX_OFS equ 7 ; subtract this to get the actual Window Y coordinate +def WX_OFS equ 7 ; subtract this to get the actual Window X coordinate ; -- SYS / KEY0 ($FF4C) ------------------------------------------------------- ; (CGB boot ROM only) CPU mode select From 92a8522f67d1561b50c873c51803635857cb17da Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Tue, 22 Jul 2025 07:04:41 -0400 Subject: [PATCH 09/10] Do not rename `_AUD3WAVERAM` --- HISTORY.md | 3 +-- hardware.inc | 2 +- hardware_compat.inc | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 1220962..b2e7a90 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -104,8 +104,7 @@ - Added `PAD_*` constants for combined button and Control Pad masks - Added `B_COLOR_*` red/green/blue bit numbers - Corrected comments on `B_BG_PRIO` and `B_OAM_PRIO` -- **Rev 6.0.0** - 2025-07-18 *(Rangi42)* - - Changed `_AUD3WAVERAM` to `AUD3WAVERAM` +- **Rev 6.0.0** - 2025-07-22 *(Rangi42)* - Added `AUD1RAM`-`AUD4RAM` address constants - Added `SHADE_*` constants for grayscale shades - Corrected comments on `WX_OFS`, `VDMA_DEST_LOW`, and `ROMB0` diff --git a/hardware.inc b/hardware.inc index 0066b3e..6699d1e 100644 --- a/hardware.inc +++ b/hardware.inc @@ -1001,7 +1001,7 @@ def AUD3RAM equ $FF1A ; $FF1A-$FF1E def AUD4RAM equ $FF1F ; $FF1F-$FF23 def AUDRAM_SIZE equ 5 ; size of each audio channel RAM in bytes -def AUD3WAVERAM equ $FF30 ; $FF30-$FF3F +def _AUD3WAVERAM equ $FF30 ; $FF30-$FF3F def AUD3WAVE_SIZE equ 16 ; size of wave pattern RAM in bytes diff --git a/hardware_compat.inc b/hardware_compat.inc index 5923057..704777d 100644 --- a/hardware_compat.inc +++ b/hardware_compat.inc @@ -139,8 +139,6 @@ def AUD2HIGHF_PERIOD_HIGH equ AUD2HIGH_PERIOD_HIGH def AUD3ENAB_ENABLE equ B_AUD3ENA_ENABLE -def _AUD3WAVERAM equ AUD3WAVERAM - def AUD3LEVELF_VOLUME equ AUD3LEVEL_VOLUME def AUD3HIGHB_RESTART equ B_AUD3HIGH_RESTART From 5f50fbaca7e6710010224e7f39081c05e7553624 Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Tue, 22 Jul 2025 07:06:03 -0400 Subject: [PATCH 10/10] Reduce version number --- HISTORY.md | 2 +- hardware.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index b2e7a90..5c5cb9e 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -104,7 +104,7 @@ - Added `PAD_*` constants for combined button and Control Pad masks - Added `B_COLOR_*` red/green/blue bit numbers - Corrected comments on `B_BG_PRIO` and `B_OAM_PRIO` -- **Rev 6.0.0** - 2025-07-22 *(Rangi42)* +- **Rev 5.2.0** - 2025-07-22 *(Rangi42)* - Added `AUD1RAM`-`AUD4RAM` address constants - Added `SHADE_*` constants for grayscale shades - Corrected comments on `WX_OFS`, `VDMA_DEST_LOW`, and `ROMB0` diff --git a/hardware.inc b/hardware.inc index 6699d1e..e77034f 100644 --- a/hardware.inc +++ b/hardware.inc @@ -22,7 +22,7 @@ endc ; Define the include guard and the current hardware.inc version ; (do this after the RGBDS version check since the `def` syntax depends on it) def HARDWARE_INC equ 1 -def HARDWARE_INC_VERSION equs "6.0.0" +def HARDWARE_INC_VERSION equs "5.2.0" ; Usage: rev_Check_hardware_inc ; Examples: