nesdev.com
http://forums.nesdev.com/

Labels with ASM6 and disasm6 [need help]
http://forums.nesdev.com/viewtopic.php?f=2&t=15354
Page 1 of 1

Author:  kuja killer [ Tue Jan 10, 2017 10:37 am ]
Post subject:  Labels with ASM6 and disasm6 [need help]

Hello, im posting needing help with how to handle labels with ASM6, and the disasm6 disasembler program by frantik. I'm just starting out with assemblers and such for my first time and so far i've not had too much trouble understand and figuring things out, but i have a big problem with how to work with labels.

I've been only hex editing for years and just started trying out assemblers, the disasm6 has the option to specific a user defined variables list and i was doing that with 1 PRG bank on my romhack. The format is "labelname = $xxxx" nes address. I thought this was how i was supposed to do labels, so when i run the dissasembler, it replaces the auto generated __xxxx with my label names which is good.

** say i move a little tiny block of code forwards or backwards, the JSR's, JMP's and LDA's never change to where they should point to. I figured out that i should "not" include these label address defintions when i go to run "asm6". So then now the JSR's and stuff will update correctly.

But the next time i run the disasm6 dissaembler if i've recently moved something forwards or backward, then it's all messed up. I'll show a screenshot of what i mean:

http://s24.postimg.org/e44hzs9f9/zxcccx.png
This area was at $9E40 originally for example ...i moved this section backwards just 1 byte, ...so the next time i ran the disasm6 it obviously doesnt know that it's now at 9E3F, so it totally messes up the labels.

I still do my hex editing alot, and my edits dont show up on the ASM file until the next time i run the disasembler, disasm6 "first".

I cant for the life of me understand how to like ... preserve labels the correct way or something. im not sure how to explain exactly i tried my best. :(

Is there some other type of format or specific procedure... script file or whatever, how i setup this stuff without having to always constantly retype the address number on the labels ??
If i "dont" use the labels file with disasm, then i lose them all as they just become the generic "__[number]" on everything.

Author:  Nicole [ Tue Jan 10, 2017 11:22 am ]
Post subject:  Re: Labels with ASM6 and disasm6 [need help]

I don't understand, why are you disassembling it more than once to begin with? After you've disassembled it the first time, you now have the source code that you can modify and assemble, so why would you need to disassemble it again instead of just keeping those source code files?

Author:  kuja killer [ Tue Jan 10, 2017 11:27 am ]
Post subject:  Re: Labels with ASM6 and disasm6 [need help]

Well i've been used to my hex editing habits forever since im most comfortable with that (dont bash me for this :() -- i've just been playing around testing things out. - i understand i can now just edit the asm file and run the assembler asm6 to see my changes.

But when im editing or moving something in fceux hex editor ...or even if i just touch 1 single byte literally and nothing more ... then that's not going to ever be reflected at all on the ASM file unless i use the "disasm6" disassembler again. :|

Author:  Nicole [ Tue Jan 10, 2017 11:36 am ]
Post subject:  Re: Labels with ASM6 and disasm6 [need help]

Oh, I see, that explains it.

Yeah, if asm6 could output a label file itself when it assembled, that would solve your problem, but unfortunately it doesn't look like it can do that.

Author:  freem [ Tue Jan 10, 2017 11:42 am ]
Post subject:  Re: Labels with ASM6 and disasm6 [need help]

Nicole wrote:
Yeah, if asm6 could output a label file itself when it assembled, that would solve your problem, but unfortunately it doesn't look like it can do that.


sonder's fork of asm6 included FCEUX .nl generation, and I ended up wrapping that and some undocumented opcode support into asm6f

Author:  kuja killer [ Tue Jan 10, 2017 1:16 pm ]
Post subject:  Re: Labels with ASM6 and disasm6 [need help]

oh cool i just tried that out, yea so i delete a line as a test on the asm file and run the asm6 ..got the nl file and check, and it changed the label's address. that's nice

but, since it came along with every other label too... all those plain __xxxx's ...there's hundreds of them, i only care about the custom labele names i was creating. :| ..and also trying to copy paste
$9E3F#save_pick_txtpntr# to use for disasm6 didnt work ... well now i was trying to search all over google for any sort of like script files or something to find and replace text ...to disasm6's own format.

I really didnt want to dig through hunderds of labels and trying to replace them all (or only important ones) by hand 1 line at a time. :(

so what im saying is, how do i now like convert the fceux nl file to disasm6's format now with like a batch script or something like that ?? as i dont even need the fceux file at all, just rather only disasm6's format :|

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/