Announcement

Collapse
No announcement yet.

Game Gear/Game Boy Encoder (Game Genie)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Game Gear/Game Boy Encoder (Game Genie)

    By Ben Boldt

    Set of JavaScript encoder/decoder functions for the Game Genie game enhancers.
    Written because I spent many years searching fruitlessly for someting simple to
    use and universally portable (without having to download, compile, or install).

    Notes:

    * Yes, strings are inefficient. This was mostly an attempt to understand the
    annoying bit operations (rotation, shifting, XOR, NOT) that Codemasters used
    to obfuscate the codes. Also, as JavaScript does not support 40 bit integers
    for bitwise operators (which are needed for 4 of the 5 game genies), this was
    far easier for me. See http://games.technoplaza.net/ggencoder/ for bitwise
    versions.

    * The NES Game Genie only addresses 15 bits of ROM space (0000-7FFF = RAM, 8000-
    FFFF = ROM) but as one bit is used for code length this is auto-corrected when
    decoding. Trying to generate a Game Genie code outside this range will simply
    adjust.

    * The Game Boy Game Genie doesn't write above 7FFF, and the Game Gear Game
    Genie doen't write above BFFF. Addresses are stored with full 16 bits and this
    is NOT auto-corrected, so be aware the codes may have no affect on the actual
    hardware (but some emulators may write them to RAM correctly).

    * I am unclear as to the limits of the Game Genie and Pro Action Replay on the
    16 bit systems. Meh, whatever.

    * Encoders return strings, decoders return associative arrays (objects) with
    x.address, x.value, and x.key.

    With thanks to the following resources (and others) for specs (but not code):

    http://www.monmouth.com/~colonel/vid...nes/genie.html
    http://developer.mozilla.org/en/Java...wise_Operators
    http://games.technoplaza.net/ggencoder/
    http://www.ticalc.org/archives/files...186/18686.html
    http://www.gshi.org/vb/threads/2350-...c-Porter/page2
    http://www.gshi.org/?s=faqs&id=114

    To do:

    * fixGGGB() function? meh, someone can just run it through decode/encode to fix
    * detect <enter> keystroke in input type="text" and click button thingy
    * query string operation?

    JavaScript Game Genie Encoders/Decoders
    The Hackmaster

  • #2
    So one of these didn't exist yet? Well, it's good that they exist now. I know I've seen people make Game Genie codes for Gameboy tho.

    Comment

    Working...
    X