Skip to content

Define constants for the ROM header at $0100 - #91

Merged
Rangi42 merged 1 commit into
gbdev:masterfrom
Rangi42:rom-header
Aug 11, 2026
Merged

Define constants for the ROM header at $0100#91
Rangi42 merged 1 commit into
gbdev:masterfrom
Rangi42:rom-header

Conversation

@Rangi42

@Rangi42 Rangi42 commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Fixes #90

Relevant Pan Docs: https://gbdev.io/pandocs/The_Cartridge_Header.html

I'm not adding constants for every datum offset in the header region, because those are almost always only relevant for bootroms.

With these constants, you can define the entry point section without magic numbers:

SECTION "Header", ROM0[ROM_HEADER]
	nop
	jp EntryPoint
	ds ROM_HEADER + ROM_HEADER_SIZE - @, 0 ; reserve space for RGBFIX

@Rangi42
Rangi42 requested a review from avivace August 10, 2026 16:09
@Rangi42
Rangi42 merged commit 2c5072b into gbdev:master Aug 11, 2026
2 checks passed
@Rangi42
Rangi42 deleted the rom-header branch August 11, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Header address-related macros.

2 participants