From 13e8d25a09b03f331cc26caa6a6fdcb185e844c9 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Mon, 23 Sep 2024 08:24:18 -0500 Subject: [PATCH] Add more `NESInstruction` values (#55) Co-authored-by: Matt Pearce --- src/dotnes.tasks/Utilities/NESInstruction.cs | 73 +++++++++++++++++--- 1 file changed, 64 insertions(+), 9 deletions(-) diff --git a/src/dotnes.tasks/Utilities/NESInstruction.cs b/src/dotnes.tasks/Utilities/NESInstruction.cs index 5dd11d2..d1c64f3 100644 --- a/src/dotnes.tasks/Utilities/NESInstruction.cs +++ b/src/dotnes.tasks/Utilities/NESInstruction.cs @@ -22,7 +22,7 @@ enum NESInstruction : byte /// ORA_zpg = 0x05, /// - /// Shift Left One Bit (Memory or Accumulator) + /// Arithmetic Shift Left One Bit (Memory or Accumulator) /// ASL_zpg = 0x06, /// @@ -34,7 +34,7 @@ enum NESInstruction : byte /// ORA = 0x09, /// - /// Shift Left One Bit (Memory or Accumulator) + /// Arithmetic Shift Left One Bit (Memory or Accumulator) /// ASL_A = 0x0A, /// @@ -42,7 +42,7 @@ enum NESInstruction : byte /// ORA_abs = 0x0D, /// - /// Shift Left One Bit (Memory or Accumulator) + /// Arithmetic Shift Left One Bit (Memory or Accumulator) /// ASL_abs = 0x0E, @@ -52,6 +52,14 @@ enum NESInstruction : byte /// BPL = 0x10, /// + /// Arithmetic Shift Left One Bit (Memory or Accumulator) + /// + ASL_zpg_X = 0x16, + /// + /// Arithmetic Shift Left One Bit (Memory or Accumulator) + /// + ASL_abs_X = 0x1E, + /// /// Clear Carry Flag /// CLC = 0x18, @@ -109,6 +117,10 @@ enum NESInstruction : byte /// BMI = 0x30, /// + /// AND Memory with Accumulator + /// + AND_Y_ind = 0x31, + /// /// Set Carry Flag /// SEC_impl = 0x38, @@ -116,30 +128,72 @@ enum NESInstruction : byte /// AND Memory with Accumulator /// AND_Y_abs = 0x39, - //TODO: rest of them + + // 4 /// /// Return from Interrupt /// RTI_impl = 0x40, /// - /// Jump to New Location + /// XOR Memory with Accumulator /// - JMP_abs = 0x4C, + EOR_zpg = 0x45, + /// + /// Logical Shift Right One Bit (Memory or Accumulator) + /// + LSR_zpg = 0x46, /// /// Push Accumulator on Stack /// PHA_impl = 0x48, - /// - /// Logical shift right + /// XOR Memory with Accumulator + /// + EOR_imm = 0x49, + /// + /// Logical Shift Right One Bit (Memory or Accumulator) /// LSR_impl = 0x4A, + /// + /// Jump to New Location + /// + JMP_abs = 0x4C, + /// + /// XOR Memory with Accumulator + /// + EOR_abs = 0x4D, + /// + /// Logical Shift Right One Bit (Memory or Accumulator) + /// + LSR_abs = 0x4E, + + // 5 + /// + /// XOR Memory with Accumulator + /// + EOR_Y_ind = 0x51, + /// + /// XOR Memory with Accumulator + /// + EOR_zpg_X = 0x55, + /// + /// Logical Shift Right One Bit (Memory or Accumulator) + /// + LSR_zpg_X = 0x56, /// /// Exclusive-OR Memory with Accumulator /// EOR_Y_abs = 0x59, + /// + /// XOR Memory with Accumulator + /// + EOR_X = 0x5D, + /// + /// Logical Shift Right One Bit (Memory or Accumulator) + /// + LSR_abs_X = 0x5E, // 6 @@ -184,7 +238,8 @@ enum NESInstruction : byte /// ROR_abs = 0x6E, - //TODO: 7 + // 7 + /// /// Rotate One Bit Right (Memory or Accumulator) ///