(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
05-02-24 05:10 AM
0 users currently in SMW Hacking.
Acmlm's Board - I3 Archive - SMW Hacking - Yoshi related ASM sub-routines New poll | |
Add to favorites | Next newer thread | Next older thread
User Post
1169

Red Goomba


 





Since: 03-27-06
From: Gold Coast, Australia

Last post: 6597 days
Last view: 6597 days
Posted on 03-30-06 09:46 AM Link | Quote
Edit: I slacked off a bit the last few days; but am back at mapping Yoshi. I am removing the (3 paragraph) intro from the post to make it easier to read. Below is my research in to Yoshi related sub-routines. I have also included (at the bottom) Yoshi related info found by others.

====

01ed9e to 01edcd
Is fired (once) as Mario attempts to dismount Yoshi.

01edce to 01ede1
Is fired (once) as Mario attempts to mount or dismount yoshi.

01ea75 to 01eb4d
and
01ebca to 01ebe2

Are called every frame (or more?) when Yoshi is active (it doesn't matter if Yoshi is on the screen or not, so I suspect it has more to do with Yoshi's behaviour then rendering)

01eb4e to 01ebb3
Are called every frame (or more?) when Mario is on Yoshi - only when he is on Yoshi . . . it starts being called as soon as Mario touches the top of Yoshis interactive "box".

01ede3
Is read as Mario mounts Yoshi.

01ede2
Is read as Mario dismounts Yoshi.

01ebc0
Is read when Mario jumps off Yoshi and Yoshi is facing left . . .

01ebc1
Is read when Mario jumps off Yoshi and Yoshi is facing right. . .

====

Mabey Related:

01ea70 to 01ea75
Are called every frame regardless of wether Yoshi is up or not; but given the closeness to the other Yoshi code (and the fact 01ea6F is not called), my unconfirmed guess would be this is the code that checks wether Yoshi is up or not.

====

Other Peoples Research (mainly flags)
(from the SMW Memory Map e.g. not my research)

7E13C7
Yoshi colour (4=yellow, 6=blue, 8=red, A=green - refreshes on level change)

7E1410
Yoshi Has Wings flag # 1. The value 02 enables it. This doesn't handle the flying ability.

7E160E
Table related to Yoshi eating stuff
(I am going to look in to this one tonight see if I can't figure more out)

7E1616
Yoshi's mouth flag

7E18AC
Yoshi Swallow Frame Counter/Status

7E18E2
Loose Yoshi Flag (if set, any Yoshis spawned become 1ups instead)

7E1B95
Player::Yoshi has Wings Flag


(edited by lynch82 on 04-01-06 08:03 AM)
ghettoyouth

Panser








Since: 11-19-05
From: Germany

Last post: 6396 days
Last view: 6396 days
Posted on 03-30-06 10:32 AM Link | Quote
xF4FF the subroutine for yoshi's tongue

sound effect adresses:

xF957 SFX that is played when Yoshi's egg breaks.
xA4C6 SFX that is played after the egg is broken.
xEF60 SFX that is played when Mario jumps on Yoshi
xF50F SFX that is played when Yoshi's tongue comes out.
1169

Red Goomba


 





Since: 03-27-06
From: Gold Coast, Australia

Last post: 6597 days
Last view: 6597 days
Posted on 03-30-06 10:35 AM Link | Quote
Originally posted by ghettoyouth
xF4FF the subroutine for yoshi's tongue

sound effect adresses:

xF957 SFX that is played when Yoshi's egg breaks.
xA4C6 SFX that is played after the egg is broken.
xEF60 SFX that is played when Mario jumps on Yoshi
xF50F SFX that is played when Yoshi's tongue comes out.


Excellent (: thanks.
ghettoyouth

Panser








Since: 11-19-05
From: Germany

Last post: 6396 days
Last view: 6396 days
Posted on 03-30-06 11:07 AM Link | Quote
no problem, i'm looking an adress to disable the ducking of yoshi. so if anyone finds it please post it here
1169

Red Goomba


 





Since: 03-27-06
From: Gold Coast, Australia

Last post: 6597 days
Last view: 6597 days
Posted on 03-30-06 11:25 AM Link | Quote
Originally posted by ghettoyouth
no problem, i'm looking an adress to disable the ducking of yoshi. so if anyone finds it please post it here


I wil keep an eye out for that address for you.

Although if we can't find it we know the location of a block of code that only executes when Mario is on Yoshi; so you could replace some of it with a jump to some custom code that disables the down key (if that address is known, I think I read it somewhere)

Ofcourse you wouldn't want to do that until we know the address for unmounting (currently I have only found 2 single word addresses, which seperately get called depending on direction, not enough for a jump)

The other downside of that way (appart from being alittle messy) is that yoshi can't go down pipes if the down key is disabled.


(edited by lynch82 on 03-30-06 09:26 AM)
ghettoyouth

Panser








Since: 11-19-05
From: Germany

Last post: 6396 days
Last view: 6396 days
Posted on 03-30-06 12:09 PM Link | Quote
Originally posted by lynch82
of that way (appart from being alittle messy) is that yoshi can't go down pipes if the down key is disabled.


doesn't matter, i want to replace yoshi with kuribo's shoe
Mattrizzle

Red Goomba








Since: 11-17-05
From: Louisville, KY, USA

Last post: 6580 days
Last view: 6580 days
Posted on 03-30-06 06:00 PM Link | Quote
Originally posted by ghettoyouth
Originally posted by lynch82
of that way (appart from being alittle messy) is that yoshi can't go down pipes if the down key is disabled.


doesn't matter, i want to replace yoshi with kuribo's shoe


Kuribo's Shoe could go down pipes, though.
Stephan Reiken

Blipper








Since: 11-17-05

Last post: 6289 days
Last view: 6283 days
Posted on 03-30-06 09:01 PM Link | Quote
Originally posted by lynch82
I am new to ROM hacking, and to be honest my method of tracking down sub-routines is probably cave-man like . . .



Dude, you are doing things way beyond the scope of most beginners. I don't really consider myself a vet, really I'm not that great at all, but you've come into this way ahead. Don't sell yourself short .

I don't know how much help it'd be, but there is some pretty in-depth stuff at http://www.zophar.net/tech/snes.html
1169

Red Goomba


 





Since: 03-27-06
From: Gold Coast, Australia

Last post: 6597 days
Last view: 6597 days
Posted on 03-30-06 09:30 PM Link | Quote
Originally posted by Stephan Reiken

Dude, you are doing things way beyond the scope of most beginners. I don't really consider myself a vet, really I'm not that great at all, but you've come into this way ahead. Don't sell yourself short .

I don't know how much help it'd be, but there is some pretty in-depth stuff at http://www.zophar.net/tech/snes.html


Thanks for the comment, and the link.

I wasn't really trying to sell myself short; I was just being cautious. I don't know what the general level of ASM ROM-hacking knowledge is around here, so I want to make it clear I was new; so as to not frustrate people if my methods are to slow or brutish.
Xeruss

Cukeman








Since: 11-18-05
From: Oregon

Last post: 6282 days
Last view: 6282 days
Posted on 03-31-06 05:36 PM Link | Quote
Originally posted by lynch82
Yoshi colour (4=yellow, 6=blue, 8=red, A=green - refreshes on level change) [\quote]

Hmm... Could this be used to make a custom block that would change yoshis color?
Smallhacker

Super Koopa
I AM A Group Of Officially Frustrated Younglings, G.O.O.F.Y. MEMBER








Since: 11-17-05
From: Söderhamn, Sweden

Last post: 6284 days
Last view: 6282 days
Skype
Posted on 03-31-06 05:58 PM Link | Quote
Originally posted by Xeruss
Originally posted by lynch82
Yoshi colour (4=yellow, 6=blue, 8=red, A=green - refreshes on level change)


Hmm... Could this be used to make a custom block that would change yoshis color?


"refreshes on level change" means that Yoshi won't be updated until you enter a new level (or return to the overworld. Can't remember which).
MathOnNapkins

1100

In SPC700 HELL


 





Since: 11-18-05

Last post: 6282 days
Last view: 6282 days
Posted on 03-31-06 07:41 PM Link | Quote
In all honesty, I don't think it would be that hard to do that in the middle of a level. Where's your sense of adventure?
1169

Red Goomba


 





Since: 03-27-06
From: Gold Coast, Australia

Last post: 6597 days
Last view: 6597 days
Posted on 04-01-06 07:42 AM Link | Quote
You could make it do it in the middle of the level; but heck you COULD do anything if you hacked long enough.

What I believe smallhacker was saying, and what I can confirm from experience is Yoshi's colour is stored elsewhere (address unknown), changing the yoshi flag (mentioned above) mid-level does nothing as it resets to the value it was at the start of the level every frame.
1169

Red Goomba


 





Since: 03-27-06
From: Gold Coast, Australia

Last post: 6597 days
Last view: 6597 days
Posted on 04-02-06 10:12 PM Link | Quote
Ok, well I have more than enough information to do what I want to do to Yoshi; so I probably won't be updating this thread for a while (unless i get bored and want to map him more for fun).

I hope other people find this information useful; I know I have found the mount and dismout routines very handy.
MathOnNapkins

1100

In SPC700 HELL


 





Since: 11-18-05

Last post: 6282 days
Last view: 6282 days
Posted on 04-02-06 10:35 PM Link | Quote
I was going to post this a few days ago, but I was bored so I wanted to see if there actually was a quick way to change yoshi's color and behavior - mid level.

I used Geiger's Snes9x Debugger and set a write breakpoint on $7E13C7. Turns out this value was getting updated every frame from a location in the array at $7E15F6, X. I don't know that location very well, but it appears to be in the middle of a group of other sprite information. This says to me that Yoshi is just another sprite object on screen that Mario interacts with... am I wrong? Like, is he in the same class as the enemies or is he seperate from them.

Anyways, if you can locate the entry in $7E15F6, X that corresponds to Yoshi, you can change his color to one of the values listed (4, 6, 8, A) and his color and behavior will change within the next frame. I could not figure out how the game knows which entry is Yoshi's since Geiger's isn't as advanced as I wanted it to be. That would have required breakpoints on things like writes to the X register, and being able to filter out certain addresses when using breakpoints. My point is that Yoshi is allocated as soon as he gets on screen, just like any other sprite, and thus his entry could appear at $7E15FE, $7E15F8, or any other byte in that array. I suspect the array is only 10 byte long but again I'm not familiar enough with this game to know for sure.
C:/xkas bio.asm
Compiled ASM code








Since: 11-17-05

Last post: 6283 days
Last view: 6282 days
Posted on 04-02-06 10:42 PM Link | Quote
Originally posted by MathOnNapkins
This says to me that Yoshi is just another sprite object on screen that Mario interacts with... am I wrong? Like, is he in the same class as the enemies or is he seperate from them.

yes he is in the same class, he use sprite number 35, to locate which entry he use, you could check the sprite type table(located at 7E009E)


(edited by Bio on 04-02-06 09:42 PM)
(edited by Bio on 04-02-06 09:47 PM)
1169

Red Goomba


 





Since: 03-27-06
From: Gold Coast, Australia

Last post: 6597 days
Last view: 6597 days
Posted on 04-02-06 11:02 PM Link | Quote
Originally posted by MathOnNapkins
I was going to post this a few days ago, but I was bored so I wanted to see if there actually was a quick way to change yoshi's color and behavior - mid level.

I used Geiger's Snes9x Debugger and set a write breakpoint on $7E13C7. Turns out this value was getting updated every frame from a location in the array at $7E15F6, X. I don't know that location very well, but it appears to be in the middle of a group of other sprite information. This says to me that Yoshi is just another sprite object on screen that Mario interacts with... am I wrong? Like, is he in the same class as the enemies or is he seperate from them.

Anyways, if you can locate the entry in $7E15F6, X that corresponds to Yoshi, you can change his color to one of the values listed (4, 6, 8, A) and his color and behavior will change within the next frame. I could not figure out how the game knows which entry is Yoshi's since Geiger's isn't as advanced as I wanted it to be. That would have required breakpoints on things like writes to the X register, and being able to filter out certain addresses when using breakpoints. My point is that Yoshi is allocated as soon as he gets on screen, just like any other sprite, and thus his entry could appear at $7E15FE, $7E15F8, or any other byte in that array. I suspect the array is only 10 byte long but again I'm not familiar enough with this game to know for sure.


Handy to know. I knew 7E13C7 was being set every frame, but didn't bother to try find out where as I was focusing more on interaction than rendering; but I am glad someone did (:

As for being in the same class as enemies, I think this is both true and partially-untrue. For the most part he acts the same as any other object on screen; but he has a much larger interaction scope than most objects.

I suspect most enemies reuse a small set of sub-routines; where as yoshi seems to have quite a few of his own. Also Yoshi is one of the few objects which actively effects the rendering of mario (moving him up and down slightly as Yoshi moves, etc)

It will actually be interesting to see (with more detailed testing) wether any of the sub-routines above fire for any other sprites. I ofcourse did many basic tests to confirm they were primarily Yoshi related; but still as many tests as I did I am sure there are a million more to do.

Remember as well that there is more than one Yoshi. The little Yoshis, while seemingly still part of the same sprite, do not interact with Mario in the same way... the seem to use the same routines as 'kickable' objects.


(edited by lynch82 on 04-02-06 10:06 PM)
Add to favorites | Next newer thread | Next older thread
Acmlm's Board - I3 Archive - SMW Hacking - Yoshi related ASM sub-routines |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.028 seconds; used 437.73 kB (max 563.73 kB)