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 - Mario 64 - Amazing Stuff | |
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33Add 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: 7002/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 09-11-05 10:13 PM Link | Quote
Hey, in that photo album... In this picture, what's that cloudy bit?

And are the links in your sig still up-to-date? The last release on that page is in July. (Not to mention it still says Bob-omb Battlefield. )
stag019

Snifit
Level: 23

Posts: 289/299
EXP: 62259
For next: 5464

Since: 06-10-05
From: C:\Documents and Settings\stag019\Desktop

Since last post: 9 days
Last activity: 7 hours
Posted on 09-11-05 10:20 PM Link | Quote
If you go upstairs, next to the across from the 15th level, and look through the wall, and you'll see it.
Here.
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 169/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 09-12-05 08:15 AM Link | Quote
Originally posted by Cellar Dweller
This may need some more verification, but I think that I have found the location of a copy of the segment table in a savestate. Using a PJ64 format savestate the location is 0x33bb60 in the savestate(subtract 0x75c to get 0x33b404 in RAM). The 7th 32 bit word points to the current level data. The decompression locations for the MIO0 files seem to be dynamic.

It is posible that this may not be the master copy of the segment table.


You mean that this 32-bit word points to a location in RAM that contains the level data? Or does it contains the address of the compress data in ROM which would be 3FC2B0 for level 1?

Also, could you post some of the data found at address 0x33bb60 in a PJ64 savestate so I can find it in my own savestates? Don't ask why, but I don't have access to PJ64...

HyperHacker, look at this picture: http://membres.lycos.fr/nes3d/Mario64InsideCastleRooms2.jpg You'll see where this cloud textured plane comes from. I guess most people don't know this, but if you switch to the head/camera mode and you look inside the entry holes for Rainbow Ride and the Secret star in the sky which is in the opposite wall, you'll see clouds at the bottom.

I removed the level editor link from my sig, because it's far from being up to date, and actually the "combo list" is almost useless since it contains objects from all levels, combined in numeric order. I now know that, for example, object type 36 means something different and needs a different behavior depending on which level you are in. (Command 22 in the object layout data decides what is associated with number 36)

My own internal "evolved" version that can open almost all levels and display objects as they are is really not ready to be published. For one thing it needs a folder containing all decompressed MIO0 files to work.
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: 7021/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 09-12-05 04:56 PM Link | Quote
Well where's the most recent public release?
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 170/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 09-13-05 10:28 AM Link | Quote
Originally posted by HyperHacker
Well where's the most recent public release?


It was the most recent public release on my download page (dating from july). Unless you want a very buggy update, you'll have to wait until I release a useable version. With all my recent discoveries, I have many things to add and test.
Nebetsu

Shmee
Level: 55

Posts: 1427/1574
EXP: 1291130
For next: 23059

Since: 09-01-04
From: Nebland

Since last post: 3 hours
Last activity: 1 hour
Posted on 09-16-05 10:16 AM Link | Quote
Originally posted by VL-Tone
Originally posted by Nebetsu
VL-Tone: I just want to interrupt the technical mumbo-jumbo and say this:

OMFG WILL J00 HAVE MY CHILDREN??????


Seriously man: Keep up the good work. It's not often that I read a 20 page topic and wish it was MUCH longer.


lol, I'm a man, and hetero at that (oh well do I really have to specify that in a ROM hacking forum?)

So you just read all pages of this topic in one stretch? How much time did it take?

I wish I had more time to spend on this, fortunately I will be able to post more often in September.

I'm hetero too. I just like to see people's reactions to that. As well: It didn't take me very long to read everything. I'm a fast reader. I didn't understand some of it, but it's all interesting stuff.


(edited by Nebetsu on 09-16-05 01:16 AM)
I Got a U-ZI in my Pocket

Red Goomba
Level: 9

Posts: 21/46
EXP: 2657
For next: 505

Since: 08-22-05
From: Los Angeles

Since last post: 9 days
Last activity: 2 days
Posted on 09-19-05 02:55 AM Link | Quote
Is the Game of Suoer mario 64 All edited. The Levels. The Grapics. Anything?
ZTaimat

Red Koopa
BOW DOWN TO LORD SESSHOMARU!!
Level: 17

Posts: 121/128
EXP: 21278
For next: 3465

Since: 03-31-05

Since last post: 20 days
Last activity: 15 days
Posted on 09-20-05 03:29 PM Link | Quote
OH. MY. GOD!

I'd NEVER be able to do what you guy's have done... probably because i take no intrest what so ever in ASM

but mybe...

Could you please PM me a link to a SM64 rom, the SM64 editor your using, and a really good N64 emulator.

Thankyou
BGNG

Snifit
Level: 22

Posts: 256/276
EXP: 56579
For next: 1771

Since: 06-03-05

Since last post: 8 days
Last activity: 3 hours
Posted on 09-24-05 11:06 AM Link | Quote
I Got a U-ZI in my Pocket:
All of the hacking progress should be confined to this thread. I know there\'s like, a billion posts to look through, but you can see what has been done.

ZTaimat:
Unless I missed a post somewhere, no Assembly was harmed in the production of this thread. You could do this to given the Non-ASM-related know-how.



I\\\'ve been doing some work with the Nintendo DS hacking scene lately (the system; not game hacking) and I\\\'ve produced a utility that will extract oodles of information from DS ROMs which will be released shortly. Of them, there seems to be a whopping 1,833 ready-to-use-and-modify files inside Super Mario 64 DS.

Here\'s some eye-candy for those of you who regard files and not pictures as eye-candy:

(The forum seems to like putting in backslashes at the moment, so here\'s a generic link
http://i7.photobucket.com/albums/y255/bgng/M64DS_Dump.png


(edited by BGNG on 09-24-05 02:07 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: 7253/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 09-24-05 01:27 PM Link | Quote
Neat. I wonder how similar the formats are?

Heh, it\'d be kinda ironic if we hacked the DS version before the N64 version.
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 171/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 09-24-05 01:46 PM Link | Quote
Well all my pics are gone for now, so I guess there wont be much useless eye-candy left in this thread I will have to build myself a script to change all the images urls in my posts. I hope to fix that in the next week.

Until then, there is still enough textual info for someone to build a usable Super Mario 64 Level editor that can edit shapes and level layouts.
You can look inside http://pages.infinit.net/voxel/Mario64HackingDoc.txt for a few of the basic offsets and format description, but this doc would need to be updated with other info found in this thread. And there may be a couple of things I forgot to post about.

Anyway...BGNG, you are doing great things with both F-Zero and now SM64 DS I wish the n64 version was as neatly organized as the DS version.

I will venture to ask the un-ask-able, why dont you build a SM64 editor? You would obviously do a better job than me. Anyway these days I\\\'m busy and need to take some time off the internet.
Kyoufu Kawa
I'm not bad. I'm just drawn that way.
Level: 70

Posts: 2323/2481
EXP: 3008456
For next: 7355

Since: 03-19-04
From: Catgirl Central

Since last post: 14 hours
Last activity: 13 hours
Posted on 09-24-05 04:27 PM Link | Quote
Originally posted by HyperHacker

Neat. I wonder how similar the formats are?

I tried that before. If there\'s any similarity in there, I can\'t see it.


Also, you\'re all a bunch of hypocrites. I asked about the DS version several pages ago and you gave me the finger!

But hey, I still love you.
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: 7257/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 09-24-05 11:07 PM Link | Quote
You can still post images, just don't use quotes.

BGNG

Snifit
Level: 22

Posts: 257/276
EXP: 56579
For next: 1771

Since: 06-03-05

Since last post: 8 days
Last activity: 3 hours
Posted on 09-25-05 05:21 AM Link | Quote
HyperHacker:
The formats are probably different. As I understand things from this thread, aren't the files in Super Mario 64 somewhat machine-ish and geared towards the performance of the coprocessor?
__________

Kawa-oneechan:
I didn't give you the finger. You love me best, right? I also noted back then that people seem to like looking at pretty pictures, so... If you'd have posted a screenshot like I did, you'd be popular. (-:
__________

VL-Tone:
Unfortunately, Super Mario 64 DS is simply a relevant side-trail from what I've been doing. I wrote a DS ROM parser to make sure I had my brain wrapped around the file format. One of the ROMs I used for testing was Super Mario 64 DS. I'm not actually doing anything with the data I extracted. Thus: I won't be doing an editor today.

My current project is in the preparation stages of writing a programming language that compiles BASIC code all the way down to a distributable DS ROM file. GCC's been the center of homebrew long enough, and I like BASIC, so... I'm undertaking this task.

I could give you some information about the data I found, though. I can tell you how to dump it and decompress it, but the storage of the data from then-on is anyone's guess as I've not looked into it. I'd be willing to bet that, however, that is a bit of a route you're not interested to be taking just yet. Perhaps later.

But go ahead and take a break. The project doesn't hinge on your shoulders just because you're the only one who's... um... advanced enough to do the work. (-:
Cellar Dweller

Flurry
!!!
Level: 27

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

Since: 03-15-04
From: Arkansas

Since last post: 16 days
Last activity: 34 min.
Posted on 09-25-05 09:05 AM Link | Quote
I have confirmed, by decompiling some functions, that 0x8033b400 is the start of the segment table as used by the game program.

Here are some more decompiled functions. I hope to find a function that processes level data.


28 posts!


EDIT: This just in: MUHHHHAHAHAHAHAHA!
80340a78: 27 bd ff e8  ADDIU sp, sp, 0xffffffe8 (-24)
80340a7c: af bf 00 14 SW ra, sp, 0x14 (20)

80340a80: 3c 0e 80 39 LUI t6, 0x8039
80340a84: 8d ce be 28 LW t6, t6, 0xffffbe28
80340a88: 85 c4 00 02 LH a0, t6, 0x2 (2)
80340a8c: 8d c5 00 04 LW a1, t6, 0x4 (4)
80340a90: 0c 09 e1 f6 JAL 0x802787d8 0x802787d8(*((short *)(*(0x8038be28)+2)), *(*(0x8038be28)+4), *(*(0x8038be28)+8));
80340a94: 8d c6 00 08 LW a2, t6, 0x8 (8)

80340a98: 3c 0f 80 39 LUI t7, 0x8039
80340a9c: 8d ef be 28 LW t7, t7, 0xffffbe28 t7 = *(0x8038be28)
80340aa0: 3c 01 80 39 LUI at, 0x8039
80340aa4: 91 f8 00 01 LBU t8, t7, 0x1 t8 = *(char)(*(0x8038be28) + 1)
80340aa8: 01 f8 c8 21 ADDU t9, t7, t8 t9 = *(0x8038be28) + *(char)(*(0x8038be28) + 1)
80340aac: ac 39 be 28 SW t9, at, 0xffffbe28 *(0x8038be28) = *(0x8038be28) + *(char)(*(0x8038be28) + 1)

80340ab0: 10 00 00 01 BEQ r0, r0, 0x80340ab4 (pc+0x4)
80340ab4: 00 00 00 00 NOP
80340ab8: 8f bf 00 14 LW ra, sp, 0x14 (20)
80340abc: 27 bd 00 18 ADDIU sp, sp, 0x18 (24)
80340ac0: 03 e0 00 08 JR ra
80340ac4: 00 00 00 00 NOP



struct mysterystruct {
char a;
char b; /* a displacement relative to the start of this struct */
short c; /* a segment */
long d; /* a start */
long e; /* an end */
};

struct mysterystruct *mystery_global_pointer;


void 0x80340a78()
{
0x802787d8(mystery_global_pointer->c, mystery_global_pointer->d, mystery_global_pointer->e);
mystery_global_pointer = (struct mysterystruct *)(((void *)mystery_global_pointer) + mystery_global_pointer->b);
}




(edited by Cellar Dweller on 09-25-05 02:49 AM)
VL-Tone

Red Cheep-cheep
Level: 23

Posts: 172/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 09-25-05 02:23 PM Link | Quote
Cellar Dweller: Wow that's looks neat, continue your great work But ehm...could you put it in context? I don't know how to connect this to what I know about Mario 64. What is the mystery struct?

BGNG : About that BASIC compiler, this is really neat, I assume it will be able to use the touch-screen? You know what would make an ideal DS development tool in my mind? That it include a graphic and sound library manager. A window would contain a list of thumbnails of graphics and sound in your game, and you would be able to import more, copy and paste, and do some basic editing and conversions between native DS graphic and sound formats. You could give them names and refer to them in BASIC code by name or ID number. Anyway it's just an idea, even without that, a BASIC compiler for the DS is just too cool

Super Mario 64 really seems to be optimized for speed and space, it uses what some call "Macro ASM commands". One byte is the opcode and the following bytes are parameters for this particular command. These commands can load things into memory, draw levels and objects, and do just about anything needed in the game logic. Some command jump to other addresses in the ROM, some commands to jump back. Sometimes there is a lot of jumping around, and it really has the overall structure of an ASM program, though it's probably automatically compiled from some higher level language and/or a custom level design tool. Overall it really is close to the way the SNES StarFox works. I read that SM64 originates from late experiments with the FX chip.

I traced back (manually) the main command that loads Level 1 in ROM:

2ABF58: 0C 0C 02 00 00 00 00 09 15 00 04 58

Bank 15 contains data starting at 2ABCA0. So this 0C command makes the program jumps to 0x458 + 2ABCA0. From there it makes another jump using 00 10 00 0E 00 40 5A 60 00 40 5F B0 0E 00 02 64. (it loads data from 405A60 into bank 0E and jumps to offset 0x264 there)

Following the program from there loads the whole level. If you look around 2ABF58, you'll see other 0C 0C commands. Each level seems to be assigned an ID number, for level 1 the number is 9. Others have negative values, like the different modules of the opening and game over sequence. For example FFFFFFF7 (-8 in decimal) is the id for the debug menu. It jumps to offset 0x0268 in bank 15. So if you change 15000458 to 15000268 in the ROM you'll get the debug menu when you enter level 1... It doesn't really work like it should, you can still try it because it gives weird results

Macro ASM commands found at 2ABCA0, 2A6120 and 269EA0 seem to be the heart of the game level loading logic. The first address gets loaded in bank 15 while the two others get alternatively loaded in bank 14. There is a lot of jumping around between those banks and it's hard to track down where the main entry point is. I suspect it's at offset 0 in bank 15 (2ABCA0).

In this area I also found a lot of text:

265980: a lot of text there, seems like classes and routine names (C++?) Just before that there are some uncompressed textures used in the Mario rubber face demo. There is one routine named "yoshi_scene"...

Text at F2E20 seems related to the game engine.
DPRINT OVER mapinfoarea xwx dwy dwz dbgY dangY dbgcode dbgstatus dbgarea dwater
dcheckinfostageinfostage param deffectinfoenemyinfoobj dNULLBG dWALL dBOUND
xTOUCH xTAKEOFF xDIVE xS WATER xU WATER xB WATER xSKY xOUT SCOPE


At F44F0 there is text about more low level stuff like AUTOSEQ AUTOBNK FIXHEAP DMACACHE

at F4DAB you can find this:

RSP SW Version: 2.0D, 04-01-96SGI U64 GFX SW TEAM: S Anderson, S Carr, H Cheng,
K Luster, R Moore, N Pooley, A Srinivasan


Kawa-oneechan I never give you the finger, I expressed my opinion about this, I personally don't like to hack a recently published game. Then other people added their opinions about it, and it caused some backlash reaction to your mention of SM64 DS. So since then I felt bad about it, and it was obvious that you stopped posting in this thread because of this incident.

I expressed that while Nintendo tolerates hacking older games, this is pushing the envelope a little. But, at the same time, I think Nintendo likes that more people learn to program the DS. They've dubbed it the "Developer System" after all. I'm thinking more and more about trying to develop a game for the DS. In any case, I don't want people to stop posting about the DS just because I said that I didn't want to hack SM64 DS. If you continued to post about SM64 DS I wouldn't have said a word about it, I would simply continued to focus on the n64 version.

I suspect that the formats are different. From what I know about it, they probably did a complete remake of the game using data and documentation from the original, unlike the All-Stars and Mario Advance series, which are more or less "ports" of the original code. I think that they wanted to have much more freedom to redo and expand the game by doing that, and they probably designed an improved level editor for it. I suspect that they planned ahead and made it possible to port it for the Revolution. Why would they do that? How about an online multi-player version of Super Mario 64 with up to 64 players? That would be fun!
Kyoufu Kawa
I'm not bad. I'm just drawn that way.
Level: 70

Posts: 2326/2481
EXP: 3008456
For next: 7355

Since: 03-19-04
From: Catgirl Central

Since last post: 14 hours
Last activity: 13 hours
Posted on 09-25-05 10:16 PM Link | Quote
The finger part was just a figure of speech, and blown out of proportion by the sudden display of percieved hypocrisy.

And I needed a pee.


Great finds. Keep hackin' away.
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: 7269/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 09-25-05 11:33 PM Link | Quote
By 'debug menu' you mean the level selector right?

I wonder how hard it'll be to make an editor for a game that uses scripts to store its level data. :-/
Cellar Dweller

Flurry
!!!
Level: 27

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

Since: 03-15-04
From: Arkansas

Since last post: 16 days
Last activity: 34 min.
Posted on 09-26-05 01:54 AM Link | Quote

struct mysterystruct {
char a;
char b; /* a displacement relative to the start of this struct */
short c; /* a segment */
long d; /* a start */
long e; /* an end */
};


This has the format of the 0x18 command. What is odd about this function is that it uses the "LH" instruction to load the segment number, which suggests that SM64 uses 16 bits for a segment value. The RSP microcode only supports 4 bits for 16 segments, so a byte would have been enough to store it.


struct mysterystruct *mystery_global_pointer;


This seems to be the working pointer of the level loader. Note below that it is increased by the value of the second byte in the struct.


void 0x80340a78()
{
0x802787d8(mystery_global_pointer->c, mystery_global_pointer->d, mystery_global_pointer->e);
mystery_global_pointer = (struct mysterystruct *)(((void *)mystery_global_pointer) + mystery_global_pointer->b);
}


The 0x802787d8 function seems to allocate a block of memory, decompesses a MIO0 block into it, and save the pointer to the decompressed data in the segment table. See the text file I linked to for more info. The second line of this function increases the pointer as described above.

This function is very likely part of the level loader.

As for being "optimized for speed and space", many of the functions that I have looked at seem to have been compiled by simple compiler, or one with optimizations turned off. There are may places where delay slots could have been taken better advantage of, instructions could have been omited, or instructions reorderd to minimize pipeline stalls.
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: 7276/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 09-26-05 04:20 AM Link | Quote
Yes, the game's code is quite inefficient. It was probably made with one of their first N64 compilers.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Rom Hacking - Mario 64 - Amazing Stuff | |


ABII


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



Page rendered in 0.020 seconds.