Skip to content

Commit 12189ce

Browse files
committed
Add V1.4
0 parents  commit 12189ce

18 files changed

+2142
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.DS_Store

EBOOT.PBP

533 KB
Binary file not shown.

IC1003.PNG

157 KB
Loading

idstorage.prx

2.54 KB
Binary file not shown.

readme.pdf

44.2 KB
Binary file not shown.

readme.txt

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
KeyCleaner v1.4 by Chilly Willy
2+
===============================
3+
4+
To install, just copy the KeyCleaner folder in the archive to your memstick.
5+
If you run this with HEN or on the Slim PSP, copy to the GAME folder. If you
6+
use a custom firmware, copy to the GAME150 folder.
7+
8+
To use, run like normal homebrew. The first screen tells you the motherboard
9+
and region to which the IdStorage is set. You then have three choices: exit
10+
by pressing the CIRCLE button, analyze the IdStorage keys by pressing the
11+
CROSS button, or dump the IdStorage keys by pressing the SQUARE button.
12+
13+
The first time you dump the keys, it creates a folder called 'keys', then dumps
14+
the keys into it. If you choose to dump the keys again, the 'keys' folder will
15+
be renamed, and a new 'keys' folder created. You can keep dumping the keys until
16+
you have dumped them 10,000 times, or you run out of memory on the memstick.
17+
18+
If you press the CROSS button, you will be taken to the Analyze Keys screen.
19+
You can choose to analyze the keys as if the motherboard were a TA-079/81,
20+
as if it were a TA-082/86, or as if it were a TA-085. I made this selectable
21+
in case the IdStorage keys identify the motherboard incorrectly. It will tell
22+
you which motherboard it thinks it is in the top line. If you aren't sure,
23+
press the SQUARE button to view a picture that shows how to tell which you
24+
have. It is a picture of the back of a PSP (mine) with the UMD door open. The
25+
red rectangle is the area of concern. If you have 'IC1003' printed upside down
26+
on the motherboard in that area, you have a TA-082/86. If not, you have a
27+
TA-079/81. Please note that all current Slim PSPs are TA-085. Press any key to
28+
return to the Analyze Keys screen. You can choose 'Analyze TA-079/81' on a
29+
TA-082/86, just don't choose to fix any keys it says are bad because it will
30+
fix them as if the PSP were a 79/81. If you DO fix them as a 79/81, you can
31+
select to analyze the keys as a TA-082/86 to fix them. The reverse is true
32+
if you have a TA-079/81. Please don't mess with the keys on a Slim at this
33+
time as only a few of the keys can be fixed with this version. Specifically,
34+
keys 4, 5, 6, 0x42, 0x46, and 0x47. If you mess up any other keys, you won't
35+
be able to fix them in KeyCleaner at this time.
36+
37+
If you choose 'Analyze TA-082/86' (then main reason you probably got this),
38+
it will print a status of the keys associated with downgrading and tell you
39+
if it thinks there is a problem. If you see 'Congratulations! Your keys
40+
appear to be fine.', then your keys are fine. Note that 'fine' means key
41+
5 has been patched using my method. If key 5 is patched a different way,
42+
it'll tell you key 5 is bad and give you the option of fixing it. It isn't
43+
REALLY bad, I'm just encouraging people to use my method of patching.
44+
45+
If the IdStorage isn't okay, with key 5 patched my way, it will check for
46+
common corruption from downgraders. It currently recognizes the original
47+
hard-down method, the original (2.71) soft-down method, and the NOOBZ (2.80
48+
and 3.03) soft-down method. If the IdStorage matches one of those downgrade
49+
methods, it then goes to the Fix Keys screen. You will be asked if you
50+
REALLY wish to attempt fixing the keys. If you tell it to do so, it then
51+
fixes all corrupted keys. This version of KeyCleaner can fix ALL the keys
52+
without any files, so you don't need any other files as in previous versions.
53+
If one of the common downgrader methods is not recognized, KeyCleaner then
54+
checks certain individual keys that are commonly bad for one reason or
55+
another. This version of KeyCleaner can fix keys 4, 5, 6, 0x42, 0x43, 0x46,
56+
and 0x47. If key 0x46 or 0x47 don't exist, it will create it, then fix it.
57+
Old TA-079 PSPs often are missing 0x46 and 0x47. That is fine - it is the
58+
way those PSPs were. Don't feel you have to fix those two keys.
59+
60+
If the analysis shows all the keys to be fine, and key 5 patched with my
61+
method, it will ask if you wish to unpatch key 5. Do NOT do that unless
62+
you have the custom IPL or are running your TA-082/86 on official Sony
63+
firmware with HEN (homebrew enabler) or you WILL brick the PSP! Given
64+
Pandora has made changing the firmware easy, and bricks recoverable,
65+
KeyCleaner has changed to reflect this. It can unpatch key 5 as part of
66+
the visible main key handling so that people with the custom IPL or people
67+
wishing to run 3.30 or newer Sony firmware have an easy way to clean up
68+
their keys and unpatch key 5. If you aren't sure if your PSP will run
69+
with an unpatched key 5, DO NOT UNPATCH IT!!
70+
71+
This version of KeyCleaner will load the background and text colors from
72+
the file "textcolors.bin". If the file is missing, it will default to the
73+
old color scheme - white text on a black background. The new colors in the
74+
textcolors.bin supplied are white text on a warm blue background. The way
75+
to change the colors is to load textcolors.bin into a hex editor and change
76+
it as follows:
77+
78+
Byte 0: 00
79+
Byte 1: red intensity for background (00 to FF)
80+
Byte 2: green intensity for background (00 to FF)
81+
Byte 3: blue intensity for background (00 to FF)
82+
Byte 4: 00
83+
Byte 5: red intensity for text (00 to FF)
84+
Byte 6: green intensity for text (00 to FF)
85+
Byte 7: blue intensity for text (00 to FF)
86+
87+
For example, the contents of the default textcolors.bin is:
88+
00 20 60 A0 00 FF FF FF
89+
90+
Acknowledgements
91+
================
92+
This program was made possible by the efforts of many people. I'd like to
93+
thank idstoragefix, codes02, Stapol, Mathieulh, harleyg, Jas0nuk, and Dark_AleX. If anyone
94+
else thinks they deserve some credit, let me know. :)
95+
96+
Chilly Willy's email: [email protected]
97+
Chilly Willy's Ice Flow: http://groups.google.com/group/chilly-willys-ice-flow/?hl=en

src/IdStorage.S

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.set noreorder
2+
3+
#include "pspstub.s"
4+
5+
STUB_START "IdStorage",0x40090000,0x00040005
6+
STUB_FUNC 0xBE861F44,ReadKey
7+
STUB_FUNC 0x5E4510CC,WriteKey
8+
STUB_FUNC 0x971C5683,CreateKey
9+
STUB_FUNC 0x3E808F59,DeleteKey
10+
STUB_END

src/icon0.png

18.2 KB
Loading

src/idstorageprx/IdStorage.S

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.set noreorder
2+
3+
#include "pspstub.s"
4+
5+
STUB_START "IdStorage",0x40090000,0x00040005
6+
STUB_FUNC 0xBE861F44,ReadKey
7+
STUB_FUNC 0x5E4510CC,WriteKey
8+
STUB_FUNC 0x971C5683,CreateKey
9+
STUB_FUNC 0x3E808F59,DeleteKey
10+
STUB_END

src/idstorageprx/Makefile

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
TARGET = idstorage
2+
OBJS = main.o
3+
4+
INCDIR =
5+
CFLAGS = -O2 -G0 -Wall
6+
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
7+
ASFLAGS = $(CFLAGS)
8+
9+
BUILD_PRX = 1
10+
PRX_EXPORTS = idstorage.exp
11+
12+
USE_KERNEL_LIBC=1
13+
USE_KERNEL_LIBS=1
14+
15+
LIBDIR =
16+
LDFLAGS = -mno-crt0 -nostartfiles
17+
LIBS = -lpspkernel
18+
19+
20+
PSPSDK=$(shell psp-config --pspsdk-path)
21+
include $(PSPSDK)/lib/build.mak

src/idstorageprx/idstorage.exp

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Define the exports for the prx
2+
PSP_BEGIN_EXPORTS
3+
4+
# These four lines are mandatory (although you can add other functions like module_stop)
5+
# syslib is a psynonym for the single mandatory export.
6+
PSP_EXPORT_START(syslib, 0, 0x8000)
7+
PSP_EXPORT_FUNC_HASH(module_start)
8+
PSP_EXPORT_VAR_HASH(module_info)
9+
PSP_EXPORT_END
10+
11+
PSP_EXPORT_START(IdStorage, 0, 0x4001)
12+
PSP_EXPORT_FUNC(ReadKey)
13+
PSP_EXPORT_FUNC(WriteKey)
14+
PSP_EXPORT_FUNC(CreateKey)
15+
PSP_EXPORT_FUNC(DeleteKey)
16+
PSP_EXPORT_END
17+
18+
PSP_END_EXPORTS

src/idstorageprx/main.c

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
#include <pspsdk.h>
2+
#include <pspkernel.h>
3+
#include <pspidstorage.h>
4+
#include <string.h>
5+
6+
PSP_MODULE_INFO("IdStorage", 0x1006, 1, 2);
7+
PSP_MAIN_THREAD_ATTR(0);
8+
9+
int ReadKey(int key, char *buffer)
10+
{
11+
int err;
12+
u32 k1;
13+
14+
k1 = pspSdkSetK1(0);
15+
16+
memset(buffer, 0, 512);
17+
err = sceIdStorageReadLeaf(key, buffer);
18+
19+
pspSdkSetK1(k1);
20+
21+
return err;
22+
}
23+
24+
int WriteKey(int key, char *buffer)
25+
{
26+
int err;
27+
u32 k1;
28+
char buffer2[512];
29+
30+
k1 = pspSdkSetK1(0);
31+
32+
err = sceIdStorageReadLeaf(key, buffer2);
33+
if (err < 0)
34+
sceIdStorageCreateLeaf(key); /* key probably missing, make it */
35+
36+
err = sceIdStorageWriteLeaf(key, buffer);
37+
sceIdStorageFlush();
38+
39+
pspSdkSetK1(k1);
40+
41+
return err;
42+
}
43+
44+
int CreateKey(int key)
45+
{
46+
int err;
47+
u32 k1;
48+
49+
k1 = pspSdkSetK1(0);
50+
51+
err = sceIdStorageCreateLeaf(key);
52+
sceIdStorageFlush();
53+
54+
pspSdkSetK1(k1);
55+
56+
return err;
57+
}
58+
59+
int DeleteKey(int key)
60+
{
61+
int err;
62+
u32 k1;
63+
64+
k1 = pspSdkSetK1(0);
65+
66+
err = sceIdStorageDeleteLeaf(key);
67+
sceIdStorageFlush();
68+
69+
pspSdkSetK1(k1);
70+
71+
return err;
72+
}
73+
74+
int module_start(SceSize args, void *argp)
75+
{
76+
return 0;
77+
}
78+
79+
int module_stop()
80+
{
81+
return 0;
82+
}

0 commit comments

Comments
 (0)