News:

11 March 2016 - Forum Rules

Main Menu

Text hacking Cross of Venus (NDS)

Started by Majin3, May 19, 2011, 11:12:51 AM

Previous topic - Next topic

jjjewel

Quote from: Majin3 on May 21, 2011, 11:02:43 AM
jjjewel, are you planning to write a (de)compressor for that "NDS games that use similar compression"?
Or I guess I could ask the writer of DSDecmp or something to implement this one...
I've been working on it but not getting very far. The recompression can be quite complicated. I may have to ask for help with the programs later too.

Anyway, if anyone interested, other NDS games that I mentioned are Nana DS (graphic compression in .R00 archive), Duel Love DS (text and graphic compression in .ptd archive), and Oshare Princess DS (text compression in mes.bin). They all use different kinds of compressions, but the concepts are pretty similar to what we're discussing here. ^_^

Ryusui

Recompression isn't hard. It's just tedious.

Search the preceding data for any match between 2 bytes and $11 (17 dec) long that's less than $1000 bytes back from the current position. Once you've found the longest possible match, calculate the compression code and output it, or else output the plaintext code. Track the compression flags for each code, and once you've got a full byte, output that. (Note that you'll need to do things backwards - you have to write the compression flag byte which goes before the codes after you've calculated them.)
In the event of a firestorm, the salad bar will remain open.

henke37

It helps that the DS comes with built in decompression routines in the bios.

Check if you are using the variant compression that has support for variable length backreferences. It has some flag bits used to indicate how long the backreference code itself is.