neophob / wpc-emu

Williams Pinball machine emulator, Play it @
https://playfield.dev
Apache License 2.0
70 stars 12 forks source link

White Water: DMD jitter #33

Closed neophob closed 5 years ago

neophob commented 5 years ago

the DMD flickers for WW. I guess the source of this issue is here in the dmd code:

    //TODO ripped from pinmame, I dont really understand this
    const magicScanline = parseInt(this.ram[OP.WPC_DMD_SCANLINE] / 8, 10);
    //TODO WHITE WATER FLICKERS
    if ((this.scanline % 4) === magicScanline && this.scanline > 0 && this.scanline < 0x1F) {
      this.interruptCallback.firqFromDmd();
    }
  }

now if this.interruptCallback.firqFromDmd() is called, this function is executed:

        this.asic.firqSourceDmd(true);
        this.cpu.firq();

now if firq is not triggered because of the irq masking, a flicker appears

neophob commented 5 years ago

fixed with v0.22.2