Revision: 45711
http://sourceforge.net/p/vice-emu/code/45711
Author: rhialto
Date: 2025-07-14 19:12:34 +0000 (Mon, 14 Jul 2025)
Log Message:
-----------
PET, HRE: small fix: we need a vertical screen size of 256 pixels, otherwise the bottom few scan lines get cut off in HRE mode.
Modified Paths:
--------------
trunk/vice/src/crtc/crtc.c
trunk/vice/src/pet/pet.c
trunk/vice/src/pet/pethre.c
Modified: trunk/vice/src/crtc/crtc.c
===================================================================
--- trunk/vice/src/crtc/crtc.c 2025-06-30 22:43:43 UTC (rev 45710)
+++ trunk/vice/src/crtc/crtc.c 2025-07-14 19:12:34 UTC (rev 45711)
@@ -401,7 +401,7 @@
crtc.screen_width = (num_cols + CRTC_EXTRA_COLS) * 8 + 2 * CRTC_SCREEN_BORDERWIDTH;
crtc.screen_height = rasterlines + CRTC_EXTRA_RASTERLINES + 2 * CRTC_SCREEN_BORDERHEIGHT;
- DBG(("crtc_set_screen_options: cols=%d, rl=%d -> w=%d, h=%d",
+ DBG(("crtc_set_screen_options: cols=%d, rl=%d -> w=%u, h=%u",
num_cols, rasterlines, crtc.screen_width, crtc.screen_height));
crtc_update_window();
@@ -869,19 +869,19 @@
}
#ifdef DEBUG_CRTC
if (crtc.venable && !new_venable)
- printf("disable ven, cl=%d, yc=%d, rl=%d\n",
+ printf("disable ven, cl=%d, yc=%u, rl=%u\n",
crtc.current_charline, crtc.raster.ycounter,
crtc.raster.current_line);
if (new_venable && !crtc.venable)
- printf("enable ven, cl=%d, yc=%d, rl=%d\n",
+ printf("enable ven, cl=%d, yc=%u, rl=%u\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",
+ printf("disable vsync, cl=%d, yc=%u, rl=%u\n",
crtc.current_charline, crtc.raster.ycounter,
crtc.raster.current_line);
if (new_vsync && !crtc.vsync)
- printf("enable vsync, cl=%d, yc=%d, rl=%d\n",
+ printf("enable vsync, cl=%d, yc=%u, rl=%u\n",
crtc.current_charline, crtc.raster.ycounter,
crtc.raster.current_line);
#endif /* DEBUG_CRTC */
Modified: trunk/vice/src/pet/pet.c
===================================================================
--- trunk/vice/src/pet/pet.c 2025-06-30 22:43:43 UTC (rev 45710)
+++ trunk/vice/src/pet/pet.c 2025-07-14 19:12:34 UTC (rev 45711)
@@ -957,7 +957,11 @@
/* On the 8296 we do not (invert the screen by clearing MA12). */
vrevmask = petres.map == PET_MAP_8296 ? vmask : 0x1000;
- crtc_set_screen_options(cols, 25 * 10);
+ /*
+ * Vertical nr of pixels: max(25*10, 256), for 25 text lines of 10 px,
+ * or 256 for the HRE.
+ */
+ crtc_set_screen_options(cols, 256);
crtc_set_screen_addr(mem_ram + 0x8000);
crtc_set_hw_options(hwflag,
vmask,
Modified: trunk/vice/src/pet/pethre.c
===================================================================
--- trunk/vice/src/pet/pethre.c 2025-06-30 22:43:43 UTC (rev 45710)
+++ trunk/vice/src/pet/pethre.c 2025-07-14 19:12:34 UTC (rev 45711)
@@ -332,9 +332,9 @@
* memory.
*/
if (ymod8 < 8 && xstart < xend) {
- int ma_hi = scr_rel & MA_HI; /* MA<9...6> MA is already multi- */
- int ma_lo = scr_rel & MA_LO; /* MA<5...0> ...plied by two. */
- /* Form <MA 9-6><RA 2-0><MA 5-0> */
+ int ma_hi = scr_rel & MA_HI; /* MA<11...6> MA is already multi- */
+ int ma_lo = scr_rel & MA_LO; /* MA< 5...0> ...plied by two. */
+ /* Form <MA 11-6><RA 2-0><MA 5-0> */
uint8_t *screen_rel = mem_ram + 0x8000 + /* == crtc.screen_base */
(ma_hi << 3) + (ymod8 << 6) + ma_lo;
int width = xend - xstart;
@@ -357,7 +357,7 @@
int i;
#if HRE_DEBUG_GFX
- log_message(pethre_log, "pethre_DRAW: xstart=%d, xend=%d, ymod8=%d, scr_rel=%04x screen_rel=%04x", xstart, xend, ymod8, scr_rel, screen_rel - mem_ram);
+ log_message(pethre_log, "pethre_DRAW: xstart=%d, xend=%d, ymod8=%d, scr_rel=%04x screen_rel=%04x", xstart, xend, ymod8, (unsigned int)scr_rel, (unsigned int)(screen_rel - mem_ram));
#endif
for (i = xstart; i < xend; i++) {
int d = *screen_rel++;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|