Skip to content

Commit c993d5a

Browse files
authored
Merge pull request #336 from JoseAaronLopezGarcia/master
Add missing functions
2 parents 64b432d + e6eabf3 commit c993d5a

File tree

10 files changed

+43
-14
lines changed

10 files changed

+43
-14
lines changed

src/base/build.mak

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,10 @@ ifndef PSP_EBOOT_ICON1
102102
PSP_EBOOT_ICON1 = NULL
103103
endif
104104

105-
ifndef PSP_EBOOT_UNKPNG
106-
PSP_EBOOT_UNKPNG = NULL
105+
ifdef PSP_EBOOT_UNKPNG
106+
PSP_EBOOT_PIC0 = $(PSP_EBOOT_UNKPNG)
107+
else ifndef PSP_EBOOT_PIC0
108+
PSP_EBOOT_PIC0 = NULL
107109
endif
108110

109111
ifndef PSP_EBOOT_PIC1
@@ -143,15 +145,15 @@ kxploit: $(TARGET).elf $(PSP_EBOOT_SFO)
143145
$(STRIP) $(TARGET).elf -o $(TARGET)/$(PSP_EBOOT)
144146
mkdir -p "$(TARGET)%"
145147
$(PACK_PBP) "$(TARGET)%/$(PSP_EBOOT)" $(PSP_EBOOT_SFO) $(PSP_EBOOT_ICON) \
146-
$(PSP_EBOOT_ICON1) $(PSP_EBOOT_UNKPNG) $(PSP_EBOOT_PIC1) \
148+
$(PSP_EBOOT_ICON1) $(PSP_EBOOT_PIC0) $(PSP_EBOOT_PIC1) \
147149
$(PSP_EBOOT_SND0) NULL $(PSP_EBOOT_PSAR)
148150

149151
SCEkxploit: $(TARGET).elf $(PSP_EBOOT_SFO)
150152
mkdir -p "__SCE__$(TARGET)"
151153
$(STRIP) $(TARGET).elf -o __SCE__$(TARGET)/$(PSP_EBOOT)
152154
mkdir -p "%__SCE__$(TARGET)"
153155
$(PACK_PBP) "%__SCE__$(TARGET)/$(PSP_EBOOT)" $(PSP_EBOOT_SFO) $(PSP_EBOOT_ICON) \
154-
$(PSP_EBOOT_ICON1) $(PSP_EBOOT_UNKPNG) $(PSP_EBOOT_PIC1) \
156+
$(PSP_EBOOT_ICON1) $(PSP_EBOOT_PIC0) $(PSP_EBOOT_PIC1) \
155157
$(PSP_EBOOT_SND0) NULL $(PSP_EBOOT_PSAR)
156158

157159
ifeq ($(NO_FIXUP_IMPORTS), 1)
@@ -176,13 +178,13 @@ ifeq ($(ENCRYPT), 1)
176178
- $(ENC) $(TARGET).prx $(TARGET).prx
177179
endif
178180
$(PACK_PBP) $(PSP_EBOOT) $(PSP_EBOOT_SFO) $(PSP_EBOOT_ICON) \
179-
$(PSP_EBOOT_ICON1) $(PSP_EBOOT_UNKPNG) $(PSP_EBOOT_PIC1) \
181+
$(PSP_EBOOT_ICON1) $(PSP_EBOOT_PIC0) $(PSP_EBOOT_PIC1) \
180182
$(PSP_EBOOT_SND0) $(TARGET).prx $(PSP_EBOOT_PSAR)
181183
else
182184
$(PSP_EBOOT): $(TARGET).elf $(PSP_EBOOT_SFO)
183185
$(STRIP) $(TARGET).elf -o $(TARGET)_strip.elf
184186
$(PACK_PBP) $(PSP_EBOOT) $(PSP_EBOOT_SFO) $(PSP_EBOOT_ICON) \
185-
$(PSP_EBOOT_ICON1) $(PSP_EBOOT_UNKPNG) $(PSP_EBOOT_PIC1) \
187+
$(PSP_EBOOT_ICON1) $(PSP_EBOOT_PIC0) $(PSP_EBOOT_PIC1) \
186188
$(PSP_EBOOT_SND0) $(TARGET)_strip.elf $(PSP_EBOOT_PSAR)
187189
-rm -f $(TARGET)_strip.elf
188190
endif

src/kernel/pspidstorage.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ int sceIdStorageIsReadOnly(void);
5050
/** sceIdStorageFlush() - Finalizes a write */
5151
int sceIdStorageFlush(void);
5252

53+
int sceIdStorageCreateLeaf(unsigned int leafid);
54+
55+
int sceIdStorageCreateAtomicLeaves(u16 *leaves, int n);
56+
57+
int sceIdStorageFormat();
58+
59+
int sceIdStorageUnformat();
60+
5361
/**@}*/
5462

5563
#ifdef __cplusplus

src/kernel/pspsyscon.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ int sceSysconGetPolestarVersion(int* version);
9191
*/
9292
int sceSysconGetTimeStamp(s8 *timeStamp);
9393

94+
int sceSysconReceiveSetParam(int n, u8 *buf);
95+
9496
/**@}*/
9597

9698
#ifdef __cplusplus

src/kernel/pspsysreg.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ int sceSysregMeBusClockDisable(void);
7373
*/
7474
int sceSysregGetTachyonVersion(void);
7575

76+
int sceSysregKirkBusClockEnable(void);
77+
78+
int sceSysregAtaBusClockEnable(void);
79+
7680
/**@}*/
7781

7882
#ifdef __cplusplus

src/kernel/sceIdStorage_driver.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
IMPORT_FUNC "sceIdStorage_driver",0x2C97AB36,sceIdStorageDeleteLeaf
4949
#endif
5050
#ifdef F_sceIdStorage_driver_0015
51-
IMPORT_FUNC "sceIdStorage_driver",0x99ACCB71,sceIdStorage_driver_99ACCB71
51+
IMPORT_FUNC "sceIdStorage_driver",0x99ACCB71,sceIdStorageCreateAtomicLeaves
5252
#endif
5353
#ifdef F_sceIdStorage_driver_0016
5454
IMPORT_FUNC "sceIdStorage_driver",0x37833CB8,sceIdStorage_driver_37833CB8

src/nand/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ CPPFLAGS = -I$(top_srcdir)/src/base -I$(top_srcdir)/src/kernel
1010
CFLAGS = @PSPSDK_CFLAGS@
1111
CCASFLAGS = $(CFLAGS)
1212

13-
NAND_DRIVER_OBJS = sceNand_driver_0000.o sceNand_driver_0001.o sceNand_driver_0002.o sceNand_driver_0003.o sceNand_driver_0004.o sceNand_driver_0005.o sceNand_driver_0006.o sceNand_driver_0007.o sceNand_driver_0008.o sceNand_driver_0009.o sceNand_driver_0010.o sceNand_driver_0011.o sceNand_driver_0012.o sceNand_driver_0013.o sceNand_driver_0014.o sceNand_driver_0015.o sceNand_driver_0016.o sceNand_driver_0017.o sceNand_driver_0018.o sceNand_driver_0019.o sceNand_driver_0020.o sceNand_driver_0021.o sceNand_driver_0022.o sceNand_driver_0023.o sceNand_driver_0024.o sceNand_driver_0025.o sceNand_driver_0026.o sceNand_driver_0027.o sceNand_driver_0028.o sceNand_driver_0029.o sceNand_driver_0030.o sceNand_driver_0031.o sceNand_driver_0032.o sceNand_driver_0033.o sceNand_driver_0034.o sceNand_driver_0035.o sceNand_driver_0036.o sceNand_driver_0037.o sceNand_driver_0038.o sceNand_driver_0039.o
13+
NAND_DRIVER_OBJS = sceNand_driver_0000.o sceNand_driver_0001.o sceNand_driver_0002.o sceNand_driver_0003.o sceNand_driver_0004.o sceNand_driver_0005.o sceNand_driver_0006.o sceNand_driver_0007.o sceNand_driver_0008.o sceNand_driver_0009.o sceNand_driver_0010.o sceNand_driver_0011.o sceNand_driver_0012.o sceNand_driver_0013.o sceNand_driver_0014.o sceNand_driver_0015.o sceNand_driver_0016.o sceNand_driver_0017.o sceNand_driver_0018.o sceNand_driver_0019.o sceNand_driver_0020.o sceNand_driver_0021.o sceNand_driver_0022.o sceNand_driver_0023.o sceNand_driver_0024.o sceNand_driver_0025.o sceNand_driver_0026.o sceNand_driver_0027.o sceNand_driver_0028.o sceNand_driver_0029.o sceNand_driver_0030.o sceNand_driver_0031.o sceNand_driver_0032.o sceNand_driver_0033.o sceNand_driver_0034.o sceNand_driver_0035.o sceNand_driver_0036.o sceNand_driver_0037.o sceNand_driver_0038.o sceNand_driver_0039.o sceNand_driver_0040.o
1414

1515
libpspnandincludedir = @PSPSDK_INCLUDEDIR@
1616
libpspnandinclude_HEADERS = pspnand_driver.h

src/nand/pspnand_driver.h

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,22 @@ int sceNandReadId(void *buf, SceSize size);
3333

3434
int sceNandReadPages(u32 ppn, void *buf, void *buf2, u32 count);
3535

36+
int sceNandReadPagesRawAll(u32 ppn, void* buf, void* spare, u32 count);
37+
3638
/*
3739
// sceNandWritePages
3840
// sceNandReadAccess
39-
// sceNandWriteAccess
40-
// sceNandEraseBlock
41-
// sceNandReadExtraOnly
4241
// sceNandCalcEcc
4342
// sceNandVerifyEcc
4443
// sceNandCollectEcc
4544
*/
4645

46+
int sceNandEraseBlock(u32 ppn);
47+
48+
int sceNandWriteAccess(u32 ppn, void *buf, void *spare, int, unsigned int);
49+
50+
int sceNandReadExtraOnly(u32 ppn, void *buf, int);
51+
4752
int sceNandGetPageSize(void);
4853

4954
int sceNandGetPagesPerBlock(void);
@@ -52,16 +57,18 @@ int sceNandGetTotalBlocks(void);
5257

5358
/*
5459
// sceNandWriteBlock
55-
// sceNandWriteBlockWithVerify
5660
*/
5761

62+
int sceNandWriteBlockWithVerify(u32 ppn, void *buf, void *spare);
63+
5864
int sceNandReadBlockWithRetry(u32 ppn, void *buf, void *buf2);
5965

6066
/*
6167
// sceNandVerifyBlockWithRetry
62-
// sceNandEraseBlockWithRetry
6368
*/
6469

70+
int sceNandEraseBlockWithRetry(u32 ppn);
71+
6572
int sceNandIsBadBlock(u32 ppn);
6673

6774
/*

src/nand/sceNand_driver.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,6 @@
122122
#ifdef F_sceNand_driver_0039
123123
IMPORT_FUNC "sceNand_driver",0x9B2AC433,sceNandTestBlock
124124
#endif
125+
#ifdef F_sceNand_driver_0040
126+
IMPORT_FUNC "sceNand_driver",0xC478C1DE,sceNandReadPagesRawAll
127+
#endif

src/power/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ CPPFLAGS = -I$(top_srcdir)/src/base -I$(top_srcdir)/src/kernel
1010
CFLAGS = @PSPSDK_CFLAGS@
1111
CCASFLAGS = $(CFLAGS)
1212

13-
POWER_OBJS = scePower_0000.o scePower_0001.o scePower_0002.o scePower_0003.o scePower_0004.o scePower_0005.o scePower_0006.o scePower_0007.o scePower_0008.o scePower_0009.o scePower_0010.o scePower_0011.o scePower_0012.o scePower_0013.o scePower_0014.o scePower_0015.o scePower_0016.o scePower_0017.o scePower_0018.o scePower_0019.o scePower_0020.o scePower_0021.o scePower_0022.o scePower_0023.o scePower_0024.o scePower_0025.o scePower_0026.o scePower_0027.o scePower_0028.o scePower_0029.o scePower_0030.o scePower_0031.o scePower_0032.o scePower_0033.o scePower_0034.o scePower_0035.o scePower_0036.o scePower_0037.o scePower_0038.o scePower_0039.o scePower_0040.o scePower_0041.o scePower_0042.o scePower_0043.o scePower_0044.o scePower_0045.o scePower_0046.o
13+
POWER_OBJS = scePower_0000.o scePower_0001.o scePower_0002.o scePower_0003.o scePower_0004.o scePower_0005.o scePower_0006.o scePower_0007.o scePower_0008.o scePower_0009.o scePower_0010.o scePower_0011.o scePower_0012.o scePower_0013.o scePower_0014.o scePower_0015.o scePower_0016.o scePower_0017.o scePower_0018.o scePower_0019.o scePower_0020.o scePower_0021.o scePower_0022.o scePower_0023.o scePower_0024.o scePower_0025.o scePower_0026.o scePower_0027.o scePower_0028.o scePower_0029.o scePower_0030.o scePower_0031.o scePower_0032.o scePower_0033.o scePower_0034.o scePower_0035.o scePower_0036.o scePower_0037.o scePower_0038.o scePower_0039.o scePower_0040.o scePower_0041.o scePower_0042.o scePower_0043.o scePower_0044.o scePower_0045.o scePower_0046.o scePower_0047.o
1414

1515
POWERDRIVER_OBJS= scePower_driver_0000.o scePower_driver_0001.o scePower_driver_0002.o scePower_driver_0003.o scePower_driver_0004.o scePower_driver_0005.o scePower_driver_0006.o scePower_driver_0007.o scePower_driver_0008.o scePower_driver_0009.o scePower_driver_0010.o scePower_driver_0011.o scePower_driver_0012.o scePower_driver_0013.o scePower_driver_0014.o scePower_driver_0015.o scePower_driver_0016.o scePower_driver_0017.o scePower_driver_0018.o scePower_driver_0019.o scePower_driver_0020.o scePower_driver_0021.o scePower_driver_0022.o scePower_driver_0023.o scePower_driver_0024.o scePower_driver_0025.o scePower_driver_0026.o scePower_driver_0027.o scePower_driver_0028.o scePower_driver_0029.o scePower_driver_0030.o scePower_driver_0031.o scePower_driver_0032.o scePower_driver_0033.o scePower_driver_0034.o scePower_driver_0035.o scePower_driver_0036.o scePower_driver_0037.o scePower_driver_0038.o scePower_driver_0039.o scePower_driver_0040.o scePower_driver_0041.o scePower_driver_0042.o scePower_driver_0043.o scePower_driver_0044.o scePower_driver_0045.o scePower_driver_0046.o scePower_driver_0047.o scePower_driver_0048.o scePower_driver_0049.o scePower_driver_0050.o scePower_driver_0051.o scePower_driver_0052.o scePower_driver_0053.o scePower_driver_0054.o scePower_driver_0055.o scePower_driver_0056.o scePower_driver_0057.o scePower_driver_0058.o scePower_driver_0059.o scePower_driver_0060.o scePower_driver_0061.o scePower_driver_0062.o scePower_driver_0063.o scePower_driver_0064.o
1616

src/power/scePower.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,6 @@
143143
#ifdef F_scePower_0046
144144
IMPORT_FUNC "scePower",0x737486F2,scePowerSetClockFrequency
145145
#endif
146+
#ifdef F_scePower_0047
147+
IMPORT_FUNC "scePower",0x0442D852,scePowerRequestColdReset
148+
#endif

0 commit comments

Comments
 (0)