--- uae/src/NeXTwin.m 2018/04/24 16:38:39 1.1 +++ uae/src/NeXTwin.m 2018/04/24 16:39:08 1.1.1.2 @@ -22,13 +22,20 @@ #include "xwin.h" #include "keyboard.h" #include "keybuf.h" +// If you are compiling on NeXTStep 3.2, uncomment the following line: +//#define NX_EightBitRGBDepth 514 + +int sigbrkhandler() +{ + activate_debugger(); + signal(SIGINT, sigbrkhandler); +} void setup_brkhandler(void) { + signal(SIGINT, sigbrkhandler); } -// If you are compiling on NeXTStep 3.2, uncomment the following line: -// #define NX_EightBitRGBDepth 514 struct vidbuf_description gfxvidinfo; @@ -39,9 +46,9 @@ int commandKey = -1; int quit_program; -BOOL buttonstate[3]; +int buttonstate[3]; int lastmx, lastmy; -BOOL newmousecounters; +int newmousecounters; long int xcolors[4096]; static NXCursor *cursor; @@ -81,13 +88,13 @@ static int keycode2amiga(NXEvent * theEv @implementation AmigaView -reset:sender { - MC68000_reset(); + m68k_reset(); return self; } -quit:sender { broken_in = TRUE; - specialflags |= SPCFLAG_BRK; + regs.spcflags |= SPCFLAG_BRK; quit_program = 1; return self; } @@ -275,7 +282,7 @@ void flush_block (int ystart, int ystop) [tmpBitmap free]; } -void flush_screen (void) +void flush_screen (int from, int to) { return; //This simple version is no longer required... @@ -292,7 +299,7 @@ void flush_line(int y) } -void graphics_init(void) +int graphics_init(void) { int i; NXRect rect; @@ -310,7 +317,8 @@ void graphics_init(void) [NXApp run]; screen=[NXApp delegate]; - + [NXApp setDelegate:nil]; + [[screen window] addToEventMask:NX_RMOUSEDOWNMASK|NX_RMOUSEUPMASK]; cursor=[[NXCursor alloc] initFromImage:[NXImage findImageNamed:"dummy"]]; @@ -366,6 +374,8 @@ void graphics_init(void) break; } case NX_EightBitGrayDepth: + case NX_TwoBitGrayDepth: + default: { for(i = 0; i < 4096; i++) { @@ -392,8 +402,13 @@ void graphics_init(void) gfxvidinfo.pixbytes=1; break; } +#if 0 + //Sorry 2bit screeners (self included!) + //Bernd won't support special code just for us NeXTStation owners + //and I don't have time any more, + //So we have to use 8bit, and dither :-( + //On the brigh side, it looks great (eventually!) case NX_TwoBitGrayDepth: - default: { for(i = 0; i < 4096; i++) { @@ -420,6 +435,7 @@ void graphics_init(void) ]; gfxvidinfo.pixbytes=0; //bit of a hack!... } +#endif } gfxvidinfo.rowbytes=[bitmap bytesPerRow]; gfxvidinfo.bufmem=[bitmap data]; @@ -427,6 +443,8 @@ void graphics_init(void) gfxvidinfo.maxlinetoscr = 0; gfxvidinfo.x_adjust = 0; gfxvidinfo.maxline = 100000; /* ??? */ + + return 1; } @@ -573,12 +591,12 @@ void handle_events(void) } } -BOOL debuggable(void) +int debuggable(void) { return TRUE; } -BOOL needmousehack(void) +int needmousehack(void) { return TRUE; } @@ -614,3 +632,4 @@ void calc_adjustment(void) void target_specific_usage(void) { } +