Skip to content

Instantly share code, notes, and snippets.

View unknownbrackets's full-sized avatar

Unknown W. Brackets unknownbrackets

View GitHub Profile
@unknownbrackets
unknownbrackets / littlebigplanet-jpcsptrace.log
Created February 14, 2014 17:11
Log of LittleBigPlanet creating savedata/install data initially
JpcspTrace - module_start
Config file:
> #
> # This file is the configuration file for the pluging JpcspTrace.
> # See the file README.txt for a description of the format of this file.
> #
>
> sceKernelCreateThread 0x446D8DE6 6 sxdxxx
Patching syscall from 0x80414F8 to 0x9FFDF80
> #sceKernelStartThread 0xF475845D 3 xxx
@unknownbrackets
unknownbrackets / gist:0e5332587eb623a92ccb
Created May 7, 2014 07:27
bgra/rgba interleaved loads
// Probably too many registers?
for (u32 i = 0; i < sseChunks; i += 2) {
__m128i c = _mm_load_si128(&srcp[i + 0]);
__m128i c2 = _mm_load_si128(&srcp[i + 1]);
__m128i rb = _mm_andnot_si128(maskGA, c);
c = _mm_and_si128(c, maskGA);
__m128i rb2 = _mm_andnot_si128(maskGA, c2);
c2 = _mm_and_si128(c2, maskGA);
__m128i b = _mm_srli_epi32(rb, 16);
@unknownbrackets
unknownbrackets / gist:fde2e5fcb01d08d40fb1
Created October 26, 2014 01:58
PPSSPP reports - config settings stats
Note that these are percentages of unique configurations using these settings, not of users. Unique users are intentionally not tracked for privacy reasons. Also, this only comes from reports, and mainly from reported problems (so these may bias toward configurations that cause problems.)
However, among configurations that differ (about 7,435 unique setting combinations), these are the popularities:
General.NumWorkerThreads
5.8% 1
46.6% 2
40.4% 4
4.6% 8
@unknownbrackets
unknownbrackets / sanitycheck.cpp
Last active August 29, 2015 14:10
SanityCheck for SIMD
static int GetMRMtx(int mr) {
if (mr < 32)
return -1;
if (mr >= 128 + 32)
return -1;
return ((mr - 32) >> 2) & 7;
}
static int GetMRRow(int mr) {
if (mr < 32)
@unknownbrackets
unknownbrackets / run.sh
Created December 20, 2014 19:08
dolphin hwtests run.sh
#!/bin/sh
"$DEVKITPPC/bin/wiiload" "$1"
TRIES=5
while [ $TRIES -gt 0 ]; do
netcat -w1 ${WIILOAD#tcp:} 16784
if [ $? == 0 ]; then
TRIES=0
else
sleep 1
@unknownbrackets
unknownbrackets / software.txt
Created December 30, 2014 22:15
gpu test ascii art - software
@unknownbrackets
unknownbrackets / circle.txt
Created December 30, 2014 22:16
gpu test ascii art -d3d clamp/wrap and opengl wrap
@unknownbrackets
unknownbrackets / correct.txt
Created December 30, 2014 22:16
gpu test ascii art - psp
@unknownbrackets
unknownbrackets / checker
Created December 30, 2014 22:17
gpu test ascii art - opengl clamp + psp clamp
@unknownbrackets
unknownbrackets / ConvertS16ToF32.cpp
Created January 11, 2015 22:21
ConvertS16ToF32
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);