
 Tile Layer v0.30b
 NES/GB tile editor

 by SnowBro <kentmhan@online.no>

 What is new:
 ------------
 - Checksums are recalculated for .GB ROMs when they are saved,
   so that the ROMs will work on GameBoy emulators which require
   the checksum value to be correct.
 - Rotate tile 90 degrees function added.
 - Added a menu button to switch palettes ("Pal").

 What was new (v0.25b):
 ----------------------
 - Ability to import a pre-defined NES palette (tlayer.pal).
   See section "Importing a NES palette" below for more info.
   Example palettes included, press Left Shift to browse through
   the available ones.
 - Autodetection of tile format based on extension of file
   (.NES / .GB). No longer necessary to press F1 to switch
   between the two formats, unless you have your GameBoy ROMs
   named as *.NES. :P

 What was new (v0.2b):
 ---------------------
 - GameBoy support (press F1 to toggle between NES/GB format)
 - By having two ROMs open at the same time, you can copy
   GameBoy tiles to a NES ROM or vice versa!!!
 - Customizable colors (select R,G,B values yourself)
 - Offset finetuning. Allows you to increase/decrease the ROM
   offset by one, instead of 100h. Necessary when editing games
   where the tile data isn't 16-byte aligned (ex. Zelda).
 - Now shows current ROM offset (heh, about time)
 - Selected foreground color now highlighted
 - Minor bug fixes


 Getting started:
 ----------------
 A quick explanation of the program follows. I suggest you read it,
 in order to clearly understand how everything works. If you send me
 an email asking about something that is already answered in the next
 paragraphs of this document, your letter will be ignored. If there's
 something in this document that you feel needs to be explained
 better, however, then don't hesitate to email me about it.

 Dual file editing:
 ------------------
 One of the key features of Tile Layer is the ability to have two ROM
 files loaded simultaneously. This is done by specifying two filenames at
 the DOS prompt, separated by spaces, like so:

 tlayer mario.nes smariol.gb

 In the main editor, you can then switch between the two files by
 pressing TAB.

 Switching tile format:
 ----------------------
 Press F1 to toggle between NES and Gameboy tile format. I don't think
 this feature is necessary any more though, because of the tile format
 autodetection based on filename extension, but just in case you have
 all your GameBoy ROMs named as *.NES... ;-)

 Moving around:
 --------------
 Arrow keys Up and Down scroll through the ROM 256 bytes at a time (one
 row of tiles), Page Up and Page Down take you where you want to go a bit
 faster. Arrow keys Left and Right finetune the offset (decrease/increase
 by one). Try editing the graphics in "Zelda.nes" to find out why this is
 a very necessary feature.

 ROM data:
 ---------
 Select a tile from here by clicking LEFT mouse button.
 Click RIGHT mouse button to paste the currently selected tile
 (either a tile selected directly from the ROM data or from
 the clipboard).

 Clipboard:
 ----------
 Paste the tile selected from the ROM data (or from another location
 on the clipboard) by clicking RIGHT mouse button. Select tile to edit
 by clicking left mouse button. The clipboard is mainly a place where
 you can arrange scattered ROM tiles in an order that forms a complete
 picture, so that the editing gets easier. When you are editing two
 files at once, you can paste tiles from one file onto the clipboard,
 then switch file (by pressing TAB) and paste the tiles where you want
 them in the other file. You don't have to go via the clipboard though;
 just select a tile from the ROM data in one file, press TAB and
 paste the tile data directly.

 Specifically how to copy tiles from a .GB ROM to a .NES ROM:

 1) Load both files in Tile Layer as explained above.
 3) Switch to the .GB file by using TAB, if it wasn't the first
    file you specified on the command line.
 3) Locate the graphics data and copy the tiles you want to the
    clipboard, or if you just want one tile, select it with from
    the ROM data with the left mouse button.
 4) Press TAB to return to the .NES ROM.
 5) Copy the tiles to the ROM data and you're done!

 The process can be reversed, of course.

 Tile edit:
 ----------
 Left mouse button draws currently selected foreground color,
 right mouse button draws currently selected background color.
 Change foreground/background color by clicking left/right
 mouse button on the desired color box to the right of the
 drawing area. Once you're done editing a tile, copy it back
 to the ROM (by pressing RIGHT mouse button while holding the
 cursor over the tile you want replaced). You have to copy it
 back yourself because when editing a tile, changes are NOT
 written directly to the ROM. This is to give you a second
 chance if you aren't pleased with the result and want to
 start over with the original tile again. In any case,
 remember to save your work often: there's no telling when
 you'll screw up next (I do it all the time 8-) ).

 Customizing colors:
 -------------------
 The three vertical bars to the right of the tile edit window
 control the [R]ed, [G]reen and [B]lue component of the current
 foreground color. They can be adjusted to your own liking.

 Importing a NES palette:
 ------------------------
 When Tile Layer is started, it will check to see if there is a
 file called TLAYER.PAL present in the directory. If there is, it
 will be used as the default palette. Note that the file contains
 NES color values, NOT RGB values. You can have up to 4 different
 palettes defined in TLAYER.PAL, each palette 4 bytes in size (one
 byte for each color). Switch to a different palette by clicking the
 "PAL" button on the menu. I've included the sprite palettes from Kid
 Icarus in this archive as an example, since they have some nice colors
 which generally make it easy to view tile data. You can use NESticle's
 palette viewer to figure out the color values for the ROM you want to
 edit, then use a hex editor to enter these values into a file and save
 the file as "TLAYER.PAL".

 Menu:
 -----
 Flip X: flips the selected tile horizontally.
 Flip Y: flips the selected tile vertically.
 Save: saves changes to file.
 Quit: erases your hard drive. No wait, that's not it...
       Uhm, actually, I don't remember.

 Well, that's about it. If you have any questions, suggestions or
 comments, send an email to my address, kentmhan@online.no.

 Oh, one final note:

 Although I've done my best to make sure that this program is totally
 bug-free, there still MIGHT be some strange error lurking around
 somewhere (I haven't managed to find it yet though). In other words,
 if you use this program and Something Bad happens to you or your ROM
 images, don't expect me to take any responsibility for it. But I can
 probably offer you some sympathy in the form of comforting words
 ("There there. Everything's gonna be all right.").

 (c) Kent Hansen 1998
