chips icon indicating copy to clipboard operation
chips copied to clipboard

c64: glitchy video in "Daah, Those Acid Pills!" demo by Censor Design

Open nurpax opened this issue 6 years ago • 1 comments

You can see pretty clear glitches in this demo using the C64 clock stepped emulator. (not sure how to explain how they look like, I think it'll be obvious if you try running it) Tried in both my own emulator build and using the tiny emulators web page.

https://csdb.dk/release/?id=118639

I have not tried this on any older emulator versions, maybe it's been bugged before.

VICE and real HW works fine on this .prg.

I wonder if I can somehow help debugging this? I'm pretty sure this demo uses VSP at least.. I guess that's pretty timing sensitive.

nurpax avatar Dec 28 '19 21:12 nurpax

Yep, known issue :) I'm pretty sure this is because of timing issues in the VIC-II emulation. I only recently discovered the VIC-II tests from the VICE emulator (https://vice-emu.pokefinder.org/index.php/Testbench), and they're currently red all over the place.

Some 'suspicions' I have:

  • frame might be one rasterline short
  • the first rasterline is a special case (I think at least the raster interrupt is one cycle late), this is currently not emulated
  • I've seen some strange "variance" in places where the CPU and VIC-II tick should be "stable" synchronized with each other between frames, it almost looks like the "jittering" in the acid-pills demo.
  • sprites have various issues where they are switched off when near the screen border (not relevant for the scrolling in this demo though I think)

One debugging strategy is to use the Dear ImGui VIC-II debugging window, enable "debug view", stop execution in the CPU debugger, and use one of the raster-related breakpoints to step near an interesting "area" on the screen.

Currently stepping only works per instruction, not per cycle. In this case cycle-stepping would be really useful.

Screen Shot 2019-12-31 at 12 59 27 PM

floooh avatar Dec 31 '19 12:12 floooh