______________________________________________________________________

 Zelda Decompression/Recompression Program (SNES)
 October 25, 2000
 Version 1.00

 FuSoYa's Niche
 http://www.crosswinds.net/~fusoya/
______________________________________________________________________

 CONTENTS
______________________________________________________________________

 1. Credits
 2. Instructions
 3. Legal Notice
 4. Contact Information

______________________________________________________________________

 1. Credits
______________________________________________________________________


 PROGRAMMING:           FuSoYa (Defender of Relm)

 THE USUAL SUSPECTS:    ZSNES debugger, Jeremy Gordon's 65816
                        assembler, SNES Professional ASM kit,
                        SNES9X tracer feature, Naga,
                        Borland's C++ 5.02 package.

______________________________________________________________________

 2. Instructions
______________________________________________________________________

 This is a graphics decompression/recompression program for Zelda: A
 Link to the Past, based on Lunar Magic's compression source code for
 Super Mario World.  The formats were almost identical, so after some
 nagging I finally put this program together. ^^

 For decompression, the command line options are:
    zcompress 0 ROMFileName [FileToSaveAs]

 For recompression, the command line options are:
    zcompress 1 PCHexAddressToInsert ROMFileName [FileToInsert]

 To expand the ROM to 2 megs, use:
    zcompress 2 ROMFileName

 To expand the ROM to 3 megs, use:
    zcompress 3 ROMFileName

 Examples of valid command line arguments:
    zcompress 0 zelda.smc AllGFX.bin
    zcompress 0 zelda.smc
    zcompress 1 87200 zelda.smc AllGFX.bin
    zcompress 1 87200 zelda.smc
    zcompress 2 zelda.smc
    zcompress 3 zelda.smc

 The last file name is optional in the first 2 cases...if you don't
 include it, the program will assume you want to deal with split
 files of all the graphics instead of a single file.  Considering
 that means you'd have about 223 separate files, you probably won't
 want to do this.

 When decompressing the ROM data, the program will also extract the
 non-compressed graphics for convenience.  All 3bpp graphics are
 converted to 4bpp graphics...3bpp converted graphics make up the 
 majority of Zelda's gfx, so it's important to remember not to use the
 last 4 colors of the palette, since the upper bitplane will be lost on
 reinsertion to the ROM.  The only true 4bpp tiles are the last non-
 compressed gfx of Link at the end of the extracted file.  There are
 a few other segments in the file that use 2bpp tiles, but they're rare.

 When reinserting, I highly recommend using address 0x87200 since
 that's the address of the original gfx.  The program recompresses the
 data slightly better than Nintendo did, so you should be fairly safe
 as far as room goes.  However, if the program detects that inserting
 any further will go past 0xC4200, it will abort in mid-operation and
 notify you that the ROM needs to be expanded and that the graphics
 must be reinserted into the expanded portion (which would be any
 address at or above 0x100200).

 When the non-compressed non-3bpp graphics are reinserted, they are
 placed at their original positions regardless of the address you
 choose to insert at, since the pointers for them aren't included in
 the main graphics pointer table (although admittedly there wouldn't
 be much point in moving those two segments anyway).

 Have fun! ^^


______________________________________________________________________

 3. Legal Notice
______________________________________________________________________

 The Zelda decompression/recompression program (hereafter referred
 to as the "Software") is not official or supported by Nintendo or any
 other commercial entity.

 The Software is freeware thus it can be distributed freely provided
 the following conditions hold:(1) This document is supplied with the
 Software and both the document and Software are not modified in any
 way (2) The Software is not distributed with or as part of any ROM
 image in any format, and (3) No goods, services, or money can be
 charged for the Software in any form, nor may it be included in
 conjunction with any other offer or monetary exchange.

 The Software is provided AS IS, and its use is at your own risk.
 Anyone mentioned in this document will not be held liable for any
 damages, direct or otherwise, arising from its use or presence.
 

______________________________________________________________________

 4. Contact Information
______________________________________________________________________

 FuSoYa
   www:   http://www.crosswinds.net/~fusoya/
   ???:   06942508

______________________________________________________________________
