Skip to content

Instantly share code, notes, and snippets.

@vxgmichel
vxgmichel / convert_cp437.py
Last active May 28, 2025 23:03
Video conversion for Turing Complete 80x48 display.
#!/usr/bin/env python
"""
Convert an mp4 video file to uncompressed 80x48 video frames.
The output data is meant to be used as direct memory for the 80x24 Turing complete
console. In particular, pixels are grouped vertically so 2 pixels can fit into a
single `▀` (`\xdf`) character.
For instance, the following frame: