diff options
| author | Maxwell Beck <max@rastertail.net> | 2026-10-26 22:20:53 -0500 |
|---|---|---|
| committer | Maxwell Beck <max@rastertail.net> | 2026-10-26 22:20:53 -0500 |
| commit | 82dda2a60dc214174813b759ee4f618d1d6e3852 (patch) | |
| tree | 78088a519cec9d4b4f45b6b0c4df3ee87365e35d /transpose.py | |
| parent | 6772cb35f7b404b793a8bf13f3e1a4c1defbe430 (diff) | |
char drawing
need to fix row ordering
Diffstat (limited to 'transpose.py')
| -rw-r--r-- | transpose.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/transpose.py b/transpose.py new file mode 100644 index 0000000..c2db0c5 --- /dev/null +++ b/transpose.py @@ -0,0 +1,19 @@ +import sys + +chars = [] +with open(sys.argv[1], "rb") as f: + print("const uint8_t c64_chars[512][8] = {") + + while char := f.read(8): + transposed = [0] * 8 + for i in range(8): + for j in range(8): + bit = char[i] & (0b1000000 >> j) + bit <<= j + + transposed[j] |= bit >> i + + joined = ", ".join(str(t) for t in transposed) + print(f" {{{joined}}},") + + print("};") |
