1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-03-15 06:21:56 +00:00

Compare commits

...

4 Commits

Author SHA1 Message Date
Nick Briggs
fd90bbf9b9 Ignore mouse motion events when the window does not have keyboard focus 2024-08-15 20:36:26 -07:00
Nick Briggs
cec93e6ae5 Set up makeright etc. to allow for easier compilation of alternate versions
The makeright script and the makefile-* slices it depends are modified
to allow easily specifying the RELEASE version number of the Maiko emulator
to be built.  The default version remains 351, but can be changed with e.g.

RELEASE=201 ./makeright x

The object directories and executables are NOT named with the version.
2024-08-05 17:13:01 -07:00
Nick Briggs
72e26ca033 Fix compilation for maiko version 201
Version 201 did not have NEWCDRCODING, so the implementation of
N_OP_rplcons requires definitions from gcdata.h and address.h
2024-08-05 16:23:54 -07:00
Nick Briggs
f6f833c612 Fix compilation for maiko version 201
Version 201 does not have BIGVM, so SWA_FNHEAD requires swapx
which is defined in byteswapdefs.h
2024-08-05 16:20:09 -07:00
43 changed files with 68 additions and 43 deletions

View File

@@ -15,7 +15,7 @@ XFLAGS = -DSDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=351
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -lm -L/usr/local/lib -lSDL2
#

View File

@@ -18,7 +18,7 @@ XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=351
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm

View File

@@ -19,7 +19,7 @@ XFLAGS = -I/opt/X11/include -DXWINDOW
OPTFLAGS = -O2 -g
DEBUGFLAGS = # -DDEBUG -DOPTRACE
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) \
-DRELEASE=351 # -DSTACKCHECK -DFSBCHECK -DPCTRACE
-DRELEASE=$(RELEASE) # -DSTACKCHECK -DFSBCHECK -DPCTRACE
LDFLAGS = -L/opt/X11/lib -lX11 -lm
LDELDFLAGS = -L/opt/X11/lib -lX11 -lm

View File

@@ -16,7 +16,7 @@ SDLFLAGS = -DSDL=2 -F /Library/Frameworks
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g
DEBUGFLAGS = # -DDEBUG -DOPTRACE
DFLAGS = $(DEBUGFLAGS) $(SDLFLAGS) -DRELEASE=351
DFLAGS = $(DEBUGFLAGS) $(SDLFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -rpath /Library/Frameworks -F /Library/Frameworks -framework SDL2
LDELDFLAGS =

View File

@@ -18,7 +18,7 @@ XFLAGS = -I/opt/X11/include -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2
DEBUGFLAGS = # -DDEBUG -DOPTRACE
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=351
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/opt/X11/lib -lX11 -lm
LDELDFLAGS = -L/opt/X11/lib -lX11 -lm

View File

@@ -19,7 +19,7 @@ XFLAGS = -I/usr/X11/include -DXWINDOW
OPTFLAGS = -O2 -g
DEBUGFLAGS = # -DDEBUG -DOPTRACE
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) \
-DRELEASE=351
-DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/X11/lib -lX11 -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lm

View File

@@ -15,7 +15,7 @@ SDLFLAGS = -DSDL=2 -F /Library/Frameworks
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g
DEBUGFLAGS = # -DDEBUG -DOPTRACE
DFLAGS = $(DEBUGFLAGS) $(SDLFLAGS) -DRELEASE=351
DFLAGS = $(DEBUGFLAGS) $(SDLFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -rpath /Library/Frameworks -F /Library/Frameworks -framework SDL2
LDELDFLAGS =

View File

@@ -18,7 +18,7 @@ XFLAGS = -I/opt/X11/include -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O1 -g
DEBUGFLAGS = # -DDEBUG -DOPTRACE
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=351
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/opt/X11/lib -lX11 -lm
LDELDFLAGS = -L/opt/X11/lib -lX11 -lm

View File

@@ -14,7 +14,7 @@ XFLAGS = -DSDL=2 -sUSE_SDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2
DFLAGS = $(XFLAGS) -DRELEASE=351 -DMAIKO_ENABLE_NETHUB
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE) -DMAIKO_ENABLE_NETHUB
MEDLEY?=../../medley
SYSOUT?=$(MEDLEY)/loadups/full.sysout

View File

@@ -14,7 +14,7 @@ XFLAGS = -DSDL=2 -sUSE_SDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2
DFLAGS = $(XFLAGS) -DRELEASE=351 -DMAIKO_ENABLE_NETHUB
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE) -DMAIKO_ENABLE_NETHUB
MEDLEY?=../../medley
SYSOUT?=$(MEDLEY)/loadups/full.sysout

View File

@@ -14,7 +14,7 @@ SDLFLAGS = -DSDL=2 -I/usr/local/include
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g
DFLAGS = $(SDLFLAGS) -DRELEASE=351
DFLAGS = $(SDLFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/local/lib -lSDL2 -lm
LDELDFLAGS =

View File

@@ -17,7 +17,7 @@ XFLAGS = -I/usr/local/include -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g
DFLAGS = $(XFLAGS) -DRELEASE=351
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/local/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/local/lib -lX11 -lc -lm

View File

@@ -14,7 +14,7 @@ SDLFLAGS = -DSDL=2 -I/usr/local/include
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g
DFLAGS = $(SDLFLAGS) -DRELEASE=351
DFLAGS = $(SDLFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/local/lib -lSDL2 -lm
LDELDFLAGS =

View File

@@ -17,7 +17,7 @@ XFLAGS = -I/usr/local/include -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g
DFLAGS = $(XFLAGS) -DRELEASE=351
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/local/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/local/lib -lX11 -lc -lm

View File

@@ -14,7 +14,7 @@ SDLFLAGS = -DSDL=2 -I/usr/local/include
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g
DFLAGS = $(SDLFLAGS) -DRELEASE=351
DFLAGS = $(SDLFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/local/lib -lSDL2 -lm
LDELDFLAGS =

View File

@@ -17,7 +17,7 @@ XFLAGS = -I/usr/local/include -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g
DFLAGS = $(XFLAGS) -DRELEASE=351
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/local/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/local/lib -lX11 -lc -lm

View File

@@ -15,7 +15,7 @@ XFLAGS = -DSDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=351
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -lSDL2 -lnetwork
LDELDFLAGS = -lnetwork -lbsd

View File

@@ -18,7 +18,7 @@ XFLAGS = -I/opt/X11/include -DXWINDOW
# OPTFLAGS is normally -O2, for INIT we want unoptimized in case we need to debug it
OPTFLAGS = -O0 -g
DEBUGFLAGS =
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=351 -DNOVERSION -DINIT
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT
LDFLAGS = -L/usr/X11/lib -lX11 -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lm

View File

@@ -18,7 +18,7 @@ XFLAGS = -I/opt/X11/include -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O0 -g3
DEBUGFLAGS = # -DDEBUG -DOPTRACE
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=351 -DNOVERSION -DINIT
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT
LDFLAGS = -L/opt/X11/lib -lX11 -lm
LDELDFLAGS = -L/opt/X11/lib -lX11 -lm

View File

@@ -18,7 +18,7 @@ XFLAGS = -I/opt/X11/include -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O0 -g
DEBUGFLAGS = # -DDEBUG -DOPTRACE
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=351 -DNOVERSION -DINIT
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT
LDFLAGS = -L/opt/X11/lib -lX11 -lm
LDELDFLAGS = -L/opt/X11/lib -lX11 -lm

View File

@@ -17,7 +17,7 @@ XFLAGS = -I/usr/local/include -DXWINDOW
# OPTFLAGS is normally -O0 for init
OPTFLAGS = -O0 -g
DFLAGS = $(XFLAGS) -DRELEASE=351 -DNOVERSION -DINIT
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT
LDFLAGS = -L/usr/local/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/local/lib -lX11 -lc -lm

View File

@@ -17,7 +17,7 @@ XFLAGS = -I/usr/local/include -DXWINDOW
# OPTFLAGS is normally -O0 for init
OPTFLAGS = -O0 -g
DFLAGS = $(XFLAGS) -DRELEASE=351 -DNOVERSION -DINIT
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT
LDFLAGS = -L/usr/local/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/local/lib -lX11 -lc -lm

View File

@@ -17,7 +17,7 @@ XFLAGS = -I/usr/local/include -DXWINDOW
# OPTFLAGS is normally -O0 for init
OPTFLAGS = -O0 -g
DFLAGS = $(XFLAGS) -DRELEASE=351 -DNOVERSION -DINIT
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT
LDFLAGS = -L/usr/local/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/local/lib -lX11 -lc -lm

View File

@@ -19,7 +19,7 @@ XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2, for INIT we want unoptimized in case we need to debug it
OPTFLAGS = -O0 -g
DEBUGFLAGS =
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=351 -DNOVERSION -DINIT
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm

View File

@@ -19,7 +19,7 @@ XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2, for INIT we want unoptimized in case we need to debug it
OPTFLAGS = -O0 -g
DEBUGFLAGS =
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=351 -DNOVERSION -DINIT
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm

View File

@@ -17,7 +17,7 @@ XFLAGS = -I/usr/X11R6/include -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=351 -DNOVERSION -DINIT
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT
LDFLAGS = -L/usr/X11R6/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11R6/lib -lX11 -lc -lm

View File

@@ -50,7 +50,7 @@ DFLAGS = -DINIT \
$(XFLAGS) \
$(DEBUGFLAGS) \
$(MACHINEFLAGS) \
-DNOVERSION -DRELEASE=351
-DNOVERSION -DRELEASE=$(RELEASE)
LDFLAGS = -lX11 -lc -lm -lsocket -lnsl

View File

@@ -15,7 +15,7 @@ XFLAGS = -DSDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=351
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -lm -lSDL2
LDELDFLAGS =

View File

@@ -17,7 +17,7 @@ XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=351
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm

View File

@@ -15,7 +15,7 @@ SDLFLAGS = -DSDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(SDLFLAGS) -DRELEASE=351
DFLAGS = $(SDLFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -lSDL2 -lm
LDELDFLAGS =

View File

@@ -17,7 +17,7 @@ XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=351
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm

View File

@@ -15,7 +15,7 @@ XFLAGS = -DSDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=351
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -lm -lSDL2
LDELDFLAGS =

View File

@@ -17,7 +17,7 @@ XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=351
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm

View File

@@ -15,7 +15,7 @@ XFLAGS = -DSDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=351
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -lm -lSDL2
LDELDFLAGS =

View File

@@ -18,7 +18,7 @@ XFLAGS = -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=351
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm

View File

@@ -17,7 +17,7 @@ XFLAGS = -I/usr/X11R6/include -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=351
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/X11R6/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11R6/lib -lX11 -lc -lm

View File

@@ -36,7 +36,7 @@ DEBUGFLAGS = # -DSTACKCHECK -DFNSTKCHECK
DFLAGS = $(XFLAGS) \
$(DEBUGFLAGS) \
-DOS5 \
-DRELEASE=351
-DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm -lsocket -lnsl
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm -lsocket -lnsl

View File

@@ -45,7 +45,7 @@ MACHINEFLAGS = -DOS5 -DUSE_DLPI
DFLAGS = $(XFLAGS) \
$(DEBUGFLAGS) \
$(MACHINEFLAGS) \
-DRELEASE=351
-DRELEASE=$(RELEASE)
LDFLAGS = -lX11 -lc -lm -lsocket -lnsl
LDELDFLAGS = -lX11 -lc -lm -lsocket -lnsl

View File

@@ -37,7 +37,7 @@ DFLAGS = $(XFLAGS) \
$(DEBUGFLAGS) \
-DOS5 \
-DUSE_DLPI \
-DRELEASE=351
-DRELEASE=$(RELEASE)
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm -lsocket -lnsl
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm -lsocket -lnsl

View File

@@ -54,9 +54,10 @@ if test $# -gt 0
shift
fi
: ${RELEASE=351}
architecture=`machinetype`
osversion=`osversion`
echo "making so far for ${osversion} on ${architecture}."
echo "making release ${RELEASE} for ${osversion} on ${architecture}."
case "$display" in
init) display=single
releasename=init-${osversion}.${architecture}
@@ -106,12 +107,12 @@ if [ ! -d ../${releasename} ]; then
mkdir ../${releasename}
fi
echo start making lde for ${releasename}.
echo start making lde for ${releasename}
# then finally do the make, including the right stuff
# With makefile-tail merged, this should only take ONE make command....
make RELEASENAME=${releasename} LDENAME=${ldename} \
make RELEASENAME=${releasename} RELEASE=${RELEASE} LDENAME=${ldename} \
OSARCHNAME=${osversion}.${architecture} \
-f makefile-header -f makefile-${releasename} \
-f makefile-tail $*

View File

@@ -35,6 +35,7 @@
#ifdef BIGVM
#define SWA_FNHEAD
#else
#include "byteswapdefs.h" // for swapx
#define SWA_FNHEAD swapx
#endif /* BIGVM */

View File

@@ -29,6 +29,10 @@
#include "lspglob.h"
#include "lsptypes.h" // for Listp
#include "rplconsdefs.h" // for N_OP_rplcons
#ifndef NEWCDRCODING
#include "gcdata.h"
#include "address.h"
#endif
/***************************************************/

View File

@@ -46,7 +46,7 @@ static Uint32 sdl_foreground;
static Uint32 sdl_background;
static int sdl_bytesperpixel;
static SDL_PixelFormat *sdl_pixelformat;
static int sdl_window_focusp = 0;
extern void kb_trans(u_short keycode, u_short upflg);
extern int error(const char *s);
@@ -625,6 +625,22 @@ void process_SDLevents() {
sdl_windowheight = event.window.data2;
sdl_update_viewport(sdl_windowwidth, sdl_windowheight);
break;
case SDL_WINDOWEVENT_ENTER:
break;
case SDL_WINDOWEVENT_LEAVE:
break;
case SDL_WINDOWEVENT_SHOWN:
break;
case SDL_WINDOWEVENT_HIDDEN:
break;
case SDL_WINDOWEVENT_EXPOSED:
break;
case SDL_WINDOWEVENT_FOCUS_GAINED:
sdl_window_focusp = 1;
break;
case SDL_WINDOWEVENT_FOCUS_LOST:
sdl_window_focusp = 0;
break;
}
break;
#else
@@ -673,6 +689,7 @@ void process_SDLevents() {
int ix, iy;
float x, y;
#endif
if (!sdl_window_focusp) break;
SDL_GetMouseState(&x, &y);
x /= sdl_pixelscale;
y /= sdl_pixelscale;
@@ -727,6 +744,8 @@ void process_SDLevents() {
printf("mousewheel mouse %d x %d y %d direction %s\n", event.wheel.which, event.wheel.x,
event.wheel.y,
event.wheel.direction == SDL_MOUSEWHEEL_NORMAL ? "normal" : "flipped");
*/
/*
these are the 4 key bits for mouse wheel/trackpad scrolling - which unlike X11 are
*not* presented as mouse button down/up events for each scroll action