EGFX · FUNCTION 38ALPHA · USE AT YOUR OWN RISK
SET_MODE / DIRTY BEGIN
Choose the compact video mode, or begin a dirty frame.
With a payload of 0–6, selects the screen mode the compact renderer draws for. With &FF it is the Master’s dirty-frame begin: it maps the hidden page like BEGIN but does not clear it. You must then erase what moved, using positions from two frames ago because there are two pages, and repaint whatever the erase covered. On a BBC B it does nothing. BASIC: PROCegdirtybegin. The Breakout tutorial explains the pattern in full.
Parameters
| Name | Bytes | Description |
|---|---|---|
MODE | 8 | 0–6, or &FF for a dirty begin |
BASIC example
Tested listing: ex38.bas, run in B-em on a Master 128. Append the EGFX helpers from gfx-basic.bas (the build does this for you), and put the Breakout EGASSETS.rom (with the beta release) in slot 7 where the example draws from &81/&87.
10 MODE 1:HIMEM=&2400:PROCeginit
20 FOR p%=1 TO 2:PROCegbegin:PROCegtext("FN38 DIRTY",8,8):PROCegpresent:NEXT
30 FOR x%=2 TO 317:PROCegdirtybegin
40 PROCegpixel(x%-2,128,0):PROCegpixel(x%,128,3)
50 PROCegpresent:NEXT
60 END
Assembly
LDA #38 : STA block+5 ; function
LDA #0 : STA block+7 ; clear ACK
LDA #&C0 : LDX #block MOD 256 : LDY #block DIV 256
JSR &FFF1 ; OSWORD &C0; block+7 = &A5 on success