aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorYoshihiro Takahashi <nyan@FreeBSD.org>2001-12-14 15:27:15 +0000
committerYoshihiro Takahashi <nyan@FreeBSD.org>2001-12-14 15:27:15 +0000
commit9cc62fb3d8a30ca3c8e3e8197e71e1f645348e6c (patch)
tree2086d40e539ed86593d28a6a2f50e1dde4a0a38d /sys
parente237860a3ce973ba82a58227731e738b0a7f496c (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/include/pc/display.h5
-rw-r--r--sys/i386/include/pc/display.h5
-rw-r--r--sys/pc98/cbus/scgdcrndr.c6
-rw-r--r--sys/pc98/cbus/scvtb.c8
-rw-r--r--sys/pc98/pc98/scgdcrndr.c6
-rw-r--r--sys/pc98/pc98/scvtbpc98.c8
6 files changed, 20 insertions, 18 deletions
diff --git a/sys/amd64/include/pc/display.h b/sys/amd64/include/pc/display.h
index cd2d5ff35b73..36f91deb0979 100644
--- a/sys/amd64/include/pc/display.h
+++ b/sys/amd64/include/pc/display.h
@@ -37,7 +37,12 @@
/* Monochrome attributes for foreground text */
+#ifdef PC98
+/* PC-98 attributes for foreground text */
+#define FG_UNDERLINE 0x08
+#else
#define FG_UNDERLINE 0x01
+#endif
#define FG_INTENSE 0x08
/* Monochrome attributes for text background */
diff --git a/sys/i386/include/pc/display.h b/sys/i386/include/pc/display.h
index cd2d5ff35b73..36f91deb0979 100644
--- a/sys/i386/include/pc/display.h
+++ b/sys/i386/include/pc/display.h
@@ -37,7 +37,12 @@
/* Monochrome attributes for foreground text */
+#ifdef PC98
+/* PC-98 attributes for foreground text */
+#define FG_UNDERLINE 0x08
+#else
#define FG_UNDERLINE 0x01
+#endif
#define FG_INTENSE 0x08
/* Monochrome attributes for text background */
diff --git a/sys/pc98/cbus/scgdcrndr.c b/sys/pc98/cbus/scgdcrndr.c
index 523a3f5504ce..3b863e29e8c3 100644
--- a/sys/pc98/cbus/scgdcrndr.c
+++ b/sys/pc98/cbus/scgdcrndr.c
@@ -120,8 +120,8 @@ gdc_txtdraw(scr_stat *scp, int from, int count, int flip)
p = sc_vtb_pointer(&scp->scr, from);
for (; count-- > 0; ++from) {
c = sc_vtb_getc(&scp->vtb, from);
- a = sc_vtb_geta(&scp->vtb, from) ^ 0x4;
- sc_vtb_putchar(&scp->scr, p, c, a);
+ a = sc_vtb_geta(&scp->vtb, from) ^ 0x0800;
+ p = sc_vtb_putchar(&scp->scr, p, c, a);
}
} else {
sc_vtb_copy(&scp->vtb, from, &scp->scr, from, count);
@@ -164,7 +164,7 @@ draw_txtmouse(scr_stat *scp, int x, int y)
at = (y/scp->font_size - scp->yoff)*scp->xsize + x/8 - scp->xoff;
sc_vtb_putc(&scp->scr, at,
sc_vtb_getc(&scp->scr, at),
- sc_vtb_geta(&scp->scr, at) ^ 0x4);
+ sc_vtb_geta(&scp->vtb, at) ^ 0x0800);
}
static void
diff --git a/sys/pc98/cbus/scvtb.c b/sys/pc98/cbus/scvtb.c
index 0bad8d0e7a07..48ad3f1b6cd6 100644
--- a/sys/pc98/cbus/scvtb.c
+++ b/sys/pc98/cbus/scvtb.c
@@ -83,11 +83,7 @@ static u_int8_t ibmpc_to_pc98[256] = {
0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef,
0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef,
};
-#if 0
#define at2pc98(attr) ((attr) | ibmpc_to_pc98[(unsigned)(attr) >> 8])
-#else
-#define at2pc98(attr) ibmpc_to_pc98[(unsigned)(attr) >> 8]
-#endif
void
sc_vtb_init(sc_vtb_t *vtb, int type, int cols, int rows, void *buf, int wait)
@@ -173,9 +169,9 @@ sc_vtb_geta(sc_vtb_t *vtb, int at)
vm_offset_t p = vtb_pointer(vtb, at);
if (vtb->vtb_type == VTB_FRAMEBUFFER)
- return (readw(p + ATTR_OFFSET_FB) & 0x00ff);
+ return (readw(p + ATTR_OFFSET_FB) & 0xff00);
else
- return (*(u_int16_t *)(p + attr_offset(vtb)) & 0x00ff);
+ return (*(u_int16_t *)(p + attr_offset(vtb)) & 0xff00);
}
__inline static void
diff --git a/sys/pc98/pc98/scgdcrndr.c b/sys/pc98/pc98/scgdcrndr.c
index 523a3f5504ce..3b863e29e8c3 100644
--- a/sys/pc98/pc98/scgdcrndr.c
+++ b/sys/pc98/pc98/scgdcrndr.c
@@ -120,8 +120,8 @@ gdc_txtdraw(scr_stat *scp, int from, int count, int flip)
p = sc_vtb_pointer(&scp->scr, from);
for (; count-- > 0; ++from) {
c = sc_vtb_getc(&scp->vtb, from);
- a = sc_vtb_geta(&scp->vtb, from) ^ 0x4;
- sc_vtb_putchar(&scp->scr, p, c, a);
+ a = sc_vtb_geta(&scp->vtb, from) ^ 0x0800;
+ p = sc_vtb_putchar(&scp->scr, p, c, a);
}
} else {
sc_vtb_copy(&scp->vtb, from, &scp->scr, from, count);
@@ -164,7 +164,7 @@ draw_txtmouse(scr_stat *scp, int x, int y)
at = (y/scp->font_size - scp->yoff)*scp->xsize + x/8 - scp->xoff;
sc_vtb_putc(&scp->scr, at,
sc_vtb_getc(&scp->scr, at),
- sc_vtb_geta(&scp->scr, at) ^ 0x4);
+ sc_vtb_geta(&scp->vtb, at) ^ 0x0800);
}
static void
diff --git a/sys/pc98/pc98/scvtbpc98.c b/sys/pc98/pc98/scvtbpc98.c
index 0bad8d0e7a07..48ad3f1b6cd6 100644
--- a/sys/pc98/pc98/scvtbpc98.c
+++ b/sys/pc98/pc98/scvtbpc98.c
@@ -83,11 +83,7 @@ static u_int8_t ibmpc_to_pc98[256] = {
0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef,
0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef, 0xef,
};
-#if 0
#define at2pc98(attr) ((attr) | ibmpc_to_pc98[(unsigned)(attr) >> 8])
-#else
-#define at2pc98(attr) ibmpc_to_pc98[(unsigned)(attr) >> 8]
-#endif
void
sc_vtb_init(sc_vtb_t *vtb, int type, int cols, int rows, void *buf, int wait)
@@ -173,9 +169,9 @@ sc_vtb_geta(sc_vtb_t *vtb, int at)
vm_offset_t p = vtb_pointer(vtb, at);
if (vtb->vtb_type == VTB_FRAMEBUFFER)
- return (readw(p + ATTR_OFFSET_FB) & 0x00ff);
+ return (readw(p + ATTR_OFFSET_FB) & 0xff00);
else
- return (*(u_int16_t *)(p + attr_offset(vtb)) & 0x00ff);
+ return (*(u_int16_t *)(p + attr_offset(vtb)) & 0xff00);
}
__inline static void