GBV1FIX Manual
--------------

Ever wondered why you can't play some games on your Bung cart? The reason
is that the old Bung carts have a bug (or "feature") which some games
accidently uses. This tool tries to automatically patch a "bad" ROM
so it works. Sometimes, you have to specify some parameters (see list.txt)

How to use it
-------------
Assume the ROM image 'game.gbc' doesn't work. Most of the time, it should
be enough to type

 gbv1fix game.gbc
 
to patch the cartridge. You can now just send the patched cart to your Bung
cartridge and play.

Sometimes you'll get an error message when running the program. This
happens when the program can't find 16 bytes of free space in ROM bank 0.
If this is the case, it's most likely because the free space is scrambled
(filled with garbage). By using the -c parameter, you can specify a
location to store the patch information (16 bytes).

If this still doesn't fix the bug, it's because the game doesn't use
the VBlank interrupt regularly. You'll then have to locate a spot which
is either run regularly or some other spot where you can patch the
game in order to get it to work (see below). This can be very tricky,
but most of the time it ain't required. By using the -p parameter
you can specify where the "patch interrupt" should occur. If this
location is not an interrupt (40, 48, ...) the instruction(s) at this
location must be 3 byte (or 1/2, or 2/1).

What IS the actualy bug?
------------------------
The old Bung cart has an extra register which seems to select whether
the cart should run in 4mbit or 16mbit mode. This register is changed
by writing to 6000-7FFF (the same way you select ROM bank). The only
important bit in the register is bit 0. If it's set (1), which is
default, the cart runs in 16mbit mode. If it's cleared (0), the
cart runs in 4mbit mode. This means you can't access ROM bank 32-127!
When reading from ROM bank 40, you actually read from ROM bank 8.

Some games does some "clever" coding and writes to this area (in
Asterix & Obelix, this happens after the end of a sound effect).


ZIZERO /EUR^NFL
