Skip to content

Instantly share code, notes, and snippets.

View xerpi's full-sized avatar

Sergi Granell・セルジ xerpi

View GitHub Profile
/*
* wikinidparser by xerpi
* Usage:
* - hxpipe SceFoo > SceFoo_piped
* - ./wikinidparser SceFoo_piped
*/
#include <stdlib.h>
#include <fstream>
#include <sstream>
#include <stdio.h>
#include <string.h>
#include <taihen.h>
#include <psp2kern/kernel/modulemgr.h>
#include <psp2kern/kernel/threadmgr.h>
#include <psp2kern/kernel/sysmem.h>
#include <psp2kern/io/fcntl.h>
#define DUMP_PATH "ux0:dump/"
#define LOG_FILE DUMP_PATH "kplugin_log.txt"
#!/bin/bash
if [ "$#" -lt 1 ]; then
echo -e "Usage:\n\t$0 SceFoo_0xXXXXXXXX_segY.bin"
exit 1
fi
if [[ -z "${VITA_DB_YML}" ]]; then
echo "Error: db.yml file not found, make sure to set VITA_DB_YML."
exit 1
#!/bin/bash
INSTALL_DIR=/opt/vitasdk
sudo rm -rf $INSTALL_DIR
sudo mkdir -p $INSTALL_DIR
sudo chown $USER $INSTALL_DIR
sudo apt-get install -y git cmake geany
@xerpi
xerpi / make_3ds.sh
Last active April 27, 2023 10:33
Linux 3DS scripts
#!/bin/sh
TOOLCHAIN=/opt/armv6-eabihf--glibc--bleeding-edge-2020.02-2/bin/arm-buildroot-linux-gnueabihf-
cp arch/arm/configs/nintendo3ds_defconfig .config
make ARCH=arm CROSS_COMPILE=$TOOLCHAIN -j8
make ARCH=arm CROSS_COMPILE=$TOOLCHAIN nintendo3ds_ctr.dtb
echo "Output file: ./arch/arm/boot/zImage"
@xerpi
xerpi / Makefile
Created September 20, 2016 15:01
VJ Makefile
TARGET = $(notdir $(CURDIR))
CC = gcc
CXX = g++
CFLAGS = -g -O2 -I/usr/include/SOIL
CXXFLAGS = $(CFLAGS)
LIBS = -lSOIL -lglut -lGLEW -lGL -lm
CFILES = $(wildcard *.c)
CPPFILES = $(wildcard *.cpp)
OBJS = $(CPPFILES:.cpp=.o) $(CFILES:.c=.o)
TARGET = $(notdir $(CURDIR))
OBJS = main.o
CC = xtensa-lx106-elf-gcc
CFLAGS = -I. -mlongcalls
LDLIBS = -nostdlib -Wl,--start-group -lmain -lnet80211 -lwpa -llwip -lpp -lphy -Wl,--end-group -lgcc
LDFLAGS = -Teagle.app.v6.ld
BAUDRATE = 921600
all: $(TARGET)-0x00000.bin
@xerpi
xerpi / prof_viewer.c
Created August 5, 2016 13:08
Vita static profiling
#include <cstdio>
#include <cstdint>
#include <cstdlib>
#include <cinttypes>
#include <map>
struct prof_log_entry {
uint64_t time;
uint64_t calls;
char name[64];
@xerpi
xerpi / prof_viewer.c
Last active August 5, 2016 12:41
Vita profiling
#include <cstdio>
#include <cstdint>
#include <cstdlib>
#include <cinttypes>
#include <map>
struct prof_log_entry {
uint64_t start;
uint64_t end;
char func[64];
#include <stdarg.h>
#include <psp2/net/net.h>
#include <psp2/net/netctl.h>
static int _dbgsock = 0;
static void *net_memory = NULL;
void init_netdbg()
{