Banner
Views: 236,407,327
Time: 2013-05-23 10:29:26 AM
27 users online: 678ruby678, Amos Defamos, DgBarca, DPBOX, everest700, FlamingRok, Grav, GreenHammerBro, HyperMario, Jolpengammler, o Ladida, Lui37, MarioBros980, Medic, Mogsiah, Neidave, omegazeroINFI, Purple Rex, Rextep, Roshi007, S.C.O.R.P.I.O.N., o ShadowPhoenix, shreerocks1324, Silver Scarlet, o Tahixham, W11, wiiqwertyuiop - Guests: 35 - Bots: 12Users: 22,868 (1,276 active)
Latest: LuckyDearly
Tip: Try sketching out ideas for overworlds and levels. Even if they don't manage to fit into Lunar Magic completely, at least you have a base to work from, instead of doing it all from scratch.
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 »
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.
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.
Bytes? You mean "CODE:number"?
The bold numbers:

Code
FlyingPlatform: 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.
Capital letters in front of the opcodes? Where do you mean?
Code
JSL.L FlyingPlatformMain


Need to be lower case, or you can just get rid of them if you wish.
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.
Originally posted by wiiqwertyuiop
Code
JSL.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.
Originally posted by Roads1
The .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.
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.
I just ctrl+f that same label and I got 292 results. This was one of them:

Originally posted by all.log
7E157C RAM_SpriteDir


The labels are at the very bottom, just so you know.
You posted as I edited. Sorry for the confusion. I just realized that I don't need CTRL+F. :P

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.
Obviously it's $RAM_Address otherwise it wouldn't be a RAM address.
So all labels are RAM Addresses? I guess so.
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:

Code
CODE_02DC02: LDA.b #$C0 CODE_02DC04: STA.w #$00AA,Y


for example, wouldn't make any sense.
I can't help but think that you might want to at least learn the basics of ASM before attempting to disassemble a sprite.
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?
Originally posted by yoshicookiezeus
I 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)

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2013 - SMW Central
Legal Information - Link To Us


Total queries: 27

Menu