Skip to content

Instantly share code, notes, and snippets.

@camprevail
camprevail / do_strings.py
Last active May 13, 2025 01:29 — forked from NWPlayer123/do_strings.py
x64 fork of a script to apply string types in ida. Press W at the base of a string, or select a range of strings. Only tested in ida 7.
# Press W, creates string there, creates align/word, renames to a non-conflicting name
import idaapi, idc, inspect
from io import BytesIO
def get_selected_bytes():
#BOOL multiple, start, end
selected = idaapi.read_selection()
curr_ea = idc.get_screen_ea()
return [selected, curr_ea]
@camprevail
camprevail / museca_judge_spin_note.cpp
Created February 18, 2025 01:52
museca - judge_spin_note decomp
void __fastcall judge_spin_note(CGameSceneComponent *cGSC_, NoteStruct *noteStruct)
{
NoteStruct *NS; // rbx
CGameSceneComponent *cGSC; // rdi
NOTE_KIND_INTERNAL kind; // er8
int stime; // eax
float v6; // xmm0_4
int adjTime; // edx
float noteTimeDelta__; // xmm4_4
__int64 lane; // rax
@camprevail
camprevail / museca_judge_hold_note.cpp
Created February 18, 2025 00:17
museca - judge_hold_note decomp
void __fastcall judge_hold_note(CGameSceneComponent *cGSC_, NoteStruct *noteStruct_, __int64 flag)
{
char some_holdnote_flag; // r15
NoteStruct *noteStruct; // rbx
CGameSceneComponent *cGSC; // rdi
int note_stime; // er10
float temp_flt; // xmm0_4
int note_etime; // er14
int curTime; // eax
int adjTime; // er12
@camprevail
camprevail / museca_judge_notes.cpp
Last active February 18, 2025 01:41
museca - judge_notes decomp. Calls the appropriate judge functions
void __fastcall judge_notes(CGameSceneComponent *cGSC_)
{
//skipping less relevant code before and after this snippet.
NS = cGSC->CGameSequence.curNoteStructWindow;
cGSC->hit_note_judgedLaneMask = 0;
while ( NS != cGSC->CGameSequence.curNoteStructWindow_endloc )
{
noteStruct = *NS;
if ( *NS && !cGSC->note_hit_array[noteStruct->lane] )
@camprevail
camprevail / sdvx-amps.ino
Created December 27, 2024 19:38
Init sdvx amps to a set volume
// Pin definitions
#define DATA_PIN 2
#define CLOCK_PIN 3
#define HI(pin) pinMode(pin, INPUT)
#define LO(pin) pinMode(pin, OUTPUT)
enum VOLTAGE: uint32_t {
_12vto15v = 0b11,
_9vto12v = 0b10,
_6vto9v = 0b01,
@camprevail
camprevail / museca_judge_hit_note.cpp
Last active February 17, 2025 22:57
museca - judge_hit_notes decomp
void __fastcall judge_hit_note(CGameSceneComponent *cGSC_, NoteStruct *noteStruct_)
{
NoteStruct *noteStruct; // rdi
CGameSceneComponent *cGSC; // rbx
int v4; // eax
int noteTimeDelta; // er13
float flt_noteTimeDelta; // xmm6_4
float temp_flt; // xmm0_4
int judgeType; // esi
NOTE_TYPE_INTERNAL lane; // er11