fork of PCE focusing on macplus, supporting DaynaPort SCSI network emulation
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

macplus: Support width and height being changed from 512 and 342

This requires a patched ROM but otherwise works as expected.

+26 -15
+4 -3
src/arch/macplus/macplus.c
··· 1290 1290 1291 1291 sct = ini_next_sct (ini, NULL, "video"); 1292 1292 1293 + ini_get_uint16 (sct, "width", &w, 512); 1294 + ini_get_uint16 (sct, "height", &h, 342); 1295 + 1293 1296 addr1 = mem_blk_get_size (sim->ram); 1294 - addr1 = (addr1 < 0x5900) ? 0 : (addr1 - 0x5900); 1297 + addr1 = (addr1 < 0x5900) ? 0 : (addr1 - ((w * h / 8) + 0x380)); 1295 1298 1296 1299 ini_get_uint32 (sct, "address", &addr2, addr1); 1297 - ini_get_uint16 (sct, "width", &w, 512); 1298 - ini_get_uint16 (sct, "height", &h, 342); 1299 1300 ini_get_uint32 (sct, "color0", &col0, 0); 1300 1301 ini_get_uint32 (sct, "color1", &col1, 0xffffff); 1301 1302 ini_get_uint16 (sct, "brightness", &bright, 1000);
+6
src/arch/macplus/pce-macplus.cfg.in
··· 353 353 354 354 # Brightness in the range 0 - 1000. 355 355 brightness = 1000 356 + 357 + # Screen width (a value other than 512 requires a patched ROM) 358 + #width = 512 359 + 360 + # Screen height (a value other than 342 requires a patched ROM) 361 + #height = 342 356 362 } 357 363 358 364
+11 -12
src/arch/macplus/video.c
··· 28 28 29 29 30 30 #define MAC_VIDEO_PFREQ 15667200 31 - #define MAC_VIDEO_HFREQ (MAC_VIDEO_PFREQ / (512 + 192)) 32 - #define MAC_VIDEO_VFREQ (MAC_VIDEO_HFREQ / (342 + 28)) 33 - 34 - /* #define MAC_VIDEO_VB1 ((342 * (512 + 192) * 7833600) / MAC_VIDEO_PFREQ) */ 35 - #define MAC_VIDEO_VB1 120384 36 - 37 - /* #define MAC_VIDEO_VB2 (((342 + 28) * (512 + 192) * 7833600) / MAC_VIDEO_PFREQ) */ 38 - #define MAC_VIDEO_VB2 130240 39 31 40 32 41 33 int mac_video_init (mac_video_t *mv, unsigned w, unsigned h) ··· 45 37 46 38 mv->w = w; 47 39 mv->h = h; 40 + 41 + mv->hfreq = MAC_VIDEO_PFREQ / (w + 192); 42 + mv->vfreq = mv->hfreq / (h + 28); 43 + mv->vb1 = ((unsigned long)h * (unsigned long)(w + 192) * 7833600) / 44 + MAC_VIDEO_PFREQ; 45 + mv->vb2 = ((unsigned long)(h + 28) * (unsigned long)(w + 192) * 46 + 7833600) / MAC_VIDEO_PFREQ; 48 47 49 48 mv->force = 0; 50 49 ··· 254 253 255 254 mv->clk += n; 256 255 257 - if (mv->clk < MAC_VIDEO_VB1) { 256 + if (mv->clk < mv->vb1) { 258 257 return; 259 258 } 260 259 261 - if (old < MAC_VIDEO_VB1) { 260 + if (old < mv->vb1) { 262 261 /* vbl start */ 263 262 mac_video_update (mv); 264 263 mac_video_set_vbi (mv, 1); 265 264 } 266 265 267 - if (mv->clk >= MAC_VIDEO_VB2) { 266 + if (mv->clk >= mv->vb2) { 268 267 mac_video_set_vbi (mv, 0); 269 268 270 - mv->clk -= MAC_VIDEO_VB2; 269 + mv->clk -= mv->vb2; 271 270 } 272 271 }
+5
src/arch/macplus/video.h
··· 33 33 unsigned w; 34 34 unsigned h; 35 35 36 + unsigned long hfreq; 37 + unsigned long vfreq; 38 + unsigned long vb1; 39 + unsigned long vb2; 40 + 36 41 char force; 37 42 38 43 unsigned cmp_cnt;