6502 NES disassembler, python 3

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: 6502 NES disassembler, python 3

Post by dougeff »

https://github.com/nesdoug

There. Is that better for you?
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
mikejmoffitt
Posts: 1353
Joined: Sun May 27, 2012 8:43 pm

Re: 6502 NES disassembler, python 3

Post by mikejmoffitt »

Thanks for uploading. I've made a few suggestions: https://github.com/nesdoug/NES-DISASSEMBLER/pull/1
User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: 6502 NES disassembler, python 3

Post by dougeff »

I'm new to github. I'm not sure the etiquette. Am I expected to merge your changes, or leave it as a separate fork?


Also, I never mentioned it, but the reason my disassembler won't output an absolute address in the zero page (instead outputs 3 bytes)...is asm6 always converts this to a zero page address, and it won't reassemble the same.

Example
LDA $0034

Becomes
.hex AD 34 00
nesdoug.com -- blog/tutorial on programming for the NES
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: 6502 NES disassembler, python 3

Post by tepples »

Dunno about asm6, but in ca65 you can force absolute addressing with lda a:$34.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: 6502 NES disassembler, python 3

Post by tokumaru »

No way to force absolute addressing in ASM6, AFAIK. When I need that, I either type the instruction in hex (with the original instruction as a comment to make my intention clear) or I use a mirror (Variable+$800).
User avatar
mikejmoffitt
Posts: 1353
Joined: Sun May 27, 2012 8:43 pm

Re: 6502 NES disassembler, python 3

Post by mikejmoffitt »

dougeff wrote:I'm new to github. I'm not sure the etiquette. Am I expected to merge your changes, or leave it as a separate fork?


Also, I never mentioned it, but the reason my disassembler won't output an absolute address in the zero page (instead outputs 3 bytes)...is asm6 always converts this to a zero page address, and it won't reassemble the same.

Example
LDA $0034

Becomes
.hex AD 34 00
What you'd do on GitHub (and with collaboration-based source control in general) is review the changes on the pull request first. If you like the changes as-is, you may accept them and merge them. Otherwise (and more typically) you leave comments about what you'd want changed before you accept it.

In my case, I goofed a little, and allowed git to convert the line endings to unix-style, as opposed to the windows-style you had before, so the entire file appears to be changed even though I did not make such sweeping changes. Nothing will break here, since it will be converted back for you as you check it out in Git for Windows, but it makes the pull request review very difficult.
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: 6502 NES disassembler, python 3

Post by rainwarrior »

Since we're talking about github etiquette, usually the onus is on the person making the pull request to provide an easily reviewable change. ;)

i.e. you should fix the line endings in your pull request branch, rather than requiring the puller to fix it.

Not that I think it matters or is a big deal in this specific case, but dougeff was asking about github etiquette.
User avatar
mikejmoffitt
Posts: 1353
Joined: Sun May 27, 2012 8:43 pm

Re: 6502 NES disassembler, python 3

Post by mikejmoffitt »

rainwarrior wrote:Since we're talking about github etiquette, usually the onus is on the person making the pull request to provide an easily reviewable change. ;)

i.e. you should fix the line endings in your pull request branch, rather than requiring the puller to fix it.

Not that I think it matters or is a big deal in this specific case, but dougeff was asking about github etiquette.
Right, that's why I've acknowledged my mistake repeatedly, and worked on fixing it :?
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: 6502 NES disassembler, python 3

Post by rainwarrior »

Sorry, wasn't trying to cast shame on you or anything, I know you're fixing it, just wanted to illustrate the point about open source etiquette and thought it made a suitable example.
User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: 6502 NES disassembler, python 3

Post by dougeff »

I know I'm very slow...

mikejmoffitt, I merged your pull request, but when I tested it, it output lots of errors that I didn't understand (cause I'm not sure all what you changed), so I reverted it, and just manually typed in the system args line.
nesdoug.com -- blog/tutorial on programming for the NES
Post Reply