Skip to content

Instantly share code, notes, and snippets.

Avatar

Unknown W. Brackets unknownbrackets

View GitHub Profile
View gist:e5bdd06cd8d85712fc51bd7b7707cfd1
#include <iostream>
static uint32_t bit_cast(float f) {
uint32_t x;
memcpy(&x, &f, 4);
return x;
}
static float bit_cast(uint32_t x) {
float f;
@unknownbrackets
unknownbrackets / debugger.html
Last active Apr 14, 2018
Quick and dirty PPSSPP WebSocket logger
View debugger.html
<html>
<head>
<style>
html {
height: 100%;
}
html, body {
display: flex;
flex-direction: column;
@unknownbrackets
unknownbrackets / help-file-formats.md
Created Dec 31, 2017
Valkyria Chronciles 3: file formats
View help-file-formats.md

Valkyria Chronicles 3 - File Formats

DATA.BIN datafile

This is a PGD-encrypted CPK file. The file can be decrypted using widely available tools.

CPK file

The actual CPK has a general format, and can be worked with using CRIWARE's

@unknownbrackets
unknownbrackets / flags.tsv
Created May 29, 2017
GE Debugger - Blade Dancer lighting issue
View flags.tsv
Name Value
Lighting enable 1
Light 0 enable 1
Light 1 enable 1
Light 2 enable 1
Light 3 enable 0
Clip enable 0
Cullface enable 1
Texture map enable 1
Fog enable 1
@unknownbrackets
unknownbrackets / reverb.expected
Last active Oct 31, 2015
ppsspp sas reverb signal diff
View reverb.expected
PSP:
[x] Deltas at full vol
[r] OFF diff=2047.875000, rms=5792.265198
[r] ROOM diff=2740.536865, rms=6093.509401
[r] UNK1 diff=5646.696045, rms=8305.105095
[r] UNK2 diff=3329.976440, rms=5844.549529
[r] UNK3 diff=3565.636353, rms=6382.942206
[r] HALL diff=2694.235474, rms=5512.626961
[r] SPACE diff=3364.618896, rms=6143.147106
View ConvertS16ToF32.cpp
void ConvertS16ToF32(float *out, const s16 *in, size_t size) {
#ifdef _M_SSE
const __m128i zero = _mm_setzero_si128();
while (size >= 8) {
__m128i indata1 = _mm_loadu_si128((__m128i *)in);
// Now we unpack with "sign extension", by unpacking with 0xFFFF if zero is greater.
__m128i insign1 = _mm_cmpgt_epi16(zero, indata1);
__m128i indata1lo = _mm_unpacklo_epi16(indata1, insign1);
__m128i indata1hi = _mm_unpackhi_epi16(indata1, insign1);
@unknownbrackets
unknownbrackets / checker
Created Dec 30, 2014
gpu test ascii art - opengl clamp + psp clamp
@unknownbrackets
unknownbrackets / circle.txt
Created Dec 30, 2014
gpu test ascii art -d3d clamp/wrap and opengl wrap