Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)
You are not logged in.
Hi, I'm upgrading a cgb emulator and I would like to emulate any obscure io register.
Did anyone try to dump the whole IO registers range in CGB mode on a CGB hw and have that info?
I can't find that info on any git/forum/etc I searched. Only some JOY and x7X regs and not much about their default values.
I compiled the mts suite (https://github.com/Gekkio/mooneye-test-suite) with the CART_CGB set,
for dump_boot_hwio and unused_hwio-C, but unfortunately I don't have a flash cart to test on my game boy color.
Said compiled roms/symbols/source are here:
https://mega.nz/file/xI83zKYA#5D9q57j8J … tTTjR82J90
Any help is appreciated.
(Ofc I understand that the unused_hwio would be annoying to test, since it will require editing for CGB mode.)
Offline
The newer version of Pan Docs has initial values for all the regular IO registers.
https://gbdev.io/pandocs/Power_Up_Seque … -registers
Note that some of them are changing over time, like LY, STAT and DIV. I made a test ROM to test (particularly) DIV with high precision. Note that this test relies on reading DIV at the correct time in the instruction. A real CPU would spend 1-3 M cycles reading the instruction before the actual read of DIV takes place.
https://github.com/nitro2k01/whichboot.gb
There are also the undocumented FF7x registers. Those should all be static over time, except PCM12/PCM34 (FF76/FF77) which indicate the current amplitude level of each audio channel.
Offline
I'm searching for values for everything that is not mentioned clearly in pan docs (not the regular registers).
And just to make it clear, I'm interested on their behavior after the bios runs and launches a game.
In pan docs the table was taken from the mts roms which all run in DMG mode.
So, should I assume that all FF6x and FF7x have the same values and writable bits in CGB mode like how it is in DMG mode?
Also it seems to me that pan docs incorrectly states that FF72/3/5 are CGB only mode, since the boot_hwio-C is run in DMG mode and the table has the initial values.
(3 obscure regs (except FF74) in pan docs: https://gbdev.io/pandocs/CGB_Registers. … -mode-only)
(they have values in dmg mode: https://github.com/Gekkio/mooneye-test- … o-C.s#L107)
So basically that's what I get from mixing pan docs and mts roms (In: initial, W: writable):
DMGm CGBm In W In W FF60+ FF 00 FF 00 FF60 to FF67 FF6D+ FF 00 FF 00 FF6D to FF6F FF71 FF 00 FF 00 FF72 00 FF 00 FF FF73 00 FF 00 FF FF74 FF 00 00 FF FF75 8F 70 8F 70 FF78+ FF 00 FF 00 FF68 to FF7F
Last edited by ctcaer (2024-05-14 03:45:24)
Offline