Register - Login
Views: 99381029
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
04-23-22 11:46:12 PM
Jul - NO! GO TO STAR! - How the animations really work New poll - New thread - Thread closed
Next newer thread | Next older thread
Twili
Random nobody
Level: 5


Posts: 1/4
EXP: 503
For next: 26

Since: 06-24-11


Since last post: 10.7 years
Last activity: 10.7 years

Posted on 06-24-11 03:43:01 AM (last edited by Twili at 06-24-11 12:48 AM) Link
Merge this topic with the hacking animations one if you want. I just thought that it would be a lot tidier to have the information "upfront". That is, in the topic post.

We will be using a gs code of yoshiman's, as well as creating one for this. His code being:

Replace signpost with Blarrg in Lethal Lava Land Star 1 (JS)

NTSC

8133E9FC 8018
8133E9FE A15C
8133EA24 8014
8133EA26 9A10
8133EA14 4000
8133EA18 4000
8133EA1C 4000
8133EA88 C5A8
8133EA8C 421A
8133EA90 45B0
8033EB19 0020
8133EBE0 4406
8033EB6B 0002

Were you to startup the game and turn this code on before entering Lethal Lava Land, you would be greeted with Blarrg bobbing up and down. Let's go to the RAM offset of the animation itself. You will need to use an emulator like Nemu64 to view the memory.

I know from verification via the SM64 Exposed Animation Values page that lines 3 and 4 contain the RAM offset of the animation header, 80149A10:

00 00 00 00 00 00 00 00 [00 2D] [00 05] [05] [00 5E B8] [05] [00 60 28]

002D is the frame count (45 in decimal).
0005 is the number of limbs/joints/bones/nodes/etc. in the geo layout/object hierarchy for Blarrg.

The lone 05 bytes in brackets are the RAM bank this is in, 05.
005EB8 is the offset to the rotation and translation values.
006028 is the offset to the rotation and translation index.

The start of RAM bank 05 when in Lethal Lava Land is 801439A0, so to reach the rotation/translation values, we would do 801439A0 + 005EB8 to get 80149858. There, you will see:

[00 00] [00 16] [FF FC] [FF B9] [FF 61] [FF 08] [FE C0] [FE 9F]

These are the rotation/translation values for Blarrg's animation. Rotations are unsigned shorts (16-bit). 4000 is 90 degrees, 8000 is 180 degrees, C000 is 270 degrees, 0000 is 360/0 degrees, etc.

Translation values are SIGNED shorts.

0000 - 7FFF = 0 to 32,767.
8000 - FFFF = -32,768 to -1.

So how do we differentiate between rotations and translations? That's what the rotation/translation index is for! It's at 801499C8 (801439A0 + 006028):

[00 01] [00 00]
[00 2D] [00 01]
[00 01] [00 00]

[00 01] [00 00]
[00 01] [00 2E]
[00 01] [00 00]

[00 01] [00 00]
[00 01] [00 00]
[00 2D] [00 8A]

[00 01] [00 00]
[00 01] [00 00]
[00 2D] [00 5D]

[00 01] [00 00]
[00 01] [00 00]
[00 01] [00 5C]

[00 01] [00 00]
[00 01] [00 00]
[00 2D] [00 2F]

Each group of twelve bytes represents a complete rotation/translation, X, Y, and Z. The top row is X, middle is Y, and bottom is Z. The first twelve bytes here are for Blarrg's translation. The rest are for rotation of its limbs. The part in brackets on the left is the key. If the key is equal to the number of frames the animation has (002D!), the rotation/translation is dynamic (changing each frame). If it is equal to 0001, it's static.

The part in brackets on the right is the indexed location inside of the rotation/translation values. For dynamic rotation/translation, the index points to the rotation/translation value for the first frame. The next two bytes in from the indexed location are for the second frame, etc. For static, the same value is used for every frame.

To prove this information accurate, I have created a new code to use in conjunction with the one that loads Blarrg in Lethal Lava Land:

811499CC 0001
811499CE 0015
811499DA 0000
811499E8 0001
811499EA 0000
811499F4 0001
811499F6 0000
81149A02 0000
81149A0C 0001
81149A0E 0000

This manipulates the rotation/translation index to give Blarrg the highest Y translation (indexed location 0015) the animation has to offer (because it bobs up and down), and locks it from changing each frame. The first two code lines do that. The rest lock the limb rotations and point to indexed location 0000 (which seems to always contain a rotation of zero, a Nintendo standard).

Using both codes together, you will be greeted with this:



Blarrg in default rotation. From reading his geo layout and nulling the Display List pointers one at a time, I have reached the following consensus:

Limb 1 is the base/root for the entire model.
Limb 2 is Blarrg's body.
Limb 3 is Blarrg's head.
Limb 4 governs Blarrg's jaw.
Limb 5 is Blarrg's jaw.

The second grouping of twelve bytes in the rotation/translation index is for the model root, because I said the first was for Blarrg's translation. Third is for Blarrg's body, you get the idea. Change line 3 of my code from 0000 to 002E, and upon reloading, you will notice that Blarrg has rotated to be perpendicular to the island in the lava:



This code line modifies the indexed location for the model root's Y rotation.

Now change code line 5 from 0000 to 008A, and THIS will happen:



Just a bit more recognizable, eh? This code line modifies the indexed location for Blarrg's body's Z rotation.

Change code line 7 from 0000 to 005D:



Blarrg's head is lowered slightly. This code line modifies the indexed location for Blarrg's head's Z rotation.

Change code line 8 from 0000 to 005C:



This change is perhaps the most subtle of them all. It rotates Blarrg's jaw out of the head and into the body. This code line modifies the indexed location for the limb that governs Blarrg's jaw's Z rotation.

One final change. Code line 10. Change from 0000 to 0048:



Blarrg's jaw is now rotated correctly to show an open mouth! This code line modifies the indexed location for Blarrg's jaw's direct Z rotation.

This concludes Animation 101. HEH HEH HOORF! Did you learn anything?
Lyskar
12210
-The Chaos within trumps the Chaos without-
Level: 192


Posts: 9381/12211
EXP: 99235812
For next: 637759

Since: 07-03-07

From: 52-2-88-7

Since last post: 7.4 years
Last activity: 7.3 years

Posted on 06-24-11 04:21:16 AM Link
Stats
Time/Date
06-23-11 10:21:16 PM
Posts
9381
Days Here
1451
Level
142
Metal_Man88's Post
Nah, this can stay as its own topic. It's far too much content to just bury down under the junk that wound up in that other thread.

It looks pretty cool to me. Keep up the good work.

____________________

Eisnaught - SSQ² - Mobius Roleplay - SSS
Twili
Random nobody
Level: 5


Posts: 2/4
EXP: 503
For next: 26

Since: 06-24-11


Since last post: 10.7 years
Last activity: 10.7 years

Posted on 06-27-11 09:46:59 AM Link
I am Beta Mario, Hinokuri, Il Piantissimo, and Zant.
Lyskar
12210
-The Chaos within trumps the Chaos without-
Level: 192


Posts: 9414/12211
EXP: 99235812
For next: 637759

Since: 07-03-07

From: 52-2-88-7

Since last post: 7.4 years
Last activity: 7.3 years

Posted on 06-27-11 06:45:03 PM Link
Stats
Time/Date
06-27-11 12:45:03 PM
Posts
9414
Days Here
1455
Level
142
Metal_Man88's Post
And? You were only banned when you were acting like an idiot.

____________________

Eisnaught - SSQ² - Mobius Roleplay - SSS
Twili
Random nobody
Level: 5


Posts: 3/4
EXP: 503
For next: 26

Since: 06-24-11


Since last post: 10.7 years
Last activity: 10.7 years

Posted on 06-28-11 04:33:15 AM Link
Originally posted by Metal_Man88
And? You were only banned when you were acting like an idiot.

An idiot who figured out the animation format.

"It has never crossed my mind that this guy could actually be somebody great, and he was just in a bad mood or the like. I think I'll ban him anyway."

I respect the rules, but I am entitled to my opinion, and to voice it. Like you said, it's not about pleasing you. Also, I did make one account before those other four which still stands to this day, and I made it in 2009 I believe, Twilight. I lost the password for it, so I just made the Beta Mario account because I don't like waiting for an administrator to send me my own password instead of sending a reminder myself.

More to come for the animations, by the way. Something like...

http://www.youtube.com/watch?v=WOWcuBA08Vk

^A viewer/creator/editor for Mario's animations. WIP.
Lyskar
12210
-The Chaos within trumps the Chaos without-
Level: 192


Posts: 9447/12211
EXP: 99235812
For next: 637759

Since: 07-03-07

From: 52-2-88-7

Since last post: 7.4 years
Last activity: 7.3 years

Posted on 06-28-11 05:02:34 AM (last edited by Metal_Man88 at 06-28-11 03:15 AM) Link
Stats
Time/Date
06-27-11 11:02:34 PM
Posts
9447
Days Here
1455
Level
143
Metal_Man88's Post
Well, if you're here to troll me, I'll just send you on your way and keep your data here.

Internet: SERIOUS BUSINESS.

Edit: Apparently he has had second thoughts after realizing that no, I do not have to put up with people attacking me for doing my job. However, he has forfeited his rights to his own topic with this nonsense, so this topic will remain closed, and as a reminder of why I will not mind if a non-Mega Mario person returns post-ban and has something valid to contribute, but will just as quickly revoke that if it turns into yet another verbal shoving match.

____________________
Eisnaught - SSQ² - Mobius Roleplay - SSS
Next newer thread | Next older thread
Jul - NO! GO TO STAR! - How the animations really work New poll - New thread - Thread closed


Rusted Logic

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

28 database queries, 2 query cache hits.
Query execution time:  0.102013 seconds
Script execution time:  0.035807 seconds
Total render time:  0.137820 seconds


TidyHTML vomit below
line 1 column 1 - Warning: missing <!DOCTYPE> declaration
line 2 column 202 - Warning: unescaped & or unknown entity "&page"
line 119 column 11 - Warning: <form> isn't allowed in <table> elements
line 118 column 10 - Info: <table> previously mentioned
line 120 column 11 - Warning: missing <tr>
line 120 column 119 - Warning: missing </font> before </td>
line 124 column 16 - Warning: plain text isn't allowed in <tr> elements
line 120 column 11 - Info: <tr> previously mentioned
line 125 column 68 - Warning: missing </nobr> before </td>
line 141 column 68 - Warning: missing </nobr> before <tr>
line 147 column 35 - Warning: missing <tr>
line 147 column 50 - Warning: missing </font> before </td>
line 148 column 37 - Warning: unescaped & or unknown entity "&id"
line 147 column 194 - Warning: missing </font> before </table>
line 149 column 35 - Warning: missing <tr>
line 149 column 50 - Warning: missing </font> before </td>
line 149 column 91 - Warning: missing </font> before </table>
line 156 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 158 column 9 - Warning: missing <tr>
line 176 column 13 - Warning: missing <tr>
line 315 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 317 column 9 - Warning: missing <tr>
line 335 column 13 - Warning: missing <tr>
line 338 column 74 - Warning: <style> isn't allowed in <td> elements
line 338 column 9 - Info: <td> previously mentioned
line 338 column 1365 - Error: <z> is not recognized!
line 338 column 1365 - Warning: discarding unexpected <z>
line 338 column 1377 - Warning: discarding unexpected </z>
line 340 column 1409 - Error: <z> is not recognized!
line 340 column 1409 - Warning: discarding unexpected <z>
line 340 column 1417 - Warning: discarding unexpected </z>
line 342 column 1433 - Error: <z> is not recognized!
line 342 column 1433 - Warning: discarding unexpected <z>
line 342 column 1445 - Warning: discarding unexpected </z>
line 344 column 1461 - Error: <z> is not recognized!
line 344 column 1461 - Warning: discarding unexpected <z>
line 344 column 1469 - Warning: discarding unexpected </z>
line 349 column 2456 - Warning: discarding unexpected </td>
line 352 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 354 column 9 - Warning: missing <tr>
line 372 column 13 - Warning: missing <tr>
line 378 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 380 column 9 - Warning: missing <tr>
line 398 column 13 - Warning: missing <tr>
line 401 column 74 - Warning: <style> isn't allowed in <td> elements
line 401 column 9 - Info: <td> previously mentioned
line 401 column 1365 - Error: <z> is not recognized!
line 401 column 1365 - Warning: discarding unexpected <z>
line 401 column 1377 - Warning: discarding unexpected </z>
line 403 column 1409 - Error: <z> is not recognized!
Tidy found 213 warnings and 12 errors! Not all warnings/errors were shown.

The alt attribute should be used to give a short description
of an image; longer descriptions should be given with the
longdesc attribute which takes a URL linked to the description.
These measures are needed for people using non-graphical browsers.

For further advice on how to make your pages accessible
see http://www.w3.org/WAI/GL.
You are recommended to use CSS to specify the font and
properties such as its size and color. This will reduce
the size of HTML files and make them easier to maintain
compared with using <FONT> elements.

You are recommended to use CSS to control line wrapping.
Use "white-space: nowrap" to inhibit wrapping in place
of inserting <NOBR>...</NOBR> into the markup.

About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Official mailing list: https://lists.w3.org/Archives/Public/public-htacg/
Latest HTML specification: http://dev.w3.org/html5/spec-author-view/
Validate your HTML documents: http://validator.w3.org/nu/
Lobby your company to join the W3C: http://www.w3.org/Consortium

Do you speak a language other than English, or a different variant of
English? Consider helping us to localize HTML Tidy. For details please see
https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md