From 3c6fda4b5c4175a96ac8692a6f8cb8785555a606 Mon Sep 17 00:00:00 2001 From: ry755 Date: Thu, 27 Jan 2022 16:20:17 -0800 Subject: [PATCH] fox32: Rename CPU to Cpu --- src/cpu.rs | 6 +++--- src/main.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cpu.rs b/src/cpu.rs index 2a1f71f..1bab26b 100644 --- a/src/cpu.rs +++ b/src/cpu.rs @@ -149,7 +149,7 @@ pub enum Interrupt { Request(u8), // u8 contains the interrupt vector value } -pub struct CPU { +pub struct Cpu { pub instruction_pointer: u32, pub stack_pointer: u32, @@ -162,9 +162,9 @@ pub struct CPU { pub bus: Bus, } -impl CPU { +impl Cpu { pub fn new(bus: Bus) -> Self { - CPU { + Cpu { instruction_pointer: 0xF0000000, stack_pointer: 0x02000000, register: [0; 32], diff --git a/src/main.rs b/src/main.rs index 2437689..fbadb4e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,7 +2,7 @@ pub mod cpu; pub mod mouse; -use cpu::{Bus, CPU, Memory, Interrupt, IO}; +use cpu::{Bus, Cpu, Memory, Interrupt, IO}; use mouse::Mouse; use std::convert::TryInto; @@ -219,7 +219,7 @@ fn main() { let cpu_mouse = Arc::clone(&mouse); let bus = Bus { memory, mouse: cpu_mouse }; - CPU::new(bus) + Cpu::new(bus) }; if args.len() >= 2 {