News: 11 March 2016 - Forum Rules

Author Topic: Text hacking Cross of Venus (NDS)  (Read 18463 times)


  • Jr. Member
  • **
  • Posts: 26
    • View Profile
Re: Text hacking Cross of Venus (NDS)
« Reply #20 on: May 21, 2011, 09:49:42 pm »
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. ^_^


  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Text hacking Cross of Venus (NDS)
« Reply #21 on: May 22, 2011, 02:56:30 am »
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.


  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: Text hacking Cross of Venus (NDS)
« Reply #22 on: May 31, 2011, 06:34:56 am »
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.