GFX-Basic is an enhanced version of EhBASIC for the rp6502 PicoComputer, adding graphics, sound, and improved file handling while staying within classic 8-bit constraints.
For a complete list of commands and syntax, see COMMANDS.md.
Having grown up in the era of 8-bit home computing—and after years of building various electronic kits—the PicoComputer immediately caught my interest. I ordered the circuit board and components, assembled it in about two hours, and brought it to life. After loading the .uf2 files along with the BASIC and terminal ROMs, I spent some time exploring what it could do.
The terminal program was a lot of fun, especially connecting to modern retro BBSes. BASIC, while enjoyable, felt a bit limited in places. Then I came across a video about coding on the PicoComputer with AI and thought:
“Why not see what ChatGPT can do with EhBASIC?”
My original goal was modest: add a CLS command and improve some text formatting.
Two weeks later, the project had grown far beyond that.
Together, ChatGPT and I expanded EhBASIC to include:
CLS— Clear screenCLG— Graphics mode selectPLOT— Plot a pixelLINE— Draw linesBOX— Draw rectanglesCIRCLE— Draw circlesSOUND— Generate tones (withNOTEON/NOTEOFFfor lower-level control)
What started as a small enhancement became the foundation of a full graphics command set.
My programming background is primarily in BASIC, with only limited experience in C++. Working with AI and tools like VS Code turned out to be both enjoyable and surprisingly productive.
More than once, I thought the project was finished—only to return a day later with another idea:
“Wait a minute… we need to add…”
As development continued, the project gained:
- Graphics support
- Sound support
- File handling
- Directory management
Commands added:
DIR— Directory listing and drive selectionMKDIR— Create directoriesCHDIR— Change directories
Additional commands and functions include:
NOTEON/NOTEOFF— Low-level sound controlLOCATE— Position the text cursorCOLOR— Set text and background colors (text mode only)EOF()— End-of-file detection for file handlingTI— Monotonic 100 Hz system timerTI$— Realtime clock string inHHMMSSUTC format
TI returns a continuously increasing timer value based on the PicoComputer system clock.
TI$ returns the current realtime clock time as a six-character string:
PRINT TI$Example output:
153138
Which represents:
15:31:38 UTC
Notes:
TI$always returns UTC time, not local timezone time.- Programs requiring local time should apply their own timezone offset.
LEN(TI$)always returns6.TI$is inspired by Commodore BASIC but implemented specifically for the RP6502 PicoComputer environment.
See COMMANDS.md for full details and syntax.
At this point, the system felt nearly complete.
There was just one command left to add:
RMDIR— Remove directory
This is where reality set in.
To support all features, available RAM for BASIC had already been reduced from 52 KB to ~37 KB—roughly comparable to a Commodore 64.
Rather than reduce memory further, development stopped here.
GFX-Basic is:
- Feature-rich
- Compact
- Built within authentic 8-bit-style constraints
While you can create and navigate directories with:
MKDIRCHDIR
Removing directories must be done via:
- The system monitor
- Another computer
For detailed command syntax and usage, see:
GFX-Basic reflects both modern experimentation and classic limitations—a blend of AI-assisted development and retro computing philosophy.
And honestly… that feels exactly right.
This repository includes a .vscode configuration inherited from and compatible with the RP6502/EhBASIC PicoComputer development workflow.