/// Does one operational tick of the CPU. Returns true if there are more
/// instructions, and false if a KIL operation was encountered.
Does one operational tick of the CPU. Returns true if there are more
instructions, and false if a KIL operation was encountered.
Does one operational tick of the CPU . Returns true if there are more instructions and false if a KIL operation was encountered .
pub fn tick(&mut self) -> bool {
        self.tick_count += 1;
        self.cycles = 0;
        let opcode = self.next_u8();
        if opcode == OpCode::KIL as u8 {
            return false;
        }
        let opcode_index = opcode as usize;
        // The operations are all contained in tables that match up the opcode to its
        // particular implementation details.
        self.cycles += opcodes::CYCLES_TABLE[opcode_index];
        let operation_fn = opcodes::OPERATION_FN_TABLE[opcode_index];
        let mode = opcodes::ADDRESSING_MODE_TABLE[opcode_index];
        let extra_cycles = opcodes::EXTRA_CYCLES_TABLE[opcode_index];
        operation_fn(self, mode, extra_cycles);
        true
    }
pub fn tick ( & mut self ) -> bool { self . tick_count += 1 ; self . cycles = 0 ; let opcode = self . next_u8 ( ) ; if opcode == OpCode :: KIL as u8 { return false ; } let opcode_index = opcode as usize ; // The operations are all contained in tables that match up the opcode to its // particular implementation details. self . cycles += opcodes :: CYCLES_TABLE [ opcode_index ] ; let operation_fn = opcodes :: OPERATION_FN_TABLE [ opcode_index ] ; let mode = opcodes :: ADDRESSING_MODE_TABLE [ opcode_index ] ; let extra_cycles = opcodes :: EXTRA_CYCLES_TABLE [ opcode_index ] ; operation_fn ( self , mode , extra_cycles ) ; true }
Does one operational tick of the CPU.
Does one operational tick of the CPU .
&mut self