Skip to content

Instantly share code, notes, and snippets.

View unknownbrackets's full-sized avatar

Unknown W. Brackets unknownbrackets

View GitHub Profile
@unknownbrackets
unknownbrackets / help-file-formats.md
Created December 31, 2017 18:09
Valkyria Chronciles 3: file formats

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

#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 April 14, 2018 16:06
Quick and dirty PPSSPP WebSocket logger
<html>
<head>
<style>
html {
height: 100%;
}
html, body {
display: flex;
flex-direction: column;
@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 / 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 / flags.tsv
Created May 29, 2017 15:32
GE Debugger - Blade Dancer lighting issue
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 / 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
@unknownbrackets
unknownbrackets / WndMainWindow.cpp
Created September 22, 2013 20:02
snippet: multi monitor fun
const int screenWidth = GetSystemMetrics(SM_CXVIRTUALSCREEN);
const int screenHeight = GetSystemMetrics(SM_CYVIRTUALSCREEN);
const int screenX = GetSystemMetrics(SM_XVIRTUALSCREEN);
const int screenY = GetSystemMetrics(SM_YVIRTUALSCREEN);
bool visibleHorizontally = ((g_Config.iWindowX + g_Config.iWindowWidth) >= screenX) &&
((g_Config.iWindowX + g_Config.iWindowWidth) < (screenWidth + g_Config.iWindowWidth));
bool visibleVertically = ((g_Config.iWindowY + g_Config.iWindowHeight) >= screenY) &&
((g_Config.iWindowY + g_Config.iWindowHeight) < (screenHeight + g_Config.iWindowHeight));