cleaned up include's relocated grf/* stuf to grfabs*.

This commit is contained in:
chopps 1994-02-13 21:10:20 +00:00
parent 3678c726a2
commit 7bb75ba6be
31 changed files with 3885 additions and 361 deletions

View File

@ -31,32 +31,32 @@
* SUCH DAMAGE.
*
* @(#)dma.c
* $Id: a2091dma.c,v 1.4 1994/02/11 07:01:23 chopps Exp $
* $Id: a2091dma.c,v 1.5 1994/02/13 21:10:20 chopps Exp $
*/
/*
* A2091 DMA driver
*/
#include "param.h"
#include "systm.h"
#include "time.h"
#include "kernel.h"
#include "proc.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/time.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include "vm/vm.h"
#include "vm/vm_kern.h"
#include "vm/vm_page.h"
#include "vm/vm_statistics.h"
#include "machine/pmap.h"
#include <vm/vm.h>
#include <vm/vm_kern.h>
#include <vm/vm_page.h>
#include <vm/vm_statistics.h>
#include <machine/pmap.h>
#include "device.h"
#include "a2091dmareg.h"
#include <amiga/dev/device.h>
#include <amiga/dev/a2091dmareg.h>
#include "a2091scsi.h"
#include "dmavar.h"
#include "scsivar.h"
#include <amiga/dev/dmavar.h>
#include <amiga/dev/scsivar.h>
#include "../include/cpu.h"
#include <machine/cpu.h>
extern void timeout();

View File

@ -31,32 +31,32 @@
* SUCH DAMAGE.
*
* @(#)dma.c
* $Id: a3000dma.c,v 1.4 1994/02/11 07:01:27 chopps Exp $
* $Id: a3000dma.c,v 1.5 1994/02/13 21:10:22 chopps Exp $
*/
/*
* A3000 DMA driver
*/
#include "param.h"
#include "systm.h"
#include "time.h"
#include "kernel.h"
#include "proc.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/time.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include "vm/vm.h"
#include "vm/vm_kern.h"
#include "vm/vm_page.h"
#include "vm/vm_statistics.h"
#include "machine/pmap.h"
#include <vm/vm.h>
#include <vm/vm_kern.h>
#include <vm/vm_page.h>
#include <vm/vm_statistics.h>
#include <machine/pmap.h>
#include "device.h"
#include "a3000dmareg.h"
#include <amiga/dev/device.h>
#include <amiga/dev/a3000dmareg.h>
#include "a3000scsi.h"
#include "dmavar.h"
#include "scsivar.h"
#include <amiga/dev/dmavar.h>
#include <amiga/dev/scsivar.h>
#include "../include/cpu.h"
#include <machine/cpu.h>
extern void timeout();

View File

@ -42,22 +42,22 @@
* @(#)event.c 8.1 (Berkeley) 6/11/93
*
* from: Header: event.c,v 1.5 92/11/26 01:10:44 torek Exp (LBL)
* $Id: event.c,v 1.1 1994/01/26 21:05:41 mw Exp $
* $Id: event.c,v 1.2 1994/02/13 21:10:23 chopps Exp $
*/
/*
* Internal `Firm_event' interface for the keyboard and mouse drivers.
*/
#include "param.h"
#include "fcntl.h"
#include "malloc.h"
#include "proc.h"
#include "systm.h"
#include "vnode.h"
#include <sys/param.h>
#include <sys/fcntl.h>
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/systm.h>
#include <sys/vnode.h>
#include "vuid_event.h"
#include "event_var.h"
#include <amiga/dev/vuid_event.h>
#include <amiga/dev/event_var.h>
/*
* Initialize a firm_event queue.

View File

@ -38,7 +38,7 @@
* from: Utah $Hdr: grf.c 1.31 91/01/21$
*
* @(#)grf.c 7.8 (Berkeley) 5/7/91
* $Id: grf.c,v 1.7 1994/02/11 07:01:36 chopps Exp $
* $Id: grf.c,v 1.8 1994/02/13 21:10:24 chopps Exp $
*/
/*
@ -50,26 +50,26 @@
#include "grf.h"
#if NGRF > 0
#include "param.h"
#include "proc.h"
#include "ioctl.h"
#include "file.h"
#include "malloc.h"
#include <sys/param.h>
#include <sys/proc.h>
#include <sys/ioctl.h>
#include <sys/file.h>
#include <sys/malloc.h>
#include "device.h"
#include "grfioctl.h"
#include "grfvar.h"
#include <amiga/dev/device.h>
#include <amiga/dev/grfioctl.h>
#include <amiga/dev/grfvar.h>
#include "machine/cpu.h"
#include <machine/cpu.h>
#include "vm/vm.h"
#include "vm/vm_kern.h"
#include "vm/vm_page.h"
#include "vm/vm_pager.h"
#include <vm/vm.h>
#include <vm/vm_kern.h>
#include <vm/vm_page.h>
#include <vm/vm_pager.h>
#include "miscfs/specfs/specdev.h"
#include "vnode.h"
#include "mman.h"
#include <miscfs/specfs/specdev.h>
#include <sys/vnode.h>
#include <sys/mman.h>
#include "ite.h"
#if NITE == 0

View File

@ -1,5 +1,5 @@
/*
* $Id: grf_cc.c,v 1.8 1994/02/11 07:01:37 chopps Exp $
* $Id: grf_cc.c,v 1.9 1994/02/13 21:10:26 chopps Exp $
*/
#include "grf.h"
@ -11,20 +11,21 @@
view driver. Due to some design problems with RTG view can't
currently replace grf, but that's an option for the future. */
#include "param.h"
#include "vm/vm_param.h"
#include "sys/errno.h"
#include "ioctl.h"
#include "grfioctl.h"
#include "grfvar.h"
#include "grf_ccreg.h"
#include "../include/cpu.h"
#include "../amiga/custom.h"
#include "../amiga/cia.h"
#include "../amiga/cc_types.h"
#include "grf/grf_types.h"
#include "grf/grf_bitmap.h"
#include "viewioctl.h"
#include <sys/param.h>
#include <vm/vm_param.h>
#include <sys/errno.h>
#include <sys/ioctl.h>
#include <machine/cpu.h>
#include <amiga/amiga/custom.h>
#include <amiga/amiga/cia.h>
#include <amiga/amiga/dlists.h>
#include <amiga/dev/grfioctl.h>
#include <amiga/dev/grfvar.h>
#include <amiga/dev/grf_ccreg.h>
#include <amiga/dev/grfabs_reg.h>
#include <amiga/dev/viewioctl.h>
/* Initialize hardware.
* Must point g_display at a grfinfo structure describing the hardware.

View File

@ -1,5 +1,5 @@
/*
* $Id: grf_rt.c,v 1.6 1994/02/11 07:01:41 chopps Exp $
* $Id: grf_rt.c,v 1.7 1994/02/13 21:10:27 chopps Exp $
*/
#include "grf.h"
@ -11,11 +11,11 @@
#include <sys/param.h>
#include <sys/errno.h>
#include <sys/ioctl.h>
#include "grfioctl.h"
#include "grfvar.h"
#include "grf_rtreg.h"
#include <amiga/dev/grfioctl.h>
#include <amiga/dev/grfvar.h>
#include <amiga/dev/grf_rtreg.h>
#include <machine/cpu.h>
#include "device.h"
#include <amiga/dev/device.h>
extern caddr_t ZORRO2ADDR;

View File

@ -1,8 +1,8 @@
/*
* $Id: grf_tg.c,v 1.4 1994/02/11 07:01:43 chopps Exp $
* $Id: grf_tg.c,v 1.5 1994/02/13 21:10:29 chopps Exp $
*/
#include "errno.h"
#include <sys/errno.h>
/* to be written.. */

268
sys/arch/amiga/dev/grfabs.c Normal file
View File

@ -0,0 +1,268 @@
/*
* Copyright (c) 1994 Christian E. Hopps
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Christian E. Hopps.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: grfabs.c,v 1.1 1994/02/13 21:10:30 chopps Exp $
*
* amiga abstract graphics driver.
*
*/
#include <sys/types.h>
#include <amiga/amiga/dlists.h>
#include <amiga/amiga/cc.h>
#include <amiga/dev/grfabs_reg.h>
/*
* General and init.
*/
/* add your monitor here. */
monitor_t *cc_init_monitor (void);
/* and here. */
monitor_t *(*init_monitor[])(void) = {
cc_init_monitor,
NULL
};
dll_list_t instance_monitors;
dll_list_t *monitors;
struct vbl_node grf_vbl_node;
#define ABS(type, val) \
(type) (((int)(val)<0)?-(val):(val))
void
grf_vbl_function (data)
void *data;
{
dll_node_t *n = monitors->head;
while (n->next) {
monitor_t *m = (monitor_t *)n;
if (m->vbl_handler)
m->vbl_handler (m);
n = n->next;
}
}
/*
* XXX: called from ite console init routine.
* Does just what configure will do later but without printing anything.
*/
int
grfcc_probe ()
{
int i = 0;
grf_vbl_node.function = grf_vbl_function;
if (NULL == monitors) {
dinit_list (&instance_monitors);
monitors = &instance_monitors;
while (init_monitor[i]) {
init_monitor[i] ();
i++;
}
if (i) {
add_vbl_function (&grf_vbl_node, 1, 0);
return (1);
}
return (0);
}
return (1);
}
void
grfcc_config ()
{
grfprobe ();
}
dmode_t *
get_best_display_mode (width, height, depth)
u_long width, height;
u_char depth;
{
dmode_t *save = NULL;
monitor_t *m = (monitor_t *)monitors->head;
long dt;
while (m->node.next) {
dimen_t dim;
dmode_t *d;
long dx, dy, ct;
dim.width = width;
dim.height = height;
d = m->get_best_mode (&dim, depth);
if (d) {
dx = ABS (long, (d->nominal_size.width - width));
dy = ABS (long, (d->nominal_size.height - height));
ct = dx + dy;
if (ct < dt || save == NULL) {
save = d;
dt = ct;
}
}
m = (monitor_t *)m->node.next;
}
return (save);
}
/*
* Monitor stuff.
*/
dmode_t *
grf_get_next_mode (m, d)
monitor_t *m;
dmode_t *d;
{
return (m->get_next_mode (d));
}
dmode_t *
grf_get_current_mode (m)
monitor_t *m;
{
return (m->get_current_mode ());
}
dmode_t *
grf_get_best_mode (m, size, depth)
monitor_t *m;
dimen_t *size;
u_char depth;
{
return (m->get_best_mode (size, depth));
}
bmap_t *
grf_alloc_bitmap (m, w, h, d, f)
monitor_t *m;
u_short w, h, d, f;
{
return (m->alloc_bitmap (w, h, d, f));
}
void
grf_free_bitmap (m, bm)
monitor_t *m;
bmap_t *bm;
{
m->free_bitmap (bm);
}
/*
* Mode stuff.
*/
view_t *
grf_get_current_view (d)
dmode_t *d;
{
return (d->get_current_view (d));
}
monitor_t *
grf_get_monitor (d)
dmode_t *d;
{
return (d->get_monitor (d));
}
/*
* View stuff.
*/
void
grf_display_view (v)
view_t *v;
{
v->display_view (v);
}
view_t *
grf_alloc_view (d, dim, depth)
dmode_t *d;
dimen_t *dim;
u_char depth;
{
if (!d)
d = get_best_display_mode (dim->width, dim->height, depth);
if (d)
return (d->alloc_view (d, dim, depth));
return (NULL);
}
void
grf_remove_view (v)
view_t *v;
{
v->remove_view (v);
}
void
grf_free_view (v)
view_t *v;
{
v->free_view (v);
}
dmode_t *
grf_get_display_mode (v)
view_t *v;
{
return (v->get_display_mode (v));
}
int
grf_get_colormap (v, cm)
view_t *v;
colormap_t *cm;
{
return (v->get_colormap (v, cm));
}
int
grf_use_colormap (v, cm)
view_t *v;
colormap_t *cm;
{
return (v->use_colormap (v, cm));
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,264 @@
/*
* Copyright (c) 1994 Christian E. Hopps
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Christian E. Hopps.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: grfabs_ccglb.c,v 1.1 1994/02/13 21:10:33 chopps Exp $
*/
#include <sys/types.h>
#include <amiga/amiga/dlists.h>
#include <amiga/amiga/cc.h>
#include <amiga/dev/grfabs_reg.h>
#include <amiga/dev/grfabs_ccreg.h>
/* the custom thips monitor */
monitor_t *cc_monitor;
cop_t std_copper_list[] = {
{ CI_WAIT (0, 12), 0xfffe },
#if defined (GRF_ECS)
{ R_BEAMCON0, 0x0000 },
{ R_BPLCON3, 0x0020 }, /* enable border blank */
#endif
/* bit plane pointers */
{ R_BPL0PTH, 0x0000 }, { R_BPL0PTL, 0x0000 },
{ R_BPL1PTH, 0x0000 }, { R_BPL1PTL, 0x0000 },
{ R_BPL2PTH, 0x0000 }, { R_BPL2PTL, 0x0000 },
{ R_BPL3PTH, 0x0000 }, { R_BPL3PTL, 0x0000 },
{ R_BPL4PTH, 0x0000 }, { R_BPL4PTL, 0x0000 },
{ R_BPL5PTH, 0x0000 }, { R_BPL5PTL, 0x0000 },
{ R_BPL6PTH, 0x0000 }, { R_BPL6PTL, 0x0000 },
{ R_BPL7PTH, 0x0000 }, { R_BPL7PTL, 0x0000 },
/* view specific stuff. */
{ R_BPL1MOD, 0x0000 },
{ R_BPL2MOD, 0x0000 },
{ R_DIWSTRT, 0xffff },
{ R_BPLCON0, 0x0000 },
{ R_DIWSTOP, 0x0000 },
#if defined (GRF_ECS)
{ R_DIWHIGH, 0x0000 },
#endif
{ R_DDFSTRT, 0x0000 },
{ R_DDFSTOP, 0x0000 },
{ R_BPLCON1, 0x0000 },
/* colors */
{ R_COLOR00, 0x0779 }, { R_COLOR01, 0x0000 }, { R_COLOR02, 0x0FFF }, { R_COLOR03, 0x068B },
{ R_COLOR04, 0x000f }, { R_COLOR05, 0x0f0f }, { R_COLOR06, 0x00ff }, { R_COLOR07, 0x0fff },
{ R_COLOR08, 0x0620 }, { R_COLOR09, 0x0e50 }, { R_COLOR0A, 0x09f1 }, { R_COLOR0B, 0x0eb0 },
{ R_COLOR0C, 0x055f }, { R_COLOR0D, 0x092f }, { R_COLOR0E, 0x00f8 }, { R_COLOR0F, 0x0ccc },
{ R_COLOR10, 0x0e44 }, { R_COLOR11, 0x0e44 }, { R_COLOR12, 0x0000 }, { R_COLOR13, 0x0eec },
{ R_COLOR14, 0x0444 }, { R_COLOR15, 0x0555 }, { R_COLOR16, 0x0666 }, { R_COLOR17, 0x0777 },
{ R_COLOR18, 0x0888 }, { R_COLOR19, 0x0999 }, { R_COLOR1A, 0x0aaa }, { R_COLOR1B, 0x0bbb },
{ R_COLOR1C, 0x0ccc }, { R_COLOR1D, 0x0ddd }, { R_COLOR1E, 0x0eee }, { R_COLOR1F, 0x0fff },
{ R_COP1LCH, 0x0000 }, { R_COP1LCL, 0x0000 },
{ 0xffff, 0xfffe }, { 0xffff, 0xfffe } /* COPEND, COPEND */
};
/* standard custom chips copper list. */
int std_copper_list_len = sizeof (std_copper_list) / sizeof (cop_t);
int std_copper_list_size = sizeof (std_copper_list);
#if defined (GRF_A2024)
cop_t std_dlace_copper_list[] = {
{ CI_WAIT(0,12), 0xfffe }, /* WAIT (0, 12) */
#if defined (GRF_ECS)
{ R_BEAMCON0, 0x0000 },
{ R_BPLCON3, 0x0020 }, /* enable border blank */
#endif
/* colors */
{ R_COLOR00, 0x0000 }, { R_COLOR01, 0x0000 }, { R_COLOR02, 0x0000 }, { R_COLOR03, 0x0000 },
{ R_COLOR04, 0x0000 }, { R_COLOR05, 0x0000 }, { R_COLOR06, 0x0000 }, { R_COLOR07, 0x0000 },
{ R_COLOR08, 0x0000 }, { R_COLOR09, 0x0000 }, { R_COLOR0A, 0x0000}, { R_COLOR0B, 0x0000 },
{ R_COLOR0C, 0x0000 }, { R_COLOR0D, 0x0000 }, { R_COLOR0E, 0x0000}, { R_COLOR0F, 0x0000 },
{ R_COLOR10, 0x0009 }, { R_COLOR11, 0x0009 }, { R_COLOR12, 0x0001 }, { R_COLOR13, 0x0809 },
{ R_COLOR14, 0x0009 }, { R_COLOR15, 0x0009 }, { R_COLOR16, 0x0001 }, { R_COLOR17, 0x0809 },
{ R_COLOR18, 0x0008 }, { R_COLOR19, 0x0008 }, { R_COLOR1A, 0x0000 }, { R_COLOR1B, 0x0808 },
{ R_COLOR1C, 0x0089 }, { R_COLOR1D, 0x0089 }, { R_COLOR1E, 0x0081 }, { R_COLOR1F, 0x0889 },
/* set the registers up. */
{ R_DIWSTRT, 0xffff },
{ R_BPLCON0, 0x0000 },
{ R_DIWSTOP, 0x0000 },
#if defined (GRF_ECS)
{ R_DIWHIGH, 0x0000 },
#endif
{ R_DDFSTRT, 0x0000 },
{ R_DDFSTOP, 0x0000 },
{ R_BPLCON1, 0x0000 },
/* view specific stuff. */
{ R_BPL1MOD, 0x0000 },
{ R_BPL2MOD, 0x0000 },
/* bit plane pointers */
{ R_BPL0PTH, 0x0000 }, { R_BPL0PTL, 0x0000 },
{ R_BPL1PTH, 0x0000 }, { R_BPL1PTL, 0x0000 },
{ R_BPL2PTH, 0x0000 }, { R_BPL2PTL, 0x0000 },
{ R_BPL3PTH, 0x0000 }, { R_BPL3PTL, 0x0000 },
{ R_COP1LCH, 0x0000 }, { R_COP1LCL, 0x0000 },
{ 0xffff, 0xfffe }, { 0xffff, 0xfffe } /* COPEND, COPEND */
};
int std_dlace_copper_list_len = sizeof (std_dlace_copper_list) / sizeof (cop_t);
int std_dlace_copper_list_size = sizeof (std_dlace_copper_list);
cop_t std_a2024_copper_list[] = {
{ CI_WAIT(0,12), 0xfffe }, /* WAIT (0, 12) */
#if defined (GRF_ECS)
{ R_BEAMCON0, 0x0000 },
#endif
/* hedley card init setup section */
{ R_COLOR00, 0x0f00 },
{ R_BPL0PTH, 0x0000 }, { R_BPL0PTL, 0x0000 }, /* init plane of 1's with first set for centering */
{ R_DIWSTRT, 0x1561 }, { R_DIWSTOP, 0x16d1 },
#if defined (GRF_ECS)
{ R_DIWHIGH, 0x2000 },
#endif
{ R_DDFSTRT, 0x0040 }, { R_DDFSTOP, 0x00d0 },
{ R_BPLCON0, 0x9200 },
/* actual data that will be latched by hedley card. */
{ R_COLOR01, 0x0001 }, /* Stuff1 */
{ CI_WAIT(126,21), 0xfffe }, { R_COLOR01, 0x0001 }, /* Display Quadrent */
{ CI_WAIT(158,21), 0xfffe }, { R_COLOR01, 0x08f0 }, /* Stuff */
{ CI_WAIT(190,21), 0xfffe }, { R_COLOR01, 0x0ff1 }, /* Stuff2 */
{ CI_WAIT(0,22), 0xfffe },
{ R_COLOR00, 0x0000 }, { R_BPLCON0, 0x0000 },
{ CI_WAIT(0,43), 0xfffe },
/* set the registers up. */
{ R_COLOR00, 0x0009 }, { R_COLOR01, 0x0001 }, { R_COLOR02, 0x0008 }, { R_COLOR03, 0x0000 },
{ R_COLOR04, 0x0809 }, { R_COLOR05, 0x0801 }, { R_COLOR06, 0x0808 }, { R_COLOR07, 0x0800 },
{ R_COLOR08, 0x0089 }, { R_COLOR09, 0x0081 }, { R_COLOR0A, 0x0088 }, { R_COLOR0B, 0x0080 },
{ R_COLOR0C, 0x0889 }, { R_COLOR0D, 0x0881 }, { R_COLOR0E, 0x0888 }, { R_COLOR0F, 0x0880 },
{ R_COLOR10, 0x0009 }, { R_COLOR11, 0x0009 }, { R_COLOR12, 0x0001 }, { R_COLOR13, 0x0809 },
{ R_COLOR14, 0x0009 }, { R_COLOR15, 0x0009 }, { R_COLOR16, 0x0001 }, { R_COLOR17, 0x0809 },
{ R_COLOR18, 0x0008 }, { R_COLOR19, 0x0008 }, { R_COLOR1A, 0x0000 }, { R_COLOR1B, 0x0808 },
{ R_COLOR1C, 0x0089 }, { R_COLOR1D, 0x0089 }, { R_COLOR1E, 0x0081 }, { R_COLOR1F, 0x0889 },
/* window size. */
{ R_DIWSTRT, 0x2c81 }, { R_BPLCON0, 0x0000 }, { R_DIWSTOP, 0xf481 },
/* datafetch */
{ R_DDFSTRT, 0x0038 }, { R_DDFSTOP, 0x00b8 },
{ R_BPLCON1, 0x0000 },
{ R_BPL1MOD, 0x00bc }, { R_BPL2MOD, 0x00bc },
/* bitplanes */
{ R_BPL0PTH, 0x0000 }, { R_BPL0PTL, 0x0000 },
{ R_BPL1PTH, 0x0000 }, { R_BPL1PTL, 0x0000 },
{ R_BPL2PTH, 0x0000 }, { R_BPL2PTL, 0x0000 },
{ R_BPL3PTH, 0x0000 }, { R_BPL3PTL, 0x0000 },
#if defined (GRF_ECS)
{ R_DIWHIGH, 0x2000 },
#endif
{ R_COP1LCH, 0x0000 }, { R_COP1LCL, 0x0000 },
{ 0xffff, 0xfffe }, { 0xffff, 0xfffe } /* COPEND, COPEND */
};
int std_a2024_copper_list_len = sizeof (std_a2024_copper_list) / sizeof (cop_t);
int std_a2024_copper_list_size = sizeof (std_a2024_copper_list);
cop_t std_pal_a2024_copper_list[] = {
{ CI_WAIT(0,20), 0xfffe }, /* WAIT (0, 12) */
#if defined (GRF_ECS)
{ R_BEAMCON0, STANDARD_PAL_BEAMCON },
#endif
/* hedley card init setup section */
{ R_COLOR00, 0x0f00 },
{ R_BPL0PTH, 0x0000 }, { R_BPL0PTL, 0x0000 }, /* init plane of 1's with first set for centering */
{ R_DIWSTRT, 0x1d61 }, { R_DIWSTOP, 0x1ed1 },
#if defined (GRF_ECS)
{ R_DIWHIGH, 0x2000 },
#endif
{ R_DDFSTRT, 0x0040 }, { R_DDFSTOP, 0x00d0 },
{ R_BPLCON0, 0x9200 },
/* actual data that will be latched by hedley card. */
{ R_COLOR01, 0x0001 }, /* Stuff1 */
{ CI_WAIT(126,29), 0xfffe }, { R_COLOR01, 0x0001 }, /* Display Quadrent */
{ CI_WAIT(158,29), 0xfffe }, { R_COLOR01, 0x08f0 }, /* Stuff */
{ CI_WAIT(190,29), 0xfffe }, { R_COLOR01, 0x0ff1 }, /* Stuff2 */
{ CI_WAIT(0,30), 0xfffe },
{ R_COLOR00, 0x0000 }, { R_BPLCON0, 0x0000 },
{ CI_WAIT(0,43), 0xfffe },
/* set the registers up. */
{ R_COLOR00, 0x0009 }, { R_COLOR01, 0x0001 }, { R_COLOR02, 0x0008 }, { R_COLOR03, 0x0000 },
{ R_COLOR04, 0x0809 }, { R_COLOR05, 0x0801 }, { R_COLOR06, 0x0808 }, { R_COLOR07, 0x0800 },
{ R_COLOR08, 0x0089 }, { R_COLOR09, 0x0081 }, { R_COLOR0A, 0x0088 }, { R_COLOR0B, 0x0080 },
{ R_COLOR0C, 0x0889 }, { R_COLOR0D, 0x0881 }, { R_COLOR0E, 0x0888 }, { R_COLOR0F, 0x0880 },
{ R_COLOR10, 0x0009 }, { R_COLOR11, 0x0009 }, { R_COLOR12, 0x0001 }, { R_COLOR13, 0x0809 },
{ R_COLOR14, 0x0009 }, { R_COLOR15, 0x0009 }, { R_COLOR16, 0x0001 }, { R_COLOR17, 0x0809 },
{ R_COLOR18, 0x0008 }, { R_COLOR19, 0x0008 }, { R_COLOR1A, 0x0000 }, { R_COLOR1B, 0x0808 },
{ R_COLOR1C, 0x0089 }, { R_COLOR1D, 0x0089 }, { R_COLOR1E, 0x0081 }, { R_COLOR1F, 0x0889 },
/* window size. */
{ R_DIWSTRT, 0x2c81 }, { R_BPLCON0, 0x0000 }, { R_DIWSTOP, 0x2c81 },
/* datafetch */
{ R_DDFSTRT, 0x0038 }, { R_DDFSTOP, 0x00b8 },
{ R_BPLCON1, 0x0000 },
{ R_BPL1MOD, 0x00bc }, { R_BPL2MOD, 0x00bc },
/* bitplanes */
{ R_BPL0PTH, 0x0000 }, { R_BPL0PTL, 0x0000 },
{ R_BPL1PTH, 0x0000 }, { R_BPL1PTL, 0x0000 },
{ R_BPL2PTH, 0x0000 }, { R_BPL2PTL, 0x0000 },
{ R_BPL3PTH, 0x0000 }, { R_BPL3PTL, 0x0000 },
#if defined (GRF_ECS)
{ R_DIWHIGH, 0x2100 },
#endif
{ R_COP1LCH, 0x0000 }, { R_COP1LCL, 0x0000 },
{ 0xffff, 0xfffe }, { 0xffff, 0xfffe } /* COPEND, COPEND */
};
int std_pal_a2024_copper_list_len = sizeof (std_pal_a2024_copper_list) / sizeof (cop_t);
int std_pal_a2024_copper_list_size = sizeof (std_pal_a2024_copper_list);
/* color tables for figuring color regs for 2024 */
u_short a2024_color_value_line0[4] = {
A2024_L0_BLACK,
A2024_L0_DGREY,
A2024_L0_LGREY,
A2024_L0_WHITE
};
u_short a2024_color_value_line1[4] = {
A2024_L1_BLACK,
A2024_L1_DGREY,
A2024_L1_LGREY,
A2024_L1_WHITE
};
#endif /* GRF_A2024 */
u_short cc_default_colors[32] = {
0xAAA, 0x000, 0x68B, 0xFFF,
0x369, 0x963, 0x639, 0x936,
0x000, 0x00F, 0x0F0, 0xF00,
0x0FF, 0xFF0, 0xF0F, 0xFFF,
0x000, 0x111, 0x222, 0x333,
0x444, 0x555, 0x666, 0x777,
0x888, 0x999, 0xAAA, 0xBBB,
0xCCC, 0xDDD, 0xEEE, 0xFFF
};
#if defined (GRF_A2024)
u_short cc_a2024_default_colors[4] = {
0x0, /* BLACK */
0x3, /* WHITE */
0x2, /* LGREY */
0x1 /* DGREY */
};
#endif /* GRF_A2024 */

View File

@ -0,0 +1,339 @@
/*
* Copyright (c) 1994 Christian E. Hopps
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Christian E. Hopps.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: grfabs_ccreg.h,v 1.1 1994/02/13 21:10:34 chopps Exp $
*/
#if ! defined (_GRFABS_CCREG_H)
#define _GRFABS_CCREG_H
typedef colormap_t *alloc_colormap_func (int);
typedef struct monitor_data {
dll_list_t modes; /* a list of supported modes. */
dmode_t *current_mode;
u_long flags; /* monitor flags. */
} mdata_t;
typedef struct display_mode_data {
monitor_t * monitor; /* the monitor that owns this mode. */
view_t * current_view; /* current view to be displayed. */
cop_t **frames;
u_short hedley_current; /* current hedley quadrent. */
u_short bplcon0; /* bplcon0 data. */
u_short std_start_x;
u_short std_start_y;
#if defined (GRF_ECS)
/* ECS registers. */
u_short beamcon0;
u_short hbstart; /* no modes use the rest of these */
u_short hbstop; /* ECS registers. */
u_short hsstart;
u_short hsstop;
u_short vbstart;
u_short vbstop;
u_short vsstart;
u_short vsstop;
#endif
/* some limit stuff. */
dimen_t max_size; /* largest fit. */
dimen_t min_size; /* smallest fit. */
u_short min_depth;
u_short max_depth;
u_long flags; /* mode specific flags. */
use_colormap_func *use_colormap;
get_colormap_func *get_colormap;
alloc_colormap_func *alloc_colormap;
display_view_func *display_view;
vbl_handler_func *vbl_handler; /* gets called every vertical blank. */
/* when this is the current mode.*/
} dmdata_t;
enum dmode_flag_bits {
DMB_INTERLACE,
DMB_HEDLEY_EXP
};
enum dmode_flags {
DMF_INTERLACE = 1 << DMB_INTERLACE,
DMF_HEDLEY_EXP = 1 << DMB_HEDLEY_EXP
};
typedef struct view_data {
dmode_t *mode; /* the mode for this view */
colormap_t *colormap;
u_long flags; /* view specific flags. */
} vdata_t;
enum view_flag_bits {
VB_DISPLAY,
};
enum view_flags {
VF_DISPLAY = 1 << VB_DISPLAY, /* set if view is being displayed */
};
/*
* This that are in grfabs_ccglb.c
*/
#if defined (GRF_A2024)
# if defined (GRF_PAL)
extern cop_t std_pal_a2024_copper_list[];
extern int std_pal_a2024_copper_list_len;
extern int std_pal_a2024_copper_list_size;
# endif
# if defined (GRF_NTSC)
extern cop_t std_a2024_copper_list[];
extern int std_a2024_copper_list_len;
extern int std_a2024_copper_list_size;
# endif
extern cop_t std_dlace_copper_list[];
extern int std_dlace_copper_list_len;
extern int std_dlace_copper_list_size;
extern u_short a2024_color_value_line0[4];
extern u_short a2024_color_value_line1[4];
#endif /* GRF_A2024 */
extern cop_t std_copper_list[];
extern int std_copper_list_len;
extern int std_copper_list_size;
extern monitor_t *cc_monitor;
extern u_short cc_default_colors[32];
extern u_short cc_a2024_default_colors[4];
/*
* Misc macros, defines and enums.
*/
#define MDATA(m) ((mdata_t *)(m->data))
#define DMDATA(d) ((dmdata_t *)(d->data))
#define VDATA(v) ((vdata_t *)(v->data))
#define RWDATA(r) ((rwdata_t *)(r->data))
#if defined (GRF_ECS)
#define CALC_DIWHIGH(hs, vs, he, ve) \
((u_short)((he&0x100)<<5)|(ve&0x700)|((hs&0x100)>>3)|((vs&0x700)>>8))
#define USE_CON3 0x0001
#else
#define USE_CON3 0x0
#endif
enum lace_frame_numbers {
F_LACE_LONG,
F_LACE_SHORT,
F_LACE_STORE_LONG,
F_LACE_STORE_SHORT,
F_LACE_TOTAL
};
enum frame_numbers {
F_LONG,
F_STORE_LONG,
F_TOTAL
};
#if defined (GRF_A2024)
/*
* Defines macros and enums for A2024 hedley expansion
*/
enum quad_frame_numbers {
F_QD_QUAD0, F_QD_QUAD1, F_QD_QUAD2, F_QD_QUAD3,
F_QD_STORE_QUAD0, F_QD_STORE_QUAD1, F_QD_STORE_QUAD2, F_QD_STORE_QUAD3,
F_QD_TOTAL
};
/* -------
* |0 |1 |
* |------
* |2 |3 |
* -------
*/
#define QUAD0_ID 0x0001
#define QUAD1_ID 0x00f1
#define QUAD2_ID 0x0f01
#define QUAD3_ID 0x0ff1
#define HALF_2024_LINE (512>>3)
#define DIGITAL_RED 0x0800
#define DIGITAL_GREEN 0x0080
#define DIGITAL_BLUE 0x0008
#define DIGITAL_INTENSE 0x0001
#define A2024_L0_BLACK (0)
#define A2024_L0_DGREY (DIGITAL_BLUE)
#define A2024_L0_LGREY (DIGITAL_RED)
#define A2024_L0_WHITE (DIGITAL_RED|DIGITAL_BLUE)
#define A2024_L1_BLACK (0)
#define A2024_L1_DGREY (DIGITAL_INTENSE)
#define A2024_L1_LGREY (DIGITAL_GREEN)
#define A2024_L1_WHITE (DIGITAL_GREEN|DIGITAL_INTENSE)
#define A2024_L0_INDEX(color_reg) (((0x4&color_reg)>>1)|(0x1&color_reg))
#define A2024_L1_INDEX(color_reg) (((0x8&color_reg)>>2)|((0x2&color_reg)>>1))
#define A2024_CM_TO_CR(cm,rn) \
(a2024_color_value_line0[0x3 & (cm)->entry[A2024_L0_INDEX(rn)]] |\
a2024_color_value_line1[0x3 & (cm)->entry[A2024_L1_INDEX(rn)]])
#endif /* GRF_A2024 */
/*
* Misc defined values for custom chips.
*/
/* ECS stuff */
#define VARVBLANK 0x1000 /* Variable vertical blank enable */
#define LOLDIS 0x0800 /* long line disable */
#define CSCBLANKEN 0x0400 /* redirect composite sync */
#define VARVSYNC 0x0200 /* Variable vertical sync enable */
#define VARHSYNC 0x0100 /* Variable horizontal sync enable */
#define VARBEAM 0x0080 /* variable beam counter enable */
#define DISPLAYDUAL 0x0040 /* use UHRES pointer and standard pointers */
#define DISPLAYPAL 0x0020 /* set decodes to generate PAL display */
#define VARCSYNC 0x0010 /* Variable composite sync enable */
#define CSBLANK 0x0008 /* Composite blank out to CSY* pin */
#define CSYNCTRUE 0x0004 /* composite sync true signal */
#define VSYNCTRUE 0x0002 /* vertical sync true */
#define HSYNCTRUE 0x0001 /* horizontal sync true */
/* new defines for bplcon0 */
#define USE_BPLCON3 1
/* new defines for bplcon2 */
#define BPLCON2_ZDCTEN (1<<10) /* colormapped genlock bit */
#define BPLCON2_ZDBPEN (1<<11) /* use bitplane as genlock bits */
#define BPLCON2_ZDBPSEL0 (1<<12) /* three bits to select one */
#define BPLCON2_ZDBPSEL1 (1<<13) /* of 8 bitplanes in */
#define BPLCON2_ZDBPSEL2 (1<<14) /* ZDBPEN genlock mode */
/* defines for bplcon3 register */
#define BPLCON3_EXTBLNKEN (1<<0) /* external blank enable */
#define BPLCON3_EXTBLKZD (1<<1) /* external blank ored into trnsprncy */
#define BPLCON3_ZDCLKEN (1<<2) /* zd pin outputs a 14mhz clock*/
#define BPLCON3_BRDNTRAN (1<<4) /* border is opaque */
#define BPLCON3_BRDNBLNK (1<<5) /* border is opaque */
/* mixture of stuff. */
#define STANDARD_NTSC_ROWS 262
#define STANDARD_PAL_ROWS 312
#define STANDARD_COLORCLOCKS 226
#define STANDARD_DENISE_MAX 455
#define STANDARD_DENISE_MIN 93
#define STANDARD_NTSC_BEAMCON ( 0x0000 )
#define STANDARD_PAL_BEAMCON ( DISPLAYPAL )
#define SPECIAL_BEAMCON ( VARVBLANK | LOLDIS | VARVSYNC | VARHSYNC | VARBEAM | CSBLANK | VSYNCTRUE)
#define MIN_NTSC_ROW 21
#define MIN_PAL_ROW 29
#define STANDARD_VIEW_X 0x81
#define STANDARD_VIEW_Y 0x2C
#define STANDARD_HBSTRT 0x06
#define STANDARD_HSSTRT 0x0B
#define STANDARD_HSSTOP 0x1C
#define STANDARD_HBSTOP 0x2C
#define STANDARD_VBSTRT 0x0122
#define STANDARD_VSSTRT 0x02A6
#define STANDARD_VSSTOP 0x03AA
#define STANDARD_VBSTOP 0x1066
/*
* Prototypes
*/
#if defined (__STDC__)
/* monitor functions */
monitor_t *cc_init_monitor(void);
void monitor_vbl_handler(monitor_t * m);
dmode_t *get_current_mode(void);
dmode_t *get_next_mode(dmode_t * d);
dmode_t *get_best_mode(dimen_t * size, u_char depth);
bmap_t *alloc_bitmap(u_short width, u_short height, u_short depth, u_short flags);
void free_bitmap(bmap_t * bm);
void cc_load_mode(dmode_t * d);
int cc_init_modes(void);
/* mode functions */
monitor_t *cc_get_monitor(dmode_t * d);
view_t *cc_get_current_view(dmode_t * d);
view_t *cc_alloc_view(dmode_t * mode, dimen_t * dim, u_char depth);
colormap_t *cc_alloc_colormap(int depth);
int cc_colormap_checkvals(colormap_t * vcm, colormap_t * cm, int use);
int cc_get_colormap(view_t * v, colormap_t * cm);
int cc_use_colormap(view_t * v, colormap_t * cm);
# if defined (GRF_A2024)
colormap_t *cc_a2024_alloc_colormap(int depth);
int cc_a2024_get_colormap(view_t * v, colormap_t * cm);
int cc_a2024_use_colormap(view_t * v, colormap_t * cm);
# endif /* GRF_2024 */
void cc_mode_vbl_handler(dmode_t * d);
void cc_lace_mode_vbl_handler(dmode_t * d);
/* view functions */
void cc_init_view(view_t * v, bmap_t * bm, dmode_t * mode, box_t * dbox);
void cc_free_view(view_t * v);
void cc_remove_view(view_t * v);
dmode_t * cc_get_display_mode(view_t * v);
# if defined (GRF_NTSC)
dmode_t *cc_init_ntsc_hires(void);
void display_hires_view(view_t * v);
dmode_t *cc_init_ntsc_hires_lace(void);
void display_hires_lace_view(view_t * v);
# if defined (GRF_A2024)
dmode_t *cc_init_ntsc_hires_dlace(void);
void display_hires_dlace_view(view_t * v);
dmode_t *cc_init_ntsc_a2024(void);
void display_a2024_view(view_t * v);
void a2024_mode_vbl_handler(dmode_t * d);
# endif /* GRF_A2024 */
# endif /* GRF_NTSC */
# if defined (GRF_PAL)
dmode_t *cc_init_pal_hires(void);
void display_pal_hires_view(view_t * v);
dmode_t *cc_init_pal_hires_lace(void);
void display_pal_hires_lace_view(view_t * v);
# if defined (GRF_A2024)
dmode_t *cc_init_pal_hires_dlace(void);
void display_pal_hires_dlace_view(view_t * v);
dmode_t *cc_init_pal_a2024(void);
void display_pal_a2024_view(view_t * v);
void pal_a2024_mode_vbl_handler(dmode_t * d);
# endif /* GRF_A2024 */
# endif /* GRF_PAL */
#endif /* __STDC__ */
#endif /* _GRFABS_CCABS_H */

View File

@ -0,0 +1,291 @@
/*
* Copyright (c) 1994 Christian E. Hopps
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Christian E. Hopps.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: grfabs_reg.h,v 1.1 1994/02/13 21:10:36 chopps Exp $
*/
#if ! defined (_GRFABS_REG_H)
#define _GRFABS_REG_H
typedef struct point {
long x;
long y;
} point_t;
typedef struct dimension {
u_long width;
u_long height;
} dimen_t;
typedef struct box {
long x;
long y;
u_long width;
u_long height;
} box_t;
typedef struct rectangle {
long left;
long top;
long right;
long bottom;
} rect_t;
typedef struct bitmap bmap_t;
typedef struct colormap colormap_t;
typedef struct view view_t;
typedef struct display_mode dmode_t;
typedef struct monitor monitor_t;
/*
* Bitmap stuff.
*/
/* Note structure is 5 long words big. This may come in handy for
* contiguous allocations
*
* Please do fill in everything correctly this is the main input for
* all other programs. In other words all problems with RTG start here.
* If you do not mimic everyone else exactly problems will appear.
* If you need a template look at alloc_bitmap() in grf_cc.c.
*
* WARNING: the plane array is only for convience, all data for bitplanes
* MUST be contiguous. This is for mapping purposes. The reason
* for the plane pointers and row_mod is to support interleaving
* on monitors that wish to support this.
*
* 2nd Warning: Also don't get funky with these pointers you are expected
* to place the start of mappable plane data in ``hardware_address'',
* ``hardware_address'' is the only thing that /dev/view checks and it expects
* the planes to follow with no padding in between. If you have
* special alignment requirements make use of the given fields
* so that the entire contiguous plane data is exactly:
* bytes_per_row*height*depth long starting at the physical address
* contained within hardware_address.
*
* Final Warning: Plane data must begin on a PAGE address and the allocation must
* be ``n'' PAGES big do to mapping requirements (otherwise the
* user could write over non-allocated memory.
*
*/
struct bitmap {
u_short bytes_per_row; /* number of bytes per display row. */
u_short row_mod; /* number of bytes to reach next row. */
u_short rows; /* number of display rows. */
u_short depth; /* depth of bitmap. */
u_short flags; /* flags. */
u_short pad;
u_char *blit_temp; /* private monitor buffer. */
u_char **plane; /* plane data for bitmap. */
u_char *hardware_address; /* mappable bitplane pointer. */
};
enum bitmap_flag_bits {
BMB_CLEAR, /* init only. */
BMB_INTERLEAVED, /* init/read. */
};
enum bitmap_flags {
BMF_CLEAR = 1 << BMB_CLEAR, /* init only. */
BMF_INTERLEAVED = 1 << BMB_INTERLEAVED, /* init/read. */
};
/* Use these macros to find misc. sizes of actual bitmap */
#define BM_WIDTH(b) (b->bytes_per_row << 3)
#define BM_HEIGHT(b) (b->rows)
#define BM_ROW(b,p,l) (b->plane[p] + ((b->bytes_per_row+b->row_mod)*l))
/*
* Colormap stuff.
*/
/* valid masks are a bitfield of zeros followed by ones that indicate
* which mask are valid for each component. The ones and zeros will
* be contiguous so adding one to this value yields the number of
* levels for that component.
* -ch
*/
struct colormap {
u_char type; /* what type of entries these are. */
union {
/* CM_GREYSCALE */
u_char grey;
#define grey_mask valid_mask.grey
/* CM_COLOR */
struct {
u_char red;
#define red_mask valid_mask.rgb_mask.red
u_char green;
#define green_mask valid_mask.rgb_mask.green
u_char blue;
#define blue_mask valid_mask.rgb_mask.blue
} rgb_mask;
} valid_mask;
u_short first; /* what color register does entry[0] refer to. */
u_short size; /* number of entries */
u_long *entry;/* the table of actual color values. */
};
enum colormap_type {
CM_MONO, /* only on or off allowed */
CM_GREYSCALE, /* grey vals. */
CM_COLOR /* RGB vals. */
};
#define CM_FIXVAL(x) (0xff&x)
/* these macros are for creating entries */
#define MAKE_COLOR_ENTRY(r,g,b) (CM_FIXVAL(r) << 16 | CM_FIXVAL(g) << 8 | CM_FIXVAL(b))
#define MAKE_MONO_ENTRY(x) (x ? 1 : 0)
#define MAKE_GREY_ENTRY(l) CM_FIXVAL(l)
#define CM_LTOW(v) (((0x000F0000&v)>>8)|((0x00000F00&v)>>4)|(0xF&v))
#define CM_WTOL(v) (((0xF00&v)<<8)|((0x0F0&v)<<4)|(0xF&v))
/*
* View stuff.
*/
typedef void remove_view_func (view_t *v);
typedef void free_view_func (view_t *v);
typedef void display_view_func (view_t *v);
typedef dmode_t *get_mode_func (view_t *v);
typedef int get_colormap_func (view_t *v, colormap_t *);
typedef int use_colormap_func (view_t *v, colormap_t *);
struct view {
bmap_t *bitmap; /* bitmap. */
box_t display; /* viewable area. */
void *data; /* view specific data. */
/* functions */
display_view_func *display_view; /* make this view active */
remove_view_func *remove_view; /* remove this view if active */
free_view_func *free_view; /* free this view */
get_mode_func *get_display_mode; /* get the mode this view belongs to */
get_colormap_func *get_colormap; /* get a color map for registers */
use_colormap_func *use_colormap; /* use color map to load registers */
};
#define VDISPLAY_LINE(v, p, l) ((v)->bitmap->plane[p] +\
(((v)->bitmap->bytes_per_row+(v)->bitmap->row_mod)*l))
/*
* Mode stuff
*/
typedef view_t *alloc_view_func (dmode_t *mode, dimen_t *dim, u_char depth);
typedef view_t *get_current_view_func (dmode_t *);
typedef monitor_t *get_monitor_func (dmode_t *);
struct display_mode {
dll_node_t node; /* a link into a monitor's mode list. */
u_char *name; /* logical name for mode. */
dimen_t nominal_size; /* best fit. */
void *data; /* mode specific flags. */
/* mode functions */
alloc_view_func *alloc_view; /* allocate a view for this mode. */
get_current_view_func *get_current_view; /* get active view. */
get_monitor_func *get_monitor; /* get monitor that mode belongs to */
};
/*
* Monitor stuff.
*/
typedef void vbl_handler_func (void *);
typedef dmode_t *get_next_mode_func (dmode_t *);
typedef dmode_t *get_current_mode_func (void);
typedef dmode_t *get_best_mode_func (dimen_t *size, u_char depth);
typedef bmap_t *alloc_bitmap_func (u_short w, u_short h, u_short d, u_short f);
typedef void free_bitmap_func (bmap_t *bm);
struct monitor {
dll_node_t node; /* a link into the database. */
u_char *name; /* a logical name for this monitor. */
void *data; /* monitor specific data. */
/* funciton interface to this monitor. */
vbl_handler_func *vbl_handler; /* gets called on every vbl if not NULL */
get_next_mode_func *get_next_mode; /* return next mode in list */
get_current_mode_func *get_current_mode; /* return active mode or NULL */
get_best_mode_func *get_best_mode; /* return mode that best fits */
alloc_bitmap_func *alloc_bitmap; /* allocate a bitmap for use with this monitor */
free_bitmap_func *free_bitmap; /* free a bitmap */
};
/*
* Misc draw related macros.
*/
#define BOX_2_RECT(b,r) do { \
(r)->left = (b)->x; (r)->top = (b)->y; \
(r)->right = (b)->x + (b)->width -1; \
(r)->bottom = (b)->y + (b)->height -1; \
} while (0)
#define RECT_2_BOX(r,b) do { \
(b)->x = (r)->left; \
(b)->y = (r)->top; \
(b)->width = (r)->right - (r)->left +1; \
(b)->height = (r)->bottom - (r)->top +1; \
} while (0)
#define INIT_BOX(b,xx,yy,ww,hh) do{(b)->x = xx; (b)->y = yy; (b)->width = ww; (b)->height = hh;}while (0)
#define INIT_RECT(rc,l,t,r,b) do{(rc)->left = l; (rc)->right = r; (rc)->top = t; (rc)->bottom = b;}while (0)
#define INIT_POINT(p,xx,yy) do {(p)->x = xx; (p)->y = yy;} while (0)
#define INIT_DIM(d,w,h) do {(d)->width = w; (d)->height = h;} while (0)
/*
* Prototypes
*/
#if defined (__STDC__)
/* views */
view_t * grf_alloc_view (dmode_t *d, dimen_t *dim, u_char depth);
void grf_display_view (view_t *v);
void grf_remove_view (view_t *v);
void grf_free_view (view_t *v);
dmode_t *grf_get_display_mode (view_t *v);
int grf_get_colormap (view_t *v, colormap_t *cm);
int grf_use_colormap (view_t *v, colormap_t *cm);
/* modes */
view_t *grf_get_current_view (dmode_t *d);
monitor_t *grf_get_monitor (dmode_t *d);
/* monitors */
dmode_t * grf_get_next_mode (monitor_t *m, dmode_t *d);
dmode_t * grf_get_current_mode (monitor_t *);
dmode_t * grf_get_best_mode (monitor_t *m, dimen_t *size, u_char depth);
bmap_t * grf_alloc_bitmap (monitor_t *m, u_short w, u_short h, u_short d, u_short f);
void grf_free_bitmap (monitor_t *m, bmap_t *bm);
#endif /* __STDC__ */
#endif /* _GRFABS_REG_H */

View File

@ -31,32 +31,32 @@
* SUCH DAMAGE.
*
* @(#)dma.c
* $Id: gvp11dma.c,v 1.4 1994/02/11 07:01:46 chopps Exp $
* $Id: gvp11dma.c,v 1.5 1994/02/13 21:10:37 chopps Exp $
*/
/*
* GVP11 (Series II) DMA driver
*/
#include "param.h"
#include "systm.h"
#include "time.h"
#include "kernel.h"
#include "proc.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/time.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include "vm/vm.h"
#include "vm/vm_kern.h"
#include "vm/vm_page.h"
#include "vm/vm_statistics.h"
#include "machine/pmap.h"
#include <vm/vm.h>
#include <vm/vm_kern.h>
#include <vm/vm_page.h>
#include <vm/vm_statistics.h>
#include <machine/pmap.h>
#include "device.h"
#include "gvp11dmareg.h"
#include <amiga/dev/device.h>
#include <amiga/dev/gvp11dmareg.h>
#include "gvp11scsi.h"
#include "dmavar.h"
#include "scsivar.h"
#include <amiga/dev/dmavar.h>
#include <amiga/dev/scsivar.h>
#include "../include/cpu.h"
#include <machine/cpu.h>
extern void timeout();

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)if_le.c 7.6 (Berkeley) 5/8/91
* $Id: if_le.c,v 1.4 1994/02/12 00:00:08 chopps Exp $
* $Id: if_le.c,v 1.5 1994/02/13 21:10:39 chopps Exp $
*/
#include "le.h"
@ -47,46 +47,46 @@
* with VAXen, SUNs, and others that handle and benefit from them.
* This reasoning is dubious.
*/
#include "sys/param.h"
#include "sys/systm.h"
#include "sys/mbuf.h"
#include "sys/buf.h"
#include "sys/protosw.h"
#include "sys/socket.h"
#include "sys/syslog.h"
#include "sys/ioctl.h"
#include "sys/errno.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/mbuf.h>
#include <sys/buf.h>
#include <sys/protosw.h>
#include <sys/socket.h>
#include <sys/syslog.h>
#include <sys/ioctl.h>
#include <sys/errno.h>
#include "net/if.h"
#include "net/netisr.h"
#include "net/route.h"
#include <net/if.h>
#include <net/netisr.h>
#include <net/route.h>
#ifdef INET
#include "netinet/in.h"
#include "netinet/in_systm.h"
#include "netinet/in_var.h"
#include "netinet/ip.h"
#include "netinet/if_ether.h"
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/in_var.h>
#include <netinet/ip.h>
#include <netinet/if_ether.h>
#endif
#ifdef NS
#include "netns/ns.h"
#include "netns/ns_if.h"
#include <netns/ns.h>
#include <netns/ns_if.h>
#endif
#ifdef RMP
#include "netrmp/rmp.h"
#include "netrmp/rmp_var.h"
#include <netrmp/rmp.h>
#include <netrmp/rmp_var.h>
#endif
#include "../include/cpu.h"
#include "../include/mtpr.h"
#include "device.h"
#include "if_lereg.h"
#include <machine/cpu.h>
#include <machine/mtpr.h>
#include <amiga/dev/device.h>
#include <amiga/dev/if_lereg.h>
#if NBPFILTER > 0
#include "../net/bpf.h"
#include "../net/bpfdesc.h"
#include <net/bpf.h>
#include <net/bpfdesc.h>
#endif
#if 0

View File

@ -38,7 +38,7 @@
* from: Utah $Hdr: ite.c 1.1 90/07/09$
*
* from: @(#)ite.c 7.6 (Berkeley) 5/16/91
* $Id: ite.c,v 1.7 1994/02/11 05:02:36 chopps Exp $
* $Id: ite.c,v 1.8 1994/02/13 21:10:42 chopps Exp $
*
* Original author: unknown
* Amiga author:: Markus Wild
@ -58,20 +58,20 @@
#undef NITE
#define NITE NGRF
#include "param.h"
#include "conf.h"
#include "proc.h"
#include "ioctl.h"
#include "tty.h"
#include "systm.h"
#include "malloc.h"
#include <sys/param.h>
#include <sys/conf.h>
#include <sys/proc.h>
#include <sys/ioctl.h>
#include <sys/tty.h>
#include <sys/systm.h>
#include <sys/malloc.h>
#include "itevar.h"
#include "iteioctl.h"
#include "kbdmap.h"
#include <amiga/dev/itevar.h>
#include <amiga/dev/iteioctl.h>
#include <amiga/dev/kbdmap.h>
#include "machine/cpu.h"
#include "../amiga/cons.h"
#include <machine/cpu.h>
#include <amiga/amiga/cons.h>
#ifdef __STDC__
/* automatically generated, as you might guess:-) */
@ -2168,8 +2168,8 @@ itecheckwrap(ip, sp)
/*
* Console functions
*/
#include "grfioctl.h"
#include "grfvar.h"
#include <amiga/dev/grfioctl.h>
#include <amiga/dev/grfvar.h>
#ifdef DEBUG
/*

View File

@ -1,5 +1,5 @@
/*
* $Id: ite_cc.c,v 1.9 1994/02/11 07:01:49 chopps Exp $
* $Id: ite_cc.c,v 1.10 1994/02/13 21:10:45 chopps Exp $
*/
#include "ite.h"
@ -8,27 +8,27 @@
#endif
#if NITE > 0
#include "param.h"
#include "conf.h"
#include "proc.h"
#include "ioctl.h"
#include "tty.h"
#include "systm.h"
#include <sys/types.h>
#include <sys/param.h>
#include <sys/conf.h>
#include <sys/proc.h>
#include <sys/ioctl.h>
#include <sys/tty.h>
#include <sys/systm.h>
#include "ite.h"
#include "itevar.h"
#include "iteioctl.h"
#include "machine/cpu.h"
#include <amiga/dev/itevar.h>
#include <amiga/dev/iteioctl.h>
#include <machine/cpu.h>
#include "../amiga/cc_types.h"
#include "../amiga/cc_chipmem.h"
#include <amiga/amiga/dlists.h>
#include <amiga/amiga/cc.h>
#include "grf/grf_types.h"
#include "grf/grf_view.h"
#include "grf/grf_bitmap.h"
#include "viewioctl.h"
#include "viewvar.h"
#include "termios.h"
#include <amiga/dev/grfabs_reg.h>
#include <amiga/dev/viewioctl.h>
#include <amiga/dev/viewvar.h>
#include <sys/termios.h>
extern unsigned char kernel_font_width, kernel_font_height, kernel_font_baseline;
extern short kernel_font_boldsmear;
@ -48,10 +48,10 @@ typedef struct ite_priv {
/* these are precalc'ed for the putc routine so it can be faster. */
u_int *column_offset; /* array of offsets for columns */
u_int row_offset; /* the row offset */
u_word width; /* the bitmap width */
u_word underline; /* where the underline goes */
u_word ft_x; /* the font width */
u_word ft_y; /* the font height */
u_short width; /* the bitmap width */
u_short underline; /* where the underline goes */
u_short ft_x; /* the font width */
u_short ft_y; /* the font height */
u_char *font_cell[256]; /* the font pointer */
} ipriv_t;
@ -62,7 +62,7 @@ static void view_le32n_cursor(struct ite_softc *ip, int flag);
static void view_le8n_putc(struct ite_softc *ip, int c, int dy, int dx, int mode);
static void view_le8n_clear(struct ite_softc *ip, int sy, int sx, int h, int w);
static void view_le8n_scroll(struct ite_softc *ip, int sy, int sx, int count, int dir);
void scroll_bitmap (bmap_t *bm, u_word x, u_word y, u_word width, u_word height, word dx, word dy, u_byte mask);
void scroll_bitmap (bmap_t *bm, u_short x, u_short y, u_short width, u_short height, short dx, short dy, u_char mask);
/* globals */
@ -146,7 +146,7 @@ ite_new_size (struct ite_softc *ip, struct ite_window_size *vs)
if (cci->column_offset)
free_chipmem (cci->column_offset);
cci->row_ptr = alloc_chipmem (sizeof (u_byte *)*ip->rows);
cci->row_ptr = alloc_chipmem (sizeof (u_char *)*ip->rows);
cci->column_offset = alloc_chipmem (sizeof (u_int)*ip->cols);
if (!cci->row_ptr || !cci->column_offset) {
@ -547,7 +547,7 @@ putc_bd (cci,p,f,co,ro,fw,fh)
register u_int fw;
register u_int fh;
{
u_word ch;
u_short ch;
while (fh--) {
ch = *f++;
@ -568,7 +568,7 @@ putc_bd_in (cci,p,f,co,ro,fw,fh)
register u_int fw;
register u_int fh;
{
u_word ch;
u_short ch;
while (fh--) {
ch = *f++;
@ -591,7 +591,7 @@ putc_bd_ul (cci,p,f,co,ro,fw,fh)
register u_int fh;
{
int underline = cci->underline;
u_word ch;
u_short ch;
while (underline--) {
ch = *f++;
@ -629,7 +629,7 @@ putc_bd_ul_in (cci,p,f,co,ro,fw,fh)
register u_int fh;
{
int underline = cci->underline;
u_word ch;
u_short ch;
while (underline--) {
ch = *f++;
@ -837,10 +837,10 @@ view_le8n_scroll(ip, sy, sx, count, dir)
}
void
scroll_bitmap (bmap_t *bm, u_word x, u_word y, u_word width, u_word height, word dx, word dy, u_byte mask)
scroll_bitmap (bmap_t *bm, u_short x, u_short y, u_short width, u_short height, short dx, short dy, u_char mask)
{
u_word depth = bm->depth;
u_word lwpr = bm->bytes_per_row >> 2;
u_short depth = bm->depth;
u_short lwpr = bm->bytes_per_row >> 2;
if (dx) {
/* FIX: */ panic ("delta x not supported in scroll bitmap yet.");
}

View File

@ -1,25 +1,25 @@
/*
* $Id: ite_rt.c,v 1.5 1994/02/11 07:01:50 chopps Exp $
* $Id: ite_rt.c,v 1.6 1994/02/13 21:10:47 chopps Exp $
*/
#include "ite.h"
#if NITE > 0
#include "param.h"
#include "conf.h"
#include "proc.h"
#include "ioctl.h"
#include "tty.h"
#include "systm.h"
#include <sys/param.h>
#include <sys/conf.h>
#include <sys/proc.h>
#include <sys/ioctl.h>
#include <sys/tty.h>
#include <sys/systm.h>
#include "itevar.h"
#include <amiga/dev/itevar.h>
#include "machine/cpu.h"
#include <machine/cpu.h>
/* XXX */
#include "grfioctl.h"
#include "grfvar.h"
#include "grf_rtreg.h"
#include <amiga/dev/grfioctl.h>
#include <amiga/dev/grfvar.h>
#include <amiga/dev/grf_rtreg.h>
void retina_init(struct ite_softc *ip)
{

View File

@ -31,34 +31,34 @@
* SUCH DAMAGE.
*
* kbd.c
* $Id: kbd.c,v 1.6 1994/02/11 07:01:55 chopps Exp $
* $Id: kbd.c,v 1.7 1994/02/13 21:10:48 chopps Exp $
*/
#include "ite.h"
#if NITE > 0
#include "sys/param.h"
#include "sys/systm.h"
#include "sys/ioctl.h"
#include "sys/tty.h"
#include "sys/proc.h"
#include "sys/conf.h"
#include "sys/file.h"
#include "sys/uio.h"
#include "sys/kernel.h"
#include "sys/syslog.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/ioctl.h>
#include <sys/tty.h>
#include <sys/proc.h>
#include <sys/conf.h>
#include <sys/file.h>
#include <sys/uio.h>
#include <sys/kernel.h>
#include <sys/syslog.h>
#include "device.h"
#include "kbdreg.h"
#include "itevar.h"
#include "machine/cpu.h"
#include <amiga/dev/device.h>
#include <amiga/dev/kbdreg.h>
#include <amiga/dev/itevar.h>
#include <machine/cpu.h>
#include "../amiga/custom.h"
#include "../amiga/cia.h"
#include <amiga/amiga/custom.h>
#include <amiga/amiga/cia.h>
/* for sun-like event mode, if you go thru /dev/kbd. */
#include "event_var.h"
#include "vuid_event.h"
#include <amiga/dev/event_var.h>
#include <amiga/dev/vuid_event.h>
struct kbd_softc {
int k_event_mode; /* if true, collect events, else pass to ite */

View File

@ -1,8 +1,8 @@
/*
* $Id: kbdmap.c,v 1.5 1994/02/11 07:01:56 chopps Exp $
* $Id: kbdmap.c,v 1.6 1994/02/13 21:10:49 chopps Exp $
*/
#include "kbdmap.h"
#include <amiga/dev/kbdmap.h>
/* define a default keymap. This can be changed by keyboard ioctl's
(later at least..) */

View File

@ -44,27 +44,27 @@
* @(#)ms.c 8.1 (Berkeley) 6/11/93
*
* from: Header: ms.c,v 1.5 92/11/26 01:28:47 torek Exp (LBL)
* $Id: ms.c,v 1.1 1994/01/26 21:06:05 mw Exp $
* $Id: ms.c,v 1.2 1994/02/13 21:10:50 chopps Exp $
*/
/*
* Mouse driver.
*/
#include "param.h"
#include "conf.h"
#include "ioctl.h"
#include "kernel.h"
#include "proc.h"
#include "syslog.h"
#include "systm.h"
#include "tty.h"
#include <sys/param.h>
#include <sys/conf.h>
#include <sys/ioctl.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/syslog.h>
#include <sys/systm.h>
#include <sys/tty.h>
#include "event_var.h"
#include "vuid_event.h"
#include <amiga/dev/event_var.h>
#include <amiga/dev/vuid_event.h>
#include "../amiga/custom.h"
#include "../amiga/cia.h"
#include <amiga/amiga/custom.h>
#include <amiga/amiga/cia.h>
#include "mouse.h"
#if NMOUSE > 0

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)ppi.c 7.3 (Berkeley) 12/16/90
* $Id: par.c,v 1.5 1994/02/11 05:02:43 chopps Exp $
* $Id: par.c,v 1.6 1994/02/13 21:10:52 chopps Exp $
*/
/*
@ -41,16 +41,16 @@
#include "par.h"
#if NPAR > 0
#include "sys/param.h"
#include "sys/errno.h"
#include "sys/uio.h"
#include "sys/malloc.h"
#include "sys/file.h"
#include "sys/systm.h"
#include <sys/param.h>
#include <sys/errno.h>
#include <sys/uio.h>
#include <sys/malloc.h>
#include <sys/file.h>
#include <sys/systm.h>
#include "device.h"
#include "parioctl.h"
#include "../amiga/cia.h"
#include <amiga/dev/device.h>
#include <amiga/dev/parioctl.h>
#include <amiga/amiga/cia.h>
int parattach(), parstart(), partimo();
void parintr();

View File

@ -12,24 +12,24 @@
a real /dev/rtclock device, that would allow reading
and setting of the clock very easily.
*
* $Id: rtclocka.c,v 1.3 1994/02/11 07:02:05 chopps Exp $
* $Id: rtclocka.c,v 1.4 1994/02/13 21:10:53 chopps Exp $
*/
#include "rtclocka.h"
#if NRTCLOCKA > 0
#include "sys/param.h"
#include "sys/systm.h"
#include "sys/buf.h"
#include "sys/dkstat.h"
#include "sys/disklabel.h"
#include "sys/malloc.h"
#include "sys/proc.h"
#include "sys/reboot.h"
#include "sys/file.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/buf.h>
#include <sys/dkstat.h>
#include <sys/disklabel.h>
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/reboot.h>
#include <sys/file.h>
#include "device.h"
#include "rtclocka_var.h"
#include <amiga/dev/device.h>
#include <amiga/dev/rtclocka_var.h>
int rtclockainit (register struct amiga_device *ad);

View File

@ -12,24 +12,24 @@
a real /dev/rtclock device, that would allow reading
and setting of the clock very easily.
*
* $Id: rtclockb.c,v 1.3 1994/02/11 07:02:07 chopps Exp $
* $Id: rtclockb.c,v 1.4 1994/02/13 21:10:54 chopps Exp $
*/
#include "rtclockb.h"
#if NRTCLOCKB > 0
#include "sys/param.h"
#include "sys/systm.h"
#include "sys/buf.h"
#include "sys/dkstat.h"
#include "sys/disklabel.h"
#include "sys/malloc.h"
#include "sys/proc.h"
#include "sys/reboot.h"
#include "sys/file.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/buf.h>
#include <sys/dkstat.h>
#include <sys/disklabel.h>
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/reboot.h>
#include <sys/file.h>
#include "device.h"
#include "rtclockb_var.h"
#include <amiga/dev/device.h>
#include <amiga/dev/rtclockb_var.h>
int rtclockbinit (register struct amiga_device *ad);

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)scsi.c 7.5 (Berkeley) 5/4/91
* $Id: scsi.c,v 1.7 1994/02/11 07:02:09 chopps Exp $
* $Id: scsi.c,v 1.8 1994/02/13 21:10:56 chopps Exp $
*
* MULTICONTROLLER support only working for multiple controllers of the
* same kind at the moment !!
@ -51,31 +51,31 @@
#if NSCSI > 0
#ifndef lint
static char rcsid[] = "$Header: /cvsroot/src/sys/arch/amiga/dev/Attic/scsi.c,v 1.7 1994/02/11 07:02:09 chopps Exp $";
static char rcsid[] = "$Header: /cvsroot/src/sys/arch/amiga/dev/Attic/scsi.c,v 1.8 1994/02/13 21:10:56 chopps Exp $";
#endif
/* need to know if any tapes have been configured */
#include "st.h"
#include "sys/param.h"
#include "sys/systm.h"
#include "sys/buf.h"
#include "vm/vm.h"
#include "vm/vm_kern.h"
#include "vm/vm_page.h"
#include "vm/vm_statistics.h"
#include "machine/pmap.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/buf.h>
#include <vm/vm.h>
#include <vm/vm_kern.h>
#include <vm/vm_page.h>
#include <vm/vm_statistics.h>
#include <machine/pmap.h>
#include "device.h"
#include <amiga/dev/device.h>
#include "dmavar.h"
#include "scsidefs.h"
#include "scsivar.h"
#include "scsireg.h"
#include <amiga/dev/dmavar.h>
#include <amiga/dev/scsidefs.h>
#include <amiga/dev/scsivar.h>
#include <amiga/dev/scsireg.h>
#include "../amiga/custom.h"
#include <amiga/amiga/custom.h>
#include "machine/cpu.h"
#include <machine/cpu.h>
extern u_int kvtop();

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)scsidefs.h 7.3 (Berkeley) 2/5/91
* $Id: scsidefs.h,v 1.2 1994/02/11 07:02:10 chopps Exp $
* $Id: scsidefs.h,v 1.3 1994/02/13 21:10:57 chopps Exp $
*/
/*
@ -353,7 +353,7 @@ struct scsi_cache {
* Driver ioctl's for various scsi operations.
*/
#ifndef _IOCTL_
#include "ioctl.h"
#include <sys/ioctl.h>
#endif
/*

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)sd.c 7.8 (Berkeley) 6/9/91
* $Id: sd.c,v 1.7 1994/02/11 07:02:14 chopps Exp $
* $Id: sd.c,v 1.8 1994/02/13 21:10:59 chopps Exp $
*/
/*
@ -54,29 +54,29 @@
#endif
#ifndef lint
static char rcsid[] = "$Header: /cvsroot/src/sys/arch/amiga/dev/Attic/sd.c,v 1.7 1994/02/11 07:02:14 chopps Exp $";
static char rcsid[] = "$Header: /cvsroot/src/sys/arch/amiga/dev/Attic/sd.c,v 1.8 1994/02/13 21:10:59 chopps Exp $";
#endif
#include "sys/types.h"
#include "sys/param.h"
#include "sys/systm.h"
#include "sys/buf.h"
#include "sys/dkstat.h"
#include "sys/disklabel.h"
#include "sys/malloc.h"
#include "sys/proc.h"
#include "sys/reboot.h"
#include "sys/file.h"
#include <sys/types.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/buf.h>
#include <sys/dkstat.h>
#include <sys/disklabel.h>
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/reboot.h>
#include <sys/file.h>
#include "device.h"
#include "scsidefs.h"
#include "vm/vm_param.h"
#include "vm/lock.h"
#include "vm/vm_statistics.h"
#include "vm/pmap.h"
#include "vm/vm_prot.h"
#include <amiga/dev/device.h>
#include <amiga/dev/scsidefs.h>
#include <vm/vm_param.h>
#include <vm/lock.h>
#include <vm/vm_statistics.h>
#include <vm/pmap.h>
#include <vm/vm_prot.h>
#include "rdb.h"
#include <amiga/dev/rdb.h>
struct sd_softc;

View File

@ -31,31 +31,32 @@
* SUCH DAMAGE.
*
* @(#)ser.c 7.12 (Berkeley) 6/27/91
* $Id: ser.c,v 1.9 1994/02/11 07:02:15 chopps Exp $
* $Id: ser.c,v 1.10 1994/02/13 21:11:01 chopps Exp $
*/
#include "ser.h"
#if NSER > 0
#include "sys/param.h"
#include "sys/systm.h"
#include "sys/ioctl.h"
#include "sys/tty.h"
#include "sys/proc.h"
#include "sys/conf.h"
#include "sys/file.h"
#include "sys/malloc.h"
#include "sys/uio.h"
#include "sys/kernel.h"
#include "sys/syslog.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/ioctl.h>
#include <sys/tty.h>
#include <sys/proc.h>
#include <sys/conf.h>
#include <sys/file.h>
#include <sys/malloc.h>
#include <sys/uio.h>
#include <sys/kernel.h>
#include <sys/syslog.h>
#include "device.h"
#include "serreg.h"
#include "machine/cpu.h"
#include <amiga/dev/device.h>
#include <amiga/dev/serreg.h>
#include <machine/cpu.h>
#include "../amiga/custom.h"
#include "../amiga/cia.h"
#include "../amiga/cc.h"
#include <amiga/amiga/custom.h>
#include <amiga/amiga/cia.h>
#include <amiga/amiga/dlists.h>
#include <amiga/amiga/cc.h>
int serprobe();
struct driver serdriver = {
@ -124,7 +125,7 @@ u_char last_ciab_pra;
extern struct tty *constty;
#ifdef KGDB
#include "machine/remote-sl.h"
#include <machine/remote-sl.h>
extern dev_t kgdb_dev;
extern int kgdb_rate;
@ -881,7 +882,7 @@ sermctl(dev, bits, how)
/*
* Following are all routines needed for SER to act as console
*/
#include "../amiga/cons.h"
#include <amiga/amiga/cons.h>
sercnprobe(cp)
struct consdev *cp;

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)siop.c 7.5 (Berkeley) 5/4/91
* $Id: siop.c,v 1.3 1994/02/11 07:02:18 chopps Exp $
* $Id: siop.c,v 1.4 1994/02/13 21:11:03 chopps Exp $
*
* MULTICONTROLLER support only working for multiple controllers of the
* same kind at the moment !!
@ -51,24 +51,24 @@
#if NSIOP > 0
#ifndef lint
static char rcsid[] = "$Header: /cvsroot/src/sys/arch/amiga/dev/siop.c,v 1.3 1994/02/11 07:02:18 chopps Exp $";
static char rcsid[] = "$Header: /cvsroot/src/sys/arch/amiga/dev/siop.c,v 1.4 1994/02/13 21:11:03 chopps Exp $";
#endif
/* need to know if any tapes have been configured */
#include "st.h"
#include "sys/param.h"
#include "sys/systm.h"
#include "sys/buf.h"
#include "device.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/buf.h>
#include <amiga/dev/device.h>
#include "scsidefs.h"
#include "siopvar.h"
#include "siopreg.h"
#include <amiga/dev/scsidefs.h>
#include <amiga/dev/siopvar.h>
#include <amiga/dev/siopreg.h>
#include "../amiga/custom.h"
#include <amiga/amiga/custom.h>
#include "machine/cpu.h"
#include <machine/cpu.h>
extern u_int kvtop();

View File

@ -38,7 +38,7 @@
* from: Utah $Hdr: st.c 1.8 90/10/14$
*
* @(#)st.c 7.3 (Berkeley) 5/4/91
* $Id: st.c,v 1.10 1994/02/11 07:02:22 chopps Exp $
* $Id: st.c,v 1.11 1994/02/13 21:11:04 chopps Exp $
*/
/*
@ -95,20 +95,20 @@
#define NST 4
#endif
#include "param.h"
#include "systm.h"
#include "buf.h"
#include "device.h"
#include "scsidefs.h"
#include "file.h"
#include "tty.h"
#include "proc.h"
#include "mtio.h"
#include "ioctl.h"
#include "kernel.h"
#include "tprintf.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/buf.h>
#include <amiga/dev/device.h>
#include <amiga/dev/scsidefs.h>
#include <sys/file.h>
#include <sys/tty.h>
#include <sys/proc.h>
#include <sys/mtio.h>
#include <sys/ioctl.h>
#include <sys/kernel.h>
#include <sys/tprintf.h>
#include "stvar.h"
#include <amiga/dev/stvar.h>
#define ADD_DELAY

View File

@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: view.c,v 1.3 1994/01/30 08:28:17 chopps Exp $
* $Id: view.c,v 1.4 1994/02/13 21:11:07 chopps Exp $
*/
/* The view major device is a placeholder device. It serves
@ -37,32 +37,29 @@
* refered to by open/close/ioctl. This device serves as
* a interface to graphics. */
#include "param.h"
#include "proc.h"
#include "ioctl.h"
#include "file.h"
#include "malloc.h"
#include <sys/param.h>
#include <sys/proc.h>
#include <sys/ioctl.h>
#include <sys/file.h>
#include <sys/malloc.h>
#include "device.h"
#include <amiga/dev/device.h>
#include "machine/cpu.h"
#include <machine/cpu.h>
#include "vm/vm.h"
#include "vm/vm_kern.h"
#include "vm/vm_page.h"
#include "vm/vm_pager.h"
#include <vm/vm.h>
#include <vm/vm_kern.h>
#include <vm/vm_page.h>
#include <vm/vm_pager.h>
#include "miscfs/specfs/specdev.h"
#include "vnode.h"
#include "mman.h"
#include <miscfs/specfs/specdev.h>
#include <sys/vnode.h>
#include <sys/mman.h>
#include "grf/grf_types.h"
#include "grf/grf_bitmap.h"
#include "grf/grf_view.h"
#include "grf/grf_mode.h"
#include "grf/grf_monitor.h"
#include "viewioctl.h"
#include "viewvar.h"
#include <amiga/amiga/dlists.h>
#include <amiga/dev/grfabs_reg.h>
#include <amiga/dev/viewioctl.h>
#include <amiga/dev/viewvar.h>
#include "view.h"
int viewprobe ();
@ -386,7 +383,7 @@ viewmap(dev, off, prot)
{
struct view_softc *vu = &views[minor(dev)];
bmap_t *bm = vu->view->bitmap;
u_byte *bmd_start = bm->hardware_address;
u_char *bmd_start = bm->hardware_address;
u_long bmd_size = bm->bytes_per_row*bm->rows*bm->depth;
if (off >= 0 && off < bmd_size) {

View File

@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: viewioctl.h,v 1.2 1994/01/29 06:59:40 chopps Exp $
* $Id: viewioctl.h,v 1.3 1994/02/13 21:11:08 chopps Exp $
*/
/* The view major device is a placeholder device. It serves
@ -37,9 +37,6 @@
* refered to by open/close/ioctl. This device serves as
* a interface to graphics. */
#include "grf/grf_bitmap.h"
#include "grf/grf_colormap.h"
struct view_size {
int x;
int y;