ROM Hack Kid Icarus: Uprising (KIU) .zrc files successfully cracked open

kanuki

New Member
OP
Newbie
Joined
Jun 26, 2024
Messages
4
Trophies
0
Age
23
XP
19
Country
Finland
Hi all,

I wanted to share my progress on cracking open KIU's .zrc files.
After a lot of research, I found out that .zrc files are simply .arc (darc) files that have been compressed with the LZ11 algorithm.

Here's a comparison of two files found in KIU's romfs: 0.arc and a0.zrc.
Notice how both files have the magic word 'darc' in them, but the .zrc's instance of the 'darc' text is offsetted.
This offset is caused by the LZ11 compression's magic word, which is highligted in red. The number 11 (note: thats 0x11 in hex, so converted to decimal it would be 17) marks that this file has been compressed with LZ11.

lz11_compression_3ds_KIU.png


You can use github user magical's nlzss python script to uncompress the .zrc file and yield a valid darc (.arc) file.

Then you can use github user yellows8's darctool program to extract the contents of the uncompressed .arc!

KIU_extracted_zrc.png


I hope this discovery helps someone!
 
Last edited by kanuki,

Master Knight DH

Member
Newcomer
Joined
Oct 19, 2014
Messages
16
Trophies
0
Age
38
XP
146
Country
United States
Hi. I already can extract the JSON files. The real problem is that the JSON files are in a sort of false JSON as I've been told by a member of the Super Mario RPG speedrun community, so they're only viewable on Hex Workshop, but they won't display properly on. Here's a sample image:
2024-03-18 (1).png

(Great Sacred Treasure boss's stats file. Note that I'm having the keyboard highlight on the damage received multiplier for Element #9, which would be Curse Element--GST takes 1.2 times damage from Curse element attacks, and 0.8 times damage from other Elements except Stab (Element #3).)

What I'm looking for is something more convenient. I can at least tell you how the information is handled to make things easier. Basically, a parameter's designation is established with one of the following numbers:
$01 - String (character count 4 bytes, text)
$02 - Integer (4 bytes, uses signed number)
$03 - Float (4 bytes, uses IEEE Float and can be subject to float error)
$04 - Boolean (0 = False, 1 = True; 1 byte)
$05 - Object Array (number of Objects 4 bytes, then each Object's name and own information)
$06 - General Array (number of Parameters 4 bytes, then each number in the Array) (Example in image: "normalAttr" which starts with $06 has 10 values to use, all established as Float)

Feel free to correct me on what $05 and $06 are exactly, but I can be sure you'd understand what I mean. The false JSON files thankfully are comprised of this stuff aside from I believe the first 16 bytes which I wouldn't have a clue what that's about, but you probably will understand what is going on at this stage. If you could make or display a program that would allow for reliably converting the false JSON files into something readable on Notepad++, I'd be very happy.
 

kanuki

New Member
OP
Newbie
Joined
Jun 26, 2024
Messages
4
Trophies
0
Age
23
XP
19
Country
Finland
Hi. I already can extract the JSON files. The real problem is that the JSON files are in a sort of false JSON as I've been told by a member of the Super Mario RPG speedrun community, so they're only viewable on Hex Workshop, but they won't display properly on. Here's a sample image:
View attachment 444601
(Great Sacred Treasure boss's stats file. Note that I'm having the keyboard highlight on the damage received multiplier for Element #9, which would be Curse Element--GST takes 1.2 times damage from Curse element attacks, and 0.8 times damage from other Elements except Stab (Element #3).)

What I'm looking for is something more convenient. I can at least tell you how the information is handled to make things easier. Basically, a parameter's designation is established with one of the following numbers:
$01 - String (character count 4 bytes, text)
$02 - Integer (4 bytes, uses signed number)
$03 - Float (4 bytes, uses IEEE Float and can be subject to float error)
$04 - Boolean (0 = False, 1 = True; 1 byte)
$05 - Object Array (number of Objects 4 bytes, then each Object's name and own information)
$06 - General Array (number of Parameters 4 bytes, then each number in the Array) (Example in image: "normalAttr" which starts with $06 has 10 values to use, all established as Float)

Feel free to correct me on what $05 and $06 are exactly, but I can be sure you'd understand what I mean. The false JSON files thankfully are comprised of this stuff aside from I believe the first 16 bytes which I wouldn't have a clue what that's about, but you probably will understand what is going on at this stage. If you could make or display a program that would allow for reliably converting the false JSON files into something readable on Notepad++, I'd be very happy.
Hi, I'm in fact working on a python script that can convert these PSLB files (false json) into proper readable jsons. I'm making good progress, so I'll probably have the script ready quite soon. I can share the script when its done!
 
  • Like
Reactions: Master Knight DH

Master Knight DH

Member
Newcomer
Joined
Oct 19, 2014
Messages
16
Trophies
0
Age
38
XP
146
Country
United States
Hi, I'm in fact working on a python script that can convert these PSLB files (false json) into proper readable jsons. I'm making good progress, so I'll probably have the script ready quite soon. I can share the script when its done!
Thank you. Can I trust that you'll ping me when you're good and ready with this? I'm on the V100 Competitive Discord if you'd be interested in going there for that. Here's an invite link good for 7 days:
https://discord.gg/2kEDVhZc
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    ZeroT21 @ ZeroT21: :rofl2: haven't seen robot chicken media in ages +1