[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Supexec taking one VBL?
Le Wed, 10 Sep 2008 09:55:00 +0200
"Miro Kropacek" <miro.kropacek@gmail.com> a _crit:
> > What I had in mind was that if demo/game coders can agree that libSDL
> > fulfills their needs then the SDL *API* could perhaps be made part of
> > the OS so it'd have direct and fast access to hardware, while on
> > singletasking system the normal libSDL would be used to deliver the same
> > API for the programmer.
>
> Yes but you still didn't explain how do you want to solve that handler
> problem. You made API, kernel API, cool. But there's still userspace
> application vs kernelspace VBL handler problem.
That is the big problem with MiNT. There is simply no device driver
(or maybe old/buggy) written for the peripherals you need in a game or
a demo.
Even if you want to code stuff without having to switch to supervisor
mode, you quickly see you lack many things.
I would like SDL to not hook some system vectors at all, but even under
MiNT this is needed:
- reading joystick/joypad status (requires hw access, hence supervisor
mode).
- reading mouse motion, currently opening /dev/mouse prevent any further
mouse event to be sent to the AES.
- being able to read keypress/key release events and the associated
scancode (+ascii or unicode) code.
All of these could be easily achieved through a proper device driver
for input devices.
For the other, that is maybe possible under current MiNT release (need
info about it):
- Having a thread to run the SDL timers routine. I currently use one of
the vbl queue vectors for that, and it does not work that well.
- Having a thread feeding the audio device. I wonder if
current /dev/audio is good enough. I use the Timer A audio interrupt to
call the application callback function to fill the audio buffer, not a
good idea of course if the routine is very long to execute.
Any SDL app need to have Super flag set in its header, for the above
reasons. And keeping stuff running also for TOS at the same time is
tricky, if you don't have any device driver to use.
--
Patrice Mandin
WWW: http://pmandin.atari.org/
Programmeur Linux, Atari
Spécialité: Développement, jeux