Skip to content

Instantly share code, notes, and snippets.

@Scirvir
Scirvir / float_seconds_to_HMS.lua
Last active November 1, 2023 16:01
Print to console floating point seconds in HH:MM:SS.mmm format
function SecondsToHMS(totalSeconds)
local hours = math.floor(totalSeconds / 3600)
local minutes = math.floor((totalSeconds % 3600) / 60)
local seconds = math.floor(totalSeconds % 60)
local milliseconds = math.floor((totalSeconds - math.floor(totalSeconds)) * 1000)
return hours, minutes, seconds, milliseconds
end
function reverseTable(tbl)
for i=1, math.floor(#tbl / 2) do
@Scirvir
Scirvir / MotorstormArcticEdge_PSP_pak.bms
Created October 30, 2023 18:33
Unpacker for MotorStorm Arctic Edge PSP by Acewell uploaded to XeNTaX on Feb 21, 2019 http://web.archive.org/web/20210724080255/https://forum.xentax.com/viewtopic.php?t=19494
# script for QuickBMS http://aluigi.altervista.org/quickbms.htm
idstring "PAK "
get UNK long
get FILES long
math FILES ^ 0xa3da79b6
get STR_TABLE_SZ long
get DIR_STR_SZ long
savepos TMP
getdstring DIR_NM DIR_STR_SZ
@Scirvir
Scirvir / mspr_beta_script.lua
Last active June 14, 2023 10:01
Lua script for Cheat Engine to launch the campaign in MotorStorm Pacific Rift's 2008 E3 demo / 70% beta
--[[
1. Make sure the option MEM_MAPPED is ticked in CE's scan settings (Edit > Settings > Scan Settings)
2. Paste the script below on CE's Lua engine (Table > Show Cheat Table Lua Script)
3. Launch the game.
4. After the screen goes black, wait a couple of seconds and execute the script.
5. 'Press X Button' should appear on screen. You can close CE now if you want.
]]--
openProcess('rpcs3.exe')
debugProcess()