Yet another 6502 reference

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

Post Reply
User avatar
heardtheword
Posts: 20
Joined: Mon Feb 08, 2016 1:22 pm
Contact:

Yet another 6502 reference

Post by heardtheword »

I've used several 6502 references over the past few months and haven't been happy with any of them. I wanted a reference that looks good on a mobile device and also focus on status flags rather than cycle counts/bytes. Here is what I came up with and maybe it will help someone else. You can expand each mnemonic for details on the opcodes and bytes/cycles used.

http://media.matttuttle.com/6502/

If you come across something that isn't accurate or have an idea of how to make it better, let me know.
User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2033
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: Yet another 6502 reference

Post by FrankenGraphics »

This looks very good and useful. Incidentally, i began to write a similar reference sheet in a note block to learn the flags just a few days ago.

Since it is interactive and all, maybe a filter or sorter when you click any or all of the flags could be helpful? To help answer questions like 'what may be altering carry in this case?'
http://www.frankengraphics.com - personal NES blog
Joe
Posts: 469
Joined: Mon Apr 01, 2013 11:17 pm

Re: Yet another 6502 reference

Post by Joe »

heardtheword wrote:If you come across something that isn't accurate
Bit 4 isn't a flag either; it only exists when the flags are pushed to the stack.
User avatar
heardtheword
Posts: 20
Joined: Mon Feb 08, 2016 1:22 pm
Contact:

Re: Yet another 6502 reference

Post by heardtheword »

Great suggestions! I added filter buttons at the top for the status flags. I also added print styles if someone wanted to print it for some reason...
User avatar
mikejmoffitt
Posts: 1352
Joined: Sun May 27, 2012 8:43 pm

Re: Yet another 6502 reference

Post by mikejmoffitt »

This is pretty clean. It would be a cool feature if it had a C-esque "psuedocode" description of the kind of pointer math the different addressing modes do, because for newbies looking at the Y vs X indexing for LDA ($AA, x) instead of LDA ($AAAA), Y can be confusing at first.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Yet another 6502 reference

Post by tepples »

You mean like this?

Code: Select all

LDA (dd),Y  ; A = RAM[RAM[dd] + RAM[(dd + 1) % 0x100] * 0x100 + Y]
LDA (dd,X)  ; A = RAM[RAM[(dd + X) % 0x100] + RAM[(dd + X + 1) % 0x100] * 0x100]
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Yet another 6502 reference

Post by rainwarrior »

I think if you're trying to illustrate what it does for a beginner you might sacrifice accuracy for simplicity:

Code: Select all

A = RAM[RAM[dd] + Y]
...is probably a lot clearer about what its function is. The page wrapping is a finer detail, much like flags and cycles and other stuff you wouldn't try to encapsulate in a "C illustration".
Post Reply