ROM Hack Hotel Dusk Need help to hack

yerenkow

Member
OP
Newcomer
Joined
Feb 2, 2009
Messages
7
Trophies
0
XP
56
Country
Well, anyone had hacked hotel?
I've made so far:
After unpacking ROM, I've found textdata_usa.wpf
It has many files in there, in such structure:
24 bytes for name of packed file;
4 byte - file size; 4 byte - start of next file;

After that I've mad a simple unpacker, and convert this textdata_usa.wpf to a directory with bunch of files.

I need to translate, so I look into *.txt
It have this structure:

12 3D DA - header;
01/00 - type of file;
4 next bytes = unknown yet;
8 bytes = size of used part of file (adding to this number 16, increasing to nearest number, which divide on 16, and this is real filesystem size)

1byte = some flag; (in filetype 01 there are three of these flags: FF,FD,FB)
2 bytes = count of pointers with offsets (could be 1 byte instead of two, maybe there are resemblance with previous flag)
3 bytes = another header, common for many files;
1 byte = unknown;
After that, starts pointer table with such structure:
[2 bytes offset][2 bytes pointer] FF (delimeter)
[2 bytes offset][2 bytes pointer][2 bytes offset][2 bytes pointer] FF (delimeter)
....
[2 bytes offset][2 bytes pointer][2 bytes offset][2 bytes pointer] FF (delimeter)
[2 bytes offset][2 bytes pointer] (can be leading 00 00)

Count of pointers and offsets can be even, so table will ends after FF.

Text starts in point 16 + (count of pointers with offsets)*9/2


That's all.
After that, I see text with missing some words;


For example, here is missing word "for".
hotel.jpg


Someone have some ideas?

I'll continue digging there anyway.
 

yerenkow

Member
OP
Newcomer
Joined
Feb 2, 2009
Messages
7
Trophies
0
XP
56
Country
I could be wrong, but it's almost all plain text...
FF - I thing it's dialog sound (when text typing on screen)
I'll try tomorrow split text by pointers, maybe there will be some system or scheme.
 

Vampires

Member
Newcomer
Joined
Mar 16, 2008
Messages
17
Trophies
0
XP
74
Country
Serbia, Republic of
It's an LZ77 compression. Read about LZ compression and you'll understand meaning of 0xFF byte and where is your missing "for" word.
What about Phoenix Wright, already dumped it?
 

yerenkow

Member
OP
Newcomer
Joined
Feb 2, 2009
Messages
7
Trophies
0
XP
56
Country
offtopic: yes, phoenix already dumped and translated. Meanwhile, I'm as main programmer of our team, looking into next ROM
smile.gif


Ok, I've read "FAQ for the LZSS Compression". After that and further analysis i came to opinion:

File consist of header (16 bytes) and compressed data.
Delimeter = 11111111.
Each byte in delimeter correspond to one of next 8 bytes of data;
1 means that there are single byte, which simply copied to uncompressed data;
0 means that there is chain.
Chain can be 3 bytes, and sometime 2 byte (damn, why is that?... where's system?
smile.gif
)

Here a sample file,
Small file

Maybe someone say something about it.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Julie_Pilgrim @ Julie_Pilgrim:
    the internet
  • Julie_Pilgrim @ Julie_Pilgrim:
    @Psionic Roshambo i have 16 gb in my pc and i run into issues with ram more than i'd like to admit
  • HiradeGirl @ HiradeGirl:
    I got only 8GB of RAM. But I want 32GB.
  • Sonic Angel Knight @ Sonic Angel Knight:
    Time to just download more ram
  • K3Nv2 @ K3Nv2:
    Yeah search Google
  • Sonic Angel Knight @ Sonic Angel Knight:
    Or, I also heard that if you use flash memory, it can act as more "RAM" at least windows tell me when I stick a flash drive into it.
  • Veho @ Veho:
    It can act as a swap drive but that isn't more RAM, it's slooow.
  • K3Nv2 @ K3Nv2:
    I wish we could have 1Gbps external storage by now
  • K3Nv2 @ K3Nv2:
    Like for micro
  • Veho @ Veho:
    New Myoo.
  • SylverReZ @ SylverReZ:
    @Veho, Yooo noice
  • SylverReZ @ SylverReZ:
    Looks like a Famicom handheld
  • Veho @ Veho:
    Yeah, they were going for that.
  • Veho @ Veho:
    It's not very good though.
  • Veho @ Veho:
    I'm watching the review, the emulators it uses suck bawls.
  • Veho @ Veho:
    Software update might improve it.
  • Psionic Roshambo @ Psionic Roshambo:
    Or maybe someone will make like Emulation Station for it or something?
  • Veho @ Veho:
    That counts as a software update :tpi:
    +1
  • OctoAori20 @ OctoAori20:
    Ello
  • K3Nv2 @ K3Nv2:
    I can think of the design teams process another joystick and no audio or a joystick and mono audio
  • Veho @ Veho:
    "You think we can just put the speakers at the top
    ?" "NO!"
    +1
  • K3Nv2 @ K3Nv2:
    Pft stereo speakers you're fired
    +1
    K3Nv2 @ K3Nv2: Pft stereo speakers you're fired +1