Atari direct POKEY serial to network raw data streaming with FujiNet.
This repo contains:
- A stripped-down Altirra 850 handler built with either MADS (
handler/mads/) or CA65 (handler/ca65/) for FujiNet NETStream - An Atari chat example (cc65) that can use either handler build
- A Linux UDP chat client to talk to the Atari
- A UDP sequencing test (Atari client + Linux server)
- Build tools to assemble ATR disk images with
autorun.sys,NSENGINE.OBX, and DOS files
Requirements:
mads(Mad Assembler)cc65toolchain (setCC65_HOMEpath in Makefile if needed)dir2atr(used to build the ATR, in your environment path or edit Makefile with direct path)cc(for the Linux chat example)
Build everything:
make clean && make
Build only one Atari handler syntax and its Atari examples:
make mads
make ca65
Build only the handler binaries/objects:
make handlers
make mads-handler
make ca65-handler
The two handler syntaxes implement the same runtime API, but are packaged differently:
- MADS builds a standalone Atari DOS binary,
NSENGINE.OBX, loaded by the examples atHANDLER_BASE. - CA65 builds a relocatable object,
netstream.o, linked directly into the cc65 program and exporting the samens_*symbols used by the examples.
Both handler syntaxes accept NETSTREAM_INPUT_BUFSIZE from the Makefile. The
sources default to 128 bytes if no size is supplied, while the examples build
with 1024 bytes by default:
make handlers NETSTREAM_INPUT_BUFSIZE=256
make ca65 NETSTREAM_INPUT_BUFSIZE=512
Outputs:
build/mads/NSENGINE.OBX(MADS handler binary)build/ca65/netstream.o(CA65 handler object)build/linux_netstream_chat(Linux chat client)build/linux_udp_sequence_server(Linux UDP sequencing server)build/mads/atari_netstream_chat.atrandbuild/mads/atari_udp_sequence.atr(MADS handler ATR images)build/ca65/atari_netstream_chat.atrandbuild/ca65/atari_udp_sequence.atr(CA65-linked handler ATR images)
- Start the Linux chat first:
build/linux_netstream_chat --port 9000
It waits for a REGISTER packet, then prints “Client Connected”.
- Boot either Atari ATR variant and enter the host when prompted. The Atari chat asks for the host/IP, port and then connects to the Linux client. Both clients default to port 9000 if none given.
Atari chat status line fields:
Ver= handler versionBase= handler base addressF= final flags3= AUDF34= AUDF4P= PACTL,AV= bytes available,TX/RX= local counters
- Start the Linux server:
build/linux_udp_sequence_server --port 9000 [--duplicates] [--reorder]
--duplicates: makes the server randomly send duplicate packets to test firmware drop packet feature--reorder: randomly picks 2 packets to send out of order each run to test firmware reordering (ie, packet 24 then packet 23)
- Boot either
build/mads/atari_udp_sequence.atrorbuild/ca65/atari_udp_sequence.atrand enter host/port when prompted. It will fill the 40x24 screen with Lorem Ipsum, then send the data back to the server.
More details live in docs/:
docs/netstream_api.md- handler API and calling conventionsdocs/POKEY-Divisors-Chart.md- baud/divisor reference