| 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 2011-01-15 12:00:58 PM |
Link | Quote |
|
Originally posted by SomeGuyWord 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".
Just tried it, i didn't work. My Mario doesn't have a cape. Just to be sure I'm am supposed type this "xkas level.asm smw.smc" (Without the quotes of course) in the cmd file right? Or wrong.
|
|
| Posted on 2011-01-20 10:01:38 AM |
Link | Quote |
|
Yep, that's correct (the way you're patching it). Why it's not working could be because:
-You have ROMName.ips in your hack folder.
-You're still using xkas v0.08 even though I told you not to.
-You're testing the wrong ROM (or wrong level).
-You have some other tool that is reverting the changes when you save your ROM through it.
-Your code isn't being executed.
-Something else I can't think of.
I am guessing #2 is the problem. A problem why it isn't even working at all may be because xkas isn't even patching it (as I said, v0.08 sometimes doesn't patch the file). I don't get why v0.06 is causing any problems, the syntax is exactly the same. What happens when you try patching with it?
QuoteHowever, the amount of digits should never be three, so don't put "$137" for "0137", just put "$0137".
You can use 3 digits AFAIK, it's just bad practice.
|
|
| Posted on 2011-01-20 12:00:28 PM |
Link | Quote |
|
Originally posted by IceguyYep, that's correct (the way you're patching it). Why it's not working could be because:
-You have ROMName.ips in your hack folder.
-You're still using xkas v0.08 even though I told you not to.
-You're testing the wrong ROM (or wrong level).
-You have some other tool that is reverting the changes when you save your ROM through it.
-Your code isn't being executed.
-Something else I can't think of.
I am guessing #2 is the problem. A problem why it isn't even working at all may be because xkas isn't even patching it (as I said, v0.08 sometimes doesn't patch the file). I don't get why v0.06 is causing any problems, the syntax is exactly the same. What happens when you try patching with it?
QuoteHowever, the amount of digits should never be three, so don't put "$137" for "0137", just put "$0137".
You can use 3 digits AFAIK, it's just bad practice.
Well I haven't tried in 5 days so I tried again just now with v0.06. I put the
LDA #02
STA $7E0019
Under level 105, in the level code file then saved it.
I opened the cmd file and type xkas level.asm smw.smc It doesn't say patches applied with no errors, at the same time it doesn't say there was an error either but I'm assuming it didn't work cause my mario still doesn't have a cape in level 105. I'm not sure what I'm missing.
|
|
| Posted on 2011-01-20 02:31:20 PM |
Link | Quote |
|
Pardon my interrupt.
Originally posted by EvilGuy0613LDA #02
STA $7E0019
You're missing a dollar sign after the hash.
|
| Last edited on 2011-01-20 02:32:34 PM by Buu. |
|
| Posted on 2011-01-20 03:14:38 PM |
Link | Quote |
|
Originally posted by WeeabuuPardon my interrupt.
Originally posted by EvilGuy0613LDA #02
STA $7E0019
You're missing a dollar sign after the hash.
Okay, I corrected it, but I guess that wasn't the problem cause its still didn't work.
|
|
| Posted on 2011-01-20 04:26:06 PM |
Link | Quote |
|
Originally posted by WeeabuuPardon my interrupt.
Originally posted by EvilGuy0613LDA #02
STA $7E0019
You're missing a dollar sign after the hash.
# actually does work. It denotes a decimal number over hex.
#$0F is valid
#0F is not, only regular base-10 works with #
|
|
| Posted on 2011-01-20 06:03:52 PM |
Link | Quote |
|
|
In that case, excuse me for barging in.
|
|
| Posted on 2011-01-20 06:23:29 PM |
Link | Quote |
|
Well its okay now, I gave up in trying to get it to work for now
I don't really need to learn how to do it yet, I just thought it be nice to know how.
|
|
| Posted on 2011-01-23 08:55:56 AM |
Link | Quote |
|
|
when i use the CMD to apply level.asm with xkas 0.08 and 0.06, Zsnes doesn't open the rom (says "bad rom"), and LM says that the rom maybe is corrupt. why?
|
| Last edited on 2011-01-23 09:10:19 AM by linkunarre. |
|
| Posted on 2011-01-23 09:26:24 AM |
Link | Quote |
|
Sounds like you forgot setting the freespace.
And the "bad rom" thing is unavoidable. Saving a level in LM usually fixes it.
|
|
| Posted on 2011-01-23 10:18:46 AM |
Link | Quote |
|
Originally posted by AlcaroSounds like you forgot setting the freespace.
And the "bad rom" thing is unavoidable. Saving a level in LM usually fixes it.
ok , i'll try it
E: great , it's working! only one thing , the bad rom thing , is also apearing , but i forget to say that the name of the game (super mario world) wasn't there, instead there was a lot of strange signs. now ther is super mario world and not htat strange signs
|
| Last edited on 2011-01-23 10:24:39 AM by linkunarre. |
|
| Posted on 2011-01-29 10:32:01 AM |
Link | Quote |
|
i want to make a block with the mario "is in water" flag:
1 byte Flag "Mario is in water" flag
#$04 is yes, #$00 is no.
E: it has to make that if you hit it with the cape , it changes the flag
Code
JMP Return : JMP Return : JMP Return : JMP Return : JMP Return : JMP Mario : JMP Return
Mario:
LDA $75
CMP #$00
BEQ SWIMINGANIM
CMP #$04
BEQ NOTHING
RTS
SWIMINGANIM:
LDA #$04
STA $75
RTS
NOTHING:
STZ $75
Return:
RTL
when i hit it with the cape , the screen gets black and the game freezes, but the music still playing. what's happening here?
|
| Last edited on 2011-01-29 11:44:33 AM by linkunarre. |
|
| Posted on 2011-01-29 12:17:47 PM |
Link | Quote |
|
|
Most of your returns are RTS instead of RTL =/
|
|
| Posted on 2011-01-29 12:35:03 PM |
Link | Quote |
|
Originally posted by SindMost of your returns are RTS instead of RTL =/
ok , but where is the diference with RTL and RTS? RTS is return to a subroutine , but RTL?
E: ok , now it doesn't brick , but it doesn't do anything!
|
| Last edited on 2011-01-29 01:07:16 PM by linkunarre. |
|
| Posted on 2011-01-29 02:47:39 PM |
Link | Quote |
|
|
I have a problem. The tutorial works up until when I have to check the rom after putting in the command prompt. I then check the rom and it says checksum failed. What did I do wrong?
|
|
| Posted on 2011-01-29 03:41:34 PM |
Link | Quote |
|
Does the actual game itself work?
If yes, just ignore the checksum failed message. It gets fixed after you save once in LM anyways =/
|
|
| Posted on 2011-01-29 03:48:57 PM |
Link | Quote |
|
hey , can someone help me? now the code doesn't do nothing , no brick the game but not changes the "mario is swimming" flag!
here:
CodeJMP MarioBelow : JMP MarioAbove : JMP MarioSide : JMP SpriteV : JMP SpriteH : JMP MarioCape : JMP MarioFireBall:
MarioBelow:
MarioAbove:
RTL
MarioSide:
LDA $75
CMP #$00
BEQ SWIMINGFLAG
CMP #$04
BEQ NOTHINGFLAG
RTL
SWIMINGFLAG:
LDA #$04
STA $75
RTL
NOTHINGFLAG:
STZ $75
MarioCape:
SpriteV:
SpriteH:
MarioFireBall:
RTL
|
|
| Posted on 2011-01-29 05:22:59 PM |
Link | Quote |
|
Originally posted by SindDoes the actual game itself work?
If yes, just ignore the checksum failed message. It gets fixed after you save once in LM anyways =/
No, the screen goes black.
|
|
| Posted on 2011-01-29 06:44:56 PM |
Link | Quote |
|
@linkunarre: I'm assuming $75 is constantly set in game, depending on whether mario is in water or not. If that is true, writing to it would be futile.
@2cr8or: What did you insert?
|
|
| Posted on 2011-01-29 06:54:09 PM |
Link | Quote |
|
@link - you want it to activate when mario hit the block with a cape no? because you made it when mario hits the side. Also, i shortened down your code a little
CodeJMP Return : JMP Return : JMP Return : JMP Return : JMP Return : JMP Cape : JMP Return
Cape:
LDA $75 ; No CMP? It'll automatically think CMP #$00 is after
BEQ Swim
STZ $75
RTL
Swim:
LDA #$01
STA $75
Return:
RTL
|
|
|
|
|
|
|
Forum Index - SMW Hacking - General SMW Hacking Help - Tutorials - ASM for Beginners: Basic, Basic Codes in 20 minutes |