GBC boot code support

person
Junior Member
Posts: 3
Joined: Sat Jan 30, 2010 11:48 am

GBC boot code support

Post by person »

Can you please add support for the GBC boot code?

 

The reason I would like it supported is that it contains a big database of predefined palettes, used to sligthly colorize certain older GB games. It also has the proper startup animation, and the 12 manually selectable palettes for GB games.

 

It should not be difficult to add support for the code. It only writes to 3 non-documented registers, were we already know the function of 2 of them. The last unknown register can therefore easily be guessed.

 

  • $FF50 = the value of $11 is written to this register, causing the startup-code to dissapear from the memory map.

    $FF4C = CPU/timer/divider/serial/DMA Speed controll. If a GBC game is loaded; $80 is written to it, and if a GB game is loaded; $04 is written to it.

    $FF6C = Register to lock the hardware into DMG-emulation mode. If a GB game is loaded; $01 is written to this register.

 

About colorization of GB games, the startup sequence will load palettes for Obj0, Obj1, and BG0 into the GBC palette memory. this is done rigth after setting DMG-emulation mode, and those colors are used as an "overlay" of the palettes stored in the GB palette registers.

 

I hope this is enough information for you to implement this feature.

Last edited by person on Tue Feb 02, 2010 4:08 am, edited 1 time in total.
person
Junior Member
Posts: 3
Joined: Sat Jan 30, 2010 11:48 am

GBC boot code support

Post by person »

Please exuse my post. I didn't see the topic already were posted...

 

Anyways, I'm currently working on disassembling the Boot code, and I can confirm the palettes are stored within the Boot ROM.

 

I can also confirm that it will work just by making the code appear on offset $0000 (part 1) and $0200 (part 2). The header of the game must be present at offset $0100. You may need to add some code to redirect the GB-grayscale palette registers to the GBC OBJ0/OBJ1/BG0 palette registers if a nonzero write to $FF6C has been issued, but that should be all.

 

I've uploaded a picture displaying all the palettes used to colorize GB-games, however it is to note that there are some additional non-standard palettes that starts at the last color of one palette and continues through the three first colors of the next palette. There are only two of those non-standard palettes, though.

 

The first palette is 00, then next is 08, the third is 10 and so on all the way to E8 for the normal palettes. The two nonstandard palettes are 1E and DE, and they therefore starts at the last color of 18 or D8, with the three first colors of 20 or E0 following.

 

[attachment=184]

Last edited by person on Tue Feb 02, 2010 4:39 pm, edited 1 time in total.
Squall Leonhart
Posting Freak
Posts: 1223
Joined: Tue Mar 18, 2008 9:21 am

GBC boot code support

Post by Squall Leonhart »

Want =! Get.

Peladon
Junior Member
Posts: 2
Joined: Tue Jul 03, 2012 9:46 pm

GBC boot code support

Post by Peladon »

I need a working patch in order to use the Game Boy Color boot ROM!

Squall Leonhart
Posting Freak
Posts: 1223
Joined: Tue Mar 18, 2008 9:21 am

GBC boot code support

Post by Squall Leonhart »

Implement it yourself if you're that desperate.

mudlord
Senior Member
Posts: 306
Joined: Sun Feb 08, 2009 7:16 am

GBC boot code support

Post by mudlord »

i wish this was never invented.

Peladon
Junior Member
Posts: 2
Joined: Tue Jul 03, 2012 9:46 pm

GBC boot code support

Post by Peladon »

i wish this was never invented.

But why?

Post Reply