Skip to content

Instantly share code, notes, and snippets.

@Siphonay
Last active May 23, 2026 23:49
Show Gist options
  • Select an option

  • Save Siphonay/b242877ec03127a4069283a0567a6a4f to your computer and use it in GitHub Desktop.

Select an option

Save Siphonay/b242877ec03127a4069283a0567a6a4f to your computer and use it in GitHub Desktop.
Game Boy Model Detector script for Korean Pokémon Gold/Silver
; compile with QuickRGBDS https://github.com/M4n0zz/QuickRGBDS
; Korean Pokémon Gold symbols
; Download from this link: https://github.com/Narishma-gb/pokegold-kr/blob/symbols/pokegold.sym
; Convert to .inc with the mapsymtoinc.py provided with QuickRGBDS
include "pokegold-kr.inc"
include "charmap.inc"
SECTION "GBModelDetector", ROM0
LOAD "MailWriterPayload", WRAMX[$de52]
ld a, [hAGB] ; 0 = CGB, 1 = AGB
add a
xor 'C' ; make a either $80 'A' or $82 'C'
ld hl, textContent+1 ; first character’s address
ld [hld], a ; make a first char of string, decrement hl for it to be textContent address
jp PrintText
textContent:
db $00, "CGB", $5f ; $00 is text box begin, $5f is blinking arrow prompt
.end
ENDL
fa ea ff 87 ee 82 21 60 de 32
c3 59 0f 00 82 86 81 5f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment