Skip to content

Instantly share code, notes, and snippets.

View icpmoles's full-sized avatar
💭
I may be slow to respond.

Iacopo Moles icpmoles

💭
I may be slow to respond.
View GitHub Profile
@eevee
eevee / pico8jstocart.py
Created March 23, 2017 12:14
Python script to convert exported JavaScript back into a PICO-8 cartridge
import os.path
import re
import sys
# LZ-ish decompression scheme borrowed from picolove:
# https://github.com/gamax92/picolove/blob/master/cart.lua
compression_map = b"\n 0123456789abcdefghijklmnopqrstuvwxyz!#%(){}[]<>+=/*:;.,~_"
def decompress(code):
lua = bytearray()