Update! (note new link)
April 1st, 2011 Animal Forest Update
Newest patch is uploaded to:
http://www.mediafire.com/?kk5q8vh81w89d63
+_+
Changes:
- General:
- IMPORTANT! .xdelta patches against original, unextended ROM. UPS still patches against extended ROM.
- Uses external string lookup for debug strings. Will eventually rig everything this way, except the default lines which should always be hardcoded of course ;*)
- No controller message autoformats, uses external text, and may vary from 1-6 lines.
- Now accepts 7F6F commands in mail and message board text. Interpretter uses specialized formatting to restore and insert replaceable strings.
- Generated messages so not yet fit above spec! Next patch will do that. See below for details.
- Dialog:
- Translated debug messages for test maps. Granted the maps don't work right yet...
- Translated internal debugger messages, on the off-chance you cause some terrible stack failure.
- Set string.txt 2F2 and 2F3 to "Dreamcast" and "PS2", respectively. Hopefully those IDs aren't used ;*)
- Credits in string.txt no longer include leading or trailing spaces, as these are no longer necessary with the credits fix above.
- Bugs squashed:
- Digging, fishing, and bug-catching all should use aliased (full-length) item names.
- Credits now left-align names. No more crashing on long names or spaces to enforce alignment.
- Killed a rather stupid bug I introduced to record string lengths.
Documentation:
- New Files:
- 71F4E0 - text entry dial control.txt
- Disassembly of the text dial dialog, used for all cursor tracking.
- Updated:
- ROM ASM Correspondance.txt
- Index.txt
- Hacking text recall routines.txt
- 721D80 - mail messages.txt
- 727260 - display message.txt
- Quest Generation.txt
Resources:
- New Binaries:
- 77F940: Debug Gyroid in Test Level 1
- "Item" names externalized and translated. Look to string.txt: 2F2 and 2F3.
- Updated Binaries:
- 675720: Primary Compressed File
- Translated default character and catchphrase. "Johnny B." is literal, but the catchphrase was set to "debug" so you could identify it from the matching one in string.txt.
- Spun off 800C3F74 as a "general" string retriever for "standard" text banks. One more messy bit of code in the overall mess of code to be cleaned up.
- 727260: Message Board Interface
- Allows aliases in messages. Does not yet generate them!
- 721D80: Mail Interface
- Allows aliases in messages. Does not yet generate them!
- 734F30: special dialogs and item interaction
- Now uses aliased item names for fish, insect, and unearthing dialogs.
- 854A60: Title Screen
- No controller message update:
- Now utilizes variable-width font.
- Message autoformats: each line is centered horizontally and spaced vertically based on number of lines in use.
- Controller messages may span 1-6 lines of text, drawn from string.txt lines 61A-620. Unused lines should remain NULL.
- 8574E0: KK and Credits
- Allows more header entries.
- Right-aligns headers and left-aligns names.
Programs:
+_+
Two really important things:
1) The .xdelta patch should patch against a non-extended, unbyteswapped ROM. Only the .ups patch still requires an extended one.
2) Message board and mail interpretters now read this crazy extended format, allowing you to use an alias command to generate mail and replace strings within it.
However! It doesn't yet generate this kind of message. The reason it doesn't is simply to get the patch out now. I'm sort of getting evicted and wanted to ensure everyone has the latest set of code (including myself!).
The way I've been testing the interpretter, and the way you can, is to hack your message board messages manually. They usually fall within the 8012xxxx range, and you can find them with a simple text search. You replace this message with a 7F6F command to load its text, and you can also replace strings within it.
As a simple example, the typical "anyone can use this message board" message would be written:
7F 6F 30 1E 20 20 20 20 20 20 20 20 20 20 20 20
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
20 20 20 20 20 20 20 20
The result is it copies mail.txt entry 0x1F to the buffer in its entirety and displays it.
There's also a method for string replacement which is a bit messy but does work. You place specially-formatted string stringies inside 0x80 flags.
This would print the message: "Here's the chic carpet you ordered. ..."
7F 6F 30 4F 80 24 04 7F 6F 26 01 80 20 20 20 20
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
20 20 20 20 20 20 20 20
The first four bytes loads the message. Then comes the 0x80 flag, and that says a list of text replacement keys follow. The first key is for a 7F24 "string 1" replacement, replacing any instance of that in the message with 04 bytes, that being 7F6F2601. 7F6F2601 is an alias to load the string "chic carpet", or in other words string 01 in text bank 26. Aliased aliases. That's why this patch took so blasted long.
After the list of string replacement codes you must type in another 0x80 or it will sort of never stop looking for them. Was going to kill that bug but sort of didn't get that far.
Besides having to make proper generators for these messages, will also need to fiddle with capital letter widths. 'A' is too wide, and its enough to jump lines.
Wow, one huge bug went undetected for at least two years! Some (but not all) Saturdays crash. March 5th, 2011, for instance. There's a bad pointer and a lot of copying involved, so it may ultimately stem from a bad pointer correction file. Working on tracing it.
You can assume every patch since at least June 2009 is affected. I don't have backups beyond that point.
Updated the bug list to indicate the debug town doesn't work right. Animal outfits, text, and behaviour are all screwed up due to a bad pointer. Will work it out, but since the error is contained to something that you shouldn't technically have access to anyway, it isn't exactly high-priority. Might even be tied to above. Again, goes way the heck back.
An interesting note is that all the debug towns are the same town. Yep, they're just seperated by inaccessible (untiled) rooms. You can tell (tee hee) by reading the item placement files. Map files are more a hassle, but you could read them too. The intro demo town, on the other hand, is its own entity.
A few people have asked why debug menu access was limitted. First was that in some menus you'd screw up game data, but if you didn't have a town yet and used the menu, then jumped to particular points you could make your town one of the hardcoded towns.
In "block A2" of debug test 2 you'll find a paper airplane. You can collect it with A and throw it with Z (?). It will fly a short distance, land, and then fail to hand control back over to the player ;*) If there's time, I'll try to hack that thing so it works properly. Seems kinda fun.
Credits are now (mostly) right-aligned headers and left-aligned names. (left-aligned isn't 100% accurate but good enough, notes containing the accurate code) Note at the moment it doesn't add any extra credits in. There's a script with that already, but the issue has to do with them being timed against the music. Without tracing the multipliers you're limitted to a certain number of windows, allowing 10 lines of 20 letters per window.
The point of this credit hack was to circumvent an issue with "long" names. If you roll over the right margin bad things happen, and it looks more like the original format this way. Still, be careful with header name lengths.
As a technical note, the "I'm also a header" list now can accept (theoretically) any number of entries, terminated with zero. (You'd have to move the list to get more than two extra) In case you're curious, there's two lists. One marks the entries starting each page, each of which are treated as a header. The second lists additional entries that should be treated as headers. Originally, the only difference was the scale multiplier applied.
I've been concidering adding in a feature to tag a line as a header directly in the text, but it does seem unnecessary right now. Maybe in the future. Maybe.
Yes, the no controller message is amazingly autoformatted and may span an autodetected number of lines (limit 6). It really was completely unnecessary, so concider it a taste of how everything will eventually be formatted.
With any luck, future translations will be little more than plug-and-chug. -well, except for the images. -and typeface promotions. -etc.
Next patch release will be whenevre I can get back up and rolling. In the meantime you can always you the data provided with the patch to continue your own work.
-Zoinkity