From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 15 13:47:36 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF5E316A4B3 for ; Wed, 15 Oct 2003 13:47:36 -0700 (PDT) Received: from smtp-out-02.utu.fi (smtp-out-02.utu.fi [130.232.202.172]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6746243FAF for ; Wed, 15 Oct 2003 13:47:35 -0700 (PDT) (envelope-from lauri.jarvenpaa@students.turkuamk.fi) Received: from vaihtoehto.yok.utu.fi (vaihtoehto.yok.utu.fi [130.232.139.48]) by smtp02.mess.utu.fi (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) with SMTP id <0HMT00L2UGF94L@smtp02.mess.utu.fi> for freebsd-hackers@freebsd.org; Wed, 15 Oct 2003 23:47:33 +0300 (EEST) Date: Thu, 16 Oct 2003 00:00:52 +0300 From: lauri.jarvenpaa@students.turkuamk.fi To: freebsd-hackers@freebsd.org Message-id: <20031016000052.648ca035.lauri.jarvenpaa@students.turkuamk.fi> MIME-version: 1.0 X-Mailer: Sylpheed version 0.9.6 (GTK+ 1.2.10; i386-portbld-freebsd4.9) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: to write a device driver or not to write (i/o, opl3, stupidity) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Oct 2003 20:47:36 -0000 Hello. I'm sorry to disturb you but.. I have read manuals, searched web, fed the ducks (evil ones), but I can not figure out some things. 1: I have an isa card with i/o address 0x300-0x301. No dma, no irq - just i/o. How can I read/write from/to this address to program the card? Card is a HardSID and it is pc implementation of famous Commodore 64 synthesizer chip so actually I want to program that chip, not just _any_ card :) I'm under an impression that there is no way to write directly to ports (like in dos) and that I should write a device driver. Or is there already some generic i/o driver? After intensive reading of manuals, it is still unclear to me what this driver should do and what the drivers usually do. I mean, what services do drivers offer? What services they _need_ to offer? Do they just create appropriate device nodes and let the applications to worry about using them or do they do some data manipulation or do they offer routines and interfaces for applications or what? What should this particular driver do as I just want to read/write data. 2: Also, there is an OPL3 synthesizer chip in older Sound Blasters and compatibles. Man pages say this chip is supported. I just wonder, how it is supported? How do I read/write from/to this chip if I know i/o address of it? Yes I'm stupid but please, little bit of mercy? 3: Then, there is /dev/midi and /dev/sequencer. If I want to read incoming midi data I read /dev/midi right? When do I want to read /dev/sequencer? Thanks, lauri j