mirror of
https://github.com/Interlisp/maiko.git
synced 2026-03-16 06:47:22 +00:00
Compare commits
1 Commits
fgh_github
...
nhb-update
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
535811935c |
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -1,6 +1,6 @@
|
||||
name: Build
|
||||
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
on: [push, pull_request]
|
||||
|
||||
defaults:
|
||||
run:
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-12, macos-13, macos-14, macos-15, ubuntu-24.04, ubuntu-22.04, ubuntu-20.04]
|
||||
os: [macos-11, macos-12, ubuntu-22.04, ubuntu-20.04]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install X11 dependencies on MacOS
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-12, macos-13, macos-14, macos-15, ubuntu-24.04, ubuntu-22.04, ubuntu-20.04]
|
||||
os: [macos-11, macos-12, ubuntu-22.04, ubuntu-20.04]
|
||||
env:
|
||||
BUILD_TYPE: Release
|
||||
steps:
|
||||
|
||||
2
.github/workflows/buildBuilderImage.yml
vendored
2
.github/workflows/buildBuilderImage.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
||||
|
||||
buildBuilder:
|
||||
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Checkout maiko
|
||||
|
||||
18
.github/workflows/buildRelease.yml
vendored
18
.github/workflows/buildRelease.yml
vendored
@@ -84,7 +84,7 @@ jobs:
|
||||
# the result of a workflow_dispatch or a workflow_call
|
||||
|
||||
inputs:
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
draft: ${{ steps.one.outputs.draft }}
|
||||
force: ${{ steps.one.outputs.force }}
|
||||
@@ -116,7 +116,7 @@ jobs:
|
||||
|
||||
sentry:
|
||||
needs: inputs
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
release_not_built: ${{ steps.check.outputs.release_not_built }}
|
||||
|
||||
@@ -152,7 +152,7 @@ jobs:
|
||||
|| needs.inputs.outputs.force == 'true'
|
||||
)
|
||||
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Checkout the actions for this repo owner
|
||||
@@ -185,14 +185,14 @@ jobs:
|
||||
|
||||
# Setup the Docker Machine Emulation environment.
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
uses: docker/setup-qemu-action@v2
|
||||
with:
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
|
||||
# Setup the Docker Buildx funtion
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
# Do the Docker Build using the Dockerfile in the repository we
|
||||
# checked out. Save the results in a directory under /tmp to be used
|
||||
@@ -204,7 +204,7 @@ jobs:
|
||||
# Dockerfile, NOT HERE IN THE WORKFLOW.
|
||||
#
|
||||
- name: Build Docker Image and Save It Locally
|
||||
uses: docker/build-push-action@v6
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
builder: ${{ steps.buildx.outputs.name }}
|
||||
build-args: |
|
||||
@@ -266,7 +266,7 @@ jobs:
|
||||
|| needs.inputs.outputs.force == 'true'
|
||||
)
|
||||
|
||||
runs-on: macos-12
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
|
||||
@@ -487,7 +487,7 @@ jobs:
|
||||
|| needs.inputs.outputs.force == 'true'
|
||||
)
|
||||
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
@@ -554,7 +554,7 @@ jobs:
|
||||
|
||||
complete:
|
||||
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
outputs:
|
||||
build_successful: ${{ steps.output.outputs.build_successful }}
|
||||
|
||||
@@ -87,11 +87,11 @@ IF(MAIKO_DISPLAY_X11)
|
||||
ENDIF()
|
||||
|
||||
IF(MAIKO_DISPLAY_SDL STREQUAL "2")
|
||||
FIND_PACKAGE(SDL2 REQUIRED CONFIG REQUIRED COMPONENTS SDL2)
|
||||
FIND_PACKAGE(SDL2 REQUIRED)
|
||||
SET(MAIKO_DISPLAY_SDL_DEFINITIONS
|
||||
"-DSDL=2"
|
||||
)
|
||||
SET(MAIKO_DISPLAY_SDL_INCLUDE_DIRS SDL2::Headers)
|
||||
SET(MAIKO_DISPLAY_SDL_INCLUDE_DIRS "${SDL2_INCLUDE_DIRS}")
|
||||
SET(MAIKO_DISPLAY_SDL_LIBRARIES SDL2::SDL2)
|
||||
SET(MAIKO_DISPLAY_SDL_SRCS
|
||||
src/sdl.c
|
||||
@@ -101,11 +101,11 @@ IF(MAIKO_DISPLAY_SDL STREQUAL "2")
|
||||
)
|
||||
MESSAGE("-- Configured for SDL2 display")
|
||||
ELSEIF(MAIKO_DISPLAY_SDL STREQUAL "3")
|
||||
FIND_PACKAGE(SDL3 REQUIRED CONFIG REQUIRED COMPONENTS SDL3)
|
||||
FIND_PACKAGE(SDL3 REQUIRED)
|
||||
SET(MAIKO_DISPLAY_SDL_DEFINITIONS
|
||||
"-DSDL=3"
|
||||
)
|
||||
SET(MAIKO_DISPLAY_SDL_INCLUDE_DIRS SDL3::Headers)
|
||||
SET(MAIKO_DISPLAY_SDL_INCLUDE_DIRS "${SDL3_INCLUDE_DIRS}")
|
||||
SET(MAIKO_DISPLAY_SDL_LIBRARIES SDL3::SDL3)
|
||||
SET(MAIKO_DISPLAY_SDL_SRCS
|
||||
src/sdl.c
|
||||
|
||||
34
inc/gcdata.h
34
inc/gcdata.h
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
/**********************************************************************/
|
||||
#include "lispemul.h" /* for LispPTR, DLword */
|
||||
#include "version.h" /* for BIGVM */
|
||||
#include "version.h" /* for USHORT */
|
||||
|
||||
#define ADDREF 0 /* for gclookup routine. */
|
||||
#define DELREF 1 /* for gclookup routine. */
|
||||
@@ -131,10 +131,10 @@
|
||||
#ifdef BIGVM
|
||||
struct hashentry
|
||||
{ /* GC hashtable entry */
|
||||
DLword count :15;
|
||||
DLword stackref :1;
|
||||
DLword segnum :15;
|
||||
DLword collision :1;
|
||||
unsigned short count :15;
|
||||
unsigned short stackref :1;
|
||||
unsigned short segnum :15;
|
||||
unsigned short collision :1;
|
||||
};
|
||||
|
||||
struct htlinkptr
|
||||
@@ -162,10 +162,10 @@ struct htoverflow
|
||||
#else
|
||||
struct hashentry
|
||||
{ /* GC hashtable entry */
|
||||
DLword count :6;
|
||||
DLword stackref :1;
|
||||
DLword segnum :8;
|
||||
DLword collision :1;
|
||||
USHORT count :6;
|
||||
USHORT stackref :1;
|
||||
USHORT segnum :8;
|
||||
USHORT collision :1;
|
||||
};
|
||||
|
||||
struct htlinkptr
|
||||
@@ -200,10 +200,10 @@ struct htoverflow
|
||||
#ifdef BIGVM
|
||||
struct hashentry
|
||||
{ /* GC hashtable entry */
|
||||
DLword collision :1;
|
||||
DLword segnum :15;
|
||||
DLword stackref :1;
|
||||
DLword count :15;
|
||||
USHORT collision :1;
|
||||
USHORT segnum :15;
|
||||
USHORT stackref :1;
|
||||
USHORT count :15;
|
||||
};
|
||||
|
||||
struct htlinkptr
|
||||
@@ -231,10 +231,10 @@ struct htoverflow
|
||||
#else
|
||||
struct hashentry
|
||||
{ /* GC hashtable entry */
|
||||
DLword collision :1;
|
||||
DLword segnum :8;
|
||||
DLword stackref :1;
|
||||
DLword count :6;
|
||||
USHORT collision :1;
|
||||
USHORT segnum :8;
|
||||
USHORT stackref :1;
|
||||
USHORT count :6;
|
||||
};
|
||||
|
||||
struct htlinkptr
|
||||
|
||||
@@ -267,22 +267,22 @@ struct state {
|
||||
|
||||
/* For bit test */
|
||||
typedef struct wbits {
|
||||
DLword LSB : 1;
|
||||
DLword B14 : 1;
|
||||
DLword B13 : 1;
|
||||
DLword B12 : 1;
|
||||
DLword B11 : 1;
|
||||
DLword B10 : 1;
|
||||
DLword B9 : 1;
|
||||
DLword B8 : 1;
|
||||
DLword B7 : 1;
|
||||
DLword B6 : 1;
|
||||
DLword B5 : 1;
|
||||
DLword B4 : 1;
|
||||
DLword B3 : 1;
|
||||
DLword B2 : 1;
|
||||
DLword B1 : 1;
|
||||
DLword xMSB : 1;
|
||||
USHORT LSB : 1;
|
||||
USHORT B14 : 1;
|
||||
USHORT B13 : 1;
|
||||
USHORT B12 : 1;
|
||||
USHORT B11 : 1;
|
||||
USHORT B10 : 1;
|
||||
USHORT B9 : 1;
|
||||
USHORT B8 : 1;
|
||||
USHORT B7 : 1;
|
||||
USHORT B6 : 1;
|
||||
USHORT B5 : 1;
|
||||
USHORT B4 : 1;
|
||||
USHORT B3 : 1;
|
||||
USHORT B2 : 1;
|
||||
USHORT B1 : 1;
|
||||
USHORT xMSB : 1;
|
||||
} WBITS;
|
||||
|
||||
#define PUTBASEBIT68K(base68k, offset, bitvalue) \
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#ifndef RAWCOLORDEFS_H
|
||||
#define RAWCOLORDEFS_H 1
|
||||
#include "lispemul.h" /* for LispPTR */
|
||||
void C_slowbltchar(LispPTR *args);
|
||||
LispPTR Colorize_Bitmap(LispPTR args[]);
|
||||
void Draw_8BppColorLine(LispPTR *args);
|
||||
void Uncolorize_Bitmap(LispPTR args[]);
|
||||
#endif
|
||||
114
inc/stack.h
114
inc/stack.h
@@ -79,22 +79,22 @@ typedef struct fnhead {
|
||||
} FNHEAD;
|
||||
|
||||
typedef struct frameex1 {
|
||||
DLword flags : 3;
|
||||
DLword fast : 1;
|
||||
DLword nil2 : 1; /* not used, prev: This frame treats N-func */
|
||||
DLword incall : 1;
|
||||
DLword validnametable : 1;
|
||||
unsigned short flags : 3;
|
||||
unsigned short fast : 1;
|
||||
unsigned short nil2 : 1; /* not used, prev: This frame treats N-func */
|
||||
unsigned short incall : 1;
|
||||
unsigned short validnametable : 1;
|
||||
/* 0: look for FunctionHeader
|
||||
1: look for NameTable on this FrameEx */
|
||||
DLword nopush : 1;
|
||||
DLword usecount : 8;
|
||||
unsigned short nopush : 1;
|
||||
unsigned short usecount : 8;
|
||||
DLword alink; /* alink pointer (Low addr) */
|
||||
#ifdef BIGVM
|
||||
LispPTR fnheader; /* pointer to FunctionHeader (Hi2 addr) */
|
||||
#else
|
||||
DLword lofnheader; /* pointer to FunctionHeader (Low addr) */
|
||||
DLword hi1fnheader : 8; /* pointer to FunctionHeader (Hi1 addr) */
|
||||
DLword hi2fnheader : 8; /* pointer to FunctionHeader (Hi2 addr) */
|
||||
unsigned short hi1fnheader : 8; /* pointer to FunctionHeader (Hi1 addr) */
|
||||
unsigned short hi2fnheader : 8; /* pointer to FunctionHeader (Hi2 addr) */
|
||||
#endif /* BIGVM */
|
||||
DLword nextblock; /* pointer to FreeStackBlock */
|
||||
DLword pc; /* Program counter */
|
||||
@@ -102,23 +102,23 @@ typedef struct frameex1 {
|
||||
LispPTR nametable; /* ptr to NameTable of this FrameEx (Hi2 addr) */
|
||||
#else
|
||||
DLword lonametable; /* ptr to NameTable of this FrameEx (Low addr) */
|
||||
DLword hi1nametable : 8; /* ptr to NameTable of this FrameEx (Hi1 addr) */
|
||||
DLword hi2nametable : 8; /* ptr to NameTable of this FrameEx (Hi2 addr) */
|
||||
unsigned short hi1nametable : 8; /* ptr to NameTable of this FrameEx (Hi1 addr) */
|
||||
unsigned short hi2nametable : 8; /* ptr to NameTable of this FrameEx (Hi2 addr) */
|
||||
#endif /* BIGVM */
|
||||
DLword blink; /* blink pointer (Low addr) */
|
||||
DLword clink; /* clink pointer (Low addr) */
|
||||
} FX;
|
||||
|
||||
typedef struct frameex2 {
|
||||
DLword flags : 3;
|
||||
DLword fast : 1;
|
||||
DLword nil2 : 1; /* not used, prev: This frame treats N-func */
|
||||
DLword incall : 1;
|
||||
DLword validnametable : 1;
|
||||
unsigned short flags : 3;
|
||||
unsigned short fast : 1;
|
||||
unsigned short nil2 : 1; /* not used, prev: This frame treats N-func */
|
||||
unsigned short incall : 1;
|
||||
unsigned short validnametable : 1;
|
||||
/* 0: look for FunctionHeader
|
||||
1: look for NameTable on this FrameEx */
|
||||
DLword nopush : 1;
|
||||
DLword usecount : 8;
|
||||
unsigned short nopush : 1;
|
||||
unsigned short usecount : 8;
|
||||
DLword alink; /* alink pointer (Low addr) */
|
||||
LispPTR fnheader; /* pointer to FunctionHeader */
|
||||
DLword nextblock; /* pointer to FreeStackBlock */
|
||||
@@ -135,19 +135,19 @@ typedef struct fxblock {
|
||||
} FXBLOCK;
|
||||
|
||||
typedef struct basic_frame {
|
||||
DLword flags : 3;
|
||||
DLword nil : 3;
|
||||
DLword residual : 1;
|
||||
DLword padding : 1;
|
||||
DLword usecnt : 8;
|
||||
unsigned short flags : 3;
|
||||
unsigned short nil : 3;
|
||||
unsigned short residual : 1;
|
||||
unsigned short padding : 1;
|
||||
unsigned short usecnt : 8;
|
||||
DLword ivar; /* stk offset of IVARs for this frame ?? */
|
||||
|
||||
} Bframe;
|
||||
|
||||
typedef struct stkword {
|
||||
DLword flags : 3;
|
||||
DLword nil : 5;
|
||||
DLword usecount : 8;
|
||||
unsigned short flags : 3;
|
||||
unsigned short nil : 5;
|
||||
unsigned short usecount : 8;
|
||||
} StackWord;
|
||||
|
||||
typedef struct stack_block {
|
||||
@@ -185,33 +185,33 @@ typedef struct fnhead {
|
||||
unsigned nil3 : 2; /* not used */
|
||||
unsigned nil2 : 2; /* not used */
|
||||
#endif /* BIGVM */
|
||||
DLword argtype : 2; /* ?? */
|
||||
DLword byteswapped : 1; /* code was reswapped. */
|
||||
DLword nil4 : 1; /* not used, prev: native translated? */
|
||||
DLword fvaroffset : 8;
|
||||
unsigned short argtype : 2; /* ?? */
|
||||
unsigned short byteswapped : 1; /* code was reswapped. */
|
||||
unsigned short nil4 : 1; /* not used, prev: native translated? */
|
||||
unsigned short fvaroffset : 8;
|
||||
/* DLword offset from head of NameTable */
|
||||
DLword nlocals : 8; /* ?? */
|
||||
unsigned short nlocals : 8; /* ?? */
|
||||
DLword ntsize; /* size of NameTable */
|
||||
/* NameTable of variable length is following with this structure. */
|
||||
} FNHEAD;
|
||||
|
||||
typedef struct frameex1 {
|
||||
DLword alink; /* alink pointer (Low addr) */
|
||||
DLword usecount : 8;
|
||||
DLword nopush : 1;
|
||||
DLword validnametable : 1;
|
||||
unsigned short usecount : 8;
|
||||
unsigned short nopush : 1;
|
||||
unsigned short validnametable : 1;
|
||||
/* 0: look for FunctionHeader
|
||||
1: look for NameTable on this FrameEx */
|
||||
DLword incall : 1;
|
||||
DLword nil2 : 1; /* not used, prev: This frame treats N-func */
|
||||
DLword fast : 1;
|
||||
DLword flags : 3; /* hi word */
|
||||
unsigned short incall : 1;
|
||||
unsigned short nil2 : 1; /* not used, prev: This frame treats N-func */
|
||||
unsigned short fast : 1;
|
||||
unsigned short flags : 3; /* hi word */
|
||||
|
||||
#ifdef BIGVM
|
||||
LispPTR fnheader; /* pointer to FunctionHeader (Hi2 addr) */
|
||||
#else
|
||||
DLword hi2fnheader : 8; /* pointer to FunctionHeader (Hi2 addr) */
|
||||
DLword hi1fnheader : 8; /* pointer to FunctionHeader (Hi1 addr) */
|
||||
unsigned short hi2fnheader : 8; /* pointer to FunctionHeader (Hi2 addr) */
|
||||
unsigned short hi1fnheader : 8; /* pointer to FunctionHeader (Hi1 addr) */
|
||||
DLword lofnheader; /* pointer to FunctionHeader (Low addr) */
|
||||
#endif /* BIGVM */
|
||||
|
||||
@@ -221,8 +221,8 @@ typedef struct frameex1 {
|
||||
#ifdef BIGVM
|
||||
LispPTR nametable; /* pointer to NameTable of this FX (Hi2 addr) */
|
||||
#else
|
||||
DLword hi2nametable : 8; /* pointer to NameTable of this FX (Hi2 addr) */
|
||||
DLword hi1nametable : 8; /* pointer to NameTable of this FX (Hi1 addr) */
|
||||
unsigned short hi2nametable : 8; /* pointer to NameTable of this FX (Hi2 addr) */
|
||||
unsigned short hi1nametable : 8; /* pointer to NameTable of this FX (Hi1 addr) */
|
||||
DLword lonametable; /* pointer to NameTable of this FX (Low addr) */
|
||||
#endif /* BIGVM */
|
||||
|
||||
@@ -232,15 +232,15 @@ typedef struct frameex1 {
|
||||
|
||||
typedef struct frameex2 {
|
||||
DLword alink; /* alink pointer (Low addr) */
|
||||
DLword usecount : 8;
|
||||
DLword nopush : 1;
|
||||
DLword validnametable : 1;
|
||||
unsigned short usecount : 8;
|
||||
unsigned short nopush : 1;
|
||||
unsigned short validnametable : 1;
|
||||
/* 0: look for FunctionHeader
|
||||
1: look for NameTable on this FrameEx */
|
||||
DLword incall : 1;
|
||||
DLword nil2 : 1; /* not used, prev: This frame treats N-func */
|
||||
DLword fast : 1;
|
||||
DLword flags : 3;
|
||||
unsigned short incall : 1;
|
||||
unsigned short nil2 : 1; /* not used, prev: This frame treats N-func */
|
||||
unsigned short fast : 1;
|
||||
unsigned short flags : 3;
|
||||
|
||||
LispPTR fnheader; /* pointer to FunctionHeader (swapped) */
|
||||
|
||||
@@ -261,18 +261,18 @@ typedef struct fxblock {
|
||||
|
||||
typedef struct basic_frame {
|
||||
DLword ivar;
|
||||
DLword usecnt : 8;
|
||||
DLword padding : 1;
|
||||
DLword residual : 1;
|
||||
DLword nil : 3;
|
||||
DLword flags : 3;
|
||||
unsigned short usecnt : 8;
|
||||
unsigned short padding : 1;
|
||||
unsigned short residual : 1;
|
||||
unsigned short nil : 3;
|
||||
unsigned short flags : 3;
|
||||
|
||||
} Bframe;
|
||||
|
||||
typedef struct stkword {
|
||||
DLword usecount : 8;
|
||||
DLword nil : 5;
|
||||
DLword flags : 3;
|
||||
USHORT usecount : 8;
|
||||
USHORT nil : 5;
|
||||
USHORT flags : 3;
|
||||
} StackWord;
|
||||
|
||||
typedef struct stack_block {
|
||||
|
||||
@@ -227,6 +227,9 @@ typedef unsigned char u_char;
|
||||
typedef unsigned long u_int;
|
||||
typedef unsigned short u_short;
|
||||
#undef UNALIGNED_FETCH_OK
|
||||
typedef unsigned USHORT;
|
||||
#else
|
||||
typedef unsigned short USHORT;
|
||||
#endif /* DOS */
|
||||
|
||||
/****************************************************************/
|
||||
|
||||
@@ -589,8 +589,8 @@ void bt1(FX *startFX) {
|
||||
BT_morep;
|
||||
while ((fnobj->framename != ATOM_T) && (fx->alink != 11)) {
|
||||
if (fnum > URMAXFXNUM - 1) {
|
||||
/* Internal buf overflow, too many stack frames */
|
||||
printf("***There are more than %d stack frames.\n", URMAXFXNUM);
|
||||
/* Internal buf overflow,more than 100 stacks */
|
||||
printf("***There are more than 100 stack frames.\n");
|
||||
printf(
|
||||
"If you want to continue, Uraid will smash its internal table for FX pointer. Do you "
|
||||
"accept?(Y or N)\n");
|
||||
|
||||
@@ -552,15 +552,15 @@ void printarrayblock(LispPTR base) {
|
||||
printf(" Length: %d cells.\n\n", bbase->arlen);
|
||||
|
||||
addr = ((LispPTR *)bbase) - 20;
|
||||
for (; addr < (LispPTR *)bbase; addr++) printf("%16p %8x\n", (void *)addr, *addr);
|
||||
printf("%16p %8x <- array header\n", (void *)addr, *addr);
|
||||
for (; addr < (LispPTR *)bbase; addr++) printf("%p %8x\n", (void *)addr, *addr);
|
||||
printf("%p %8x <- array header\n", (void *)addr, *addr);
|
||||
addr++;
|
||||
for (; addr < (LispPTR *)bbase + 20; addr++) printf("%16p %8x\n", (void *)addr, *addr);
|
||||
for (; addr < (LispPTR *)bbase + 20; addr++) printf("%p %8x\n", (void *)addr, *addr);
|
||||
printf(". . .\n");
|
||||
|
||||
addr = ((LispPTR *)btrailer) - 20;
|
||||
for (; addr < (LispPTR *)btrailer; addr++) printf("%16p %8x\n", (void *)addr, *addr);
|
||||
printf("%16p %8x <- array trailer\n", (void *)addr, *addr);
|
||||
for (; addr < (LispPTR *)btrailer; addr++) printf("%p %8x\n", (void *)addr, *addr);
|
||||
printf("%p %8x <- array trailer\n", (void *)addr, *addr);
|
||||
addr++;
|
||||
for (; addr < (LispPTR *)btrailer + 20; addr++) printf("%16p %8x\n", (void *)addr, *addr);
|
||||
for (; addr < (LispPTR *)btrailer + 20; addr++) printf("%p %8x\n", (void *)addr, *addr);
|
||||
}
|
||||
|
||||
26
src/main.c
26
src/main.c
@@ -243,7 +243,7 @@ int flushing = FALSE; /* see dbprint.h if set, all debug/trace printing will cal
|
||||
extern DspInterface currentdsp;
|
||||
#endif /* DOS || XWINDOW */
|
||||
#ifdef SDL
|
||||
#include "sdldefs.h" /* for init_SDL */
|
||||
extern int init_SDL(char*, int, int, int);
|
||||
#endif
|
||||
extern const time_t MDate;
|
||||
extern int nokbdflag;
|
||||
@@ -324,15 +324,6 @@ extern char foregroundColorName[64];
|
||||
char backgroundColorName[64] = {0};
|
||||
extern char backgroundColorName[64];
|
||||
#endif
|
||||
char windowTitle[255] = "Medley";
|
||||
extern char windowTitle[255];
|
||||
int lispDisplayRequestedWidth = 1024;
|
||||
extern int lispDisplayRequestedWidth;
|
||||
int lispDisplayRequestedHeight = 768;
|
||||
extern int lispDisplayRequestedHeight;
|
||||
int pixelScale = 1;
|
||||
extern int pixelScale;
|
||||
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/* M A I N E N T R Y P O I N T */
|
||||
@@ -347,6 +338,9 @@ int main(int argc, char *argv[])
|
||||
extern int TIMER_INTERVAL;
|
||||
extern fd_set LispReadFds;
|
||||
long tmpint;
|
||||
int width = 1024, height = 768;
|
||||
int pixelscale = 1;
|
||||
char *windowtitle = "Medley";
|
||||
|
||||
#ifdef MAIKO_ENABLE_FOREIGN_FUNCTION_INTERFACE
|
||||
if (dld_find_executable(argv[0]) == 0) {
|
||||
@@ -371,6 +365,7 @@ int main(int argc, char *argv[])
|
||||
// arg processing changes argc/argv
|
||||
if (argc > 1 && argv[1][0] != '-') {
|
||||
strncpy(sysout_name_first_arg, argv[1], MAXPATHLEN);
|
||||
i++;
|
||||
}
|
||||
|
||||
|
||||
@@ -473,7 +468,7 @@ int main(int argc, char *argv[])
|
||||
#ifdef SDL
|
||||
else if ((strcmp(argv[i], "-sc") == 0) || (strcmp(argv[i], "-SC") == 0)) {
|
||||
if (argc > ++i) {
|
||||
int read = sscanf(argv[i], "%dx%d", &lispDisplayRequestedWidth, &lispDisplayRequestedHeight);
|
||||
int read = sscanf(argv[i], "%dx%d", &width, &height);
|
||||
if(read != 2) {
|
||||
(void)fprintf(stderr, "Could not parse -sc argument %s\n", argv[i]);
|
||||
exit(1);
|
||||
@@ -484,7 +479,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
} else if ((strcmp(argv[i], "-pixelscale") == 0) || (strcmp(argv[i], "-PIXELSCALE") == 0)) {
|
||||
if (argc > ++i) {
|
||||
int read = sscanf(argv[i], "%d", &pixelScale);
|
||||
int read = sscanf(argv[i], "%d", &pixelscale);
|
||||
if(read != 1) {
|
||||
(void)fprintf(stderr, "Could not parse -pixelscale argument %s\n", argv[i]);
|
||||
exit(1);
|
||||
@@ -496,7 +491,7 @@ int main(int argc, char *argv[])
|
||||
} else if ((strcmp(argv[i], "-t") == 0) || (strcmp(argv[i], "-T") == 0)
|
||||
|| (strcmp(argv[i], "-title") == 0) || (strcmp(argv[i], "-TITLE") == 0)) {
|
||||
if (argc > ++i) {
|
||||
strncpy(windowTitle, argv[i], sizeof(windowTitle) - 1);
|
||||
windowtitle = argv[i];
|
||||
} else {
|
||||
(void)fprintf(stderr, "Missing argument after -title\n");
|
||||
exit(1);
|
||||
@@ -716,12 +711,13 @@ int main(int argc, char *argv[])
|
||||
make_dsp_instance(currentdsp, 0, 0, 0, 1); /* All defaults the first time */
|
||||
#endif /* DOS || XWINDOW */
|
||||
#if defined(SDL)
|
||||
init_SDL(windowTitle, lispDisplayRequestedWidth, lispDisplayRequestedHeight, pixelScale);
|
||||
init_SDL(windowtitle, width, height, pixelscale);
|
||||
#endif /* SDL */
|
||||
/* Load sysout to VM space and returns real sysout_size(not 0) */
|
||||
sysout_size = sysout_loader(sysout_name, sysout_size);
|
||||
|
||||
build_lisp_map(); /* build up map */
|
||||
build_lisp_map(); /* built up map */
|
||||
|
||||
init_ifpage(sysout_size); /* init interface page */
|
||||
init_iopage();
|
||||
init_miscstats();
|
||||
|
||||
@@ -419,7 +419,7 @@ loop:
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
static void newColorizeFont8(PILOTBBT *pbt, u_char backcolor, u_char forecolor, LispPTR srctype, LispPTR ope)
|
||||
void newColorizeFont8(PILOTBBT *pbt, u_char backcolor, u_char forecolor, LispPTR srctype, LispPTR ope)
|
||||
{
|
||||
DLword *nbase;
|
||||
u_char *dbase;
|
||||
|
||||
125
src/sdl.c
125
src/sdl.c
@@ -52,6 +52,7 @@ extern int error(const char *s);
|
||||
|
||||
extern int KBDEventFlg;
|
||||
/* clang-format off */
|
||||
#if SDL_MAJOR_VERSION == 2
|
||||
int keymap[] = {
|
||||
0, SDLK_5, /* (5 %% FIVE) */
|
||||
1, SDLK_4, /* (4 $ FOUR) */
|
||||
@@ -167,6 +168,123 @@ int keymap[] = {
|
||||
// 111, /* (K5F SUN-OPEN) */
|
||||
-1, -1
|
||||
};
|
||||
#elif SDL_MAJOR_VERSION == 3
|
||||
int keymap[] = {
|
||||
0, SDLK_5, /* (5 %% FIVE) */
|
||||
1, SDLK_4, /* (4 $ FOUR) */
|
||||
2, SDLK_6, /* (6 ~ SIX) */
|
||||
3, SDLK_E, /* (e E) */
|
||||
4, SDLK_7, /* (7 & SEVEN) */
|
||||
5, SDLK_D, /* (d D) */
|
||||
6, SDLK_U, /* (u U) */
|
||||
7, SDLK_V, /* (v V) */
|
||||
8, SDLK_RIGHTPAREN, 8, SDLK_0, /* (0 %) ZERO) */
|
||||
9, SDLK_K, /* (k K) */
|
||||
10, SDLK_MINUS, /* (- %^X) */
|
||||
11, SDLK_P, /* (p P) */
|
||||
12, SDLK_SLASH, /* (/ ?) */
|
||||
13, SDLK_KP_PERIOD, /* (\ %| FONT LOOKS) */
|
||||
14, SDLK_SCROLLLOCK, /* (LF SAME) */
|
||||
15, SDLK_BACKSPACE, /* (BS <-) */
|
||||
16, SDLK_3, /* (3 %# THREE) */
|
||||
17, SDLK_2, /* (2 @ TWO) */
|
||||
18, SDLK_W, /* (w W) */
|
||||
19, SDLK_Q, /* (q Q) */
|
||||
20, SDLK_S, /* (s S) */
|
||||
21, SDLK_A, /* (a A) */
|
||||
22, SDLK_LEFTPAREN, 22, SDLK_9, /* (9 %( NINE) */
|
||||
23, SDLK_I, /* (i I) */
|
||||
24, SDLK_X, /* (x X) */
|
||||
25, SDLK_O, /* (o O) */
|
||||
26, SDLK_L, /* (l L) */
|
||||
27, SDLK_COMMA, /* (%, <) */
|
||||
28, SDLK_APOSTROPHE, /* (%' %") */
|
||||
29, SDLK_RIGHTBRACKET, /* (%] }) */
|
||||
// 30, /* (BLANK-MIDDLE OPEN DBK-HELP) */
|
||||
31, SDLK_LALT, /* Meta, Sun-4 usual key */ /* (BLANK-TOP KEYBOARD DBK-META) */
|
||||
32, SDLK_1, /* (1 ! ONE) */
|
||||
33, SDLK_ESCAPE, /* (ESC ESCAPE ->) */
|
||||
34, SDLK_TAB, /* (TAB =>) */
|
||||
35, SDLK_F, /* (f F) */
|
||||
36, SDLK_LCTRL, /* (CTRL PROP'S EDIT) */
|
||||
37, SDLK_C, /* (c C) */
|
||||
38, SDLK_J, /* (j J) */
|
||||
39, SDLK_B, /* (b B) */
|
||||
40, SDLK_Z, /* (z Z) */
|
||||
41, SDLK_LSHIFT, /* (LSHIFT) */
|
||||
42, SDLK_PERIOD, /* (%. >) */
|
||||
43, SDLK_SEMICOLON, 43, SDLK_COLON, /* (; %:) */
|
||||
44, SDLK_RETURN, /* (CR <-%|) */
|
||||
45, SDLK_GRAVE, /* (_ ^) */
|
||||
// 46, /* (DEL DELETE) */
|
||||
47, SDLK_RCTRL, /* (SKIP NEXT) */
|
||||
48, SDLK_R, /* (r R) */
|
||||
49, SDLK_T, /* (t T) */
|
||||
50, SDLK_G, /* (g G) */
|
||||
51, SDLK_Y, /* (y Y) */
|
||||
52, SDLK_H, /* (h H) */
|
||||
53, SDLK_8, /* (8 * EIGHT) */
|
||||
54, SDLK_N, /* (n N) */
|
||||
55, SDLK_M, /* (m M) */
|
||||
56, SDLK_CAPSLOCK, /* (LOCK) */
|
||||
57, SDLK_SPACE, /* (SPACE) */
|
||||
58, SDLK_LEFTBRACKET, /* (%[ {) */
|
||||
59, SDLK_EQUALS, /* (= +) */
|
||||
60, SDLK_RSHIFT, /* (RSHIFT) */
|
||||
61, SDLK_F11, 61, SDLK_PAUSE, /* (BLANK-BOTTOM STOP) */
|
||||
62, SDLK_HOME, /* (MOVE) */
|
||||
63, SDLK_PAGEUP, /* (UNDO) */
|
||||
64, SDLK_KP_EQUALS, /* (UTIL0 SUN-KEYPAD=) */
|
||||
65, SDLK_KP_DIVIDE, /* (UTIL1 SUN-KEYPAD/) */
|
||||
66, SDLK_F7, /* (UTIL2 SUPER/SUB) */
|
||||
67, SDLK_F4, /* (UTIL3 CASE) */
|
||||
68, SDLK_F5, /* (UTIL4 STRIKEOUT) */
|
||||
69, SDLK_KP_2, /* (UTIL5 KEYPAD2) */
|
||||
70, SDLK_KP_3, /* (UTIL6 KEYPAD3 PGDN) */
|
||||
// 71, XK_Linefeed, /* (UTIL7 SUN-LF) */
|
||||
// 72, /* (PAD1 LEFTKEY CAPSLOCK KEYPAD+) */
|
||||
// 73, XK_Numlock, /* (PAD2 LEFTMIDDLEKEY NUMLOCK KEYPAD-) */
|
||||
// 74, /* (PAD3 MIDDLEKEY SCROLLLOCK KEYPAD*) */
|
||||
// 75, /* (PAD4 RIGHTMIDDLEKEY BREAK KEYPAD/ SUN-PAUSE) */
|
||||
76, SDLK_KP_ENTER, /* (PAD5 RIGHTKEY DOIT PRTSC) */
|
||||
// 77, /* (LEFT RED MOUSERED) */
|
||||
// 78, /* (RIGHT BLUE MOUSEBLUE) */
|
||||
// 79, /* (MIDDLE YELLOW MOUSEYELLOW) */
|
||||
80, SDLK_F9, /* (MARGINS) */
|
||||
81, SDLK_KP_7, /* (K41 KEYPAD7 HOME) */
|
||||
82, SDLK_KP_8, /* (K42 KEYPAD8) */
|
||||
83, SDLK_KP_9, /* (K43 KEYPAD9 PGUP) */
|
||||
84, SDLK_KP_4, /* (K44 KEYPAD4) */
|
||||
85, SDLK_KP_5, /* (K45 KEYPAD5) */
|
||||
86, SDLK_LALT, /* (sun left-diamond key) */ /* (K46 SUN-LEFT-SPACE) */
|
||||
87, SDLK_KP_6, /* (K47 KEYPAD6) */
|
||||
// 88, /* (K48 RIGHT-COMMAND SUN-RIGHT-SPACE) */
|
||||
89, SDLK_INSERT, /* (COPY) */
|
||||
90, SDLK_END, /* (FIND) */
|
||||
91, SDLK_F12, /* (AGAIN) */
|
||||
92, SDLK_PRINTSCREEN, // is this XK_Print?? /* (HELP) */
|
||||
93, SDLK_MODE, // is this XK_Mode_switch /* (DEF'N EXPAND) */
|
||||
94, SDLK_KP_1, /* (K4E KEYPAD1 END) */
|
||||
95, SDLK_KP_MULTIPLY, /* (ALWAYS-ON-1) */
|
||||
96, SDLK_KP_MINUS, /* (ALWAYS-ON-2) */
|
||||
97, SDLK_HELP, /* (CENTER) */
|
||||
98, SDLK_KP_0, /* (K52 KEYPAD0 INS) */
|
||||
99, SDLK_F2, /* (BOLD) */
|
||||
100, SDLK_F3, /* (ITALICS) */
|
||||
101, SDLK_F6, /* (UNDERLINE) */
|
||||
102, SDLK_KP_PLUS, /* (SUPERSCRIPT) */
|
||||
// 103, /* (SUBSCRIPT) */
|
||||
104, SDLK_F8, /* (LARGER SMALLER) */
|
||||
105, SDLK_BACKSLASH, /* (K59 KEYPAD%| KEYPAD.) */
|
||||
106, SDLK_F10, /* (K5A KEYPAD\ KEYPAD, SUN-F10) */
|
||||
107, SDLK_F11, /* (K5B SUN-F11) */
|
||||
108, SDLK_F12, /* (K5C SUN-F12) */
|
||||
// 109, /* (DEFAULTS SUN-PROP) */
|
||||
// 110, /* (K5E SUN-PRTSC) */
|
||||
// 111, /* (K5F SUN-OPEN) */
|
||||
-1, -1
|
||||
};
|
||||
#endif
|
||||
|
||||
const struct ColorNameToRGB {
|
||||
char * name; uint8_t red; uint8_t green; uint8_t blue;
|
||||
@@ -1565,7 +1683,9 @@ int init_SDL(char *windowtitle, int w, int h, int s) {
|
||||
sdl_displayheight = h;
|
||||
sdl_windowwidth = w * s;
|
||||
sdl_windowheight = h * s;
|
||||
printf("requested width: %d, height: %d\n", sdl_displaywidth, sdl_displayheight);
|
||||
int width = sdl_displaywidth;
|
||||
int height = sdl_displayheight;
|
||||
printf("requested width: %d, height: %d\n", width, height);
|
||||
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
|
||||
printf("SDL could not be initialized. SDL_Error: %s\n", SDL_GetError());
|
||||
return 1;
|
||||
@@ -1606,8 +1726,7 @@ int init_SDL(char *windowtitle, int w, int h, int s) {
|
||||
#endif
|
||||
printf("Creating texture...\n");
|
||||
sdl_texture = SDL_CreateTexture(sdl_renderer, sdl_pixelformat->format,
|
||||
SDL_TEXTUREACCESS_STREAMING,
|
||||
sdl_displaywidth, sdl_displayheight);
|
||||
SDL_TEXTUREACCESS_STREAMING, width, height);
|
||||
sdl_foreground_color = sdl_MapColorName(sdl_pixelformat,
|
||||
foregroundColorName[0] ? foregroundColorName : "black");
|
||||
sdl_background_color = sdl_MapColorName(sdl_pixelformat,
|
||||
|
||||
@@ -64,11 +64,6 @@
|
||||
#include "uutilsdefs.h" // for suspend_lisp, check_unix_password, unix_fu...
|
||||
#include "vmemsavedefs.h" // for lisp_finish, vmem_save0
|
||||
|
||||
#ifdef COLOR
|
||||
#include "rawcolordefs.h"
|
||||
#include "llcolordefs.h"
|
||||
#endif
|
||||
|
||||
extern LispPTR *PENDINGINTERRUPT68k;
|
||||
|
||||
/***********************************************************/
|
||||
|
||||
@@ -683,10 +683,9 @@ int print_opcode(int pc, DLbyte *addr, struct fnhead *fnobj) {
|
||||
extern unsigned int oplength[256];
|
||||
int len = oplength[op] + 1;
|
||||
|
||||
printf(" 0%04o (0x%04x) ", pc, pc);
|
||||
for (i = 0; i < len; i++) printf("%4o", 0xFF & GETBYTE(addr + i));
|
||||
for (; i < 9; i++) printf(" ");
|
||||
printf("%s", opcode_table[op]);
|
||||
printf(" 0%o (0x%x) ", pc, pc);
|
||||
for (i = 0; i < len; i++) printf("%o ", 0xFF & GETBYTE(addr + i));
|
||||
printf(" %s", opcode_table[op]);
|
||||
|
||||
switch (op) {
|
||||
case 0:
|
||||
|
||||
@@ -39,8 +39,8 @@ extern DLword *DisplayRegion68k;
|
||||
|
||||
extern int Current_Hot_X, Current_Hot_Y; /* X Cursor hotspots */
|
||||
|
||||
extern char windowTitle[255];
|
||||
extern char iconTitle[255];
|
||||
extern char Window_Title[255];
|
||||
extern char Icon_Title[255];
|
||||
|
||||
extern int save_argc;
|
||||
extern char **save_argv;
|
||||
@@ -91,8 +91,8 @@ void Create_LispWindow(DspInterface dsp)
|
||||
unsigned int GravSize;
|
||||
char *WT, *IT;
|
||||
|
||||
WT = windowTitle;
|
||||
IT = iconTitle;
|
||||
WT = Window_Title;
|
||||
IT = Icon_Title;
|
||||
|
||||
GravSize = (dsp->ScrollBarWidth / 2) - dsp->InternalBorderWidth;
|
||||
Col2 = dsp->Visible.width;
|
||||
|
||||
16
src/xrdopt.c
16
src/xrdopt.c
@@ -81,14 +81,14 @@ extern char Display_Name[128];
|
||||
char Display_Name[128];
|
||||
extern char iconpixmapfile[1024];
|
||||
char iconpixmapfile[1024];
|
||||
extern char iconTitle[255];
|
||||
char iconTitle[255];
|
||||
extern char Window_Title[255];
|
||||
char Window_Title[255];
|
||||
extern char Icon_Title[255];
|
||||
char Icon_Title[255];
|
||||
extern char cursorColor[255];
|
||||
char cursorColor[255] = {0};
|
||||
extern char foregroundColorName[64];
|
||||
extern char backgroundColorName[64];
|
||||
extern char windowTitle[255];
|
||||
|
||||
|
||||
extern char sysout_name_cl[];
|
||||
extern char sysout_name_xrm[];
|
||||
@@ -247,14 +247,14 @@ void read_Xoption(int *argc, char *argv[])
|
||||
}
|
||||
|
||||
if (XrmGetResource(rDB, "ldex.title", "Ldex.Title", str_type, &value) == True) {
|
||||
(void)strncpy(windowTitle, value.addr, sizeof(windowTitle) - 1);
|
||||
(void)strncpy(Window_Title, value.addr, value.size);
|
||||
} else {
|
||||
(void)strncpy(windowTitle, WINDOW_NAME, sizeof(windowTitle) - 1);
|
||||
(void)strcpy(Window_Title, WINDOW_NAME);
|
||||
}
|
||||
if (XrmGetResource(rDB, "ldex.icontitle", "Ldex.icontitle", str_type, &value) == True) {
|
||||
(void)strncpy(iconTitle, value.addr, value.size);
|
||||
(void)strncpy(Icon_Title, value.addr, value.size);
|
||||
} else {
|
||||
(void)strcpy(iconTitle, "Medley");
|
||||
(void)strcpy(Icon_Title, "Medley");
|
||||
}
|
||||
|
||||
if (XrmGetResource(rDB, "ldex.iconbitmap", "Ldex.Iconbitmap", str_type, &value) == True) {
|
||||
|
||||
Reference in New Issue
Block a user