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

190 Commits

Author SHA1 Message Date
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
Bruce Mitchener
d1e0e006da
Remove some of the outdated compile-flags entries. (#347)
These are no longer referenced in code.
2021-02-11 18:29:31 +00:00
Larry Masinter
3ae9d558b1
fix the darwin.arm64 to use xquartz config (#342) 2021-02-10 21:36:05 +00:00
Bruce Mitchener
ec95bb7a51
Remove OEXT from makefile system. (#336)
This was originally here to make something in the Apollo toolchain
happy, but it hasn't been needed in ages, and was inconsistently
applied.
2021-02-09 02:48:09 +00:00
Nick Briggs
d482cc461c
Address older versions of C compiler which don't have __BYTE_ORDER__ (#335)
* Address older versions of C compiler which don't have __BYTE_ORDER__

* Checking for __GNUC__ is not sufficient to determine if builtins are available.

* Add makefile fragment for 32-bit PowerPC on Mac OSX build, and ignore the build directories.

* Add comment describing use of __BIG/LITTLE_ENDIAN__ definition
2021-02-06 20:51:42 -08:00
Bruce Mitchener
275c5b9c13
Clean up MAIKO_HANDLE_CONSOLE_MESSAGES some. (#331)
* `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.
2021-01-31 21:22:13 -08:00
Nick Briggs
261069f131
Detect byte order from preprocessor definition (#330)
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.
2021-01-31 16:56:35 -08:00
Bruce Mitchener
70db63449c
Remove support for the Sun386i. (#329)
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.
2021-01-31 04:02:40 +00:00
Nick Briggs
5c12d3d9fc
Define RM in makefile if it is not already defined (#326)
Some versions of "make" do not predefine make variable RM (looking at you, FreeBSD)
so if it has NOT been defined we define it as "rm -f"

Also, update the cleanup target to use $(RM) rather than refering directly to "rm".
2021-01-30 18:10:39 -08:00
Bruce Mitchener
0efeedd6d3
Remove AIX define from Linux, Cygwin, Solaris, OpenBSD. (#320) 2021-01-28 23:04:57 -08:00
Bruce Mitchener
b766153e85
Remove checksum scripts. (#312)
These are no longer used in our installation / deployment
process.
2021-01-28 18:19:21 +00:00
Bruce Mitchener
ae6c1dbd6a
make: Use builtin macro $(RM) rather than /bin/rm. (#311) 2021-01-28 18:16:23 +00:00
Bruce Mitchener
40d91f0afb
make: Fix LDFLAGS ordering to fix cygwin build. (#313)
Cygwin has a linker that requires the libs to come last.

Closes Interlisp/medley#170.
2021-01-28 06:30:16 +00:00
Nick Briggs
f7113d53ee
Remove provision for offline assembler peephole optimizations on SunOS3/4 (#304)
We no longer need to run a separate peephole optimization pass over the
compiler generated or hand-coded assembler for SunOS3 and SunOS4 on 68K or SPARC

We remove the preprocessor symbols and code controlled by them
	SUN4_OS4_IL
	SUN3_OS3_IL
	SUN3_OS4_IL
and	SUN3_OS3_OR_OS4_IL
2021-01-26 16:44:40 -08:00
Bruce Mitchener
eba664771a
Fix tty.c to compile. (#180)
This removes a bit of the debug info printing, but other than
that, is pretty close to what it was before.

We also now build it in both the make and cmake build systems.
2021-01-26 17:42:17 +00:00
Nick Briggs
d8257e7659
make makefile-tail cleanup target remove everything (#303) 2021-01-26 16:25:28 +00:00
Nick Briggs
9ca86a662f
Remove the check_unix_password functionality from uutils.c (#297)
This code has not worked for a long time.  Most systems now maintain
the password entries so that a password is not accessible through the
getpwent() interface.  The SUBR that calls this interface may be
removed at a future time.
2021-01-25 21:53:36 -08:00
Bruce Mitchener
987c38b465
Build .o files for executables separately. (#296)
We need to build `.o` files for the executables separately from
their link step. This lets us have the `CFLAGS` only get used
by the compilation step and not the link step (which uses
`LDFLAGS` or a variant).

This is a prerequisite for doing automatic dependency tracking.
2021-01-25 09:52:53 -08:00