Skip to content

Commit

Permalink
Print instructions...
Browse files Browse the repository at this point in the history
  • Loading branch information
mateodif committed Jun 18, 2023
1 parent de81071 commit f2932f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ fn main() {
Some(instruction) => instruction,
_ => chip.fetch()
};

println!("{:?}", instruction);

for event in events.poll_iter() {
match instruction {
Instruction::DrawSprite { register1, register2, nibble } => {
Expand Down Expand Up @@ -112,6 +115,6 @@ fn main() {
canvas.present();

// 60 FPS
std::thread::sleep(std::time::Duration::new(0, 1_000_000_000u32 / 20));
std::thread::sleep(std::time::Duration::new(0, 1_000_000_000u32 / 60));
}
}

0 comments on commit f2932f7

Please sign in to comment.