added high nibble table for the sprite byte

This commit is contained in:
sejo 2021-07-31 16:19:11 -05:00
parent 8516156c5d
commit 1b4b38e778
1 changed files with 15 additions and 0 deletions

View File

@ -626,6 +626,21 @@ the possible values of this high nibble, used for drawing a 1bpp sprite, are:
& * 6: draw a 1bpp sprite in the foreground, flipped vertically
& * 7: draw a 1bpp sprite in the foreground, flipped horizontally and vertically
if you observe carefully, you might see some pattern: each bit in the high nibble of the sprite byte corresponds to a different aspect of this behavior.
the following shows the meaning of each of these bits in the high nibble, assuming that we are counting the byte bits from right to left, and from 0 to 7:
+ <table>
+ <tr><th>bit 7</th><th>bit 6</th><th>bit 5</th><th>bit 4</th></tr>
+ <tr><td>mode (0 is 1bpp, 1 is 2bpp)</td><td>layer (0 is background, 1 is foreground)</td><td>flip vertically (0 is no, 1 is yes)</td><td>flip horizontally (0 is no, 1 is yes)</td></tr>
+ </table>
& * bit 4: flip-x
& * bit 5: flip-y
& * bit 6: layer (0 is background, 1 is foreground)
& * bit 7: mode (0 is 1bpp, 1 is 2bpp)
### sprite low nibble for 1bpp
the low nibble of the sprite byte will determine the colors that are used to draw the "on" and "off" pixels of the tiles.