Warning: You are using TidyHTML mode! Pages MAY and probably WILL break. To disable, click here or append 'xxx-off=1' to the URL!

Register - Login
Views: 57890760
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - JCS - Stats - Latest Posts - Color Chart - Smilies
10-16-14 06:02:05 PM
fortyfive-antelope

Jul - ROM Hacking - Final Destination 64 New poll - New thread - New reply
Next newer thread | Next older thread
GuyPerfect
Catgirl
Pics or it didn't happen.
Level: 60


Posts: 1016/1020
EXP: 1674412
For next: 98366

Since: 07-23-07


Since last post: 1 day
Last activity: 1 min.

Posted on 10-13-14 08:16:23 AM (last edited by GuyPerfect at 10-13-14 01:45:19 PM) Link | Quote
Ha! And they said it couldn't be done in Vs. mode with simple GameShark codes.



The usual level switch code for the North American release of the game is as follows:

800A4D09 00XX

Where XX is:
  • 00 = Peach's Castle
  • 01 = Sector Z
  • 02 = Kongo Jungle
  • 03 = Planet Zebes
  • 04 = Hyrule Castle
  • 05 = Yoshi's Island
  • 06 = Dream Land
  • 07 = Saffron City
  • 08 = Mushroom Kingdom
  • 0D = "Metal Cavern"
  • 0E = "Battlefield"
  • 10 = "Final Destination"
The problem is, trying to load level 0x10 in Vs. mode crashes the game. This has been the bane of the Smash community for eons now, and people have jumped through some serious hoops to get around this problem. Up until now, the best solution known was to hijack the 1P Master Hand encounter to inject additional players and remove the boss character. It's not elegant, and the match doesn't necessarily end when it's supposed to, but it works, and for many people, that's A-OK.

The short version of the story is that the value at 0x800A4D09 is read a number of times while loading the level, and one particular read is executed at address 0x80104C14. For whatever reason, if a 0x10 is read prior to the ensuing function call in Vs. mode, the game crashes. It likely has something to do with the Master Hand scenario's behavior, likely due to the graphics being tied to the boss's damage meter. In the event some bland, featureless level's index is loaded at this point instead (such as 0x0E, Battlefield's index), the level loads just fine in Vs. mode, but without the sparkly stars or changing background.

Fortunately, N64 games tend to load code into RAM and execute from there, so it's ripe for the GameShark picking. If 0x10 is in the level index variable, the instruction at 0x80104C14 can be replaced wholesale by something else that won't break. So instead of doing what it does--loads the value from RAM--how's about it just always loads 0x0E in the event the actual level index is 0x10? The CPU instruction can be overwritten by the GameShark, and the game program will reload it from ROM before the next match, so it won't break doing it this way.

There's also the matter of the music. By default, the level uses the "Master Hand is approaching" tune, which isn't the one you'd want to battle to. The tune has an index of 0x18, and the formal Master Hand battle music is 0x19. So, easily enough, a GameShark code can detect one and replace it with the other.

So for the main attraction... The following code is a fix-only code that enables Final Destination to be used through the usual stage switch code. It does not, in of itself, cause Final Destination to be loaded in Vs. mode:

D0099113 0018
80099113 0019
D00A4D09 0010
81104C14 2002
D00A4D09 0010
81104C16 000E

I've tested this in Project64, as seen above, and the technique was discovered using Nemu's wonderful debugger. This was mere minutes before leaving for work this morning, so I haven't tested it on the hardware yet, but that's why God invented lunch breaks.



EDIT:

Whooee, it works just swimmingly on the hardware. When I get home for the night I'll upload a video for the world to squee over.
GuyPerfect
Catgirl
Pics or it didn't happen.
Level: 60


Posts: 1017/1020
EXP: 1674412
For next: 98366

Since: 07-23-07


Since last post: 1 day
Last activity: 1 min.

Posted on 10-13-14 07:04:34 PM Link | Quote
Sooooo, Jul won't let me use YouTube's <iframe> style embed feature, and I don't have Flash installed, sooo... I have no idea of the rectangle below actually contains a video:



If it does, enjoy the dumb little video! If not, here's a link to the corresponding page on YouTube: http://youtu.be/zgMTsdLqGH4
Xenesis
Amazing and Hatted
Level: 83


Posts: 2203/2204
EXP: 5314013
For next: 118208

Since: 07-28-07
From: The Land of Kangaroos and Drop Bears

Since last post: 1 day
Last activity: 19 hours

Posted on 10-13-14 11:46:17 PM Link | Quote
Heh, I think those spawn points need work in 4P mode. Still, nicely done. Now all it needs is a proper level select screen hack to display those extra stages

(Also you need to use the 'old embed code' to get Youtube videos to show up normally in jul posts, but whatever you did worked fine.)
GuyPerfect
Catgirl
Pics or it didn't happen.
Level: 60


Posts: 1018/1020
EXP: 1674412
For next: 98366

Since: 07-23-07


Since last post: 1 day
Last activity: 1 min.

Posted on 10-14-14 04:15:16 PM Link | Quote
Originally posted by Xenesis
Heh, I think those spawn points need work in 4P mode.

I thought about doing something with those, but decided it was in the "level mods" category and therefore out of the scope of a fixer patch code. The stage wouldn't hurt to have some item spawn points as well. But hey, I'm not highly motivated to get on that!

Originally posted by Xenesis
Now all it needs is a proper level select screen hack to display those extra stages

I'm not thinking this one will happen via GameShark, unfortunately.

Originally posted by Xenesis
(Also you need to use the 'old embed code' to get Youtube videos to show up normally in jul posts, but whatever you did worked fine.)

I did use the Old Embed Code. But I don't have Flash installed, so all I see is a grey rectangle telling me I need a plugin to view the content.

Now if Jul would just allow <iframe>s or implement a YouTube tag of its own, we'd be in business!
GuyPerfect
Catgirl
Pics or it didn't happen.
Level: 60


Posts: 1019/1020
EXP: 1674412
For next: 98366

Since: 07-23-07


Since last post: 1 day
Last activity: 1 min.

Posted on 10-14-14 09:17:27 PM (last edited by GuyPerfect at 10-14-14 09:30:22 PM) Link | Quote
So on a whim, I decided to look into those spawn points. Since players 3 and 4 are right on top of players 1 and 2, I hypothesized that the level only had 2 spawn points and somehow it was reusing them for additional players, but that doesn't appear to be the case.

Looking into it, I dug too deep and consequently can't make a GameShark code using what I've found.

In the North American ROM file, at address 0x4127FE, there's the following bytes: 62 17 E1 F2. This is a bit-packed value, with two bytes of a 16-bit, signed integer stored at bits 11-18 (high byte) and 2-9 (low byte) (bit 0 is the lowest bit, and bits are indexed in decimal). For this particular value, those bytes come out to 0xFC7C, which is two's complement for -900. This value is then converted to a float and used as Player 1's starting X coordinate on Final Destination.

Changing those bytes to 62 10 01 F2 sets P1's starting X coordinate to 0.0, which while technically is in the dead center of the platform, actually refers to the left edge of the character's origin. Still, it does what you'd expect it to do.

For those itching to look into it a little more, the applicable ROM bytes are loaded to RAM at address 0x800437CC and, after parsing out the bits, the integer bytes are stored at 0x8021B930 (EDIT: This is on the stack, so it might move around. I did a timed battle with default settings, P1 Link and P2 Mario, level 3). The reason I can't hijack this with a GameShark is because it happens too abruptly, and on the stack, that the GameShark doesn't have time to replace the data before it's already gone and replaced with something else. And N64 GameShark doesn't have the ability to load effective addresses from RAM like later Action Replay devices can, so it can't trace the stack.

Anyhoo, changing P1's starting X to zero and loading up Final Destination with 4 players shows that P3 still starts in the same spot it does normally. What this tells me is that there are four spawn points, and it's just a matter of finding a way to move them using a GameShark to make the level a little more presentable.
GuyPerfect
Catgirl
Pics or it didn't happen.
Level: 60


Posts: 1020/1020
EXP: 1674412
For next: 98366

Since: 07-23-07


Since last post: 1 day
Last activity: 1 min.

Posted on 10-14-14 10:23:29 PM Link | Quote
Player 3's X is initialized to -600 and Player 4's to 600. As P1 is -900 and P2 is 900, this is rather close, and not spaced very evenly. What we're looking for is a 600-unit difference between steps, meaning P3 should be -300 and P4 should be 300. The following ROM patches to the North American file will fix the Final Destination spawn points:
  • 0x412808 - P3 - Change 50 13 F5 51 to 50 13 F9 A9
  • 0x41280C - P4 - Change 2B 10 04 58 to 2B 10 02 2C
Hrm... Now that I type it out like that, I see that the two values are right next to each other in ROM. I betcha that's in the region with Final Destination's level data, but you'll have to accept a rain check if I'm wrong.

Either way, spacing them out at ± 300 makes all 4 players 600 units apart, which is even spacing. It's certainly better, but methinks it's a smidge too close for comfort at the start of a match:

Next newer thread | Next older thread
Jul - ROM Hacking - Final Destination 64 New poll - New thread - New reply






Rusted Logic

Acmlmboard - 07/23/2013 b378.03
©2000-2013 Acmlm, Xkeeper, Inuyasha, et al.
bargaining-tycoon

26 database queries, 4 query cache hits.
Query execution time:  0.099455 seconds
Script execution time:  0.040122 seconds
Total render time:  0.139577 seconds


TidyHTML vomit below
line 1 column 1 - Warning: missing <!DOCTYPE> declaration
line 94 column 11 - Warning: <form> isn't allowed in <table> elements
line 93 column 10 - Info: <table> previously mentioned
line 95 column 11 - Warning: missing <tr>
line 95 column 124 - Warning: missing </font> before </td>
line 99 column 16 - Warning: plain text isn't allowed in <tr> elements
line 95 column 11 - Info: <tr> previously mentioned
line 100 column 68 - Warning: <nobr> is not approved by W3C
line 100 column 68 - Warning: missing </nobr> before </td>
line 117 column 68 - Warning: <nobr> is not approved by W3C
line 117 column 68 - Warning: missing </nobr> before <tr>
line 141 column 35 - Warning: missing <tr>
line 141 column 50 - Warning: missing </font> before </td>
line 142 column 37 - Warning: unescaped & or unknown entity "&id"
line 141 column 180 - Warning: missing </font> before </table>
line 143 column 35 - Warning: missing <tr>
line 143 column 50 - Warning: missing </font> before </td>
line 143 column 91 - Warning: missing </font> before </table>
line 150 column 9 - Warning: <div> isn't allowed in <tr> elements
line 149 column 9 - Info: <tr> previously mentioned
line 152 column 9 - Warning: missing <tr>
line 166 column 13 - Warning: missing <tr>
line 167 column 27 - Warning: <nobr> is not approved by W3C
line 167 column 102 - Warning: unescaped & or unknown entity "&postid"
line 200 column 15 - Warning: missing <td>
line 201 column 9 - Warning: <div> isn't allowed in <tr> elements
line 200 column 15 - Info: <tr> previously mentioned
line 203 column 9 - Warning: missing <tr>
line 217 column 13 - Warning: missing <tr>
line 218 column 27 - Warning: <nobr> is not approved by W3C
line 218 column 102 - Warning: unescaped & or unknown entity "&postid"
line 222 column 422 - Warning: discarding unexpected </param>
line 222 column 473 - Warning: discarding unexpected </param>
line 222 column 528 - Warning: discarding unexpected </param>
line 222 column 536 - Warning: <embed> is not approved by W3C
line 222 column 735 - Warning: discarding unexpected </embed>
line 226 column 15 - Warning: missing <td>
line 227 column 9 - Warning: <div> isn't allowed in <tr> elements
line 226 column 15 - Info: <tr> previously mentioned
line 229 column 9 - Warning: missing <tr>
line 243 column 13 - Warning: missing <tr>
line 244 column 27 - Warning: <nobr> is not approved by W3C
line 244 column 102 - Warning: unescaped & or unknown entity "&postid"
line 250 column 15 - Warning: missing <td>
line 251 column 9 - Warning: <div> isn't allowed in <tr> elements
line 250 column 15 - Info: <tr> previously mentioned
line 253 column 9 - Warning: missing <tr>
line 267 column 13 - Warning: missing <tr>
line 268 column 27 - Warning: <nobr> is not approved by W3C
line 268 column 102 - Warning: unescaped & or unknown entity "&postid"
line 281 column 15 - Warning: missing <td>
line 282 column 9 - Warning: <div> isn't allowed in <tr> elements
line 281 column 15 - Info: <tr> previously mentioned
line 284 column 9 - Warning: missing <tr>
line 298 column 13 - Warning: missing <tr>
line 299 column 27 - Warning: <nobr> is not approved by W3C
line 299 column 102 - Warning: unescaped & or unknown entity "&postid"
line 313 column 15 - Warning: missing <td>
line 314 column 9 - Warning: <div> isn't allowed in <tr> elements
line 313 column 15 - Info: <tr> previously mentioned
line 316 column 9 - Warning: missing <tr>
line 330 column 13 - Warning: missing <tr>
line 331 column 27 - Warning: <nobr> is not approved by W3C
line 331 column 102 - Warning: unescaped & or unknown entity "&postid"
line 341 column 17 - Warning: discarding unexpected <table>
line 344 column 35 - Warning: missing <tr>
line 344 column 50 - Warning: missing </font> before </td>
line 344 column 91 - Warning: missing </font> before </table>
line 346 column 35 - Warning: missing <tr>
line 346 column 50 - Warning: missing </font> before </td>
line 347 column 37 - Warning: unescaped & or unknown entity "&id"
line 346 column 180 - Warning: missing </font> before </table>
line 348 column 17 - Warning: discarding unexpected </textarea>
line 348 column 28 - Warning: discarding unexpected </form>
line 348 column 35 - Warning: discarding unexpected </embed>
line 348 column 43 - Warning: discarding unexpected </noembed>
line 348 column 53 - Warning: discarding unexpected </noscript>
line 348 column 64 - Warning: discarding unexpected </noembed>
line 348 column 74 - Warning: discarding unexpected </embed>
line 348 column 82 - Warning: discarding unexpected </table>
line 348 column 90 - Warning: discarding unexpected </table>
line 357 column 9 - Warning: missing </font> before <table>
line 373 column 69 - Warning: inserting implicit <font>
line 376 column 1 - Warning: inserting implicit <font>
line 385 column 23 - Warning: inserting implicit <font>
line 392 column 57 - Warning: discarding unexpected </font>
line 350 column 1 - Warning: missing </center>
line 91 column 9 - Warning: <img> lacks "alt" attribute
line 93 column 10 - Warning: <table> lacks "summary" attribute
line 95 column 63 - Warning: <img> lacks "alt" attribute
line 100 column 19 - Warning: <td> attribute "width" has invalid value "120px"
line 100 column 93 - Warning: <img> lacks "alt" attribute
line 117 column 19 - Warning: <td> attribute "width" has invalid value "120px"
line 117 column 98 - Warning: <img> lacks "alt" attribute
line 136 column 1 - Warning: <table> lacks "summary" attribute
line 136 column 240 - Warning: <td> attribute "bgcolor" lacks value
line 141 column 17 - Warning: <table> lacks "summary" attribute
line 142 column 44 - Warning: <img> proprietary attribute value "absmiddle"
line 142 column 142 - Warning: <img> proprietary attribute value "absmiddle"
line 142 column 246 - Warning: <img> proprietary attribute value "absmiddle"
line 143 column 17 - Warning: <table> lacks "summary" attribute
line 151 column 9 - Warning: <table> lacks "summary" attribute
line 155 column 22 - Warning: <img> lacks "alt" attribute
line 155 column 63 - Warning: <img> lacks "alt" attribute
line 155 column 111 - Warning: <img> lacks "alt" attribute
line 155 column 161 - Warning: <img> lacks "alt" attribute
line 156 column 11 - Warning: <img> lacks "alt" attribute
line 162 column 15 - Warning: <img> lacks "alt" attribute
line 165 column 11 - Warning: <table> lacks "summary" attribute
line 171 column 160 - Warning: <img> lacks "alt" attribute
line 198 column 3891 - Warning: <img> proprietary attribute value "absmiddle"
line 198 column 3891 - Warning: <img> lacks "alt" attribute
line 202 column 9 - Warning: <table> lacks "summary" attribute
line 206 column 22 - Warning: <img> lacks "alt" attribute
line 206 column 63 - Warning: <img> lacks "alt" attribute
line 206 column 111 - Warning: <img> lacks "alt" attribute
line 206 column 161 - Warning: <img> lacks "alt" attribute
line 207 column 11 - Warning: <img> lacks "alt" attribute
line 213 column 15 - Warning: <img> lacks "alt" attribute
line 216 column 11 - Warning: <table> lacks "summary" attribute
line 228 column 9 - Warning: <table> lacks "summary" attribute
line 232 column 22 - Warning: <img> lacks "alt" attribute
line 232 column 63 - Warning: <img> lacks "alt" attribute
line 232 column 112 - Warning: <img> lacks "alt" attribute
line 232 column 162 - Warning: <img> lacks "alt" attribute
line 233 column 11 - Warning: <img> lacks "alt" attribute
line 239 column 15 - Warning: <img> lacks "alt" attribute
line 242 column 11 - Warning: <table> lacks "summary" attribute
line 246 column 232 - Warning: <img> proprietary attribute value "absmiddle"
line 246 column 232 - Warning: <img> lacks "alt" attribute
line 252 column 9 - Warning: <table> lacks "summary" attribute
line 256 column 22 - Warning: <img> lacks "alt" attribute
line 256 column 63 - Warning: <img> lacks "alt" attribute
line 256 column 111 - Warning: <img> lacks "alt" attribute
line 256 column 161 - Warning: <img> lacks "alt" attribute
line 257 column 11 - Warning: <img> lacks "alt" attribute
line 263 column 15 - Warning: <img> lacks "alt" attribute
line 266 column 11 - Warning: <table> lacks "summary" attribute
line 271 column 484 - Warning: <img> proprietary attribute value "absmiddle"
line 271 column 484 - Warning: <img> lacks "alt" attribute
line 273 column 703 - Warning: <img> proprietary attribute value "absmiddle"
line 273 column 703 - Warning: <img> lacks "alt" attribute
line 283 column 9 - Warning: <table> lacks "summary" attribute
line 287 column 22 - Warning: <img> lacks "alt" attribute
line 287 column 63 - Warning: <img> lacks "alt" attribute
line 287 column 111 - Warning: <img> lacks "alt" attribute
line 287 column 161 - Warning: <img> lacks "alt" attribute
line 288 column 11 - Warning: <img> lacks "alt" attribute
line 294 column 15 - Warning: <img> lacks "alt" attribute
line 297 column 11 - Warning: <table> lacks "summary" attribute
line 303 column 447 - Warning: <img> proprietary attribute value "absmiddle"
line 303 column 447 - Warning: <img> lacks "alt" attribute
line 315 column 9 - Warning: <table> lacks "summary" attribute
line 319 column 22 - Warning: <img> lacks "alt" attribute
line 319 column 63 - Warning: <img> lacks "alt" attribute
line 319 column 111 - Warning: <img> lacks "alt" attribute
line 319 column 161 - Warning: <img> lacks "alt" attribute
line 320 column 11 - Warning: <img> lacks "alt" attribute
line 326 column 15 - Warning: <img> lacks "alt" attribute
line 329 column 11 - Warning: <table> lacks "summary" attribute
line 338 column 1268 - Warning: <img> lacks "alt" attribute
line 146 column 17 - Warning: <table> lacks "summary" attribute
line 344 column 17 - Warning: <table> lacks "summary" attribute
line 346 column 17 - Warning: <table> lacks "summary" attribute
line 347 column 44 - Warning: <img> proprietary attribute value "absmiddle"
line 347 column 142 - Warning: <img> proprietary attribute value "absmiddle"
line 347 column 246 - Warning: <img> proprietary attribute value "absmiddle"
line 352 column 1 - Warning: <img> lacks "alt" attribute
line 353 column 1 - Warning: <img> lacks "alt" attribute
line 354 column 1 - Warning: <img> lacks "alt" attribute
line 361 column 9 - Warning: <table> lacks "summary" attribute
line 363 column 25 - Warning: <img> lacks "alt" attribute
line 393 column 17 - Warning: <table> lacks "summary" attribute
line 143 column 50 - Warning: trimming empty <font>
line 313 column 15 - Warning: trimming empty <tr>
line 344 column 50 - Warning: trimming empty <font>
line 153 column 11 - Warning: <a> cannot copy name attribute to id
line 204 column 11 - Warning: <a> cannot copy name attribute to id
line 230 column 11 - Warning: <a> cannot copy name attribute to id
line 254 column 11 - Warning: <a> cannot copy name attribute to id
line 285 column 11 - Warning: <a> cannot copy name attribute to id
line 317 column 11 - Warning: <a> cannot copy name attribute to id
Info: Document content looks like HTML Proprietary
Info: No system identifier in emitted doctype
174 warnings, 0 errors were found!


The table summary attribute should be used to describe
the table structure. It is very helpful for people using
non-visual browsers. The scope and headers attributes for
table cells are useful for specifying which headers apply
to each table cell, enabling non-visual browsers to provide
a meaningful context for each cell.

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 may also want to try
"http://www.cast.org/bobby/" which is a free Web-based
service for checking URLs for accessibility.

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.

To learn more about HTML Tidy see http://tidy.sourceforge.net
Please fill bug reports and queries using the "tracker" on the Tidy web site.
Additionally, questions can be sent to html-tidy@w3.org
HTML and CSS specifications are available from http://www.w3.org/
Lobby your company to join W3C, see http://www.w3.org/Consortium