Merge remote-tracking branch 'origin/d6/multiprocess' into d6/multiprocess
This commit is contained in:
commit
2899c45b9f
12
console.txt
12
console.txt
|
@ -110,11 +110,13 @@ following expansion layout:
|
||||||
- operation (1 byte): 03 (uuid extension)
|
- operation (1 byte): 03 (uuid extension)
|
||||||
- device (1 byte): 10 (console)
|
- device (1 byte): 10 (console)
|
||||||
- uuid (16 bytes): 0123 1250 d878 4462 bc41 d092 7645 a2fa
|
- uuid (16 bytes): 0123 1250 d878 4462 bc41 d092 7645 a2fa
|
||||||
- flags (2 byte): 0000 (may be updated by emulator)
|
- version (1 byte): 00 (set to non-zero by supporting emulators)
|
||||||
|
- flags (2 byte): 0000 (updated by supporting emulators)
|
||||||
|
|
||||||
after being loaded, flags will be 0x0000 if the console expansion is
|
after being loaded, version will be non-zero if console expansion is
|
||||||
not supported. otherwise, it will contain one or more of the following
|
supported, and zero otherwise. flags will contain bits describing the
|
||||||
flags:
|
available capabilities (0x0000 if console expansion is unsupported).
|
||||||
|
the flags are as follows:
|
||||||
|
|
||||||
- 0x0001: supports `execute`
|
- 0x0001: supports `execute`
|
||||||
- 0x0002: supports `kill`
|
- 0x0002: supports `kill`
|
||||||
|
@ -139,7 +141,7 @@ that determines whether the console expansion can be used:
|
||||||
|
|
||||||
@enable-uxn-console ...
|
@enable-uxn-console ...
|
||||||
|
|
||||||
@query 03 10 ( uuid ) 0123 1250 d878 4462 bc41 d092 7645 a2fa &flags 0000
|
@query 03 10 ( uuid ) 0123 1250 d878 4462 bc41 d092 7645 a2fa &flags 00 0000
|
||||||
|
|
||||||
note that uxn11 unconditionally enables the expanded console. so in
|
note that uxn11 unconditionally enables the expanded console. so in
|
||||||
this case the uuid-based extension mechanism is only used to detect
|
this case the uuid-based extension mechanism is only used to detect
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#undef _POSIX_C_SOURCE
|
#undef _POSIX_C_SOURCE
|
||||||
#define _POSIX_C_SOURCE 200112L
|
#define _POSIX_C_SOURCE 200112L
|
||||||
|
|
||||||
|
#ifdef __NetBSD__
|
||||||
|
#define _NETBSD_SOURCE
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -16,6 +20,7 @@
|
||||||
|
|
||||||
#ifdef __NetBSD__
|
#ifdef __NetBSD__
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
#include <sys/termios.h>
|
||||||
#include <util.h>
|
#include <util.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -225,7 +230,7 @@ host_raw_tty()
|
||||||
/* corresponds to `stty raw -echo` */
|
/* corresponds to `stty raw -echo` */
|
||||||
term.c_cflag |= (CS8);
|
term.c_cflag |= (CS8);
|
||||||
term.c_iflag &= ~(IGNBRK | BRKINT | IGNPAR | PARMRK | INPCK | ISTRIP);
|
term.c_iflag &= ~(IGNBRK | BRKINT | IGNPAR | PARMRK | INPCK | ISTRIP);
|
||||||
term.c_iflag &= ~(INLCR | IGNCR | ICRNL | IXON | IXOFF | IUCLC | IXANY | IMAXBEL);
|
term.c_iflag &= ~(INLCR | IGNCR | ICRNL | IXON | IXOFF | IXANY | IMAXBEL);
|
||||||
term.c_lflag &= ~(ICANON | ISIG | ECHO);
|
term.c_lflag &= ~(ICANON | ISIG | ECHO);
|
||||||
term.c_oflag &= ~(OPOST);
|
term.c_oflag &= ~(OPOST);
|
||||||
term.c_cc[VMIN] = 0;
|
term.c_cc[VMIN] = 0;
|
||||||
|
|
|
@ -132,14 +132,12 @@ system_expansion_uxn38_device(Uxn *u, Uint8 *ram, Uint16 addr)
|
||||||
{
|
{
|
||||||
Uint8 dev_id = ram[addr + 1];
|
Uint8 dev_id = ram[addr + 1];
|
||||||
Uint8 *uuid = &ram[addr + 2];
|
Uint8 *uuid = &ram[addr + 2];
|
||||||
if(uuid_eq(uuid, console_uuid) != 0)
|
if(uuid_eq(uuid, console_uuid) != 0) {
|
||||||
if(dev_id == 0x10) {
|
int ok = dev_id == 0x10 ? 0xff : 0x00;
|
||||||
ram[addr + 18] = 0x00;
|
ram[addr + 18] = ok;
|
||||||
ram[addr + 19] = 0xff;
|
ram[addr + 19] = 0x00;
|
||||||
} else {
|
ram[addr + 20] = ok;
|
||||||
ram[addr + 18] = 0x00;
|
}
|
||||||
ram[addr + 19] = 0x00;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* IO */
|
/* IO */
|
||||||
|
|
Loading…
Reference in New Issue