commit 72ed625

zzo38  ·  2023-04-22 02:42:51 +0000 UTC
parent 3ea3d99
Explain the sprites in varvara.doc.
2 files changed,  +29, -1
+3, -0
1@@ -25,3 +25,6 @@
2   DUP2k #1f SFT2 MUL2 SUB2
3   JMP2r
4 
5+\\ Macro for alignment.
6+%ALIGN2 { \_@:1&+! }
7+
+26, -1
 1@@ -143,7 +143,32 @@ are as follows:
 2   bit4 = Horizontal flip
 3   bit3-bit0 = Colour
 4 
 5-(TODO: explain sprites better)
 6+The sprite address port must be set before writing to the sprite command
 7+port; it is the address of the graphics data. The 2bpp graphics data is
 8+stored in the NES/Famicom pattern tables format; the 1bpp graphics data
 9+is similar but there is only one plane.
10+
11+The colours of sprites are mapped according to the table (the top row is
12+the data in the sprite, and the rest has the specified colour in the first
13+column and the result colour in the other columns (where - means it is
14+transparent); the last two columns are not used in 1bpp mode):
15+  DATA  0 1 2 3
16+     0  0 0 1 2
17+     1  0 1 2 3
18+     2  0 2 3 1
19+     3  0 3 1 2
20+     4  1 0 1 2
21+     5  - 1 2 3
22+     6  1 2 3 1
23+     7  1 3 1 2
24+     8  2 0 1 2
25+     9  2 1 2 3
26+     A  - 2 3 1
27+     B  2 3 1 2
28+     C  3 0 1 2
29+     D  3 1 2 3
30+     E  3 2 3 1
31+     F  - 3 1 2
32 
33 
34 === Audio ===