[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Device drivers (was Re: strange memory violation)
søn, 06,.11.2005 kl. 15.52 +0100, skrev Patrice Mandin:
> Le Sun, 06 Nov 2005 12:09:31 +0000
> Odd Skancke <email@example.com> a écrit:
> > The optimal solution would be to write a device driver (XDD) to play
> > the modules. Then you have much larger control, the player would be
> > available to any application via /dev/mod, for example, into which you
> > can write the modfile you want to play .. and it plays. If you want
> > your player to work on non-MiNT machines, you would need to write two
> > version of your app. The MiNT version would consist of a 'modplay.xdd'
> > and your player application, whereas the other version will be
> > 'normal'. Perhaps Konrad has a few more hints on this .. Konrad?
> Hmm, do you forget that device drivers must be used only for that:
> accessing the hardware. Plus a module player does not need to be in
> kernel space. A module player just fill a buffer, then send it to the
> audio device. There is a /dev/audio driver for MiNT, but I don't know
> any application that use it, so maybe it does not work, and I don't know
> what its limits are.
Yes, I agree here... which is why I asked exactly why timer D was
needed. However, if very tight timing is needed (only provided by
hardware timers), you need to do the whole 'parsing' in the device
driver, as if the fileformat itself was a device. I'm sure this is not
needed, so basically I agree with you. As Frank mentioned, FreeMiNT
supports timetriggered tasks in a clean way. But I dont know how to use
those .. will change that! :)
> I should try to implement /dev/audio usage for SDL then. And speaking
> for myself, there is still one dirty thing in GEM SDL driver:
> redirecting some vectors in kbdvbase() to read ikbd relative mouse
> motion and ikbd joystick. Why is there no /dev/js for joysticks and
> joypads? It should not be hard to do.
Only reason I can think of, is that noone have written them yet.