Register - Login
Views: 99798572
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
05-03-22 06:09:42 AM
Jul - SM64 Hacking (Archive) - Blinking Eyes New poll - New thread - New reply
Next newer thread | Next older thread
Ratchetfan19
Member
Level: 18


Posts: 16/50
EXP: 25684
For next: 4213

Since: 11-20-07


Since last post: 9.0 years
Last activity: 8.7 years

Posted on 12-29-07 10:28:52 PM Link | Quote
Have any of you guys ever noticed that if you edit an object's behavior with a character model that the character's eyes still blink? For example, you can edit a 0x24 object to where it has Mario's model but no behavior, and his eyes will still blink, and they will blink in sync (oh, a rhyme!) with Mario's eyes! It's apparent the system that handles texture swapping on a model isn't found in that model's corresponding behavior.

Which makes me wonder... if we ever find this system, it might be possble to change the textures that are swapped, such as Mario's M on his hat rather than his eyes. But even if this is possible, textures would have to be replaced in the ROM.
yoshiman
Member
Level: 23


Posts: 10/95
EXP: 67067
For next: 656

Since: 12-21-07

From: London, England

Since last post: 13.2 years
Last activity: 12.9 years

Posted on 12-30-07 09:01:38 PM Link | Quote
Yeah, the blinking eyes are also separate from an object's animation. I can easily change the textures in RAM used for things like eyes, so it shouldn't be too hard to change them in the ROM. How about Mario with Peach's eyes?!

James S.

____________________
Time is the key...
Ratchetfan19
Member
Level: 18


Posts: 17/50
EXP: 25684
For next: 4213

Since: 11-20-07


Since last post: 9.0 years
Last activity: 8.7 years

Posted on 12-30-07 10:55:22 PM Link | Quote
That would be sweet! How about Lakitu's as well? Can you teach me how to do that or develop a Gameshark code?
yoshiman
Member
Level: 23


Posts: 11/95
EXP: 67067
For next: 656

Since: 12-21-07

From: London, England

Since last post: 13.2 years
Last activity: 12.9 years

Posted on 12-31-07 09:14:49 PM (last edited by yoshiman at 01-01-08 06:20 PM) Link | Quote
Ok, I will look into it and perhaps put it on my website or this forum...

I've put the results on my website but it's not good news.

James S.

____________________
Time is the key...
VL-Tone
Member
Super Mario 64 forum moderator
Level: 53


Posts: 168/621
EXP: 1136483
For next: 20636

Since: 07-27-07

From: Montreal, Canada

Since last post: 4.7 years
Last activity: 6 days

Posted on 01-06-08 12:09:40 AM Link | Quote
Time: Now - Date: Today - Weather: What can be seen outside. - Mood: How it feels. Answer to the universe: 42
If you look at Mario's geometry layout data, you'll find this:

001287BC/0E0C:       0E 00 00 00 80 27 71 BC 

001287C4/0E14: 04 00 00 00
001287C8/0E18: 15 05 00 00 04 01 19 A0 -- head 1 hp color
001287D0/0E20: 15 05 00 00 04 01 1A 90 -- head 2 hp color
001287D8/0E28: 15 05 00 00 04 01 1B 80 -- head 3 hp color
001287E0/0E30: 15 05 00 00 04 01 1C 70 -- head 4 hp color
001287E8/0E38: 15 05 00 00 04 01 1D 60 -- head 5 hp color
001287F0/0E40: 15 05 00 00 04 01 1E 50 -- head 6 hp color
001287F8/0E48: 15 05 00 00 04 01 1F 40 -- head 7 hp color
00128800/0E50: 15 05 00 00 04 01 20 30 -- head 8 hp color
00128808/0E58: 05 00 00 00



The 0x0E command has something to do with animation, I guess that 0x802771BC is an address for the head "state". Could you try to modify this address while the game is playing yoshiman?

The different head states (head 1, head 2 etc.) are different eyes for Mario. The first 3 are for the eyes closing, the others are Mario looking sideways, up and down (unused in the game?) and when Mario has Xs in the eyes.

Each 0x15 loads a polygon model, so the game doesn't swap the texture eyes for the animation, it swaps the whole head!

The thing is though, there is really only one high-res head model, the 0x15 commands jump to different "entry points" in the polygon data where a different set of texture is loaded but then it jumps back to create the same model from the same vertices.

Here's the equivalent geometry layout for Peach's head/eyes animation:

00180620/00E0:             0E 00 00 08 80 25 71 98

00180628/00E8: 04 00 00 00
0018062C/00EC: 15 01 00 00 05 00 5C E0 -- head (kissing) 1
00180634/00F4: 15 01 00 00 05 00 5D 38 -- head (kissing) 2
0018063C/00FC: 15 01 00 00 05 00 5D 90 -- head (kissing) 3
00180644/0104: 15 01 00 00 05 00 5D E8 -- head (kissing) 4
0018064C/010C: 15 01 00 00 05 00 5E 40 -- head 1
00180654/0114: 15 01 00 00 05 00 5E 98 -- head 2
0018065C/011C: 15 01 00 00 05 00 5E F0 -- head 3
00180664/0124: 15 01 00 00 05 00 5F 48 -- head 4
0018066C/012C: 05 00 00 00



Note that that in the 0x0E command here, there is the additional "08" parameter just before the RAM address, which corresponds to the number of frames in the animation, I'm not sure why it's set to zero with Mario.

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


Posts: 2074/5390
EXP: 29075454
For next: 259551

Since: 07-22-07

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

Since last post: 342 days
Last activity: 342 days

Posted on 01-06-08 06:25:03 AM (last edited by HyperHacker at 01-06-08 03:28 AM) Link | Quote
Jul - Post #2074 - 01-06-08 01:25:03am
Originally posted by VL-Tone
The 0x0E command has something to do with animation, I guess that 0x802771BC is an address for the head "state". Could you try to modify this address while the game is playing yoshiman?
I just tried that myself and the only thing I noticed was the game crashes at bootup and during the new game opening sequence if you have it locked to zero. Other than that, nothing happened with the various values I tried.

Tried it in 2 different emulators, both 802771BC and 802771BF, locked to zero and to 8 with no noticeable effect.

____________________
yoshiman
Member
Level: 23


Posts: 15/95
EXP: 67067
For next: 656

Since: 12-21-07

From: London, England

Since last post: 13.2 years
Last activity: 12.9 years

Posted on 01-06-08 10:23:19 PM Link | Quote
That's strange what you said about Mario's head; the texture commands for Mario's eyes (open, half shut, closed, etc) are always in memory or are they just for the main Mario model? You only need to change those texture commands, as I did, to give Mario Peach's eyes. But the problem is, other than Peach having one more blink texture than Mario, is Mario only has one Peach eye.

James S.

____________________
We English do things a little differently...Anyone for a cup of tea while we hack?!
VL-Tone
Member
Super Mario 64 forum moderator
Level: 53


Posts: 170/621
EXP: 1136483
For next: 20636

Since: 07-27-07

From: Montreal, Canada

Since last post: 4.7 years
Last activity: 6 days

Posted on 01-07-08 01:56:43 AM Link | Quote
Time: Now - Date: Today - Weather: What can be seen outside. - Mood: How it feels. Answer to the universe: 42
Originally posted by HyperHacker
Originally posted by VL-Tone
The 0x0E command has something to do with animation, I guess that 0x802771BC is an address for the head "state". Could you try to modify this address while the game is playing yoshiman?
I just tried that myself and the only thing I noticed was the game crashes at bootup and during the new game opening sequence if you have it locked to zero. Other than that, nothing happened with the various values I tried.

Tried it in 2 different emulators, both 802771BC and 802771BF, locked to zero and to 8 with no noticeable effect.


The 08 I'm talking about is found just before the RAM address in the 0x0E command.


00180620/00E0:             0E 00 00 [b]08[/b] 80 25 71 98



And this value is set to zero in Mario's head animation command:


001287BC/0E0C:       0E 00 00 [b]00[/b] 80 27 71 BC 



But it doesn't matter much anyway. The data at 0x802771BC in RAM is ASM code, and not a live variable like I expected.

Originally posted by yoshiman
That's strange what you said about Mario's head; the texture commands for Mario's eyes (open, half shut, closed, etc) are always in memory or are they just for the main Mario model? You only need to change those texture commands, as I did, to give Mario Peach's eyes. But the problem is, other than Peach having one more blink texture than Mario, is Mario only has one Peach eye.


Ok here how it works, in a simplified way:



Mario's Head Model Polygon data (simplified, not real addresses).


0x0000 Texture Bitmap for open eyes
0x0500 Texture Bitmap for closed eyes
0x1000 Vertices
0x2000 Draw triangles from vertices at 0x0000
0x3000 Texture command for open eyes (loads bitmap from 0x0000)
0x3004 Jump Command to 0x2000
0x3008 Texture command for closed eyes (loads bitmap from 0x0500)
0x300C Jump Command to 0x2000



The 0x13 and 0x15 commands are found in the Geometry Layout data (not to be confused with the polygon data). These commands refer to a polygon data address.

In this fake example, the command 15 05 00 00 04 00 30 00 would display Mario's head with eyes open. At 0x3000, the texture is set for the open eyes, and then a command makes the code jump back to 0x2000 where the triangles are drawn, using the current texture settings. To display a head with closed eyes, the command 15 05 00 00 04 00 30 08 would be used. Note how after the closed eye texture is set, the code will also jump back to 0x2000 where it will draw the same triangles, but with a different texture.

The polygon data for all head states is available in RAM, that's why the swapping is instantaneous, and that's why you can change the texture commands and still obtain some results.

So there's no texture pointer that changes in RAM when the blinking occurs, it's the pointer for the whole head that changes.

Back to the real data now. You could change Mario's head into Peach's head for only one frame of the animation, and you'd see Mario's head momentarily change into Peach's when he's blinking for example. Note that Mario is a complicated model, and unless you used the High-Poly Patch from TT64, you'll have to change the head value at multiple places to cover all variations (low, medium and high poly etc.).



____________________
yoshiman
Member
Level: 23


Posts: 19/95
EXP: 67067
For next: 656

Since: 12-21-07

From: London, England

Since last post: 13.2 years
Last activity: 12.9 years

Posted on 01-07-08 11:17:05 PM Link | Quote
The time I notice the low-poly Mario the most is when on the mountain summit in Bob-omb Battlefield and the camera is zoomed out. Another place is when fighting Bowser you can see the low-poly Mario. As the camera zooms in the high-poly Mario 'pops' into view which should never happen had they kept with just the better model.

This really complicates making changes to Mario but I think it's the best way as then the edited graphics will be available in all levels.

James S.

____________________
We English do things a little differently...Anyone for a cup of tea while we hack?!
VL-Tone
Member
Super Mario 64 forum moderator
Level: 53


Posts: 173/621
EXP: 1136483
For next: 20636

Since: 07-27-07

From: Montreal, Canada

Since last post: 4.7 years
Last activity: 6 days

Posted on 01-08-08 02:26:43 AM Link | Quote
Time: Now - Date: Today - Weather: What can be seen outside. - Mood: How it feels. Answer to the universe: 42
Originally posted by yoshiman
The time I notice the low-poly Mario the most is when on the mountain summit in Bob-omb Battlefield and the camera is zoomed out. Another place is when fighting Bowser you can see the low-poly Mario. As the camera zooms in the high-poly Mario 'pops' into view which should never happen had they kept with just the better model.

This really complicates making changes to Mario but I think it's the best way as then the edited graphics will be available in all levels.

James S.


Another way to see the low-poly Mario is to make Mario bigger using a code or a hack, it's easier to notice that way. There are several levels of details available, not just one low and one high poly Mario.

I don't see any disadvantage of eliminating the medium and low-poly Marios, the game doesn't seem to slow down at all when the low detail models are disabled. Anyway if we hack the geometry layout data to change Mario, we might as well do the high-poly Mario trick anyway, since it involves changing two bytes in the geometry layout commands.

Look at this doc to see which two bytes I'm talking about: http://homepage.mac.com/qubedstudios/MarioGeoLayout.txt


>>>>>>>>>>>>>>>>>> Mario

0012A784/2DD4: 16 00 00 63 00 B4 00 64 --Mario Shadow (shape/intensity/size)
0012A78C/2DDC: 04 00 00 00
0012A790/2DE0: 1D 00 00 00 00 00 40 00 --Mario global size.
0012A798/2DE8: 04 00 00 00
0012A79C/2DEC: 18 00 00 00 80 27 7D 6C
0012A7A4/2DF4: 18 00 00 00 80 27 70 A4
0012A7AC/2DFC: 0E 00 00 00 80 27 71 50
0012A7B4/2E04: 04 00 00 00
0012A7B8/2E08: 02 01 00 00 17 00 2C E0 --Jumps to High-Poly Mario
--Jump to: 0012A690/2CE0
0012A7C0/2E10: 02 01 00 00 17 00 2D 7C --Jumps to Low poly Mario >>Change the last two bytes from 2D7C to 2E18 to disable low-poly Mario.
--Jump to: 0012A72C/2D7C
0012A7C8/2E18: 05 00 00 00
0012A7CC/2E1C: 18 00 00 01 80 27 7D 6C
0012A7D4/2E24: 05 00 00 00
0012A7D8/2E28: 05 00 00 00
0012A7DC/2E2C: 01 00 00 00
******************************************************



If you want to do the patch in RAM, just search for 17 00 2D 7C, and change it for 17 00 2E 18

____________________
yoshiman
Member
Level: 23


Posts: 24/95
EXP: 67067
For next: 656

Since: 12-21-07

From: London, England

Since last post: 13.2 years
Last activity: 12.9 years

Posted on 01-09-08 09:43:04 PM (last edited by yoshiman at 01-10-08 10:19 PM) Link | Quote
I couldn't do the force high poly Mario trick; I searched for 17002D7C in the RAM as you said and changed it to 17002E18 but I could still see low poly Mario change to high poly Mario. Could it be that there are differences in the PAL version?

If it helps here is a sample of the Mario data in the RAM (before editing) for the PAL version:

800DCC70 1800000080268AE4
800DCC78 1200000000000000
800DCC80 040000000E000000
800DCC88 80268D5804000000
800DCC90 0E000000802689A4

800DF798 0201000017002CE0
800DF7A0 0201000017002D7C
800DF7A8 0500000018000001
800DF7B0 802691DC05000000
800DF7B8 0500000001000000

I checked that the value stayed changed.

James S.

____________________
We English do things a little differently...Anyone for a cup of tea while we hack?!
Next newer thread | Next older thread
Jul - SM64 Hacking (Archive) - Blinking Eyes New poll - New thread - New reply


Rusted Logic

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

30 database queries, 7 query cache hits.
Query execution time: 0.096544 seconds
Script execution time: 0.027015 seconds
Total render time: 0.123559 seconds