Skip to content

Instantly share code, notes, and snippets.

View unknownbrackets's full-sized avatar

Unknown W. Brackets unknownbrackets

View GitHub Profile
@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 / 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 / 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 / potential-ps3-mem-test.c
Created May 20, 2014 04:56
Potential test for PS3 memory mirrors / ranges
int g;
int f() {
return 42;
}
int main() {
int v;
printf("Memory addresses:\n");
@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 / rpcs3-instr-table.cpp
Last active April 2, 2018 23:23
New, virtual function-less initial concept (untested)
#include "stdafx.h"
// Aren't these just PPC opcodes?
#include "Emu/Cell/PPUOpcodes.h"
// Design plan:
// Get to the interp/jit/etc. func as quick as possible.
// Individual interp/jit/disasm funcs should be short and direct as possible.
// Needs to take native byte order - too many args to win by using BE.
@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 / depth-messy.cpp
Last active December 28, 2015 16:39
Messy hacked together depth test
#include <common.h>
#include <pspdisplay.h>
#include <pspgu.h>
#include <pspgum.h>
#include <float.h>
#include <pspkernel.h>
#include "commands.h"
u8 *fbp0 = 0;
@unknownbrackets
unknownbrackets / top-fog-frame.log
Created November 8, 2013 19:30
Tales of Phantasia X frame dump
This file has been truncated, but you can view the full file.
================ FLUSH ================
Scissor TL: 8, 0
================ FLUSH ================
Scissor BR: 343, 239
Region TL: 0 0
================ FLUSH ================
Region BR: 343 239
Blend mode: add fixed, fixed
Blend fix A: 808080
Blend fix B: 808080
@unknownbrackets
unknownbrackets / phantasystar-text-frame.log
Created October 5, 2013 09:25
Log of missing text in Phantasy Star Portable 1.
FramebufPixelFormat: 1
FramebufWidth: 200, address high 00
================ FLUSH ================
FramebufPtr: 00000000
BASE: 040000
CMD JUMP - 04130010 to 041300d4
================ FLUSH ================
Clear mode: 000701 (on, color, alpha/stencil, depth)
================ FLUSH ================
SetVertexType: through, ABGR 8888 colors, u16 coords