mirror of
https://github.com/Interlisp/maiko.git
synced 2026-04-27 20:58:44 +00:00
Compare commits
9 Commits
maiko-2501
...
fgh_fix-21
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
959f77402f | ||
|
|
4994982a90 | ||
|
|
40d4fca8cc | ||
|
|
c8dc63d418 | ||
|
|
7fe0f70640 | ||
|
|
55e20ea993 | ||
|
|
7d85a59e6f | ||
|
|
511a1b523e | ||
|
|
04f9905ca0 |
2
.github/workflows/Dockerfile_builder
vendored
2
.github/workflows/Dockerfile_builder
vendored
@@ -8,7 +8,7 @@
|
|||||||
#
|
#
|
||||||
# ******************************************************************************
|
# ******************************************************************************
|
||||||
|
|
||||||
FROM ubuntu:latest
|
FROM ubuntu:22.04
|
||||||
SHELL ["/bin/bash", "-c"]
|
SHELL ["/bin/bash", "-c"]
|
||||||
USER root:root
|
USER root:root
|
||||||
# Install build tools
|
# Install build tools
|
||||||
|
|||||||
9
.github/workflows/buildRelease.yml
vendored
9
.github/workflows/buildRelease.yml
vendored
@@ -152,7 +152,7 @@ jobs:
|
|||||||
|| needs.inputs.outputs.force == 'true'
|
|| needs.inputs.outputs.force == 'true'
|
||||||
)
|
)
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checkout the actions for this repo owner
|
# Checkout the actions for this repo owner
|
||||||
@@ -310,8 +310,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
run: |
|
run: |
|
||||||
gh release download release-2.26.5 --repo libsdl-org/SDL --pattern SDL2-2.26.5.dmg
|
gh release download release-2.30.11 --repo libsdl-org/SDL --pattern SDL2-2.30.11.dmg
|
||||||
hdiutil attach SDL2-2.26.5.dmg
|
hdiutil attach SDL2-2.30.11.dmg
|
||||||
sudo ditto /Volumes/SDL2/SDL2.framework /Library/Frameworks/SDL2.framework
|
sudo ditto /Volumes/SDL2/SDL2.framework /Library/Frameworks/SDL2.framework
|
||||||
hdiutil detach /Volumes/SDL2/
|
hdiutil detach /Volumes/SDL2/
|
||||||
|
|
||||||
@@ -337,7 +337,7 @@ jobs:
|
|||||||
# -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12
|
# -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12
|
||||||
cmake .. \
|
cmake .. \
|
||||||
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \
|
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \
|
||||||
-DMAIKO_DISPLAY_SDL=ON \
|
-DMAIKO_DISPLAY_SDL=2 \
|
||||||
-DMAIKO_DISPLAY_X11=ON \
|
-DMAIKO_DISPLAY_X11=ON \
|
||||||
-DCMAKE_BUILD_TYPE=Release
|
-DCMAKE_BUILD_TYPE=Release
|
||||||
cmake --build . --config Release
|
cmake --build . --config Release
|
||||||
@@ -503,6 +503,7 @@ jobs:
|
|||||||
- name: Install SDL2
|
- name: Install SDL2
|
||||||
run: |
|
run: |
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
sudo -E apt-get update
|
||||||
sudo -E apt-get install -y libsdl2-dev libsdl2-2.0-0
|
sudo -E apt-get install -y libsdl2-dev libsdl2-2.0-0
|
||||||
|
|
||||||
# Install Emscripten SDK
|
# Install Emscripten SDK
|
||||||
|
|||||||
@@ -221,17 +221,17 @@ static const int generic_X_keymap[] = {
|
|||||||
/* keypad digit assignments above, try assigning */
|
/* keypad digit assignments above, try assigning */
|
||||||
/* the new arrow-key key#s assigned for RS/6000 */
|
/* the new arrow-key key#s assigned for RS/6000 */
|
||||||
/* Failing that, try assigning the keypad #s. */
|
/* Failing that, try assigning the keypad #s. */
|
||||||
|
1, 84, XK_Left,
|
||||||
0, 129, XK_Left,
|
0, 129, XK_Left,
|
||||||
0, 84, XK_Left,
|
|
||||||
|
|
||||||
|
1, 82, XK_Up,
|
||||||
0, 130, XK_Up,
|
0, 130, XK_Up,
|
||||||
0, 82, XK_Up,
|
|
||||||
|
|
||||||
|
1, 69, XK_Down,
|
||||||
0, 131, XK_Down,
|
0, 131, XK_Down,
|
||||||
0, 69, XK_Down,
|
|
||||||
|
|
||||||
|
1, 87, XK_Right,
|
||||||
0, 132, XK_Right,
|
0, 132, XK_Right,
|
||||||
0, 87, XK_Right,
|
|
||||||
|
|
||||||
0, 93, XK_Multi_key, /* Expand, Sun type-4 */
|
0, 93, XK_Multi_key, /* Expand, Sun type-4 */
|
||||||
0, 93, XK_Alt_R, /* Expand, RH Alt key */
|
0, 93, XK_Alt_R, /* Expand, RH Alt key */
|
||||||
|
|||||||
@@ -217,7 +217,7 @@
|
|||||||
|
|
||||||
#define FJUMPMACRO(x) \
|
#define FJUMPMACRO(x) \
|
||||||
do { \
|
do { \
|
||||||
if (TOPOFSTACK != 0) { goto PopNextop1; } \
|
if (TOPOFSTACK != 0) { POP; nextop1; } \
|
||||||
{ \
|
{ \
|
||||||
CHECK_INTERRUPT; \
|
CHECK_INTERRUPT; \
|
||||||
POP; \
|
POP; \
|
||||||
@@ -227,7 +227,7 @@
|
|||||||
} while (0)
|
} while (0)
|
||||||
#define TJUMPMACRO(x) \
|
#define TJUMPMACRO(x) \
|
||||||
do { \
|
do { \
|
||||||
if (TOPOFSTACK == 0) { goto PopNextop1; } \
|
if (TOPOFSTACK == 0) { POP; nextop1; } \
|
||||||
{ \
|
{ \
|
||||||
CHECK_INTERRUPT; \
|
CHECK_INTERRUPT; \
|
||||||
POP; \
|
POP; \
|
||||||
|
|||||||
16
src/main.c
16
src/main.c
@@ -315,7 +315,7 @@ const char *nethubHelpstring =
|
|||||||
const char *nethubHelpstring = "";
|
const char *nethubHelpstring = "";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MAIKO_EMULATE_TIMER_INTERRUPTS) || defined(MAIKO_EMULATE_ASYNC_INTERRUPTS)
|
#if MAIKO_OS_LINUX || defined(MAIKO_EMULATE_TIMER_INTERRUPTS) || defined(MAIKO_EMULATE_ASYNC_INTERRUPTS)
|
||||||
extern int insnsCountdownForTimerAsyncEmulation;
|
extern int insnsCountdownForTimerAsyncEmulation;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -327,10 +327,10 @@ extern char backgroundColorName[64];
|
|||||||
#endif
|
#endif
|
||||||
char windowTitle[255] = "Medley";
|
char windowTitle[255] = "Medley";
|
||||||
extern char windowTitle[255];
|
extern char windowTitle[255];
|
||||||
int lispDisplayRequestedWidth = 1024;
|
unsigned LispDisplayRequestedWidth = 1024, LispDisplayRequestedHeight = 768;
|
||||||
extern int lispDisplayRequestedWidth;
|
extern unsigned LispDisplayRequestedWidth, LispDisplayRequestedHeight;
|
||||||
int lispDisplayRequestedHeight = 768;
|
int LispDisplayRequestedX = 0, LispDisplayRequestedY = 0;
|
||||||
extern int lispDisplayRequestedHeight;
|
extern int LispDisplayRequestedX, LispDisplayRequestedY;
|
||||||
int pixelScale = 1;
|
int pixelScale = 1;
|
||||||
extern int pixelScale;
|
extern int pixelScale;
|
||||||
|
|
||||||
@@ -474,7 +474,7 @@ int main(int argc, char *argv[])
|
|||||||
#ifdef SDL
|
#ifdef SDL
|
||||||
else if ((strcmp(argv[i], "-sc") == 0) || (strcmp(argv[i], "-SC") == 0)) {
|
else if ((strcmp(argv[i], "-sc") == 0) || (strcmp(argv[i], "-SC") == 0)) {
|
||||||
if (argc > ++i) {
|
if (argc > ++i) {
|
||||||
int read = sscanf(argv[i], "%dx%d", &lispDisplayRequestedWidth, &lispDisplayRequestedHeight);
|
int read = sscanf(argv[i], "%dx%d", &LispDisplayRequestedWidth, &LispDisplayRequestedHeight);
|
||||||
if(read != 2) {
|
if(read != 2) {
|
||||||
(void)fprintf(stderr, "Could not parse -sc argument %s\n", argv[i]);
|
(void)fprintf(stderr, "Could not parse -sc argument %s\n", argv[i]);
|
||||||
exit(1);
|
exit(1);
|
||||||
@@ -601,7 +601,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
#endif /* MAIKO_ENABLE_NETHUB */
|
#endif /* MAIKO_ENABLE_NETHUB */
|
||||||
|
|
||||||
#if defined(MAIKO_EMULATE_TIMER_INTERRUPTS) || defined(MAIKO_EMULATE_ASYNC_INTERRUPTS)
|
#if MAIKO_OS_LINUX || defined(MAIKO_EMULATE_TIMER_INTERRUPTS) || defined(MAIKO_EMULATE_ASYNC_INTERRUPTS)
|
||||||
else if (!strcmp(argv[i], "-intr-emu-insns")) {
|
else if (!strcmp(argv[i], "-intr-emu-insns")) {
|
||||||
if (argc > ++i) {
|
if (argc > ++i) {
|
||||||
errno = 0;
|
errno = 0;
|
||||||
@@ -717,7 +717,7 @@ int main(int argc, char *argv[])
|
|||||||
make_dsp_instance(currentdsp, 0, 0, 0, 1); /* All defaults the first time */
|
make_dsp_instance(currentdsp, 0, 0, 0, 1); /* All defaults the first time */
|
||||||
#endif /* DOS || XWINDOW */
|
#endif /* DOS || XWINDOW */
|
||||||
#if defined(SDL)
|
#if defined(SDL)
|
||||||
init_SDL(windowTitle, lispDisplayRequestedWidth, lispDisplayRequestedHeight, pixelScale);
|
init_SDL(windowTitle, LispDisplayRequestedWidth, LispDisplayRequestedHeight, pixelScale);
|
||||||
#endif /* SDL */
|
#endif /* SDL */
|
||||||
/* Load sysout to VM space and returns real sysout_size(not 0) */
|
/* Load sysout to VM space and returns real sysout_size(not 0) */
|
||||||
sysout_size = sysout_loader(sysout_name, sysout_size);
|
sysout_size = sysout_loader(sysout_name, sysout_size);
|
||||||
|
|||||||
12
src/timer.c
12
src/timer.c
@@ -454,6 +454,11 @@ static void int_timer_service(int sig)
|
|||||||
/* */
|
/* */
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
|
||||||
|
#if MAIKO_OS_LINUX
|
||||||
|
// for WSL1, which doesn't support setitimer(ITIMER_VIRTUAL ...)
|
||||||
|
int linux_emulate_timer = 0;
|
||||||
|
#endif /* MAIKO_OS_LINUX */
|
||||||
|
|
||||||
static void int_timer_init(void)
|
static void int_timer_init(void)
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -489,6 +494,11 @@ static void int_timer_init(void)
|
|||||||
/* then attach a timer to it and turn it loose */
|
/* then attach a timer to it and turn it loose */
|
||||||
timert.it_interval.tv_sec = timert.it_value.tv_sec = 0;
|
timert.it_interval.tv_sec = timert.it_value.tv_sec = 0;
|
||||||
timert.it_interval.tv_usec = timert.it_value.tv_usec = TIMER_INTERVAL;
|
timert.it_interval.tv_usec = timert.it_value.tv_usec = TIMER_INTERVAL;
|
||||||
|
|
||||||
|
#if MAIKO_OS_LINUX
|
||||||
|
// (For WSL1) Capture error output from setittimer to indicate need to emulate timer
|
||||||
|
linux_emulate_timer =
|
||||||
|
#endif /* MAIKO_OS_LINUX */
|
||||||
setitimer(ITIMER_VIRTUAL, &timert, NULL);
|
setitimer(ITIMER_VIRTUAL, &timert, NULL);
|
||||||
|
|
||||||
DBPRINT(("Timer interval set to %ld usec\n", (long)timert.it_value.tv_usec));
|
DBPRINT(("Timer interval set to %ld usec\n", (long)timert.it_value.tv_usec));
|
||||||
@@ -499,7 +509,7 @@ static void int_timer_init(void)
|
|||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/*
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
/* */
|
/* */
|
||||||
|
|||||||
39
src/xc.c
39
src/xc.c
@@ -173,7 +173,7 @@ static const int n_mask_array[16] = {
|
|||||||
|
|
||||||
extern int TIMER_INTERVAL;
|
extern int TIMER_INTERVAL;
|
||||||
|
|
||||||
#if defined(MAIKO_EMULATE_TIMER_INTERRUPTS) || defined(MAIKO_EMULATE_ASYNC_INTERRUPTS)
|
#if MAIKO_OS_LINUX || defined(MAIKO_EMULATE_TIMER_INTERRUPTS) || defined(MAIKO_EMULATE_ASYNC_INTERRUPTS)
|
||||||
|
|
||||||
# if !defined(MAIKO_TIMER_ASYNC_EMULATION_INSNS_COUNTDOWN)
|
# if !defined(MAIKO_TIMER_ASYNC_EMULATION_INSNS_COUNTDOWN)
|
||||||
# define MAIKO_TIMER_ASYNC_EMULATION_INSNS_COUNTDOWN 20000
|
# define MAIKO_TIMER_ASYNC_EMULATION_INSNS_COUNTDOWN 20000
|
||||||
@@ -181,7 +181,9 @@ extern int TIMER_INTERVAL;
|
|||||||
|
|
||||||
int insnsCountdownForTimerAsyncEmulation = MAIKO_TIMER_ASYNC_EMULATION_INSNS_COUNTDOWN;
|
int insnsCountdownForTimerAsyncEmulation = MAIKO_TIMER_ASYNC_EMULATION_INSNS_COUNTDOWN;
|
||||||
static int pseudoTimerAsyncCountdown = MAIKO_TIMER_ASYNC_EMULATION_INSNS_COUNTDOWN;
|
static int pseudoTimerAsyncCountdown = MAIKO_TIMER_ASYNC_EMULATION_INSNS_COUNTDOWN;
|
||||||
|
#if MAIKO_OS_LINUX
|
||||||
|
extern int linux_emulate_timer;
|
||||||
|
#endif /* MAIKO_OS_LINUX */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void dispatch(void) {
|
void dispatch(void) {
|
||||||
@@ -282,10 +284,12 @@ nextopcode:
|
|||||||
#endif /* PCTRACE */
|
#endif /* PCTRACE */
|
||||||
|
|
||||||
/* quick_stack_check();*/ /* JDS 2/12/98 */
|
/* quick_stack_check();*/ /* JDS 2/12/98 */
|
||||||
|
#if MAIKO_OS_LINUX || defined(MAIKO_EMULATE_TIMER_INTERRUPTS) || defined(MAIKO_EMULATE_ASYNC_INTERRUPTS)
|
||||||
#if defined(MAIKO_EMULATE_TIMER_INTERRUPTS) || defined(MAIKO_EMULATE_ASYNC_INTERRUPTS)
|
#if MAIKO_OS_LINUX
|
||||||
if (--pseudoTimerAsyncCountdown <= 0) {
|
if (linux_emulate_timer) {
|
||||||
Irq_Stk_Check = 0;
|
#endif /* MAIKO_OS_LINUX */
|
||||||
|
if (--pseudoTimerAsyncCountdown <= 0) {
|
||||||
|
Irq_Stk_Check = 0;
|
||||||
Irq_Stk_End = 0;
|
Irq_Stk_End = 0;
|
||||||
#if defined(MAIKO_EMULATE_ASYNC_INTERRUPTS)
|
#if defined(MAIKO_EMULATE_ASYNC_INTERRUPTS)
|
||||||
IO_Signalled = TRUE;
|
IO_Signalled = TRUE;
|
||||||
@@ -294,6 +298,9 @@ nextopcode:
|
|||||||
emscripten_sleep(1);
|
emscripten_sleep(1);
|
||||||
#endif
|
#endif
|
||||||
pseudoTimerAsyncCountdown = insnsCountdownForTimerAsyncEmulation;
|
pseudoTimerAsyncCountdown = insnsCountdownForTimerAsyncEmulation;
|
||||||
|
#if MAIKO_OS_LINUX
|
||||||
|
}
|
||||||
|
#endif /* MAIKO_OS_LINUX */
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -814,7 +821,7 @@ nextopcode:
|
|||||||
/******* FJumpx *******/
|
/******* FJumpx *******/
|
||||||
case 0262:
|
case 0262:
|
||||||
case262 : {
|
case262 : {
|
||||||
if (TOPOFSTACK != 0) { goto PopNextop2; }
|
if (TOPOFSTACK != 0) { POP; nextop2; }
|
||||||
CHECK_INTERRUPT;
|
CHECK_INTERRUPT;
|
||||||
POP;
|
POP;
|
||||||
PCMACL += Get_SBYTE_PCMAC1;
|
PCMACL += Get_SBYTE_PCMAC1;
|
||||||
@@ -825,7 +832,7 @@ nextopcode:
|
|||||||
|
|
||||||
case 0263:
|
case 0263:
|
||||||
case263 : {
|
case263 : {
|
||||||
if (TOPOFSTACK == 0) { goto PopNextop2; }
|
if (TOPOFSTACK == 0) { POP; nextop2; }
|
||||||
CHECK_INTERRUPT;
|
CHECK_INTERRUPT;
|
||||||
POP;
|
POP;
|
||||||
PCMACL += Get_SBYTE_PCMAC1;
|
PCMACL += Get_SBYTE_PCMAC1;
|
||||||
@@ -836,7 +843,7 @@ nextopcode:
|
|||||||
|
|
||||||
case 0264:
|
case 0264:
|
||||||
case264 : {
|
case264 : {
|
||||||
if (TOPOFSTACK != 0) { goto PopNextop2; }
|
if (TOPOFSTACK != 0) { POP; nextop2; }
|
||||||
CHECK_INTERRUPT;
|
CHECK_INTERRUPT;
|
||||||
PCMACL += Get_SBYTE_PCMAC1;
|
PCMACL += Get_SBYTE_PCMAC1;
|
||||||
nextop0;
|
nextop0;
|
||||||
@@ -846,7 +853,7 @@ nextopcode:
|
|||||||
|
|
||||||
case 0265:
|
case 0265:
|
||||||
case265 : {
|
case265 : {
|
||||||
if (TOPOFSTACK == 0) { goto PopNextop2; }
|
if (TOPOFSTACK == 0) { POP; nextop2; }
|
||||||
CHECK_INTERRUPT;
|
CHECK_INTERRUPT;
|
||||||
PCMACL += Get_SBYTE_PCMAC1;
|
PCMACL += Get_SBYTE_PCMAC1;
|
||||||
nextop0;
|
nextop0;
|
||||||
@@ -1261,19 +1268,7 @@ check_interrupt:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nextop0;
|
nextop0;
|
||||||
|
|
||||||
/************************************************************************/
|
|
||||||
/* Common Jump Tails (they have to jump anyway, so use common Tail) */
|
|
||||||
/************************************************************************/
|
|
||||||
PopNextop1:
|
|
||||||
POP;
|
|
||||||
nextop1;
|
|
||||||
|
|
||||||
PopNextop2:
|
|
||||||
POP;
|
|
||||||
nextop2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void do_brk(void) {}
|
void do_brk(void) {}
|
||||||
|
|||||||
@@ -50,8 +50,6 @@ unsigned LispWindowRequestedHeight = DEF_WIN_HEIGHT;
|
|||||||
|
|
||||||
extern int LispDisplayRequestedX, LispDisplayRequestedY;
|
extern int LispDisplayRequestedX, LispDisplayRequestedY;
|
||||||
extern unsigned LispDisplayRequestedWidth, LispDisplayRequestedHeight;
|
extern unsigned LispDisplayRequestedWidth, LispDisplayRequestedHeight;
|
||||||
int LispDisplayRequestedX, LispDisplayRequestedY;
|
|
||||||
unsigned LispDisplayRequestedWidth, LispDisplayRequestedHeight;
|
|
||||||
|
|
||||||
extern Colormap Colors;
|
extern Colormap Colors;
|
||||||
Colormap Colors;
|
Colormap Colors;
|
||||||
|
|||||||
Reference in New Issue
Block a user