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
Acmlm's Board - I2 Archive - - Posts by VL-Tone
Pages: 1 2 3 4 5 6 7 8 9 10
User Post
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 181/200
EXP: 64158
For next: 3565

Since: 06-06-04
From: In the Moon!

Since last post: 5 days
Last activity: 2 hours
Posted on 10-11-05 05:52 AM, in Mario 64 - Amazing Stuff Link
Cellar Dweller,
That's great info, and it will be useful for sure, since it seems the only easy mean of repointing this MIO0 data. Ideally though, I was looking to do the equivalent of changing a 0x18 command (load MIO0 data into a RAM segment) to a 0x17 command (copy uncompressed ROM data into a RAM segment), and repointing the uncompressed data to the end of the ROM, extending the ROM file. It works great and enables direct editing of decompressed MIO0 data right in the ROM. The main interface MIO0 file (Fonts , icons etc.) at 108A40 is one of the only MIO0 file not decompressed with a 0x18 command.

Do you think it would be easy to achieve the equivalent of 0x18 to 0x17 switching for the 108A40 file?

Originally posted by OmegaPirate
Nice Yoshi-flys, VL-Tone...

VL-Tone
Um i was wondering if any of you (or anyone else) could find Mario Image or Object and change him into something else like an enemy?

So like, you could play as them.

The Peach head hack seemed close...
And thinking of that and the problems when entering other areas of the game... It may not be possible..


The Mario object is inserted into a level using a 0x25 command. I tried to modify the parameters but the best I could do is render Mario invisible Now Mario seems to be a special object, made of smaller objects, which are his body parts. At 0x2ABCA0 in the ROM, is one of the shared level loading script. It loads, amongst other things, the Mario MIO0 file, then uses 0x22 commands pointing to body parts in the file. Each part is assigned an ID number that is used by the game engine.

2ABCA0:

18 0C 00 04 00 11 47 50 00 12 79 B0 --Loads Mario MIO file
18 0C 00 03 00 20 14 10 00 21 8D A0 --Loads big shared MIO0 file for doors, trees, coins etc.
17 0C 00 17 00 12 79 B0 00 12 A7 E0 --Copy geometry layout for Mario into RAM segment 0x17
17 0C 00 16 00 21 8D A0 00 21 9E 00 --Copy geometry layout for Mario into bank RAM segment 0x16
17 0C 00 13 00 21 9E 00 00 21 F4 C0 --Copy unidentified data into segment 0x13
1D 04 00 00 --End of RAM segment loading commands

22 08 00 01 17 00 2D D4 --Loads some Mario body part for ID 0x01
22 08 00 96 17 00 00 38 --Loads some Mario body part for ID 0x96
22 08 00 95 17 00 01 BC
22 08 00 A8 17 00 00 00
22 08 00 A5 17 00 00 9C
22 08 00 A6 17 00 01 24
22 08 00 A7 17 00 02 30
22 08 00 A3 17 00 01 68


By modifying this area of the ROM, it may be possible to change Mario into something else. Maybe it's possible to load another MIO0 file instead, and re-associate the body parts, but other creatures don't use 0x22 commands as far as I know. Their body part arrangement comes from their geometry layout data, which uses another set of commands.

Anyway I'll try to transform Mario into Yoshi later tonight, as I didn't experimented yet modifying the values at the start of 0x2ABCA0. The Princess hack was done at the geometry layout level.

In the mean time, you can try swapping the ID numbers for body parts and see what it does!
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 182/200
EXP: 64158
For next: 3565

Since: 06-06-04
From: In the Moon!

Since last post: 5 days
Last activity: 2 hours
Posted on 10-13-05 12:38 PM, in Mario 64 - Amazing Stuff Link
Originally posted by HyperHacker
The 0x17 and 0x18 probably just call 'copy' and 'decompress and copy' functions with the same parameters. I imagine rather than actually using the script engine, the game just calls the 'decompress and copy' function manually for that file.


Yes that's what I figured out, but I'm wondering if changing this custom call from a "decompress and copy" to a "copy only" command would be as easy at the ASM level.

I thought about making a program that transform a Mario 64 ROM to a more editable form. It would automatically change all 0x18 commands in the game to 0x17, relocate all the decompressed MIO0 data after the end of the ROM and repoint the 0x17 commands accordingly, with plenty of padding between each segment so that we could expand them individually without having to move huge chunks of data.

The resulting ROM would be then much more easy to edit by an editor. All the MIO0 files decompressed are less than 8 megs, so the ROM may be 16 to 32 megs depending on the padding we want to put between segments. Maybe 24 megs could be a good compromise. But at the price of HD's these days, why stop at 24 megs? It shouldn't be that hard to make such a program, it could be done by generating the padding files, then merging it all in order with decompressed MIO0 files and the original 8 megs ROM. The 0x18 commands locations could be pre-scanned and the new offsets pre-calculated. Anyway to make this one, I'll have to dip my toe a little deeper into C++.

In other news, I didn't try to transform Mario into Yoshi yet, but it seems like a lot of manual work, matching body parts. By the way Zelda: OOT looks much more easy to work on, and it seems you can easily put any characters into any levels, as each polygon object is stored in a single YaZ0 file. Not so in Super Mario 64, as specific sets of objects are bunched together into MIO0 files, and different sets are loaded in each levels (though some are shared, like trees, doors, coins, stars etc.)

"In the future" a Mario 64 editor may provide more flexibility by letting the user choose which object sets are loaded in each level. I'll try to gather data from the original level scripts to build list of possible 0x22 commands pointer values, and which MIO0 file they are targeting. That could give us a picture of how objects are distributed among levels and MIO0 files, and how much flexibility is possible. 0x22 commands are actually pointing to "geometry layout" data loaded by a 0x17 command. The 8 bytes 0x15 command inside the geometry layout data then points to different geometry data inside a decompressed MIO0 file.

I'll try to put up a much improved Mario 64 hacking document that will list all commands I know about, and some info about the structure of the game and the way courses are loaded at the script level.


(edited by VL-Tone on 10-13-05 03:39 AM)
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 183/200
EXP: 64158
For next: 3565

Since: 06-06-04
From: In the Moon!

Since last post: 5 days
Last activity: 2 hours
Posted on 10-14-05 10:31 AM, in Mario 64 - Amazing Stuff Link
Originally posted by HyperHacker
Keep in mind that there's only 32MB of addressable space (IIRC), so that's as big as the ROM can be without some 1337hax. If you use it all for level data, future hackers won't have room for things like graphics and music.


Almost all graphics are part of the compressed MIO0 files. I'm pretty sure that only the Mario face demo uses uncompressed graphics at other places. Music files are very small (compressed midi files), though samples may take some more space.

But yeah it's a good idea to keep some free space for other things, I didn't know about the 32 megs limitation. So maybe 24 MB could be a good target size. 8 MB for the original ROM data, 8 MB for the uncompressed MIO0 files, and 8 MB distributed between each decompressed MIO0 to allow flexibility in expanding them. Also remember that space currently occupied by MIO0 files would then become available for other things.

tachyon I would help you if I could, but I can't...
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 184/200
EXP: 64158
For next: 3565

Since: 06-06-04
From: In the Moon!

Since last post: 5 days
Last activity: 2 hours
Posted on 10-16-05 11:16 AM, in Mario 64 - Amazing Stuff Link
Originally posted by Cellar Dweller
It should not be too hard to create an ASM hack to load the 0x108a40 data predecompressed from some other area. I may be able to do it, if I remember to do it.

Originally posted by HyperHacker
According to this document, 0x10000000 to 0x1FBFFFFF is the cartridge ROM area, which works out to about 250MB. Though there does seem to be a lot of mistakes in it.


AFAIK, N64 games almost never read ROM data from memory mapped areas. They set up DMA tansfers from ROM to RAM and work with data in RAM. Even the function that loads compressed data first allocates RAM for the MIO0 file, uses a DMA transfer to load it into RAM, reads the size form the MIO0 header, allocates that much RAM, calls the uncompress function, and frees the memory holding the compresssed data.

Keeping a bunch of data uncompressed may be a good idea for now, but after the data structure becomes better understood, it may be a good idea for editors to recompress the data on save. An inventory of the assets(textures, models, objects, etc) could be performed by walking the data and translating the information into the editors internal format. When saving, the data is translated back and saved in the game's format.

If anyone is looking for a no-op level command, you can use a 0x24 command with an act mask of zero and the size byte set to how many bytes to skip. The size should be a multiple of four, and a zero size will cause the level loader to hang in an infinite loop. It is also possible to increase the size byte of a command to skip commands after it.


So is there a 32MB limit on ROM size?

As for compressed data, it's not that I'm to lazy to code a MIO0 compressor, but is there really any use at keeping the compression? Anyway I'm not totally against it, but I would like to know of any reason why we should keep compressed files.

Ok I must admit that the reason I'm inclined to get rid of the compression is that it's too slow in Director/Shockwave (which is, unfortunately, what I'm more experienced in). The rest is fast enough, it has a relatively fast OpenGL or DirectX driven 3d engine.

As I said before if anyone with good C++ and OpenGL experience wants to build a Mario 64 level editor before me I won't mind at all, but if I want to make my editor progress, I need to get rid of the compression. I'm thinking of learning C++ to make a simple program that transforms the ROM into a directly editable uncompressed version that doesn't require to write too much data on saving. By keeping space between the segments in ROM, it avoids having to move big chunks of data when a segment expands. One way or another, the ROM needs to be expanded and MIO0 segments need to be relocated after 0x800000. So I will try to offset this process in C++ to get the needed speed. Once the ROM is transformed, it can be edited and used as is.

An inventory of the assets is a very good idea, but I don't see how compression can help that. By the way from my brief encounters when digging Zelda: OOT, I realized it's organized in a much better way, and that there is probably a directory of all assets somewhere. Mario 64 doesn't have that, as you said you have to walk the script to find offsets for the different parts. Most offsets refer to RAM segments and we have to keep track of which data is loaded in which segment. My current editor does that, and it has too, since there is some skipping between segments happening in level loading scripts.

That 0x24 command used as a no-op should be very useful along the way of improving the editor. I wish I found a similar command to use in StarFox.

Ok, I'm on my way to make an improved Mario 64 hacking document...
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 185/200
EXP: 64158
For next: 3565

Since: 06-06-04
From: In the Moon!

Since last post: 5 days
Last activity: 2 hours
Posted on 10-16-05 12:45 PM, in Mario 64 - Amazing Stuff Link
Originally posted by HyperHacker
Imagine downloading a patch that doesn't compress it on dialup. No reason the editor can't store things uncompressed, but have an option to compress everything before you release the hack.


RAR, ZIP or GZIP could do the same job to compress a patch as MIO0. And also, blank space can be compressed by a large amount, to only a few bytes.

VL-Tone

Red Cheep-cheep
Level: 23

Posts: 186/200
EXP: 64158
For next: 3565

Since: 06-06-04
From: In the Moon!

Since last post: 5 days
Last activity: 2 hours
Posted on 10-17-05 08:40 AM, in Mario 64 - Amazing Stuff Link
Originally posted by HyperHacker
But why waste the HD space? Even if you do have tons, you may as well compress things when it makes no noticable performance difference and saves a fair bit of space.


Why? Because I have no choice, Director/Shockwave is too slow in itself to decode and encode MIO0 files at a reasonable speed. My solution for my particular problem was to have an external C++ program preparing the ROM for more direct editing of the file. I guess I could make my editor call another external C++ program to re-compress MIO0 files and reinsert them.

Anyhow what I was proposing was a much easier solution for me and I didn't thought that "wasting" 8-16 megs on a multi-gig HD was that bad (for the environment I guess?). I never proposed that it was the best way to do things, or that other people working on an editor should do the same.

I'll stop dragging this thread into my own development platform problems, and I'll deal with those myself and with the help of people on another site, since I guess everyone here that could help me solve my "particular" problems will tell me to change dev platform and learn C++ and OpenGL.

I'll still post everything I find in Mario 64 on this thread, and any future public release of my editor, but I guess that I'll be less pro-active. I'm not mad or anything, but I'll stop wasting your time with my choice of development environment.

Bah ok I have to admit, I'm somewhat mad... not against any of you... but against myself and the situation itself.

Oh well I'll calm down, it's just a thread on a forum on the internet after all...
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 187/200
EXP: 64158
For next: 3565

Since: 06-06-04
From: In the Moon!

Since last post: 5 days
Last activity: 2 hours
Posted on 10-18-05 05:08 AM, in Mario 64 - Amazing Stuff Link
Originally posted by HyperHacker
That's why I said...
Originally posted by HyperHacker
No reason the editor can't store things uncompressed, but have an option to compress everything before you release the hack.



Ok then everything is fine, everyone is happy Forget about my rant, I had a stressful day at work...

Edit: I made a major update to my Mario 64 ROM hacking doc found at http://pages.infinit.net/voxel/Mario_64_Hacking_Doc.txt

Since some are too lazy to click URLs I'll paste what's new (it's very long).

------------------------------------
| Level Layout Script Commands |
------------------------------------

The level layout commands are used to load everything in the level and placing objects and
geometry.
The second byte of level layout commands is always the length byte.
Hex examples that are provided are from Level 1 (Bob omb's Battlefield) that starts at 405A60
in ROM.
They are shown in the order they are found in the decoded level script, starting at
405A60+0x264.
------------------------------------

[1B] [04] [00 00]

[1]: 1B= Starts a RAM loading sequence (for command 0x17, 0x18 and 0x1F)
[2]: Length byte (dec 4)
[3,4]: Always 00

------------------------------------

[18] [0C] 00 [07] [00 3F C2 B0] [00 40 5A 60]

[1]: 18= Decompress MIO0 data from ROM and copy it into a RAM segment
[4]: RAM segment to copy data to
[5,6,7,8]: Start address in ROM of MIO0 data
[9,10,11,12]: End address in ROM of MIO0 data

------------------------------------

[17] [0C] 00 [0C] [00 13 B5 D0] [00 13 B9 10]

[1]: 17= Copy uncompressed data from ROM to a RAM segment
[2]: Length byte (dec 12)
[4]: RAM segment to copy data to
[5,6,7,8]: Start address in ROM of uncompressed data
[9,10,11,12]: End address in ROM of uncompressed data

------------------------------------

[1D] [04] [00 00]

[1]: 1D= Ends a RAM loading sequence (for command 0x17, 0x18 and 0x1F)
[2]: Length byte (dec 4)
[3,4]: Always 00

------------------------------------

[25] [0C] [00 01 00 00 00 01] [13 00 2E C0]

[1]: 25= Loads Mario object, points to it's behavior code.
[2]: Length byte (dec 12)
[3,4,5,6,7,8]: ?? some parameters to be fed into the behavior code
[9,10,11,12]: Behavior code address, including segment number?

------------------------------------

[06] [08] 00 00 [15] [00 06 60]

[1]: 06= Makes the Level layout script jump to another address (and continue decoding from
there)
[2]: Length byte (dec 8)
[4]: RAM segment number to jump to
[5]: Offset in segment where to jump

------------------------------------

[07] [04] [00 00]

[1]: 07,0A= Jumps back to after the last 0x06 command was called
[2]: Length byte (dec 4)
[3,4]: Always 00

------------------------------------

[22] [08] 00 [36] [0E] [00 05 80]

[1]: 22= Loads polygon object using geometry layout data found at address, and associates an
ID number.
[2]: Length byte (dec 8)
[3]: Always 00?
[4]: ID number that will be used to insert object in level using command 0x24
[5]: RAM segment number in RAM where to find geometry layout data
[6,7,8]: Offset in segment number

------------------------------------

[21] [08] [40] [84] [08] [02 5F 08]

[1]: 21= Loads polygon object data directly without using geometry layout data
[2]: Length byte (dec 8)
[3]: ??
[4]: ID number that will be used to insert object in level using command 0x24
[5]: RAM segment number where to find geometry layout data
[6,7,8]: Offset in segment number

------------------------------------

[1F] [08] [01] [00] [0E 00 04 88]

[1]: 1F= Loads LEVEL polygons using geometry layout data found at address, and associates an
ID number. Also delimits the start of a particular area in a level.
[2]: Length byte (dec 8)
[3]: Area number in level
[4]: Always 00?
[5]: RAM segment number where to find geometry layout data
[6,7,8]: Offset in segment number

------------------------------------

[24] [18] [1F] [36] [0D 3E] [00 00] [01 80] [00 00] [00 B4] [00 00] [00 00 00 00] [13] [00 42 84]

[1]: 24= Places an object in level at X Y Z position and rotation, with some parameters.
[2]: Length byte (dec 24)
[3]: Course(s) on which the object will appear, as binary value
[4]: ID number of the object, as defined by a previous 0x22 command
[5,6] [7,8] [9,10]: X Y and Z position in level as 16-bit signed integers
[11,12] [13,14] [15,16]: X Y and Z rotation as 16-bit signed integers
[17,18,19,20]: Parameters to be fed into the behavior code, varies depending on which behavior
[21,22,23,24]: RAM segment number and offset for behavior code to be attached to this object

------------------------------------
[26] [08] [0A] [09] [01] [0A] [00 00]

[1]: 26= Command that connect warps, level entry and exit points, doors etc.
[2]: Length byte (dec 8)
[3]: Warp ID to jump from (warp ID's are defined with some previous 0x24 commands using
specific behaviors)
[4]: Course ID number to warp to (Course ID's are defined from previous 0x0C commands)
[5]: Course area/part to jump to (ie, main level and bonus slide areas)
[6]: Warp ID number in destination level area
[7,8]: Always 00 00?

------------------------------------

[28] [0C] [00 01 00 00 00 00 00 00 00 00]

[1]: 28= Sometimes seen after 0x26 commands, near the end, I don't know it's use
[2]: Length byte (dec 12)
[3-12]: ??

------------------------------------

[2E] [08] 00 00 [07] [00 E9 58]

[1]: 2E= Loads terrain collision data for level
[2]: Length byte (dec 8)
[5]: RAM segment number (usually 07, the main level polygon data segment)
[6,7,8]: Offset in segment

------------------------------------

[39] [08] 00 00 [07] [01 10 4C]

[1]: 39= Inserts multiple objects found inside main MIO0 level segment
[2]: Length byte (dec 8)
[5]: RAM segment number (usually 07, the main level polygon data segment)
[6,7,8]: Offset in segment

------------------------------------

[30] [04] [00 00]

[1]: 30= Some command sometimes used near the end of level layout
[2]: Length byte (dec 4)
[3,4]: Always 00

------------------------------------

[36] [08] [00 00 00] [03] 00 00

[1]: 36= Music command
[2]: Length byte (dec 8)
[3,4,5]: Other music parameters
[6]: Song number (see table below)

------------------------------------

[20] [04] [00 00]

[1]: 20= Seems to end area-specific data (started with command 0x1F)
[2]: Length byte (dec 4)
[3,4]: Always 00

------------------------------------

[31] [04] [00 00]

[1]: 31= Some command used near the end of level layout (usually after command 0x36)
[2]: Length byte (dec 4)
[3,4]: Always 00

------------------------------------

[2B] [0C] [01 00 00 87 E6 62 00 00 19 40]

[1]: 2B= Some command used near the end of level layout
[2]: Length byte (dec 12)
[3-12]: No Idea what it does, I didn't try to modify it...

------------------------------------

[11] [08] 00 00 [80 24 BC D8]

[1] 11,12= Some commands used near the end of level layout (0x11 is used, then 0x12)
[2]: Length byte (dec 8)
[4,5,6,7]: Some RAM address, seems to be always the same (8024BCD8)

------------------------------------

[1C] [04] [00 00]

[1]: 1C,04,1E= Some commands used near the end of level layout
[2]: Length byte (dec 4)
[3,4]: Always 00

------------------------------------

[02] [04] [00 00]

[1]: 02= End of level layout data
[2]: Length byte (dec 4)
[3,4]: Always 00

------------------------------------

------------------------------------
| Song values for command 0x36 |
------------------------------------
00-nothing
01-end level
02-SMB music title
03-Bob-omb's Battlefield
04-Inside Castle walls
05-Dire Dire Docks
06-Lethal Laval land
07-Bowser battle
08-Snow
09-Slide
0A-Crash
0B-Piranha plant lullaby
0C-Hazy Maze
0D-Star select
0E-Wing cap
0F-Metal cap
10-Bowser Message
11-Bowser course
12-Star catch
13-Ghost Merry-go-round
14-Start and End Race with Koopa the Quick
15-Star appears
16-Boss fight
17-Take a Key
18-Looping stairs
19-Crashes
1A-Credits song
1B-Crashes
1C-Toad
1D-Peach message
1E-Intro Castle sequence
1F-End fanfare
20-End music
21-Menu
22-Lakitu

------------------------------------
| Object format for command 0x39 |
------------------------------------

Each object loaded with this command is dec 10 bytes long.
[01] [1F] [01 04] [02 DF] [07 80] [00 00]

[1]: Horizontal rotation and object bank number
[2]: Object type (don't know where it's defined, has predefined behavior)
Value 1E or 00 as type will end the object list and complete the 0x39 command.
[3,4] [5,6] [7,8]: X Y and Z position in level as 16-bit signed integers
[9,10]: Object parameters




------------------------------------
| Geometry Layout Commands |
------------------------------------

The geometry layout has its own sets of commands, it doesn't use a length byte.
It contains the hierarchy of parts for a given object, calling polygon data for specific parts
or frames of animation.
I don't know much about the overall structure of the data, it may be some kind of BSP tree.
------------------------------------

[02] [01 00 00] [0E] [00 0B F0]

[1]: 02= Jumps to address in segment, continue decoding from there.
[2,3,4]:??
[5]: Segment number
[6,7,8]: Offset in segment

------------------------------------

[03] [00 00 00]
[1]: 03= Jumps back to after the last 0x02 jump command called
[2,3,4]: Always 00

------------------------------------

[15] [04 00 00] [07] [00 79 40]

[1]: 15,14= Loads polygon commands (RSP graphic lib) for an object part found in MIO0 file.
[2,3,4]: ??
[5]: Segment number
[6,7,8]: Offset in segment

------------------------------------


[18] [00 04 00] [80 2D 10 4C]
[1]: 18,19,0E= I don't know the use of these commands, it points to a RAM address, maybe hooks
for controlling animation of parts?
[2,3,4]: ??
[5,6,7,8]: Some RAM address.

------------------------------------

[04] [00 00 00]
[1]: 04,05,0C= I don't know the exact use of these, they all ends by 00 00 00.
[2,3,4]: Always 00

------------------------------------

[08] [00 00 0A] [00 A0 00 78] [00 A0 00 78]
[1]: 08= Again, I don't know much about this one.
It seems to initialize something since it's often found at the start of geometry layout data...
[5,6,7,8] [9,10,11,12]: Always 00 A0 00 78

------------------------------------
There are a few other commands for the geometry layout data not documented here, they are
mostly 4 bytes commands.
------------------------------------

------------------------------------
| Polygon data Commands |
------------------------------------

[F3] [00 0,0 00] 07 [7F F][1 00]

[1] : F3 = command to load the texture into the texture memory along with more settings
[2,3,4] : the s, t coordinates of the upper left corner of the texture tile in fixed point
format (not used?)
[5] : the tile number on the lower 3 bits
[6,7,8]: width and height of texture represented as a slant. hhhwww
width=256/www*32
height=hhh/32/width

------------------------------------

[FD] [10] 00 00 [09] [00 48 00]

[1]: FD = load texture
[3] : format/pixel size fffpp000
f = format
RGBA = 000 (there are other options)
p = storage size of 1 texel
16 bits = 10 (other options too)
0 = unused

[5]: RAM segment number
[6,7,8]: Offset in segment

------------------------------------

[03] [88] [00 10] [08] [00 C0 90]

[1]: 03= Load color for next triangles.
[2]: When is 0x86, loads the bright color, when 0x88(?) loads darkened color.
[3,4]: ??
[5]: RAM segment number
[6,7,8]: Offset in segment
(colors referred are in 32-bit RGBA format 8888)

------------------------------------

[04] [B0] [00 C0] [07 00 BD 50]

[1]: 04= Loads a chunk of vertices into RSP (The RSP cannot contain too much vertices)
[2] : number of vertices minus one in the high nibble and where in the vertex cache to load in
the low nibble
(eg 0xb+1= 0xc=12 vertices loaded into index 0)
[3,4] : number of bytes of vertex data to load( 16(dec) for each vertex) (redundant?)
[5]: RAM segment number
[6,7,8]: Offset in segment and base address for next triangles.

------------------------------------

[BF] [00 00 00] [00] [28 32 3C]

[1] : BF= Triangle command
[2,3,4] : mean nothing and are likely ignored
[5] : vertex to get normal or color from for flat shading, if flat shading is used; seems to
always be 0.
[6,7,8] : vertex number times 10(dec)

------------------------------------

[06] 00 00 00 [04] [00 CA 00]

[1]: 06= Jumps to another point in the triangle data.
[2,3,4]:??
[5]: RAM segment number
[6,7,8]: Offset in segment

------------------------------------

[B8] [00 00 00 00 00 00 00]

[1]: B8: Command that jumps back to the next command after the last "06" jump (uses a stack)
[2-8]: always zero

------------------------------------

[E6] [00 00 00 00 00 00 00]

[1]: E6= This is just makes the RSP wait until it is not using any textures,
or something like that, in preparation for loading the texture image.
[2-8]: always zero

------------------------------------

Other additional polygon (RSP graphic lib) commands may include:
E7, FC, B6, F5, E8, F2, B7, BA, B9, F8, BC and FB



(edited by VL-Tone on 10-17-05 10:38 PM)
(edited by VL-Tone on 10-18-05 03:10 AM)
(edited by VL-Tone on 10-18-05 03:15 AM)
(edited by VL-Tone on 10-18-05 10:48 PM)
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 188/200
EXP: 64158
For next: 3565

Since: 06-06-04
From: In the Moon!

Since last post: 5 days
Last activity: 2 hours
Posted on 10-18-05 12:06 PM, in Mario 64 - Amazing Stuff Link
Originally posted by Spekkio
Where can I get Mario64Edit?


My Mario64 prototype editor is not online anymore, it was very limited, only could change a few objects in one level and had a some flaws that made it not so useful. I could put it again online, but only when I moved to my new host.

The version I'm working on is improving and is able to open just about every level, but it will take some time before I can release a new version. Let's say that before the holidays I'll publish a new version


(edited by VL-Tone on 10-18-05 03:07 AM)
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 189/200
EXP: 64158
For next: 3565

Since: 06-06-04
From: In the Moon!

Since last post: 5 days
Last activity: 2 hours
Posted on 10-19-05 08:14 AM, in Mario 64 - Amazing Stuff Link
Originally posted by Santa Claus
Cool. This needs some fixing though.
Originally posted by VL-Tone
[1D] [04] [00 00]

[1]: 1B= Ends a RAM loading sequence (for command 0x17, 0x18 and 0x1F)
[2]: Length byte (dec 4)
[3,4]: Always 00




Yeah that's the joy of copy and pasting There were 2 other similar mistakes that I fixed. I also changed 2 things because I figured out how they work.

First is the 0x1F command:

[1F] [08] [01] [00] [0E 00 04 88]

[1]: 1F= Loads LEVEL polygons using geometry layout data found at address, and associates an
ID number. Also delimits the start of a particular area in a level.
[2]: Length byte (dec 8)
[3]: Area number in level
[4]: Always 00?
[5]: RAM segment number where to find geometry layout data
[6,7,8]: Offset in segment number


I found out that this command not only loads the geometry data for an area, but also marks the start of an area inside a level (ie. bonus slide), and command 0x20 seems to indicate the end of area specific data. Byte 3 in the 0x1F commands seems to determine/assign the area number, that can be used by the 0x26 warp command for example.

By the way, I successfully merged my newer decoding engine with my old editor, and it can now show and edit %90 of all levels, and thanks to my discovery yesterday, you can select which area to edit inside a level. For now it still edits the 0x24 objects only, but it displays the objects loaded from the 0x39 command too (which are inside a MIO0 file, these are the object that you guys made a list for).

You'll have to accept the following limitations if I release the new editor anytime soon: it requires that you uncompress all MIO0 files from Mario 64 and that you put them in the same folder than the editor. Each file must have its name representing the address where the MIO0 file is found in the ROM. This is the way the MIO0 de-compressor N64UNC found on Dextrose automatically names its output files, I'm not sure if the other MIO0 de-compressors work the same way... I'll probably make the 0x39 objects editable, but it will require people to deal themselves with inserting the data back into the game. (The 0x24 objects are uncompressed in ROM so it won't require that.)

I'll probably add something to edit the music bytes, and I'll work on an interface that would enable to change other things like the 0x22 commands and warps. For now, it will still be cubes representing objects, but I may add the option to make it draw them as is (which currently doesn't always work for all objects, and they don't appear in the right scale)

So Santa I'll probably release something much sooner than expected, before the holidays even start

(Edit: proof reading? what does it mean?)


(edited by VL-Tone on 10-18-05 11:15 PM)
(edited by VL-Tone on 10-18-05 11:20 PM)
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 190/200
EXP: 64158
For next: 3565

Since: 06-06-04
From: In the Moon!

Since last post: 5 days
Last activity: 2 hours
Posted on 10-19-05 10:25 AM, in Super Mario Bros Transparent Link
I've seen very good graphic and level hacks lately that probably required hours of work, and congratulation to the authors, but I can't help it, I just love that kind of graphic hack concept that is Super Mario Bros. Transparent!

I actually like it better if applied to the original levels. I still love to play the original levels once in a while, and it's surrealist twist to to the original graphics.

Shane you got a very good idea there, I look forward to the completed version. Did you think about doing a SMB 2 and 3 version?

The only thing is that I would like to see bricks that look more like bricks, but maybe it would lessen the "transparent" aspect... I don't know really, just some little nit-picking

Aside from that it's really neat visually, even more on a black background where it looks like a transparent "neon" effect.

The ASCII hack is also very interesting, though less visually pleasing
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 191/200
EXP: 64158
For next: 3565

Since: 06-06-04
From: In the Moon!

Since last post: 5 days
Last activity: 2 hours
Posted on 10-19-05 11:02 AM, in Mario 64 - Amazing Stuff Link
Originally posted by Santa Claus
Awesome. Now you just need to learn a real programming language.

Yeah I'm starting to learn D++, I just can't get enough of D++

Seriously, I have years of experience in programming, and I know I could learn other programming languages quickly, but learning C++ and OpenGL at the same time to do this would require me too much time to be able to build a Mario 64 editor. Even if I did learn those two, I would probably still use Director to prototype stuff, simply because it's much more easy on the brain, if just for the coding legibility, I find the use of { and } to be a bad typography choice, as those two looks the same when your eyes do a quick scan of a listing. For that and many other reasons I find It's much easier to test code parts with that kind of development environment, and then port the code to C++. You know it's like using C++ to prototype code that will latter be implemented in ASM, which I don't think is that rare even for experienced programmers.

That being said, I will look into some dev solutions that are not Windows specific, trying to gauge how hard it could be for me to port my editor. For now though, expect any future release of my editor to still not include built-in MIO0 decompressing or compressing.
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 192/200
EXP: 64158
For next: 3565

Since: 06-06-04
From: In the Moon!

Since last post: 5 days
Last activity: 2 hours
Posted on 10-20-05 12:59 PM, in Mario 64 - Amazing Stuff Link
Originally posted by Santa Claus
Oh now really. There are plenty of reasons to complain about C's readability, but {} isn't one of them. You just need to not write messy code. Indent!


I gave the example I had on the top of my head. I don't think that indentation totally solve the issue, as it doesn't remove the requirement to use { }. Those have more meaning than indentation, so you still have to take them into account when reading code. I guess it's nit-picking, if you take just this example, but as you said "There are plenty of reasons to complain about C's readability", and this is what I was implying in my post.

Anyhow, I said that I'm looking to start learning C++ more and probably OpenGL, so I don't want to "debate" about why one should choose C, I was stating the reason why I think some higher-level language can be good for prototyping code and interfaces, even when you know C++.

I'm reverse-engineering Super Mario 64 because I love doing it, I'll take the time I need to choose what solutions I have to get past the compression problem. In the mean time, I'll continue to evolve the Director/Shockwave version, and probably release a version "not intended for the general public".

But could we please move on? I guess I'm the one doing all the blabbering about that, but I don't think anything good can come out of having this discussion about C++ in this thread. I feel like I annoy many people when I talk about this, and I always look like the one who "over reacts" in situation like these.

The last thing I want in this context is stalling the evolution of Super Mario 64 hacking because of issues like that. I may or not ever release a fully featured editor supporting compression, like I said before, don't count on me, I'm providing a hacking tool. There is now enough info in this thread for someone to build a very useful Mario 64 level editor, so what are you waiting for people?

-Now back to our regular program-

In the ROM 21CCDC replace:
0C 00 00 00 80 2C B1 C0 0C 00 00 00 80 29 CA 58 0C 00 00 00 80 2C B2 64
with: 0C 00 00 00 80 29 CA 0C 00 00 00 80 29 CA 58 0C 00 00 00 80 29 CA 58

And you get super turbo charged Mario! He runs faster than Sonic! Some little glitches here and there but it's really fun! Mario runs faster, swims faster, and flies faster with this hack. But he also gains some mass, as he cannot jump as high Oh and yes I'm aware that some gameshark code can make Mario faster. This one can be made permanent on a ROM though, also there are other interesting Mario related things around there since it's the location of the Mario "behavior code" pointed by command 0x25 (see hacking doc).

I posted the other day something about replacing Mario with some characters and that some 0x22 commands where exceptionally used for individual Mario body parts. Well I was wrong, the 0x22 commands found at 02ABCE0 do point to the Mario data, but as whole animated objects, not body parts. Mario is only one of these objects, the first one at 02ABCE0:

22 08 00 [01] [17] [00 2D D4]

01 is the number assigned to Mario. The rest is the segment and offset where to find the Mario geometry layout. Segment 16 is containing many geometry layouts for shared objects like coins, doors trees etc. You can copy paste the last 4 bytes of the other 0x22 commands to replace the 17 00 2D D4 with something else and transform Mario into many other objects. Only copy from 0x22 commands that point to segment 16 or 17. Flat objects like coins and trees are only visible when Mario faces the camera.

In theory, it will be possible to load some other MIO0 file and then simply re-point the Mario 0x22 command.

Here are possible values for segment 16:

16000388 160003A8 1600043C 160004D0 160005F8 1600068C 16000720 160007B4 16000868 1600091C 160009D0 16000FE8 16001000 16001018 16001048

So at 2ABCE4, replace the 17002DD4 with any of these values to transform Mario into a pipe, a tree or a door amongst other weird things! (how impressive )

I'm trying to find ways to load other MIO0 files to use Yoshi or Mips for example. I don't promise anything, but it should be easier to change Mario into something else than expected.
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 193/200
EXP: 64158
For next: 3565

Since: 06-06-04
From: In the Moon!

Since last post: 5 days
Last activity: 2 hours
Posted on 10-21-05 09:46 AM, in Mario 64 - Amazing Stuff Link
Originally posted by BGNG
Our good buddies over at FreeBASIC have made a VERY handy and powerful BASIC compiler that goes for Windows, DOS and Linux. They've got NeHe's OpenGL tutorials all ported to BASIC so you would be able to use this to do your dirty work. It also has native support for such things as multithreading and inline Assembly.

Fancy thing about FreeBASIC is that the source code for it is in FreeBASIC. Now THAT'S what I call product effectiveness. (-:


Ok, I guess I should have been clearer on what I meant by "not Windows specific". Yes I meant multi-platform, but I was under impression that it was a well known fact here that I'm not working on Windows or DOS, nor Linux, because of my rant in the Hardware/Software forum. But I guess that you didn't know. My native platform is ehm *cough* Mac OS X *cough*, I have friends who use Windows so I can test stuff there, and I can run DOS in an emulator (I could run Windows too ,albeit a little slowly, but I lost my Win 98 boot disk image).

Macromedia Director/Shockwave can produce programs for both platforms, so it didn't really matter until I realized that the disk I/O routines were too slow to move large chunks of data, and that my Shockwave MIO0 decompressor is too slow to be useable (though I guess it could be optimized). That's one of the reason I was not too keen to mention it before that point, because it didn't really matter and I didn't want to be labeled with pre-concieved ideas. OS X is a FreeBSD UNIX variant, and most Linux/UNIX programs can be recompiled without much change. I recently ported the YaZ0 decompressor with only one small change. By looking at it, I could probably port the MIO0 compressor and decompressor too. But anyway it doesn't matter much to you I guess.

All that to say that FreeBASIC looks like a good solution, and the fact the source is written in FreeBASIC is really neat, but it's not natively supported on my platform even though it would be probably easy for them to port it. I'll try to find another solution, and many exists, to support all three platforms. Don't bother looking for me if you don't feel like it, and I suspect you won't.

I assume that a somewhat large percentage of people on this board have negative views of Mac OS X. I can understand that, for anyone interested in video game ROM hacking, because while OS X has zero viruses, it also has just about zero ROM hacking programs, aside from a few emulators, IPS patchers, hex editors, UNIX ports, a GBA devkit and my own level editors.

The Windows hacking tools and editors can be run in emulation (Virtual PC), and next year when I buy an intel equipped Mac, it will emulate them at 80%-90% of the native speed using the Mac port of WINE. But anyway for people doing ROM hacking on Windows (probably all of you ) the Mac is simply not a viable platform for them and I don't see how I could argue otherwise. Still, this is the platform I chose and like, and I happen to like to hack ROMs and reverse engineer them with tools I build myself, I don't mind the limitations and lack of tools, I learned to appreciate the challenge of it. But what should I do? Should I stop contributing to this thread because I don't use the best and latest tools to reverse-engineer Super Mario 64? Should I put a warning in my sig? If so, I guess it's another sign that the ROM hacking community is in a sad state...

So, now you know. Sorry for the off-topicness, though it's relevant in a way. Don't worry I don't have anything to add.

Ok, I'll add just a little useless "fun" fact. Try to guess what the president of Nintendo Satoru Iwata uses as a personal computer, see the answer in the link: http://pages.infinit.net/voxel/IwataTGS2005.jpg
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 194/200
EXP: 64158
For next: 3565

Since: 06-06-04
From: In the Moon!

Since last post: 5 days
Last activity: 2 hours
Posted on 10-22-05 07:52 AM, in Mario 64 - Amazing Stuff Link
Originally posted by BGNG
The #1 solution for cross-platform for years has been Java. Contrary to popular belief, Java code actually is fast, as the virtual machines are geared towards the processors of the machines they run on. While those .class files are compiled to a special, processor-less "byte code," Sun structured that byte code in such a way that practically any processor out there could run it well.

One of the more popular tools in the ROM hacking scene, Tile Molester, is programmed in Java and works like a charm.

One of the plusses to Java is that the programs can be run either from the shell or embedded in a web page. It supports 3D graphics (I think OpenGL) and does a good job with file I/O. The chaps over at Equinox have been making demos for Java for quite a while, and some of their stuff is downright impressive.

Definitely look into that one if you're looking for something versatile. Java takes some getting used to, but it's very flexible.


Yeah actually Tile Molester is one of the few ROM hacking tool that can run "natively" on the Mac OS, thanks Snowbro! (Yeah I like to thank him, he started it all! )

I had Java in mind before, but got under the impression that it was not very good at 3d graphics. You seem to say that it's not the case, and I believe you, but I'm pretty sure that Java cannot drive OpenGL inside a web browser without downloading something extra. Anyway I don't mind, it's not a requirement for me that it works online, even if I did publish online demos of editors in the past, like the StarFox editor, which was not exactly "good" since it had to contain part of the ROM data.

There was one version of Director in the past that supported "exporting" to Java directly, but it only made sense for small programs, and many things wouldn't be translatable. Some helper would tell you which lines to change, but for anything big it became too complicated. The feature was latter dropped. The current version of Director does supports Java syntax for scripting, which will probably help me make the transition, even if I currently mostly use the Director/Lingo syntax which is not so far from Java anyway.

So Java it will be I keep getting recommendations for AJAX, so I guess I'll give it a try. I don't know why I got so inclined to go to C++, maybe because I needed raw power. But Java is also on the list of languages I want to learn, and I kinda forgot how fast it was for disk I/O.

Santa Claus: I have a picture of Miyamoto San himself having a Mac at his desk, but it's an old photo so it doesn't mean he still use them (though I would personally assume so). Nintendo does use Windows for part of their development. Intelligent Systems http://intsys.co.jp which is a spin-off of Nintendo's R&D1 (or are they R&D1?), is responsible for such games as Metroid Fusion, the (Advanced) Wars series, Fire Emblem, Panel de Pon (Tetris attack) and others, is also producing some of the Nintendo development tools for the n64, GB(A), DS and Gamecube. If you look on their page you can find that many of these tools also exists for the Mac OS, which implies that at least Intelligent Systems uses some Macs to make Nintendo games.

I know it's a drop in the ocean of Windows using developers, but I just wanted to dispel the myth that only dumb people buy and use Macs. Many people that you admire use them, and not necessarily just because they look "cool".

But let's move on, I'm starting to learn Java, which is by definition cross-platform, and I expect to learn it pretty quickly considering my years of experience at programming in a not so different language. So I guess I'll try to port my Super Mario 64 editor to Java piece by piece (first the level decoding routine, then the 3d part).
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 195/200
EXP: 64158
For next: 3565

Since: 06-06-04
From: In the Moon!

Since last post: 5 days
Last activity: 2 hours
Posted on 10-22-05 08:13 AM, in Super Mario Bros Transparent Link
The Metroid transparent really looks (to me) like a "slice" of my voxel based Metroid. You guys never seen a slice of a Metroid Cubed scene, but I did, and it looks something like that (since most object are hollowed).

Anyhow Shane -26-, don't worry about the de-sticking, it doesn't mean your project is not cool, it got very positive reactions overall so I hope you are still working on it!

Edit: Ehmmm... I didn't read the "other" thread about SMB transparent before posting this...Oh well, I thought it was a neat idea, I don't read much of the other threads these days and that one seamed to stand out, so that's why I got interested in it. I never thought it deserved a sticky though.


(edited by VL-Tone on 10-22-05 01:32 AM)
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 196/200
EXP: 64158
For next: 3565

Since: 06-06-04
From: In the Moon!

Since last post: 5 days
Last activity: 2 hours
Posted on 10-22-05 11:42 AM, in I know, I know... I'm an asshole.. but come on! Link
Oh wow that's just fine...I add my second "innocently" positive post on the Super Mario Transparent thread, but just AFTER posting I find this thread... Yeah, just fine... /end sarcasm

The M64 thread is taking enough time of my life as it is, I usually don't take the time to read the other threads here these days, unless something stands out or deals with my favorite games (which are few).

In the first positive comment I posted in the SMB transparent thread, I took the time to explain that while I saw many very neat level and graphic hacks, I liked this one too even if it need much less work.

I don't have time to congratulate everyone for all the great hacks that get published these days. I'm very impressed by what many do here but I just don't have the time even look at them, even less post a comment on each of them.

I'm an older gamer, I have different tastes and a different nostalgia about very specific games, so while a complete level and graphic hack for Final Fantasy 1 deserves praise, if it's only for the effort involved, I simply doesn't see myself posting a comment on a FF1 thread simply because the game doesn't mean anything to me, as I'm not an RPG fan and played the game for at most 30 minutes in my whole life.

I can understand that not everyone can see a value in the result of SMB transparent, but it seems that people "on the other side" cannot understand why others could have other tastes. Some of you in this thread, including Disch seem to attack (maybe indirectly) anyone that posted positive comments on the other thread by saying it's the worst hack ever and things like that.

The problem is that your frustration comes from the number of people that posted positive things on this particular thread, compared to threads on much more evolved hacks. Well nobody here in particular decided the number of people that would post positive things there. Blaming each of the individuals is the wrong thing to do. If only one person posted a positive comment about this one, we wouldn't have this thread...

What do you expect with your rant Disch? That everyone will be afraid to post positive things on hacks that require less than 50 hours to do and that automagically only "good" extensive hacks will be posted here?

Unless something in the rules forbids a hack like SMB transparent to be posted, it shouldn't work like that: angry mobs of users trying to impose what type of hacks should receive positive comments.

How about making a sticky: "Don't post positive things about an easy concept hack, or some user will get angry and start a thread that all the other angry users users will join to blast your post"

I guess that the fact that the "other thread" was posted as a sticky for some period of time didn't help things, I never thought it was a good idea to make it a sticky, but I thought "the mods are always right". I would have posted in the thread if hasn't been a sticky anyway, because I'm dumb it seems

So muchos gracias, have a good night.
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 197/200
EXP: 64158
For next: 3565

Since: 06-06-04
From: In the Moon!

Since last post: 5 days
Last activity: 2 hours
Posted on 10-23-05 07:47 AM, in Mario 64 - Amazing Stuff Link
Originally posted by tachyon
sorry to ask for another utility, but where can I get n64unc? I googled it and checked the dextrose site, but got nothing.


Don't be sorry, it's hard to find

There you go, here is the address:
http://www.dextrose.com/index.php?s=3&m=8&f=270#f270
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 198/200
EXP: 64158
For next: 3565

Since: 06-06-04
From: In the Moon!

Since last post: 5 days
Last activity: 2 hours
Posted on 10-24-05 12:42 PM, in Mario 64 - Amazing Stuff Link
Originally posted by tachyon
that's the order it's in. does it have to have a .mio0 ending or something?


I used .Z64 when I used the program (in DOS), or maybe it was .n64? Anyway it's the ROM you have to open, the program will search for MIO0 files inside the ROM for you and extract all of them in one sweep.

BGNG: That Java 3d API looks really neat, I'll look more into that...

I did some work on my editor lately, I'm currenting experimenting a new interface layout. Please don't mind the gaps in the interface, they'll be filled by future features, and I'm currently shifting things around.

Just to be sure it's clear enough, this is not a release, it's a peek into what I'm experimenting with the editor.



(Dang this time I used photobucket!)

If you click "Load Level" you will be presented with a list of every level in the game and its sub areas that you can click to load a particular level area. For now there are a few areas that won't load.

The white text list in the upper left corner is to select what kind of objects you want to edit in the game. If you select Objects (0x24), the editor will behave much like the old version, but with some new things like the list of object you find just below the edit mode list (small green text).

By clicking on lines on this list you can select an object to be edited with the interface at the bottom. The same applies to the other edit modes. The 0x39 objects, which I call "Macro Objects" because they can spawn multiple objects, like 3 Goombas at the same time for example, or coin formations, are called by a single 0x39 object found in an area, which reads a list found in the main level MIO0 file. They are represented for now in the 3d view as blue diamonds, and the 0x24 objects are still tri-color cubes. When in Macro Object editing mode, a different kind of list is presented with a description based on the list of objects made earlier in this thread. I'm also implementing an editor for the music values for each area (easy), and warp values (not so easy).

Many other types of object editors could be added to the list, for 0x22 commands or 0x18 commands for example. Maybe I could put an "expert mode" where those would appear.

I have other kind of features in mind, like camera position bookmarking, where you can save camera positions to go back later. I added a feature where the camera will automatically position itself to have a good view near an object that you select.

Ok that's it for now, I gotta sleep sometimes , and I work more early tomorrow.
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 199/200
EXP: 64158
For next: 3565

Since: 06-06-04
From: In the Moon!

Since last post: 5 days
Last activity: 2 hours
Posted on 10-27-05 09:41 AM, in Mario 64 - Amazing Stuff Link
Originally posted by tachyon
okay, thanks. I think I'm ready to start hacking now.
EDIT: ok, I ran into a problem. I changed a byte in one of the decompressed objects and recompressed it, and when I tried to run the ROM on pj64, it said it was not a valid rom. so far so good, I assumed I had simply changed a vital byte and corrupted the rom. but when I changed it back and recompressed the file back in, it gave the same error. this fixes when I delete the rom and start from the backup rom. I assume it's some problem with compression, and has to do with your quote "you need to do a bit of hex-editing with the output before you can stick it back into the ROM". what kind of editing is necessary?


Hmmm, first, are you sure you get a MIO0 file that is the same size? You can't just insert a differently sized MIO0 file back and thus making the ROM a different size, because even if your emu didn't warn you of a wrong size, the game will more than likely crash when run.

So first, verify if you get a MIO0 file of the same size when you recompress. If it's the same size, paste it over the original. If it's smaller, paste it over too, but keep the rest of the data so it doesn't change the ROM size. If it's bigger you'll have to extend the ROM and paste it somewhere else in the extended part.

For both a bigger and smaller MIO0 file, you'll have to find the 0x18 command that loads the file (sometimes there are a few of them) and change the start AND the end pointers so that they match the new MIO0 file. To find these commands, you can usually search for the MIO0 file start address, and almost all the occurrences you should find are part of 0x18 commands.

You can also change the 0x18 in the command to 0x17, and paste the UN-compressed version of the MIO0 file into an extended ROM. Don't forget to change the start and end pointers too. That way you can edit bytes directly into the ROM without having to re-compress and insert the data each time.

In other news, I started fixing my pictures in the first 7 pages of this thread, which were 404. I'll continue the rest in the next few days.
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 200/200
EXP: 64158
For next: 3565

Since: 06-06-04
From: In the Moon!

Since last post: 5 days
Last activity: 2 hours
Posted on 10-28-05 09:13 AM, in Mario 64 - Amazing Stuff Link
Originally posted by tachyon
whoa! how good IS your compression?! I did what you said, and the new file was about 7500 kb smaller! anyway, how do you know if the lines ( I'm talking about the rows of bytes at a certain rom address such as the first line of the rom, sorry I don't know the word for that) you find are 0x18 pointers or not?


Look at the format of the 0x18 command earlier in the thread, it always begins with 18 0C. So you should find 18 0C a few bytes before the pointers. As for the compression, it's not even a matter of a good or bad implementation. You should understand that even a single byte change can change the size of the compressed file, and you can't really predict what the compressed size will be until you compress it. Actually, if you change something and the re-compressed file is the same size, then you were lucky...

(Edit: 200 posts! Wow did I really post 200 times?)


(edited by VL-Tone on 10-28-05 12:15 AM)
Pages: 1 2 3 4 5 6 7 8 9 10
Acmlm's Board - I2 Archive - - Posts by VL-Tone


ABII


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



Page rendered in 0.011 seconds.