mirror of
https://github.com/FujiNetWIFI/fujinet-firmware.git
synced 2026-05-21 03:56:03 -05:00
Page:
N: TCP Game Example: Reversi
Pages
"upstream.sh" Script To Rebase Changes
5CS PC TODO
A Simple NetCat Program
ADAM FujiNet Quickstart Guide
ADAM Programming
ATASCII Printer
About Each Printer
Accessing the Real Time Clock
Active Branches
AdamNet Timing Analysis
Additional Commands for R: Devices
Apple II & III FujiNet Quickstart Guide
Apple II FujiNet Platform Reference Guide
Apple II SP over SLIP
Apple II memleak analysis notes.
Apple IIgs Programming
Apple Programming
Apple2 Test Results ‐ 2025‐08‐26
Apple2 memleak analysis notes.
Apple2
AppleII & III FujiNet Quickstart Guide
AppleII III FujiNet Quickstart Guide
AppleII FujiNet Plaform Reference Guide
AppleII FujiNet Quickstart Guide
AppleII III FujiNet Quickstart Guide
Applesoft Network extensions
Apple‐68k: Ideas for Extending the DCD Protocol
Application Ideas
Atari 1020
Atari 1025
Atari 1027
Atari 1029
Atari 820
Atari 822
Atari 825
Atari BASIC JSON POST Best Practices
Atari FujiNet Programming Series: Roman Checkers
Atari FujiNet Quickstart Guide
Atari Program Recorder (410 1010 XC11 XC12)
Atari Programming
Atari8
BBS Express 850 1.0 Documentation
BBS Express 850 1.0
BBS
Baud Rate Test
Before Each Test
Board Bring Up Hardware
Board Bring Up Software
Board Bring Up
Board bring up for FujiNet Platform.IO code
Boot a Game from Fujinet.Online
Boot the FujiNet to CONFIG
CIO Commands for N Device
CIO and FMS copy commands
CONFIG HTTP API
CONFIG Users Guide
CP M Support
Carina BBS 2.7
ChatGPT Ruminations on DOS
Code Re Org Handling Different Systems
Cold Start Profiling
Coleco ADAM Tests
Color Computer Quickstart Guide
Commands for Device $09 (Network)
Commands for Device $0F (Fujinet)
Commodore 64 Tidying Up
Commodore FujiNet Quickstart Guide
Complete CLI Guide to Builds
Config 2.0 Set WiFi Network
Config 2.0 Verify ATR Disk Booting
Config 2.0 Verify Host Slot Editing
Config 2.0 Verify Joystick Control
Config 2.0 Verify Slot Quick Keys
Config 2.0 Verify Subdirectory Traversal
Config 2.0 Verify Version
Config 2.0 Verify XEX Disk Booting
Configuration Test
Connecting to a BBS
Contributing to the Project
Copying disk from Internet
Creating New Disk
Credits
DIAGNOSTIC: Alter SIO Timing for T0
DIAGNOSTIC: Alter SIO Timing for T1
DIAGNOSTIC: Alter SIO Timing for T2
DIAGNOSTIC: Alter SIO Timing for T3
DIAGNOSTIC: Alter SIO Timing for T4
DIAGNOSTIC: Alter SIO Timing for T5
DOS XL Cheat Sheet
Deploying your Favorite BBS
Dev News
Developing a Turn Based Multiplayer Server Prototype for Poker
Development Atari
Development Env for Apps
Directory of The Big RunCPM ZIP
ESP32 Schematic
Epson FX 80
Error Codes for N: Device
Example Read Clock on Adam
Example Read JSON Data
Example TNFS Hosts
FEP 001
FEP 002
FEP 003
FEP 004
FOREMDOC
FORM2DOC
Finding SmartPort Devices
Finding The SmartPort Dispatcher
Firmware Code Book Blue
Firmware Test Plan for Apple II
Firmware Test Plan for Apple2
Firmware Versioning
FoReM 850 26M
FujiNet CLI Flasher
FujiNet Commands Reference
FujiNet Commodore Programming
FujiNet Config Tools
FujiNet Configuration File: fnconfig.ini
FujiNet Development Guidelines
FujiNet Documentation Style Guide
FujiNet Documentation Wish List
FujiNet Flasher
FujiNet Networking (N: Device) Quickstart Guide
FujiNet Talking Points for YouTubers, Podcasters, etc.
FujiNet VirtualMachine
Fujinet Documentation Style Guide Scratch Pad
GRANTIC (screen dump)
Git Config Aliases
Git History Examples
Guide to Building AppleWin on Linux
HTML Printer
HTTP Collect Headers
HTTP Headers
HTTP POST
HTTP Protocol
HTTP Set Channel Mode
HTTP Test Harness
Hacker List
High Score storage for Legacy Games
High Score writeable ATR example in BASIC
Home
How FujiNet Supports Connections to BBS
How I added FujiNet Clock support to FoRem 26M
Installing a High Score Party Server
Intellivision Bring‐up Notes
Issuing SmartPort Commands
JSON Query Format
Known TNFS Hosts
Listen Test
Load file from HTTP into AtariWriter
Loading Binary Files from N: Device
Loading PLATOTERM to access IRATA.ONLINE
MIDI Maze Notes
MIDIMaze
MSX Technical Overview
MS‐DOS BIOS Specification
Mac68k Quickstart Guide
N Device Close
N Device Get Characters
N Device Get Record
N Device Open
N Device Put Characters
N Device Put Record
N Device Status
N Device Template
N: AUX1 Values
N: AUX2 Values
N: Device Filename Size Limitations
N: Game Developer Cheat Sheet
N: SIO Command $20 Rename File
N: SIO Command $21 Delete File
N: SIO Command $25 Point in File
N: SIO Command $26 Note in File
N: SIO Command $2A Make Directory
N: SIO Command $2B Remove Directory
N: SIO Command $2C Change Directory
N: SIO Command $30 Get Current Directory
N: SIO Command $FB Set JSON Parameters
N: SIO Command $FC Set Channel Mode
N: SIO Command $FD Set Login
N: SIO Command $FE Set Password
N: SIO Command $FF Query for Special Command DSTATS
N: SIO Command 'A' Accept
N: SIO Command 'C' Close
N: SIO Command 'D' Set UDP Destination
N: SIO Command 'E' (get) Error
N: SIO Command 'H' Set Hash Type
N: SIO Command 'O' Open
N: SIO Command 'P' Parse JSON
N: SIO Command 'Q' Query JSON
N: SIO Command 'R' Read
N: SIO Command 'S' Status
N: SIO Command 'T' Set Translation
N: SIO Command 'W' Write
N: SIO Command 'Z' Set PROCEED Timer Rate
N: SIO Command 'c' Close Client Connection
N: TCP Game Example: Light Cycles
N: TCP Game Example: Reversi
N: Theory of Operation
N: devicespec
Nightly Firmware Builds
Official Hardware Versions
Okimate 10
PC DOS FujiNet Quickstart Guide
PLATOTERM Key Charts
PR 1108 Atari Testing Procedure
PR 1108 Test Plan
Printer Emulation
Printing Epson Graphics Output from Print Shop
Printing Text File to Printer
Production Units
Protocol libraries
Prototype Board Revisions
RS232 Quickstart Guide
Run FujiNet with Altirra for Atari
Run FujiNet with OpenMSX
Run FujiNet with Xroar for CoCo
S.A.M. Emulation on P4:
S100 FujiNet Quickstart Guide
SIO Command $4E Network Open
SIO Command $53 Network Status
SIO Command $64 TCP Disconnect
SIO Command $C5 Hash Output
SIO Command $C7 Hash Compute
SIO Command $C8 Hash Input
SIO Command $C9 Base64 Decode Output
SIO Command $CA Base64 Decode Length
SIO Command $CB Base64 Decode Compute
SIO Command $CC Base64 Decode Input
SIO Command $CD Base64 Encode Output
SIO Command $CE Base64 Encode Length
SIO Command $CF Base64 Encode Compute
SIO Command $D0 Base64 Encode Input
SIO Command $D6 Set Boot Mode
SIO Command $D7 Mount All
SIO Command $D8 Copy File
SIO Command $D9 Enable Disable CONFIG in D1
SIO Command $DA Get Device Slot Filename
SIO Command $DB Close App Key
SIO Command $DC Open App Key
SIO Command $DD Read App Key
SIO Command $DE Write App Key
SIO Command $DF Set External SIO Clock
SIO Command $E0 Get Host Prefix
SIO Command $E1 Set Host Prefix
SIO Command $E2 Set Filename for Device Slot
SIO Command $E3 Set HSIO Index
SIO Command $E4 Set Directory Position
SIO Command $E5 Get Directory Position
SIO Command $E6 Umount Host
SIO Command $E7 New Disk
SIO Command $E8 Get Adapter Config
SIO Command $E9 Unmount Device Image
SIO Command $EB Set UART Baudrate
SIO Command $F0 Enable UDPStream Mode
SIO Command $F1 Write Device Slots
SIO Command $F2 Drive Map Read
SIO Command $F2 Read Device Slots
SIO Command $F3 Write Host Slots
SIO Command $F4 TNFS Read Hosts Slots
SIO Command $F4 Read Host Slots
SIO Command $F5 Close Directory
SIO Command $F6 Read Directory
SIO Command $F7 Open Directory
SIO Command $F8 Mount Device Image
SIO Command $F9 Mount Host
SIO Command $FA Get WiFi Status
SIO Command $FB Set SSID and Connect
SIO Command $FC Get Scan Result
SIO Command $FD Scan Networks
SIO Command $FE Get SSID
SIO Command $FF Reset FujiNet
SIO Command Page Template
SIO Commands for Device ID $70
SIO Commands for Device IDs $71 to $78
Sample FNCONFIG.INI
Setting Up TNFS On Windows 10
Setting up TNFS on a Raspberry Pi
Setting up a TNFS Server
Software Changes for New Platforms
SpartaDOS X Ultimate1MB FujiNet Utilities
System Quickstarts
Testing Plan
Testing Results V1.3 ‐ Atari
Testing against FTP Server
Testing local SD Card Storage
The Complete Linux CLI Guide
The Complete MacOS CLI Guide
The Complete OSX CLI Guide
The Definition of Done
The Original GoogleDoc
Things To Hack On
Things to do with FujiNet
Toplevel Hardware
Toplevel Miscellaneous
Toplevel Software
Toplevel User Guides
Toplevel Virtualization
Translation Test
Useful External Documentation
Using AMAC with FujiNet
Using App Keys
Using FujiNet from fig FORTH
Using FujiNet‐PC‐RS232 with 86Box in Linux
Using HTTP S from BASIC
Using NDEV in Atari DOS 2.0 2.5
Using SAM (Voice Synthesizer)
Using the MODEM Sniffer
Using the N: Device
Using the N: Tools in DOS 2
Using the SD: protocol adapter.
Virtual Apple II FujiNet
Virtual Apple2 FujiNet
Virtual Atari FujiNet
Virtual CoCo FujiNet
Virtual FujiNet Quickstart Guide
What is FujiNet?
XIO Commands
YAIL Home
fnjson.cpp Value Mangling Analysis
main hardware
main miscellaneous
main software
main user guide Change This
main user guide
main virtualization
pio 3 x howto
pio 6 x howto
x test home
No results
This game implements a full version of Reversi, that can be played by two players over a network. TCP port 6502 is used.
8 TRAP 3000
9 GRAPHICS 0
10 GOTO 500
18 LOCATE X,Y-1,C:COLOR C:PLOT X,Y:PLOT X+1,Y:RETURN
19 LOCATE X-1,Y-1,C:GOTO 30
20 LOCATE X-1,Y,CC:IF C=CC THEN C=0
30 COLOR C:PLOT X,Y:PLOT X+1,Y:GOTO 60
40 LOCATE X-1,Y,Z:IF Z=C THEN RETURN
45 COLOR C:FOR I=X-1 TO X+2:FOR J=Y-1 TO Y+1
50 PLOT I,J:NEXT J:NEXT I:SOUND 0,C*25,10,8
60 FOR V=0 TO 10:NEXT V
61 STATUS #2,A:IF PEEK(746)>0 THEN GOSUB 18:INPUT #2,X,Y,TRIG:IF TRIG=0 THEN 1700
70 SOUND 0,0,0,0:RETURN
500 DIM A$(8),B$(8),F(1),S(1,9),H$(64),D$(64)
501 LS=0
520 OPEN #1,4,0,"K"
530 POSITION 10,1:? " FUJINET REVERSI ":?
531 ? "BE SURE TO FORWARD TCP PORT 6502.":?
540 PRINT "HOSTNAME OR RETURN TO LISTEN"
550 INPUT #16,H$
560 IF H$="" THEN LS=1
570 D$="N:TCP://":D$(LEN(D$)+1)=H$:D$(LEN(D$)+1)=":6502/"
571 OPEN #2,12,0,D$
572 IF NOT LS THEN 600
580 STATUS #2,A:IF NOT PEEK(748) THEN 580
581 ? "ACCEPTING CONNECTION.":XIO 65,#2,12,0,"N:"
582 GOTO 600
600 GC=0:GRAPHICS O:POSITION 5,8:? "Type name, press RETURN"
601 IF NOT LS THEN 620
610 ? :? "Player 1";:INPUT A$:IF A$="" THEN 610
611 PRINT #2;A$:INPUT #2,B$
612 GOTO 700
620 ? :? "Player 2";:INPUT B$:IF B$="" THEN 620
621 PRINT #2;B$:INPUT #2,A$
622 GOTO 700
625 F(0)=0:F(1)=0
630 IF A$="COMPUTER" THEN F(0)=1
640 IF B$="COMPUTER" THEN F(1)=1
700 GRAPHICS 5:POKE 752,1
710 SETCOLOR 4,13,6:SETCOLOR 2,13,2
720 SETCOLOR 0,0,0:SETCOLOR 1,0,15
750 COLOR 3:FOR Y=1 TO 37
770 PLOT 17,Y:PLOT 18,Y:PLOT 19,Y
780 FOR X=20 TO 60 STEP 5:PLOT X,Y:NEXT X
790 PLOT 61,Y:PLOT 62,Y:PLOT 63,Y:NEXT Y
800 FOR X=17 TO 60
810 PLOT X,1:PLOT X,2
820 FOR Y=3 TO 35 STEP 4:PLOT X,Y:NEXT Y
830 PLOT X,36:PLOT X,37:NEXT X
850 FOR L=1 TO 6:READ X,Y,C:GOSUB 40:NEXT L:RESTORE
855 DATA 10,36,1,37,17,1,42,21,1,72,36,2,42,17,2,37,21,2
990 P=2
1000 P=3-P:POKE 764,255
1010 A=0:B=0:FOR M=22 TO 57 STEP 5:FOR N=5 TO 33 STEP 4
1020 LOCATE M,N,C:IF C=1 THEN A=A+1
1030 IF C=2 THEN B=B+1
1040 IF C=0 THEN X=M:Y=N
1050 NEXT N:NEXT M
1055 POKE 656,1:POKE 657,3:? A$;:POKE 657,28:? B$:? " ";A;" ";:POKE 657,30:? B;" "
1070 IF A+B=64 THEN 2000
1110 IF F(P-1)=0 THEN GOTO 1500
1120 GOSUB 5000
1130 IF Q>0 THEN 1730
1140 FOR L=0 TO 20:POKE 656,1:POKE 657,15
1143 ? "I PASS";:POKE 657,15:GOSUB 60:? " ";:NEXT L:GOTO 1000
1500 C=P:GOSUB 20:GOSUB 20:GOSUB 19
1510 N=PEEK(764):POKE 764,255:TRIG=STRIG(0):JS=STICK(0)
1511 IF LS=0 AND P=1 THEN 1500
1512 IF LS=1 AND P=2 THEN 1500
1520 IF N=255 AND TRIG=1 AND JS=15 THEN 1500
1530 POKE 77,0:IF N=33 OR N=12 OR TRIG=0 THEN 1698
1540 IF N=30 THEN C=2:GOSUB 40:GOTO 1500
1550 IF N=31 THEN C=1:GOSUB 40:GOTO 1500
1560 IF N=10 THEN 1630
1570 X=X+5*((N=7 OR JS=7) AND X<57)-5*((N=6 OR JS=11) AND X>22)
1580 Y=Y+4*((N=15 OR JS=13) AND Y<33)-4*((N=14 OR JS=14) AND Y>5)
1581 IF N=33 OR N=12 THEN TRIG=0
1582 ? #2;X;",";Y;",";TRIG
1590 SOUND 0,(P+1)*40,10,8:GOTO 1500
1630 GOSUB 19:GOSUB 5000:IF Q=0 THEN 1000
1655 FOR I=0 TO 20:POKE 656,1:POKE 657,12
1656 ? " INVALID MOVE";:SOUND 0,180,10,10:GOSUB 60:POKE 657,12:? " ";
1657 NEXT I:GOTO 1010
1698 IF N=33 OR N=12 THEN TRIG=0
1699 PRINT #2;X;",";Y;",";TRIG
1700 G=0:GOSUB 4000:IF R=0 THEN GOSUB 19:GOTO 1655
1730 G=1:GOSUB 4000
1780 GOTO 1000
2000 ? "To see scoreboard, press any key":GET #1,N
2040 S(0,GC)=A:S(1,GC)=B
2050 GRAPHICS O:POSITION 1,10:? "GAME":POSITION 1,12:? A$:POSITION 1,14:? B$
2060 FOR X=0 TO GC:N=X*3+10:POSITION N,10:? X+1;:POSITION N,12:? S(0,X);:POSITION N,14:? S(1,X);:NEXT X
2100 ? :? :? "Same players go again? (Y-N)";:GET #1,N
2120 IF GC>7 AND N=89 THEN ? :? "You have already played 9 games.";:FOR X=1 TO 999:NEXT X:GOTO 600
2130 IF N=89 THEN GC=GC+1:GOTO 700
2135 IF N<>78 THEN 2100
2140 GOTO 600
3000 GRAPHICS 0:? "DISCONNECTED.":CLOSE #1:CLOSE #2:END
4000 R=0:SX=X:SY=Y
4005 LOCATE X-1,Y,C:IF C<>0 THEN RETURN
4010 FOR DX=-1 TO 1:FOR DY=-1 TO 1
4020 IF DX=0 AND DY=0 THEN 4130
4030 TR=0:X=SX:Y=SY
4050 X=X+DX*5:Y=Y+DY*4:LOCATE X,Y,C
4060 IF C=3-P THEN TR=TR+1:GOTO 4050
4070 IF C=P THEN R=R+TR:IF G=1 THEN 4100
4080 GOTO 4130
4100 X=X-DX*5:Y=Y-DY*4:C=P:GOSUB 40
4110 IF NOT (X=SX AND Y=SY) THEN 4100
4130 NEXT DY:NEXT DX:X=SX:Y=SY:RETURN
5000 Q=0:QX=0:QY=0:FOR M=0 TO 7:FOR N=0 TO 7
5020 X=M*5+22:Y=N*4+5
5030 LOCATE X,Y,C:IF C<>0 THEN 5090
5035 C=P:GOSUB 20:GOSUB 19
5040 G=0:GOSUB 4000
5080 IF R>Q THEN Q=R:QX=X:QY=Y
5090 NEXT N:NEXT M:X=QX:Y=QY:RETURN
7005 FOR X=0 TO 8:S(0,X)=0:S(1,X)=0:NEXT X
9999 GOTO 9999
- Home
- What is FujiNet?
- The Definition of Done
- Board bring up for FujiNet Platform.IO code
- The Complete Linux CLI Guide
- The Complete macOS CLI Guide
- Development Env for Apps
- FujiNet-Development-Guidelines
- System Quickstarts
- FujiNet Flasher
- Setting up a TNFS Server
- FujiNet Configuration File: fnconfig.ini
- AppKey Registry - SIO Command $DC Open App Key
- CP-M Support
- BBS
- Official Hardware Versions
- Prototype Board Revisions
- FujiNet Development Guidelines
- Atari Programming
- Apple Programming
- C64 Programming
- ADAM Programming
- Testing Plan
- Hacker List
- FujiNet VirtualMachine
Copyright 2026 Contributors to the FujiNetWIFI project.
Join us on Discord: https://discord.gg/7MfFTvD