Yep, I did that.
I was bored, plus I randomly came across Wojbie mentioning the idea while searching for TLCO stuff in the Discord.
| -- SPDX-FileCopyrightText: 2017 Daniel Ratcliffe, 2025 minerobber | |
| -- | |
| -- SPDX-License-Identifier: LicenseRef-CCPL | |
| local function printUsage() | |
| local programName = arg[0] or fs.getName(shell.getRunningProgram()) | |
| print("Usage: " .. programName .. " <name> <program> <arguments>") | |
| return | |
| end-- SPDX-FileCopyrightText: 2017 Daniel Ratcliffe | |
| -- |
Yep, I did that.
I was bored, plus I randomly came across Wojbie mentioning the idea while searching for TLCO stuff in the Discord.
| # MDFPWM encoder | |
| # Uses ffmpeg to encode a WAV file as dfpwm | |
| # Assumes ffmpeg is on PATH | |
| # CC0, whatever | |
| # credit Drucifer@SwitchCraft.kst for the format | |
| import subprocess, tempfile, os, os.path, struct, json | |
| def I(n): | |
| return struct.pack("<I",n) |
| // base64 in MiniScript | |
| // by minerobber | |
| // Mini Micro-exclusive (uses RawData) | |
| // use base64.encode/decode for standard base64 | |
| // also supports variants (use .encode/decode on variants): | |
| // - standard (A-Za-z0-9+/; base64.standard) | |
| // - URL (A-Za-z0-9-_; base64.url) | |
| // - B64 (crypt/GEDCOM; ./0-9A-Za-z; base64.b64/crypt/gedcom) | |
| // - bcrypt (./A-Za-z0-9; base64.bcrypt) | |
| // - bash base64 literals (0-9A-Za-z@_; base64.bash) |
| local functions = {} | |
| for v in ("ABS ATN COS EXP INT LOG RND SIN SQR TAN "):gmatch("(.-) ") do | |
| functions[v]=true | |
| end | |
| for c in ("ABCDEFGHIJKLMNOPQRSTUVWXYZ"):gmatch("(.)") do | |
| functions["FN"..c]=true | |
| end | |
| local statements = {} | |
| for v in ("LET PRINT END READ DATA GOTO IF FOR NEXT GOSUB RETURN DEF DIM REM STOP INPUT "):gmatch("(.-) ") do | |
| statements[v]=true |
| local _nil = setmetatable({},{__newindex=function() end}) -- sentinel | |
| local function switch(val) | |
| if val==nil then val=_nil end | |
| return function(cases) | |
| return (cases[val] or cases.default or function() end)() | |
| end | |
| end | |
| return setmetatable({["_nil"]=_nil,switch=switch},{__call=function(t,...) return switch(...) end}) |
| """TIC-80 graphics converter. Requires pillow. | |
| usage: tic80gfx.py [-b BACKGROUND_COLOR] [-c COMMENT] [-p PALETTE] image index output | |
| positional arguments: | |
| image The image to convert. | |
| index The index number for the top-left sprite. | |
| output Where the converted image data will be saved. | |
| options: |
| -- Floppy Rocker | |
| -- by MineRobber___T | |
| -- Requires aukit and an attached speaker | |
| if not package.path:find("lib/?") then package.path=package.path..";lib/?;lib/?.lua;lib/?/init.lua" end | |
| if not pcall(require,"aukit") then error"Requires aukit" end | |
| local aukit=package.loaded.aukit | |
| local fs=fs |
| -- TOML parser | |
| -- by MineRobber___T/khuxkm | |
| -- no guarantee it'll pass every test but it should absolutely be capable | |
| -- of reading valid TOML passed to it | |
| -- | |
| -- returns a parse function; TOML goes in, table comes out | |
| -- | |
| -- MIT licensed | |
| local function lookupify(a,b) |