Skip to content

Instantly share code, notes, and snippets.

View xerpi's full-sized avatar

Sergi Granell・セルジ xerpi

View GitHub Profile
// https://wiki.henkaku.xyz/vita/SDIF_Registers
typedef struct sd_mmc_registers {
uint32_t sdma_system_addr;
uint16_t block_size;
uint16_t block_count;
uint32_t argument1;
uint16_t transfer_mode;
uint16_t command;
uint16_t resp0;
uint16_t resp1;
@xerpi
xerpi / switchpush.sh
Created February 15, 2023 02:53
Switch utils
#!/bin/sh
if [ "$#" -ne 2 ]; then
echo -e "Invalid arguments:\n\tswitchpush src dst"
exit 1
fi
curl -u nxthemer:nxthemer -T "$1" ftp://$SWITCHIP:5000/"$2"
@xerpi
xerpi / camera.dtsi
Last active September 12, 2022 10:08
Ultra96v2 with Raspberry Pi Camera v2.1 (IMX219 sensor)
/ {
cam_clk: cam_clk {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <24000000>;
};
};
&i2csw_2 {
imx219@10 {
@xerpi
xerpi / 1-54inchlcd.dto
Last active May 15, 2021 14:52
1.54" LCD Raspberry Pi Zero
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
fragment@0 {
target = <&spi0>;
__overlay__ {
status = "okay";
@xerpi
xerpi / nidattack.c
Created March 28, 2021 22:13
nidattack with OpenMP support
/*
SHA1 dictionary attack program v2.0 (c) 2005 adresd
based on original by djhuevo
hash searchtable and other mods by adresd
performance checked by gorim
added OpenMP support by xerpi
compile with:
@xerpi
xerpi / cellCamera.s
Last active September 10, 2020 07:04
PSL1GHT v3 samples
.section ".rodata.sceResident", "a"
version:
.long 0x0
name:
.asciz "cellCamera"
.section ".lib.stub", "a"
.long 0x2c000001
.short 0x9
.short 0
@xerpi
xerpi / SceCompat.c
Last active July 31, 2021 14:36
PSVita Reverse Engineering
/*
* SceKermit (MIPS side):
* - https://gist.github.com/TheOfficialFloW/4fdec09e53a7c93a0d07d9e3e982dff4#file-kermit-c-L145
* - https://github.com/Total-Noob/kermit_reverse/blob/master/main.c
*/
/*
* Initial state:
* MIPS ARM
* Consumer ready = true Producer ready = true
#!/bin/bash
last=$(curl -s "ftp://${PSVITAIP}:1337/ux0:/data/" | grep psp2core | tail -1 | cut -d ' ' -f 9)
curl -s "ftp://${PSVITAIP}:1337/ux0:/data/$last" --output "$last"
echo "$last"
@xerpi
xerpi / PSVita_Linux_build_instructions.md
Last active April 1, 2024 12:51
PSVita Linux build instructions
@xerpi
xerpi / .config
Last active September 27, 2023 20:32
Buildroot .config PSVita Linux
#
# Automatically generated file; DO NOT EDIT.
# Buildroot 2023.08-458-g05fbb29322 Configuration
#
BR2_HAVE_DOT_CONFIG=y
BR2_HOST_GCC_AT_LEAST_4_9=y
BR2_HOST_GCC_AT_LEAST_5=y
BR2_HOST_GCC_AT_LEAST_6=y
BR2_HOST_GCC_AT_LEAST_7=y
BR2_HOST_GCC_AT_LEAST_8=y