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 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
@PhirePhly
PhirePhly / ISA.txt
Created March 26, 2012 20:42
Intro to the ISA bus by Mark Sokos
THE ISA AND PC/104 BUS
IBM, IBM/XT, IBM PC, and IBM PC AT are registered trademarks of
International Business Machines Corporation.
This file is designed to give a basic overview of the bus found in
most IBM clone computers, often referred to as the XT or AT bus. The
AT version of the bus is upwardly compatible, which means that cards
@jdennes
jdennes / pre-commit.py
Created November 18, 2009 21:48
pre-commit svn hook in python
# pre-commit.py:
#
# Performs the following:
# - Makes sure the author has entered a log message.
# - Makes sure the author is only creating a tag, or if deleting a tag, author is a specific user
# - Makes sure the author is not committing to a particular set of paths in the repository
#
# Script based on http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/log-police.py
#
# usage: pre-commit.py -t TXN_NAME REPOS