mirror of
https://github.com/mre/mos6502.git
synced 2024-11-28 22:51:26 +00:00
ran clippy and renamed main.rs to mos6502.rs
This commit is contained in:
parent
d5e9281969
commit
ddfb3a3b29
@ -410,13 +410,10 @@ impl CPU {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn run(&mut self) {
|
pub fn run(&mut self) {
|
||||||
loop {
|
while let Some(decoded_instr) = self.fetch_next_and_decode() {
|
||||||
if let Some(decoded_instr) = self.fetch_next_and_decode() {
|
|
||||||
self.execute_instruction(decoded_instr);
|
self.execute_instruction(decoded_instr);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn set_flags_from_i8(status: &mut Status, value: i8) {
|
fn set_flags_from_i8(status: &mut Status, value: i8) {
|
||||||
|
@ -58,17 +58,17 @@ impl StatusArgs {
|
|||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
pub struct Status: u8 {
|
pub struct Status: u8 {
|
||||||
const PS_NEGATIVE = 0b10000000;
|
const PS_NEGATIVE = 0b1000_0000;
|
||||||
const PS_OVERFLOW = 0b01000000;
|
const PS_OVERFLOW = 0b0100_0000;
|
||||||
const PS_UNUSED = 0b00100000; // JAM: Should this exist?
|
const PS_UNUSED = 0b0010_0000; // JAM: Should this exist?
|
||||||
// (note that it affects the
|
// (note that it affects the
|
||||||
// behavior of things like
|
// behavior of things like
|
||||||
// from_bits_truncate)
|
// from_bits_truncate)
|
||||||
const PS_BRK = 0b00010000;
|
const PS_BRK = 0b0001_0000;
|
||||||
const PS_DECIMAL_MODE = 0b00001000;
|
const PS_DECIMAL_MODE = 0b0000_1000;
|
||||||
const PS_DISABLE_INTERRUPTS = 0b00000100;
|
const PS_DISABLE_INTERRUPTS = 0b0000_0100;
|
||||||
const PS_ZERO = 0b00000010;
|
const PS_ZERO = 0b0000_0010;
|
||||||
const PS_CARRY = 0b00000001;
|
const PS_CARRY = 0b0000_0001;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user