On Thu, Apr 26, 2012 at 07:36:34AM +0200, "André Fachat" wrote: >On the other hand, changing the memory at the right time is tough. The >PET only has a single interrupt on the vertical blank, and from there >it is only counting cycles. Can the 6522 VIA generate interrupts? Even if it cannot, you could use the VIA timers to simplify the cycle-counting. The VIC-20 does not have any video interrupt whatsoever, but the raster line register is readable. This makes it possible to synchronize a 6522 timer interrupt with the screen. You first need a loop that gets the rough timing right (some CPU cycles of jitter, corresponding to the difference between minimum and maximum number of cycles per instruction). Then you need a fine-tuning loop that would detect the exact cycle when the scan line is advancing. On the PET, if there is no readable raster line counter in the 6545, I guess you would need a trick that uses the IRQ line for determining when exactly the vertical blank interrupt is being triggered. Then, you would set up some sort of a delay loop in the "main program" and wait for N more vertical-retrace interrupts to eliminate the horizontal jitter. Best regards, Marko Message was sent through the cbm-hackers mailing listReceived on 2012-04-26 06:00:48
Archive generated by hypermail 2.2.0.