1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-17 08:33:48 +00:00

1333 Commits

Author SHA1 Message Date
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
5bd9de5e36 Suppress empty-statement warning for XLOCK/XUNLOCK macro when not doing locking 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
b3d27cdece Clean up formatting of table in NEWCDRCODING.md 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
e94d0f1cff Correct capitalization of macOS in README.md 2023-02-26 12:04:47 -08:00
Bruce Mitchener
97bf4961ba
Remove unused struct lbits / LBITS. (#458) 2023-02-26 11:31:44 -08:00
Frank Halasz
38147abef9
Merge pull request #455 from Interlisp/fgh_buildBuilder
Add a workflow to build a Docker image with all tools to build Maiko for Linux
2023-02-22 14:03:02 -08:00
Frank Halasz
fcdc180254 First-pass buildBuilderImage.yml 2023-02-22 12:29:49 -08:00
Frank Halasz
f36cc29af2 Adding new workflow to build builder image 2023-02-22 12:29:49 -08:00
Nick Briggs
2474619e83 Cleanup errors introduced resolving rebase conflicts. 2023-02-19 10:43:55 -08:00
Nick Briggs
11c7df5813 Note display subsystem configuration in CMake output. 2023-02-19 10:12:05 -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
4ae1987c33 Teach makeright to compile for SDL display on MacOS on x86_64 CPU 2023-02-19 10:07:28 -08:00
Nick Briggs
8c490df964 Instruct git to ignore SDL object directories for x86_64 builds 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
d2700aa637 Some systems require C99 extensions to get sigset utilities. 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
ca7f09bb6d Minor changes to add missing file for SDL and set no extensions for C compiler
Sets CMAKE_C_EXTENSIONS to OFF as we wish to use c99 *not* gnu99
Adds inc/sdldefs.h to SDL header files list
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
Nick Briggs
4104219ee5 Avoid intermediate buffer and bitblt Lisp screen changes directly into the texture pixels
Using SDL_LockTexture/SDL_UnlockTexture we can gain more direct access to the pixels of the
texture and update them directly from the Lisp screen bitmap.

At the same time, for both the rendering case and the display surface case,
update the pixel format used to be either the first (presumably preferred?)
format for a texture, or the surface format of the window.

Use the SDL routines to pick out the pixel value for Black and White based on the
destination it will be placed in.
2023-02-19 10:07:28 -08:00
Nick Briggs
74da70d0b4 Introduce alternative method for updating window from Lisp bitmap
If the preprocessor symbol SDLRENDERING is defined the code operates as
it previously did.  In the absence of that, we process the Lisp bitmap
into an intermediate form (as before) but then use SDL bitblt to
redraw the intermediate form on the window's surface.
2023-02-19 10:07:28 -08:00
Nick Briggs
2b957aa8f3 Move display update into separate procedure 2023-02-19 10:07:28 -08:00
Nick Briggs
e5b8248465 Width, but not height, must be multiple of 32 2023-02-19 10:07:28 -08:00
Nick Briggs
fab10fc71f Bounds check indexing into intermediate screen buffer
When building with -DCMAKE_BUILD_TYPE=Debug, we assert() that the
index into the intermediate screen buffer is in bounds.
2023-02-19 10:07:28 -08:00
Nick Briggs
a2f8f23152 Keep damage notification boundaries within the current screen
On startup, bitblt calls may be made for the original screen size
and if the new screen size is smaller than that, we must ensure
that damage notifications are contained within the new screen.

Move definition of min() so we can use it in sdl_notify_damage()
2023-02-19 10:07:28 -08:00
Peter
0e731ce02d Cache cursors for SDL. 2023-02-19 10:07:28 -08:00
Peter
0ed7719343 Change Pixelformat to 332 (one byte) instead of 8888 (four bytes). 2023-02-19 10:07:28 -08:00
Nick Briggs
64e0419af3 Fix "error: implicit declaration of function" from dspsubrs
Creates an sdldefs.h, declares a few more functions in sdl.c static,
and includes sdldefs.h in dspsubrs.c when necessary.
2023-02-19 10:07:28 -08:00
Peter
1db44b1f76 Add support for setting the mouse cursor. Not finished!
Currently this just allocates a new X cursor each time, should be
amended to cache the cursor, just like X does at the moment.
2023-02-19 10:07:27 -08:00
Peter
dbba06d9e1 Add support for inverting video and setting mouse position.
Use (IL:VIDEOCOLOR T/NIL) to change inversion.
2023-02-19 10:07:27 -08:00
Peter
cf8ecc1dd4 Add mouse wheel diagnostics. 2023-02-19 10:07:27 -08:00