POT sampling is not emulated correctly
Versatile Commodore Emulator
Brought to you by:
blackystardust,
gpz
The POT values are currently "too stable", not only should they jitter a little bit (at least bit 0), but the values read should also produce significantly wrong (too large) values, when the sampling happens close after switch the joystick port via $dc00. This can be observed eg when reading the values without disabling the system irq (which uses $dc00 for the keyboard scanner)
added a test program: https://sourceforge.net/p/vice-emu/code/HEAD/tree/testprogs/SID/paddlescope/
also partial fix (lsb jitter) in r45726
r45727 should fix the different jitter of paddles vs 1351
https://sourceforge.net/p/vice-emu/code/34291/ is a similar program for the vic20, totally forgot about this
https://www.youtube.com/watch?v=0-UvoEhAEIs shows it on the real thing. Note the really odd way the sample error changes >_<
Last edit: gpz 2025-08-07
r45729 adds the glitchy values when switching control ports. not really accurate at all, but should do the trick for all practical purposes
r45731 adds dependency on display dma on vic20
i consider this done for now - for more accurate emulation we need better/more detailed tests