Snezziboy User Guide
-----------------------------------------------------------

Contents

1. Licensing
2. About Snezziboy
3. File Manifest
4. How to use
5. Patch Data
6. Credits


1. Licensing
~~~~~~~~~~~~~~~~~~~~~

The Snezziboy Emulator ("Program") is:

Copyright (C) 2006 bubble2k

This program is free software; you can redistribute it and/or 
modify it under the terms of the GNU General Public License as 
published by the Free Software Foundation; either version 2 of 
the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, 
but WITHOUT ANY WARRANTY; without even the implied warranty of 
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
GNU General Public License for more details.

You should have received a copy of the GNU General Public 
License along with this program; if not, write to the Free 
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
MA 02111-1307 USA


2. About Snezziboy
~~~~~~~~~~~~~~~~~~~~~

Snezziboy was inspired by the development of the SNES Emulator developed for
the Gameboy Advance system, commonly known as SNES Advance. Much credit must
be given to the authors of the SNES Advance emulator, FluBBa and Loopy, 
Without their daring effort in making the first emulator for the SNES on the
gameboy in the first place, it is unlikely that Snezziboy would have ever
existed. 

Snezziboy was also born out of a challenge that I wanted to take on to 
develop on an handheld, or an embedded system. The challenges were basic but
very huge for an emulator:
  - Small memory footprint
  - Slow speed

The general rule of thumb is that for any emulator to work with decent, the
machine that emulates the other should run about say, 10-20 times faster.
THe SNES was a 2.58MHz machine, while the Gameboy Advance was a 16.78 MHz
machine; only about 8 times faster in clock speed. Fortunately, the 
graphical capabilities, as FluBBa and Loopy had discovered, of the Gameboy
Advance were very similar to the SNES, therefore allowing an emulator to
exploity the Gameboy Advance hardware to accelerate the graphics processing.

The emulator is far from complete as of 12 May 2006, but it is already 
running some games at fairly decent speed, even though it is not running them 
at full. 

As at 28 May 2006, the following games are known to be working fairly well:
 - Castlevania X
 - Super Castlevania 4 (no mode 7 graphics yet)
 - Gradius 3
 - Megaman X
 - Megaman 7
 - Darius Twin
 - Super Mario World (some garbled/missing graphics)
 - SUper Mario All-Stars (Super Mario Bro, The Lost Worlds)
 - Kirby's Avalanche (some garbled graphics)
 - Tetris Attack

This emulator will be made open source, and by doing so, I hope to invite
competent developers to further enhance the project, and if possible help in
identifying and fixing bugs.


3. File Manifest
~~~~~~~~~~~~~~~~~~~~~

The following three files must be in the same folder:

   snezzi.dat       Patch data file in text format.
                    The file format of this file is exactly the same as
                    that of the superdat for SNES Advance.

   snezzi.gba       Emulation core for the Snezziboy.

   snezzi.exe       Builder to construct the .gba file for an SNES ROM
                    (Each SNES ROM will have exactly 1 gba file).


4. How to Use
~~~~~~~~~~~~~~~~~~~~~

1. Copy the SNES ROM file (.smc / .fig / .swc, etc) into the same folder
   as the snezzi.exe.

2. In the command line in a DOS box, issue the following command:
       snezzi SNESGAME.SMC 

   (Alternatively, in Windows Explorer, drag the SNESGAME.SMC file onto
   the snezzi.exe file)

3. An output file SNESGAME.SMC.gba will be created in the same folder as 
   the SNES ROM file.

4. Copy the SNESGAME.SMC.gba file into your flash cartridge as described
   in your flash cartridge manual, load it up into gameboy and run it.

   (For Supercard users, please run the .gba file through the Supercard
   patcher before playing. I recommend turning all options except 
   Compress off).

5. During the game, use (L+R+start) to access the configuration menu.


5. Patch Data
~~~~~~~~~~~~~~~~~~~~~

The Patch Data file (snezzi.dat) contains a list of SNES ROMs and patch
values either to bypass copy protection locks, or for speed hacks.

The format of the Patch Data is exactly the same as SNES Advance's 
superdat, but not all fields defined are used by Snezziboy. Each field
is delimited by a pipe symbol, that is, '|' and the semantics of the
fields that the Snezziboy Builder understands are:

   Field #1  : CRC32 Checksum of the SNES ROM
   Field #2  : Game name
   Last Field: Patch information

The rest of the fields between Field #2 and the Last Field are ignored
entirely.

The patch information takes the following format:
   Address1=Byte1Byte2Byte3Byte4...,Address2=Byte1Byte2....,

For example, the following patch information
   1C7=428A,1080=EAEAEA
tells Snezziboy to:
   patch the SNES ROM at 1C7, 1C8 with the bytes 42 and 8A.
   patch the SNES ROM at 1080, 1081, 1082 with the bytes EA, EA, EA

If the checksum of your SNES ROM does not match that in the patch data
file, the Snezziboy Builder will not patch it. 


6. Credits
~~~~~~~~~~~~~~~~~~~~~

Flubba, Loopy		For their bold attempt in SNES emulation on the GBA.
anomie			For the SNES documentation on IO registers and timings.
ZSNES Team		For their ZSNES emulator
Snes9x Team		For their Snes9x emulator
