| ASM for Beginners: Basic, Basic Codes in 20 minutes |
|
Forum Index - SMW Hacking - General SMW Hacking Help - Tutorials - ASM for Beginners: Basic, Basic Codes in 20 minutes |
|
|
|
|
| Posted on 2010-09-17 05:04:19 PM |
Link | Quote |
|
|
in Levelcode.asm, scroll down to where it says "level105:" then it'll have the sample code so take everything out EXCEPT the RTS
|
|
| Posted on 2010-09-17 06:21:53 PM |
Link | Quote |
|
|
^
|
| Last edited on 2010-09-17 09:29:56 PM by Livin4Jesus. |
|
| Posted on 2010-09-17 06:45:14 PM |
Link | Quote |
|
|
|
| Posted on 2010-09-17 08:04:42 PM |
Link | Quote |
|
... I am such a n00b. XD Thanks. 
EDIT: Thanks, Maxx! Even though it took me more then 20 minutes, I still learned in one day! 
Extra EDIT: one small question: What is the REVERT.asm and the Levelinitcode.asm for?
|
| Last edited on 2010-09-18 12:29:11 PM by Livin4Jesus. |
|
| Posted on 2010-10-13 05:57:29 PM |
Link | Quote |
|
|
I'm finished. I now know at least some of every aspect of SMW hacking. Now, time to move on to other ROMs...
|
|
| Posted on 2010-10-15 11:27:37 PM |
Link | Quote |
|
What? Don't you have hacks your working on? And plus, how can you hack other games? DON'T LEAVE! 
Well, so long. 
BTW, Thanks Maxx, for making this simply amazing tutorial.
|
| Last edited on 2010-10-15 11:28:24 PM by Livin4Jesus. |
|
| Posted on 2011-01-02 01:57:24 PM |
Link | Quote |
|
Is there a way I can have Mario collect a block (i.e. coin) and have that block raise the value of $7E0F48 (star counter) by one?
I'm trying to have something that raises a counter (which resets to 0 when you die) and then when that counter reaches 67 load to a new room. level.
|
|
| Posted on 2011-01-02 07:39:40 PM |
Link | Quote |
|
this should do it
QuoteJMP MarioBelow : JMP MarioAbove : JMP MarioSide : JMP SpriteV : JMP SpriteH : JMP MarioCape : JMP MarioFireBall
MarioAbove:
MarioBelow:
MarioSide:
inc.w $0F48
lda.b #$02
sta.b $9C
jsl.l $00BEB0
SpriteV:
SpriteH:
MarioCape:
MarioFireBall:
rtl
|
|
| Posted on 2011-01-03 10:40:14 PM |
Link | Quote |
|
|
Thanks, but for some reason the block occasionally turns to a turn block that you can bounce one. It is a minor problem that I don't mind too much, but can you think of anything that would fix that?
|
|
| Posted on 2011-01-04 05:35:00 PM |
Link | Quote |
|
|
put PHY before LDA.b #$02 and PLY after JSL.l $00BEB0
|
|
| Posted on 2011-01-08 07:07:17 PM |
Link | Quote |
|
While that did fix the block from turning into a bouncing turn block, it now doesn't always give you a star point, usually from colliding with a corner of the block. It may be that I simply entered the code wrong, since I obviously have no idea what I'm doing. here is what I currently have for the code:
CodeJMP MarioBelow : JMP MarioAbove : JMP MarioSide : JMP SpriteV : JMP SpriteH : JMP MarioCape : JMP MarioFireBall
MarioAbove:
MarioBelow:
MarioSide:
inc.w $0F48
lda.b #$02
PHY
sta.b $9C
jsl.l $00BEB0
PLY
SpriteV:
SpriteH:
MarioCape:
MarioFireBall:
rtl Tag (div) was not closed. Tag (div) was not closed.
|
|
| Posted on 2011-01-08 07:29:48 PM |
Link | Quote |
|
you just don't have the corner offsets
Codedb $42
;^ This is needed for the corner offsets
JMP Mario : JMP Mario : JMP Mario : JMP Return : JMP Return : JMP Return : JMP Return
JMP MarioCorner : JMP HeadInside : JMP BodyInside
Mario:
MarioCorner:
HeadInside:
BodyInside:
inc.w $0F48
phy
lda.b #$02
sta.b $9C
jsl.l $00BEB0
ply
Return:
rtl
|
| Last edited on 2011-01-08 07:30:09 PM by Ramp202. |
|
| Posted on 2011-01-09 01:08:05 PM |
Link | Quote |
|
|
Thanks for the help everyone, I now have the block I needed finished. One last question though. Is there a list of the values for sound? I'm was trying to get the block I made to make the same sound as a dragon coin, but I only know normal coins: !sound = $01
|
|
| Posted on 2011-01-09 01:14:14 PM |
Link | Quote |
|
Check this thread for a list of the sound effects.
Edit: it should be $50
|
| Last edited on 2011-01-09 01:15:57 PM by Sind. |
|
| Posted on 2011-01-14 01:54:34 PM |
Link | Quote |
|
|
I typed the LDA #02 STA $7E0019 on 105 then on the cmd file it said patched applied with no errors but my mario still doesn't have a cape for some reason
|
|
| Posted on 2011-01-15 02:04:12 AM |
Link | Quote |
|
|
Are you by any chance using xkas v0.08? It sometimes says that but doesn't really apply the patch. Try using v0.06 if that's the case.
|
|
| Posted on 2011-01-15 03:59:20 AM |
Link | Quote |
|
Originally posted by IceguyAre you by any chance using xkas v0.08? It sometimes says that but doesn't really apply the patch. Try using v0.06 if that's the case.
Well I switched to the old version but it still didn't work. I am supposed to put -xkas smw.smc level.asm- in the cmd file to patch it right? Also I put the LDA and the other exactly how the tutorial said it in the level code file but its still not working.
|
|
| Posted on 2011-01-15 04:04:03 AM |
Link | Quote |
|
Originally posted by EvilGuy0613xkas smw.smc level.asm
The correct usage is xkas level.asm smw.smc (at least for 0.06, and I can't see any reason why other xkas versions would swap them).
|
|
| Posted on 2011-01-15 04:35:46 AM |
Link | Quote |
|
Originally posted by AlcaroOriginally posted by EvilGuy0613xkas smw.smc level.asm
The correct usage is xkas level.asm smw.smc (at least for 0.06, and I can't see any reason why other xkas versions would swap them).
Did that too, it said patches applied with no error. But I go to see if it worked and it didn't.
|
|
| Posted on 2011-01-15 09:34:47 AM |
Link | Quote |
|
|
Word of advice, you never have to put the '7E'. And if the first two digits are zeroes, you can remove them too. However, the amount of digits should never be three, so don't put "$137" for "0137", just put "$0137".
|
|
|
|
|
|
|
Forum Index - SMW Hacking - General SMW Hacking Help - Tutorials - ASM for Beginners: Basic, Basic Codes in 20 minutes |