Skip to content

Instantly share code, notes, and snippets.

View MikuAuahDark's full-sized avatar
💭
🥳10th GitHubversary and counting.

Miku AuahDark MikuAuahDark

💭
🥳10th GitHubversary and counting.
View GitHub Profile
@MikuAuahDark
MikuAuahDark / transform_hack.lua
Created May 3, 2019 16:31
Extend functionality of LOVE 11.0 Transform object
-- Script that monkeypatch LOVE Transform
-- to add 3D support
local love = require("love")
local t = love.math.newTransform()
local t2 = love.math.newTransform()
local transformMt = getmetatable(t)
local function applyDump(ts, ...)
t2:reset()
t2:apply(ts)
@MikuAuahDark
MikuAuahDark / Xorshift.hpp
Last active June 22, 2019 14:35
C++11 <random>-compatible LOVE Xorshift* taken from Alpha Stellar
// LOVE Xorshift* implementation as of 11.3
// Reimplemented for consistency reasons.
// In any case, the license goes to LOVE Development Team which is zLib license.
// std
#include <stdint.h>
// STL
#include <random>
@MikuAuahDark
MikuAuahDark / livesim2_file_format.txt
Last active July 20, 2019 13:06
DEPLS2 beatmap format specification
Live Simulator: 2 binary beatmap file format. Extension: .ls2
Version 2.0
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! OBSOLETE, PREFER LS2OVR BEATMAP !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
The beatmap format consist of multiple sections, where each
section has FourCC and possibly with size depends on the FourCC itself.
The section can appear in any order. Like, storyboard section can appear
@MikuAuahDark
MikuAuahDark / sif_gettoken.lua
Created December 15, 2016 07:25
SIF WW Get Token Lua Script
-- sif_gettoken.lua
-- Get SIF token from memory (for SIF W v4.0.2)
-- Run under LuaJIT and as root
-- These 2 variables can be edited
local PACKAGE = "klb.android.lovelive_en"
local POINTER_ADDRESS = 0x46E438
-- Check if it's running as root
if os.getenv("USER") ~= "root" then
@MikuAuahDark
MikuAuahDark / HonokaMiku.cpp
Last active July 20, 2019 13:14
SIF Decryption (prototype). The fully working project is in https://github.com/MikuAuahDark/HonokaMiku
// HonokaMiku.cpp
// Loads SIF libGame.so and execute it's decrypt function
// 10/15/2015: JP is now supported. Requires SIF JP v2.0.5 x86 libGame.so
#if !defined(_M_IX86) && !defined(__i386__)
#error "Only x86 targets are supported!"
#endif
#include <cstdlib>
@MikuAuahDark
MikuAuahDark / format.txt
Created August 25, 2019 02:15
HMNS ContextInfo file structure
HMNS Context info file structure.
Version 1
All datatypes specified are in little endian. Integer types is assumed to be unsigned.
header - dword ('HMNS')
version - dword, 1 as of writing.
preflen - dword, prefix length without null-terminator.
prefix - byte[n], prefix string, without null-terminator.
dummy - align 4 bytes.
@MikuAuahDark
MikuAuahDark / DecrypterBenchmark.md
Last active September 4, 2019 13:05
SIF Decrypter Benchmark

Decrypter Benchmark

Test comparison of HonokaMiku v6.0.3 vs libhonoka v2.1.0 (both are not open source program)

Executable is 32-bit, compiled with Visual Studio 2010, with /Ox /Ot /Oi optimization.
HonokaMiku also additionally compiled with /EHsc option.

CPU: Intel Core i5-7200u 2.5GHz (up to 3.1GHz) OS: Windows 10 64-bit

@MikuAuahDark
MikuAuahDark / main.c
Last active October 13, 2019 15:46
Lazy HCA2WAV using clHCA
/* HCA2WAV */
/* This is one shot tool, error handling is lazy, */
/* memory may not be freed. Any efforts fixing this */
/* is useless */
#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_DEPRECATE
#endif
@MikuAuahDark
MikuAuahDark / mapextract.php
Last active February 20, 2020 16:08
PHP Script to extract beatmap files from osu!lazer
#!/usr/bin/env php
<?php
function showUsage(string $scriptName): void
{
echo "Usage: $scriptName <[l]ist|e[x]tract|[s]ync|[h]ash> <options>", PHP_EOL;
echo 'List usage: list', PHP_EOL;
echo 'Extract usage: extract <ID from list> <zip output>', PHP_EOL;
echo 'Sync usage: sync <osustable install>', PHP_EOL;
echo 'Hash usage: hash <ID from list>', PHP_EOL;
@MikuAuahDark
MikuAuahDark / timerEx.lua
Created June 19, 2020 12:55
timerEx 2020 rewrite
-- timerEx 2020 by MikuAuahDark
-- A rewrite of my 7-year-old timerEx 4.0
-- The old can be found here
-- https://www.unrealsoftware.de/files_show.php?file=13759
--[[---------------------------------------------------------------------------
-- Copyright (c) 2020 Miku AuahDark
--
-- 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