Skip to content

Instantly share code, notes, and snippets.

@infval
infval / get_mapper.c
Last active January 30, 2022 20:01
Get NES mapper
#include <stdio.h>
#include <stdint.h>
#define HEADER_SIZE 16
int IsNES20(uint8_t* header)
{
return (header[7] & 0x0C) == 0x08;
}
@infval
infval / index.html
Last active December 25, 2021 12:37
[NES] Alien 3 (U) / Alien3 / ALIEN³ - Fixes & Timer Editor
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>[NES] Alien 3 - Editor (v1.1)</title>
<style>
html {
font-family: sans-serif;
}
@infval
infval / dxt_to_png.py
Last active June 22, 2021 03:23
[Wii] Coraline | dxt Converter / Unpacker / Packer / Extractor | Magic: 30 81 80 00 / \x30\x81\x80\x00 / 30818000 / 308180
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
[Wii] Coraline
.dxt <-> PNG
Requirements:
pip install -U pillow
Usage:
@infval
infval / Puggsy_(U)_Free_Player.lua
Last active March 30, 2021 09:35
Puggsy (U) | Free Player (Camera) | Lua, BizHawk, Sega Mega Drive / Genesis
-- For BizHawk
local player_x_addr = 0x06E0
local player_y_addr = 0x06E2
local cam_x_addr = 0x05BA
local cam_y_addr = 0x05BC
local invincibility_addr = 0x0728
local step = 1
local prev_keys = {}
local prev_mouse = {}
@infval
infval / Script-ImportTMX.cs
Last active January 26, 2021 16:26
Import TMX - CadEditor
using CadEditor;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.IO.Compression;
using System.Xml.Linq;
using System.Windows.Forms;
@infval
infval / zudugo_fixer.py
Last active July 15, 2020 17:00
Fix Zudu-go ROM | 2udu-go, zudugo.bin (Macro Winners / Waixing) | CRC32: 0FA9D9AD | Python 3 | Emulators: NintendulatorNRS, MAME, EmuVT
#!/usr/bin/env python3
"""
Input: zudugo.bin (CRC32: 0FA9D9AD)
Usage:
script.py zudugo.bin
License: Unlicense
"""
__version__ = '1.0.0'
__author__ = "infval"
@infval
infval / yuzuUpdater_mediafire.py
Last active July 6, 2020 00:26
Update yuzu EA from mediafire folder
#!/usr/bin/env python3
__version__ = '1.0.1'
import os
import re
import sys
import json
import shutil
import zipfile
@infval
infval / sfd_demux.py
Last active November 17, 2021 22:00
Batch SFD mux / demux (Multiplexer / DeMultiplexer) | M1V, ADX, SFA | Python 3, ffmpeg, SFDmux
#!/usr/bin/env python3
from pathlib import Path
from os import system
import sys
overwrite = ''
if len(sys.argv) > 1 and sys.argv[1] == '-y':
overwrite = '-y'
p = Path('.')
@infval
infval / psx_fix_license.py
Last active June 14, 2022 21:29
Fix pirated PlayStation 1 BIN for OpenEmu, Mednafen | Исправление пиратских PlayStation 1 дисков для запуска на эмуляторах [ PSX, PS1, PSOne ]
#!/usr/bin/env python3
"""Fix pirated PlayStation 1 BIN for OpenEmu, Mednafen
usage:
script.py Image.bin [0|1|2]
0 - Japan, 1 - USA, 2 - Europe. Default: 1
examples:
script.py "Chrono Cross (USA) (Disc 1).bin"
script.py "Chrono Cross (USA) (Disc 1).bin" 1
script.py "Sexy Parodius (Japan).bin" 0
@infval
infval / draw_round_numbers.py
Created April 4, 2020 21:42
Draw Round Numbers (Circle) | Python 3 + PIL
#!/usr/bin/env python3
from PIL import Image
from PIL import ImageDraw
FACTOR = 4 # Super sampling
H = 256 * FACTOR
HGAP = 16 * FACTOR
WLINE = 16 * FACTOR
numbers = (