Skip to content

Instantly share code, notes, and snippets.

View bythos14's full-sized avatar
๐Ÿ™ƒ

Bythos bythos14

๐Ÿ™ƒ
  • St. Lucia
View GitHub Profile
@bythos14
bythos14 / translate.c
Last active November 15, 2023 18:55
PSPEMU eDRAM Address Translation
#include <stdint.h>
/**
* @brief Swap between eDram Graphics mode and Linear mode address encoding
*
* @param offset - The offset address to encode
*
* @return offset in the opposite address mode.
*/
@bythos14
bythos14 / program_internal.h
Last active March 16, 2022 16:22
SceGxmProgram Data Types and Defines
#ifndef _PROGRAM_H_
#define _PROGRAM_H_
#include <stdint.h>
typedef enum SceGxmProgramType
{
SCE_GXM_VERTEX_PROGRAM,
SCE_GXM_FRAGMENT_PROGRAM
} SceGxmProgramType;
@bythos14
bythos14 / slave_ukernel.asm
Created August 21, 2021 20:29
SGX543MP4+ Microkernel Disassembly
/**** slave_eventhandler.use.asm: File ****/
SlaveEventHandler: /* Function */
smlsi #0, #0, #0, #1, incrementmode, incrementmode, incrementmode, incrementmode, #0, #0, #0
mov r15, #0x00000000
mov r22, #0x00000000
phas #0, #0, pixel, end, parallel
or.end r0, r0, #0x00000000
JumpToSlaveSupervisor: /* Function */
mov r31, pclink
@bythos14
bythos14 / psp2cgc_intrinsic_defs.h
Last active September 27, 2023 17:03
Interesting findings about PSP2CGC
/// SCE CONFIDENTIAL
/// Copyright (C) 2012 Sony Computer Entertainment Inc.
/// All Rights Reserved.
///
//
// Example custom builtin
//
//float4 texTESTD(sampler2D samp, float2 s) __attribute__((Builtin, BuiltinUID("TEX_TEST_D"), AcceptsTemplateType(1)));
@bythos14
bythos14 / heap.c
Created November 29, 2020 19:51
Broken Gxm Test Code
#include <heap.h>
#include <psp2/gxm.h>
#include <psp2/libdbg.h>
#include <psp2/kernel/clib.h>
#include <psp2/kernel/sysmem.h>
#include <stdio.h>
static SceUID ramMemblock;