[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Supexec taking one VBL?



Frank Naumann píše v Út 09. 09. 2008 v 13:37 +0200:

> It's nice that you like to write clean and FreeMiNT friendly demo 
> applications. I really appreciate this and like to help as I can. For lot 
> of things this is easily possible without lot of work or overhead.
> 
> But running a part of your userspace application inside the operating 
> system violates the rules. Even if we design a new system call we will end 
> up with something like Super/Supexec or whatever (maybe with some more 
> protection and checks, but if your handler crash you crash the system).

I think you're mixing two different things together here:

First, XBIOS must be fixed. Miro kind of volunteered to write that and
implement it in the MiNTlib. It obviously belongs to FreeMiNT directly.
With fixed XBIOS there is no need to access the hardware registers
directly, not even from a VBL-like interrupt (of course the fixed XBIOS
or new YBIOS or however you name it would be fully re-entrant and would
work from interrupts, if needed, though might not be needed at all, see
below).

Second, Miro wanted to change certain things (like background color) at
the moment when the ray running in the cathode is turned off and slowly
moving from bottom right corner to the upper left (try to imagine it on
your new LCD :-). This is traditionally called a VBL, Vertical BLank.
But please note Miro's backcolor changing routine does not need to be
called from within the very hardware interrupt - it would be enough if
the FreeMiNT sent an awake signal to his routine when the VBL occurs,
and sort of guaranteed that context switch occurs quickly enough so that
the routine waiting for the signal is executed at the right time (while
the screen is in the blank).

Does it make sense?

Petr