Skip to content

Instantly share code, notes, and snippets.

View QbeRoot's full-sized avatar

Nicolas M. QbeRoot

View GitHub Profile
@QbeRoot
QbeRoot / qftimer.s
Created September 16, 2024 17:01
Source for Quarterframe Timer
qftRect = 0x817F0094 # u32[4] coordinates of the textbox relative to the top left corner of the screen, in order: left X, top Y, right X, bottom Y
qftFormat = 0x817F00A4 # string printf format string of the timer, containing 3 specifiers for minutes, seconds and milliseconds in order
qftStop = 0x817F00B2 # bool if nonzero, the timer is stopped on the value of qftOffset, otherwise it continues to run
qftReset = 0x817F00B3 # bool if nonzero, the timer will restart from 0 in the next area, otherwise it will continue where it left off
qftOffset = 0x817F00B4 # u32 cumulative time spent in previous areas since the last reset, includes current area iff qftStop is true
qftFreezeTime = 0x817F00B8 # u32 fixed time to be displayed if qftFreezeFor > 0 and qftStop is false, only includes current area
qftFreezeFor = 0x817F00BC # u32 duration of a timer freeze (in frames)
qftTextBox = 0x817F0110 # J2DTextBox textbox used to render the timer (0x128
@QbeRoot
QbeRoot / dtm-rerecords.py
Last active December 11, 2022 14:47
A Python script that parses a Dolphin TAS Movie (DTM) file and extracts its rerecord count
import os
import sys
def main():
if len(sys.argv) != 2:
print('Usage: {} <DTM file path>'.format(sys.argv[0]), file=sys.stderr)
sys.exit()
path = sys.argv[1]
@QbeRoot
QbeRoot / infodump.c
Created December 12, 2021 18:36
Source code for the Super Mario Sunshine position/angle/speed display Gecko code (build with https://github.com/BitPatty/Super-Mario-Sunshine-C-Kit)
#include <stdio.h>
#include "sms.h"
static J2DTextBox tb;
static int loaded = 0;
void OnSetup(MarDirector* director) {
JUTRect r;
MarDirector_SetupObjects(director);
@QbeRoot
QbeRoot / spinput.py
Created September 23, 2021 14:26
A hacky live visualisation of spin inputs for PAL Super Mario Sunshine on Dolphin, using a memory access lib written by aldelaro5 and ported to Python by RenolY2
import ctypes
import struct
from ctypes import wintypes, sizeof, addressof, POINTER, pointer
from ctypes.wintypes import DWORD, ULONG, LONG, WORD
import math
import tkinter
from tkinter import ttk
# Various Windows structs/enums needed for operation
NULL = 0