Thread: Cycle-exact
View Single Post
Old 13 January 2019, 00:08   #2
Going nowhere

Galahad/FLT's Avatar
Join Date: Oct 2001
Location: United Kingdom
Age: 46
Posts: 7,466
Originally Posted by MarkW View Post
Hi y'all

Thank's for a great board. I'm just learning Amiga assembly and I'm puzzled about cycle-exact in WinUAE.

I have this program
move.w    #$4000, $DFF09A
move.w    #$03A0, $DFF096
move.w    $DFF006, $DFF180  ; Set background color to VHPOSR
btst      #6, $BFE001       ; Check left mouse button 
bne.s     loop              ; If not pressed go to loop
move.w    #$83A0, $DFF096
move.w    #$C000, $DFF09A
The program produces the output shown below. The background color changes, because the VHPOSR is written into $DFF180 - color table 0, which is the background color.

When I turn on cycle-exact, the background starts to flicker, and I wonder why that is - Any ideas?

It's run on an Amiga 500 - kickstart 1.3 - in WinUAE of course ;-). The resolution is hires PAL. (640x512?) and the clock frequency is 7.14 MHz, so it's around 23 cycles per pixel. If that's roughly 23 instructions pr pixel, then there should be plenty of time to push VHPOSR into DFF180 in the loop. Should the flickering not be avoided then?
If you're in 640x512 mode you must be in Hires Interlace, and the flickering is probably as it switches over to another copperlist to display the alternating interlace display.
Galahad/FLT is online now  
Page generated in 0.04175 seconds with 11 queries