Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Oct 2003 00:00:52 +0300
From:      lauri.jarvenpaa@students.turkuamk.fi
To:        freebsd-hackers@freebsd.org
Subject:   to write a device driver or not to write (i/o, opl3, stupidity)
Message-ID:  <20031016000052.648ca035.lauri.jarvenpaa@students.turkuamk.fi>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031016000052.648ca035.lauri.jarvenpaa>