Snezziboy

From PHWiki

Snezziboy is an SNES emulator for the GBA, made by Bubble2k, released under the GNU General Public License. It was inspired by SNES Advance, and it currently uses a similar format for its "snezzi.dat" file, Snezziboy's version of the Superdat. Using SNES Advance's superdat file, renamed to snezzi.dat, will often work, providing bugfixes and graphics fixes. However, this is not always the case, and sometimes it's better to simply use a blank snezzi.dat file. Examples include Illusion of Gaia, where the SNES Advance patches nearly break the game, and Donkey Kong Country 2, where the SNES Advance fixes only make the game slower and don't fix anything.

The current version, released August 15, 2006 is v0.26
As of v0.22a, a pre-compiled debugger has been included to help create Snezziboy fixes and speedhacks. The sourcecode is also available and can be compiled with Microsoft Visual C# 2005 Express Edition, available at http://msdn.microsoft.com/vstudio/express/visualcsharp/default.aspx

Up until v0.25, Bubble2k mostly coded for the GBA, trying to get a stable core working. Gladius then ported the core to the DS, rebranding it as SnezziDS.

With v0.25 of Snezziboy, Bubble2k decided to stop working primarily on the GBA version. He and Gladius now work on SnezziDS together. However, Bubble2k has mentioned that if he fixes any bugs in SnezziDS, he will attempt to port them back to Snezziboy.

Partial HDMA support was first introduced in Snezziboy v0.25. Due to the GBA's limited capabilities, only HDMA support for scrolling backgrounds was added. Even that slows down the system noticeably. However, it allows for some games that only use HDMA for small parts of the game to become fully playable. More complex forms of HDMA will be developed for the DS due to its increased horsepower.

v0.26 was a minor bugfix from v0.25. One change was the correction of a bug that broke Aladdin, while the other was the correction of an overflow bug that crashed Snezziboy after 65535 SNES frames, or roughly 18-25 minutes of gameplay.

Contents

Differences between SNES Advance and Snezziboy

SNES Advance is coded in pure assembler, while Snezziboy is coded in C++, which means that for the most part, SNES Advance will run games a bit faster than Snezziboy.

SNES Advance allows for the use of multiple SNES games in a single GBA rom, while Snezziboy uses a separate GBA rom for each game.

SNES Advance uses the Superdat settings to prevent games from ever reaching out to the SPC core. As far as Snezziboy goes, look at this quote from Gladius: "He uses a nifty method of tricking games into thinking the SPC is actually there. Basically, the SNES and APU communicate through 4 8-bit registers, and bubble2k detects a read to these registers and returns one of 6 different fake value types, one of which just cycles through all the possibilities. So, while it may mess up timing a bit, or the game might think the APU is doing something strange, it seems to work quite well."

SNES Advance uses an unscaled screen, and the user holds Select and presses Up or Down in order to move the position of the screen. Snezziboy scales the screen so it all fits in the GBA's 240x160 display. On a related note, SNES Advance has sprite following to attempt to remedy the problem of the unscaled screen, although it does not always work. Sprite following is unnecessary in Snezziboy.

The GBA has 2 fewer buttons than the SNES, and this problem is solved in different ways on each emulator. By default, SNES Advance uses the L and R buttons to simulate the X and A buttons on the SNES control pad. Note that by pressing Start+Select+A+B, you can change the control configuration. Snezziboy uses either Start, Select, L, or R as a "Control" (or "Shift") button, using the Control button in combination with the GBA's A or B buttons in order to simulate the missing buttons.

Instructions

  1. Download the emulator from http://sourceforge.net/projects/snezziboy
  2. Unzip the files
  3. Copy the SNES ROM file (.smc / .fig / .swc, etc) into the same folder as the snezzi.exe.
  4. In Windows Explorer, drag the SNESGAME.SMC file onto the snezzi.exe file
  5. An output file SNESGAME.SMC.gba will be created in the same folder as the SNES ROM file.
  6. 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. It is recommended that you turn off all options except Compress.
  7. During the game, use (L+R+start) to access the configuration menu. In this menu, you can define the controls you wish to use and also to configure the background layer priority, which can help fix some graphical errors. See the compatibility list for ideal background priority values for specific games.

Configuration Menu

The configuration menu has the following options:

  • BG0 - The priority of the first background layer.
    • P0 - front-most
    • P1 - behind P0
    • P2 - behind P1
    • P3 - rear-most
  • BG1 - The priority of the second background layer. (options are the same as BG0)
  • BG2 - The priority of the third background layer. (options are the same as BG0)
  • BG3 - The priority of the fourth background layer. (options are the same as BG0)
  • CTRL - This indicates the CTRL key that can be used to input the additional SNES X/Y keys. When used in combination with the GBA A/B keys, we can input the full X/Y/A/B keys into the game.
    • START - use the Start button as the CTRL key
    • SELECT - use the Select button as the CTRL key
    • L - use the L button as the CTRL key
    • R - use the R button as the CTRL key
    • If you are still confused, think of it as a "SHIFT" key that allows you to shift button A to button X, for example.
  • BUTTON A - This indicates the key(-combination) to you should press in order to input the SNES button A.
    • A - the GBA A button
    • B - the GBA B button
    • CTRL A - the GBA A button + the CTRL key above
    • CTRL B - the GBA B button + the CTRL key above
  • BUTTON B (same as button A)
  • BUTTON X (same as button A)
  • BUTTON Y (same as button A)
  • BACKDROP
    • This allows the SNES game to display a backdrop color. Not all games like this option, and may exhibit flickers in the background, due to the difference in the way the SNES and the GBA handles backdrop colors in hardware.
      • YES - yes, show backdrop color
      • NO - no, do not show backdrop color
    • So far only Super Mario World and Donkey Kong Country are known to produce the effect as intended with the backdrop set to YES.
  • BG ENABLE - This allows the VRAM allocation for graphics to switch between two algorithms when backgrounds are enabled / disabled.
    • FAST - Fast, but no refresh of tiles. May cause certain graphical glitches.
    • SMART - (Slightly) Smarter, but slow since it refreshes everytime the game enables/disabless the BG.
  • BG FORCED MODE - Forces the game to display the graphics in the specific SNES mode. This may be needed by certain games that switch between two modes in the same frame; but Snezziboy chooses to display only one of them.
    • Set to AUTO to use one of whatever the game specifies for a frame.
  • HDMA ENABLE - Set to YES to allow the game to emulate HDMA. This may cause games to slowdown on the GBA whenever it uses HDMA, but some games must require HDMA before its backgrounds are properly viewable. Set to NO to disable all HDMA emulation.
  • RETURN TO GAME - Returns to the game. Pressing start in the configuration screen also returns you to the game
  • RESET GAME - Does a "hard reset" on the emulator and returns the game to the start.
  • Quick Configuration Features:
    1. L+R+SELECT+UP: Cycle through the following BG Priority Sets
      • set 1 = (P1, P2, P0, P3)
      • set 2 = (P2, P1, P0, P3)
      • set 3 = (P0, P1, P2, P3)
      • set 4 = (P1, P0, P2, P3)
    2. L+R+SELECT+DOWN: Cycle through the FORCED BG MODEs
      • opt 0 = as required by game (aka AUTO, displays whatever the frame calls for)
      • opt 1-7 = the respective modes

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.

Compatibility

According to the readme.txt file, as of 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 Bros, The Lost Worlds)
- Kirby's Avalanche (some garbled graphics)
- Tetris Attack

See also article Snezziboy Compatibility List for a more extensive compatibility list.

Credits from Bubble2k

  • 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

See Also

Snezziboy Compatibility List, snezzi dat, SNES Advance, SnezziDS

Links