diff --git a/src/main.rs b/src/main.rs index d40b37a..e99ff6b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -57,8 +57,10 @@ fn main() bus.write(0xFFFC, (addr & 0x00FF) as u8); // low byte bus.write(0xFFFD, ((addr & 0xFF00) >> 8) as u8); // high byte + /////////////////////////////// // write the program to memory - + ////////////////////////////// + // LDA #9 bus.write(addr, 0xA9); // LDA - Immediate mode bus.write(addr + 1, 0x09); // Argument @@ -67,6 +69,10 @@ fn main() bus.write(addr + 2, 0x09); // ORA - Immediate mode bus.write(addr + 3, 0x02); // Argument + //////////////////// + // Run the program! + //////////////////// + // Restart cpu cpu.reset(&mut bus); diff --git a/src/r6502/addressing_modes.rs b/src/r6502/addressing_modes.rs index 57635c2..3b0f86b 100644 --- a/src/r6502/addressing_modes.rs +++ b/src/r6502/addressing_modes.rs @@ -1,4 +1,5 @@ +#![allow(dead_code, non_snake_case)] use super::{R6502, Bus}; diff --git a/todo/todo.todo b/todo/todo.todo new file mode 100644 index 0000000..9e3671d --- /dev/null +++ b/todo/todo.todo @@ -0,0 +1,92 @@ + +General: + ☐ Fully implement clock cycle tracking + +Addressing modes: + ☐ IMP - Implied + ✔ IMM - Immediate @done(23-11-06 19:01) + ☐ ZP0 - Zero Page + ☐ ZPX - Zero Page, X + ☐ ZPY - Zero Page, Y + ☐ REL - Relative + ☐ ABS - Absolute + ☐ ABX - Absolute, X + ☐ ABY - Absolute, Y + ☐ IND - Indirect + ☐ IZX - Indirect, X + ☐ IZY - Indirect, Y + +Instructions: + GROUP ONE: + ✔ 000 ORA @done(23-11-06 18:55) + ☐ 001 AND + ☐ 010 EOR + ☐ 011 ADC + ☐ 100 STA + ✔ 101 LDA @done(23-11-06 18:55) + ☐ 110 CMP + ☐ 111 SBC + + GROUP TWO: + ☐ 000 ASL + ☐ 001 ROL + ☐ 010 LSR + ☐ 011 ROR + ☐ 100 STX + ☐ 101 LDX + ☐ 110 DEC + ☐ 111 INC + + GROUP THREE: + ☐ 001 BIT + ☐ 010 JMP + ☐ 011 JMP (abs) + ☐ 100 STY + ☐ 101 LDY + ☐ 110 CPY + ☐ 111 CPX + + CONDITIONALS: + ☐ 10 BPL + ☐ 30 BMI + ☐ 50 BVC + ☐ 70 BVS + ☐ 90 BCC + ☐ B0 BCS + ☐ D0 BNE + ☐ F0 BEQ + + INTERRUPT/SUBROUTINE: + ☐ 00 BRK + ☐ 20 JSR abs + ☐ 40 RTI + ☐ 60 RTS + + SINGLE-BYTE: + ☐ 08 PHP + ☐ 28 PLP + ☐ 48 PHA + ☐ 68 PLA + ☐ 88 DEY + ☐ A8 TAY + ☐ C8 INY + ☐ E8 INX + + ☐ 18 CLC + ☐ 38 SEC + ☐ 58 CLI + ☐ 78 SEI + ☐ 98 TYA + ☐ B8 CLV + ☐ D8 CLD + ☐ F8 SED + + ☐ 8A TXA + ☐ 9A TXS + ☐ AA TAX + ☐ BA TSX + ☐ CA DEX + ☐ EA NOP + + +