Register | Login | |||||
Main
| Memberlist
| Active users
| Calendar
| Chat
| Online users Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album |
| |
0 users currently in SMW Hacking. |
Acmlm's Board - I3 Archive - SMW Hacking - Confused... | New poll | | |
Add to favorites | Next newer thread | Next older thread |
User | Post | ||
Kiwisauce Red Goomba Since: 09-23-06 Last post: 6433 days Last view: 6432 days |
| ||
I am stumped on a seemingly simple ASM project. I'm trying to make a save block that will call the save game function when hit from below. Here's the code:
JSL $009BC9 RTS It seems like it should be simple, but it doesn't work (otherwise I wouldn't be posting this). Could the problem be some fundamental property of ASM that I don't know about? (e.g. is it possible to call this subroutine from a block?) Any help would be greatly appreciated. |
|||
ghettoyouth Panser Since: 11-19-05 From: Germany Last post: 6544 days Last view: 6544 days |
| ||
try JML
Originally posted by Kiwisauce yes, but it will be only executed as long as mario touches the block (edited by ghettoyouth on 10-27-06 11:51 AM) (edited by ghettoyouth on 10-27-06 11:53 AM) |
|||
Smallhacker Super Koopa I AM A Group Of Officially Frustrated Younglings, G.O.O.F.Y. MEMBER |
| ||
1) Make sure that the address is in SNES format. (Also, if you're writing the hex code yourself, the address should be written in reverse byte order. The address ABCDEF would be written as EFCDAB)
2) Make sure that 9BC9 is a long subroutine. |
|||
Kailieann Since: 11-18-05 Last post: 6430 days Last view: 6430 days |
| ||
Originally posted by ghettoyouth ... and have the game not be able to return to the block code? What possible purpose would that serve? |
|||
Kiwisauce Red Goomba Since: 09-23-06 Last post: 6433 days Last view: 6432 days |
| ||
Originally posted by Smallhacker I'm writing the code in ASM just how I posted it and then compiling it. I checked SMW Central several times; it is the correct address in SNES format. And shouldn't the long subroutine $009BC9 be the same as the zero bank subroutine $9BC9? Originally posted by ghettoyouth What? That doesn't really make sense... Shouldn't the entire subroutine be executed when it's called? |
|||
spel werdz rite Since: 11-19-05 Last post: 6431 days Last view: 6430 days |
| ||
Not if you do it with a custom block.
Wait, be more specific on what it is you're trying to do. |
|||
Smallhacker Super Koopa I AM A Group Of Officially Frustrated Younglings, G.O.O.F.Y. MEMBER |
| ||
A long subroutine (a subroutine that ends with RTL) must be called with JSL.
A short subroutine (a subroutine that ends with RTS) must be called with JSR within the same bank as the subroutine. If the subroutine is short and you need to call it from a block, you must add a long subroutine to the same bank as the short subroutine. The long subroutine would JSR the short one and then RTL. |
Add to favorites | Next newer thread | Next older thread |
Acmlm's Board - I3 Archive - SMW Hacking - Confused... | | |