* 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
* 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)
Have CMake build ldeinit when configured for X11 display, and
update the ever-growing list of names under which clang-tidy may
be found (now up to version 16)
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.
* 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>
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.
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.
The only uses of bzero() in the maiko sources come about because it is used in the macOS
definition of the FD_ZERO() macro in sys/select.h. Suppress the warning by including
-clang-analyzer-security.insecureAPI.bzero
in the clang-tidy list of checks. This may well have been replaced by a memset()
call in more up-to-date macOS releases.
* 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
* 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.
This was like `ldeether`, but for SunOS4 with a color display. It
isn't needed any longer as on Solaris, we have `ldeether`, no color
display, and that code already works, unlike this one.
This is not used in Medley (the MISCN-TABLE-LIST doesn't include
the required constants), nor does anything use or reference this
code. It also won't compile as it needs some routines that are
missing from our code.
* `LOGINT` is only useful when `MAIKO_HANDLE_CONSOLE_MESSAGES`
is set.
* Only define some variables if `MAIKO_HANDLE_CONSOLE_MESSAGES`
is set. Flag them as static.
* Remove setting `LOGINT` from the build system as it isn't
needed because we aren't handling console messages.
Rather than having to specify or omit -DBYTESWAP in the Makefile
fragment for each system we can detect whether the system requires
byte swapping based on the __BYTE_ORDER__ C preprocessor definition.
Update CMakeLists.txt to account for this as well.
This was a machine running SunOS 4, which we no longer support.
It had an odd display controller and a compiler with issues that
required workarounds. Those compiler issues aren't an issue in
today's world, so we don't need to keep the workarounds present
for reference.
It had a bit of inline assembly, but that is still present in
other files for other platforms.
We no longer build a separate `maiko` library that gets linked
into `ldex`. It was the only thing linking it, so now we just
build those files as part of `ldex`.
We only build `ldex` when X11 is requested (which it is by default).
If we add a new display implementation, this structure will support
that by adding a new `ldewhatever` and it will build a new binary
that the `lde` launcher can be updated to support.