From e637f53981ecce39b23c1d5cb0df217e9f34b3ba Mon Sep 17 00:00:00 2001 From: starfrost013 Date: Mon, 9 Jun 2025 15:15:53 +0100 Subject: [PATCH] remove cga->coff because it is never used or checked --- src/include/86box/vid_cga.h | 17 ++++++++--------- src/include/86box/vid_hercules.h | 1 - src/include/86box/vid_mda.h | 1 - src/include/86box/vid_pgc.h | 1 - src/machine/m_amstrad.c | 4 ---- src/machine/m_pcjr.c | 2 -- src/machine/m_tandy.c | 2 -- src/video/vid_cga.c | 1 - src/video/vid_colorplus.c | 1 - src/video/vid_compaq_cga.c | 1 - src/video/vid_hercules.c | 1 - src/video/vid_herculesplus.c | 3 +-- src/video/vid_incolor.c | 3 +-- src/video/vid_mda.c | 1 - src/video/vid_nga.c | 1 - src/video/vid_ogc.c | 1 - src/video/vid_sigma.c | 3 +-- 17 files changed, 11 insertions(+), 33 deletions(-) diff --git a/src/include/86box/vid_cga.h b/src/include/86box/vid_cga.h index 52e41755c..8ad7b7b98 100644 --- a/src/include/86box/vid_cga.h +++ b/src/include/86box/vid_cga.h @@ -44,14 +44,14 @@ typedef enum cga_crtc_registers_e CGA_CRTC_VTOTAL_ADJUST = 0x5, // Vertical total adjust value CGA_CRTC_VDISP = 0x6, // Vertical display (total number of displayed scanline) CGA_CRTC_VSYNC = 0x7, // Vertical sync scanline number - CGA_CRTC_INTERLACE = 0x8, // If set, interlacing mode is enabled - CGA_CRTC_MAX_SCANLINE_ADDR = 0x9, - CGA_CRTC_CURSOR_START = 0xA, - CGA_CRTC_CURSOR_END = 0xB, - CGA_CRTC_START_ADDR_HIGH = 0xC, - CGA_CRTC_START_ADDR_LOW = 0xD, - CGA_CRTC_CURSOR_ADDR_HIGH = 0xE, - CGA_CRTC_CURSOR_ADDR_LOW = 0xF, + CGA_CRTC_INTERLACE = 0x8, // Interlacing mode + CGA_CRTC_MAX_SCANLINE_ADDR = 0x9, // Maximum scanline address + CGA_CRTC_CURSOR_START = 0xA, // Cursor start scanline + CGA_CRTC_CURSOR_END = 0xB, // Cursor end scanline + CGA_CRTC_START_ADDR_HIGH = 0xC, // Screen start address high 8 bits + CGA_CRTC_START_ADDR_LOW = 0xD, // Screen start address low 8 bits + CGA_CRTC_CURSOR_ADDR_HIGH = 0xE, // Cursor address high 8 bits + CGA_CRTC_CURSOR_ADDR_LOW = 0xF, // Cursor addres low 8 bits CGA_CRTC_LIGHT_PEN_ADDR_HIGH = 0x10, CGA_CRTC_LIGHT_PEN_ADDR_LOW = 0x11, } cga_crtc_registers; @@ -76,7 +76,6 @@ typedef struct cga_t { int vc; int cgadispon; int con; - int coff; int cursoron; int cgablink; int vsynctime; diff --git a/src/include/86box/vid_hercules.h b/src/include/86box/vid_hercules.h index c58a50aa3..a468dce55 100644 --- a/src/include/86box/vid_hercules.h +++ b/src/include/86box/vid_hercules.h @@ -47,7 +47,6 @@ typedef struct { uint16_t ma; uint16_t maback; int con; - int coff; int cursoron; int dispon; int blink; diff --git a/src/include/86box/vid_mda.h b/src/include/86box/vid_mda.h index d13c45a28..eeea5a093 100644 --- a/src/include/86box/vid_mda.h +++ b/src/include/86box/vid_mda.h @@ -29,7 +29,6 @@ typedef struct mda_t { uint16_t ma; uint16_t maback; int con; - int coff; int cursoron; int dispon; int blink; diff --git a/src/include/86box/vid_pgc.h b/src/include/86box/vid_pgc.h index 35e2d9e42..43226a0f5 100644 --- a/src/include/86box/vid_pgc.h +++ b/src/include/86box/vid_pgc.h @@ -116,7 +116,6 @@ typedef struct pgc { int vc; int cgadispon; int con; - int coff; int cursoron; int cgablink; int vsynctime; diff --git a/src/machine/m_amstrad.c b/src/machine/m_amstrad.c index 814d95ffd..57e8367ff 100644 --- a/src/machine/m_amstrad.c +++ b/src/machine/m_amstrad.c @@ -117,7 +117,6 @@ typedef struct amsvid_t { int vc; int cgadispon; int con; - int coff; int cursoron; int cgablink; int vsynctime; @@ -515,7 +514,6 @@ vid_poll_1512(void *priv) } if (vid->sc == (vid->crtc[11] & 31)) { vid->con = 0; - vid->coff = 1; } if (vid->vadj) { vid->sc++; @@ -1319,7 +1317,6 @@ lcdm_poll(amsvid_t *vid) } if (mda->sc == (mda->crtc[11] & 31) || ((mda->crtc[8] & 3) == 3 && mda->sc == ((mda->crtc[11] & 31) >> 1))) { mda->con = 0; - mda->coff = 1; } if (mda->vadj) { mda->sc++; @@ -1483,7 +1480,6 @@ lcdc_poll(amsvid_t *vid) } if (cga->sc == (cga->crtc[11] & 31) || ((cga->crtc[8] & 3) == 3 && cga->sc == ((cga->crtc[11] & 31) >> 1))) { cga->con = 0; - cga->coff = 1; } if ((cga->crtc[8] & 3) == 3 && cga->sc == (cga->crtc[9] >> 1)) cga->maback = cga->ma; diff --git a/src/machine/m_pcjr.c b/src/machine/m_pcjr.c index cb69bd9e5..f2da2e2b5 100644 --- a/src/machine/m_pcjr.c +++ b/src/machine/m_pcjr.c @@ -82,7 +82,6 @@ typedef struct pcjr_t { int vc; int dispon; int con; - int coff; int cursoron; int blink; int vsynctime; @@ -1167,7 +1166,6 @@ vid_poll(void *priv) } if (pcjr->sc == (pcjr->crtc[11] & 31) || ((pcjr->crtc[8] & 3) == 3 && pcjr->sc == ((pcjr->crtc[11] & 31) >> 1))) { pcjr->con = 0; - pcjr->coff = 1; } if (pcjr->vadj) { pcjr->sc++; diff --git a/src/machine/m_tandy.c b/src/machine/m_tandy.c index 7072c5e78..4d0768378 100644 --- a/src/machine/m_tandy.c +++ b/src/machine/m_tandy.c @@ -92,7 +92,6 @@ typedef struct t1kvid_t { int vc; int dispon; int con; - int coff; int cursoron; int blink; int fullchange; @@ -1212,7 +1211,6 @@ vid_poll(void *priv) } if (vid->sc == (vid->crtc[11] & 31) || ((vid->crtc[8] & 3) == 3 && vid->sc == ((vid->crtc[11] & 31) >> 1))) { vid->con = 0; - vid->coff = 1; } if (vid->vadj) { vid->sc++; diff --git a/src/video/vid_cga.c b/src/video/vid_cga.c index 220c77124..bb0d04248 100644 --- a/src/video/vid_cga.c +++ b/src/video/vid_cga.c @@ -596,7 +596,6 @@ cga_poll(void *priv) if (cga->sc == (cga->crtc[CGA_CRTC_CURSOR_END] & 31) || ((cga->crtc[CGA_CRTC_INTERLACE] & 3) == 3 && cga->sc == ((cga->crtc[CGA_CRTC_CURSOR_END] & 31) >> 1))) { cga->con = 0; - cga->coff = 1; } if ((cga->crtc[CGA_CRTC_INTERLACE] & 3) == 3 && cga->sc == (cga->crtc[CGA_CRTC_MAX_SCANLINE_ADDR] >> 1)) cga->maback = cga->ma; diff --git a/src/video/vid_colorplus.c b/src/video/vid_colorplus.c index 6c66175c1..a0d5e6de1 100644 --- a/src/video/vid_colorplus.c +++ b/src/video/vid_colorplus.c @@ -229,7 +229,6 @@ colorplus_poll(void *priv) } if (colorplus->cga.sc == (colorplus->cga.crtc[11] & 31) || ((colorplus->cga.crtc[8] & 3) == 3 && colorplus->cga.sc == ((colorplus->cga.crtc[11] & 31) >> 1))) { colorplus->cga.con = 0; - colorplus->cga.coff = 1; } if ((colorplus->cga.crtc[8] & 3) == 3 && colorplus->cga.sc == (colorplus->cga.crtc[9] >> 1)) colorplus->cga.maback = colorplus->cga.ma; diff --git a/src/video/vid_compaq_cga.c b/src/video/vid_compaq_cga.c index 13fc399eb..f9fec32d0 100644 --- a/src/video/vid_compaq_cga.c +++ b/src/video/vid_compaq_cga.c @@ -269,7 +269,6 @@ compaq_cga_poll(void *priv) if (self->cga.sc == (self->cga.crtc[11] & 31) || ((self->cga.crtc[8] & 3) == 3 && self->cga.sc == ((self->cga.crtc[11] & 31) >> 1))) { self->cga.con = 0; - self->cga.coff = 1; } if ((self->cga.crtc[8] & 3) == 3 && self->cga.sc == (self->cga.crtc[9] >> 1)) self->cga.maback = self->cga.ma; diff --git a/src/video/vid_hercules.c b/src/video/vid_hercules.c index af8ad08f8..cf8ad8cf3 100644 --- a/src/video/vid_hercules.c +++ b/src/video/vid_hercules.c @@ -399,7 +399,6 @@ hercules_poll(void *priv) if (dev->sc == (dev->crtc[11] & 31) || ((dev->crtc[8] & 3) == 3 && dev->sc == ((dev->crtc[11] & 31) >> 1))) { dev->con = 0; - dev->coff = 1; } if (dev->vadj) { diff --git a/src/video/vid_herculesplus.c b/src/video/vid_herculesplus.c index fb42c3022..42c68bf54 100644 --- a/src/video/vid_herculesplus.c +++ b/src/video/vid_herculesplus.c @@ -77,7 +77,7 @@ typedef struct { int linepos, displine; int vc, sc; uint16_t ma, maback; - int con, coff, cursoron; + int con, cursoron; int dispon, blink; int vsynctime; int vadj; @@ -536,7 +536,6 @@ herculesplus_poll(void *priv) if (dev->sc == (dev->crtc[11] & 31) || ((dev->crtc[8] & 3) == 3 && dev->sc == ((dev->crtc[11] & 31) >> 1))) { dev->con = 0; - dev->coff = 1; } if (dev->vadj) { dev->sc++; diff --git a/src/video/vid_incolor.c b/src/video/vid_incolor.c index d9b48f43a..034d54045 100644 --- a/src/video/vid_incolor.c +++ b/src/video/vid_incolor.c @@ -167,7 +167,7 @@ typedef struct { int linepos, displine; int vc, sc; uint16_t ma, maback; - int con, coff, cursoron; + int con, cursoron; int dispon, blink; int vsynctime; int vadj; @@ -899,7 +899,6 @@ incolor_poll(void *priv) if (dev->sc == (dev->crtc[11] & 31) || ((dev->crtc[8] & 3) == 3 && dev->sc == ((dev->crtc[11] & 31) >> 1))) { dev->con = 0; - dev->coff = 1; } if (dev->vadj) { diff --git a/src/video/vid_mda.c b/src/video/vid_mda.c index 7b6e54806..70ca375fd 100644 --- a/src/video/vid_mda.c +++ b/src/video/vid_mda.c @@ -200,7 +200,6 @@ mda_poll(void *priv) } if (mda->sc == (mda->crtc[11] & 31) || ((mda->crtc[8] & 3) == 3 && mda->sc == ((mda->crtc[11] & 31) >> 1))) { mda->con = 0; - mda->coff = 1; } if (mda->vadj) { mda->sc++; diff --git a/src/video/vid_nga.c b/src/video/vid_nga.c index ef1c6cd40..5fc81109c 100644 --- a/src/video/vid_nga.c +++ b/src/video/vid_nga.c @@ -392,7 +392,6 @@ nga_poll(void *priv) /* cursor stop scanline */ if (nga->cga.sc == (nga->cga.crtc[11] & 31) || ((nga->cga.crtc[8] & 3) == 3 && nga->cga.sc == ((nga->cga.crtc[11] & 31) >> 1))) { nga->cga.con = 0; - nga->cga.coff = 1; } /* interlaced and max scanline per char reached */ if ((nga->cga.crtc[8] & 3) == 3 && nga->cga.sc == (nga->cga.crtc[9] >> 1)) diff --git a/src/video/vid_ogc.c b/src/video/vid_ogc.c index a49cd8a22..162cb9073 100644 --- a/src/video/vid_ogc.c +++ b/src/video/vid_ogc.c @@ -407,7 +407,6 @@ ogc_poll(void *priv) } if (ogc->cga.sc == (ogc->cga.crtc[11] & 31) || ((ogc->cga.crtc[8] & 3) == 3 && ogc->cga.sc == ((ogc->cga.crtc[11] & 31) >> 1))) { ogc->cga.con = 0; - ogc->cga.coff = 1; } if ((ogc->cga.crtc[8] & 3) == 3 && ogc->cga.sc == (ogc->cga.crtc[9] >> 1)) ogc->cga.maback = ogc->cga.ma; diff --git a/src/video/vid_sigma.c b/src/video/vid_sigma.c index d771260ed..c54af7119 100644 --- a/src/video/vid_sigma.c +++ b/src/video/vid_sigma.c @@ -158,7 +158,7 @@ typedef struct sigma_t { int linepos, displine; int sc, vc; int cgadispon; - int con, coff, cursoron, cgablink; + int con, cursoron, cgablink; int vsynctime, vadj; int oddeven; @@ -676,7 +676,6 @@ sigma_poll(void *priv) } if (sigma->sc == (sigma->crtc[11] & 31) || ((sigma->crtc[8] & 3) == 3 && sigma->sc == ((sigma->crtc[11] & 31) >> 1))) { sigma->con = 0; - sigma->coff = 1; } if ((sigma->crtc[8] & 3) == 3 && sigma->sc == (sigma->crtc[9] >> 1)) sigma->maback = sigma->ma;