Compare commits
No commits in common. "3a1b8eca03f28cfbe09fc5f2b58080f5da84393b" and "85554b62a8467e95f09b90d5201a5f6bef91c70f" have entirely different histories.
3a1b8eca03
...
85554b62a8
12
console.txt
12
console.txt
|
@ -110,13 +110,11 @@ 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
|
||||||
- version (1 byte): 00 (set to non-zero by supporting emulators)
|
- flags (2 byte): 0000 (may be updated by emulator)
|
||||||
- flags (2 byte): 0000 (updated by supporting emulators)
|
|
||||||
|
|
||||||
after being loaded, version will be non-zero if console expansion is
|
after being loaded, flags will be 0x0000 if the console expansion is
|
||||||
supported, and zero otherwise. flags will contain bits describing the
|
not supported. otherwise, it will contain one or more of the following
|
||||||
available capabilities (0x0000 if console expansion is unsupported).
|
flags:
|
||||||
the flags are as follows:
|
|
||||||
|
|
||||||
- 0x0001: supports `execute`
|
- 0x0001: supports `execute`
|
||||||
- 0x0002: supports `kill`
|
- 0x0002: supports `kill`
|
||||||
|
@ -141,7 +139,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 00 0000
|
@query 03 10 ( uuid ) 0123 1250 d878 4462 bc41 d092 7645 a2fa &flags 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,10 +1,6 @@
|
||||||
#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>
|
||||||
|
@ -20,7 +16,6 @@
|
||||||
|
|
||||||
#ifdef __NetBSD__
|
#ifdef __NetBSD__
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/termios.h>
|
|
||||||
#include <util.h>
|
#include <util.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -230,7 +225,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 | IXANY | IMAXBEL);
|
term.c_iflag &= ~(INLCR | IGNCR | ICRNL | IXON | IXOFF | IUCLC | 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,12 +132,14 @@ 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)
|
||||||
int ok = dev_id == 0x10 ? 0xff : 0x00;
|
if(dev_id == 0x10) {
|
||||||
ram[addr + 18] = ok;
|
ram[addr + 18] = 0x00;
|
||||||
ram[addr + 19] = 0x00;
|
ram[addr + 19] = 0xff;
|
||||||
ram[addr + 20] = ok;
|
} else {
|
||||||
}
|
ram[addr + 18] = 0x00;
|
||||||
|
ram[addr + 19] = 0x00;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* IO */
|
/* IO */
|
||||||
|
|
Loading…
Reference in New Issue