Skip to content

Commit f2d8ebb

Browse files
authored
Release hardware.inc version 4.10 (#50)
* Update actions/checkout to v4 * Update hardware.inc to version 4.10.0 - Add more constants - Deprecate some alias constants - Move change log to HISTORY.md file - Regroup and reformat constants - Define `F`lags in terms of shifted `B`its * Use shorter register heading dash comments * Update more registers * More registers * Add HDMA registers * Fix VDMA (aka HDMA or GDMA) constants * Finish $FFxx registers * Finish cartridge MBC registers * Finish deprecated constants * Start porting some constants from gb-bootroms * Finish CPU values on bootup and interrupt vector addresses * Finish screen-related constants * Finish OAM constants * Fix spacing * Update change log * Add `BGP_SGB_TRANSFER` * Consistently use `[r/w]` not `[rw]` * Comment on how to fill header with zeros * Note which values RGBFIX "sets" by not overwriting zeros * Remove extra space * Define `rRTCREG` * Fix comment * Updated history change log * Suggestions from code review * Use `rb` for OAM field offsets * Update date of last revision
1 parent d73aa0d commit f2d8ebb

File tree

4 files changed

+1121
-1129
lines changed

4 files changed

+1121
-1129
lines changed

.github/workflows/testing.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
macos-testing:
88
runs-on: macos-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v4
1111
- name: Install RGBDS
1212
run: |
1313
brew install rgbds
@@ -18,7 +18,7 @@ jobs:
1818
windows-testing:
1919
runs-on: windows-latest
2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v4
2222
- name: Install RGBDS
2323
run: |
2424
# Find the URL of the latest Win64 release with the GitHub API
@@ -30,4 +30,4 @@ jobs:
3030
Expand-Archive rgbds.zip
3131
- name: Run rgbasm on hardware.inc
3232
run: |
33-
rgbds/rgbasm.exe hardware.inc
33+
rgbds/rgbasm.exe hardware.inc

HISTORY.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# History
2+
3+
- **Rev 1.1** - 1997-07-15
4+
- Added define check
5+
- **Rev 1.2** - 1997-07-18
6+
- Added revision check macro
7+
- **Rev 1.3** - 1997-07-19
8+
- Updated syntax for RGBASM 1.05
9+
- **Rev 1.4** - 1997-07-27
10+
- Updated subroutine prefixes
11+
- **Rev 1.5** - 1997-08-15
12+
- Added `_HRAM` constant
13+
- Added `PAD*` constants for `rP1` register
14+
- Added `CART*` MBC constants
15+
- Added `NINTENDO_LOGO` macro
16+
- **Rev 1.6** - 1997-11-30
17+
- Added `rDIV`, `rTIMA`, `rTMA`, and `rTAC` registers
18+
- **Rev 1.7** - 1998-01-31
19+
- Added `_SCRN0` and `_SCRN1` constants
20+
- **Rev 1.8** - 1998-02-15
21+
- Added `rSB` and `rSC` registers
22+
- **Rev 1.9** - 1998-02-16
23+
- Converted I/O registers to `$FFxx` format
24+
- **Rev 2.0**
25+
- Added GBC registers
26+
- **Rev 2.1**
27+
- Added MBC5 and cart RAM enable/disable constants
28+
- **Rev 2.2**
29+
- Fixed `NR42`, `NR43`, and `NR44` constants
30+
- **Rev 2.3**
31+
- Fixed incorrect `_HRAM` constant
32+
- **Rev 2.4** - 2013-04-27 *(AntonioND)*
33+
- Added some `CART_*` MBC constants
34+
- **Rev 2.5** - 2015-05-03 *(AntonioND)*
35+
- Fixed formatting
36+
- **Rev 2.6** - 2016-04-09 *(AntonioND)*
37+
- Added GBC `OAMF_*` and `CART_*` constants
38+
- **Rev 2.7** - 2019-01-19 *(ISSOtm)*
39+
- Added `rPCM12` and `rPCM34` registers
40+
- **Rev 2.8** - 2019-02-03 *(Álvaro Cuesta)*
41+
- Added flag values for audio registers
42+
- **Rev 2.9** - 2020-02-28
43+
- Added `P1F_*` flag values for `rP1F` register
44+
- **Rev 3.0** - 2020-08-27 *(Blitter Object)*
45+
- Register ordering
46+
- Byte-based sizes
47+
- OAM additions
48+
- General cleanup
49+
- **Rev 4.0** - 2021-05-03 *(Eievui)*
50+
- Updated to use RGBASM 0.5.0 syntax
51+
- Changed `IEF_LCDC` to `IEF_STAT`
52+
- **Rev 4.1** - 2021-08-16 *(rondnelson99)*
53+
- Added more flags, bit number constants, and offset constants for OAM and window positions
54+
- **Rev 4.2** - 2021-09-04 *(ISSOtm)*
55+
- Added CH3- and CH4-specific audio registers flags
56+
- **Rev 4.3** - 2021-11-07 *(Eievui)*
57+
- Deprecate VRAM address constants
58+
- **Rev 4.4** - 2022-01-11 *(avivace)*
59+
- Deprecate VRAM `CART_SRAM_2KB` constant
60+
- **Rev 4.5** - 2022-03-03 *(sukus)*
61+
- Added bit number definitions for `OCPS`, `BCPS` and `LCDC`
62+
- **Rev 4.6** - 2022-06-15
63+
- Added MBC3 registers and special values
64+
- **Rev 4.7.0** - 2022-06-27
65+
- Added alternate names for some constants
66+
- **Rev 4.7.1** - 2022-07-05
67+
- Added `RPB_LED_ON` constant
68+
- **Rev 4.8.0** - 2022-10-25 *(zlago)*
69+
- Changed background addressing constants
70+
- **Rev 4.8.1** - 2023-04-29 *(rbong)*
71+
- Added `rOPRI`
72+
- **Rev 4.9.0** - 2023-06-24 *(sukus)*
73+
- Added definitions for interrupt vectors
74+
- **Rev 4.9.1** - 2023-09-11
75+
- Added repository link and CC0 waiver notice
76+
- **Rev 4.9.2** - 2024-08-18 *(DevEd)*
77+
- Corrected `CART_ROM_MBC5_BAT` to `CART_ROM_MBC5_RAM`
78+
- **Rev 4.10.0** - 2025-05-19 *(Rangi42)*
79+
- Added `rKEY0`, `rBANK`, and `rRTCREG` registers
80+
- Added `rJOYP`, `rVDMA_*`, and `rWBK` register aliases
81+
- Added `HARDWARE_INC_VERSION` string constant
82+
- Added many more bit number, flag, and value constants
83+
- Deprecate `IEB_HILO` and `IEF_HILO` in favor of `IEB_JOYPAD` and `IEF_JOYPAD`
84+
- Deprecate memory region and cartridge header constants
85+
- Changed formatting and reorganized sections
86+
- Moved revision history to separate HISTORY.md file

README.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
11
# `hardware.inc`
22

3-
### Game Boy Hardware definitions
3+
## Game Boy hardware definitions
44

55
`hardware.inc` has been the standard include file containing Game Boy hardware definitions for use in [RGBDS](https://rgbds.gbdev.io) projects for over 20 years.
66

7-
The file was originally created by Jeff Frohwein in 1997, who still hosts [his latest version (2.3)](http://www.devrs.com/gb/files/hardware.zip) on his great [Dev'rs](http://devrs.com) website.
7+
The file was originally created by Jeff Frohwein in 1997.
8+
Although Jeff tried to track version updates with a rudimentary change log at the top of the file, people have made small changes throughout the years, often without bumping the version number.
89

9-
Although Jeff tried to version control the file with a rudimentary change log at the top of the file, people have added small changes throughout the years, often without bumping the version number.
10-
11-
This repo has become the new official reference for `hardware.inc`, using [@AntonioND](http://github.com/AntonioND)'s fork as the baseline.
10+
This repository has become the official reference for `hardware.inc`, using [@AntonioND](https://github.com/AntonioND)'s fork as the baseline.
1211

1312
## Contributing
1413

15-
This repository's `master` branch should be considered production;
16-
Each commit represents a new release, requiring the embedded version number to be bumped (and an entry to be added to the changelog at the beginning of the file).
17-
18-
We follow [semantic versioning](https://semver.org);
19-
Breaking changes (such as those in [72ec03f](https://github.com/gbdev/hardware.inc/commit/72ec03f835e72be83a1ef189a4a9eac0fbdf39e2)) increase the major version, backwards-compatible changes (typically additions) only increase the minor version, and bugfixes only increase the patch level.
14+
This repository's `master` branch should be considered the production version.
15+
Each commit represents a new release, so each one should update the embedded version number in `hardware.inc` and the change log in `HISTORY.md`.
2016

21-
Changes to the comments should be considered a bugfix.
17+
We follow [semantic versioning](https://semver.org).
18+
Breaking changes increase the major version, backwards-compatible changes (typically new additions) only increase the minor version, and bug fixes (including changes to the comments) only increase the patch level.
19+
(An example of a breaking change is when `hardware.inc` 4.0 updated its syntax for compatibility with RGBDS 0.5.0, breaking compatibility with older RGBDS versions.)
2220

2321
## Contributors
2422

2523
* Jones (created the original `hardware.inc`, now lost)
2624
* Carsten Sørensen (whose ideas Jeff based his file on)
2725
* Jeff Frohwein
2826
* AntonioND
29-
* BlitterObjectBob, tobiasvl, ISSOtm, avivace, Eievui, QuinnPainter, rondnelson99, daid, Hacktix, sukus21, alvaro-cuesta, basxto
27+
* BlitterObjectBob, tobiasvl, ISSOtm, Rangi42, avivace, Eievui, QuinnPainter, rondnelson99, daid, Hacktix, sukus21, alvaro-cuesta, basxto
3028
* Probably lots of other people who have added to the file throughout the years

0 commit comments

Comments
 (0)