Skip to content

Instantly share code, notes, and snippets.

View 0xD34D's full-sized avatar

Clark Scheff 0xD34D

View GitHub Profile
@0xD34D
0xD34D / 64x64_rgb565_image.dat
Created March 7, 2024 19:02
TJC3224T132_011N compressed image from .tft file
0000:0000 | 01 00 00 00 14 05 00 00 00 00 00 00 00 00 00 00 | ................
0000:0010 | 00 00 00 00 FE F3 2F 00 00 F8 00 F8 00 F8 E0 07 | ....þó/..ø.ø.øà.
0000:0020 | E0 07 E0 07 80 AB 38 01 FE F3 2F 00 00 F8 00 F8 | à.à..«8.þó/..ø.ø
0000:0030 | 00 F8 E0 07 E0 07 E0 07 80 AB 38 01 FE F3 2F 00 | .øà.à.à..«8.þó/.
0000:0040 | 00 F8 00 F8 00 F8 E0 07 E0 07 E0 07 80 AB 38 01 | .ø.ø.øà.à.à..«8.
0000:0050 | FE F3 2F 00 00 F8 00 F8 00 F8 E0 07 E0 07 E0 07 | þó/..ø.ø.øà.à.à.
0000:0060 | 80 AB 38 01 FE F3 2F 00 00 F8 00 F8 00 F8 E0 07 | .«8.þó/..ø.ø.øà.
0000:0070 | E0 07 E0 07 80 AB 38 01 FE F3 2F 00 00 F8 00 F8 | à.à..«8.þó/..ø.ø
0000:0080 | 00 F8 E0 07 E0 07 E0 07 80 AB 38 01 FE F3 2F 00 | .øà.à.à..«8.þó/.
0000:0090 | 00 F8 00 F8 00 F8 E0 07 E0 07 E0 07 80 AB 38 01 | .ø.ø.øà.à.à..«8.
@0xD34D
0xD34D / tjc3224T132_header2_decrypter.py
Created March 5, 2024 19:31
Ugly python code to decrpyt header2 from tjc.tft files
import argparse
from pathlib import Path
import struct
NONCE = struct.pack("III", 0x92930f5e, 0x924f6584, 0xfbad3bbf)
KEY = struct.pack("II", 0x582659b6, 0xbd829c9c)
if __name__ == "__main__":
desc = """TFT header2 decoder
Developped by Clark Scheff, licensed under GPLv3"""
@0xD34D
0xD34D / TFTRLE2RGB565.py
Last active March 12, 2024 01:05
Python script to convert TJC TFT RLE encoded images to raw RGB565
import argparse
import os
from pathlib import Path
import struct
if __name__ == "__main__":
desc = """TFT RLE to RGB5656 image converter
Developped by Clark Scheff, licensed under GPLv3"""
parser = argparse.ArgumentParser(description=desc)
@0xD34D
0xD34D / print_start.cfg
Created December 7, 2023 01:51
e3v3se klipper print_start macro
[gcode_macro PRINT_START]
variable_parameter_EXTRUDER_TEMP: 200
variable_parameter_BED_TEMP: 60
gcode:
G28 ; home all axes
BED_MESH_CLEAR
PRTOUCH_PROBE_ZOFFSET APPLY_Z_ADJUST=1 CLEAR_NOZZLE=1
M106 S255
M104 S{params.EXTRUDER_TEMP} ; set extruder temp
M190 S{params.BED_TEMP} ; set bed temp and wait