corrections in 1bpp color table

This commit is contained in:
sejo 2021-07-24 21:34:19 -05:00
parent d1b3d1fded
commit 5374e3b9c0
1 changed files with 14 additions and 10 deletions

View File

@ -583,7 +583,7 @@ because the address is 2-bytes long, we output it using DEO2.
as we saw already, sending a byte to .Screen/color will perform the drawing in the screen.
### high nibble
### color high nibble for 1bpp
as in the case of drawing pixels, the high nibble of that byte will determine the layer in which we'll draw.
@ -612,45 +612,49 @@ the possible values of this high nibble, used for drawing a 1bpp sprite, are:
& * e: draw a 1bpp sprite in the background, flipped horizontally and vertically
& * f: draw a 1bpp sprite in the foreground, flipped horizontally and vertically
### low nibble
### color low nibble for 1bpp
the low nibble of the byte color will determine the colors that are used to draw the "on" and "off" pixels of the tiles.
+ <table>
+ <tr><th>low nibble</th><th>"on" color</th><th>"off" color</th></tr>
+ <tr><td>0</td><td>0</td><td>0</td></tr>
+ <tr><td>0</td><td>clear</td><td>clear</td></tr>
+ <tr><td>1</td><td>1</td><td>0</td></tr>
+ <tr><td>2</td><td>2</td><td>0</td></tr>
+ <tr><td>3</td><td>3</td><td>0</td></tr>
+ <tr><td>4</td><td>0</td><td>1</td></tr>
+ <tr><td>5</td><td>1</td><td>0</td></tr>
+ <tr><td>5</td><td>1</td><td>none</td></tr>
+ <tr><td>6</td><td>2</td><td>1</td></tr>
+ <tr><td>7</td><td>3</td><td>1</td></tr>
+ <tr><td>8</td><td>0</td><td>2</td></tr>
+ <tr><td>9</td><td>1</td><td>2</td></tr>
+ <tr><td>a</td><td>2</td><td>0</td></tr>
+ <tr><td>a</td><td>2</td><td>none</td></tr>
+ <tr><td>b</td><td>3</td><td>2</td></tr>
+ <tr><td>c</td><td>0</td><td>3</td></tr>
+ <tr><td>d</td><td>1</td><td>3</td></tr>
+ <tr><td>e</td><td>2</td><td>3</td></tr>
+ <tr><td>f</td><td>3</td><td>0</td></tr>
+ <tr><td>f</td><td>3</td><td>none</td></tr>
+ </table>
& * 0: "on" with color 0, "off" with color 0
& * 0: clear tile
& * 1: "on" with color 1, "off" with color 0
& * 2: "on" with color 2, "off" with color 0
& * 3: "on" with color 3, "off" with color 0
& * 4: "on" with color 0, "off" with color 1
& * 5: "on" with color 1, "off" with color 0
& * 5: "on" with color 1, "off" with no color
& * 6: "on" with color 2, "off" with color 1
& * 7: "on" with color 3, "off" with color 1
& * 8: "on" with color 0, "off" with color 2
& * 9: "on" with color 1, "off" with color 2
& * a: "on" with color 2, "off" with color 0
& * a: "on" with color 2, "off" with no color
& * b: "on" with color 3, "off" with color 2
& * c: "on" with color 0, "off" with color 3
& * d: "on" with color 1, "off" with color 3
& * e: "on" with color 2, "off" with color 3
& * f: "on" with color 3, "off" with color 0
& * f: "on" with color 3, "off" with no color
note that 0 in the low nibble will clear the tile.
furthermore, 5, 'a' and 'f' in the low nibble will draw the pixels that are "on" but will leave the ones that are "off" as is: this will allow you to draw over something that has been drawn before.
## hello sprite