Add Devkit Support
This commit is contained in:
parent
777a9129cc
commit
0506f90f53
26
app/main.c
26
app/main.c
|
@ -83,9 +83,11 @@ int getFileSize(const char *file) {
|
|||
void main() {
|
||||
|
||||
psvDebugScreenInit();
|
||||
if(vshSblAimgrIsDEX() == 0)
|
||||
|
||||
|
||||
if(vshSblAimgrIsCEX())
|
||||
{
|
||||
printf("This is not a testing kit . . . \n");
|
||||
printf("This is not a test/dev kit . . . \n");
|
||||
get_key();
|
||||
sceKernelExitProcess(0);
|
||||
}
|
||||
|
@ -229,8 +231,18 @@ void main() {
|
|||
|
||||
printf("Done, backup at pd0:/data and ux0:/data\n");
|
||||
|
||||
printf("Calculating PSTime: ");
|
||||
|
||||
if(vshSblAimgrIsTool())
|
||||
{
|
||||
unsigned int timestamp = *((unsigned int*)&startDate);
|
||||
printf("Updating CPRTC to %x\n",timestamp);
|
||||
ret = silSblPostSsMgrSetCpRtc(timestamp);
|
||||
sceRegMgrSetKeyInt("/CONFIG/DATE", "set_automatically", 0);
|
||||
printf("has ret 0x%x\n",ret);
|
||||
}
|
||||
else if(vshSblAimgrIsDEX())
|
||||
{
|
||||
printf("Calculating PSTime: ");
|
||||
unsigned long long int timestamp;
|
||||
memset(×tamp,0,sizeof(unsigned long long int));
|
||||
timestamp = *((unsigned int*)&startDate);
|
||||
|
@ -260,15 +272,17 @@ void main() {
|
|||
sceRegMgrSetKeyInt("/CONFIG/DATE", "set_automatically", 0);
|
||||
|
||||
printf("has ret 0x%x\n",ret);
|
||||
}
|
||||
|
||||
|
||||
if(ret == 0)
|
||||
{
|
||||
printf("\n\nYour PSVITA Testing Kit has been activated!\n");
|
||||
printf("\n\nYour PSVITA Test/Dev Kit has been activated!\n");
|
||||
printf("\n");
|
||||
printf("Deactivate by holding START + SELECT + PS + POWER\n\n");
|
||||
printf("Press any key to reboot console");
|
||||
printf("Press any key to turn off console");
|
||||
get_key();
|
||||
scePowerRequestColdReset();
|
||||
scePowerRequestSuspend();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
int silRtcSetCurrentTick(unsigned int timestamp1, unsigned int timestamp2);
|
||||
int silRtcSetCurrentNetworkTick(unsigned int timestamp1, unsigned int timestamp2);
|
||||
int silRtcSetCurrentSecureTick(unsigned int timestamp1, unsigned int timestamp2);
|
||||
int silSblPostSsMgrSetCpRtc(unsigned int timestamp);
|
|
@ -31,6 +31,7 @@ target_link_libraries(${PROJECT_NAME}
|
|||
SceDebugForDriver_stub
|
||||
SceSysmem_stub
|
||||
SceRtcForDriver_stub
|
||||
SceSblPostSsMgrForDriver_stub
|
||||
SceCpuForDriver_stub
|
||||
taihenForKernel_stub
|
||||
gcc
|
||||
|
@ -47,5 +48,6 @@ vita_create_stubs(${PROJECT_NAME}-stubs ${PROJECT_NAME} ${CMAKE_SOURCE_DIR}/expo
|
|||
install(DIRECTORY ${CMAKE_BINARY_DIR}/${PROJECT_NAME}-stubs/
|
||||
DESTINATION lib
|
||||
FILES_MATCHING PATTERN "*.a"
|
||||
|
||||
)
|
||||
|
||||
|
|
|
@ -13,3 +13,4 @@ kern_clockset:
|
|||
- ksilRtcSetCurrentSecureTick
|
||||
- ksilRtcSetCurrentNetworkTick
|
||||
- ksilRtcSetCurrentTick
|
||||
- ksilSblPostSsMgrSetCpRtc
|
|
@ -6,15 +6,14 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <vitasdk.h>
|
||||
#include <taihen.h>
|
||||
#include "rtc.h"
|
||||
|
||||
int ksilRtcSetCurrentTick(timestamp1,timestamp2)
|
||||
int ksilRtcSetCurrentTick(unsigned int timestamp1,unsigned int timestamp2)
|
||||
{
|
||||
unsigned int timestamp[2];
|
||||
|
||||
|
@ -24,7 +23,7 @@ int ksilRtcSetCurrentTick(timestamp1,timestamp2)
|
|||
return ksceRtcSetCurrentTick(timestamp);
|
||||
}
|
||||
|
||||
int ksilRtcSetCurrentNetworkTick(timestamp1,timestamp2)
|
||||
int ksilRtcSetCurrentNetworkTick(unsigned int timestamp1,unsigned int timestamp2)
|
||||
{
|
||||
unsigned int timestamp[2];
|
||||
|
||||
|
@ -34,7 +33,7 @@ int ksilRtcSetCurrentNetworkTick(timestamp1,timestamp2)
|
|||
return ksceRtcSetCurrentNetworkTick(timestamp);
|
||||
}
|
||||
|
||||
int ksilRtcSetCurrentSecureTick(timestamp1,timestamp2)
|
||||
int ksilRtcSetCurrentSecureTick(unsigned int timestamp1,unsigned int timestamp2)
|
||||
{
|
||||
unsigned int timestamp[2];
|
||||
|
||||
|
@ -44,6 +43,11 @@ int ksilRtcSetCurrentSecureTick(timestamp1,timestamp2)
|
|||
return ksceRtcSetCurrentSecureTick(timestamp);
|
||||
}
|
||||
|
||||
int ksilSblPostSsMgrSetCpRtc(unsigned int timestamp)
|
||||
{
|
||||
return ksceSblPostSsMgrSetCpRtc(timestamp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void _start() __attribute__ ((weak, alias ("module_start")));
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
int ksceRtcSetCurrentTick(unsigned int* timestamp);
|
||||
int ksceRtcSetCurrentNetworkTick(unsigned int* timestamp);
|
||||
int ksceRtcSetCurrentSecureTick(unsigned int* timestamp);
|
||||
|
||||
int ksceSblPostSsMgrSetCpRtc(unsigned int timestamp);
|
|
@ -0,0 +1,4 @@
|
|||
int ksilRtcSetCurrentTick(unsigned int timestamp1, unsigned int timestamp2);
|
||||
int ksilRtcSetCurrentNetworkTick(unsigned int timestamp1, unsigned int timestamp2);
|
||||
int ksilRtcSetCurrentSecureTick(unsigned int timestamp1, unsigned int timestamp2);
|
||||
int ksilSblPostSsMgrSetCpRtc(unsigned int timestamp);
|
|
@ -13,3 +13,4 @@ user_clockset:
|
|||
- silRtcSetCurrentNetworkTick
|
||||
- silRtcSetCurrentTick
|
||||
- silRtcSetCurrentSecureTick
|
||||
- silSblPostSsMgrSetCpRtc
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
int ksilRtcSetCurrentTick(unsigned int timestamp1, unsigned int timestamp2);
|
||||
int ksilRtcSetCurrentNetworkTick(unsigned int timestamp1, unsigned int timestamp2);
|
||||
int ksilRtcSetCurrentSecureTick(unsigned int timestamp1, unsigned int timestamp2);
|
||||
int ksilSblPostSsMgrSetCpRtc(unsigned int timestamp);
|
|
@ -5,23 +5,28 @@
|
|||
#include <psp2/kernel/modulemgr.h>
|
||||
#include <taihen.h>
|
||||
#include <vitasdk.h>
|
||||
#include "rtcUserBridge.h"
|
||||
#include "rtcKernelBridge.h"
|
||||
|
||||
int silRtcSetCurrentTick(timestamp1,timestamp2)
|
||||
int silRtcSetCurrentTick(unsigned int timestamp1, unsigned int timestamp2)
|
||||
{
|
||||
return ksilRtcSetCurrentTick(timestamp1,timestamp2);
|
||||
}
|
||||
|
||||
int silRtcSetCurrentNetworkTick(timestamp1,timestamp2)
|
||||
int silRtcSetCurrentNetworkTick(unsigned int timestamp1, unsigned int timestamp2)
|
||||
{
|
||||
return ksilRtcSetCurrentNetworkTick(timestamp1,timestamp2);
|
||||
}
|
||||
|
||||
int silRtcSetCurrentSecureTick(timestamp1,timestamp2)
|
||||
int silRtcSetCurrentSecureTick(unsigned int timestamp1, unsigned int timestamp2)
|
||||
{
|
||||
return ksilRtcSetCurrentSecureTick(timestamp1,timestamp2);
|
||||
}
|
||||
|
||||
int silSblPostSsMgrSetCpRtc(unsigned int timestamp)
|
||||
{
|
||||
return ksilSblPostSsMgrSetCpRtc(timestamp);
|
||||
}
|
||||
|
||||
|
||||
int module_start(SceSize argc, const void *args) {
|
||||
return SCE_KERNEL_START_SUCCESS;
|
||||
|
|
Loading…
Reference in New Issue