Here is
Patch 3.04 with the following changes:
-The main improvement is it now has "system text" (various recurring events) translated and also the museum sub-areas translated (previously: not translated)
-Changed achievements to trophies
-Game name is now "Nayuta: Endless Trails" (in XMB)
-Save files show the game name: "Nayuta: Endless Trails." Old saves still work.
-Also certain objectives are now translated (previously: not translated)
--Objective text is loaded from the save file. English (if not already present) will not show up until you hit the next objective in your game.
-A crashing bug during a certain event in Chapter 3 of the second playthrough has been fixed
I am having lots of trouble hacking the rest of this game.
The initial offset to the red item varies with the file: pc.tbb is 0x23 and all of fldlist0,1,2,3,monslib,questlib,foodarea,helplib are all 0x1F.
Other files in the ROM are packed with this method too. It varies for each file.
In memory when the compression routine is running is all file content from the orange entry forward.
Red: Word that says how far from the end of the word to the end of the file.
Orange: Says how big the file should be when it's unpacked. Used in the decompression routine.
Green: Unknown
L. Blue: Says how far it is from the point one byte after the end of the half-word (start of message) to the point 5 bytes before the end of the file.
NOTE: Does not hold true for very big files. This means monslib and questlib.
Dark Blue: Always a zero byte
Purple: Start of message. The byte containing the first 8 flag bits.
Brown: Start of message. First non-flag byte.
I wrote a decompression routine:
pastebin.com/BWjiYb80
My analysis of the decompression routine.
It will correctly decompress the smaller files, but not monslib or questlib. You have to specify the address of the orange entry in your file for it to work.
The problem with monslib and questlib: it will output a file that looks correctly decompressed, but the output stops at address 0x7FF0 (and it should be longer than that). The problem is the same for both files. You can see in the screenshot above that questlib should be 0x868C when fully unpacked. I'll have to investigate.
So that's the trees.
The forest is:
1) I tried fake compressing the text files.
1a) Actually, the smaller files worked rather well. Maybe I shouldn't try to fake compress the two large files (monslib and questlib) (because I don't understand how their decompression works) and see how that goes as a test. Because in my latest test, the fldlist files worked rather well with no crashes.
1b) When I fake compressed all the files and inserted them, it resulted in an unstable game. So I can't release something like that.
1c) Need to figure out how decompression of the large files works so they can be inserted, too.
2) Maybe if I try correctly compressing the files to reduce their size, it will make the game more stable.
2a) Will need to write a compressor after I figure out the decompressor.
3) I have a problem with .arb files too. My current goal is the text files mentioned above: pc,fldlist0,1,2,3,monslib,questlib,foodarea, and helplib.
------------------
EDIT: The green above is "number of chunks."
It's from a bigger file, so there are three chunks. At the end of the first chunk there is:
Byte 01
Halfword: length of next chunk
Zero byte
First flag byte of this chunk
First non-flag byte of this chunk
There's a kind of "null chunk" at the end (those five bytes) that doesn't contribute to the message.
Now to work this into the fake compression program somehow...