Skip to content

Instantly share code, notes, and snippets.

View wheremyfoodat's full-sized avatar
😏
Shouting at clouds

wheremyfoodat

😏
Shouting at clouds
View GitHub Profile
@wheremyfoodat
wheremyfoodat / ida_burnout_paradise_symbols.py
Last active July 21, 2025 21:54
IDA Python script for loading debug symbol files for Burnout Paradise (PS3)
external_symbols = "/Users/Giorgos/Documents/MAP_EXTERNAL.bin" # **PATH TO YOUR MAP FILE GOES HERE**
internal_symbols = "/Users/Giorgos/Documents/MAP_INTERNAL.bin" # **PATH TO YOUR MAP FILE GOES HERE**
import struct
from idautils import *
from idaapi import *
def load_burnout_symbols(path):
with open(path, "rb") as file:
file.seek(0x10)
@wheremyfoodat
wheremyfoodat / CUDA.ipynb
Created July 21, 2025 20:22
Jupyter Notebook for running CUDA kernels on Google Colab
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wheremyfoodat
wheremyfoodat / fft.fsx
Created June 22, 2025 17:00
Small F# NWaves demo, to demonstrate how to do basic DSP using F#
// Run with "dotnet fsi fft.fsx"
#r "nuget: NWaves"
open FSharp.Core
open NWaves.Signals
open NWaves.Transforms
let magnitude realPart imagPart = Array.map2 (fun re im -> sqrt (re * re + im * im)) realPart imagPart
let samples = [|1.0f; 0.6f; 0.4f; 0.1f; 1.0f; 1.0f; 0.9f; 1.0f|]
@wheremyfoodat
wheremyfoodat / pid.py
Created June 22, 2025 16:50
Calculate coefficients for a PID controller, using the various formulae for the Ziegler-Nichols method
import sys
if len(sys.argv) < 3:
print("Error: Missing arguments. Pls provide the ultimate gain (Ku) and ultimate period (Tu) of your plant.")
print("Usage: python3 pid.py <Ku> <Tu>")
sys.exit(-1)
# PID coefficients (Kp/Kd/Ki and Tp/Ti)
class Coefficients:
def __init__(self, Kp, Ki, Kd):
@wheremyfoodat
wheremyfoodat / testbench.cpp
Created October 20, 2024 19:22
SSE & NEON code for finding the minimum & maximum vertex indices in a GPU index buffer
#include <algorithm>
#include <cstdint>
#include <cstdio>
#include <limits>
#include <utility>
using u8 = uint8_t;
using u16 = uint16_t;
using u32 = uint32_t;
@wheremyfoodat
wheremyfoodat / kernel.cu
Last active July 22, 2025 00:59
Nokotan Markov Chain CUDA kernel
// Implements the Markov Chain from this video: https://www.youtube.com/watch?v=Xkq13ZthmA0
// Stops when one of the CUDA threads manages to get the theme song sequence right
#include <cuda_runtime.h>
#include <curand_kernel.h>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <ctime>
@wheremyfoodat
wheremyfoodat / disc_image.hpp
Last active July 11, 2024 01:21
Wii Disc decryption
#pragma once
#include <filesystem>
#include <limits>
#include <optional>
#include <type_traits>
#include "helpers.hpp"
#include "io_file.hpp"
#include "swap.hpp"
@wheremyfoodat
wheremyfoodat / nds.py
Created June 30, 2024 17:41
Actual working Binary Ninja NDS plugin
# Copyright (c) 2015-2024 Vector 35 Inc
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
@wheremyfoodat
wheremyfoodat / hips.hpp
Created May 5, 2024 22:45
Single-header patcher for IPS. UPS and BPS files
#pragma once
#include <algorithm>
#include <array>
#include <climits>
#include <cstdio>
#include <cstring>
#include <type_traits>
#include <utility>
#include <vector>
@wheremyfoodat
wheremyfoodat / post.md
Last active June 3, 2024 07:44
Why having multiple emulators is good

Forenote: Most of the following is simply my point of view as an emulator developer. Various names are omitted for privacy reasons.

I usually write blog posts aimed at developers, but I'd like to make an exception just this once. For a lot of game consoles you have likely noticed that there's multiple emulators for said console. Even for more modern systems like the Nintendo 3DS, you've got several active emulators such as Citra, Mikage and Panda3DS, and some less active ones at the moment such as Corgi3DS. This has made many people in the emulation community ask "Why do emulator developers not simply collaborate"? Thus, I'd like to dedicate this post to answering this question as an emulator developer myself.

1) We actually do collaborate!

Even when we're working on different emulators, we very often collaborate and help each other. A lot of people don't know, since it usually happens ov