Register - Login
Views: 94255590
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
08-17-18 11:56:51 PM

Jul - SM64 Hacking (Archive) - Beta Stuff Thread: Beta Trampoline and other stuff New poll - New thread - Thread closed
Pages: 1 2 3 4 5Next newer thread | Next older thread
VL-Tone
Member
Super Mario 64 forum moderator
Level: 51


Posts: 480/621
EXP: 983515
For next: 30423

Since: 07-27-07

From: Montreal, Canada

Since last post: 354 days
Last activity: 14 days

Posted on 05-19-09 05:38:10 PM Link
Not so long ago I made a thread about my quest to find an hex editor which could be used to visually color code known data inside the ROM to make it easier to find things we don't know about. Since I didn't find one, a suggestion by messiaen was to blank out known parts with zeros, so that only the "unknown" stuff would be left. I modified TT64 so that everything read while opening the ROM would be blanked out with zeros in another ROM.

My initial goal was to try to find the level-specific camera controls, and that would be very useful for version 0.6b, but I stumbled on some beta stuff along the way. (In other words, I wasn't intending on "wasting" time on doing something else than actually working on TT64...)

Some of you may already have found the yellow question mark texture with a red background. I had found it in the early days, but wasn't sure if it was in the game or not. With the blanked out ROM, it stood up as one of the unused texture in the game. And by looking for the texture pointer in the ROM, I found the polygon data, then the geo layout data.




Its found in the same banks (poly and geo) than the Cap switch, which was incidentally the only object used by the game in that bank.

The Geo Layout bank is at: 166BD0-166C60 and must be loaded in bank 0x0C using this command: 17 0C 00 0C 00 16 6B D0 00 16 6C 60

The polygon and textures are found at: 9109C4-913E8C in an extended ROM, and must be loaded in bank 0x05 using this command: 17 0C 00 05 00 91 09 C4 00 91 3E 8C

The object is split in 3 parts: One part is found at offset 0x00 in the geo layout, the other at 0x18 and the third at 0x30.

So I manually created 3 0x22 command and assigned them model IDs 54,55 and 56 which are in the range of model IDs for objects in bank 0x0C (ID 55 is taken by the cap switch).

22 08 00 56 0C 00 00 00
22 08 00 57 0C 00 00 18
22 08 00 54 0C 00 00 30

The geo layout scripts are:


0x00:
20 00 01 F4
04 00 00 00
15 01 00 00 05 00 16 B8
05 00 00 00
01 00 00 00

0x18:
20 00 01 F4
04 00 00 00
15 01 00 00 05 00 18 00
05 00 00 00
01 00 00 00

0x30:
20 00 01 F4
04 00 00 00
15 01 00 00 05 00 19 00
05 00 00 00
01 00 00 00



This gives you the pointers of the polygon data inside bank 0x05.

The key missing thing here is the behavior script...

This thing looks like some air switch which would work much like the red ground pound switch in Super Mario Galaxy. Or maybe it's a trampoline. The line pattern on the red/yellow question mark texture indicates that this part would be compressed between the two checkerboard platforms when Mario jumps/pound on it.

There are two corresponding unused chunk of collision data in the polygon bank. One is at offset 0x1A28, and the other at offset 0x1AF4.

I've search through the behavior scripts, and found one "unused behavior" that points to collision data at offset 0x1A28:


ROM Addr: 0021B408 Hex Behav: 13001608
>>>>>>>>>>Unused Behavior?
21B408/001608 00 09 00 00
21B40C/00160C 11 01 00 01
21B410/001610 2A 00 00 00 05 00 1A 28
21B418/001618 2D 00 00 00
21B41C/00161C 08 00 00 00
21B420/001620 0C 00 00 00 80 2B 25 AC
21B428/001628 0C 00 00 00 80 38 39 CC
21B430/001630 09 00 00 00



But that may be just a coincidence and it may not be the right behavior script (bank 0x05 can contain other things depending on the level).

Using it with the object does work for creating solidity, but it renders the objects invisible... Maybe that's because the behavior code spawns the model themselves and that I didn't use the right model IDs. Someone could take a look at the two 0x0C routines and find which model ID they're supposed to spawn.

I didn't find any references to the collision map at 0x1AF4 in the behavior scripts, but again, that collision map may be spawned by the behavior ASM code (or maybe it was deemed useless, as it's for the inner question mark ring which is sandwiched between the platform).

One last note, there's a lot of other polygon data left in the "blanked" ROM, which may or may not be unused stuff in the game, but some of it are parts of models that TT64 just doesn't read because of some bugs.
messiaen
Catgirl
Level: 65


Posts: 596/1085
EXP: 2238591
For next: 97037

Since: 11-20-07


Since last post: 4.0 years
Last activity: 3.0 years

Posted on 05-19-09 07:27:05 PM (last edited by messiaen at 05-19-09 07:28 PM) Link
Later on I may look more closely at the code, but one of the thing it does is to spawn two objects:

Behavior 0x1634 with model ID 0xB6
Behavior 0x2A48 (non-solid object) with model ID 0xB7

Behavior 0x1634 is probably the trampoline itself, because it stretches the object along the Y-axis. So, try to assign the red texture with question marks an ID of 0xB6 and the upper part (which is probably redrawn to conform to the new Y position as the trampoline is strechted)a model ID of 0xB7.

To make the trampoline itself show, try NOPing the instruction at 0x6D5B4.
VL-Tone
Member
Super Mario 64 forum moderator
Level: 51


Posts: 481/621
EXP: 983515
For next: 30423

Since: 07-27-07

From: Montreal, Canada

Since last post: 354 days
Last activity: 14 days

Posted on 05-19-09 08:26:51 PM (last edited by VL-Tone at 05-19-09 08:27 PM) Link
Originally posted by messiaen
Later on I may look more closely at the code, but one of the thing it does is to spawn two objects:

Behavior 0x1634 with model ID 0xB6
Behavior 0x2A48 (non-solid object) with model ID 0xB7

Behavior 0x1634 is probably the trampoline itself, because it stretches the object along the Y-axis. So, try to assign the red texture with question marks an ID of 0xB6 and the upper part (which is probably redrawn to conform to the new Y position as the trampoline is strechted)a model ID of 0xB7.

To make the trampoline itself show, try NOPing the instruction at 0x6D5B4.


Ok, I've made one of the platform 0xB5 (a guess), the other as 0xB7 and the question mark thing as 0xB6. I didn't NOP anything.

22 08 00 B5 0C 00 00 00
22 08 00 B6 0C 00 00 18
22 08 00 B7 0C 00 00 30

I've created a 0x24 object that uses the 0xB5 model, with behavior 0x1608.

24 18 01 B5 F1 04 E6 0D 04 AF 00 00 00 00 00 00 00 00 00 00 13 00 16 08

It does work as it spawns the rest of the trampoline at the right position with the correct collision, so it seems that it's indeed the right behavior for this object.



But while Mario can stand on it, jumping or pounding the platform doesn't do anything... Are we missing something or was this intended to be a static platform?
OniLink10
User
Level: 11


Posts: 15/21
EXP: 5601
For next: 384

Since: 05-08-09


Since last post: 9.0 years
Last activity: 8.0 years

Posted on 05-19-09 09:37:44 PM Link
I'd say the Inner part between the two checkerboards looks slightly wooden, so maybe decoration? Or maybe it was intended to be a Trampoline, but then they made it static after realizing it looked too wooden and didn't want to have to go back and redo the Texture? If that were true, it would either be laziness on Nintendo's Part, or they were pressed for time, considering this was a release game.
Xkeeper

Level: 244


Posts: 10871/23358
EXP: 227572605
For next: 2614661

Since: 07-03-07

Pronouns: they/them, she/her, etc.

Since last post: 2 days
Last activity: 1 day

Posted on 05-19-09 09:39:39 PM Link
I would just guess that the behavior wasn't designed beyond "static object", much like Blargg.
messiaen
Catgirl
Level: 65


Posts: 597/1085
EXP: 2238591
For next: 97037

Since: 11-20-07


Since last post: 4.0 years
Last activity: 3.0 years

Posted on 05-19-09 10:12:36 PM (last edited by messiaen at 05-19-09 10:22 PM) Link
The 0x1608 behavior merely assembles the object and controls something I have not understood yet (can't access the game right now, so I'm just looking at the code).

Real fun happens with the 0x1634 behavior, try for instance using Yoshielectron's spawn code and you'll understand how its related to this object. I will try to disassemble its behavior tomorrow:

Here's my first try disassembling the "trampoline" behavior (0x1608) main function:


#include

void Assemble_trampoline()
{

_0x802a04c0(0x00b5); // argument = model ID?

if ( (*Obj)->_0x154 != 0 )
{
struct object *ChildObject = CreateObject( (*Obj), 0x00b6, 0x13001634 );
*ChildObject->y_pos -= 75;

struct object *ChildObject2 = CreateObject( (*Obj), 0x00b7, 0x13002a48 );
*ChildObject2->y_pos -= 150;

}

struct object **Mario_object = (void*)0x80361158;

if ( (*Mario_object)->_0x214 != (*Obj) )
{
(*Obj)->_0x110 += 1;
Goto End;
}

(*Obj)->_0x110 = 0;
(*Obj)->y_pos = (*Obj)->_0x168;

End:
_0x802550B0(); // dummy function?

}


Edit: VL-Tone, try inserting this object:

24 18 1F B6 F1 04 E6 0D 04 AF 00 00 00 00 00 00 00 00 00 00 13 00 16 34

Collision won't happen since its designed to be a child of the main trampoline, but when Mario is very near at least some animation (stretching along the Y-axis) should happen.
VL-Tone
Member
Super Mario 64 forum moderator
Level: 51


Posts: 482/621
EXP: 983515
For next: 30423

Since: 07-27-07

From: Montreal, Canada

Since last post: 354 days
Last activity: 14 days

Posted on 05-19-09 10:23:45 PM (last edited by VL-Tone at 05-19-09 10:33 PM) Link
Originally posted by OniLink10
I'd say the Inner part between the two checkerboards looks slightly wooden, so maybe decoration? Or maybe it was intended to be a Trampoline, but then they made it static after realizing it looked too wooden and didn't want to have to go back and redo the Texture? If that were true, it would either be laziness on Nintendo's Part, or they were pressed for time, considering this was a release game.


Edit: I posted this seconds after messiaen post... I'll take the time to read it and try his suggestion.

Well the pattern reminds me more of an accordion type structure.

Incidentally, there are hexagonal-shaped accordion called concertinas.



I doubt very much that they changed the behavior from a trampoline to static just because they didn't want to have to change the texture, it simply doesn't make sense.

The most valid argument to show that is was intended to be animated is that it's made out of three distinct polygon models that each have their own geo layout script and are spawned and positioned by ASM behavior code.

They could've simply make a single polygon object, or combine them in a single geo layout script. There was no need to get into the trouble of programming ASM code to assemble the three pieces if it they were intended to be static.

It's possible that it can only work in certain circumstances, or maybe I made some mistake somewhere. It may also not react to Mario, but to another trigger, that would make the platform extend and stretch to reach a higher place.
VL-Tone
Member
Super Mario 64 forum moderator
Level: 51


Posts: 483/621
EXP: 983515
For next: 30423

Since: 07-27-07

From: Montreal, Canada

Since last post: 354 days
Last activity: 14 days

Posted on 05-19-09 10:32:42 PM (last edited by VL-Tone at 05-19-09 10:35 PM) Link
Originally posted by messiaen

Edit: VL-Tone, try inserting this object:

24 18 1F B6 F1 04 E6 0D 04 AF 00 00 00 00 00 00 00 00 00 00 13 00 16 34

Collision won't happen since its designed to be a child of the main trampoline, but when Mario is very near at least some animation (stretching along the Y-axis) should happen.


Nothing appears, the question mark ring is invisible, so I can't see what could be happening, and there's no sound either. I tried with or without the full trampoline in the same scene.

Edit: A little note, I chose 0xB5 as a guess for the "root" model, maybe I got lucky?
messiaen
Catgirl
Level: 65


Posts: 598/1085
EXP: 2238591
For next: 97037

Since: 11-20-07


Since last post: 4.0 years
Last activity: 3.0 years

Posted on 05-19-09 10:40:45 PM (last edited by messiaen at 05-19-09 10:44 PM) Link
Originally posted by VL-Tone
Originally posted by messiaen

Edit: VL-Tone, try inserting this object:

24 18 1F B6 F1 04 E6 0D 04 AF 00 00 00 00 00 00 00 00 00 00 13 00 16 34

Collision won't happen since its designed to be a child of the main trampoline, but when Mario is very near at least some animation (stretching along the Y-axis) should happen.


Nothing appears, the question mark ring is invisible, so I can't see what could be happening, and there's no sound either. I tried with or without the full trampoline in the same scene.

Edit: A little note, I chose 0xB5 as a guess for the "root" model, maybe I got lucky?



Hmm, it probably disappears right after the animation. If you use Yoshielectron's spawn code, which creates the object from Mario's position, you'll see the stretch effect, after which the object disappears. I'll try following your steps and including the needed banks/0x22 commands and see what I can do with Nemu's debugger, it will be easier to understand it seeing the code in action.

You probably got lucky about the 0xb5 ID , but then it was the logical choice, either that or 0xb8.
VL-Tone
Member
Super Mario 64 forum moderator
Level: 51


Posts: 484/621
EXP: 983515
For next: 30423

Since: 07-27-07

From: Montreal, Canada

Since last post: 354 days
Last activity: 14 days

Posted on 05-20-09 12:01:52 AM Link
I'm gonna try with the yoshielectron spawn code. Anyway it means that we have proof that it is supposed to be an animated object. Maybe the code is buggy and it's why it was not included in the final game?
RDX

Level: 30


Posts: 78/198
EXP: 164161
For next: 1708

Since: 02-14-09


Since last post: 7.0 years
Last activity: 6.0 years

Posted on 05-20-09 01:35:14 AM Link
Originally posted by VL-Tone
(In other words, I wasn't intending on "wasting" time on doing something else than actually working on TT64...)


...You know we're not going to hurt you, right? Just take your time, you shouldn't feel the need to explain yourself to us

Anyways, nice find D:
Lyskar
12210
-The Chaos within trumps the Chaos without-
Level: 184


Posts: 2622/12211
EXP: 86017787
For next: 101623

Since: 07-03-07

From: 52-2-88-7

Since last post: 3.0 years
Last activity: 3.0 years

Posted on 05-20-09 02:53:37 AM Link
Originally posted by RDX
Originally posted by VL-Tone
(In other words, I wasn't intending on "wasting" time on doing something else than actually working on TT64...)


...You know we're not going to hurt you, right? Just take your time, you shouldn't feel the need to explain yourself to us

Anyways, nice find D:


Yeah. Besides, anyone who would try to hurt you, VL-Tone, has to get through me first. :p
Gecko
Member
Level: 24


Posts: 41/113
EXP: 70356
For next: 7769

Since: 03-27-09


Since last post: 5.0 years
Last activity: 3.0 years

Posted on 05-20-09 08:15:02 AM (last edited by Gecko at 05-20-09 08:18 AM) Link
The first thing the trampoline reminded me of was the Heave Ho, which catapults Mario into the air as soon as he stands on its plate.

messiaen
Catgirl
Level: 65


Posts: 599/1085
EXP: 2238591
For next: 97037

Since: 11-20-07


Since last post: 4.0 years
Last activity: 3.0 years

Posted on 05-20-09 09:59:03 AM (last edited by messiaen at 05-20-09 10:21 AM) Link
More accurate disassembly:


#include "mario64.h"

void Assemble_trampoline()
{

SetModelID(0x00b5); /* Forces object to use model ID 0xb5 */

if ( (*Obj)->_0x154 == 0 ) /* This only runs once */
{
struct object *ChildObject = CreateObject( (*Obj), 0x00b6, 0x13001634 );
*ChildObject->y_pos -= 75;

struct object *ChildObject2 = CreateObject( (*Obj), 0x00b7, 0x13002a48 );
*ChildObject2->y_pos -= 150;
}

struct object **Mario_object = (void*)0x80361158;

if ( (*Mario_object)->_0x214 == (*Obj) ) /* Checks if Mario is on top of the the object */
{
(*Obj)->_0x110 = 1;
Goto End;
}

(*Obj)->_0x110 = 0;
(*Obj)->y_pos = (*Obj)->_0x168; /* If Mario is not on top, return to initial position ?? */

End:
_0x802550B0(); /* This function has been deleted and should make the trampoline itself happen */

}



I'll try recreating the 0x802550b0 deleted function, I think I have a clue how to make it work.

Edit: Very quick proof of concept (sorry for the crappy video).

The 0x1634 object is set to stretch along the Y-axis according to the Y position of its parent (the trampoline platform), however the ratio seems a bit off. With this corrected plus some increment in Mario Y's position to simulate an upward impulse (and maybe setting his action to that of exiting a cannon) a proper effect can probably be obtained.
Hectamatatortron
Member
Level: 33


Posts: 153/232
EXP: 223083
For next: 6096

Since: 09-19-07


Since last post: 3.0 years
Last activity: 1.0 years

Posted on 05-20-09 01:35:51 PM Link
That looks more like an elevator than a trampoline, at the moment.

The texture does suggest trampoline, and Mario games have had trampolines since Super Mario Bros.

Looks like you've got more work to do if you want it to work right. I doubt it was supposed to be an elevator.
Stevoisiak
Member
Level: 36


Posts: 264/283
EXP: 298115
For next: 9995

Since: 11-22-07

From: New York, Long Island

Since last post: 8.0 years
Last activity: 1.0 years

Posted on 05-20-09 04:45:48 PM Link
Looks like something taken straight out of Super Mario RPG...

Probably a beta object they started thinking of, then ditched it later on. Nintendo is known for stuff like that. AKA: Blargg, Bowser bombs underwater, working unused Super Mario RPG Bosses, 5 extra levels in NSMB, ect. It probably doesn't have a true function coded into the game.
luigiman1928
Member
Level: 16


Posts: 20/46
EXP: 18357
For next: 1899

Since: 02-23-09

From: Gscentral

Since last post: 8.0 years
Last activity: 7.0 years

Posted on 05-21-09 09:42:58 AM (last edited by luigiman1928 at 05-21-09 09:44 AM) Link
Originally posted by Gecko
The first thing the trampoline reminded me of was the Heave Ho, which catapults Mario into the air as soon as he stands on its plate.



Most likely they replaced the Spring with the Heave-ho, becuse it can move for that would make it harder if it just stood there.
That, or they just didn't want Mario to go high.
RomanianGirl

Level: 16


Posts: 35/42
EXP: 16891
For next: 3365

Since: 01-31-08

From: Canada

Since last post: 9.0 years
Last activity: 9.0 years

Posted on 05-21-09 09:19:16 PM Link
That's pretty awesome. Looks like Nintendo left a lot of objects for dead in the game.

Is it possible for you to create a .ppf of this ROM, for a chance to look around as well?
VL-Tone
Member
Super Mario 64 forum moderator
Level: 51


Posts: 487/621
EXP: 983515
For next: 30423

Since: 07-27-07

From: Montreal, Canada

Since last post: 354 days
Last activity: 14 days

Posted on 05-22-09 09:33:30 AM Link
Originally posted by messiaen


The 0x1634 object is set to stretch along the Y-axis according to the Y position of its parent (the trampoline platform), however the ratio seems a bit off. With this corrected plus some increment in Mario Y's position to simulate an upward impulse (and maybe setting his action to that of exiting a cannon) a proper effect can probably be obtained.


Maybe you could set it to the action to the one he makes when bouncing of a fly guy? (when he says "boing!" and spins around).

Originally posted by Hectamatatortron
That looks more like an elevator than a trampoline, at the moment.

The texture does suggest trampoline, and Mario games have had trampolines since Super Mario Bros.

Looks like you've got more work to do if you want it to work right. I doubt it was supposed to be an elevator.


Well it could be some kind of elevating platform thing that's triggered by some action (such as activating a cap switch).


Originally posted by RomanianGirl
That's pretty awesome. Looks like Nintendo left a lot of objects for dead in the game.

Is it possible for you to create a .ppf of this ROM, for a chance to look around as well?


It's a good idea, I have to go to work now, but tonight I'll post a .ppf patch for the "blanked" ROM.
messiaen
Catgirl
Level: 65


Posts: 600/1085
EXP: 2238591
For next: 97037

Since: 11-20-07


Since last post: 4.0 years
Last activity: 3.0 years

Posted on 05-22-09 01:59:55 PM Link
Much better :

<object width="425" height="344"><embed src="http://www.youtube.com/v/y_et1mjUieA&hl=pt-br&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>

Now it works like a trampoline.
Pages: 1 2 3 4 5Next newer thread | Next older thread
Jul - SM64 Hacking (Archive) - Beta Stuff Thread: Beta Trampoline and other stuff New poll - New thread - Thread closed




Rusted Logic

Acmlmboard - commit 5d36857 [2018-03-03]
©2000-2018 Acmlm, Xkeeper, Inuyasha, et al.

33 database queries, 9 query cache hits.
Query execution time: 0.178098 seconds
Script execution time: 0.035028 seconds
Total render time: 0.213127 seconds
Memory used: 1310720