Z-machine: Can a game request specific default colours

There are header fields for default background and foreground colours. Is this supposed to be used by the game to ask for particular colours by setting them to specific values in the Z-code file, and then the interpreter may change them if it can’t honour the request, or is it only a way for the interpreter to tell the game about the default colours in use?

8.3.3 If the interpreter can produce colours, it should set bit 0 of ‘Flags 1’ in the header, and write its default background and foreground colours into bytes $2c and $2d of the header.

The interpreter sets the values, it does not read them.

1 Like

You know, allowing games to suggest default colours by setting these bytes, with interpreters allowed to ignore the suggestion, might not be a bad idea.

1 Like

Actually, I’m not sure what an interpreter is supposed to do if it can provide some but not all colours in the Z-code palette. On 8-bit machines, that must be a common scenario. Should it skip colours altogether, or say that it can produce colours and just do its best?

For Ozmoo, we decided to support colours even though that we can’t support it perfectly. Some of the colours are (decent) approximations), and if the game changes the background colour it changes for the whole screen.