Skip to content

Commit

Permalink
only allow dead code when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
bfsgr committed Jul 31, 2020
1 parent c67ee93 commit bde9ce6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/emulator/bus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ impl Bus {
0xA000 ..= 0xBFFF => Module::Cartrigbe,
0xC000 ..= 0xFDFF => Module::Memory,
0xFE00 ..= 0xFE9F => Module::GPU,
0xFEA0 ..= 0xFEFF => Module::Memory,
0xFEA0 ..= 0xFEFF => Module::Unusable,
TMA | TIMA | DIV | TAC => Module::Timer,
0xFF00 ..= 0xFF7F => Module::IO,
0xFF80 ..= 0xFFFE => Module::Memory,
Expand Down
1 change: 1 addition & 0 deletions src/emulator/interrupt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ impl Default for EI {


#[derive(Copy, Clone, PartialEq)]
#[allow(dead_code)] //Serial will be used when we implement it
pub enum Interrupt {
VBlank,
LCDC,
Expand Down
2 changes: 2 additions & 0 deletions src/emulator/io_constants.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(dead_code)] //unused constants will be used when sound is implemented

pub const JOYP: u16 = 0xFF00; // Joypad info

pub const SB: u16 = 0xFF01; // Serial transfer data
Expand Down
4 changes: 1 addition & 3 deletions src/emulator/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#![allow(dead_code)]

mod cpu;
mod gpu;
mod memory;
Expand Down Expand Up @@ -143,7 +141,7 @@ impl Gameboy {
return 4;
}
}

pub fn insert(&mut self, file_name: String){
self.bus.insert_cartrigbe(file_name);
}
Expand Down

0 comments on commit bde9ce6

Please sign in to comment.