1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-02-04 23:44:42 +00:00
Commit Graph

826 Commits

Author SHA1 Message Date
Nick Briggs
0cc8e4d71c Revert/update unixfork.c since it is no longer used in emscripten based builds 2023-12-22 13:35:33 -08:00
Nick Briggs
f208fd3302 Rename/move ldesdl.html out of emscripten.wasm (which gets cleared on rebuild) to src/lde.html 2023-12-22 13:18:20 -08:00
Hayley Patton
79a788279b Add Emscripten/WASM support 2023-11-13 15:18:49 +11:00
Nick Briggs
42477318b5 Assignments embedded in if-condition are not a good idea. 2023-11-12 17:37:34 -08:00
Nick Briggs
562f4c30ee Fix typo 2023-11-09 16:48:48 -08:00
Nick Briggs
98569d10b4 Reduce false positives for misaligned pointer access when checking array blocks
The forward and backward pointers in an array block only contain
    valid pointer values when the block is free therefore avoid
    producing native addresses from these fields if the block is in use.

Add comments regarding the operation of the array block merging code
    Array block merging will produce a single block if possible,
    otherwise it will produce two blocks with one as large as possible
    and the other no less than the minimum block size.

Rewrite the checks in array block merge forward to minimize unnecessary field accesses
2023-11-09 15:43:11 -08:00
Nick Briggs
7fce08f92c More Lisp variables to avoid in INIT mode - turn off X11 input handling (#482) 2023-08-09 14:04:51 -07:00
Nick Briggs
8e43a393bd Avoid setting Lisp variables whose locations are unknown when in INIT mode (#481)
* Avoid setting Lisp variables whose locations are unknown when in INIT mode.

* Exit with a success (0) status for normal lisp_finish.
2023-08-01 11:16:42 -07:00
Nick Briggs
4a9f5500c4 struct buf is missing definition for byte-swapped bigvm case (#477)
While there was a definition for the pre-bigvm case, with 24-bit
pointers, for byteswapped (little-endian) systems, there was no
structure definition for the bigvm case, with 28-bit pointers.
2023-07-24 20:43:25 -07:00
Nick Briggs
408559b0d8 Add lisp keynames to document the SDL key map table (#471)
Adding the lisp keynames and reformatting the keymap table to be
one line per Lisp key bit makes it easier to see what is going on.
2023-06-07 16:12:32 -07:00
Nick Briggs
2e893a75ab Merge pull request #467 from Interlisp/sdl
Bring SDL into master branch
2023-05-31 14:44:04 -07:00
Nick Briggs
4754ec73eb Add ctrl-shift-esc as a synonym for ctrl-shift-delete (user interrupt)
On a Mac laptop (without a full keyboard) it isn't easy to generate
the delete in the ctrl-shift-delete user interrupt.  The esc key is
in the same word and can easily be generated, so add ctrl-shift-esc
as an alternative.
2023-05-30 17:19:14 -07:00
Nick Briggs
a6d645ce9b SunOS bug avoidances should only execute when on SunOS 2023-05-16 21:18:15 -07:00
Nick Briggs
e8daed41ea UNIX-GETPARM(DISPLAY) should return "SDL" for SDL-based display, as it returns "X" for X11 2023-05-16 18:52:23 -07:00
Nick Briggs
41ae0162da Construct path for invoking display executable to match original path of lde
The pathname for the display program is constructed to parallel the
path for "lde", which makes it more likely that the correct display
program will get run rather than
  (a) not being found because "lde" wasn't found from the PATH, or
  (b) a different version of the display program which was found from the PATH
2023-05-07 15:10:01 -07:00
Nick Briggs
9cc7d9e13c Remove references to KATANA and replace with MAIKO
No functional difference. Replaces a few leftover references to a prior
project name for the C implementation of the Lisp Virtual Machine with the
current name.
2023-05-05 13:37:25 -07:00
Nick Briggs
45494170a3 Use SDL defined symbolic constants for mouse button events 2023-05-04 18:47:34 -07:00
Nick Briggs
a511feff39 Resolve some warnings noted by clang-tidy
Remove unused #include "miscstat.h"
Make parameters of cursor_equal_p both const
Remove unnecessary extern declarations for EmKbdAd068K, EmRealUtilin68K, MiscStats
2023-05-04 18:11:56 -07:00
Nick Briggs
d14d6183da Comment out debug printf for mousewheel(trackpad) handling. 2023-05-04 12:51:29 -07:00
Nick Briggs
44b2412fd6 Merge pull request #465 from Interlisp/warning-reductions-clang15-part2
Warning reductions clang15 part2
2023-05-01 15:35:01 -07:00
Nick Briggs
087c7a053a Compiling with -DDTDDEBUG requires including testtooldefs.h in gcrcell.c 2023-04-20 18:19:04 -07:00
Nick Briggs
222a9594d5 Speed up initial sysout loading by avoiding unnecessary lseek() calls. (#461)
On slower filesystems/disks, an lseek() operation can consume
noticeable time. During initial sysout loading we can avoid an
unnecessary lseek() before each read() by tracking if the position it
will seek to is the same position that the previous read() left us.
2023-03-19 16:32:00 -07:00
Nick Briggs
0bd29ae643 Remove extraneous extern declarations. Convert some int to LispPTR as appropriate. 2023-03-10 15:23:25 -08:00
Nick Briggs
f16b01167e Remove LHS casts in old color code. Add void return types where needed. Add includes. 2023-03-10 15:20:08 -08:00
Frank Halasz
00d306d72f Maiko code changes needed to compile on Alpine Linux with clang. (#456)
* Changes needed to compile maiko on Alpine Linux with clang.  Switching to Alpine on github actions to streamline maiko release builds

* Changes needed to compile maiko on Alpine Linux with clang.

Switching to Alpine on github actions to streamline maiko release builds.

  * ether_nethub.c missing a couple of includes, and incorrectly including
    <sys/poll.h> instead of plain <poll.h>
  * <dirent.h> does not define MAXNAMLEN on Alpine Linux, but "locfile.h"
    compensates for this already, if it is modified to include <limits.h>,
    so use this in "dirdefs.h".

---------

Co-authored-by: Nick Briggs <nicholas.h.briggs@gmail.com>
2023-03-07 12:12:55 -08:00
Nick Briggs
a8ded8a5f6 Correct syntax error, missing semicolon (#459)
* Correct syntax error, missing semicolon

* Use appropriate datatype for dlpi buffer.  DLPI_CHUNKSIZE is already defined as 4*DLPI_MAXDLBUF.
2023-02-27 17:33:04 -08:00
Nick Briggs
88cde175fc Remove duplicate include version.h (loopsops.c, subr.c, z2.c) 2023-02-26 12:08:25 -08:00
Nick Briggs
d19aec2fbf Remove duplicate include version.h in xbbt.c 2023-02-26 12:04:47 -08:00
Nick Briggs
8e40ae8811 Remove duplicate include version.h in xlspwin.c 2023-02-26 12:04:47 -08:00
Nick Briggs
7c81d1fa08 Remove duplicate include version.h in xrdopt.c 2023-02-26 12:04:47 -08:00
Nick Briggs
ac14ce0e40 Collapse conditionals with identical consequents 2023-02-26 12:04:47 -08:00
Nick Briggs
3745c08f51 Remove unused include files from asmbbt.c 2023-02-26 12:04:47 -08:00
Nick Briggs
d4cccd7878 Simplify awkward if-test expression 2023-02-26 12:04:47 -08:00
Nick Briggs
3e1130909c Simplify awkward if-test expression 2023-02-26 12:04:47 -08:00
Nick Briggs
55b45aa2aa Replace grammatically incorrect comments in rplaca/rplacd 2023-02-26 12:04:47 -08:00
Nick Briggs
2b5a34ebe9 Correct parameter declarations for N_OP_cons (int => LispPTR) 2023-02-26 12:04:47 -08:00
Nick Briggs
2474619e83 Cleanup errors introduced resolving rebase conflicts. 2023-02-19 10:43:55 -08:00
Nick Briggs
d63b933dc8 Clean up various aspects of ldeboot.c (lde)
Handle compilation with both SDL and XWINDOW defines
   If both are defined then the -d/-display will accept
   SDL as a display name and invoke ldesdl rather than ldex.

Improve error messages when display can't be opened

Use exit status 1 for all failures (vs. mixed 1, -1)
2023-02-19 10:11:53 -08:00
Nick Briggs
7d8a7a6668 Clean up SDL infrastructure, add makefiles for more system/cpu combinations
Rationalize the SDL.h include file references so that they work on all systems

Use the correct macOS Framework options to get include path and library search path

Add makefile fragments for SDL on macOS on Apple Silicon, plus FreeBSD and Linux
on same cpus as X11

Switch to gcc rather than clang as the default compiler for Linux systems
2023-02-19 10:07:28 -08:00
Nick Briggs
2bc704c5e3 Minor cleanups after rebase onto master
Fix merge edit mistake in CMakeLists.txt
Add missing includes in draw.c, keyevent.c
2023-02-19 10:07:28 -08:00
Nick Briggs
a3c462d211 Rename sdl_bitblt_to_texture2 to sdl_bitblt_to_texture_exact to be more descriptive 2023-02-19 10:07:28 -08:00
Nick Briggs
376b045c33 Use SDL_LowerBlitScaled() rather than SDL_BlitScaled() 2023-02-19 10:07:28 -08:00
Nick Briggs
7048f7dd8d Handle pixel scaling when creating the cursors 2023-02-19 10:07:28 -08:00
Nick Briggs
a5923f42f9 Clean up cursor code
Use the Lisp type DLword where referring to data stored by Lisp
Access the extern EmCursorBitMap68K directly where appropriate.
Use GETBYTE() macro to correct for endian-ness of host system
when accessing the cursor bitmaps.
Cached cursors can use an ordering strategy that only promotes the
found item if it is third or later in the list since in normal
operation Medley is highly likely to flip back-and-forth between
two cursors.
2023-02-19 10:07:28 -08:00
Nick Briggs
355e6dfb51 Reformat to standard with clang-format 2023-02-19 10:07:28 -08:00
Nick Briggs
b166d36ec4 Cleanup, strip some debug/performance code in display update, minor formatting 2023-02-19 10:07:28 -08:00
Nick Briggs
878168f4f5 Implement bitblt to texture at bit level rather than word level, some cleanup
sdl_bitblt_to_texture2 is an experiment, parallel to sdl_bitblt_to_texture
that only moves as many bits as are required, rather than rounding down(up) to the
nearest (16-bit) word boundary for the start(end) of the line.

Introduces some name changes to make things a little clearer.
2023-02-19 10:07:28 -08:00
Nick Briggs
78bcb188a8 Take pixelscale into account when repositioning cursor 2023-02-19 10:07:28 -08:00
Nick Briggs
0600a034b6 Speedups in texture based display path
Instead of checking "do_invert" at each pixel assignment, assign the
foreground and background colors appropriately when responding to the
(VIDEOCOLOR x) call.

Modify sdl_bitblt_to_texture() so that it does less arithmetic in the inner loop,
including using a table of masks rather than computing 1<<n on each pixel.
Modify sdl_bitblt_to_texture() so that it accesses the Lisp display region
16-bits at a time with the correct ordering for whether we are on a byte-swapped
system or not.
2023-02-19 10:07:28 -08:00
Nick Briggs
16e4062b8f When updating the window surface directly, at scale 1, avoid the intermediate buffer
Adds an sdl_blt_to_window_surface() that goes directly from the Lisp bitmap
to the window surface avoiding the intermediate copy.  This is only coded for a
scale factor of 1.  Uses the intermediate buffer if the scale is not 1.

Corrects an error where the damage rectangle was not properly reset.
2023-02-19 10:07:28 -08:00