Category Archives: Games

Info Page – @FPAdventuresBot

@FPAdventuresBot currently posts images from the following games:

  • Myst (1993)
    • Extract tool: Riveal
    • Image count: 1531
    • Data files / areas covered:
      • INTRO.DAT
      • MYST.DAT
      • STONE.DAT
      • SELEN.DAT
      • MECHAN.DAT
      • DUNNY.DAT
  • Lighthouse: The Dark Being (1996)
  • The 7th Guest (1993)
    • Extract tool: Custom
    • Image count: 482
    • Data files / areas covered:
      • AT, CH, DR, GA, HTBD, JHEK, LA, MB, MU, P, B, D, FH, HDISK, INTRO, K, LI, MC, N
  • The Journeyman Project (1993)
    • Extract tool: ffmpeg
    • Image count: 2045
    • Data files / areas covered:
      • TSA/T_NAV.AVI
      • WSC/W_NAV.AVI
  • Return to Zork (1993)
    • Extract tool: Custom
    • Image count: 256
    • Data files / areas covered:
      • MS-DOS
      • Mac
  • Riven: The Sequel to Myst (1997)
    • Extract tool: Riveal
    • Image count: 3480
    • Data files / areas covered:
      • a_Data.MHK
      • b_Data.MHK
      • g_Data.MHK
      • j_Data1.MHK
      • j_Data2.MHK
      • o_Data.MHK
      • p_Data.MHK
      • r_Data.MHK
      • t_Data1.MHK
      • t_Data2.MHK

Secret of Evermore (Bugfixed)

Secret of Evermore is a game for the Super Nintendo released in 1995. It continues to be a somewhat controversial title in the otherwise spotless Squaresoft SNES library… but I like it, and my wife plays it as a “comfort game” whenever she is feeling sick.

IPS is an antiquated binary patch file format, used to provide a “diff” of raw bytes that should be applied over an existing file. IPS patches for SNES games are widespread, and often do things like enable cheats, alter graphics, translate text, etc. In some cases, people have found bugs or glitches in the original code, and release an IPS patch to fix it. Often these are found from the work of speedrunners, who spot a glitch and exploit it to break the game in some way. The SNES hackers then identify the code problem behind the bug, and patch the raw binary code to close the hole. There’s a whole black art to crafting binary bugfixes – the space for a fix is severely limited, and if the new code is too big you have to find additional unused code area elsewhere to jump into (or optimize a different routine to make some free space!)

For some games, more than one bugfix patch is available. Managing these with the ubiquitous LunarIPS tool is a pain – you have to generate a bunch of intermediate ROMs, and the patches may conflict / overwrite one another without indication of the problem. There are better IPS patchers around, but I didn’t want to go on a research quest to find one. Besides, IPS is a pretty simple format – why not just write my own patcher?

I wanted a way to take a binary file, apply a complete “patch set” to it, and return the resulting bin. I wanted it to check for conflicts in patches, and give a descriptive message of which exact patches were colliding. And then I didn’t want to just serve up a cooked file, for copyright and maintainability reasons. “XYZ (Bugfixed)” hacks are too frequently outdated, as new patches are released. So I put a simple PHP frontend before it and a folder full of patches server-side.

The tool is here:

Users can upload a file. If the SHA-1 matches, it gets patched and they download the fixed version. This tool is for Secret of Evermore, with all the patches (i.e. “hard work”) done by Assassin17.

I may stand up sites for other games as I run across them, or merge these into a single “bugfixer” tool if it gets too out of control.

The script follows.
Continue reading


Before there was World of Warcraft, there was Everquest. I never played it but I had a buddy in college who did: he talked about how amazing the MMO genre was, with all its social aspects, technical quirks, and just plain cool experiences.

Naturally it inspired me to make my own clone. In Visual Basic. With 2d graphics and piping everything through the Winsock .ocx control. Full of programmer art made with a pirated copy of Bryce 3d.


Ah, the wide-eyed days of a young programmer in a rapidly expanding genre. It’s like I was playing out every cliche of the newbie at once. The one thing I had going for me, though, was a thorough understanding of the impossibility of such a project – and a sense of humor about it all. For example, I often joked that the only enemies were going to be Gelatinous Cubes, because that would be easy to render. I once wrapped a photo of my roommate’s face on a sphere to use for a hideous player character head. And so on. Eventually I got about as far as a character select screen, with a couple songs, before giving up and moving on to something else.

Unlike SlugFest, this is one that isn’t ever going to get off the ground. If anyone is interested in the art and music resources, you can have them: hereby released into the Public Domain.


This isn’t my only brush with the MMO genre. Later on some friends and I tried another take on it (“Draconis”) as the U of A Game Dev club project – with a result somewhat similar to The Mana World, and it once held up to five players online simultaneously. The real killer for these kind of games is the sheer amount of content required. Though Draconis worked technically, all the content in the world was viewable at first login. Hardly a compelling MMO experience.

Download GregerQuest Resources: .ZIP file, 1.9mb.

iNES Header Fixer

Auditing ROM collections has been made much simpler over the years thanks to concerted efforts of many cartridge purchasers, dumpers, cataloguers, and coders.  Using a combination of RomCenter (or ClrMamePro) and a No-Intro .Dat file, one can quickly fix an entire collection in one go: repairing names, verifying regions, checking for problem ROMs, producing have-lists, etc etc.

NES roms throw a particular curveball because they carry a 16-byte header with a little info about the board within the cart.  Emulators need this info, but it isn’t verified by No-Intro since it’s not part of any real dump.  As a result iNES headers remain missing, incorrect, or filled with crap data.  A new repair tool is needed. is a Python script which can repair defunct iNES headers using an external cart database.  It does this by extracting the data portion from the file, calculating a crc32, looking for the crc the xml file, and then rebuilding a header based on that info.  If the old and new headers differ, the file is overwritten with a fixed version.

Be careful with this tool: it’s sort of a blunt object, and may trash your rom collection if not used carefully.  Make backups.  In particular it writes only iNES v1 headers, expecting emulators to cope with the shortcomings of this format.

Output samples:
-> No change to existing header

CRC check: 4318A2F8
Found CRC match: Barker Bill's Trick Shooting
*** Header unchanged: not writing replacement file.

-> Adding a battery

CRC check: 1F6EA423
Found CRC match: Baseball Simulator 1.000
oldHeader: 4e45531a081010000000000000000000
newHeader: 4e45531a081012000000000000000000
All done.  Wrote new file roms/Baseball Simulator 1.000 (USA).nes

-> Correcting a mapper, vertical mirroring, and removing “DiskDude!”

CRC check: 9BDE3267
Found CRC match: Adventures of Dino Riki
oldHeader: 4e45531a0204004469736b4475646521
newHeader: 4e45531a020431000000000000000000
All done.  Wrote new file roms/Adventures of Dino Riki (USA).nes

-> Standardizing on “horizontal mirroring”

CRC check: 3ECA3DDA
Found CRC match: Bases Loaded 3, Ryne Sandberg Plays
oldHeader: 4e45531a101041000000000000000000
newHeader: 4e45531a101040000000000000000000
All done.  Wrote new file roms/Bases Loaded 3 (USA).nes

-> Adding a missing header

CRC check: 50CCC8ED
Found CRC match: Battleship
newHeader: 4e45531a020430000000000000000000
All done.  Wrote new file roms/Battleship (USA).nes

Here’s the script:

Converts NES ROMs to iNES format, applying correct iNES header.
Usage: ines-fix 
Supported infile formats are .nes, .pas (headerless .nes)

ROM data is recognized by CRC32 using BootGod's master XML database
  so make sure you have a local copy

import sys
import struct
from binascii import crc32
from xml.etree import ElementTree

##### String holding location of cart db
cart_xml = "NesCarts (2011-09-10).xml"
# uncomment next line to use Nestopia's DB instead
# cart_xml = "NstDatabase.xml"

# Other required vars
i_fmt = 'p'
blob = None
found = 0
oldHeader = ""

# Parse command-line

if (len(sys.argv) != 2):
    print "Usage: " + sys.argv[0] + " "

# Open rom database
#print "Attempting to open cart db " + cart_xml
tree = ElementTree.parse(cart_xml)
#print "DB opened!"

# Attempt to open supplied rom file

    with open(sys.argv[1], "rb") as f:
        tag =
        if (tag == "NES\x1A"):
            i_fmt = 'i'
            oldHeader =

#        print "Detected " + i_fmt + " format for input file"

        blob =

except IOError as (errno, strerror):
    print "Error opening " + sys.argv[1] + ": "
    print "I/O error({0}): {1}".format(errno, strerror)

if (len(blob) > 0):
    format_crc32 = format(crc32(blob) & 0xFFFFFFFF, '08X')
    print "CRC check: " + format_crc32

    # go look up crc32 in db
    game_list = tree.findall("game")
    for game in game_list:
        cart_list = game.findall("cartridge")
        for cart in cart_list:
            if (cart.attrib.get('crc') == format_crc32):
        if (found):

    if (found == 0):
        print sys.argv[1]
        print "*** CART NOT FOUND IN DB"
        print "----------------------------------------------------"

print "Found CRC match: " + game.attrib.get("name").encode('ascii', 'ignore')

# retrieve data from game
board = cart.find("board")
mapper = int(board.attrib.get("mapper"))

prg_size = 0
prg_list = board.findall("prg")
for prg in prg_list:
    prg_size = prg_size + int(prg.attrib.get("size") [:-1])

chr_size = 0
chr_list = board.findall("chr")
for chr in chr_list:
    chr_size = chr_size + int(chr.attrib.get("size") [:-1])

battery = 0
wram_list = board.findall("wram")
for wram in wram_list:
    if (wram.attrib.get("battery") is not None):
        battery = int(wram.attrib.get("battery"))

chip_list = board.findall("chip")
for chip in chip_list:
    if (chip.attrib.get("battery") is not None):
        battery = int(chip.attrib.get("battery"))

mirror_4 = 0
mirror_v = 0
pad = board.find("pad")
if (format_crc32 == "CD50A092" or \
    format_crc32 == "EC968C51" or \
    format_crc32 == "404B2E8B"):
    mirror_4 = 1
elif (pad is not None):
# the "h" pad means "v" mirror
    mirror_v = int(pad.attrib.get("h"))

mapper_lo = mapper & 0x0F
mapper_hi = mapper & 0xF0

newHeader = "NES\x1a" + \
              struct.pack("BBBB", \
                ( prg_size / 16 ), \
                ( chr_size / 8 ), \
                (mapper_lo << 4) + (mirror_4 << 3) + (battery << 1) + (mirror_v)
, \
                (mapper_hi) ) + ( '\0' * 8 )

if (newHeader != oldHeader):
    print "*** HEADER UPDATED ***\noldHeader: " + oldHeader.encode('hex')
    print "newHeader: " + newHeader.encode('hex')

    # write new file
        with open(sys.argv[1], "wb") as f:
            f.write( newHeader )
            f.write( blob )

    except IOError as (errno, strerror):
        print "Error opening " + sys.argv[1]
        print "I/O error({0}): {1}".format(errno, strerror)

    print "All done.  Wrote new file " + sys.argv[1]
    print "*** Header unchanged: not writing replacement file."
print "----------------------------------------------------"

For those having problems with copy-paste, you can download a .zip containing the script here:

Timewave v1.2

Timewave is a 2-d space shooter written in C++ using some of the freely available SDL libraries. It runs on Windows, Linux, and Mac OSX (10.4 or later). The object of this game is to fight through the mass of enemies in each level, defeat the level boss, and finally destroy the (well-armed) enemy space station far from Earth.

It has an interesting “twist” in which you can alter the flow of time. Build up your time meter by playing the game in fast-forward. Playing in slow motion affords you some extra maneuvering room but depletes the meter. If you achieve a high score, you can choose a color flag to represent your ship and have yourself recorded on the high score table.

This game is ‘freeware’ – you can download it and copy it around to anyone you like, you can even alter the graphics to better suit your tastes if you wish, but don’t pull my name off it and try to pass it off as your own work. You can’t get the source code though because it’s a total wreck. I may go and try cleaning it up later for a release, but until then, the binaries in the download should work just fine.

Last updated Aug. 7, 2007 – click for full-size

Recent Changelog

  • Reduction in resource file sizes: some items converted to 256-color, optipng and audio editing shaved further bytes.
  • Renamed hiscore.dat to config.ini, and added more options.
  • New command line options: -f (switch to Fullscreen mode), -c (Create Config: just write config.ini and exit), -w (switch to Windowed mode)
  • Added a “Change Keys” button which allows users to alter the inputs.
  • Added “Arcade Mode” switch to the config.ini file. This causes the game to simulate an arcade machine on Free Play: the title screen rotates with the high score table.
  • The arrow keys now drive the cursor on the high score color picker table.
  • Mac OSX port (PPC / Intel Universal Binary, 10.4 or greater).

Last updated May 3, 2012