injection

This commit is contained in:
Mark Canlas 2020-08-12 22:19:49 -04:00
parent 1470f01a90
commit a52be918ce
2 changed files with 7 additions and 2 deletions

View File

@ -5,6 +5,7 @@ sealed trait AddressingMode
case object Immediate extends AddressingMode case object Immediate extends AddressingMode
case object ZeroPage extends AddressingMode case object ZeroPage extends AddressingMode
case object ZeroPageX extends AddressingMode case object ZeroPageX extends AddressingMode
case object ZeroPageY extends AddressingMode
case object Absolute extends AddressingMode case object Absolute extends AddressingMode
case object AbsoluteX extends AddressingMode case object AbsoluteX extends AddressingMode
case object AbsoluteY extends AddressingMode case object AbsoluteY extends AddressingMode

View File

@ -18,10 +18,14 @@ object MatchOpcodes {
.toMap .toMap
// format: off // format: off
def injectedOpcodesJump: Map[Int, (Instruction, AddressingMode)] = def injectedOpcodesSpecific: Map[Int, (Instruction, AddressingMode)] =
Map( Map(
0x4C -> (JMP -> Absolute), 0x4C -> (JMP -> Absolute),
0x6C -> (JMP -> Indirect), 0x6C -> (JMP -> Indirect),
0x96 -> (STX -> ZeroPageY),
0xB6 -> (LDX -> ZeroPageY),
0xBE -> (LDX -> AbsoluteY),
) )
def injectedOpcodesRelative: Map[Int, (Instruction, AddressingMode)] = def injectedOpcodesRelative: Map[Int, (Instruction, AddressingMode)] =
@ -75,7 +79,7 @@ object MatchOpcodes {
generatedOpcodes ++ generatedOpcodes ++
injectedOpcodesImplied ++ injectedOpcodesImplied ++
injectedOpcodesRelative ++ injectedOpcodesRelative ++
injectedOpcodesJump injectedOpcodesSpecific
out.print("<table>") out.print("<table>")