MESS OUT
MESS_OUT ($C004CE): Generic VRAM output
MESS_OUT executes the command buffer in the BIOS's work RAM that starts at MESS_BUFFER (constant $10FF00) and goes up to MESS_POINT (longword variable $10FDBE). This can be used to display text messages, boxes... on the fix layer (is it used for sprites too ?).
MESS_OUT is automatically called in the SYSTEM_INT1 call. MESS_BUSY ($10FDC2.b) can be used to prevent this (when setting up the command list, for example).
The command buffer can be made of commands directly, or pointers to lists in ROM or user RAM. To put commands directly into the buffer, a null pointer ($00.l) needs to be placed before the command list.
Commands are always words.
Command 1
- 2 words
Bit | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Def | 0 | Byte/Word | End code/Data size | $01 |
This command specifies if the data will be in bytes or words, and if the size is defined or if an end code has to be reached.
- If data is in bytes (bit 10 = 0)
- The next word's upper byte will be the data's constant upper byte (since VRAM can only be written in words).
- If the data is limited by an end code (bit 9 = 0), the next word's lower byte will be the end code's value.
- If the data size is defined (bit 9 = 1), the next word's lower byte will be the size (so max length is $FF).
- If data is in words (bit 10 = 1)
- If the data is limited by an end code (bit 9 = 0), the next word will be the end code's value.
- If the data size is defined (bit 9 = 1), the next word will be the size (so max length is $FFFF).
Examples:
dc.w $0001,$15FF ;Command 1: data will be read in bytes, upper byte will always be $15, end code is $FF. dc.w $0101,$1520 ;Command 1: data will be read in bytes, upper byte will always be $15, data length is $20. dc.w $0201,$8000 ;Command 1: data will be read in words, end code is $8000. dc.w $0301,$2044 ;Command 1: data will be read in words, data length is $2044.
The format stays the same until command 1 is used again.
Command 2
- 1 word
Bit | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Def | Auto-inc value | $02 |
Sets the auto-increment value (written to VRAM_MOD ($3C0004)). Is the value sign-extended or not ?
Command 3
- 2 words
Sets the VRAM address written to VRAM_ADDR ($3C0000)) to the next word's value.