A GameCube/Wii emulator and debugger written in Rust.
these actually seem to not be w1c, bug was an anomaly that had a different cause (see previous fixes)
Layle0afa6394d519
diff --git a/crates/gekko/src/flipper/vi/regs.rs b/crates/gekko/src/flipper/vi/regs.rsindex 76165be..1fe2e3d 100644--- a/crates/gekko/src/flipper/vi/regs.rs+++ b/crates/gekko/src/flipper/vi/regs.rs@@ -200,19 +200,10 @@ crate::mmio_register! {}}-// clears on writing 1 for DI register INT bit-fn write_di<T: MmioRegister + Copy>(current: T, new: T) -> T {- const INT_BIT: u32 = 1 << 31;- let cur_raw = current.to_raw();- let new_raw = new.to_raw();- let int_bit = if new_raw & INT_BIT != 0 { 0 } else { cur_raw & INT_BIT };- T::from_raw((new_raw & !INT_BIT) | int_bit)-}-// 0xCC002030 4 R/W DI0 - Display Interrupt 0crate::mmio_register! {- DisplayInterrupt0: u32 @ 0xCC002030 {+ DisplayInterrupt0: u32 @ 0xCC002030 => Vi.di0 {#[bits(0..=9, alias = "hct")] pub horizontal_count: u16,#[bits(16..=25, alias = "vct")] pub vertical_count: u16,#[bits(28, alias = "enb")] pub enable: bool,@@ -220,19 +211,10 @@ crate::mmio_register! {}}-impl MmioAccess<Vi> for DisplayInterrupt0 {- fn read(dev: &Vi) -> Self {- dev.di0- }- fn write(self, dev: &mut Vi) {- dev.di0 = write_di(dev.di0, self);- }-}-// 0xCC002034 4 R/W DI1 - Display Interrupt 1crate::mmio_register! {- DisplayInterrupt1: u32 @ 0xCC002034 {+ DisplayInterrupt1: u32 @ 0xCC002034 => Vi.di1 {#[bits(0..=9, alias = "hct")] pub horizontal_count: u16,#[bits(16..=25, alias = "vct")] pub vertical_count: u16,#[bits(28, alias = "enb")] pub enable: bool,@@ -240,19 +222,10 @@ crate::mmio_register! {}}-impl MmioAccess<Vi> for DisplayInterrupt1 {- fn read(dev: &Vi) -> Self {- dev.di1- }- fn write(self, dev: &mut Vi) {- dev.di1 = write_di(dev.di1, self);- }-}-// 0xCC002038 4 R/W DI2 - Display Interrupt 2crate::mmio_register! {- DisplayInterrupt2: u32 @ 0xCC002038 {+ DisplayInterrupt2: u32 @ 0xCC002038 => Vi.di2 {#[bits(0..=9, alias = "hct")] pub horizontal_count: u16,#[bits(16..=25, alias = "vct")] pub vertical_count: u16,#[bits(28, alias = "enb")] pub enable: bool,@@ -260,19 +233,10 @@ crate::mmio_register! {}}-impl MmioAccess<Vi> for DisplayInterrupt2 {- fn read(dev: &Vi) -> Self {- dev.di2- }- fn write(self, dev: &mut Vi) {- dev.di2 = write_di(dev.di2, self);- }-}-// 0xCC00203C 4 R/W DI3 - Display Interrupt 3crate::mmio_register! {- DisplayInterrupt3: u32 @ 0xCC00203C {+ DisplayInterrupt3: u32 @ 0xCC00203C => Vi.di3 {#[bits(0..=9, alias = "hct")] pub horizontal_count: u16,#[bits(16..=25, alias = "vct")] pub vertical_count: u16,#[bits(28, alias = "enb")] pub enable: bool,@@ -280,15 +244,6 @@ crate::mmio_register! {}}-impl MmioAccess<Vi> for DisplayInterrupt3 {- fn read(dev: &Vi) -> Self {- dev.di3- }- fn write(self, dev: &mut Vi) {- dev.di3 = write_di(dev.di3, self);- }-}-// 0xCC002040 4 R/W DL0 - Display Latch 0crate::mmio_register! {diff --git a/crates/gekko/src/gekko.rs b/crates/gekko/src/gekko.rsindex d9ab400..622fa44 100644--- a/crates/gekko/src/gekko.rs+++ b/crates/gekko/src/gekko.rs@@ -118,12 +118,6 @@ impl Gekko {self.vi.half_line_scheduled = false;self.maybe_schedule_vi_half_line();self.check_vi_interrupts();- // TODO: clear DI INT bits after propagation so they- // dont reassert INTSR.Vi on every subsequent halfline?- self.vi.di0.set_interrupt(false);- self.vi.di1.set_interrupt(false);- self.vi.di2.set_interrupt(false);- self.vi.di3.set_interrupt(false);}}}