Skip to content

Instantly share code, notes, and snippets.

View drhelius's full-sized avatar
🔥
Utterly overdriven

Ignacio Sanchez Gines drhelius

🔥
Utterly overdriven
View GitHub Profile
@drhelius
drhelius / Game Boy MBC 3
Last active January 4, 2017 08:10
Memory Bank Controller (MBC) 3 for GameBoy Information
Memory Bank Controller (MBC) 3 for GameBoy Information
by bRILLO hEAD, 1-Jan-98
The MBC3 is a memory controller for some GameBoy carts
@drhelius
drhelius / Gameboy's video hardware
Last active April 5, 2018 02:05
Gameboy's video hardware
Nitty Gritty Gameboy Cycle Timing
---------------------------------
A document about the down and dirty timing of the Gameboy's video hardware.
Written by: Kevin Horton
Version: 0.01 (preliminary)
My findings here are based on the original DMG, Super Gameboy, and GB
@drhelius
drhelius / Game Boy Sound Operation
Last active August 16, 2023 02:31
Game Boy Sound Operation
Game Boy Sound Operation
------------------------
Shay Green (blargg)
gblargg@gmail.com
http://www.slack.net/~ant/
** This is an incomplete draft
This documents the behavior of Game Boy sound; details which aren't
relevant to the observable behavior have been omitted unless they
@drhelius
drhelius / Game Boy - Hardware detection
Last active March 9, 2024 19:38
Game Boy - Hardware detection
To detect Super Game Boy, the values of SGB Flag and Old Licensee Code must be set in the cartridge header. In detail, that would mean that the value of $0146 is $03 and the value of $014B is $33.
To detect Game Boy Color, use the value of the CGB Flag in the cartridge header. If the value of $0143 is $80, then the game should be compatible with both normal and color Game Boy models. If it is $C0, then it should only work with Game Boy Color.
Additionally, some games check the value of the Accumulator directly after startup. If the value is $01, then the hardware is either Super Game Boy or normal Game Boy. If it is $FF, then the hardware is either Super Game Boy 2 or Game Boy Pocket. If it is $11, then it is either Game Boy Color or Game Boy Advance.
Lastly, you can detect if the game is on a Game Boy Advance by checking bit 0 of the B register directly after startup. If it is cleared, it is a Game Boy Color. If it is set, it is a Game Boy Advance.
__________
Note: The Super Game Boy 2 was little more th
@drhelius
drhelius / GameBoy Color DMA-Transfers
Last active June 23, 2021 13:11
GameBoy Color DMA-Transfers
GameBoy Color DMA-Transfers v0.0.1 13.04.2000/GPZ-HIT
-------------------------------------------------------------------------------
"old" DMA Transfer (aka 'OAM-DMA')
----------------------------------
source: - anywhere from $0000 to $dfff
- must be page-aligned
destination: - always OAM-Ram at $fe00 - $fe8f
length: - always 4*40 (=160 / $a0) bytes