----- ROMedit ROM Editor :: Version 2.25 -----

*******************
**  Description  **
*******************

	ROMedit is basically a utility for editing the text in ROM files. 
It works for any ROM file you can imagine, and even non-ROMs.
(Although if you wanted to edit a non-ROM, a hex editor would be easier. ^_^)

I have included two tutorials (TLE_TUTE.TXT and ROM_TUTE.TXT) to get you started.

Files included:
   ROMedit.EXE  : The ROMedit front end. You don't have to use it, but it makes ROMedit
                  easier to use, and has some handy extension changers.
   HEXIT.EXE    : The ROM Editor program. This is the program that actually changes the
                  text, although it's no good without a tile set.
   TILEEDIT.EXE : The Tile Editor program. This program lets you create/edit .TLE files,
                  which ROM Editor uses to display the text.
   TILESWAP.EXE : The Tile Swapper program. This program lets you rearrange the tile
                  data in a .TLE file.
   FF1CHAR.TLE  : The tile set for Final Fantasy 1, used in the tutorials.
   ROMEDIT.TXT  : This text file.

********************
**  How it works  **
********************

	First, you have to create a tile set.
	In the tile set, the tile's number corresponds to a number in the ROM file.

	For example, tile number 5 will replace all occurences of the number 5, or
$05 in the ROM.

	If you know what character is what, you can define tiles for them. Say that
$1A is the number 9; just go to tile $1A and draw a number 9.

	After you have defined a tile set, run ROM Editor. You can move the cursor
around with the arrow keys, PgUp, PgDown, Home, End, Tab, and Escape, jump to an
address with J, or search for a string of characters with F (see below). To change
a byte in the ROM file, move the cursor to it and hit enter. Then use the [, ],
and T keys to change the tile. After you have selected the tile you want, hit
enter to change it.

	Don't forget to save your files after working on them; Tile Swapper is the
only program which automatically saves.

	To search for a string, hit F and type it in.  If you wish to search again
for the same string as last time, hit F again, and the string will still be there.
This way you can hit F + Enter to quickly jump between different occurances.

******************
**  Known Bugs  **
******************

	ROMedit will probably die if you don't have enough conventional RAM. (Below
640k.) Try using a boot disk or something, this only happens if you have too many TSRs
loaded. (And if you know what TSRs are, you probably already knew that. ^_^)

	These programs use the keyboard ISR for fast keypress response. Because of this,
they may crash themselves or your computer if something is wrong with the computer. If
this happens, just reboot your computer and everything will be fine. 

*********************
** Everything else **
*********************

	If you find any bugs, let me know right away. My email address is draagn@pond.com.


                        Got any ideas for ROM utilities?
             Have any suggestions of how I can improve my programs?
             Just contact me, and I'll respond as soon as possible.

	Don't try to use default.* files, they're system files which are supposed to be
temporary. If you delete them, nothing will happen. If you try to open them, they should
still work, but if there are any errors, let me know.  (NOTE: If you quit one of the
ROMedit utilities without saving, and you wanted to save after all, the data should still
be in the default.* file. Open that and resave it to another file.)

****************
**  Versions  **
****************

([nr] signifies versions which were not released)

[all]

v0.80  [nr] : First version that had full functionality.
v0.90  [nr] : Added help files and fixed the file open routines. Also added version numbers
              to ROMedit.
v0.92  [nr] : Added a warning for corrupted tile data.
v0.95  [nr] : Ran full test on everything I could thing of. Fixed some typos, added a
              subroutine so you can't use Ctrl-Break and screw up all the data.
v0.99  [nr] : Created tutorials, tweaked the tile set, added those cute red lines in HEXIT ;)
v1.00       : First public release.
v1.69       : Changed version numbers
v1.85  [nr] : Changed version numbers, complete update of file open screens
v2.25       : Changed version numbers, made lots of speed changes, etc

[TILEEDIT.EXE]

v1.20       : Fixed color 15 bug.
v1.30       : Fixed long filenames.
v1.50       : Changed tile input to hex.
v1.66  [nr] : Fixed file open screens.
v2.00       : Revised main program and subroutines, added a few ASM calls for speed,
              cleaned up code.

[TILESWAP.EXE]

v1.30       : Fixed long filenames.
v1.31       : Fixed a bug which would crash the program if you hit Escape during a file
              selection. (Instead of quitting.)
v1.47  [nr] : Fixed file open screens.
v2.00       : Cleaned up code, fixed a bug which doesn't do anything, but can make tilesets
              really big if you keep causing the bug. :P

[   HEXIT.EXE]

v1.10  [nr] : Fixed one of my functions, which was ignoring the LSB in a hex input. Very
              annoying, and caused more than a few bugs. ;)
v1.20  [nr] : Fixed a bug in the Jump to addr function, which didn't jump to the exact
              position the user inputted. (This was because of the LSB bug, and before
              the fix required a bit more time to jump to an addy, because of a few
              calculations it had to make.)
v1.30       : Now when the byte edit window is active, T will pop up an input field for you
              to enter the number of the tile to use. This keeps you from waiting for the tile
              to change from 0 to 255 while holding down ] or something. ^_^
v1.50b [nr] : Added search functions, but they can't be accessed yet, due to a bug somewhere.
v1.50  [nr] : Search functions can be accessed now.
v1.72  [nr] : Added some better cursor movement functions; Home, End, Tab, and Esc.
v1.85  [nr] : Fixed some bugs in the searching, but for some reason it takes 5 minutes to
              search thru 28000 bytes.
v1.85b [nr] : First fully functional searching, although it doesn't display the string as
              you type it in.  But it works.  And it's pretty fast, too. In fact, it's over
              15 times faster than the last version. ^_^
v2.00b [nr] : Everything finished and working fine, except a few bugs in the search string
              input box.
v2.00       : Search string input bugs should be fixed.  Also made a fix to one of my
              functions which was misbehaving.
v2.34       : Fixed long filenames and removed some unneeded code.
v2.50  [nr] : Fixed file open screens.
v3.00       : Revised main program and subroutines, changed around a few frequently-used
              subroutines, added a few ASM calls for speed, cleaned up code.

[ ROMEDIT.EXE]

v1.03       : Just changed the version numbers of TILEEDIT, HEXIT, and ROMedit.
v1.04b [nr] : Changed the version number of ROMedit.
v1.05b [nr] : Changed version numbers and added another line. (Yeah, I probably don't need
              a version entry for just that. =p)
v1.05       : uh, I changed the version numbers here because I just realized I forgot to
              renumber this version. =p
v1.35       : Fixed long filenames, changed version numbers.
v1.60       : Fixed a file/path error...  See below.
v1.61       : Changed version number of TILEEDIT
v1.77  [nr] : Fixed file open screens.
v2.00       : Changed version numbers, cleaned up code, ran test on ASM routine which seemed
              to be malfunctioning, and fixed it.

	Note: The ROMedit version number is NOT the same as the ROMEDIT.EXE version number.
The ROMedit version number is the average of the four version numbers, rounded up.  I'm going
to start putting the new version changes under [all].

*************
**  Fixed  **
*************

 - That damned color 15 bug.
   Now when using color 15, the cursor turns red so you can still see it.
   (Note: because of how I did this, it may take a bit longer to change between tiles if
   you use too much of color 15. For example, on a pentium 100 with 16 megs RAM, a full
   tile of color 15 takes .75 seconds to change. I was going to give you other computer
   speeds/times, but I'm rambling and I get the feeling that nobody besides me really
   gives a damn. ^_^)

 - Internal error, which would have really messed up stuff in the changes I'm about to make.
   For those of you who care, this had to do with it ignoring the rightmost (LSB) bit of a
   hex number when converting it to decimal.

 - There was an error in the Jump to addr function which made it jump a few bytes below the
   input number.  Now it jumps to exactly where you want it to. (The error wasn't visible,
   but it was there; this really would have messed up searches.)

 - Really crappy bug which involved search time.  I messed up something in the functions
   which was causing it to go slow, and added a counter to show how far along the search
   was.  Except after I fixed the bug, I forgot to remove the counter, which made it take
   15 times longer to search. (5 minutes for 28000 bytes, and after it was removed, it
   takes 15 seconds for 28000 bytes.  Well, on a Pentium 150 at least. ^_^)

 - Another function problem, my hexTOdec() func was crashing with an error when it hit a
   null char (ASCII 0) in the middle of a string.  It was *supposed* to crash when it hit
   a non-hex char, but I thought that I locked out crashes on nulls...  Guess not. ^_^

 - Something was wrong with the searching, but it fixed itself when I was looking at it,
   so I'm not even going to try to figure out what I did to this one. ^_^

 - Ho boy, big problem here.  Long filenames were working fine, except in DOS mode.  Leo
   told me about this, but I didn't fix it, having been preoccupied with searching.  Well,
   earlier today, I got an e-mail from Kaz saying that the programs crashed in Windows 3.x
   and DOS shells.  Naturally, I couldn't let this go, so I jumped in, and a few packs of
   gum and a box of beef jerky later, it was fixed. ^_^  Oooh yeah... We're jammin'!
   I wanna jammit with you... We're jammin', jammin', and I hope you like jammin' too! :D
   *ahem*  Sorry. o_O

 - The front end, ROMEDIT.EXE, tries to change to the directory it was run from after each
   program you run from it.  The problem was, I expected it to always be run in
   c:\emudrive\romedit, which was a problem as Leo pointed out, because people might not
   WANT it there. ^_^  So I went into my code archives and found a function to save the
   current directory to a variable, and stuck it in.  A few crashes and recompiles later,
   it was done.  The front end should now be perfect.  Or not. ^_^

 - Well, it got annoying to operate with decimal when editing tiles, so I changed the input
   routine so it input in hex, and I changed the TLE output to hex.  Now you can input hex
   and see hex. =p

 - There should be NOTHING AT ALL wrong with the file open screen now. If you change to a
   drive without a disk in it, it asks you to insert a disk. If you don't want to insert a
   disk, you can hit Escape to quit the program. NOTE: If you get a blinking yellow number
   on the screen, write it down and report it to me immediately, these are error codes which
   *should* be fixed.

 - Removed strange bug in TILESWAP, which was adding extra (inaccessable) tile entries to the
   end of a tileset when you swap certain tiles.

 - Re-did an ASM routine in ROMEDIT.  It was supposed to return the current directory, so I
   could switch back to the base directory after running a program (which would switch into
   a directory when you try to open or save files.)  For some reason, certain drives and
   directory structures made it either lock up or crash the computer; it seems I omitted a
   few lines somewhere. :P

*******************
**  Coming soon  **
*******************

- I'm out of ideas, so I'm starting on the next projects:
  * NESdoASM  -- You have no idea how hard it is to name these things.  That's probably
                 why my names are all stupid. :P  Anyway, this will be a 6502 ASM compiler
                 with error-checks.  Hopefully, it will compile into the .NES format and
                 even write the header. ^_^
  * GFXEDIT   -- I know I said I'm not going to make a graphics editor.
                 But I changed my mind. ^_^
              -- Note: I have it finished for NES, and I'm putting in SNES.
                 It's just REALLY REALLY GODAWFUL SLOW@!#!@#$@!$@!&*
  * GFXCOPY   -- Extracts graphics from a ROM and puts them in TILEEDIT readable format.
  * SFXPLAY   -- Plays NES and maybe SNES sounds and music.  This will take a while, since
                 I'll need to build an emulator front-end, and I trashed my NES emu plans
                 when NESticle came out. ^_^
  * And if, *IF* I get SFXPLAY to work good, I *may* make a sound editor. *MAYBE*

*****************
**  Thanks to  **
*****************

Er, actually, I didn't need any help making this.
I just needed help giving it away. ^_^

Thanks to Leo for the great site.
Thanks to Ashen for that kickass ROMedit logo on the site.
Thanks to the guy from #eblana who bitched about the decimal input. ^_^
Thanks to Kaz for reminding me how serious the long filename bug was. ;)
Thanks again to Leo for bearing with my overhauls, version replacements,
  late-night update requests, and general confusion.  *_*

*******************
**  Disclaimers  **   [Read these first]
*******************


I HAVE NO ROM FILES.
DO NOT ASK ME FOR ROMS.
IF I GET ANY REQUESTS FOR ROMS, I WILL EITHER IGNORE THEM OR CONTACT THE AUTHORITIES.
ROM TRADING IS ILLEGAL AND THESE UTILITIES ARE FOR EDUCATIONAL USE ONLY.

I will not be held responsible for any damage done by these utilities
They work fine on my computer, and if they don't work on yours, stop using them

ROMedit, TILEEDIT, TILESWAP, and HEXIT are Copyright (c) 1997 Jason Lucas
All references to and uses of trademarked names are respectful of the rightful owners