Skip to content
/ gbgenie Public

A small utility to encode and decode Game Genie codes for the Nintendo GameBoy.

Notifications You must be signed in to change notification settings

0xb0bb/gbgenie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gbgenie

A small utility to encode and decode Game Genie codes for the Nintendo GameBoy.

Usage

Command Line

$ ./gbgenie.py 
usage:    ./gbgenie.py <code>
          ./gbgenie.py <addr> <value> [original]

examples:

    decode: ./gbgenie.py 001-5CA-E62
            ./gbgenie.py 001-5CA

    encode: ./gbgenie.py 0x7654 0x01
            ./gbgenie.py 0x7654 0x02 0xff
            ./gbgenie.py 1234 ab cd

$ ./gbgenie.py 004-BCE-E66
0x14bc: 0x03 => 0x00

$ ./gbgenie.py 0x14bc 0x00 0x03
code: 004-BCE-E66

Python

#!/usr/bin/python
import gbgenie

CODE = '004-BCE-E66'

# decode a gameboy game genie code
data = gbgenie.decode(CODE)
print 'DECODE:  %s' % CODE
print 'addr: 0x%02x; original: 0x%02x; replace: 0x%02x\n' % (data['addr'], data['original'], data['value'])

# encode back into a gameboy game genie code
code = gbgenie.encode(data['value'], data['addr'], data['original'])
print 'ENCODE:  (0x%02x, 0x%02x, 0x%02x)' % (data['addr'], data['original'], data['value'])
print 'ggcode:  %s' % code

About

A small utility to encode and decode Game Genie codes for the Nintendo GameBoy.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages