Oops, TMDS table was decimal instead of hex (good video output now)

two-pixels-per-word
Luke Wren 2021-02-28 14:18:07 +00:00
rodzic d5dd6ce73d
commit be5836043d
3 zmienionych plików z 75 dodań i 74 usunięć

Wyświetl plik

@ -202,9 +202,9 @@ const uint32_t __dvi_const(dvi_ctrl_syms)[4] = {
// Output solid red scanline if we are given NULL for tmdsbuff
#if DVI_SYMBOLS_PER_WORD == 2
static uint32_t __attribute__((aligned(8))) __dvi_const(empty_scanline_tmds)[3] = {
0x523520u, // 0x00
0x523520u, // 0x00
0x784897u // 0xfc
0x7fd00u, // 0x00
0x7fd00u, // 0x00
0xbfa01u // 0xfc
};
#else
#error "Can't handle empty scanlines with pixel-per-word right now"

Wyświetl plik

@ -10,67 +10,67 @@
// Note the declaration isn't included here, just the table body. This is in
// case you want multiple copies of the table in different SRAMs (particularly
// scratch X/Y).
0x523520u,
0x265724u,
0x269816u,
0x519428u,
0x278000u,
0x511244u,
0x515336u,
0x273908u,
0x294368u,
0x494876u,
0x498968u,
0x290276u,
0x507152u,
0x282092u,
0x286184u,
0x719425u,
0x327104u,
0x462140u,
0x466232u,
0x323012u,
0x474416u,
0x314828u,
0x318920u,
0x686689u,
0x490784u,
0x298460u,
0x302552u,
0x670321u,
0x310736u,
0x662137u,
0x658045u,
0x653953u,
0x392576u,
0x396668u,
0x400760u,
0x388484u,
0x408944u,
0x380300u,
0x384392u,
0x752161u,
0x425312u,
0x363932u,
0x368024u,
0x735793u,
0x376208u,
0x727609u,
0x723517u,
0x588481u,
0x458048u,
0x331196u,
0x335288u,
0x768529u,
0x343472u,
0x760345u,
0x756253u,
0x555745u,
0x359840u,
0x776713u,
0x772621u,
0x539377u,
0x780805u,
0x531193u,
0x527101u,
0x784897u,
0x7fd00u,
0x40dfcu,
0x41df8u,
0x7ed04u,
0x43df0u,
0x7cd0cu,
0x7dd08u,
0x42df4u,
0x47de0u,
0x78d1cu,
0x79d18u,
0x46de4u,
0x7bd10u,
0x44decu,
0x45de8u,
0xafa41u,
0x4fdc0u,
0x70d3cu,
0x71d38u,
0x4edc4u,
0x73d30u,
0x4cdccu,
0x4ddc8u,
0xa7a61u,
0x77d20u,
0x48ddcu,
0x49dd8u,
0xa3a71u,
0x4bdd0u,
0xa1a79u,
0xa0a7du,
0x9fa81u,
0x5fd80u,
0x60d7cu,
0x61d78u,
0x5ed84u,
0x63d70u,
0x5cd8cu,
0x5dd88u,
0xb7a21u,
0x67d60u,
0x58d9cu,
0x59d98u,
0xb3a31u,
0x5bd90u,
0xb1a39u,
0xb0a3du,
0x8fac1u,
0x6fd40u,
0x50dbcu,
0x51db8u,
0xbba11u,
0x53db0u,
0xb9a19u,
0xb8a1du,
0x87ae1u,
0x57da0u,
0xbda09u,
0xbca0du,
0x83af1u,
0xbea05u,
0x81af9u,
0x80afdu,
0xbfa01u,

Wyświetl plik

@ -84,10 +84,11 @@ enc = TMDSEncode()
###
# Pixel-doubled table:
# for i in range(0, 256, 4):
# sym0 = enc.encode(i, 0, 1)
# sym1 = enc.encode(i ^ 1, 0, 1)
# print(f"0x{sym0 | (sym1 << 10)}u,")
for i in range(0, 256, 4):
sym0 = enc.encode(i, 0, 1)
sym1 = enc.encode(i ^ 1, 0, 1)
assert(enc.imbalance == 0)
print(f"0x{sym0 | (sym1 << 10):05x}u,")
###
# Fullres table stuff:
@ -108,7 +109,7 @@ enc = TMDSEncode()
###
# Control symbols:
for i in range(4):
sym = enc.encode(0, i, 0)
print(f"0x{sym << 10 | sym:05x},")
# for i in range(4):
# sym = enc.encode(0, i, 0)
# print(f"0x{sym << 10 | sym:05x},")