Adjust the timings of the 8514/A and compatibles (June 30th, 2025)

This commit is contained in:
TC1995
2025-06-30 19:51:35 +02:00
parent 474dfb666b
commit 54b2f4237d
3 changed files with 12 additions and 9 deletions

View File

@@ -3819,7 +3819,7 @@ ibm8514_recalctimings(svga_t *svga)
} else {
if (dev->on) {
dev->hdisp = (dev->hdisped + 1) << 3;
dev->h_total = (dev->htotal + 1) << 3;
dev->h_total = dev->htotal + 1;
if (dev->h_total == 1) /*Default to 1024x768 87hz 8514/A htotal timings if it goes to 0.*/
dev->h_total = 0x9e;
@@ -3854,6 +3854,7 @@ ibm8514_recalctimings(svga_t *svga)
dev->h_disp = dev->hdisp;
dev->dispend = dev->vdisp;
dev->h_disp_time = dev->hdisp >> 3;
if (dev->accel.advfunc_cntl & 0x04)
svga->clock_8514 = (cpuclock * (double) (1ULL << 32)) / 44900000.0;

View File

@@ -2707,9 +2707,9 @@ mach_set_resolution(mach_t *mach, svga_t *svga)
{
ibm8514_t *dev = (ibm8514_t *) svga->dev8514;
dev->h_total = (dev->htotal + 1) << 3;
dev->h_total = (dev->htotal + 1);
if (dev->h_total == 8) /*Default to 1024x768 87hz 8514/A htotal timings if it goes to 0.*/
dev->h_total = 0x9e << 3;
dev->h_total = 0x9e;
dev->hdisp = (dev->hdisped + 1) << 3;
@@ -2730,7 +2730,7 @@ mach_set_resolution(mach_t *mach, svga_t *svga)
switch (mach->shadow_set & 0x03) {
case 0x01:
if (!(dev->accel.advfunc_cntl & 0x04)) {
dev->h_total = 0x64 << 3;
dev->h_total = 0x64;
dev->hdisp = 640;
dev->vdisp = 480;
dev->v_total = 0x0419;
@@ -2739,7 +2739,7 @@ mach_set_resolution(mach_t *mach, svga_t *svga)
break;
case 0x02:
if (dev->accel.advfunc_cntl & 0x04) {
dev->h_total = 0x9e << 3;
dev->h_total = 0x9e;
dev->hdisp = 1024;
dev->vdisp = 768;
dev->v_total = 0x0669;
@@ -2754,7 +2754,7 @@ mach_set_resolution(mach_t *mach, svga_t *svga)
} else if ((dev->disp_cntl >> 5) == 2) { /*Reset 8514/A to defaults if needed.*/
if (dev->accel.advfunc_cntl & 0x04) {
if (dev->hdisp == 640) {
dev->h_total = 0x9e << 3;
dev->h_total = 0x9e;
dev->hdisp = 1024;
dev->vdisp = 768;
dev->v_total = 0x0669;
@@ -2763,7 +2763,7 @@ mach_set_resolution(mach_t *mach, svga_t *svga)
}
} else {
if (dev->hdisp == 1024) {
dev->h_total = 0x64 << 3;
dev->h_total = 0x64;
dev->hdisp = 640;
dev->vdisp = 480;
dev->v_total = 0x0419;
@@ -2926,6 +2926,8 @@ mach_recalctimings(svga_t *svga)
else if (dev->h_disp == 640)
dev->dispend = 480;
dev->h_disp_time = dev->hdisp >> 3;
svga->clock_8514 = (cpuclock * (double) (1ULL << 32)) / svga->getclock((mach->accel.clock_sel >> 2) & 0x0f, svga->clock_gen);
if (mach->accel.clock_sel & 0x40)
svga->clock_8514 *= 2;

View File

@@ -1031,7 +1031,7 @@ svga_recalctimings(svga_t *svga)
svga->y_add = svga->vtotal - svga->vblankend - 1;
svga->monitor->mon_overscan_y = svga->y_add + abs(svga->vblankstart - svga->dispend);
if ((svga->dispend >= 2048) || (svga->y_add < 0)) {
if ((dev->dispend >= 2048) || (svga->y_add < 0)) {
svga->y_add = 0;
svga->monitor->mon_overscan_y = 0;
}
@@ -1094,7 +1094,7 @@ svga_recalctimings(svga_t *svga)
if (ibm8514_active && (svga->dev8514 != NULL)) {
if (dev->on) {
disptime8514 = dev->h_total;
_dispontime8514 = dev->h_disp;
_dispontime8514 = dev->h_disp_time;
svga_log("HTOTAL=%d, HDISP=%d.\n", dev->h_total, dev->h_disp);
}
}