diff --git a/sys/arch/next68k/dev/nextcons.c b/sys/arch/next68k/dev/nextcons.c index 99784b28bd4b..33a01601557e 100644 --- a/sys/arch/next68k/dev/nextcons.c +++ b/sys/arch/next68k/dev/nextcons.c @@ -1,4 +1,4 @@ -/* $NetBSD: nextcons.c,v 1.2 1999/04/29 14:51:20 bad Exp $ */ +/* $NetBSD: nextcons.c,v 1.3 2000/09/29 06:35:57 deberg Exp $ */ /* * Copyright (c) 1999 Darrin B. Jewell @@ -67,7 +67,9 @@ nextcnprobe(struct consdev *cp) { if ((rom_machine_type == NeXT_WARP9) - || (rom_machine_type == NeXT_X15)) + || (rom_machine_type == NeXT_X15) + || (rom_machine_type == NeXT_WARP9C) + || (rom_machine_type == NeXT_TURBO_COLOR)) cp->cn_pri = CN_INTERNAL; else cp->cn_pri = CN_DEAD; diff --git a/sys/arch/next68k/dev/nextdisplay.c b/sys/arch/next68k/dev/nextdisplay.c index c412dba0c134..469618901cb9 100644 --- a/sys/arch/next68k/dev/nextdisplay.c +++ b/sys/arch/next68k/dev/nextdisplay.c @@ -1,4 +1,4 @@ -/* $NetBSD: nextdisplay.c,v 1.4 2000/06/26 04:55:52 simonb Exp $ */ +/* $NetBSD: nextdisplay.c,v 1.5 2000/09/29 06:35:57 deberg Exp $ */ /* * Copyright (c) 1998 Matt DeBergalis @@ -141,7 +141,9 @@ nextdisplay_match(parent, match, aux) void *aux; { if ((rom_machine_type == NeXT_WARP9) - || (rom_machine_type == NeXT_X15)) + || (rom_machine_type == NeXT_X15) + || (rom_machine_type == NeXT_WARP9C) + || (rom_machine_type == NeXT_TURBO_COLOR)) return (1); else return (0); @@ -168,9 +170,9 @@ nextdisplay_init(dc, color) dc->dc_paddr = color ? COLORP(addr) : MONOP(addr); dc->dc_size = color ? NEXT_P_C16_VIDEOSIZE : NEXT_P_VIDEOSIZE; - dc->dc_wid = 1152; /* XXX color */ - dc->dc_ht = 832; /* XXX color */ - dc->dc_depth = color ? 8 : 2; + dc->dc_wid = color ? 1152 : 1152; + dc->dc_ht = color ? 832 : 832; + dc->dc_depth = color ? 16 : 2; dc->dc_rowbytes = dc->dc_wid * dc->dc_depth / 8; dc->dc_videobase = dc->dc_vaddr; @@ -194,12 +196,15 @@ nextdisplay_init(dc, color) /* clear the screen */ for (i = 0; i < dc->dc_ht * dc->dc_rowbytes; i += sizeof(u_int32_t)) - *(u_int32_t *)(dc->dc_videobase + i) = 0xffffffff; + *(u_int32_t *)(dc->dc_videobase + i) = + (color ? 0x0 : 0xffffffff); + + printf("done clearing\n", dc->dc_videobase); rap = &dc->dc_raster; rap->width = dc->dc_wid; rap->height = dc->dc_ht; - rap->depth = color ? 8 : 2; + rap->depth = color ? 16 : 2; rap->linelongs = dc->dc_rowbytes / sizeof(u_int32_t); rap->pixels = (u_int32_t *)dc->dc_videobase; @@ -234,7 +239,8 @@ nextdisplay_attach(parent, self, aux) sc = (struct nextdisplay_softc *)self; - if (rom_machine_type == NeXT_WARP9C) { + if ((rom_machine_type == NeXT_WARP9C) + || (rom_machine_type == NeXT_TURBO_COLOR)) { iscolor = 1; addr = (paddr_t)colorbase; } else { @@ -338,7 +344,9 @@ nextdisplay_alloc_screen(v, type, cookiep, curxp, curyp, defattrp) *curxp = 0; *curyp = 0; rcons_alloc_attr(&sc->sc_dc->dc_rcons, 0, 0, - WSATTR_REVERSE, &defattr); + (strcmp(type->name, "color") == 0) + ? 0 + : WSATTR_REVERSE, &defattr); *defattrp = defattr; sc->nscreens++; #if 0 @@ -388,7 +396,8 @@ nextdisplay_cnattach(void) long defattr; int iscolor; - if (rom_machine_type == NeXT_WARP9C) { + if ((rom_machine_type == NeXT_WARP9C) + || (rom_machine_type == NeXT_TURBO_COLOR)) { iscolor = 1; nextdisplay_consaddr = (paddr_t)colorbase; } else { @@ -399,7 +408,8 @@ nextdisplay_cnattach(void) /* set up the display */ nextdisplay_init(&nextdisplay_console_dc, iscolor); - rcons_alloc_attr(&dc->dc_rcons, 0, 0, WSATTR_REVERSE, &defattr); + rcons_alloc_attr(&dc->dc_rcons, 0, 0, + iscolor ? 0 : WSATTR_REVERSE, &defattr); wsdisplay_cnattach(iscolor ? &nextdisplay_color : &nextdisplay_mono, &dc->dc_rcons, 0, 0, defattr); diff --git a/sys/arch/next68k/include/bus_space.h b/sys/arch/next68k/include/bus_space.h index 53781bf0422d..9194bc8e6f46 100644 --- a/sys/arch/next68k/include/bus_space.h +++ b/sys/arch/next68k/include/bus_space.h @@ -1,4 +1,4 @@ -/* $NetBSD: bus_space.h,v 1.5 1999/04/10 14:06:27 drochner Exp $ */ +/* $NetBSD: bus_space.h,v 1.6 2000/09/29 06:35:57 deberg Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -83,9 +83,11 @@ typedef u_long bus_space_handle_t; #define NEXT68K_INTIO_BUS_SPACE intiobase /* - * Value for the next68k mono video bus space tag, not to be used directly by MI code. + * Values for the next68k video bus space tags, not to be used directly + * by MI code. */ #define NEXT68K_MONO_VIDEO_BUS_SPACE monobase +#define NEXT68K_COLOR_VIDEO_BUS_SPACE colorbase /* * Mapping and unmapping operations. @@ -95,7 +97,8 @@ typedef u_long bus_space_handle_t; ((*(hp)=(bus_space_handle_t)((t)+((a)-INTIOBASE))),0) : \ ((((a)>=MONOBASE)&&((a)+(s)=COLORBASE)&&((a)+(s)