improved de6502 - needs to write to disk instead of cli
This commit is contained in:
@@ -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
@@ -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
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user