feat: stub 0xFF05
This commit is contained in:
parent
15da6cb7d2
commit
fe586d77ac
|
@ -123,6 +123,7 @@ impl Bus {
|
||||||
0xFF00 => self.joypad.status.into(),
|
0xFF00 => self.joypad.status.into(),
|
||||||
0xFF01 => self.serial.next,
|
0xFF01 => self.serial.next,
|
||||||
0xFF02 => self.serial.control.into(),
|
0xFF02 => self.serial.control.into(),
|
||||||
|
0xFF05 => self.timer.counter,
|
||||||
0xFF07 => self.timer.control.into(),
|
0xFF07 => self.timer.control.into(),
|
||||||
0xFF0F => self.interrupt_flag().into(),
|
0xFF0F => self.interrupt_flag().into(),
|
||||||
0xFF11 => self.sound.ch1.sound_duty.into(),
|
0xFF11 => self.sound.ch1.sound_duty.into(),
|
||||||
|
@ -209,6 +210,7 @@ impl Bus {
|
||||||
0xFF00 => self.joypad.status = byte.into(),
|
0xFF00 => self.joypad.status = byte.into(),
|
||||||
0xFF01 => self.serial.next = byte,
|
0xFF01 => self.serial.next = byte,
|
||||||
0xFF02 => self.serial.control = byte.into(),
|
0xFF02 => self.serial.control = byte.into(),
|
||||||
|
0xFF05 => self.timer.counter = byte.into(),
|
||||||
0xFF07 => self.timer.control = byte.into(),
|
0xFF07 => self.timer.control = byte.into(),
|
||||||
0xFF0F => self.set_interrupt_flag(byte),
|
0xFF0F => self.set_interrupt_flag(byte),
|
||||||
0xFF11 => self.sound.ch1.sound_duty = byte.into(),
|
0xFF11 => self.sound.ch1.sound_duty = byte.into(),
|
||||||
|
|
|
@ -5,6 +5,7 @@ use crate::instruction::Cycles;
|
||||||
#[derive(Debug, Clone, Copy)]
|
#[derive(Debug, Clone, Copy)]
|
||||||
pub struct Timer {
|
pub struct Timer {
|
||||||
pub control: TimerControl,
|
pub control: TimerControl,
|
||||||
|
pub counter: u8,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Timer {
|
impl Timer {
|
||||||
|
@ -16,7 +17,8 @@ impl Timer {
|
||||||
impl Default for Timer {
|
impl Default for Timer {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
control: 0x00.into(),
|
control: Default::default(),
|
||||||
|
counter: 0,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue