Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,439,136
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-19-24 10:13 PM
Guest: Register | Login

0 users currently in SMW Hacking | 2 guests

Main - SMW Hacking - Changing springboard jump height. New thread | New reply


FirePhoenix0
Posted on 08-31-07 08:21 PM Link | Quote | ID: 64420


Bullet Bill
Level: 50

Posts: 431/505
EXP: 898310
Next: 49007

Since: 02-23-07

Last post: 5513 days
Last view: 5496 days
I'm looking through the disassembly of the springboard and I'm not sure what I would have to change to make two custom sprite springboards that launch Mario to different heights in the air. The original one launches Mario up 12 tiles. I'm thinking that I might want the first custom one to launch Mario up 16 tiles and the second one up only 8 tiles. How would I go about doing this?

____________________

GreyMaria
Posted on 09-01-07 10:44 AM Link | Quote | ID: 64470

>implying even the Japanese understand the Japanese
Level: 105

Posts: 344/2851
EXP: 11914462
Next: 347798

Since: 07-13-07

Last post: 4491 days
Last view: 4460 days
Shot in the dark, but I think the springboard sets Mario's Y velocity. A good place to start would probably be identifying Mario's Y velocity at the point he departs from the springboard.

____________________
we're currently experiencing some technical difficulties

FirePhoenix0
Posted on 09-02-07 12:40 AM Link | Quote | ID: 64509


Bullet Bill
Level: 50

Posts: 432/505
EXP: 898310
Next: 49007

Since: 02-23-07

Last post: 5513 days
Last view: 5496 days
I'm not entirely sure what I'm doing with this but I believe this is the section of code I'll need to change.

ADDR_01E6A7:
STY $7D ; Set Mario's Y speed
LDA #$08 ; \ Play sound effect
STA $1DFC ; /


I did some quick calculations of the height I want and tried changing the $7D to $9C. When I did however, Mario gets stuck on the springboard and bounces up and down without actually leaving the springboard.

____________________

Skreeny
Posted on 09-02-07 03:36 AM Link | Quote | ID: 64522


Cobrat
Level: 56

Posts: 514/653
EXP: 1321060
Next: 77116

Since: 02-21-07

Last post: 5334 days
Last view: 4835 days
It's probably a signed value. I don't think you'll be able to put it above $7F, unfortunately enough.

smkdan
Posted on 09-02-07 04:08 AM Link | Quote | ID: 64532


Ninji
Level: 36

Posts: 75/238
EXP: 288496
Next: 19614

Since: 05-26-07

Last post: 4056 days
Last view: 4005 days
$7D and $9C are RAM addresses. You're changing the target address altogether.


CODE_01E6A2: A0 80 LDY.B #$80
CODE_01E6A4: 8C 06 14 STY.W $1406
CODE_01E6A7: 84 7D STY RAM_MarioSpeedY
CODE_01E6A9: A9 08 LDA.B #$08 ; \ Play sound effect
CODE_01E6AB: 8D FC 1D STA.W $1DFC ; /
CODE_01E6AE: 80 40 BRA CODE_01E6F0


I took a quick look at it. The LDY.B #$80 will change the height. Turns out 80h is the highest value actually, and increasing it will lower his jump height. Values from 00-7F will ground him to the spring board (when you hold B). However it's interpreted, there's a bunch of sign bit conditionals.

Mattrizzle
Posted on 09-02-07 04:18 AM Link | Quote | ID: 64533


Red Cheep-cheep
Level: 33

Posts: 157/202
EXP: 226219
Next: 2960

Since: 04-21-07
From: United States

Last post: 2414 days
Last view: 2374 days
smkdan beat me to the post, but in this case, #$C0 should make Mario bounce at half the maximum height.

____________________

GreyMaria
Posted on 09-02-07 04:48 AM Link | Quote | ID: 64537

>implying even the Japanese understand the Japanese
Level: 105

Posts: 346/2851
EXP: 11914462
Next: 347798

Since: 07-13-07

Last post: 4491 days
Last view: 4460 days
Mario's Y Speed seems to be negative when he is traveling up.

That's a good tip to know when you're scripting.

Couldn't you hack a routine to wait about six to twelve frames then set his Y speed again?

____________________
we're currently experiencing some technical difficulties

FirePhoenix0
Posted on 09-02-07 05:11 AM Link | Quote | ID: 64539


Bullet Bill
Level: 50

Posts: 433/505
EXP: 898310
Next: 49007

Since: 02-23-07

Last post: 5513 days
Last view: 5496 days
I figured it out thanks to you guys. Too bad that I can't set it to jump higher. I worked around that now by making a springboard that launches you up 6 blocks and another one that launches you 9 blocks.

It turns out that setting the value to #$C0 makes Mario bounce to one third of his height, or 4 blocks. So I tried setting it to A0 and got 7 blocks height. From there I just did a bit of guesswork and setting it to A7 achieves a height of 6 blocks. For the other one I set it to #$90.

____________________

Main - SMW Hacking - Changing springboard jump height. New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.029 seconds. (341KB of memory used)
MySQL - queries: 62, rows: 89/90, time: 0.014 seconds.