Skip to content

Commit

Permalink
CRTC: add explanatory comment about ycounter.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.code.sf.net/p/vice-emu/code/trunk@45222 379a1393-f5fb-40a0-bcee-ef074d9b53f7
  • Loading branch information
Rhialto committed Jul 13, 2024
1 parent 1661d1b commit 8973968
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions vice/src/crtc/crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,14 @@ static void crtc_raster_draw_alarm_handler(CLOCK offset, void *data)
}
crtc.frame_start = crtc.rl_start;
} else {
/* It could be argued that because of this increment, which
* also happens if we just left the first VTOTAL text lines
* and ycounter has been made 0, that ycounter counts
* differently in this area (effectively starting at 1 when
* in the "top scanline" of the VTOTALADJust area).
* However, I think that effectively nothing cares about
* that since this is not a drawing part of the video.
*/
crtc.raster.ycounter++;
crtc.raster.ycounter &= 0x1f;
}
Expand Down Expand Up @@ -855,7 +863,7 @@ static void crtc_raster_draw_alarm_handler(CLOCK offset, void *data)
}
#endif /* CRTC_BEAM_RACING */
}
/*
#ifdef DEBUG_CRTC
if (crtc.venable && !new_venable)
printf("disable ven, cl=%d, yc=%d, rl=%d\n",
crtc.current_charline, crtc.raster.ycounter,
Expand All @@ -864,8 +872,6 @@ static void crtc_raster_draw_alarm_handler(CLOCK offset, void *data)
printf("enable ven, cl=%d, yc=%d, rl=%d\n",
crtc.current_charline, crtc.raster.ycounter,
crtc.raster.current_line);
*/
/*
if (crtc.vsync && !new_vsync)
printf("disable vsync, cl=%d, yc=%d, rl=%d\n",
crtc.current_charline, crtc.raster.ycounter,
Expand All @@ -874,7 +880,8 @@ static void crtc_raster_draw_alarm_handler(CLOCK offset, void *data)
printf("enable vsync, cl=%d, yc=%d, rl=%d\n",
crtc.current_charline, crtc.raster.ycounter,
crtc.raster.current_line);
*/
#endif /* DEBUG_CRTC */

if (crtc.venable && !new_venable) {
/* visible area ends here - try to compute vertical centering */
/* FIXME: count actual number of rasterlines */
Expand Down

0 comments on commit 8973968

Please sign in to comment.