(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
06-15-24 10:38 AM
0 users currently in SMW Hacking.
Acmlm's Board - I3 Archive - SMW Hacking - Confused...
  
User name:
Password:
Reply:
 
Options: - -
Quik-Attach:
Preview for more options

Max size 1.00 MB, types: png, gif, jpg, txt, zip, rar, tar, gz, 7z, ace, mp3, ogg, mid, ips, bz2, lzh, psd

UserPost
Smallhacker
Posts: 750/832
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.
spel werdz rite
Posts: 1609/1796
Not if you do it with a custom block.
Wait, be more specific on what it is you're trying to do.
Kiwisauce
Posts: 30/41
Originally posted by Smallhacker
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.


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
yes, but it will be only executed as long as mario touches the block


What? That doesn't really make sense... Shouldn't the entire subroutine be executed when it's called?
Kailieann
Posts: 520/808
Originally posted by ghettoyouth
try JML

... and have the game not be able to return to the block code?
What possible purpose would that serve?
Smallhacker
Posts: 746/832
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.
ghettoyouth
Posts: 331/332
try JML

Originally posted by Kiwisauce
(e.g. is it possible to call this subroutine from a block?) Any help would be greatly appreciated.


yes, but it will be only executed as long as mario touches the block
Kiwisauce
Posts: 27/41
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.
Acmlm's Board - I3 Archive - SMW Hacking - Confused...


ABII

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

Page rendered in 0.012 seconds; used 347.15 kB (max 393.24 kB)