Subject: Re: Direct hardware access
To: None <port-arm32@NetBSD.ORG>
From: Robert Black <r.black@ic.ac.uk>
List: port-arm32
Date: 09/25/1996 11:35:48
On Sep 22,  1:20pm, Peter Berg wrote:
> Subject: Direct hardware access
> Hi,
>
> Is it possible to access any hardware directly from user programs (e.g.
> direct access to the VRAM from a self written library or direct access
> to a midi card) ?

In general, no.

> Direct VRAM access would make it possible to write svgalib for
> rbsd from scratch. Then you could compile some games written for linux.

The console driver does, however, allow you to memory map the screen using the
mmap() syscall (see the man page for details). You can use ioctls to access
things like the palette. Look at /usr/include/machine/{vconsole.h,vidc.h}

> Because I have no knowledge how to write a device driver for the kernel
> and it seems noone else but me needs MIDI support under rbsd I have to
> make it that way.
>
> Anyway, how big is the kernel source tree and how kerneldevices are
> written ?

You probably ought to allow about 50Megs given that you actually want some
elbow room and need to be able to build the thing. Probably the best thing to
do is look through the source tree for a MIDI driver in some other NetBSD port
and try to convert it. This shouldn't be too hard if you know what you need to
do to the hardware.

Cheers

Rob

--