Skip to content

Commit

Permalink
rename mmu to bus
Browse files Browse the repository at this point in the history
  • Loading branch information
novoru committed Oct 14, 2020
1 parent c7b36ed commit 5cee28f
Show file tree
Hide file tree
Showing 3 changed files with 193 additions and 193 deletions.
8 changes: 4 additions & 4 deletions src/mmu.rs → src/bus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ use crate::cartridge::Cartridge;
use crate::interrupt::*;
use crate::pad::Pad;

pub struct Mmu {
pub struct Bus {
cartridge: Cartridge,
ram: Ram,
interrupt: Interrupt,
pad: Pad,
}

impl Mmu {
impl Bus {
pub fn from_cartridge(cartridge: Cartridge) -> Self {
Mmu {
Bus {
cartridge: cartridge,
ram: Ram::new(),
interrupt: Interrupt::new(),
Expand All @@ -30,7 +30,7 @@ impl Mmu {
}
}

impl Io for Mmu {
impl Io for Bus {
fn read8(&self, addr: usize) -> u8 {
match addr {
// 16kB ROM bank #0
Expand Down
Loading

0 comments on commit 5cee28f

Please sign in to comment.