Skip to content

Instantly share code, notes, and snippets.

@Bl4ckSh4rk
Bl4ckSh4rk / find_bytes.py
Created November 2, 2024 11:53
Finds bytes in a directory
from argparse import ArgumentParser
import os
def search_in_file(filepath, bytes) -> int | None:
try:
with open(filepath, 'rb') as file:
data = file.read()
offset = data.find(bytes)
if offset != -1:
return offset
@Bl4ckSh4rk
Bl4ckSh4rk / Disable Union Room Check.txt
Created June 3, 2022 01:36
Disable the Union Room checks in Pokemon Emerald when entering the Pokemon Center
Disable Union Room Check
-----------------------------
Pokemon Emerald (ENG)
0x271982: B1 → E2
0x271A5A: B1 → E2
0x277C30: 25 A4 → 00 00
-----------------------------
Pokemon Esmeralda (ESP)
0x275786: B5 → E6
0x27585E: B5 → E6
@Bl4ckSh4rk
Bl4ckSh4rk / YGOLOTDSaveFix.c
Last active May 17, 2022 08:08
Fixes checksums in Yu-Gi-Oh! Legacy of the Duelist: Link Evolution (NSW)
#include <stdio.h>
#include <stdlib.h>
unsigned int table[] = {
0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
@Bl4ckSh4rk
Bl4ckSh4rk / LockCapsule.txt
Created June 17, 2020 09:42
HGSS Lock Capsule Special Wondercard (Unofficial)
HeartGold/SoulSilver (US)
Add Lock Capsule Wondercard (Select)
94000130 FFFB0000
B2111880 00000000
E000B074 00000358
00000003 00000215
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
@Bl4ckSh4rk
Bl4ckSh4rk / e-card-headerfix.c
Last active January 16, 2020 12:27
fixes e-Card data, header and global checksums
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void exitTool()
{
printf("\n\nPress ENTER to exit...");
while(1)
{
if (getchar())
@Bl4ckSh4rk
Bl4ckSh4rk / pkrwcompress.c
Last active January 8, 2022 16:50
tool to (de)compress Pokemon Rumble World save data files (contents of 00slot00), uses https://github.com/madler/zlib
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <zlib.h> // https://github.com/madler/zlib
// zlib bugfix
#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
# include <fcntl.h>
# include <io.h>
@Bl4ckSh4rk
Bl4ckSh4rk / g5_dict_eng.txt
Last active May 25, 2018 11:53
BWB2W2 - Dictionary (Easy Chat)
POKÉMON
0x0001 BULBASAUR
0x0002 IVYSAUR
0x0003 VENUSAUR
0x0004 CHARMANDER
0x0005 CHARMELEON
0x0006 CHARIZARD
0x0007 SQUIRTLE
0x0008 WARTORTLE
0x0009 BLASTOISE
@Bl4ckSh4rk
Bl4ckSh4rk / g4_dict_eng.txt
Last active January 3, 2018 01:31
DPPtHGSS - Dictionary (Easy Chat)
POKéMON
0x0001 BULBASAUR
0x0002 IVYSAUR
0x0003 VENUSAUR
0x0004 CHARMANDER
0x0005 CHARMELEON
0x0006 CHARIZARD
0x0007 SQUIRTLE
0x0008 WARTORTLE
0x0009 BLASTOISE
@Bl4ckSh4rk
Bl4ckSh4rk / g3_dict_eng.txt
Last active December 27, 2017 22:56
RSEFRLG - Dictionary (Easy Chat)
POKéMON
0x0001 BULBASAUR
0x0002 IVYSAUR
0x0003 VENUSAUR
0x0004 CHARMANDER
0x0005 CHARMELEON
0x0006 CHARIZARD
0x0007 SQUIRTLE
0x0008 WARTORTLE
0x0009 BLASTOISE