Exploring the visualization of 6502 opcodes
Go to file
2022-05-10 22:50:31 -04:00
.github/workflows drop scalafix 2022-02-15 11:47:30 -05:00
nescant/src scala3 2022-02-14 18:11:45 -05:00
project sbt-wartremover 3.0.3 2022-05-10 22:50:31 -04:00
src fmt 2022-04-18 23:11:44 -04:00
.gitignore
.scalafix.conf
.scalafmt.conf fmt 2022-04-18 23:11:44 -04:00
build.sbt avoid deprecated syntax 2021-03-25 00:45:11 -04:00
Jenkinsfile
LICENSE
README.md

6502-opcodes

Addressing modes

  • Immediate: a value literal
  • ZeroPage: argument is an 8-bit address to the zero page
  • ZeroPageX: argument is an 8-bit address to the zero page, incremented by X without carry
  • ZeroPageY: argument is an 8-bit address to the zero page, incremented by Y without carry
  • Absolute: argument is an 16-bit address
  • AbsoluteX: argument is an 16-bit address, incremented by X with carry
  • AbsoluteY: argument is an 16-bit address, incremented by Y with carry
  • Indirect: argument an address (A); the effective value is an address (B) stored at that address (A); used only by Jump
  • IndirectX: argument is an 8-bit address; find a value at this address incremented by the value X
  • IndirectY: argument is an 8-bit address; find a value at this address; increment the value by Y

TODO - Nescant

  • mappings, enums, and bitfields are enums

TODO

  1. operand support should be derived from enum support
  • postfix operations to accumulator values
  • maybe implement define registry
  • register locking (i.e. disallow X writes during indexed traversal that uses X)
  • compiler optimization
    • when writing multiple, 16-bit address literals to memory, they may share the same high byte. if all writes are done by bouncing off the accumulator, you can save instructions by using the accumulator for the high byte once and writing multiple times
  • articulate AST as different from ASM stream
  • register locking (transactions) via phantom types