Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
1 user currently in Rom Hacking: hukka | 2 guests
Acmlm's Board - I2 Archive - Rom Hacking - MIO0 Compression Tool - Beta release | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 3562/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 03-07-05 09:13 AM Link | Quote
I've almost completed work on my MIO0 compression/decompression program. For those who don't know, MIO0 is a compression format used in many N64 games (Mario 64, Mario Kart, and Banjo-Kazooie to name a few). This version is able to decompress and compress the files, however, the compression is not quite as efficient as Nintendo's so you probably won't be able to do much with it. (It still works, the files are just bigger.)

Download
C Source Code

Because it's not finished yet, it still displays a lot of debugging information, and the source code is rather messy (lots of commented-out code and such). I wasn't going to bother cleaning it up until it was entirely finished. The source code includes several files:
main.h - Header file.
make.bat - MinGW makefile. Automatically compiles and runs the program with whatever arguments you gave it.
Mario 64 - MIO0-Related ASM.txt - Some ASM related to decompression in Mario 64.
Mario 64 - MIO0 Data.txt - Description of all compresed files in Mario 64.
Mario Kart - Compression code explanation.txt - A more human-readable version of the next file.
Mario Kart - MIO0-related code.asm - A disassembly of what appears to be part of the compression code in Mario Kart 64. (This is code for compression, not decompression. The game compresses Time Trial ghosts when saving them to the memory card.)
Mario Kart - MIO0 Data.txt - Description of all compressed files in Mario Kart 64.
mio0.c - Main source code.
viewer.exe - An old VB program I made with someone else's decompression code (guy by the name of BGNG, I believe). It looks for compressed files and displays them as hex, ASCII, and graphics. There's a few bugs, mainly that the colour code doesn't work quite right (colours will often be wrong, but you can still make out the graphics), and you need to use the scrollbar to scroll the hex view. IIRC you can use the Left and Right buttons to change the width and Up and Down to scroll the graphics.

Tip: Pipe the output to a file when compressing or decompressing; it will tell you exactly how the data is being handled. (Note that the output will be logged to a file in the directory make.bat is in, not the \bin directory.) Comparing decompression straight from the ROM with decompression of the same file compressed with this program allows you to spot exactly what is being done differently, so hopefully someone can figure out that last bit of optimization it needs. (But look at the source code first, the part that needs to be fixed is clearly marked. ) Note again, however, that the compression does work, so if you can deal with it being a bit bigger you can go ahead and stick it back into the ROM and see what happens.

You can get a program to open the .rar files here. If you look around I'm pretty sure there's a free version buried somewhere in there, if not the trial works just fine and it's quite possible to use it forever without modifying anything, though I can't exactly tell you how. *cough*titlebar*cough* Have fun with that, hopefully I'll be able to optimize it more soon, and then N64 hacking will be significantly more possible.
Someguy

Buzzy Beetle
It seems as though the girl you've fallen for is also a pyromaniac.
Level: 32

Posts: 242/397
EXP: 193329
For next: 13113

Since: 03-15-04
From: I'm proud to be an American... I think...

Since last post: 1 day
Last activity: 5 hours
Posted on 03-07-05 06:32 PM Link | Quote
"3FC2B0: Is there any GFX not in this game? (16/32) - LEVEL 1 LAYOUT DATA! (Non-GFX starts around 0x2800)" When you say layout do you mean the geometry or the objects that make it up?
Cellar Dweller

Flurry
!!!
Level: 27

Posts: 211/269
EXP: 107817
For next: 8342

Since: 03-15-04
From: Arkansas

Since last post: 16 days
Last activity: 34 min.
Posted on 03-08-05 06:51 AM Link | Quote
Originally posted by Someguy
"3FC2B0: Is there any GFX not in this game? (16/32) - LEVEL 1 LAYOUT DATA! (Non-GFX starts around 0x2800)" When you say layout do you mean the geometry or the objects that make it up?


It contains ground geometry data and textures for Bob-omb Battlefield. It might also contain data for the objects, but that hasn't been determined, to my knowledge.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 3617/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 03-08-05 09:26 AM Link | Quote
I really don't know what all is in there, but it does contain the geometry data. IIRC, about 256 bytes past that offset in is some data that affects a few polygons near the white bridge, just after the little staircase.

Here's an old thread about it, including the actual compression format specs. (I probably should have included that... )


(edited by HyperHacker on 03-08-05 12:27 AM)
Cellar Dweller

Flurry
!!!
Level: 27

Posts: 212/269
EXP: 107817
For next: 8342

Since: 03-15-04
From: Arkansas

Since last post: 16 days
Last activity: 34 min.
Posted on 03-08-05 11:26 AM Link | Quote
I checked the thread at EmuTalk. The thread has been active as recently last January and a link to another MIO0 compression tool (by CaH4e3) has been posted on the last page.

Instead of using repeated addition to raise 2 to any power, I suggest using a bit shift on 1. eg. "(1<<Power)"


(edited by Cellar Dweller on 03-08-05 02:27 AM)
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 3638/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 03-09-05 10:50 AM Link | Quote
Hah, I should have thought of that, seeing how I use it everywhere else. Awesome find though... Now if I wasn't so damn tired I'd start playing with it.
Cellar Dweller

Flurry
!!!
Level: 27

Posts: 215/269
EXP: 107817
For next: 8342

Since: 03-15-04
From: Arkansas

Since last post: 16 days
Last activity: 34 min.
Posted on 03-12-05 12:07 PM Link | Quote
I tried to change the graphics near the start of the compressed block that contains the Bob-omb Battlefield data, recompress it, and place it in the ROM.

First, I tried to change the fence texture to 16 1 pixel high horz. bands of one bit pixel values (a row of 0001, then 0002, 0004, ... , 8000) followed by a block of zeros for the rest of the texture. When I inserted it and ran the patched ROM, the emulator (PJ64) segfaulted on starting the level.

Other attempts to change the same texture brought up a RSP(?) debugger or hung the game.

I was starting with data that I decompressed with my own tool a while back, CaH4e3's compressor, and the Japanese ROM. Perhaps it would be good idea to check the various compression tools against each other.

Not much luck so far
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 3671/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 03-13-05 05:49 PM Link | Quote
I've had the same problem. Replacing the file always crashes the game, even if they're exactly the same size. It doesn't crash if you edit the compressed data in the ROM though...
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Rom Hacking - MIO0 Compression Tool - Beta release | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.019 seconds.