1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2026-04-20 16:16:34 +00:00

Update for power outage

This commit is contained in:
David Schmenk
2024-11-20 05:53:15 -08:00
parent 47b8e18cf7
commit 4fb7fe3e40
+8 -8
View File
@@ -10,7 +10,7 @@ const RED_MSK = $7C00
const BLU = 0
const GRN = 1
const RED = 2
const ERR_DIV = 2
const ERR_DIV = 3
byte[12] ntscCycle
byte[] ntscChroma
@@ -20,10 +20,10 @@ byte[] ntscChroma
//byte[] = 1, 77, 64 // BROWN
//byte[] = 64, 20, 128 // RED
// Imperical 0-63 B G R
byte[] = 32, 14, 16 // BLUE
byte[] = 16, 28, 0 // GREEN
byte[] = 0, 18, 16 // BROWN
byte[] = 16, 4, 32 // RED
byte[] = 31, 13, 16 // BLUE
byte[] = 16, 27, 0 // GREEN
byte[] = 1, 19, 16 // BROWN
byte[] = 16, 5, 32 // RED
// Ideal/simplified 0-63 B G R
//byte[] = 32, 16, 16 // BLUE
//byte[] = 16, 32, 0 // GREEN
@@ -105,9 +105,9 @@ def rgbpix(r, g, b, x, y)#0
pd = dist(r, g, b, pr, pg, pb)
// Look ahead for possible better match
i = ((x + 1) & 3) * 3
nr = pr - ntscCycle[i+RED] + ntscChroma[i+RED] //+ (r-pr)/ERR_DIV
ng = pg - ntscCycle[i+GRN] + ntscChroma[i+GRN] //+ (g-pg)/ERR_DIV
nb = pb - ntscCycle[i+BLU] + ntscChroma[i+BLU] //+ (b-pb)/ERR_DIV
nr = pr - ntscCycle[i+RED] + ntscChroma[i+RED]
ng = pg - ntscCycle[i+GRN] + ntscChroma[i+GRN]
nb = pb - ntscCycle[i+BLU] + ntscChroma[i+BLU]
nd = dist(r, g, b, nr, ng, nb)
// Add current 1/4 chroma color
i = (x & 3) * 3