From: Christian B. <cb...@st...> - 2000-11-28 14:13:15
|
Hi! On Tue, Nov 28, 2000 at 11:41:15AM +1100, ni...@in... wrote: > * Since this isn't an X windows port, I really cannot use > the Unix directory for video and main. So, is a directory > 'MacOSX' at the same level as Amiga, BeOS and Unix OK? This is better, especially if you intend to switch from autoconf/Makefiles to an IDE. > [NMI/Reset] > The sensible way to do this would seem to be to define two new > interrupt flags in main.h, e.g.: > INTFLAG_NMI = 32 // Non maskable interrupt > INTFLAG_RESET = 64 // Hard reset > and handle those in the emulator. Not really. The INTFLAGS are for decoding level 1 interrupts. There's a TriggerNMI() in cpu_emulation.h which is currently unimplemented for the UAE CPU emulation (it works under AmigaOS, though). I think the BeOS port once had a "reset" capability, but it seems to have got lost somehow. Adding a Reset680x0() function might be in order. > Now, I can see that TriggerInterrupt() sets a bit to tell > something else to handle an interrupt, but I cannot see what > actually processes the InterruptFlags variable. EmulOp()/M68K_EMUL_OP_IRQ tests them. > (e.g. why does Unix need an XPRAM watchdog? The XPRAM contents are normally only saved when B2 quits. To avoid changes to the XPRAM from getting lost when the emulator crashes, a background thread looks for XPRAM changes every minute and saves the XPRAM if necessary. > why does Unix use this: > #ifdef NANOSLEEP > struct timespec req = {1, 0}; > nanosleep(&req, NULL); > #else > usleep(1000000); > #endif > to sleep for a minute when sleep(60); would suffice?) I think I just copied the sleep code from some other function. I also like nanosleep() better than sleep() because it doesn't mess with signals. Bye, Christian -- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/ |