What's new

Do any guides exist for altering ROMs or Bin Files?

bump. Anyone got any idea on how to get those .nz table files opened. I keep digging at it with different tools (Table Building Tools and such from rockhacking.net) however none of those seem to work. They only seem to be able to get the ASCII characters which the hex editor already pulled out.
 
I know none software wich may encode WAV to SPSD container/format.
I think that @MetalliC was refering to this when he mention how to encode / decode between WAV and SPSD format.
So I think what he was mentioning was in regard to if I wanted to add music tracks that hadn't been previously converted. That will come later as I hope to add all the tracks from initial D special stage to ID Ver3. At this point I am just trying to be able to add songs to the rom and match the name / artist match in the song listing in game.

Basically in the hex editor I can see where it calls out and pulls in all the specific rom music files so much so that I added a track (From a previous version) and added it to the listing of files that get pulled in. The code seems to have no issue sucking it up as it is already in the correct format but when it tried to call the track it crashed and locked the game up (This happens just a few seconds after the rom starts and when it looks for which music files to play during the boot up process. Looking more closely at the issue. It seems to come from each of the files being preceded by a value that is linked to a table which then links to the songsID, artist name and song name ect. I can see where the code points (IE which table these values are contained in and what directory the code looks into for the streams (song files)) but I can't get the table open or in a state that I can edit them. That is currently my biggest issue as I think if I could get into those I could add music (All the songs from the previous versions of the game) then I could start working on the WAV to SPSD conversion issue.

To explain this a bit better what I currently see is this

Some Value then the name of the bin file
i 2_Speedy_Speed_Boy.bin
x 3_Remember_Me.bin
' 4_Stop_Self_Control.bin

So the values that come before seem to somehow link to a table which tells the code where to get each file and how they are linked and such. When looking at the table it seems to be zipped or something weird and when I am trying to use a table builder none of them seem to be able to help show what the values are. I'm probably just talking in circles at this point lol.


Here is what I am thinking for the Road Map

1. Proof of Concept - Can we alter the rom at all (Music) - Done
2. Can we add a single extra song to the existing listing - Stuck with the issues above
3. Add all the music from versions 1 and 2 to version 3 - Blocked by item 2 / Not Started
4. See what file formats exist in the PS2 iso file for IDSS and pull those files out - Blocked by item 3 / Not Started
5. Insert those files into ver 3 (Depending on if they need conversion) - Blocked by item 4 / Not Started
5a. Convert file format if needed
 
bump. Anyone got any idea on how to get those .nz table files opened. I keep digging at it with different tools (Table Building Tools and such from rockhacking.net) however none of those seem to work. They only seem to be able to get the ASCII characters which the hex editor already pulled out.
welp, .nz files starts from "NMZIP" signature, followed by high entropy data, I'd say its pretty obvious - these is compressed. you have to find or create tools to work with this.
 
that ZIP as part of the word NMZIP makes it a little suspicious. I would try to unpack it using regular ZIP decompression routine. There may be some bytes/header that needs to be removed. I haven't checked it much so can't say.
 
nah, wont work. might be something custom or IRIX-specific (this game data ISO seems was build using SGI software, so it might be there was used more SGI/IRIX-specific tools), so I'm expecting there will be something more like gzip. but I'm not *nix guy, so don't know all the compression software for this ecosystem.
 
bump. Anyone got any idea on how to get those .nz table files opened. I keep digging at it with different tools (Table Building Tools and such from rockhacking.net) however none of those seem to work. They only seem to be able to get the ASCII characters which the hex editor already pulled out.
welp, .nz files starts from "NMZIP" signature, followed by high entropy data, I'd say its pretty obvious - these is compressed. you have to find or create tools to work with this.
Yeah I totally forgot to mention the whole NMZIP lol. I fell down that hole but my search fu didn't return much so i figured perhaps it was some sort of SEGA proprietary software or something. I did do things like try other programs to unzip the files but none of them worked. Ty to everyone for all the items and help thus far. MY bad for forgetting to mention the whole NMZIP (Important detail here folks hahaha).
 
nah, wont work. might be something custom or IRIX-specific (this game data ISO seems was build using SGI software, so it might be there was used more SGI/IRIX-specific tools), so I'm expecting there will be something more like gzip. but I'm not *nix guy, so don't know all the compression software for this ecosystem.
DANG! DANG! DANG! lol However that is good info though perhaps I can see if any SGI/IRIX tools exist to unzip these? (Well assuming they are on the web) I am not familiar with either of those abbreviations so who knows. Either way ty for the tip!
 
Actually I am starting to wonder now. After digging some more I am seeing this in the code.

nmz_decompress %s %d

<<%s>>NMZSIZE=%d

Z_Stream inflateEnd [FL DTOR : %08x]


That looks like a zlib decompression method to me but I can't seem to get them to decompress. I wonder if it has something to do with that NMZIP header they placed in the file. Removing it doesn't seem to do the trick... Hmmm Any ideas?
 
Last edited:
If you want to send me a link to the file I will look at it.

EDIT: extracted the files and it is infact zlib data. .nz/NMZIP is just some file container/wrapper

binwalk is your friend

Code:
$ binwalk LOSE3.bin.nz 

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
32            0x20            Zlib compressed data, default compression
 
Last edited:
funny you called it brain Fuck source code LOL

That is awesome. so wait were you able to get any of those files to unzip? If so I feel like that is a big step in the right direction. :)

Thanks!
 
For anyone following along... here are some notes from PMs with timsithD


Code:
Those are all binary files, fyi.

$ hexdump select_spr.bin.nz | head -n 4
0000000 4d4e 495a 0050 0000 0000 0000 0000 0000
0000010 0000 0000 0000 0000 0000 0000 d800 0005
0000020 9c78 bd74 8fbf c75b 2eb2 9c3a e067 c0c8
0000030 7c0e 0380 ced8 7486 e472 6ee8 7747 7b67

You would need to trim the first 20 bytes(like we saw in binwalk).....all the way up to 9c78 (9c78 is the zlib compression flag header)

wxHexEditor is an intuitive hex editor for linux.

trim those first bits(select and trash)...save the file... then use zlib-flate to decompress
zlib-flate -uncompress < trim-v3sS08name_tex.bin.nz > trim-v3sS08name_tex.bin
 
I keep digging and unzipping these files but I am not finding much information that is meaningful. Seems like all of them are just SH4 Binaries. Can anyone help with this and see where the function _BGMListDisp calls out to in order to generate the list of songs. I am lost at this point as I figured some of those zipped up NZ files once unzipped would have the linkages. Thanks for any help :)
 
Back
Top