Loading a program
Anything that is not an option (no leading “–”) is a program or a start point. You can give several: they are loaded in order. With no program, Phosphoneo boots the firmware alone: logo, banner, then NeoDOS.
fichier.neo
Syntax : prog.neo
Loads a .neo executable (the firmware’s format: a series of blocks, each with its address, and an execution address). A block at $FFFF goes to graphics memory (sprites, tiles), one at $FFFD to the current BASIC page. If the file gives an execution address, the program starts there.
Example
$ phosphoneo hello.neo --cycles 3000000
phosphoneo : hello.neo bloc -> $0800 (323 octets)
phosphoneo : 3000001 cycles, 7 appels API
Good to know. Before 2026-09-16 the
$FFFFblock was ignored: sprites without an image crashed the firmware. This is fixed and covered by a test.
fichier.bas
Syntax : prog.bas
Loads an already tokenised NeoBASIC program (what SAVE produces) onto the BASIC page and runs it (same as exec, $0806).
Example
$ phosphoneo hello.bas --cycles 3000000 --screenshot-text out.txt
fichier@ADRESSE
Syntax : prog.bin@800 | graphique.gfx@FFFF | prog.bas@page
Loads a raw file at an address, in hexadecimal. @FFFF means graphics memory; @page the BASIC page. The file is not run: add a start point (cold, warm, exec or run@).
Example
$ phosphoneo graphics.neo6502@800 cold --cycles 3000000
phosphoneo : graphics.neo6502 -> $0800 (323 octets)
phosphoneo : 3000001 cycles, 7 appels API
cold warm exec run@ADRESSE
Syntax : cold | warm | exec | run@C000
Where the 65C02 starts once the files are loaded: cold = $0800, warm = $0803, exec = $0806 (the kernel’s three entry points), run@HEX = any address. With no start point, the 65C02 starts on the reset vector, i.e. NeoDOS.
--storage
Syntax : --storage DOSSIER
Host folder seen by the firmware as the SD card or USB stick (default: storage). This is where LOAD, DIR or the game itself read and write their files. Paths are resolved the way FatFs does: . ignored, .. bounded at the root, nothing reachable outside the folder.
Example
$ phosphoneo --storage ~/jeux --cycles 45000000 --type-keys '15000000:DIR\n' --screenshot-text out.txt
Good to know. File names are Latin-1 on the 6502 side and UTF-8 on the folder side, as on the board. In window mode, the Ctrl+F12 menu can also change folder or take a real USB stick of the host.
--load-at
Syntax : --load-at CYCLES:FICHIER
Loads a .neo or .bas after N cycles and restarts the 65C02 on it: what the web page does when you pick a program. The file is looked up in the storage folder. Four loads at most.
Example
$ phosphoneo --storage d --load-at 15000000:prog.neo
--floppy
Syntax : --floppy /dev/sda
Replaces the storage folder with a real floppy drive (or any block device), served by the firmware’s FatFs: the 65C02’s calls go through the same stack as on the board, down to the last link. You must be in the disk group.
Good to know. This mode is not covered by save states.