1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-02-23 23:52:20 +00:00

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>
This commit is contained in:
devhawala
2022-10-11 23:21:55 +02:00
committed by GitHub
parent 2509a796ce
commit 82577ce951
18 changed files with 1107 additions and 102 deletions

View File

@@ -162,6 +162,17 @@ static const int n_mask_array[16] = {
extern int TIMER_INTERVAL;
#if defined(MAIKO_EMULATE_TIMER_INTERRUPTS) || defined(MAIKO_EMULATE_ASYNC_INTERRUPTS)
# if !defined(MAIKO_TIMER_ASYNC_EMULATION_INSNS_COUNTDOWN)
# define MAIKO_TIMER_ASYNC_EMULATION_INSNS_COUNTDOWN 20000
# endif
int insnsCountdownForTimerAsyncEmulation = MAIKO_TIMER_ASYNC_EMULATION_INSNS_COUNTDOWN;
static int pseudoTimerAsyncCountdown = MAIKO_TIMER_ASYNC_EMULATION_INSNS_COUNTDOWN;
#endif
void dispatch(void) {
InstPtr pccache;
@@ -260,6 +271,17 @@ nextopcode:
#endif /* PCTRACE */
/* quick_stack_check();*/ /* JDS 2/12/98 */
#if defined(MAIKO_EMULATE_TIMER_INTERRUPTS) || defined(MAIKO_EMULATE_ASYNC_INTERRUPTS)
if (--pseudoTimerAsyncCountdown <= 0) {
Irq_Stk_Check = 0;
Irq_Stk_End = 0;
#if defined(MAIKO_EMULATE_ASYNC_INTERRUPTS)
IO_Signalled = TRUE;
#endif
pseudoTimerAsyncCountdown = insnsCountdownForTimerAsyncEmulation;
}
#endif
switch (Get_BYTE_PCMAC0) {
case 000: