diff --git a/src/processor/apu.rs b/src/processor/apu.rs deleted file mode 100644 index bb95584..0000000 --- a/src/processor/apu.rs +++ /dev/null @@ -1,7 +0,0 @@ -pub(super) struct Apu {} - -impl Apu { - pub(super) fn init() -> Self { - Self {} - } -} diff --git a/src/processor/memory/mmio/apu.rs b/src/processor/memory/mmio/apu.rs new file mode 100644 index 0000000..6c057ce --- /dev/null +++ b/src/processor/memory/mmio/apu.rs @@ -0,0 +1,7 @@ +pub struct Apu {} + +impl Apu { + fn init() -> Self { + Self {} + } +} diff --git a/src/processor/memory/mmio/mod.rs b/src/processor/memory/mmio/mod.rs index db3b2c8..1b205fc 100644 --- a/src/processor/memory/mmio/mod.rs +++ b/src/processor/memory/mmio/mod.rs @@ -1,2 +1,4 @@ +mod apu; mod joypad; +pub use apu::Apu; pub use joypad::{Joypad, JoypadBank}; diff --git a/src/processor/mod.rs b/src/processor/mod.rs index 8b7e615..b064df3 100644 --- a/src/processor/mod.rs +++ b/src/processor/mod.rs @@ -1,4 +1,4 @@ -use self::{apu::Apu, gpu::Gpu, memory::Memory, timer::Timers}; +use self::{gpu::Gpu, memory::Memory, timer::Timers}; use crate::{ util::{clear_bit, get_bit}, verbose_println, @@ -6,7 +6,6 @@ use crate::{ use gilrs::Gilrs; use minifb::Window; -mod apu; pub mod gpu; mod instructions; pub mod memory; @@ -36,7 +35,6 @@ pub struct Cpu { halted: bool, timers: Timers, gamepad_handler: Gilrs, - apu: Apu, } // Hz @@ -64,7 +62,6 @@ impl Cpu { halted: false, timers: Timers::init(), gamepad_handler, - apu: Apu::init(), } }