A 6502 disassembler that runs on the NES.

A place where you can keep others updated about your NES-related projects through screenshots, videos or information in general.

Moderator: Moderators

Post Reply
User avatar
slembcke
Posts: 172
Joined: Fri Nov 24, 2017 2:40 pm
Location: Minnesota

A 6502 disassembler that runs on the NES.

Post by slembcke »

This might be the most useless piece of software I've ever written. Haha.

In case you ever wanted a 6502 disassembler to run on the NES that can only disassemble it's own source code:
Image

Donload source/.nes: http://files.slembcke.net/temp/Disassembler.tgz

edit: added a download link
Last edited by slembcke on Mon Nov 27, 2017 3:53 pm, edited 1 time in total.
User avatar
Kasumi
Posts: 1293
Joined: Wed Apr 02, 2008 2:09 pm

Re: A 6502 disassembler that runs on the NES.

Post by Kasumi »

That's actually really cool. Is the code small enough to fit in WRAM? Because it might be cool to hack into other games.
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: A 6502 disassembler that runs on the NES.

Post by tokumaru »

That could be fun to play with, even if not particularly useful.

Totally unrelated, but I couldn't help noticing that the animated GIF was made from lossily compressed images, resulting in a huge file due to the numerous color artifacts around the text. If you used clean images instead, that GIF could easily be 10 times smaller, and it'd look better too. When possible, avoid JPEG/MPEG when capturing screenshots/video from old consoles.
User avatar
Ryoga
Posts: 61
Joined: Wed Mar 16, 2016 2:08 pm
Location: World 9 - Warp Zone
Contact:

Re: A 6502 disassembler that runs on the NES.

Post by Ryoga »

Although it does not seem very useful, it is curious.
User avatar
pubby
Posts: 583
Joined: Thu Mar 31, 2016 11:15 am

Re: A 6502 disassembler that runs on the NES.

Post by pubby »

There's no link?

How does it determine the alignment of the code?
User avatar
slembcke
Posts: 172
Joined: Fri Nov 24, 2017 2:40 pm
Location: Minnesota

Re: A 6502 disassembler that runs on the NES.

Post by slembcke »

I'm kind of surprised that people want to see the code for this. :p I added a download link to the first post.

This is my first cc65 program in 10+ years (I think I last used it in like 2003), and first NES project so I wouldn't expect to learn much from it. Compared to the 2 kb Apple II monitor program, this 4+ kb disassembler is a monstrosity. :p It was easy to make though.

@puby It doesn't. It's starts at $c000, and there is only one code segment.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: A 6502 disassembler that runs on the NES.

Post by rainwarrior »

I let it go all the way around just to see.

Didn't quite manage to wrap perfectly. ;)
disassembler_wrap.png
disassembler_wrap.png (3.26 KiB) Viewed 6691 times
adam_smasher
Posts: 271
Joined: Sun Mar 27, 2011 10:49 am
Location: Victoria, BC

Re: A 6502 disassembler that runs on the NES.

Post by adam_smasher »

Image
User avatar
Punch
Posts: 365
Joined: Sat Feb 16, 2013 11:52 am

Re: A 6502 disassembler that runs on the NES.

Post by Punch »

Is that a "quine"?
This is a block of text that can be added to posts you make. There is a 255 character limit.
User avatar
slembcke
Posts: 172
Joined: Fri Nov 24, 2017 2:40 pm
Location: Minnesota

Re: A 6502 disassembler that runs on the NES.

Post by slembcke »

Now with split scrolling!
Image

Fixed the jerky scrolling by switching to NMIs as well. I had forgotten how much fun 6502 assembly was even if it's not very practical in 2018. :p
Post Reply