chore: remove imports of tracing macros
This commit is contained in:
parent
1526b4a09d
commit
548945a4ee
|
@ -1,7 +1,6 @@
|
|||
use crate::bus::BusIo;
|
||||
use crate::emu::SM83_CLOCK_SPEED;
|
||||
use gen::SampleProducer;
|
||||
use tracing::warn;
|
||||
use types::ch1::{Sweep, SweepDirection};
|
||||
use types::ch3::Volume as Ch3Volume;
|
||||
use types::ch4::{CounterWidth, Frequency as Ch4Frequency, PolynomialCounter};
|
||||
|
@ -55,7 +54,7 @@ impl BusIo for Apu {
|
|||
0x26 => self.ctrl.status(self),
|
||||
0x30..=0x3F => self.ch3.read_byte(addr),
|
||||
_ => {
|
||||
warn!("Attempted read from {:#06X}", addr);
|
||||
tracing::warn!("Attempted read from {:#06X}", addr);
|
||||
0xFF
|
||||
}
|
||||
}
|
||||
|
@ -86,7 +85,7 @@ impl BusIo for Apu {
|
|||
0x26 => self.set_status(byte),
|
||||
0x30..=0x3F => self.ch3.write_byte(addr, byte),
|
||||
_ if !self.ctrl.enabled => {}
|
||||
_ => warn!("Attempted write of {:#04X} to {:#06X}", byte, addr),
|
||||
_ => tracing::warn!("Attempted write of {:#04X} to {:#06X}", byte, addr),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
use tracing::warn;
|
||||
|
||||
use crate::apu::Apu;
|
||||
use crate::cartridge::Cartridge;
|
||||
use crate::high_ram::HighRam;
|
||||
|
@ -264,7 +262,7 @@ impl BusIo for Bus {
|
|||
0x4B => self.ppu.pos.window_x,
|
||||
0x4F => 0xFF, // CGB VRAM Bank Select
|
||||
_ => {
|
||||
warn!("Attempted read from {:#06X} on IO", addr);
|
||||
tracing::warn!("Attempted read from {:#06X} on IO", addr);
|
||||
0xFF
|
||||
}
|
||||
}
|
||||
|
@ -381,7 +379,7 @@ impl BusIo for Bus {
|
|||
}
|
||||
}
|
||||
0x70 => {} // CGB WRAM Bank Select
|
||||
_ => warn!("Attempted write of {:#04X} to {:#06X} on IO", byte, addr),
|
||||
_ => tracing::warn!("Attempted write of {:#04X} to {:#06X} on IO", byte, addr),
|
||||
};
|
||||
}
|
||||
0xFF80..=0xFFFE => {
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
use tracing::{info, warn};
|
||||
|
||||
use crate::bus::BusIo;
|
||||
|
||||
const RAM_SIZE_ADDRESS: usize = 0x0149;
|
||||
|
@ -18,7 +16,7 @@ pub(crate) struct Cartridge {
|
|||
impl Cartridge {
|
||||
pub(crate) fn new(memory: Vec<u8>) -> Self {
|
||||
let title = Self::find_title(&memory);
|
||||
info!("Title: {:?}", title);
|
||||
tracing::info!("Title: {:?}", title);
|
||||
|
||||
Self {
|
||||
mbc: Self::detect_mbc(&memory),
|
||||
|
@ -42,9 +40,9 @@ impl Cartridge {
|
|||
let ram_cap = ram_size.capacity();
|
||||
let rom_cap = rom_size.capacity();
|
||||
|
||||
info!("RAM size: {} bytes", ram_cap);
|
||||
info!("ROM size: {} bytes", rom_size.capacity());
|
||||
info!("MBC kind: {:?}", mbc_kind);
|
||||
tracing::info!("RAM size: {} bytes", ram_cap);
|
||||
tracing::info!("ROM size: {} bytes", rom_size.capacity());
|
||||
tracing::info!("MBC kind: {:?}", mbc_kind);
|
||||
|
||||
match mbc_kind {
|
||||
MBCKind::None => Box::new(NoMBC),
|
||||
|
@ -604,7 +602,7 @@ impl MBCIo for NoMBC {
|
|||
}
|
||||
|
||||
fn handle_write(&mut self, _: u16, byte: u8) {
|
||||
warn!("Attempted write of {:#04X} to cartridge w/out MBC", byte);
|
||||
tracing::warn!("Attempted write of {:#04X} to cartridge w/out MBC", byte);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ use gb::{Cycle, GB_HEIGHT, GB_WIDTH};
|
|||
use gilrs::Gilrs;
|
||||
use pixels::{PixelsBuilder, SurfaceTexture};
|
||||
use rodio::{OutputStream, Sink};
|
||||
use tracing::info;
|
||||
use tracing_subscriber::EnvFilter;
|
||||
use winit::dpi::{LogicalSize, PhysicalSize};
|
||||
use winit::event::{Event, VirtualKeyCode};
|
||||
|
@ -69,7 +68,7 @@ fn main() -> Result<()> {
|
|||
emu.try_load_sav().expect("Load save if exists");
|
||||
let rom_title = emu.title();
|
||||
|
||||
info!("Initialize Gamepad");
|
||||
tracing::info!("Initialize Gamepad");
|
||||
let mut gamepad = Gilrs::new().expect("Initialize Controller Support");
|
||||
|
||||
// Initialize GUI
|
||||
|
@ -100,7 +99,7 @@ fn main() -> Result<()> {
|
|||
|
||||
emu.set_prod(prod);
|
||||
|
||||
info!("Spawn Audio Thread");
|
||||
tracing::info!("Spawn Audio Thread");
|
||||
std::thread::spawn(move || {
|
||||
sink.sleep_until_end();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue