Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nurpax opened this issue Dec 28, 2019 · 1 comment
Open

Comments

@nurpax
Copy link

nurpax commented Dec 28, 2019

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 nurpax changed the title glitchy video in "Daah, Those Acid Pills!" demo by Censor Design c64: glitchy video in "Daah, Those Acid Pills!" demo by Censor Design Dec 28, 2019
@floooh
Copy link
Owner

floooh commented Dec 31, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants