![]() |
| Register | Login | |||||
|
Main
| Memberlist
| Active users
| Calendar
| Chat
| Online users Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album |
|
| | |||
| 0 users currently in ROM Hacking. |
| Acmlm's Board - I3 Archive - ROM Hacking - [GB/GBC] ROM and Banks... |
New poll | | ![]() |
| Add to favorites | Next newer thread | Next older thread |
| User | Post | ||
neotransotaku![]() Sledge Brother Liberated from school...until MLK day Since: 11-17-05 From: In Hearst Field Annex... Last post: 5910 days Last view: 5907 days |
| ||
| I was wondering if someone could explain to me the relationship between banks and the breakdown of memory addresses in a GB/GBC game... | |||
|
HyperHacker Star Mario Finally being paid to code in VB! If only I still enjoyed that. <_< Wii #7182 6487 4198 1828 Since: 11-18-05 From: Canada, w00t! My computer's specs, if anyone gives a damn. STOP TRUNCATING THIS >8^( Last post: 5908 days Last view: 5908 days |
| ||
| On a GB/GBC, ROM is mapped into addresses 0000-7FFF. This means only 32K is accessible at a time. Games get around this by using some hardware in the cartridge that allows them to chnage which parts of the ROM are mapped. Most games divide the ROM into 16K banks; bank 0 (ROM addresses 0-3FFF) is always mapped to 0000-3FFF, and any other bank can be mapped to 4000-7FFF.
Some code to convert raw ROM addresses to CPU bank/address and back: /*
|
|||
Dan![]() Purple Leever Since: 11-18-05 Last post: 5916 days Last view: 5907 days |
| ||
| Completely off-topic question, but while we are talking about GB, but how do palettes work for the GB? Can every tile just use four colours, or are there different shades that can be used? | |||
|
HyperHacker Star Mario Finally being paid to code in VB! If only I still enjoyed that. <_< Wii #7182 6487 4198 1828 Since: 11-18-05 From: Canada, w00t! My computer's specs, if anyone gives a damn. STOP TRUNCATING THIS >8^( Last post: 5908 days Last view: 5908 days |
| ||
| The screen can display a whopping 4 different colours. Each pixel has a value from 0 to 3. There are three I/O registers that allows you to select which colour each value corresponds to; one for backgrounds, and two for sprites. (Sprites have an attribute bit that selects which to use.) This is also how GBC and SuperGB colourize games; they assign various colours to each pixel value. |
| Add to favorites | Next newer thread | Next older thread |
| Acmlm's Board - I3 Archive - ROM Hacking - [GB/GBC] ROM and Banks... |
| ![]() |