1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-13 23:27:12 +00:00

207 Commits

Author SHA1 Message Date
Nick Briggs
aa4df518a1
Release 201 corrections (#510)
* Fix compilation for maiko version 201

Version 201 does not have BIGVM, so SWA_FNHEAD requires swapx
which is defined in byteswapdefs.h

* Fix compilation for maiko version 201

Version 201 did not have NEWCDRCODING, so the implementation of
N_OP_rplcons requires definitions from gcdata.h and address.h

* Set up makeright etc. to allow for easier compilation of alternate versions

The makeright script and the makefile-* slices it depends are modified
to allow easily specifying the RELEASE version number of the Maiko emulator
to be built.  The default version remains 351, but can be changed with e.g.

RELEASE=201 ./makeright x

The object directories and executables are NOT named with the version.

* Remove unnecessary include of gcdata.h from bbtsub.c

* Users of gcdata.h should include gchtfinddefs.h explicitly if they use gcdata.h macros

* Correct modify_big_reference_count entry parameter type to reflect dependence on GCENTRY size differences between releases

* Add MAIKO_RELEASE to CMake options for building
2024-09-01 16:26:30 -07:00
Nick Briggs
c765ca5cc8
Update SDL dependent code and makefile segments to prepare for SDL3 (#497)
* Update SDL dependent code and makefile segments to prepare for SDL3

Many APIs have changed between SDL2 and SDL3.  This update adds
preprocessor conditionals to adapt the Maiko SDL code to allow selection of
the SDL major version (2 or 3) from the -DSDL=n define.

The SDL3 implementation is currently available as a preview release, 3.1.0, at
   https://github.com/libsdl-org/SDL/releases/tag/prerelease-3.1.0

* Add updates for makefile-haiku.x86_64-sdl to prepare for SDL3

* Allow makeright to accept sdl3 as display type to ease SDL3 experiments

* Update CMakeLists.txt for SDL3 library

 * Replaces configuration option -DMAIKO_DISPLAY_SDL=ON/OFF with
   -DMAIKO_DISPLAY_SDL=OFF/2/3
 * Replaces PUBLIC definitions with PRIVATE definitions on targets since
   we are not exporting definitions outside this local compilation
 * Update messages to indicate which version of SDL is being configured
 * Add fixup for SDL3.xcframework on macOS to compensate for missing
   RPATH specification (CMake issue 25998)
2024-05-21 12:07:13 -07:00
Nick Briggs
db5d5a31e7
Add -rpath /Library/Frameworks to accommodate newer macOS releases (#505)
On or before macOS Ventura's release, defaulting the @rpath to
include /Library/Frameworks stopped.  Since we expect the SDL2
framework to be installed there we must add a -rpath option.
This should be backwards compatible with older macOS releases.
(verified on Catalina but nothing older)
2024-05-19 23:39:00 -07:00
Nick Briggs
3979cdd60d
Update config.guess, config.sub to current GNU versions (#500) 2024-05-06 22:57:16 -07:00
Anarchos
e2e2c7e394
Haiku OS port (#485)
* Haiku OS port
* haiku with X11 backend
* haiku has stpncpy
* Haiku is not Linux.
* X not stable enough on Haiku
* Haiku : settimeofday is a no-op
* Haiku : no need to define settimeofday at all (pointed by nbriggs)

---------

Signed-off-by: Anarchos <sylvain_kerjean@hotmail.com>
2024-04-10 20:14:46 -07:00
Frank Halasz
ce7deadad3 Added LZ4 compression to wasm_nl 2024-02-10 00:40:20 -08:00
Frank Halasz
8c54c0fbe0 First pass at workflow to build maiko for emscripten 2024-02-07 12:55:49 -08:00
Nick Briggs
e93e3c895e Update preloaded directories, allow Emscripten runtime to exit, set MAIKO_ENABLE_NETHUB
Compiling with -DMAIKO_ENABLE_NETHUB makes it possible to test out having a WebSocket
server that could pass packets back and forth to the Dodo NetHub.

Setting Emscripten link-time option for EXIT_RUNTIME allows the runtime code to shutdown
when you exit Medley via a (LOGOUT)

Set up preloads for all the parts of the Medley directory that MEDLEYDIR-INIT expects
to be there.  The resulting ldesdl.data is (at this time) 128 MB.  It can be installed
gzipped if using nginx or some other web server that supports pre-zipped static files.
It would be better to have these as lazy-loading files, but the setup for that is
complicated.  Another alternative to embedding all the data would be if a WebSocket
to  XNS/Nethub gateway were written and deployed.
2024-01-01 17:30:01 -08:00
Nick Briggs
7bb2393637 Adjustments to WAsm file system layout and compilation options
Moves the full.sysout from the root of tle system to /medley/loadups/full.sysout,
adds /medley/lispusers/BACKGROUND-YIELD.LCOM and an Emscripten/WAsm specific
site init file at /usr/local/lde/site-init.lisp

Adjusts options so that the options are in the correct place for the
compiler and loader.
2023-12-27 17:20:11 -08:00
Nick Briggs
e82b47a9e7 Give emcc link-time flags only to the link phase not the compile phase 2023-12-22 13:13:32 -08:00
Hayley Patton
79a788279b Add Emscripten/WASM support 2023-11-13 15:18:49 +11:00
Nick Briggs
6cea8c69b0 Switch makefile slice for building ldeinit on Linux x86_64 from clang to gcc 2023-11-12 15:46:30 -08:00
Nick Briggs
eb3b382ac6 Correct comment about processor type in makefile slice 2023-11-12 15:44:29 -08:00
Nick Briggs
c9b4164d89 Add makefile slice for building ldeinit on Linux aarch64 systems 2023-11-12 15:43:07 -08:00
Nick Briggs
2c55f7923c
Add makefile slice for OpenBSD init on x86_64. (#478)
* Add makefile slice for OpenBSD init on x86_64.

* Correct flags for init.
2023-08-03 11:55:22 -07:00
Nick Briggs
09e73d4153
Update machinetype and osversion scripts to invoke config.guess from same directory (#479)
If machinetype or osversion are executed from other than the current working directory
they will fail to execute the config.guess script because it was invoked with "./config.guess".
This update attempts to determine the directory where machinetype or osversion
were found and uses the same path to invoke config.guess.
2023-08-03 10:18:02 -07:00
Frank Halasz
44a4a4c42c
Add cygwin-sdl build to buildRelease workflow (#476)
* Start cygwin-sdl builds: first pass at buildCygwinBuilderImage workflow.  Add makefile-cygwin.x86_64-sdl.

* WIP Dockerfile_cygwin_builder

* First pass of complete cygwin-sdl build workflow

* Fix indent error in buildCygwinBuilderImage.yml

* fix incorrect use of github token in buildCygwinBuilderImage.yml

* fix incorrect use of --build-arg in buildCygwinBuilderImage.

* fix incorrect docker build statement in buildCygwinBuilderImage.

* make docker tag lowercase since apparently Wiondows docker doesn't like uppercase tags in buildCygwinBuilderImage.

* fix quotiing on last commit in buildCygwinBuilderImage.

* fix download output location for SDL2 in buildCygwinBuilderImage.

* Add windows/cygwin build to buildRelease workflow

* Fix typos in buildRelease workflow

* Fix more typos in buildRelease workflow

* Debugging per-system if statements buildRelease workflow

* Debugging per-system if statements buildRelease workflow #2

* Debugging per-system if statements buildRelease workflow #3

* Fix checkout actions step to use powershell-sims not bash-isms in Windows job

* Fix Docker_env step to use powershell-isms not bash-isms in Windows job

* Fix Docker_env step to use powershell-isms not bash-isms in Windows job #2

* Fix Docker_env step to use powershell-isms not bash-isms in Windows job #3

* Revamp cygwin build to use docker build instead of docker buildxx because buildx seems to not like windows containers

* Fix some line split nonsense

* Fix typo in last commit

* Add proper repo info to Dockerfile_cygwin_maiko

* More debugging

* Revamp how cygwin-sdl is built - now build directly on runner and not via a Dcokerfile and docker.

* Fix typo

* Fix retrieve of sdl2

* Fix set up release tag action to ake account of the fact that Maiko has been checked out to cygwin\maiko instead of top level workspace

* Fix set up release tag action to ake account of the fact that Maiko has been checked out to cygwin\maiko instead of top level workspace #2

* Fix set up release tag action to ake account of the fact that Maiko has been checked out to cygwin\maiko instead of top level workspace #3

* Cleanup build maiko step

* Prevent git from messing uo line endings on checkout

* Fix copy of cygwin.x86_64 dir to relesase tars

* Set execute bit of (almost) all files in release tar; rearrange build step to use cyugwin bash as the shell

* Fix rearrange build step to use cyugwin bash as the shell

* Try a different way of rearrange build step to use cyugwin bash as the shell

* Fix typo

* When cygwin bash as shell did not work; reverting to brute-force way

* Hopefully fix release push not getting tar file

* Cygwin-sdl build working; remove debugging code

* Remove wrokflow files associated with abandoned attempts at building cygwin via docker

---------

Co-authored-by: Frank Halasz <fghalasz@interlisp.org>
2023-06-18 11:48:39 -07:00
Frank Halasz
7b42a5b51e Update makefile-darwin*-sdl for cross compiling. Update buildRelease workflow to handle compiling Darwin/SDL versions 2023-06-05 18:21:48 -07:00
Frank Halasz
6f71e2b197 Return makeright to original and use LDEARCH env variable instaed; update darwin makefielsd with --target param; update buildReleaseInclDocker workflow to build both x86_64 and aarch64 binaries as well as universal binaries. 2023-06-05 17:12:01 -07:00
Frank Halasz
6d575a8f22 Updating darwin makefile-inits for cross-compilation 2023-06-05 17:12:01 -07:00
Frank Halasz
e074699beb Add extra arg to makeright to allow choice of arm64 or x64 on Darwin (MacOS) platform. Enables cross-compiles bertween x64 and arm64 Macs. 2023-06-05 17:12:01 -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
3223ef2839 Remove now unnecessary hdw_conf.h and all references in makefile fragments and CMakeLists.txt 2023-05-05 14:02:30 -07:00
Nick Briggs
525b9c94d8
Add "clean" as synonym for "cleanup" in ./makeright <display> cleanup (#463)
There is no reason for the constructed makefile not to recognize "clean"
as well as the original "cleanup" as target to remove the object files
and executables.
2023-03-17 22:45:40 -07: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
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
4853f0e3f5 Fix missing prototype adding ttydefs.h, declare tty_baudtosymbol() as static. 2023-02-17 17:01:27 -08:00
devhawala
82577ce951
Dodo Nethub support (#445)
* added support for XNS networking via Dodo-Nethub

* NetHub connection now optional (only if -nh-host is given); released NetHub-related changes to 'ether.c' to the public domain

* Added file using-dodo-networking-with-maiko.md

Documentation for building and using the Dodo-networking addition to Maiko

* Added support for running Maiko unter cygwin/x86_64-x

* Migrate Addr68k/NativeAlignment{2,4} in Nethub code, move timer/async defines to platform.h

* added missing include <netinet/in.h> for FreeBSD

* updated 'compile-flags' with added flags

* splitted ether.c in 3 (_common, _sunos, _nethub)

* reworks/modifications for nbriggs' pull-request review comments

* addintional additions for nbriggs' pull-request review comments

* get the Lisp packet lengths with 'LispInt2CInt'

* renamed variables in dblwordsSwap to indicate it's about double-words

* fixed wrong preprocessor directive unnoticed by clang

* added networking choice option to cmake build, fix to printf warning

- for cmake specify the networking to use with -DMAIKO_NETWORK_TYPE=<type>
- with <type> one of: NONE, SUN_DLPI, SUN_NIT, NETHUB
- e.g.: cmake .. -DMAIKO_NETWORK_TYPE=NETHUB

* integrated improvement to sendPacket() proposed by nbriggs

* integrated fix for SIGBUS on 32-bit big-endian, provided by nbriggs

* MAIKO_ENABLE_ETHERNET should not be unconditionally set on Solaris systems

* Receiving an ethernet packet is an ether interrupt but not an i/o interrupt.

Co-authored-by: dev hawala <devhawala@x.y>
Co-authored-by: Nick Briggs <nicholas.h.briggs@gmail.com>
2022-10-11 14:21:55 -07:00
Nick Briggs
b94cb8809b Combine three small arithmetic opcode implementation files into one
Combines arith2.c ... arith4.c files and their associated header files
into new arithops.c/arithopsdefs.h files, and adjusts the CMakeLists.txt,
and old-style makefile-tail.  Also updates  makefile-dos,
inlnPS2.h, and inlndos.h to reflect these changes, though these are not
used.
2022-08-10 20:16:59 -07:00
Nick Briggs
601d6e9142 Combine six small array opcode implementation files into one
Combines the array..array6 files and their associated header files
into new arrayops.c/arrayopsdefs.h files, and adjusts the CMakeLists.txt
and old-style makefile-tail to reflect these changes.
2022-08-10 12:54:06 -07:00
Nick Briggs
5fa05ac3d7
Cleanup types in URaid and move declarations to separate include file (#428) 2022-07-20 10:45:37 -07:00
Nick Briggs
77957d421a
fix some compiler warnings (#423)
* Pedantic C compilers want an extern declaration separate from initialization

* Remove duplicate definitions for fns in initdspdefs.h from display.h

* Remove misleading comments on structure member offsets and reorder to minimize padding
2022-07-20 10:18:59 -07:00
Nick Briggs
26fe840edf
Convert "mkvdate" into a shell script instead of compiled C code (#411)
For all	systems other than DOS, use a simple shell script to create
the vdate.c (contains version date) that goes into every build.
2021-12-09 12:36:12 -08:00
Nick Briggs
212a0fa9c6
Add some support for cross-compilation to MC68000 AmigaOS (#412)
Add m68k to recognized CPUs (machinetype)
Add amigaos to recognized operating systems (osversion)
Add ability to override "config.guess" output w/ LDEARCH= to osversion
Add platform.h clauses to recognize AmigaOS 3 using gcc to cross-compile
2021-12-08 12:03:04 -08:00
Nick Briggs
4d2bf13347 Add description for ethernet related flags to compile-flags 2021-09-25 15:01:21 -07:00
Larry Masinter
c7adb3c4ba
Add scripts to aid in constructing github releases of the maiko artifacts (#395)
Until these are superceded by github actions, if the github CLI tool "gh"
is installed, a github release of the maiko code can be created by running
   ./start-release
from the maiko/bin directory, and then running
   ./release-one
for each combination of OS/architecture that should be included in the
release.

The scripts assume that the maiko code is checked out in a directory
named "maiko" (and may produce unexpected results if run from somewhere else)

Co-authored-by: Nick Briggs <nicholas.h.briggs@gmail.com>
2021-09-10 13:33:54 -07:00
Nick Briggs
377a6f3f47
Rewrite keyboard and async I/O handling to improve performance and reduce dependency on async I/O signals (#392)
* Rewrite keyboard and async I/O handling to improve performance and reduce dependency on async I/O signals

Replaces the SIGIO handler, which used to process X events in the interrupt context, with
a stub routine that sets a flag to signal processing is required.
Actual event processing is moved to the main dispatch loop where Lisp periodic interrupts
are handled.

Removes the X connection file descriptor from the set of fds contributing to SIGIO events
and moves the processing of X events to where the Lisp periodic interrupt is handled in
the main dispatch loop.  This code is already guarded by a check for XPending() so can
be called regardless of whether any file descriptors are known to be ready.

Actual processing of async I/O events and X events are handled by procedures
process_io_events() and process_Xevents() respectively.  For the most part these are
a renaming of getsignaldata() and getXsignaldata().

The Lisp periodic timer (VTALRM) was set to operate with a 25000 us period (40 Hz),
but on modern hardware it is possible to run this timer with a period of 10000 us (100 Hz)

Incidentally, a bug was noted (and fixed) in the X event handling code for motion events:
Mouse motion without any keyboard activity should not add an entry to the keyboard event
ring buffer as these events do not represent a key state change.
Since the ring buffer is of limited size, when it is filled new events are ignored
until the buffered events are processed.  This resulted in the loss of a key/mouse button
transition (up or down) if the mouse was moved about "too much" between keyboard events.

A few incidental cleanups were also made:
  - KBDEventFlg initialization fixed (wrong semantic type)
  - Event_Req renamed to IO_Signalled (more appropriate name)
  - int_io_open() sets up process (self) to handle SIGIO generated by O_ASYNC operations
  - LOCK_X_EVENTS turned off since X library calls can no longer happen in an interrupt context

* Use of O_ASYNC must depend on the symbol being defined (looking at you, Cygwin)

* Add SA_RESTART flag to sigaction for SIGVTALRM periodic interrupt

* LOCK_X_UPDATE is no longer needed and should not be defined by default for Solaris in version.h
2021-09-02 12:42:51 -07:00
Nick Briggs
e957e331c4
Lock X updates for all systems and lock around X cleanup at exit (#391)
* Lock X updates for all systems and lock around X cleanup at exit

All systems which could generate I/O interrupts on the X file descriptor need
to have locking enabled, or there is a high probability that the X library
will deadlock. This requirement may be removed in the future with restructuring
of the way that the interrupt driven I/O is handled.

Ensure that the appropriate XLOCK/XUNLOCK is done around the X window
closing code.

* Also lock X updates when building with CMake.
2021-08-26 16:29:10 -07:00
Nick Briggs
c33386ef44
Remove code for unsupported Sun display configurations (#388)
* Remove code for unsupported Sun display configurations

Initial cleanup removing all code that was #ifdef'd for SUNDISPLAY.
Other SunWindows dependent code may also be removeable

* prropstyle will never be defined with no SunWindows support and therefore no pixrect code

* Remove code that is ifndef NOPIXRECT, since pixrects are part of the obsolete Sun windows code.

There are still traces of pixrect dependent code that could be removed.
2021-08-10 16:31:59 -07:00
Tim Hawes
ef31b3fe0b
Additional Makefiles for FreeBSD amd64, Raspberry Pi (#387)
* Add makefiles for FreeBSD amd64 and aarch64

* Add appropriate comments in new makefiles

* Add makefile-init files for the new FreeBSD archs
2021-08-08 14:59:15 -07:00
Nick Briggs
b53620852a Clean up makefile fragments for FreeBSD on 386
* Add LOCK_X_UPDATES
* Increase optimization level to -O2 and adjust -g option
* Add makefile-init-freebsd.386 in order to do loadups
2021-07-30 17:46:35 -07:00
Larry Masinter
f6da80f8b3
add makefile-init-linux.x86_64 (#373) 2021-03-18 15:45:02 -07:00
Nick Briggs
d025ff0101
Add makefile fragment for INIT processing for macOS on x86_64 (#371) 2021-03-15 20:52:45 -07:00
Nick Briggs
082bd15542
Add makefile fragment for armv7l systems that self-identify as aarch64 instead (#368)
Closes #361
2021-02-24 19:24:19 -08:00
Nick Briggs
aa32c8347b Improve process of building ldeinit to allow for different options on different OSs 2021-02-18 11:12:14 -08:00
Nick Briggs
966a0bd7e0 Move default target out of makefile-tail to more specific makefile fragments
The default targets differ depending on the display type and whether networking
is configured in or not, so it's more appropriate in the individual fragments
2021-02-18 10:33:30 -08:00
Nick Briggs
e317c37f03 Move OSARCHDIR defn from makefile-tail to makefile-header 2021-02-18 09:17:56 -08:00
Nick Briggs
ef7149e8e4 Cleanup whitespace issues 2021-02-15 16:47:14 -08:00
Nick Briggs
64c04b5e2d Update dependencies in makefile-tail
Dependencies for all object files created during default compilation are updated
based on compiler generated, non-system, headers used.
2021-02-15 16:25:40 -08:00