← EGFX BASIC guide

EGFX · BASIC REFERENCEALPHA · USE AT YOUR OWN RISK

Function reference

Using PROCegcall

PROCegcall sends a 64-byte request block through MOS OSWORD &C0. Bytes 0 and 1 contain the sent and returned lengths. Bytes 2–5 contain the EG signature and version. Byte 5 selects the function. Bytes 8–21 carry the common parameters; bytes 22–63 carry inline text or function-specific data. Clear byte 7 before the call; EGFX returns &A5 there when it has accepted the request.

Each call from BASIC costs about 1.7 centiseconds before EGFX draws anything, so a frame that makes 30 calls cannot exceed about 2 frames per second. Batch where you can (34, 42), keep the dirty begin (38) and redraw only what changed. The Breakout measuring page shows a BASIC game reaching about 4.7 fps this way. Beyond that, move the hot loop to assembly.

Build and run

With the beta release, load egfx.ssd as the B-em disc image, and keep the disc file SPRITES unchanged. Build the EGFX image with bash tools/build.sh and run a profile with bash tools/run.sh master. BASIC is for experimentation, quick layout and testing; use Assembly for game-quality performance.

Functions