1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-14 07:30:21 +00:00

1084 Commits

Author SHA1 Message Date
Peter
cf8ecc1dd4 Add mouse wheel diagnostics. 2023-02-19 10:07:27 -08:00
Peter
380416fa2d Only update texture on damage. 2023-02-19 10:07:27 -08:00
Peter
6f0ca7ad1c Add support for key repeating. 2023-02-19 10:07:27 -08:00
Peter
7573151be8 For now, some more extern functions declarations. 2023-02-19 10:07:27 -08:00
Peter
083d153d43 Maybe fix cmake for SDL2. 2023-02-19 10:07:27 -08:00
Peter
13d367e766 Remove SDL2 directory from include SDL2/SDL.h. 2023-02-19 10:07:27 -08:00
Peter
af6c6e3e1d Fix Caso. 2023-02-19 10:07:27 -08:00
Peter
2f633f2f50 Try to unify cmake file for different versions of SDL2. 2023-02-19 10:07:27 -08:00
Peter
74d47b07ca Try SDL2::SDL2 instead of SDL2 in CMakeLists.txt. 2023-02-19 10:07:27 -08:00
Peter
292e5dd9b2 Try to placate the macos build. 2023-02-19 10:07:27 -08:00
Peter
71d2d0a5b0 Apparently there is no sdl2 cask for macos :-/ 2023-02-19 10:07:27 -08:00
Peter
d046d26003 Add SDL2 dependency to macos build. 2023-02-19 10:07:27 -08:00
Peter
81e17c0955 Show cmake version before building. 2023-02-19 10:07:23 -08:00
Peter
40b24ec655 Try to make builds pass again. 2023-02-19 10:06:26 -08:00
Peter
5e28babfa5 Run apt-get update before trying to install. 2023-02-19 10:06:26 -08:00
Peter
6604b3dd06 Add support for -t / -title. 2023-02-19 10:06:24 -08:00
Peter
0187073ae0 Revert CMakeLists.txt change until better understanding. 2023-02-19 10:05:18 -08:00
Peter
79903e311e Also *correctly* install SDL2 on ubuntu runners. 2023-02-19 10:05:18 -08:00
Peter
e2e6aa5366 Also install SDL2 on ubuntu runners. 2023-02-19 10:05:18 -08:00
Peter
8c34ca3106 Try to get CI running again ;) 2023-02-19 10:05:18 -08:00
Peter
b77f64f31e Add command line parameters -sc WxH and -pixelscale n for SDL. 2023-02-19 10:05:15 -08:00
Peter
8038a959c5 Update CMakeLists.txt for cross-compiling. 2023-02-19 10:03:59 -08:00
Peter
085e99a7c0 Add more #ifdef XWINDOW 2023-02-19 10:03:59 -08:00
Peter
3b6b203e6c Remove extra directory from includes for SDL. 2023-02-19 10:03:59 -08:00
Peter
948db16ed9 Refactor, only bitblt once per "frame". 2023-02-19 10:03:59 -08:00
Peter
ffacda1278 Refactor, don't update texture on every bitblt. 2023-02-19 10:03:59 -08:00
Peter
e39b650f4d Only bitblt on damage.
Also add an alternative for key handling, which does not work any better...
2023-02-19 10:03:55 -08:00
Peter
a722e01a4f Change SDL backend to accelerated renderer, support pixel scaling.
Edit main.c, init_SDL(1600, 1024, 1) means lisp display size 1600x1024, pixel scaling 1.

Try init_SDL(800, 512, 2) or even init_SDL(608, 1023, 3).
2023-02-19 10:02:25 -08:00
Peter
8cf471bec9 Add prototypical SDL support.
Build with cmake. This will create a new backend (ldesdl).
- Resolution can only be set by editing the variables in sdl.c.
- Key repeat does not work.
- Still problems with keysyms that implicitly contain modifiers.
- The entire screen is bitblted onto the SDL display every frame.

Support keyboard, and work on mouse.

Kind of working...

Fix display resolution problems.
2023-02-19 10:00:21 -08:00
Nick Briggs
900c9557ab Fix gcscan1, gcscan2 can miss finding 0th entry in gc hashtable #1038
The Lisp implementation distinguishes between 0 and NIL as the result of
    the gcscan1/gcscan2 opcodes, however the C implementation did not, since
    NIL and 0 are indistinguishable.
2023-02-17 17:01:27 -08:00
Nick Briggs
937a003bfb Correct format specification for printing DLword StackOffset (%tx -> %hx) 2023-02-17 17:01:27 -08:00
Nick Briggs
a958af1627 Resolve warning: variable may be uninitialized when used - initialize more variables. 2023-02-17 17:01:27 -08:00
Nick Briggs
7c270c8b49 Adjust CURRENTFX definition to avoid alignment warning (with cast through (void *)) because the stack is appropriately aligned. 2023-02-17 17:01:27 -08:00
Nick Briggs
f7542df4e7 Remove unused macro IDiff and associated SNum struct definition. 2023-02-17 17:01:27 -08:00
Nick Briggs
53fe052432 Quote words in comments that result in warning: unknown command tag name [-Wdocumentation-unknown-command] 2023-02-17 17:01:27 -08:00
Nick Briggs
18089578f6 Remove incorrect comment refering to non-existant '\KB_setMP' function. 2023-02-17 17:01:27 -08:00
Nick Briggs
2cb51ad326 Silence warnings for incompatible pointer type assignments in stack pointer save/restore defines
CSTKPTR is "LispPTR *" while CurrentStackPTR is "DLword *", cast to "void *" to
  silence the warning, add comment pointing out size difference to explain the
  "- 1" vs "+ 2" adjustments when saving/restoring.
2023-02-17 17:01:27 -08:00
Nick Briggs
98a8d8be49 Add diagnostics for odd-sized stack free blocks and guard blocks, silence alignment upgrade warnings
Creating a free block or guard block on the stack with an odd number of 16-bit words
  will cause the system to break badly.  Always check that and report an error.

  Because the stack pointer is declared as "DLword *" (16-bit) for pointer arithmetic,
  although it is always maintained as a pointer to a 32-bit boundary, the compiler generates
  spurious warnings on casting the stack pointer to structures that require 32-bit alignment.
  Silence those warnings by casting through (void *).
2023-02-17 17:01:27 -08:00
Nick Briggs
4cc267856b Correct types in array header and sequence descriptors to match Lisp datatypes
The "fillpointer" and "totalsize" fields of the array header and the "offst"
   of the sequence descriptor were declared as LispPTR, an unsigned type that
   represents an offset into the Lisp memory, however the Lisp datatype
   declaration indicates that these are FIXP (int32_t) rather than pointers.
2023-02-17 17:01:27 -08:00
Nick Briggs
ff7cf4f139 Use compile-time constant SMALLP_ZERO instead of GetSmallp(0) call 2023-02-17 17:01:27 -08:00
Nick Briggs
a7fba8d4bd Clean up various warnings
Number of items to be sorted (prepare_sort_buf, file_sort) is size_t
  Get consts in correct place arguments for comparison routines dsk_filecmp, unix_filecmp
  Use compile-time constant SMALLP_MINUSONE/SMALLP_ZERO instead of calling GetSmallp()
  ERRSETJMP(-1) should be ERRSETJMP(SMALLP_MINUSONE) as it must return a LispPTR
  Call GetPosSmallp() when argument is unsigned (correct type conversion warning)
2023-02-17 17:01:27 -08:00
Nick Briggs
d5490ed807 Rearrange/resize FINFO and FPROP structures to avoid compiler added padding 2023-02-17 17:01:27 -08:00
Nick Briggs
feb546c639 Correct syntax error (missing semicolon) in OPDISP branch table declaration 2023-02-17 17:01:27 -08:00
Nick Briggs
cdf6024452 Add compile-time constants for SMALLP values 0 and -1 2023-02-17 17:01:27 -08:00
Nick Briggs
96b3bddf12 Resolve warning: arithmetic on a pointer to void is a GNU extension
GCC treats the size of a void as 1 for the purposes of arithmetic on
a pointer to void.  Since this was provoked by an explicit cast to
pointer to void we can replace it with a cast to pointer to char for
the same effect.
2023-02-17 17:01:27 -08:00
Nick Briggs
e5894e5b81 Remove unused variable 'before' in check_dtd_chain() 2023-02-17 17:01:27 -08:00
Nick Briggs
b53b5bd710 Resolve unused-variable warning for DOSLispKeyMap_101
DOSLispKeyMap_101 will not be referenced unless compiling with -DDOS so wrap the
declaration in an #ifdef DOS.
2023-02-17 17:01:27 -08:00
Nick Briggs
39b12b20ba Resolve "warning: cast from 'DLword *' to 'LispPTR *' increases required alignment from 2 to 4"
by casting through (void *) since we know that the CurrentStackPTR is maintained with 4-byte
   aligned pointers.
2023-02-17 17:01:27 -08:00
Nick Briggs
fff86c8050 Resolve warning: implicit conversion changes signedness: 'unsigned int' to 'int' by
making the conversion explicit.  The signedness conversion is necessary and expected.
2023-02-17 17:01:27 -08:00
Nick Briggs
dadb754e56 Resolve "warning: cast from 'DLword *' to 'LispPTR *' increases required alignment from 2 to 4"
by casting through (void *) since we know that the CurrentStackPTR is maintained with 4-byte
   aligned pointers.

Resolve type error for user_subr argument.
2023-02-17 17:01:27 -08:00