Manual · 8

TinyELF Basic projects

TinyELF Basic, by Al_Nafuur, is a BASIC machine that runs on the PlusCart and the UnoCart: you type a program on a keyboard plugged into the 2600 and it runs at once. VCSIDE lets you write that program on your computer and run it in Gopher2600 or on the cart.

The project

New project → TinyELF Basic holds one numbered listing, src/main.lst, in the format of TinyELF's own examples: the text that LIST shows and ENTER reads. Start from has an empty program, a sketch pad for the keyboard or the joystick, and VCSIDE The Game written in TinyELF Basic, with its sprites, its room and its song.

The editor colours TinyELF's keywords and line numbers. Hover help, completion and F1 know each of its words, and mark the ones its cartridge build leaves out.

Building and running

TinyELF Basic v0.22 and later start AUTORUN.BAS from a SaveKey at power-on, so the ROM stays as Al_Nafuur releases it and the program goes on the SaveKey:

The space report shows the ROM against the loader's 96 KB, the program's memory against what TinyELF gives it, and the SaveKey's sectors.

On a real SaveKey

Build → Write to the SaveKey (PicoBridge) puts the program on a real SaveKey, through Al_Nafuur's PicoBridge: a Raspberry Pi Pico that connects the SaveKey to the computer by USB. VCSIDE finds the Pico, reads the SaveKey and keeps a copy of what it held next to the build. It then saves AUTORUN.BAS on TinyELF's drive, as SAVE would, leaving the other files where they are. It writes only the pages that changed, and reads them back to check them. A SaveKey that has no TinyELF drive yet is formatted only if you agree. Then plug the SaveKey into the 2600, with TinyELF Basic on the PlusCart or UnoCart.

Speed

TinyELF runs the program between two frames for a time budget. In Gopher2600 that budget is a number of statements, and it grows with the ARM's clock, so choose the project's emulated cartridge to see the game at about the speed of the cart. A program that moves things by time, not by turns, plays the same in both: VCSIDE The Game does. The assistant has advice on making a TinyELF program faster.