aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/syscons
diff options
context:
space:
mode:
authorYoshihiro Takahashi <nyan@FreeBSD.org>2017-01-28 02:22:15 +0000
committerYoshihiro Takahashi <nyan@FreeBSD.org>2017-01-28 02:22:15 +0000
commit2b375b4edd1b98884c3031d6ccd61acb10bd895d (patch)
treef35e4f57ad890ac86d5cb5d3ef760344a41fc0e6 /sys/dev/syscons
parent34bac11eba2841255bf6319ec78728f0f941c6ac (diff)
Notes
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r--sys/dev/syscons/daemon/daemon_saver.c10
-rw-r--r--sys/dev/syscons/dragon/dragon_saver.c19
-rw-r--r--sys/dev/syscons/fire/fire_saver.c4
-rw-r--r--sys/dev/syscons/logo/logo_saver.c4
-rw-r--r--sys/dev/syscons/plasma/plasma_saver.c2
-rw-r--r--sys/dev/syscons/rain/rain_saver.c4
-rw-r--r--sys/dev/syscons/scmouse.c2
-rw-r--r--sys/dev/syscons/scvidctl.c26
-rw-r--r--sys/dev/syscons/star/star_saver.c15
-rw-r--r--sys/dev/syscons/syscons.c16
-rw-r--r--sys/dev/syscons/syscons.h8
-rw-r--r--sys/dev/syscons/warp/warp_saver.c4
12 files changed, 2 insertions, 112 deletions
diff --git a/sys/dev/syscons/daemon/daemon_saver.c b/sys/dev/syscons/daemon/daemon_saver.c
index 1a92ff9afef14..5b30a398e7bc4 100644
--- a/sys/dev/syscons/daemon/daemon_saver.c
+++ b/sys/dev/syscons/daemon/daemon_saver.c
@@ -371,15 +371,7 @@ daemon_init(video_adapter_t *adp)
sprintf(message, "%s - %s %s", prison0.pr_hostname, ostype, osrelease);
mtx_unlock(&prison0.pr_mtx);
blanked = 0;
- switch (adp->va_mode) {
- case M_PC98_80x25:
- case M_PC98_80x30:
- attr_mask = ~FG_UNDERLINE;
- break;
- default:
- attr_mask = ~0;
- break;
- }
+ attr_mask = ~0;
return 0;
}
diff --git a/sys/dev/syscons/dragon/dragon_saver.c b/sys/dev/syscons/dragon/dragon_saver.c
index 6294daa77615f..df29d8277f03e 100644
--- a/sys/dev/syscons/dragon/dragon_saver.c
+++ b/sys/dev/syscons/dragon/dragon_saver.c
@@ -47,17 +47,10 @@
static u_char *vid;
static int blanked;
-#ifdef PC98
-#define VIDEO_MODE M_PC98_EGC640x400
-#define VIDEO_MODE_NAME "M_PC98_EGC640x400"
-#define SCRW 640
-#define SCRH 400
-#else
#define VIDEO_MODE M_VGA_CG320
#define VIDEO_MODE_NAME "M_VGA_CG320"
#define SCRW 320
#define SCRH 200
-#endif
#define ORDER 13
#define CURVE 3
#define OUT 100
@@ -72,11 +65,7 @@ gpset(int x, int y, int val)
if (x < 0 || y < 0 || SCRW <= x || SCRH <= y) {
return 0;
}
-#ifdef PC98
- vid[(x + y * SCRW) >> 3] = (0x80 >> (x & 7)); /* write new dot */
-#else
vid[x + y * SCRW] = val;
-#endif
return 1;
}
@@ -86,11 +75,6 @@ gdraw(int dx, int dy, int val)
int i;
int set = 0;
-#ifdef PC98
- outb(0x7c, 0xcc); /* GRCG on & RMW mode(disable planeI,G) */
- outb(0x7e, (val & 1) ? 0xff: 0); /* tile B */
- outb(0x7e, (val & 2) ? 0xff: 0); /* tile R */
-#endif
if (dx != 0) {
i = cur_x;
cur_x += dx;
@@ -115,9 +99,6 @@ gdraw(int dx, int dy, int val)
set |= gpset(cur_x, i, val);
}
}
-#ifdef PC98
- outb(0x7c, 0); /* GRCG off */
-#endif
return set;
}
diff --git a/sys/dev/syscons/fire/fire_saver.c b/sys/dev/syscons/fire/fire_saver.c
index 4c995efcd6404..4b0a0e00a6045 100644
--- a/sys/dev/syscons/fire/fire_saver.c
+++ b/sys/dev/syscons/fire/fire_saver.c
@@ -143,10 +143,6 @@ fire_init(video_adapter_t *adp)
if (!vidd_get_info(adp, M_VGA_CG320, &info)) {
scrmode = M_VGA_CG320;
- } else if (!vidd_get_info(adp, M_PC98_PEGC640x480, &info)) {
- scrmode = M_PC98_PEGC640x480;
- } else if (!vidd_get_info(adp, M_PC98_PEGC640x400, &info)) {
- scrmode = M_PC98_PEGC640x400;
} else {
log(LOG_NOTICE,
"%s: the console does not support M_VGA_CG320\n",
diff --git a/sys/dev/syscons/logo/logo_saver.c b/sys/dev/syscons/logo/logo_saver.c
index 5828d7e44bd61..071261ead62de 100644
--- a/sys/dev/syscons/logo/logo_saver.c
+++ b/sys/dev/syscons/logo/logo_saver.c
@@ -140,10 +140,6 @@ logo_init(video_adapter_t *adp)
scrmode = M_VESA_CG800x600;
} else if (!vidd_get_info(adp, M_VGA_CG320, &info)) {
scrmode = M_VGA_CG320;
- } else if (!vidd_get_info(adp, M_PC98_PEGC640x480, &info)) {
- scrmode = M_PC98_PEGC640x480;
- } else if (!vidd_get_info(adp, M_PC98_PEGC640x400, &info)) {
- scrmode = M_PC98_PEGC640x400;
} else {
log(LOG_NOTICE,
"%s: the console does not support M_VGA_CG320\n",
diff --git a/sys/dev/syscons/plasma/plasma_saver.c b/sys/dev/syscons/plasma/plasma_saver.c
index 761aa5cc57529..376c639231e0c 100644
--- a/sys/dev/syscons/plasma/plasma_saver.c
+++ b/sys/dev/syscons/plasma/plasma_saver.c
@@ -49,8 +49,6 @@
*/
static int modes[] = {
M_VGA_CG640,
- M_PC98_PEGC640x480,
- M_PC98_PEGC640x400,
M_VGA_CG320,
-1
};
diff --git a/sys/dev/syscons/rain/rain_saver.c b/sys/dev/syscons/rain/rain_saver.c
index ff2892416b971..1ddbdc748451d 100644
--- a/sys/dev/syscons/rain/rain_saver.c
+++ b/sys/dev/syscons/rain/rain_saver.c
@@ -143,10 +143,6 @@ rain_init(video_adapter_t *adp)
if (!vidd_get_info(adp, M_VGA_CG320, &info)) {
scrmode = M_VGA_CG320;
- } else if (!vidd_get_info(adp, M_PC98_PEGC640x480, &info)) {
- scrmode = M_PC98_PEGC640x480;
- } else if (!vidd_get_info(adp, M_PC98_PEGC640x400, &info)) {
- scrmode = M_PC98_PEGC640x400;
} else {
log(LOG_NOTICE,
"%s: the console does not support M_VGA_CG320\n",
diff --git a/sys/dev/syscons/scmouse.c b/sys/dev/syscons/scmouse.c
index db26787c264ee..f96c157cb4b50 100644
--- a/sys/dev/syscons/scmouse.c
+++ b/sys/dev/syscons/scmouse.c
@@ -249,7 +249,6 @@ sc_remove_mouse_image(scr_stat *scp)
i = scp->mouse_oldpos;
mark_for_update(scp, i);
mark_for_update(scp, i);
-#ifndef PC98
if (i + scp->xsize + 1 < size) {
mark_for_update(scp, i + scp->xsize + 1);
} else if (i + scp->xsize < size) {
@@ -257,7 +256,6 @@ sc_remove_mouse_image(scr_stat *scp)
} else if (i + 1 < size) {
mark_for_update(scp, i + 1);
}
-#endif /* PC98 */
scp->status &= ~MOUSE_VISIBLE;
SC_VIDEO_UNLOCK(scp->sc);
}
diff --git a/sys/dev/syscons/scvidctl.c b/sys/dev/syscons/scvidctl.c
index 6ae923dfe291e..0176147dcd513 100644
--- a/sys/dev/syscons/scvidctl.c
+++ b/sys/dev/syscons/scvidctl.c
@@ -655,12 +655,6 @@ sc_vid_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
case SW_ENH_B80x25: case SW_ENH_C80x25:
case SW_ENH_B80x43: case SW_ENH_C80x43:
case SW_EGAMONO80x25:
-
-#ifdef PC98
- /* PC98 TEXT MODES */
- case SW_PC98_80x25:
- case SW_PC98_80x30:
-#endif
if (!(adp->va_flags & V_ADP_MODECHANGE))
return ENODEV;
return sc_set_text_mode(scp, tp, cmd & 0xff, 0, 0, 0, 0);
@@ -671,11 +665,6 @@ sc_vid_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
case SW_CG640x350: case SW_ENH_CG640:
case SW_BG640x480: case SW_CG640x480: case SW_VGA_CG320:
case SW_VGA_MODEX:
-#ifdef PC98
- /* PC98 GRAPHICS MODES */
- case SW_PC98_EGC640x400: case SW_PC98_PEGC640x400:
- case SW_PC98_PEGC640x480:
-#endif
if (!(adp->va_flags & V_ADP_MODECHANGE))
return ENODEV;
return sc_set_graphics_mode(scp, tp, cmd & 0xff);
@@ -725,10 +714,8 @@ sc_vid_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
vidd_load_palette(adp, scp->sc->palette);
#endif
-#ifndef PC98
/* move hardware cursor out of the way */
vidd_set_hw_cursor(adp, -1, -1);
-#endif
/* FALLTHROUGH */
@@ -744,7 +731,6 @@ sc_vid_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
splx(s);
return error;
}
-#ifndef PC98
scp->status |= UNKNOWN_MODE | MOUSE_HIDDEN;
splx(s);
/* no restore fonts & palette */
@@ -752,14 +738,6 @@ sc_vid_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
set_mode(scp);
sc_clear_screen(scp);
scp->status &= ~UNKNOWN_MODE;
-#else /* PC98 */
- scp->status &= ~UNKNOWN_MODE;
- /* no restore fonts & palette */
- if (scp == scp->sc->cur_scp)
- set_mode(scp);
- sc_clear_screen(scp);
- splx(s);
-#endif /* PC98 */
return 0;
#ifdef SC_PIXEL_MODE
@@ -798,10 +776,6 @@ sc_vid_ioctl(struct tty *tp, u_long cmd, caddr_t data, struct thread *td)
}
scp->status |= UNKNOWN_MODE | MOUSE_HIDDEN;
splx(s);
-#ifdef PC98
- if (scp == scp->sc->cur_scp)
- set_mode(scp);
-#endif
return 0;
default:
diff --git a/sys/dev/syscons/star/star_saver.c b/sys/dev/syscons/star/star_saver.c
index 56bfc011eb508..e8e60415eed3d 100644
--- a/sys/dev/syscons/star/star_saver.c
+++ b/sys/dev/syscons/star/star_saver.c
@@ -58,9 +58,6 @@ star_saver(video_adapter_t *adp, int blank)
static u_char pattern[] = {"...........++++*** "};
static char color16[] = {FG_DARKGREY, FG_LIGHTGREY,
FG_WHITE, FG_LIGHTCYAN};
- static char color8[] = {FG_BLUE, FG_BROWN,
- FG_LIGHTGREY, FG_CYAN};
- static char *colors;
static u_short stars[NUM_STARS][2];
sc = sc_find_softc(adp, NULL);
@@ -72,16 +69,6 @@ star_saver(video_adapter_t *adp, int blank)
if (adp->va_info.vi_flags & V_INFO_GRAPHICS)
return EAGAIN;
if (!blanked) {
- switch (adp->va_mode) {
- case M_PC98_80x25:
- case M_PC98_80x30:
- colors = color8;
- break;
- default:
- colors = color16;
- break;
- }
-
/* clear the screen and set the border color */
sc_vtb_clear(&scp->scr, sc->scr_map[0x20],
(FG_LIGHTGREY | BG_BLACK) << 8);
@@ -97,7 +84,7 @@ star_saver(video_adapter_t *adp, int blank)
cell = random() % NUM_STARS;
sc_vtb_putc(&scp->scr, stars[cell][0],
sc->scr_map[pattern[stars[cell][1]]],
- colors[random()%sizeof(color16)] << 8);
+ color16[random()%sizeof(color16)] << 8);
if ((stars[cell][1]+=(random()%4)) >= sizeof(pattern)-1) {
stars[cell][0] = random() % (scp->xsize*scp->ysize);
stars[cell][1] = 0;
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 30c7a1a1327d0..5bbfebc52f20e 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -316,7 +316,6 @@ static char
{ KD_CGA, { "CGA", "CGA" } },
{ KD_EGA, { "EGA", "EGA (mono)" } },
{ KD_VGA, { "VGA", "VGA (mono)" } },
- { KD_PC98, { "PC-98x1", "PC-98x1" } },
{ KD_TGA, { "TGA", "TGA" } },
{ -1, { "Unknown", "Unknown" } },
};
@@ -2012,9 +2011,7 @@ sccnupdate(scr_stat *scp)
static void
scrn_timer(void *arg)
{
-#ifndef PC98
static time_t kbd_time_stamp = 0;
-#endif
sc_softc_t *sc;
scr_stat *scp;
int again, rate;
@@ -2034,7 +2031,6 @@ scrn_timer(void *arg)
if (suspend_in_progress || sc->font_loading_in_progress)
goto done;
-#ifndef PC98
if ((sc->kbd == NULL) && (sc->config & SC_AUTODETECT_KBD)) {
/* try to allocate a keyboard automatically */
if (kbd_time_stamp != time_uptime) {
@@ -2049,7 +2045,6 @@ scrn_timer(void *arg)
}
}
}
-#endif /* PC98 */
/* should we stop the screen saver? */
if (kdb_active || panicstr || shutdown_in_progress)
@@ -2809,11 +2804,7 @@ exchange_scr(sc_softc_t *sc)
/* set up the video for the new screen */
scp = sc->cur_scp = sc->new_scp;
-#ifdef PC98
- if (sc->old_scp->mode != scp->mode || ISUNKNOWNSC(sc->old_scp) || ISUNKNOWNSC(sc->new_scp))
-#else
if (sc->old_scp->mode != scp->mode || ISUNKNOWNSC(sc->old_scp))
-#endif
set_mode(scp);
#ifndef __sparc64__
else
@@ -2988,11 +2979,7 @@ scinit(int unit, int flags)
* static buffers for the console. This is less than ideal,
* but is necessry evil for the time being. XXX
*/
-#ifdef PC98
- static u_short sc_buffer[ROW*COL*2];/* XXX */
-#else
static u_short sc_buffer[ROW*COL]; /* XXX */
-#endif
#ifndef SC_NO_FONT_LOADING
static u_char font_8[256*8];
static u_char font_14[256*14];
@@ -3193,9 +3180,6 @@ scinit(int unit, int flags)
/* initialize mapscrn arrays to a one to one map */
for (i = 0; i < sizeof(sc->scr_map); i++)
sc->scr_map[i] = sc->scr_rmap[i] = i;
-#ifdef PC98
- sc->scr_map[0x5c] = (u_char)0xfc; /* for backslash */
-#endif
sc->flags |= SC_INIT_DONE;
}
diff --git a/sys/dev/syscons/syscons.h b/sys/dev/syscons/syscons.h
index 3454700c94750..24d386afc16bc 100644
--- a/sys/dev/syscons/syscons.h
+++ b/sys/dev/syscons/syscons.h
@@ -38,14 +38,6 @@
#include <sys/_lock.h>
#include <sys/_mutex.h>
-/* machine-dependent part of the header */
-
-#ifdef PC98
-#include <pc98/cbus/sc_machdep.h>
-#elif defined(__i386__)
-/* nothing for the moment */
-#endif
-
/* default values for configuration options */
#ifndef MAXCONS
diff --git a/sys/dev/syscons/warp/warp_saver.c b/sys/dev/syscons/warp/warp_saver.c
index a800118774aa9..93383ddaebc9d 100644
--- a/sys/dev/syscons/warp/warp_saver.c
+++ b/sys/dev/syscons/warp/warp_saver.c
@@ -129,10 +129,6 @@ warp_init(video_adapter_t *adp)
if (!vidd_get_info(adp, M_VGA_CG320, &info)) {
scrmode = M_VGA_CG320;
- } else if (!vidd_get_info(adp, M_PC98_PEGC640x480, &info)) {
- scrmode = M_PC98_PEGC640x480;
- } else if (!vidd_get_info(adp, M_PC98_PEGC640x400, &info)) {
- scrmode = M_PC98_PEGC640x400;
} else {
log(LOG_NOTICE,
"%s: the console does not support M_VGA_CG320\n",