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

[MiNT] Application compatibility



On Wed, 2005-07-13 at 23:23 +0000, Odd Skancke wrote: 
>  Yes, some apps stray so far from Atari's programming guidelines that
> they will never work under MP/VM no matter how good the implementation.
> Yet another compatibility problem .. what do we do about it?

Once the MP is good enough that these apps can't harm anyone or anything
but themselves (they die), then you can start addressing specific
concerns.  My idea was for a partial virtual machine, making certain
attributes inheritable from the parent, such as VDI physical/parent
workstation, make logbase per application, have physbase mapped via the
MMU, have other hardware vectors and such remapped via the MMU - sound,
timers, and MIDI come to mind.

For example, if an application writes directly to the screen or assumes
a specific resolution or color depth, it would be possible to have this
application write to a memory buffer instead, either with VDI tricks
and/or mapping the screen to memory via the MMU.

I think the way this works is ... when the app tries to do a direct
screen memory write, a page fault occurs due to write protection.  The
fault is caught, write protection removed, and the page is marked dirty.
Now we know the app was bad, so we can begin a virtual update.  The
dirty pages are blitted to a window on the real screen every vblank
until we stop finding dirty pages, at which point you can mark it write
protected and kill the vblank handler and start over.