Register - Login
Views: 99795272
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
05-03-22 05:24:31 AM
Jul - General Game/ROM Hacking - Starfox 64 ROM Expander (but difficult to use) New poll - New thread - New reply
Next newer thread | Next older thread
xdaniel
980
Level: 64


Posts: 33/982
EXP: 2153584
For next: 60513

Since: 12-04-08

Pronouns: he/they
From: Germany

Since last post: 25 days
Last activity: 50 min.

Posted on 03-30-10 11:18:24 PM (last edited by xdaniel at 03-31-10 10:08 AM) Link | Quote
(Not difficult to use anymore, but read on...)

Around the time I first messed with what would eventually lead to the original OZMAV, I also looked at a few other N64 games, getting and using data from them, etc. One of them was Starfox 64, which normally uses MIO0 compression for quite a bit of data. Peeking into the ROM, I ended up finding its DMA table (or file offset table or whatever), figured out how it works, and tried writing a ROM expander tool... which didn't work out, so I left it at that.

Fast forward to about two hours ago. Having added filename table support (for the MQ Debug ROM) and a file extractor function to OZMAV2, as well as after recieving a PM about the SF64 branch of OZMAV1 here a few days ago, I somehow felt reminded of this old experiment... And lo and behold, I made a mere typo back than! I used the wrong start offset for originally uncompressed data, the physical one of the old MIO0 block, instead of the virtual one which is now also the physical one!

So, much cleaning up and stuff later - god, my coding skill was so bad back than, it's at least improved somewhat - here's a working ROM expander for Starfox 64!

New version: http://magicstone.de/dzd/random/sf64exp_v1.rar

More info two posts below this one!

Download: http://magicstone.de/dzd/random/SF64Dec2.rar

Usage: "SF64Dec2 [uncompressed ROM] [options]"

Both, the uncompressed ROM filename and options are optional, the former defaulting to "sf64_dec.z64" if no name is given. The only possible option is "-d", which gives information about all files in the table as well as the relocation process.

Important: The program can not extract and uncompress MIO0 data by itself! You will need an external program for extracting them, after which they must be placed inside a folder called "mio0data" inside the working directory, each file named after the offset the MIO0 block comes from, ex. "0086F2C0". Also, the checksum has to be fixed after generating the expanded ROM.

If anyone has documentation and/or code for MIO0 decompression and checksum calculation, please let me know!



____________________
cu xdaniel
Rena
I had one (1) message in Discord deleted and proceeded to make a huge, huge mess about how it was a violation of free speech and how moderators are supposed to be spam janitors and nobody should have the right to tell me not to talk about school shootings
Level: 135


Posts: 2979/5390
EXP: 29075369
For next: 259636

Since: 07-22-07

Pronouns: he/him/whatever
From: RSP Segment 6

Since last post: 342 days
Last activity: 342 days

Posted on 03-31-10 03:18:56 AM Link | Quote
03-30-10 10:18:56 PM
Post #2979
Why yes, I do have an MIO0 decompressor. Mario Kart would be hard to hack without one.
It's designed for use with a simple wrapper object; you can probably guess what the function calls do. Of note, the wrapper always returns data in ABCD byte order, but then of course x86 goes all bass-ackward (hence checking for "0OIM" as the header); as long as your implementation does the same, it should work fine.

I haven't yet implemented any compression since I haven't yet needed to and it's a huge bitch.

____________________


witty comment
why not?
xdaniel
980
Level: 64


Posts: 34/982
EXP: 2153584
For next: 60513

Since: 12-04-08

Pronouns: he/they
From: Germany

Since last post: 25 days
Last activity: 50 min.

Posted on 03-31-10 01:05:45 PM Link | Quote
First of all, many thanks for the code, HyperHacker - a bit of adapting it to my code, and voilĂ , no more ugly mio0data folder! And also, thanks to the source of n64sums by Parasyte, automatic CRC calculation is in as well.

And thus, http://magicstone.de/dzd/random/sf64exp_v1.rar - now with more stand-alone-ity and source code releasing! Under Windows, mere drag and drop of a ROM file onto the executable should be enough to produce an expanded ROM image in the same folder. Otherwise, it's "sf64exp []".

Here's looking into enhancing the tool further, like creating a file extraction function and the abillity of recreating an expanded ROM file just from those. Not to mention looking into how and where DLists and level data is stored and accessed... but no guarantees on those things.


____________________
cu xdaniel
Next newer thread | Next older thread
Jul - General Game/ROM Hacking - Starfox 64 ROM Expander (but difficult to use) New poll - New thread - New reply


Rusted Logic

Acmlmboard - commit 47be4dc [2021-08-23]
©2000-2022 Acmlm, Xkeeper, Kaito Sinclaire, et al.

27 database queries.
Query execution time: 0.088438 seconds
Script execution time: 0.009869 seconds
Total render time: 0.098307 seconds