improved de6502 - needs to write to disk instead of cli

This commit is contained in:
2025-07-09 08:11:49 -04:00
parent 8c08555003
commit a5042383c9
11 changed files with 552 additions and 13 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ impl Instruction {
pub fn opinfo(bytes: &[u8]) -> Option<OpInfo> {
trace!("DECODING : {bytes:?}");
let opcode = bytes.get(0).copied()?;
Some(INSTRUCTION_TABLE[opcode as usize])?
Some(INSTRUCTION_TABLE[opcode as usize].clone())?
}
pub fn decode(bytes: &[u8]) -> Option<Instruction> {
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -67,7 +67,7 @@ impl Default for Mos6502Cpu {
mode: AddressMode::Implied,
operand: Operand::None,
},
oi: INSTRUCTION_TABLE[ISA_OP_NOP as usize].unwrap(),
oi: INSTRUCTION_TABLE[ISA_OP_NOP as usize].clone().unwrap(),
has_reset: false,
iv: 0xfffe,
cycle_carry: 0x0000,
+5 -2
View File
@@ -1,7 +1,7 @@
use crate::address_mode::AddressMode;
use crate::operation::Operation;
#[derive(Debug, Copy, Clone)]
#[derive(Debug, Clone)]
pub struct OpInfo {
/// What is the operation
pub operation: Operation,
@@ -11,4 +11,7 @@ pub struct OpInfo {
pub length: u8,
/// CPU Cycles to complete the instruction
pub cycles: u8,
}
/// Format string for disassembly
pub format_prefix: &'static str,
pub format_postfix: &'static str
}