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
@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
@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
@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
@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 / 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 / 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 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 ROM headers
Last active August 15, 2023 21:48
Gameboy ROM headers
1.01 - Added some new licensees, fixed some
descriptions.
v1.00 - Initial release.
_______________
This information was taken and compiled from Martin Korth's
NO$GMB emulator. Best viewed in DOS EDIT.
Every Gameboy ROM header starts off at the HEX offset 0134.
@drhelius
drhelius / GameBoy Color Boot ROM Disassembly
Last active March 1, 2024 10:30
GameBoy Color Boot ROM Disassembly
; GameBoy Color Boot ROM Disassembly
; Dumped by Costis
; Commenting by Randy Mongenel (Duo)
; WORK-IN-PROGRESS VERSION 09-27-2009
; ===========================================================================
; Segment type: Pure code
SECTION "ROM", CODE
@drhelius
drhelius / Game Boy Boot ROM Disassembly
Last active November 20, 2023 18:34
Game Boy Boot ROM Disassembly
LD SP,$fffe ; $0000 Setup Stack
XOR A ; $0003 Zero the memory from $8000-$9FFF (VRAM)
LD HL,$9fff ; $0004
Addr_0007:
LD (HL-),A ; $0007
BIT 7,H ; $0008
JR NZ, Addr_0007 ; $000a
LD HL,$ff26 ; $000c Setup Audio