Jump to content
Visual Boy Advance-M
aceloop

GBC boot code support

Recommended Posts

Are you talking about me?

 

What do I have to do to get these plaettes working? Just execute the BIOS right at the beginning and it will set them up correctly? That would be very easy.

Share this post


Link to post
Share on other sites

Hopefully it's easy.

None of the use made Metroid 2 palettes come close to the quality of the GBC Bios Metroid 2 palette...I have a feeling that's why they didn't make Metroid 2 DX.

 

A good handful of games have palette's built into the GBC bios, so it's a huge improvement to an emulator to get that feature functional.

Share this post


Link to post
Share on other sites

OK, so I have the MFC settings already done.

 

Here's something very important by Costis Sideris:

To my delight, the whole GBC boot ROM was sitting right there, mapped from 0×0000 to 0×00ff and from 0×0200 to 0×08ff! External ROM is thus mapped from 0×0100 to 0×01ff and 0×0900 to 0×7fff.
#

 

source: http://www.fpgb.org/?page_id=17

 

The pandocs only say:

0000-3FFF 16KB ROM Bank 00 (in cartridge, fixed at bank 00)

 

Well, I don't know very much about the GB/GBC, but I think copying over the BIOS file to the adresses mentioned by Costis Sideris will do the job. Since he most likely filled out that gap from 0x100 to 0x200 with something, I can just copy the whole thing to adress 0 adn the gap will be filled with the ROM >later< by the emu.

 

 

By the way, is he the same Costis mentioned in the about box of VBA?

Share this post


Link to post
Share on other sites

Spacy can you tie it specifically into CGB emulation, rather then base it on file / rom types?

 

a GBC game on a GBA for instance doesn't dispaly the GBC bootrom :P.

Share this post


Link to post
Share on other sites

a GBC game on a GBA for instance doesn't dispaly the GBC bootrom :P.

 

 

Are you sure about that? The GBA contains the GB CPU & sound circuits, so why not?

Share this post


Link to post
Share on other sites

Lol, now I got the GBC BIOS booting in non-color mode (GBC bios emulated by a GB mono, wtf).

 

 

I'll just upload the MFC GUI changes for now, until someone can tell me what I have to change. The GB code is a mess :P

Share this post


Link to post
Share on other sites

@Squall: Any progress so far?

 

I found a site giving some useful info about the GBC BIOS:

http://mess.redump.net/sysinfo:gbcolor

 

It tells you the keycodes to select a specific color and the games that get their own palette.

 

When I had a GBC, I had only GBC games, so I did not know about this feature xD

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×