PEEK is documented as a graphics word that can be used without any special preparation, but it assumed that the Kernal had already been switched out, causing incorrect results unless the Kernal had already been switched out before it was invoked.
For example:
$10 clrcol 3 3 plot 3 3 peek . should output 16, but instead we get 0
The only use of PEEK that I could find was in PAINT inside gfx.fs itself; I have updated PAINT to work with the fixed PEEK.
Alternatively, we could simply document that PEEK must be used in conjunction with KERNAL-OUT and KERNAL-IN, but changing PEEK's behavior seems more user-friendly :)
PEEK
is documented as a graphics word that can be used without any special preparation, but it assumed that the Kernal had already been switched out, causing incorrect results unless the Kernal had already been switched out before it was invoked.For example:
$10 clrcol 3 3 plot 3 3 peek .
should output16
, but instead we get0
The only use of
PEEK
that I could find was inPAINT
insidegfx.fs
itself; I have updatedPAINT
to work with the fixedPEEK
.Alternatively, we could simply document that
PEEK
must be used in conjunction withKERNAL-OUT
andKERNAL-IN
, but changingPEEK
's behavior seems more user-friendly :)