Skip to content

Commit 631d4f8

Browse files
committed
[01_helloFix] finally explain MESS_OUT command 1
1 parent 9af1772 commit 631d4f8

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

examples/01_helloFix/readme.txt

+24-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,30 @@ $0007 8x8 Output
155155
$0008 8x16 Output
156156

157157
(Command 1: Data Format)
158-
; todo
158+
This command defines how the rest of the data is to be interpreted.
159+
160+
FEDCBA98 76543210
161+
xxxxxx|| |______|
162+
|| |
163+
|| +_____ $01 (command part)
164+
|+___________ End code (0)/Data size (1)
165+
+____________ Byte (0)/Word (1)
166+
167+
The primary bit to check here is "Byte/Word" (bit 9).
168+
169+
* If bit 9 is set to 0, the data is in bytes.
170+
* The upper byte of the next word (XX--) determines the constant upper byte
171+
for VRAM writes.
172+
* The purpose of the lower byte of the next word (--XX) changes depending on
173+
"End code/Data size" (bit 8):
174+
* When bit 8=0 ("end code"), the next word's lower byte is the end code value.
175+
* When bit 8=1 ("data size"), the next word's lower byte is the data length.
176+
(maximum $FF)
177+
178+
* If bit 9 is set to 1, the data is in words.
179+
* The purpose of the next word depends on "End code/Data size" (bit 8):
180+
* When bit 8=0 ("end code"), the next word is the end code value.
181+
* When bit 8=1 ("data size"), the next word is the data length (maximum $FFFF)
159182

160183
(Command 7: 8x8 Output)
161184
Command $07 writes 8x8 tiles to the Fix layer.

0 commit comments

Comments
 (0)