1
0
mirror of https://github.com/mcanlas/6502-opcodes.git synced 2024-12-29 08:29:54 +00:00
Exploring the visualization of 6502 opcodes
Go to file
2024-03-04 08:05:53 -05:00
.github/workflows change job name 2023-07-06 13:21:55 -04:00
data added gen apple example 2022-12-07 18:19:49 -05:00
firepower-core/src index register 2024-01-17 10:08:52 -05:00
firepower-cpu/src/main/scala/com/htmlism/firepower/cpu cpu state 2024-01-04 14:24:43 -05:00
firepower-demo/src/main/scala/com/htmlism/firepower/demo remove optional braces 2023-10-23 13:56:45 -04:00
nescant/src scala3 fmt 2023-10-03 16:15:10 -04:00
project scalafix 0.12.0 2024-03-04 08:05:53 -05:00
src closer together 2024-01-03 14:34:31 -05:00
.gitignore ignore bloop ✈️ 2023-06-07 14:17:23 -07:00
.scalafix.conf only match on exactly scala 2023-12-06 21:32:32 -05:00
.scalafmt.conf scalafmt 3.8.0 2024-02-26 10:00:06 -05:00
build.sbt add cpu module 2024-01-03 15:43:19 -05:00
Jenkinsfile add jenkinsfile 2019-11-30 01:52:25 -05:00
LICENSE Create LICENSE 2018-05-11 18:03:32 -04:00
README.md cpu state 2024-01-04 14:24:43 -05:00
TODO.md register allocation 2024-01-16 19:26:46 -05:00

firepower

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

Mutation tracking

  • If the injected scope is local to the caller (and not reused), then it is also local to the called method, and can be rendered as a local val declaration

Elsewhere

Colophon

firepower can be abbreviated as fp, just like functional programming. And it is a reference to one of Mario's abilities in Super Mario Bros, an NES classic.