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

Re: [MiNT] Half-ugly fullscreen applications, how to recover when things go bump



--------------------------------------------------
From: "Vincent Rivière" <vincent.riviere@freesbee.fr>
Sent: Friday, July 31, 2009 1:48 PM
To: "mint" <mint@fishpool.com>
Subject: Re: [MiNT] Half-ugly fullscreen applications, how to recover when things go bump

Peter Persson wrote:
The biggest problem with this is that when something goes wrong, i.e. if the app crashes, I need to restore the desktop screen and keyboard/mouse/joystick vectors.

The solution to make such cleanup may be GEMDOS vector VEC_CRITICALERR as described here:
http://cd.textfiles.com/ataricompendium/BOOK/HTML/CHAP2.HTM#gdvectors

Another solution could be to hook the 68000 exceptions vectors directly (bus error, adress error...). The MiNT function Psignal() with SIGBUS, etc. may work, or even the signal() function in the MiNTLib.

OS experts should tell us wich method is the good one.

I'm no OS expert, but I think Psigaction() is the way to go. Install a handler for SIGBUS which restores vectors and screen.

Jo Even