From b333ae7f65c9b33bbb3bc50a05479d1dd5da4d11 Mon Sep 17 00:00:00 2001 From: Michel Heily Date: Fri, 21 Feb 2020 14:08:08 +0200 Subject: [PATCH] rustfmt Former-commit-id: a73535e556d1fb44e30927f0ab1f6238a8df8739 --- src/core/gpu/render/text.rs | 5 ++++- src/core/iodev.rs | 10 ++++++++-- src/core/sound/mod.rs | 4 ++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/core/gpu/render/text.rs b/src/core/gpu/render/text.rs index 7f2e3fe..1293e20 100644 --- a/src/core/gpu/render/text.rs +++ b/src/core/gpu/render/text.rs @@ -9,7 +9,10 @@ use crate::core::Bus; impl Gpu { pub(in super::super) fn render_reg_bg(&mut self, bg: usize) { - let (h_ofs, v_ofs) = (self.backgrounds[bg].bghofs as u32, self.backgrounds[bg].bgvofs as u32); + let (h_ofs, v_ofs) = ( + self.backgrounds[bg].bghofs as u32, + self.backgrounds[bg].bgvofs as u32, + ); let tileset_base = self.backgrounds[bg].bgcnt.char_block(); let tilemap_base = self.backgrounds[bg].bgcnt.screen_block(); let (tile_size, pixel_format) = self.backgrounds[bg].bgcnt.tile_format(); diff --git a/src/core/iodev.rs b/src/core/iodev.rs index 16dfe28..0e94be5 100644 --- a/src/core/iodev.rs +++ b/src/core/iodev.rs @@ -255,8 +255,14 @@ impl Bus for IoDevices { fn write_8(&mut self, addr: Addr, value: u8) { match addr + IO_BASE { - /* FIFO_A */ 0x0400_00A0 | 0x0400_00A1 | 0x0400_00A2 | 0x0400_00A3 => self.sound.write_fifo(0, value as i8), - /* FIFO_B */ 0x0400_00A4 | 0x0400_00A5 | 0x0400_00A6 | 0x0400_00A7 => self.sound.write_fifo(1, value as i8), + /* FIFO_A */ + 0x0400_00A0 | 0x0400_00A1 | 0x0400_00A2 | 0x0400_00A3 => { + self.sound.write_fifo(0, value as i8) + } + /* FIFO_B */ + 0x0400_00A4 | 0x0400_00A5 | 0x0400_00A6 | 0x0400_00A7 => { + self.sound.write_fifo(1, value as i8) + } _ => { let t = self.read_16(addr & !1); let t = if addr & 1 != 0 { diff --git a/src/core/sound/mod.rs b/src/core/sound/mod.rs index 75be570..a8aa575 100644 --- a/src/core/sound/mod.rs +++ b/src/core/sound/mod.rs @@ -190,12 +190,12 @@ impl SoundController { if io_addr == REG_SOUNDCNT_X { if value & bit(7) != 0 { if !self.mse { - trace!("MSE enabled!"); + info!("MSE enabled!"); self.mse = true; } } else { if self.mse { - trace!("MSE disabled!"); + info!("MSE disabled!"); self.mse = false; } }