Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
blog:ql_dev2 [2021/12/14 21:01] – created john | blog:ql_dev2 [2021/12/14 21:09] (current) – john | ||
---|---|---|---|
Line 7: | Line 7: | ||
In Mode 4 (512x256 4 colour) the memory is laid out in byte pairs (or words) | In Mode 4 (512x256 4 colour) the memory is laid out in byte pairs (or words) | ||
- | //Red// byte | //Green// byte | + | < |
- | 7 6 5 4 3 2 1 0 | 7 6 5 4 3 2 1 0 | + | Red byte | Green byte |
0 0 0 0 0 0 0 0 | 0 0 0 0 0 0 0 0 | 0 0 0 0 0 0 0 0 | 0 0 0 0 0 0 0 0 | ||
+ | </ | ||
- | Those 16 bits set a series of **8** pixels. The values of the //Red// and //Green// byte are AND-ed to get the final colour: | + | Those 16 bits set a series of **8** contiguous horizontal |
+ | < | ||
Red | Green | Result | Red | Green | Result | ||
1 | 0 | Red | 1 | 0 | Red | ||
Line 18: | Line 20: | ||
1 | 1 | White | 1 | 1 | White | ||
0 | 0 | Black | 0 | 0 | Black | ||
+ | </ | ||
+ | |||
+ | Example 1: | ||
+ | < | ||
+ | 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 | ||
+ | </ | ||
+ | |||
+ | ...would draw an 8 pixel horizontal line in //Green//. | ||
+ | |||
+ | Example 2: | ||
+ | < | ||
+ | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | ||
+ | </ | ||
+ | |||
+ | ...would draw an 8 pixel horizontal line in //White//. | ||
+ | |||
+ | Example 3: | ||
+ | < | ||
+ | 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 | ||
+ | </ | ||
+ | |||
+ | ...would draw 8 alternating pixels of //Red// and //Green//. | ||