Skip to content

Commit bc65aa3

Browse files
authored
power up sequence: accurately reflect which registers are available (#535)
* Fix initial register table While the current table is technically correct, it doesn't tell *why* those values are the way they are. This edit should mitigate that. * Missed SVBK, correct its initial value as well * Clarify CGB-mode regs with a new footnote
1 parent 16bb7e8 commit bc65aa3

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

src/Power_Up_Sequence.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -312,19 +312,19 @@ Name | Address | DMG0 | DMG / MGB | SGB / SGB2 | CGB / AGB
312312
[`OBP1`] | $FF49 | ??[^obp] | ??[^obp] | ??[^obp] | ??[^obp]
313313
[`WY`] | $FF4A | $00 | $00 | $00 | $00
314314
[`WX`] | $FF4B | $00 | $00 | $00 | $00
315-
[`KEY1`] | $FF4D | $FF | $FF | $FF | $FF
316-
[`VBK`] | $FF4F | $FF | $FF | $FF | $FF
317-
[`HDMA1`] | $FF51 | $FF | $FF | $FF | $FF
318-
[`HDMA2`] | $FF52 | $FF | $FF | $FF | $FF
319-
[`HDMA3`] | $FF53 | $FF | $FF | $FF | $FF
320-
[`HDMA4`] | $FF54 | $FF | $FF | $FF | $FF
321-
[`HDMA5`] | $FF55 | $FF | $FF | $FF | $FF
322-
[`RP`] | $FF56 | $FF | $FF | $FF | $FF
323-
[`BCPS`] | $FF68 | $FF | $FF | $FF | ??[^compat]
324-
[`BCPD`] | $FF69 | $FF | $FF | $FF | ??[^compat]
325-
[`OCPS`] | $FF6A | $FF | $FF | $FF | ??[^compat]
326-
[`OCPD`] | $FF6B | $FF | $FF | $FF | ??[^compat]
327-
[`SVBK`] | $FF70 | $FF | $FF | $FF | $FF
315+
[`KEY1`] | $FF4D | --- | --- | --- | $7E[^cgb_only]
316+
[`VBK`] | $FF4F | --- | --- | --- | $FE[^cgb_only]
317+
[`HDMA1`] | $FF51 | --- | --- | --- | $FF[^cgb_only]
318+
[`HDMA2`] | $FF52 | --- | --- | --- | $FF[^cgb_only]
319+
[`HDMA3`] | $FF53 | --- | --- | --- | $FF[^cgb_only]
320+
[`HDMA4`] | $FF54 | --- | --- | --- | $FF[^cgb_only]
321+
[`HDMA5`] | $FF55 | --- | --- | --- | $FF[^cgb_only]
322+
[`RP`] | $FF56 | --- | --- | --- | $3E[^cgb_only]
323+
[`BCPS`] | $FF68 | --- | --- | --- | ??[^compat]
324+
[`BCPD`] | $FF69 | --- | --- | --- | ??[^compat]
325+
[`OCPS`] | $FF6A | --- | --- | --- | ??[^compat]
326+
[`OCPD`] | $FF6B | --- | --- | --- | ??[^compat]
327+
[`SVBK`] | $FF70 | --- | --- | --- | $F8[^cgb_only]
328328
[`IE`] | $FFFF | $00 | $00 | $00 | $00
329329

330330
[^unk]:
@@ -343,6 +343,8 @@ Make sure to always set those before displaying objects for the first time.
343343
[^compat]:
344344
These depend on whether compatibility mode is enabled.
345345

346+
[^cgb_only]: These registers are only available in CGB Mode, and will read \$FF in Non-CGB Mode.
347+
346348
The table above was obtained from Mooneye-GB tests [`acceptance/boot_hwio-dmg0`](https://github.com/Gekkio/mooneye-gb/blob/ca7ff30b52fd3de4f1527397f27a729ffd848dfa/tests/acceptance/boot_hwio-dmg0.s), [`acceptance/boot_hwio-dmgABCmgb`](https://github.com/Gekkio/mooneye-gb/blob/ca7ff30b52fd3de4f1527397f27a729ffd848dfa/tests/acceptance/boot_hwio-dmgABCmgb.s), [`acceptance/boot_hwio-S`](https://github.com/Gekkio/mooneye-gb/blob/ca7ff30b52fd3de4f1527397f27a729ffd848dfa/tests/acceptance/boot_hwio-S.s), and [`misc/boot_hwio-C`](https://github.com/Gekkio/mooneye-gb/blob/ca7ff30b52fd3de4f1527397f27a729ffd848dfa/tests/misc/boot_hwio-C.s), plus some extra testing.
347349

348350
[`P1`]: <#FF00 — P1/JOYP: Joypad>

0 commit comments

Comments
 (0)