| This VWF Dialogues code |
|
Forum Index - SMW Hacking - General SMW Hacking Help - This VWF Dialogues code |
|
Pages: 1  |
|
|
|
| Posted on 2012-04-15 07:04:28 AM |
Link | Quote |
|
I have this code...
Codedl .checklevels
db "But you can't enter the castle just yet until you get more info.",$FA
db $FA,$FF
.ready
db "I hope you're ready for the fight.",$FA,$EF
dw $00C6
db %00000000
db $FA,$FF
.checklevels
LDA $0F5E
AND #%00011111
BEQ .ready
RTL
But whenever it gets to this code ingame, the game crashes completely. What have I missed?
|
|
| Posted on 2012-04-15 08:30:09 AM |
Link | Quote |
|
If you're trying to use a binary value, remove the "#".
|
|
| Posted on 2012-04-15 08:34:50 AM |
Link | Quote |
|
Originally posted by JowTH
If you're trying to use a binary value, remove the "#".
Wrong. The # tells that it's not a RAM address. Removing it will not give any kind of desirable results.
|
|
| Posted on 2012-04-15 09:13:14 AM |
Link | Quote |
|
Originally posted by shrine
Looks like you're missing the $F1 command. Just putting the address of a label there with no command to handle it, things are almost certain to crash.
Short story even shorter, put a db $F1 before that and you should be good.
|
| Last edited on 2012-04-15 09:14:07 AM by WhiteYoshiEgg. |
|
| Posted on 2012-04-15 09:16:28 AM |
Link | Quote |
|
IIRC, when using binary values, it's safest to specify the size of the opcode (.b, .w, or .l) So in your case, just make it AND.b #%00011111
This probably isn't causing the crash, but it's just safe to do so.
|
|
| Posted on 2012-04-15 11:43:06 AM |
Link | Quote |
|
Also...
CodeLDA $0F5E
AND #%00011111
BEQ .ready
You're making the code branch to text. That is not what you want to do, since that will make the text execute as opcodes. You want to branch to more code that changes the text pointer, !vwftextsource. The readme has an example of this in the information for the $F1 command.
|
| Last edited on 2012-04-15 11:43:47 AM by imamelia. |
|
|
Pages: 1  |
|
|
|
|
Forum Index - SMW Hacking - General SMW Hacking Help - This VWF Dialogues code |