6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Apr 19, 2024 11:46 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Sat Dec 19, 2020 5:16 pm 
Offline
User avatar

Joined: Tue Aug 11, 2020 3:45 am
Posts: 311
Location: A magnetic field
About 20 years ago, a student or three asked for a 6502 opcode chart which showed the bit fields of each instruction. I do not believe they received a satisfactory response. I also believe that it remains beneficial to provide an alternative answer.

I like the format of datasheets in which 8 bit opcodes are typically shown within 16×16 grid, like an extended ASCII chart. Such a periodic table of the opcodes concisely explains rare Technetium (Terbium?) as the store immediate addressing mode. Such exceptions may be obscured in a bit field chart. However, for a student or experienced designer, familiar with larger instruction sets, a description of bit fields has become the norm, if it is explained at all. Therefore, we gain advocates away from from processors with a larger instruction-space by providing an at-a-glance comparison in a format that the typical 6502 advocate may find needlessly complicated.

Independent of http://axis.llx.com/~nparker/a2/opcodes.html, I attempted to draw a chart in the style of Lance A. Leventhal's MC68000 guide. The result can be printed on one sheet if five point text is bearable. Although this may seem ludicrous, the equivalent for 68000 fills a large proportion of a 300 page book. The initial attempt took about two hours to draw. The current draft took about three days and I had to stop due to tendonitis. I have attempted to show the symmetry between the base and extended instructions across five dialects of 6502 without requiring blocks of color. Titling could probably be improved. I have also left deliberate errors in the draft. Therefore, if you don't find any errors then you are definitely wrong.

In a similar manner to my seven column multiplexed bus state machine diagram, the seven columns of the 6502 opcode bit field chart can be abridged for smaller systems. However, in both cases, it would be strongly preferable if abridged documentation is not widely circulated. Hopefully, this will be sufficient to prevent truncated versions displacing the full version.

I took the liberty of adding my own vaporware architecture extension and I found that it can be explained very concisely in this form. In the best interests of the whole 6502 community, I would be very happy to draft charts of other efforts in a similar manner. For example, the very regular instruction format of the source compatible 65m02 may be very concisely described in the style.


Attachments:
6502-instruction-bitpattern-chart0-0-9.odg [18.71 KiB]
Downloaded 82 times

_________________
Modules | Processors | Boards | Boxes | Beep, Beep! I'm a sheep!
Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 15, 2021 11:25 am 
Offline
User avatar

Joined: Tue Aug 11, 2020 3:45 am
Posts: 311
Location: A magnetic field
Please find enclosed an updated instruction bit pattern chart. Draft 11 has better titling and a slightly simplified layout. Three deliberate errors are included. If you find more than three errors, I would definitely like to know. Regardless, the chart, in its current state, has been useful for my own reference. I hope others find it useful too.


Attachments:
6502-instruction-bitpattern-chart0-0-12.pdf [231.1 KiB]
Downloaded 112 times
6502-instruction-bitpattern-chart0-0-11.odg [14.19 KiB]
Downloaded 55 times

_________________
Modules | Processors | Boards | Boxes | Beep, Beep! I'm a sheep!
Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 15, 2021 8:10 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8138
Location: Midwestern USA
Can't open an ODG file, whatever that is.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 15, 2021 8:35 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8423
Location: Southern California
BigDumbDinosaur wrote:
Can't open an ODG file, whatever that is.

It's an open-document drawing file, rather than a Microsoft-specific format. The .pdf and .odg files contain the same thing.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Fri May 21, 2021 11:35 am 
Offline
User avatar

Joined: Tue Aug 11, 2020 3:45 am
Posts: 311
Location: A magnetic field
I found an error when devising instruction sequences to identify 6502 variants. Specifically, 65CE02's PHW imm16 should have the same bit pattern as 65816's PEA imm16.

I am disappointed that no-one found the deliberate errors. For example, SunPlus is source compatible, not binary compatible. With the removal of RegY related opcodes, less than 128 opcodes remain. I presume that it would be very tempting to pack two common instructions into one byte. In the trivial case, a one bit field may specify LDA immediate. More advanced encodings are also possible.

Anyhow, I am not aware of any other error or omission regarding opcodes. However, at least four instances of addressing mode are questionable.

_________________
Modules | Processors | Boards | Boxes | Beep, Beep! I'm a sheep!


Top
 Profile  
Reply with quote  
PostPosted: Fri May 21, 2021 2:55 pm 
Offline
User avatar

Joined: Sat Sep 29, 2012 10:15 pm
Posts: 899
I would strongly recommend not uploading reference materials with deliberate errors. In fact I would recommend taking these documents down. They look like real documentation, and can only cause grief later.

_________________
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: