Skip to content

Instantly share code, notes, and snippets.

@tjanas
tjanas / snes_enhancement_chip.py
Created May 25, 2021 15:08
Super Nt JB / SD2SNES: convert no-intro SNES Enhancement Chips
#!/usr/bin/env python3
import os, sys
import hashlib
# DSP1/2/3/4 file: 8192 bytes
# Program (6144 bytes, 24-bit words) + Data (2048 bytes, 16-bit words)
# Reverses word byte ordering
def create_dsp(source_filename, dest_filename, source_checksum):
source_file = None
try:
@tjanas
tjanas / ips_decode.c
Created March 27, 2020 15:08
IPS Decoder: prints instructions from IPS patches
#include <stdio.h>
#include <string.h>
// IPS Decoder. Created by tjanas.
// Prints instructions from IPS patches.
// Usage: <ips_decode> <patch_file.ips>
// Public domain
//
// IPS file format (https://zerosoft.zophar.net/ips.php):
// _______________________________________________________________________
@tjanas
tjanas / bps_decode.cpp
Created March 25, 2020 15:41
BPS Decoder: prints instructions from BPS patches
#include <cstdio>
#include <cstdlib>
#include <cstdint>
#include <cstring>
// BPS Decoder. Created by tjanas.
// Prints instructions from BPS patches.
// Usage: <bps_decode> <patch_file.bps>
// Compile: g++ -o bps_decode bps_decode.cpp -std=c++11
// BPS file format created by byuu. https://byuu.org/