aboutsummaryrefslogtreecommitdiffstats
path: root/src/socket.asm
diff options
context:
space:
mode:
Diffstat (limited to 'src/socket.asm')
-rw-r--r--src/socket.asm11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/socket.asm b/src/socket.asm
index 0720b0a..51179b4 100644
--- a/src/socket.asm
+++ b/src/socket.asm
@@ -64,7 +64,12 @@ wNetRxBuf:: DS 320 ; rx frame assembly / parse
wNetRxLen:: DS 2 ; 16-bit: frames can exceed 255 bytes (DHCP/BOOTP)
wNetRxEsc:: DS 1
wNetInFrame:: DS 1 ; net_pump: currently inside a SLIP frame?
-wConRing:: DS 16 ; console-input ring: non-framed bytes from the link
+wConRing:: DS 64 ; console-input ring: non-framed bytes from the link
+ ; (link-injected console input, e.g. gbhub 'type').
+ ; One net_pump drains a whole serial burst into here
+ ; at once, so it must hold a full injected command
+ ; line - 16 was too small (dropped bytes, merged
+ ; lines). Size MUST stay a power of two (mask below).
wConHead:: DS 1
wConTail:: DS 1
wNetUdpPort:: DS 2 ; scratch: UDP dst port being demuxed
@@ -112,7 +117,7 @@ con_push::
ld b, a
ld a, [wConTail]
inc a
- and 15
+ and 63
ld c, a
ld a, [wConHead]
cp c
@@ -145,7 +150,7 @@ con_pop::
ld c, [hl]
ld a, b
inc a
- and 15
+ and 63
ld [wConHead], a
ld a, c
and a ; CF = 0