Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Zarh committed Aug 14, 2018
0 parents commit 4f79fb8
Show file tree
Hide file tree
Showing 103 changed files with 11,794 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
115 changes: 115 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
v0.88
-Add : Support IDPS from latest ps3 models
-Add : Dupport fw to dump the eid_root_key

v0.87
-Added : fw independant
-Added : root key dumper 4.75D (thanks to Joonie who ported it)
-Added : more message in the log to be more aware of what's going on and also to allow me to know precisly what's causing some 'random' freeze (thanks to your feedbacks ofc)

Note :
-The root key dumper and Converter are not fw indepedant
-We can't write PSP IDPS in the EID0 without bricking the system.

v0.86
-fix : no more freeze when you dump your key for firmware under 4.65.

v0.85
-Added: Background image (a PNG is: /USRDIR/BG.PNG)
-Added: Homebrew support fw 4.70 and 4.75
-Added: The root key dumper support fw 4.70C, 4.70D and 4.75

v0.84
-Added : Swap of "software_update_plugin.sprx"

v0.83
Fix : No more freeze when making CEX&DEX dumps with a DEX system

v0.80
-fix : The dumps no longer have the attribute "system"

v0.79
-fix : Les fichiers n'ont plus l'attribut "system"
-fix : bug d'affichage sur la bar de progression

v0.78
-fix : changement de "/dev_hdd0/temp/eid_root_key" � "/dev_hdd0/tmp/eid_root_key"
-fix exit freeze : Ajout du d�chargement des modules � la sortis de l'homebrew

v0.76
_fix : correction d'une coquille sur l'affichage d'un des messages lors du "make dump"
_Add : Ajout de la version dans le TITLE du param.sfo

v0.75
-fix freeze : lors dump root_key
-Add : root key sauvegarder � "/dev_usb000/eid_root_key" sinon "/dev_hdd0/tmp/eid_root_key"
-Add : Ajout d'une barre de progression pour les copies de fichiers

v0.70
-Add : nouveau GUI
-Removed : tout ce qui est en rapport avec le PSID
-Removed : "save/load from/to file
-Add : "dump eid_root_key"
-Add : "Convert to DEX/CEX"
-Add : "Make CEX/DEX dumps" est plus rapide

v0.63
Add : compatible fw 4.65

v0.62
-Fix : ptit bug

v0.61
-Fix : le nom des dumps. Le dump dex s'appelais CEX-FLASH... et le dump cex s'appelais DEX-FLASH... tssss.

v0.6
-Add : changement d'idps dans la section 6 de l'eid0
-Change : nom "IDPS tool" � "IDPSet"
-Change : ICON0
-Add : �criture des dump DEX/CEX dans la cl� USB

v0.5
-Add : "Load IDPS from EID0"
-Add : "Save PSID to EID0"

v0.43
-add : Menu
-Add : changement PSID lv2 via fichier .bin

v0.41
-Fix : petit bug

v0.40
-Removed : offset idps "fixe" donc c'est maintenant compatible avec tout les firmware y compris les futurs fw
-Add : Dump CEX/DEX
-Add : ICON0 anim�s <3
-Removed : "Convert DEX/CEX" pour + de securit� car switch kernel est necessaire

v0.34
-Fix : petit bug

v0.33
-Add : changement d'idps dans l'eid5

v0.32
-Add : "load original idps from EID5"
-Add : "Convert to DEX/CEX"
-fix : petit bug

v0.31
-Add : "Change IDPS in EDI0" compatible avec les NAND et NOR

v0.3
-Add : "Change IDPS in EID0" compatible uniquement pour le NOR

v0.22
-Add : 3eme offset de l'IDPS

v0.21
-Add : "Save et load idps"

v0.2
-Add : Curseur pour modifi� l'IDPS

v0.1
-version initiale
194 changes: 194 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
#---------------------------------------------------------------------------------
# Clear the implicit built in rules
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
ifeq ($(strip $(PSL1GHT)),)
$(error "Please set PSL1GHT in your environment. export PSL1GHT=<path>")
endif

include $(PSL1GHT)/ppu_rules

#---------------------------------------------------------------------------------
# TARGET is the name of the output
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# INCLUDES is a list of directories containing extra header files
#---------------------------------------------------------------------------------
VERSION := 0.88
NAME := IDPSet

TARGET := $(NAME)_v$(VERSION)
BUILD := build
SOURCES := source
DATA := data
INCLUDES := include
PKGFILES := $(CURDIR)/pkgfiles

TITLE := IDPSet $(VERSION)
APPID := IDPSET000
CONTENTID := EP0001-$(APPID)_00-0000000000000000

ifeq ($(RPCS3), 1)
MACHDEP = -DRPCS3
endif

SCETOOL_FLAGS += --self-ctrl-flags 4000000000000000000000000000000000000000000000000000000000000002
SCETOOL_FLAGS += --self-cap-flags 00000000000000000000000000000000000000000000007B0000000100000000

#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------

CFLAGS = -O2 -Wall -mcpu=cell $(MACHDEP) $(INCLUDE)
CXXFLAGS = $(CFLAGS)

LDFLAGS = $(MACHDEP) -Wl,-Map,$(notdir $@).map

#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project
#---------------------------------------------------------------------------------
LIBS := -ltiny3d -lsysmodule -lgcm_sys -lrsx -lsysutil -lio -lm -lpngdec -lfreetype -lz

#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS := $(PORTLIBS)

#---------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
# rules for different file extensions
#---------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------

export OUTPUT := $(CURDIR)/$(TARGET)

export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
$(foreach dir,$(DATA),$(CURDIR)/$(dir))

export DEPSDIR := $(CURDIR)/$(BUILD)

export BUILDDIR := $(CURDIR)/$(BUILD)

#---------------------------------------------------------------------------------
# automatically build a list of object files for our project
#---------------------------------------------------------------------------------
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.bin)))
PNGFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.png)))
JPGFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.jpg)))
TTFFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.ttf)))
VCGFILES := $(foreach dir,$(SHADERS),$(notdir $(wildcard $(dir)/*.vcg)))
FCGFILES := $(foreach dir,$(SHADERS),$(notdir $(wildcard $(dir)/*.fcg)))

#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
#---------------------------------------------------------------------------------
ifeq ($(strip $(CPPFILES)),)
export LD := $(CC)
else
export LD := $(CXX)
endif

export OFILES := $(addsuffix .o,$(BINFILES)) \
$(addsuffix .o,$(TTFFILES)) \
$(addsuffix .o,$(VPOFILES)) \
$(addsuffix .o,$(FPOFILES)) \
$(addsuffix .o,$(PNGFILES)) \
$(addsuffix .o,$(JPGFILES)) \
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \
$(sFILES:.s=.o) $(SFILES:.S=.o)

#---------------------------------------------------------------------------------
# build a list of include paths
#---------------------------------------------------------------------------------
export INCLUDE := -I$(PORTLIBS)/include/freetype2 \
$(foreach dir,$(INCLUDES), -I$(CURDIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
$(LIBPSL1GHT_INC) \
-I$(CURDIR)/$(BUILD)

#---------------------------------------------------------------------------------
# build a list of library paths
#---------------------------------------------------------------------------------
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
$(LIBPSL1GHT_LIB)

export OUTPUT := $(CURDIR)/$(TARGET)
.PHONY: $(BUILD) clean

#---------------------------------------------------------------------------------
$(BUILD):
@[ -d $@ ] || mkdir -p $@
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile

#---------------------------------------------------------------------------------
clean:
@echo clean ...
@rm -fr $(BUILD) *.elf *.self *.pkg

#---------------------------------------------------------------------------------
run:
ps3load $(OUTPUT).self

#---------------------------------------------------------------------------------
pkg: $(BUILD) $(OUTPUT).pkg

#---------------------------------------------------------------------------------
else

DEPENDS := $(OFILES:.o=.d)

#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
$(OUTPUT).self: $(OUTPUT).elf
$(OUTPUT).elf: $(OFILES)

#---------------------------------------------------------------------------------
# This rule links in binary data with the .bin extension
#---------------------------------------------------------------------------------
%.bin.o : %.bin
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@$(bin2o)

#---------------------------------------------------------------------------------
%.ttf.o : %.ttf
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@$(bin2o)

#---------------------------------------------------------------------------------
%.vpo.o : %.vpo
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@$(bin2o)

#---------------------------------------------------------------------------------
%.fpo.o : %.fpo
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@$(bin2o)

#---------------------------------------------------------------------------------
%.jpg.o : %.jpg
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@$(bin2o)
#---------------------------------------------------------------------------------
%.png.o : %.png
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@$(bin2o)

-include $(DEPENDS)

#---------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------
Binary file added data/NOT_PNG.bin
Binary file not shown.
Binary file added data/payload_421C.bin
Binary file not shown.
Binary file added data/payload_421D.bin
Binary file not shown.
Binary file added data/payload_430C.bin
Binary file not shown.
Binary file added data/payload_430D.bin
Binary file not shown.
Binary file added data/payload_431C.bin
Binary file not shown.
Binary file added data/payload_440C.bin
Binary file not shown.
Binary file added data/payload_441C.bin
Binary file not shown.
Binary file added data/payload_441D.bin
Binary file not shown.
Binary file added data/payload_446C.bin
Binary file not shown.
Binary file added data/payload_446D.bin
Binary file not shown.
Binary file added data/payload_450C.bin
Binary file not shown.
Binary file added data/payload_450D.bin
Binary file not shown.
Binary file added data/payload_453C.bin
Binary file not shown.
Binary file added data/payload_453D.bin
Binary file not shown.
Binary file added data/payload_455C.bin
Binary file not shown.
Binary file added data/payload_455D.bin
Binary file not shown.
Binary file added data/payload_460C.bin
Binary file not shown.
Binary file added data/payload_465C.bin
Binary file not shown.
Binary file added data/payload_465D.bin
Binary file not shown.
Binary file added data/payload_470C.bin
Binary file not shown.
Binary file added data/payload_470D.bin
Binary file not shown.
Binary file added data/payload_475C.bin
Binary file not shown.
Binary file added data/payload_475D.bin
Binary file not shown.
Binary file added data/payload_476C.bin
Binary file not shown.
Binary file added data/payload_476D.bin
Binary file not shown.
Binary file added data/payload_478C.bin
Binary file not shown.
Binary file added data/payload_478D.bin
Binary file not shown.
Binary file added data/payload_480C.bin
Binary file not shown.
Binary file added data/payload_480D.bin
Binary file not shown.
Binary file added data/payload_481C.bin
Binary file not shown.
Binary file added data/payload_481D.bin
Binary file not shown.
Binary file added data/payload_482C.bin
Binary file not shown.
Binary file added data/payload_482D.bin
Binary file not shown.
51 changes: 51 additions & 0 deletions payload/source/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
CC := ppu-gcc
OBJCOPY := ppu-objcopy

TARGET = payload

CFLAGS = -std=c99 -m64 -fno-builtin -fno-exceptions -fdata-sections -ffunction-sections -Os -Wno-strict-aliasing -Wno-multichar -Wall -I.
ifeq ($(BUILD_TYPE),debug)
CFLAGS += -DDEBUG
endif
CFLAGS += -D__STDC_FORMAT_MACROS
ASFLAGS = -m64 -Os -Wall -I.
ASFLAGS += -D__ASSEMBLY__
ifeq ($(BUILD_TYPE),debug)
ASFLAGS += -DDEBUG
endif
LDFLAGS = -Tldscript.ld -nostartfiles -nostdlib -nodefaultlibs -Wl,--gc-sections -Wl,-Map=$(TARGET)_$@.map

PAYLOADS := 421C 421D 430C 430D 431C 440C 441C 441D 446C 446D 450C 450D 453C 453D 455C 455D 460C \
465C 465D 470C 470D 475C 475D 476C 476D 478C 478D 480C 480D 481C 481D 482C 482D

define do_payload
$(CC) $(ASFLAGS) -DFIRMWARE_$@ -c start.S -o start.S.o
$(CC) $(ASFLAGS) -DFIRMWARE_$@ -c kernel.S -o kernel.S.o
$(CC) $(ASFLAGS) -DFIRMWARE_$@ -c hypervisor.S -o hypervisor.S.o
$(CC) $(ASFLAGS) -DFIRMWARE_$@ -c syscalls.S -o syscalls.S.o
$(CC) $(ASFLAGS) -DFIRMWARE_$@ -c util.S -o util.S.o
$(CC) $(CFLAGS) -DFIRMWARE_$@ -c main.c -o main.c.o
$(CC) $(CFLAGS) -DFIRMWARE_$@ -c device.c -o device.c.o
$(CC) $(CFLAGS) -DFIRMWARE_$@ -c network.c -o network.c.o
$(CC) $(CFLAGS) -DFIRMWARE_$@ -c mm.c -o mm.c.o
$(CC) $(CFLAGS) -DFIRMWARE_$@ -c kernel.c -o kernel.c.o
$(CC) $(CFLAGS) -DFIRMWARE_$@ -c hypervisor.c -o hypervisor.c.o
$(CC) $(CFLAGS) -DFIRMWARE_$@ -c spu.c -o spu.c.o
$(CC) $(CFLAGS) -DFIRMWARE_$@ -c debug.c -o debug.c.o
$(CC) $(CFLAGS) -DFIRMWARE_$@ -c util.c -o util.c.o
$(CC) $(CFLAGS) -DFIRMWARE_$@ -c dumper.c -o dumper.c.o
$(CC) $(LDFLAGS) -L. -o $(TARGET)_$@.elf start.S.o kernel.S.o hypervisor.S.o syscalls.S.o util.S.o main.c.o device.c.o network.c.o mm.c.o kernel.c.o hypervisor.c.o spu.c.o debug.c.o util.c.o dumper.c.o
$(OBJCOPY) -O binary $(TARGET)_$@.elf $(TARGET)_$@.bin
mv -f $(TARGET)_$@.bin ../../data/$(TARGET)_$@.bin
rm -f *.o *.elf *.bin *.map
endef


all: $(PAYLOADS)

$(PAYLOADS):
$(do_payload)
@echo ----------------------------------------------------------------

clean:
rm -f *.o *.elf *.bin *.map
13 changes: 13 additions & 0 deletions payload/source/asm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ifndef __ASM_H__
#define __ASM_H__

#include "macros.h"

#define GLOBAL(name) \
.section .text, "ax"; \
.align 2; \
.global .name; \
.type .name, @function; \
.name: \

#endif
Loading

0 comments on commit 4f79fb8

Please sign in to comment.