rustfmt
Former-commit-id: a73535e556d1fb44e30927f0ab1f6238a8df8739
This commit is contained in:
parent
0476342278
commit
b333ae7f65
|
@ -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();
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue