Skip to content

Instantly share code, notes, and snippets.

View spicyjpeg's full-sized avatar

spicyjpeg spicyjpeg

View GitHub Profile
@spicyjpeg
spicyjpeg / cdrom_to_iso.py
Created April 8, 2025 13:58
2336/2340/2352/2448-byte to 2048-byte sector (".bin to .iso") CD-ROM image converter
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""2336/2340/2352/2448-byte to 2048-byte (".bin to .iso") CD-ROM image converter
A simple command-line script to convert CD-ROM disc or track images with "full"
sectors (2336, 2340, 2352 or 2448 bytes per sector) - as commonly found in .bin
files distributed alongside cuesheets - to ones with standard 2048-byte sectors,
in order to allow them to be used with tools that only support the
2048-byte-sector ".iso" format. Requires no external dependencies.
@spicyjpeg
spicyjpeg / unroll_beatnik_midi.py
Last active August 1, 2024 04:44
MIDI loop unrolling tool for Beatnik MIDI files
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""MIDI loop unrolling tool for Beatnik MIDI files
A simple (and ridiculously specific) command-line tool to "unroll" looping MIDI
files into a regular full-length MIDI file. This is a *very* specific format
used by the Beatnik MIDI engine that allows for MIDI files to be "compressed" by
storing patterns rather than full tracks for each instrument, in a similar way
to how modern DAWs like FL Studio allow for a song to be arranged from patterns.
@spicyjpeg
spicyjpeg / system573_drive_bracket.scad
Created September 24, 2022 18:56
3D printable drive bracket replacement for the Konami System 573
/*
* Konami System 573 drive bracket
* (C) 2022 spicyjpeg
*
* A fairly minimal CD drive bracket replacement for 573s that don't have one,
* printable as either 2 pieces (left and right sides) or 4 pieces (left/right,
* front/back); splitting it into 4 pieces is recommended as it requires less
* filament. Unlike the real thing this one has no shock damping to keep the
* design simple. Compatible with both black and gray case variants of the 573,
* however only full-sized 5.25 inch drives are supported (the measurements are
@spicyjpeg
spicyjpeg / build_audio_cd.py
Created June 26, 2022 15:29
Audio CD image (.bin + .cue) generator script
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Audio CD image generator
This is a very simple command-line tool to generate a .bin and .cue file for an
audio-only CD from a set of input tracks in any format. Most of the heavy
lifting here is done by FFmpeg and NumPy, this script merely writes converted
audio data to the .bin file and generates the cuesheet.
@spicyjpeg
spicyjpeg / fnf_downloader.py
Created August 17, 2021 14:09
Friday Night Funkin' / HaxeFlixel HTML5 game downloader script
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Friday Night Funkin' downloader
I made this script to automate downloading of the FNF HTML5 version hosted on
Newgrounds, as well as bootlegs and mods hosted by other people. Given an empty
directory and the URL to index.html, this script downloads all assets and files
required to play the game fully offline (no patching is done so FNF will retain
Newgrounds functionality). Running downloaded games in a browser still requires