1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-09-30 22:56:03 +00:00

Ported rest.

This commit is contained in:
Thomas Harte 2016-06-12 17:29:44 -04:00
parent 1a2b18f93b
commit 580c8bdcbd

View File

@ -58,6 +58,27 @@ MOS6560::MOS6560() :
"float chroma = cos(phase + phaseOffset);"
"return mix(y, chroma, amplitude);"
"}");
// set up colours table
// 0
// 2, 6, 9, B,
// 4, 5, 8, A, C, E
// 3, 7, D, F
// 1
uint8_t luminances[16] = { // range is 04
0, 4, 1, 3,
2, 2, 1, 3,
2, 1, 2, 1,
2, 3, 2, 3
};
uint8_t chrominances[16] = { // range is 015
0, 0, 5, 13, 2, 10, 0, 8,
6, 7, 5, 13, 2, 10, 0, 8,
};
for(int c = 0; c < 16; c++)
{
_colours[c] = (uint8_t)((luminances[c] << 4) | chrominances[c]);
}
}
void MOS6560::set_register(int address, uint8_t value)