| RAM Address or Not? - Solved! (sorta) |
|
Forum Index - SMW Hacking - General SMW Hacking Help - ASM & Related Topics - RAM Address or Not? - Solved! (sorta) |
|
Pages: 1  |
|
|
|
| Posted on 2012-03-20 09:14:52 AM |
Link | Quote |
|
FOR THE MOST RECENT PROBLEM, CLICK HERE!
I assembled (or at least attempted to) the Amazing Flyin' Hammer Bro's flying blocks in Xkas. When I tried, it gave me line after line after line after (line after) line of "error: AFHB_Blocks.asm: line 166{2}: label [DEX] not found [CA DEX]," for example. It doesn't tell me at all what to do, and I have no clue what's wrong with the code in itself, or how to fix it. This is a ZIP with the code, and the CFG file (an extra thing from an earlier example that I didn't bother to remove this time around; the ASM file isn't changed). Someone at least give me an idea of what's wrong.
|
| Last edited on 2012-03-21 08:32:39 AM by Roads1. |
|
| Posted on 2012-03-20 09:33:05 AM |
Link | Quote |
|
What? Why did you keep all the bytes in there? Get rid of them.
Also .db is not valid in xkas/asar, change them to db
|
| Last edited on 2012-03-20 09:36:00 AM by wiiqwertyuiop. |
|
| Posted on 2012-03-20 09:39:19 AM |
Link | Quote |
|
|
Bytes? You mean "CODE:number"?
|
|
| Posted on 2012-03-20 09:42:31 AM |
Link | Quote |
|
The bold numbers:
CodeFlyingPlatform: 22 4C DB 02 JSL.L FlyingPlatformMain
Return0187A6: 60 RTS ; Return
FlyingPlatformMain: 8B PHB
CODE_02DB4D: 4B PHK
CODE_02DB4E: AB PLB
CODE_02DB4F: 20 5C DB JSR.W CODE_02DB5C
CODE_02DB52: AB PLB
Return02DB53: 6B RTL ; Return
...
Obviously these are not opcodes.
Edit: Also all the capital letters in front of the opcodes need to be lower cased.
|
| Last edited on 2012-03-20 09:43:20 AM by wiiqwertyuiop. |
|
| Posted on 2012-03-20 09:44:46 AM |
Link | Quote |
|
|
Capital letters in front of the opcodes? Where do you mean?
|
|
| Posted on 2012-03-20 09:45:41 AM |
Link | Quote |
|
CodeJSL.L FlyingPlatformMain
Need to be lower case, or you can just get rid of them if you wish.
|
|
| Posted on 2012-03-20 09:49:49 AM |
Link | Quote |
|
The .L after JSL? Alright, I was wondering what that was for.
EDIT: Now it's giving me various "RAM_SpriteState" (or something else after "RAM") not found. Usually it's when storing A into something. I read about labels for stuff, but I have no clue what these labels are for.
|
| Last edited on 2012-03-20 09:53:10 AM by Roads1. |
|
| Posted on 2012-03-20 09:57:31 AM |
Link | Quote |
|
Originally posted by wiiqwertyuiopCodeJSL.L FlyingPlatformMain
Need to be lower case, or you can just get rid of them if you wish.
Getting rid of them is not recommended unless one fully understands how the different addressing modes work and how labels are interpreted.
|
|
| Posted on 2012-03-20 09:58:35 AM |
Link | Quote |
|
Originally posted by Roads1The .L after JSL? Alright, I was wondering what that was for.
Not just after the JSL, but all opcodes that have the capital letter in front of it.
Originally posted by Roads1
EDIT: Now it's giving me various "RAM_SpriteState" (or something else after "RAM") not found. Usually it's when storing A into something. I read about labels for stuff, but I have no clue what these labels are for.
Labels are just something the assembler uses for e.g.
Code!Lable = #$00
!Lable2 = $19
LDA !Lable
STA !Lable2
The assembler would replace !Lable with #$00 and !Lable2 with $19, thus storing #$00 to $19. You need to either define all labels with the correct RAM address, or just replace them with the correct address.
|
|
| Posted on 2012-03-20 10:17:44 AM |
Link | Quote |
|
Well, I'm told in Xkas that label RAM_SpriteDir doesn't exist. Well, I CTRL+F-ed all.log and can't find where it specifies what "RAM_SpriteDir" is. I get no results.
No, I'm not using Notepad's glitchy CTRL+F function for this; I opened all.log in Chrome.
Originally posted by Smallhacker[R]eplace them with the correct address.
...which I don't know because, like I said above the quote, I can't find the label definitions anywhere.
EDIT: OHWAIT! They're there in All.log, but at the bottom, with no equals sign.
|
| Last edited on 2012-03-20 10:19:51 AM by Roads1. |
|
| Posted on 2012-03-20 10:19:47 AM |
Link | Quote |
|
I just ctrl+f that same label and I got 292 results. This was one of them:
Originally posted by all.log7E157C RAM_SpriteDir
The labels are at the very bottom, just so you know.
|
|
| Posted on 2012-03-20 10:20:27 AM |
Link | Quote |
|
You posted as I edited. Sorry for the confusion. I just realized that I don't need CTRL+F. 
EDIT: Level up! Cheep-Cheep!
ANOTHER EDIT: It doesn't specify whether it gets "$XYZ," "#$XYZ," or "#XYZ". It's just "XYZ Label".
|
| Last edited on 2012-03-20 10:39:19 AM by Roads1. |
|
| Posted on 2012-03-20 11:23:29 AM |
Link | Quote |
|
|
Obviously it's $RAM_Address otherwise it wouldn't be a RAM address.
|
|
| Posted on 2012-03-20 01:59:33 PM |
Link | Quote |
|
|
So all labels are RAM Addresses? I guess so.
|
|
| Posted on 2012-03-20 03:07:08 PM |
Link | Quote |
|
No lables aren't just RAM addresses. They can be values/places to branch to/ROM addresses/or whatever. But in this case they are RAM addresses, because:
CodeCODE_02DC02: LDA.b #$C0
CODE_02DC04: STA.w #$00AA,Y
for example, wouldn't make any sense.
|
|
| Posted on 2012-03-20 04:19:43 PM |
Link | Quote |
|
|
I can't help but think that you might want to at least learn the basics of ASM before attempting to disassemble a sprite.
|
|
| Posted on 2012-03-21 03:29:22 AM |
Link | Quote |
|
50% of the work of "disassembling" a sprite consists of figuring out which routines to copy. The remaining 50% consists of converting between the format that all.log is in and xkas format.
I wonder... Is it straightforward enough to be automated?
|
|
| Posted on 2012-03-21 05:47:44 AM |
Link | Quote |
|
Originally posted by yoshicookiezeusI can't help but think that you might want to at least learn the basics of ASM before attempting to disassemble a sprite.
I do know basic ASM. I can program a Poison Mushroom.
|
|
|
Pages: 1  |
|
|
|
|
Forum Index - SMW Hacking - General SMW Hacking Help - ASM & Related Topics - RAM Address or Not? - Solved! (sorta) |