further improved JiffyDOS badline avoidance

This commit is contained in:
FeralChild64 committed 2019-11-27 19:08:04 +01:00
1 parent 3d9e6a4ee2
commit 95460f34da
1 file changed
+5 -2
+5 -2
View File
@@ -192,15 +192,18 @@ jiffydos_wait_line:
beq jiffydos_wait_line_done // screen is disabled, no need to watch for badlines
// Avoid 2 lines before the badline, otherwise VIC will ruin the synchronization
!:
sec
lda VIC_RASTER
cmp #$2E
bcc jiffydos_wait_line_done // we are safe, border - lot of time till badline
!:
lda VIC_RASTER // carry is definitely set here!
sbc VIC_SCROLY
and #$07 // we want 8 lowest bits
cmp #$06
bcs !-
jiffydos_wait_line_done:
rts