We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS

Eyes & Lichty: Difference between revisions

From SnesLab
Jump to: navigation, search
(→‎Eratta: TCD not mentioned in index on dp reg)
(→‎Eratta: TDC)
Line 37: Line 37:
=== Eratta ===
=== Eratta ===
* page 497 recommends making sure the carry flag is already set, or to set it with [[SEC]] prior to doing a [[SBC]] to "avoid subtracting the carry flag" but it should say "to avoid subtracting one"
* page 497 recommends making sure the carry flag is already set, or to set it with [[SEC]] prior to doing a [[SBC]] to "avoid subtracting the carry flag" but it should say "to avoid subtracting one"
* page 510 on [[TCD]] mentions the [[direct page register]], but this is missing from the index
* page 510 on [[TCD]] and page 512 on [[TDC]] mentions the [[direct page register]], but this is missing from the index
* In the tables that show which MPU supports which instructions, an "X" denotes yes and a " " denotes no.  Many readers would find a check mark less confusing.
* In the tables that show which MPU supports which instructions, an "X" denotes yes and a " " denotes no.  Many readers would find a check mark less confusing.
* The Rockwell 65c02 does not have a direct page, but the four Rockwell instructions are listed as having [[Direct Page Addressing]] anyway "for consistency."
* The Rockwell 65c02 does not have a direct page, but the four Rockwell instructions are listed as having [[Direct Page Addressing]] anyway "for consistency."

Revision as of 05:34, 10 December 2023

"Eyes & Lichty" is scene slang for the excellent manual "Programming the 65816 Including the 6502, 65C02, and 65802" by David Eyes & Ron Lichty. It may be the best unofficial textbook on SNES programming, due in no small part to the fact that the Ricoh 5A22 is based on the 65c816 and the SPC700 is based on the 6502.

Addressing Mode

Eyes & Lichty divides the 65c816's various addressing modes into two groups: simple and complex. Simple addressing modes are explained first and require the processor to do little effective address calculation. They are:

Simple Addressing Modes

see page 108

Complex Addressing Modes

  • Absolute Indexed with X
  • Absolute Indexed with Y
  • Direct Page Indexed with X
  • Direct Page Indexed with Y
  • Direct Page Indirect Indexed with Y
  • Direct Page Indexed Indirect with X
  • Absolute Indexed Indirect
  • Direct Page
  • Absolute Long Indexed With X
  • Direct Page Indirect Long Indexed with Y
  • Stack Relative
  • Stack Relative Indirect Indexed with Y

see page 197

Eratta

  • page 497 recommends making sure the carry flag is already set, or to set it with SEC prior to doing a SBC to "avoid subtracting the carry flag" but it should say "to avoid subtracting one"
  • page 510 on TCD and page 512 on TDC mentions the direct page register, but this is missing from the index
  • In the tables that show which MPU supports which instructions, an "X" denotes yes and a " " denotes no. Many readers would find a check mark less confusing.
  • The Rockwell 65c02 does not have a direct page, but the four Rockwell instructions are listed as having Direct Page Addressing anyway "for consistency."
  • The 65c02 datasheet does mention WAI is supported

Quick Links

Part I Basics

Part II Architecture

Part III Tutorial

Part IV Applications