Skip to content

Instantly share code, notes, and snippets.

@psxdev
psxdev / psp2-fixup.c
Last active August 29, 2015 14:22
with osx mavericks and libelf installed elf.h is gelf.h and i include arm.h for extrs definition : gcc -I/opt/local/include -I./include psp2-fixup.c -o psp2-fixup
#include <errno.h>
#ifdef __APPLE__
//in osx mavericks with macport libelf elf.h is gelf.h
#include <libelf/gelf.h>
#elif __linux
#include <elf.h>
#endif
//we need some definition form include/elf/arm.h
@psxdev
psxdev / steps.txt
Last active January 11, 2016 11:03
Run rejuvenate from osx command prompt with virtualbox
1. virtualbox windows guest machine running on osx
2. put following lines in a launcher.bat file in c:\rejuvenate-0.2-beta :
cd c:\rejuvenate-0.2-beta
run_homebrew hello_world.elf
3.Run from osx following command
VBoxManage guestcontrol "yourwindowsguestvmname" --username "yourwindowsguestusername" --password "yourwindowsguespassword" run --exe "c:/rejuvenate-0.2-beta/launcher.bat" --verbose --wait-stdout --wait-stderr
@psxdev
psxdev / Makefile
Last active April 25, 2018 15:43
Makefile for libpng for vita
# makefile for libpng using gcc (generic, static library)
# Copyright (C) 2008, 2014 Glenn Randers-Pehrson
# Copyright (C) 2000 Cosmin Truta
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
# Location of the zlib library and include files
arm-vita-eabi-gcc -Wl,-q -Wall -mfloat-abi=hard -c -o main.o main.c
main.c: In function 'main':
main.c:69:3: warning: implicit declaration of function 'file_choose' [-Wimplicit-function-declaration]
file_choose(
^
arm-vita-eabi-gcc -Wl,-q -Wall -mfloat-abi=hard -c -o font.o font.c
font.c: In function 'font_draw_stringf':
font.c:55:2: warning: implicit declaration of function 'sceClibVsnprintf' [-Wimplicit-function-declaration]
sceClibVsnprintf(buf, sizeof(buf), s, argptr);
^
arm-vita-eabi-gcc -Wl,-q -Wall -mfloat-abi=hard -c -o main.o main.c
main.c: In function 'main':
main.c:69:3: warning: implicit declaration of function 'file_choose' [-Wimplicit-function-declaration]
file_choose(
^
arm-vita-eabi-gcc -Wl,-q -Wall -mfloat-abi=hard -c -o font.o font.c
font.c: In function 'font_draw_stringf':
font.c:55:2: warning: implicit declaration of function 'sceClibVsnprintf' [-Wimplicit-function-declaration]
sceClibVsnprintf(buf, sizeof(buf), s, argptr);
^
arm-vita-eabi-gcc -Wl,-q -Wall -mfloat-abi=hard -c -o main.o main.c
main.c: In function 'main':
main.c:28:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
arm-vita-eabi-gcc main.o -Wl,-q -Wall -mfloat-abi=hard -lSceCtrl_stub -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub -o psp2linksample.elf
#advice from xyzz strip before create elf
arm-vita-eabi-strip -g psp2linksample.elf
#i put db.json there use your location
vita-elf-create psp2linksample.elf psp2linksample.velf /usr/local/vitadev/bin/db.json
Output session PS4 webkit controlling Playstation 4 Camera
´´´
f2offs = 0x28
WebKit2 base address = 0x80c538000
libkernel Base = 0x815b34000
libSceLibcinternal Base = 0x820438000
Stack Base = 0x7efd44000
Refresh this page between calls to avoid instability and crashes. Enjoy...
syscall getLoadedModules
Variable 0 = 0x0 (OK)
@psxdev
psxdev / main.c
Last active September 4, 2015 03:54
Mode 0 playstation 4 decode frame for 1280x800 resolution
#include <opencv2/opencv.hpp>
#include <string> // std::string
#include <iostream> // std::cout
#include <sstream> // std::stringstream
#include <iomanip> // std::setfill, std::setw
#include<stdio.h> //SYSTEM
#include<iostream>
void convert_yuyv422_to_bgr(char *img,int x, int y)
{
@psxdev
psxdev / ps4loadingelfsession.txt
Last active January 10, 2016 18:12
ps4link loader with ps4sh elf loader session
First load custom ps4link in ps4 with webkit exploit
We see log initialization on mac/pc to see if there is a problem with bind.
$ debug.sh
[PS4][INFO]: debugnet initialized
[PS4][INFO]: Copyright (C) 2010,2016 Antonio Jose Ramos Marquez aka bigboss @psxdev
[PS4][INFO]: ready to have a lot of fun...
[PS4][DEBUG]: [PS4LINK] Server request thread UID: 0x80678B40
[PS4][DEBUG]: [PS4LINK] Created ps4link_requests_sock: 84
[PS4][DEBUG]: [PS4LINK] bind to ps4link_requests_sock done
[PS4][DEBUG]: [PS4LINK] Ready for connection 1
[PS4][DEBUG]: [PS4LINK] commands listener received packet size (266)
[PS4][DEBUG]: base is 89
[PS4][DEBUG]: current is 90
[PS4][DEBUG]: current is 90
[PS4][DEBUG]: current is 90
[PS4][DEBUG]: current is 90
[PS4][DEBUG]: current is 90
[PS4][DEBUG]: current is 90
[PS4][DEBUG]: current is 90
[PS4][DEBUG]: current is 90