Skip to content

Instantly share code, notes, and snippets.

View VelocityRa's full-sized avatar

Nick Renieris VelocityRa

View GitHub Profile
@VelocityRa
VelocityRa / sly1_ps3_W.bt
Last active October 11, 2020 00:24
[WIP] Extracts mesh information from Sly Cooper and the Thievius Raccoonus (PS3 US Release) "W" decompressed files
//------------------------------------------------
//--- 010 Editor v8.0 Binary Template
//
// File: sly1_ps3_W.bt
// Authors: VelocityRa (https://github.com/VelocityRa)
// Version:
// Purpose:
// Category:
// File Mask:
// ID Bytes:
@VelocityRa
VelocityRa / FindJumptableTargets.py
Last active March 14, 2021 08:27
Ghidra script that finds jumptable targets for PS3 jumptables (generated for C 'switch'es) and adds refs to their indirect jump instruction
# Finds jumptable targets for PS3 jumptables (generated for C 'switch'es) and adds
# refs to the indirect jump instruction so that decompilation for the cases is present
# (instead of Ghidra complaining with an error in the switch as it often does).
# Select the block with the address offsets before running (first mark them all as
# addresses with `P` and `[`).
# After you run this you'll probably want to select the indirect jump instruction
# (usually `bctr`) and run the SwitchOverride.java script.
#@author VelocityRa
#@category Repair
@VelocityRa
VelocityRa / FindPS2Vtables.py
Last active March 21, 2021 21:28
Ghidra script made to find all Sly 2 PS2 2002 proto vtable pointers
#TODO write a description for this script
#@author
#@category _NEW_
#@keybinding
#@menupath
#@toolbar
from ghidra.program.model.data import Pointer32DataType
from ghidra.program.model.util import CodeUnitInsertionException
@VelocityRa
VelocityRa / lfm-rich-presence-headless.js
Created May 25, 2022 22:33
Discord Last.fm Rich Presence
// modified from https://github.com/PvtTyphoon/lfm-rich-presence
const rpc = require("discord-rpc");
const rp = new rpc.Client({
transport: "ipc",
});
const fetch = require("request-promise");
const prettyMilliseconds = require("pretty-ms");
function formatNumber(number) {
var x = number.split(".");
@VelocityRa
VelocityRa / emudev_resources_systems.md
Last active May 11, 2024 19:49
Content mirror of the EmuDev Discord's `#resources-systems` channel

System-specific Resources

Below are some useful resources for various popular systems. If you're unsure what you want to work on we recommend starting with a CHIP-8 tutorial, of which there are many (just Google it).

After that, move to whatever system you want to. You don't need to "work your way up" to it or whatever as many seem to think. (relevant thread). Just make sure you have the basics down first, remember to study the source code of existing emulators (super important) and if you get stuck, ask questions on this server or in the emudev subreddit: https://reddit.com/r/EmuDev.

For potentially more resources on your system, also see pinned messages in relevant system channels.

Note: A great introduction to any system is to read its Architecture of Consoles entry, if available.

@VelocityRa
VelocityRa / emudev_resources_general.md
Last active May 11, 2024 23:07
Content mirror of the EmuDev Discord's `#resources-general` channel

General Resources