openbsd-ports/emulators/bochs/patches/patch-gui_macintosh_cc
todd 923f7975fe o take over maintainership
o too many changes to mention specifically, but amongst them:
	- better error reporting
	- openbsd boots, freebsd boots
	- new 'term' flavor, I added a textmode interface, the only drawback
	  is that control-c is intercepted, and you must kill -9 it from
	  another tty if it doesn't exit normally
	- new flavors:
		- debugger -> debug (for shortness)
		- i386
		- pci
		- smp
		- net (compiles, does not yet provide networking, if anyone
			wants to help, I'd be ELATED to have this fixed!)
		- no_x11 (made it actually work)
		- term (make sure to use 'log: /dev/null' or something else
		  on the cmdline, otherwise, debugging and the screen will
		  start getting quite confusing!)
	- better error reporting (and no error reporting where it is not
	  necessary; a typicall boot of cdrom28.fs is a screenful of output now)
	- in general, if the hardware reaches an unknown state, fail
	  gracefully instead of calling exit(1) .. are we trying to work or
	  are we trying to .. fail?  I like working myself.
2001-02-02 16:59:05 +00:00

99 lines
3.2 KiB
Plaintext

$OpenBSD: patch-gui_macintosh_cc,v 1.1 2001/02/02 16:59:10 todd Exp $
--- gui/macintosh.cc.orig Sat Mar 25 21:45:26 2000
+++ gui/macintosh.cc Fri Oct 20 11:38:32 2000
@@ -221,7 +221,7 @@ void CreateTile(void)
err = NewGWorld(&gOffWorld, 8,
&srcTileRect, gCTable, NULL, useTempMem);
if (err != noErr)
- bx_panic("mac: can't create gOffWorld");
+ bio->panic("mac: can't create gOffWorld");
SetGWorld(gOffWorld, NULL);
@@ -236,7 +236,7 @@ void CreateTile(void)
(**gTile).pmTable = gCTable;
}
else
- bx_panic("mac: can't create gTile");
+ bio->panic("mac: can't create gTile");
SetGWorld(savePort, saveDevice);
}
@@ -244,7 +244,7 @@ void CreateTile(void)
{
gTile = CreatePixMap(0, 0, srcTileRect.right, srcTileRect.bottom, 8, gCTable);
if (gTile == NULL)
- bx_panic("mac: can't create gTile");
+ bio->panic("mac: can't create gTile");
}
}
@@ -282,7 +282,7 @@ void CreateWindows(void)
toolwin = NewCWindow(NULL, &winRect, "\pMacBochs 586", true, floatProc,
(WindowPtr)-1, false, 0);
if (toolwin == NULL)
- bx_panic("mac: can't create tool window");
+ bio->panic("mac: can't create tool window");
// Create a moveable tool window for the "headerbar"
SetRect(&winRect, l, t, r, b);
@@ -292,7 +292,7 @@ void CreateWindows(void)
win = NewCWindow(NULL, &winRect, "\pMacBochs 586", true, documentProc,
(WindowPtr)-1, true, 1);
if (win == NULL)
- bx_panic("mac: can't create emulator window");
+ bio->panic("mac: can't create emulator window");
FixWindow();
@@ -324,6 +324,13 @@ void CreateWindows(void)
void bx_gui_c::specific_init(bx_gui_c *th, int argc, char **argv, unsigned tilewidth, unsigned tileheight,
unsigned headerbar_y)
{
+
+// if not using debugger, then we can take control of SIGINT.
+// If using debugger, it needs control of this.
+#if BX_DEBUGGER==0
+ signal(SIGINT, bx_signal_handler);
+#endif
+
InitToolbox();
//SouixWin = FrontWindow();
@@ -495,7 +502,7 @@ void HandleMenuChoice(long menuChoice)
switch(item)
{
case iQuit:
- bx_panic("User terminated");
+ bio->panic("User terminated");
break;
default:
@@ -1429,7 +1436,7 @@ void CreateKeyMap(void)
KCHR = NewPtrClear(390);
if (KCHR == NULL)
- bx_panic("mac: can't allocate memory for key map");
+ bio->panic("mac: can't allocate memory for key map");
BlockMove(KCHRHeader, KCHR, sizeof(KCHRHeader));
BlockMove(KCHRTable, Ptr(KCHR + sizeof(KCHRHeader)), sizeof(KCHRTable));
}
@@ -1473,7 +1480,7 @@ BitMap *CreateBitMap(unsigned width, uns
row_bytes = (( width + 31) >> 5) << 2;
bm = (BitMap *)calloc(1, sizeof(BitMap));
if (bm == NULL)
- bx_panic("mac: can't allocate memory for pixmap");
+ bio->panic("mac: can't allocate memory for pixmap");
SetRect(&bm->bounds, 0, 0, width, height);
bm->rowBytes = row_bytes;
// Quickdraw allocates a new color table by default, but we want to
@@ -1495,7 +1502,7 @@ PixMapHandle CreatePixMap(unsigned left,
row_bytes = (((long) depth * ((long) width) + 31) >> 5) << 2;
pm = NewPixMap();
if (pm == NULL)
- bx_panic("mac: can't allocate memory for pixmap");
+ bio->panic("mac: can't allocate memory for pixmap");
(**pm).bounds.left = left;
(**pm).bounds.top = top;
(**pm).bounds.right = left+width;