News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Sweet home NES decompression/compression  (Read 1620 times)

xeorix

  • Newbie
  • *
  • Posts: 4
    • View Profile
Sweet home NES decompression/compression
« on: August 14, 2015, 04:57:48 am »
Hello folks!
Does anyone know if there are released a tool to somehow alter the text in Sweet Home?
I have made translations of NES games before, but this seems to be under a compression that I myself can't crack.
I know that is have been done (since there is a English translation released)

Thanks

Chpexo

  • Hero Member
  • *****
  • Posts: 728
    • View Profile
.
« Reply #1 on: August 14, 2015, 10:25:02 am »
.
« Last Edit: January 01, 2016, 07:48:15 am by Chpexo »

xeorix

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Sweet home NES decompression/compression
« Reply #2 on: August 14, 2015, 03:34:53 pm »
Ofc.
But they havent been active since -02. So thats a dead end.
What I have found so far: "Similar to MTE, but there's 20 commands in addition to MTE to unpack text"
« Last Edit: August 17, 2015, 09:56:15 am by xeorix »

Disch

  • Hero Member
  • *****
  • Posts: 2814
  • NES Junkie
    • View Profile
Re: Sweet home NES decompression/compression
« Reply #3 on: August 19, 2015, 11:44:25 am »
I looked at the original J ROM:

Text does not appear to be compressed at all.  But it does undergo some processing.

If you look at the pattern tables in FCEUX, you'll see that textual characters start at tile $A0.

The text itself is stored as follows:

bytes 00-5F = output tiles $A0-$FF normally  (ex, $44 will output the numerical '0' tile, $5F is a space, etc)

bytes 60-7F = will output tiles $00-$1F -- which are not text so this will probably output garbage and shouldn't be used

byte 80 = will likely cause the game to crash or behave strangely.  Do not use

bytes 81-DF = output tiles $A1-$FF with a little " character above them (tile $CD).   So byte 11 will output つ ... but byte $91 will output づ

bytes E0-EA = output tiles $F0-$FA with a little circle character above them (tile $CC).  So byte 51 will output ひ... but byte E1 will output ぴ

bytes EB-FF are control codes, and are used to do special things.  I haven't figured them all out, but you can probably tinker with them by experimenting.

EB = I have no idea what this does -- it seems to prep something in memory.  Maybe it's used in combination with a different control code?
F4 = Print a character's name.  Whose name is determined by a byte following the F4.  So "F4 00" would print character 0's name.  "F4 01" would print character 1's name
FC = New Line + something else????
FD = New Line + something else????
FE = New Line
FF = End of String

the rest = ???  Like I say you can play with them to figure them out if you want.  If interested the code for text processing effectively starts at 0x3C403