Skip to content

Instantly share code, notes, and snippets.

@infval
infval / decode_font.py
Created February 3, 2019 09:25
Font decoder/encoder - Splinter Cell Chaos Theory (N-Gage)
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import math
from PIL import Image, ImageDraw
def decode(filename):
print(filename)
with open(filename, "rb") as f:
b = f.read()
@infval
infval / get_explorer_search_history.py
Created September 22, 2019 23:38
[Win7] Explorer search history to file
#!/usr/bin/env python3
import winreg
sub_key = r"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\WordWheelQuery"
history = []
with winreg.OpenKey(winreg.HKEY_CURRENT_USER, sub_key) as key:
order, regtype = winreg.QueryValueEx(key, "MRUListEx")
ind = 0
while order[ind] != 0xFF:
@infval
infval / Toejam_&_Earl_in_Panic_on_Funkotron.lua
Last active January 3, 2020 20:31
[SMD] Toejam & Earl in Panic on Funkotron - Moving Characters [BizHawk/Lua]
local player1_x = 0x8DDC
local player1_y = 0x8DE4
local player2_x = 0x8E5C
local player2_y = 0x8E64
local player_x = player1_x
local player_y = player1_y
local step = 1
local prev_keys = {}
@infval
infval / nes_coop.md
Created January 27, 2020 22:25
[NES] Кооперативные игры
Название Жанр Экран Заметки Скриншоты
Balloon Fight Platformer image image
Battle City Shooter image image
Bubble Bobble Platformer image image image
Cabal Shooter image image
CJ's Elephant Antics Platfo
@infval
infval / translate.py
Last active February 3, 2020 18:05
Translate characters
#!/usr/bin/env python3
import argparse
from pathlib import Path
parser = argparse.ArgumentParser(description='Translate characters')
parser.add_argument('input', help='input file')
parser.add_argument('table', help='table file, "A=Z\\nB=2\\nK=M"')
parser.add_argument('output', help='output file')
parser.add_argument('-e', '--encoding', default="utf-8",
@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 = (
@infval
infval / yuzu_bmz2_fix.py
Last active April 18, 2020 05:48
yuzu | Color fix for 'Blaster Master Zero 2' [Switch]
#!/usr/bin/env python3
"""
Dirty color fix for 'Blaster Master Zero 2' [Switch]
OpenGL ONLY!
Tested version: yuzu 228
"""
import sys
# \src\video_core\renderer_opengl\renderer_opengl.cpp
shader_text = b"void main() {\n color = vec4(texture(color_texture, frag_tex_coord).rgb, 1.0f);\n}"
@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 / 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 / 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;