Skip to content

read colours#154

Open
stevesims wants to merge 1 commit intobreakintoprogram:mainfrom
stevesims:upstream-read-colours
Open

read colours#154
stevesims wants to merge 1 commit intobreakintoprogram:mainfrom
stevesims:upstream-read-colours

Conversation

@stevesims
Copy link
Contributor

reads colours, either from the palette, or one of the active colours

this is done using VDU 23, 0, &94, colour. values will be returned using the PACKET_SCRPIXEL response packet, and therefore MOS will interpret these exactly the same as reading a screen pixel via VDU 23, 0, &84. values will therefore be exposed in MOS in the exact same scrpixel and scrpixelIndex sysvar bytes

when using this command, colours 0-63 will be interpreted as palette colours, 128 will return the currently selected text foreground colour, 129 the text background colour, 130 graphics foreground, and 131 graphics background. any other colour values will be ignored

addresses #145

reads colours, either from the palette, or one of the active colours

this is done using `VDU 23, 0, &94, colour`.  values will be returned using the `PACKET_SCRPIXEL` response packet, and therefore MOS will interpret these exactly the same as reading a screen pixel via `VDU 23, 0, &84`. values will therefore be exposed in MOS in the exact same `scrpixel` and `scrpixelIndex` sysvar bytes

when using this command, colours 0-63 will be interpreted as palette colours, 128 will return the currently selected text foreground colour, 129 the text  background colour, 130 graphics foreground, and 131 graphics background.  any other colour values will be ignored
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants