Skip to content

Commit

Permalink
Release v3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOfficialFloW committed Apr 17, 2017
1 parent 6fd9286 commit 00ac395
Show file tree
Hide file tree
Showing 14 changed files with 2,663 additions and 2,634 deletions.
2 changes: 1 addition & 1 deletion adrenaline_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#define ADRENALINE_VERSION_MAJOR 3
#define ADRENALINE_VERSION_MINOR 1
#define ADRENALINE_VERSION (ADRENALINE_VERSION_MAJOR << 16) | ADRENALINE_VERSION_MINOR
#define ADRENALINE_VERSION ((ADRENALINE_VERSION_MAJOR << 16) | ADRENALINE_VERSION_MINOR)

#define SCE_PSPEMU_FLASH0_PACKAGE_SIZE 0x920000
#define SCE_PSPEMU_EXTRA_MEMORY 0x8B000000
Expand Down
Binary file modified cef/flash0/kd/popcorn.prx
Binary file not shown.
Binary file modified cef/flash0/kd/systemctrl.prx
Binary file not shown.
Binary file modified cef/flash0/kd/vshctrl.prx
Binary file not shown.
Binary file modified cef/flash0/vsh/module/recovery.prx
Binary file not shown.
Binary file modified cef/flash0/vsh/module/satelite.prx
Binary file not shown.
2 changes: 1 addition & 1 deletion cef/systemctrl/io_patch.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ int IoDevctlReinsertMs() {
if (!mod)
return -1;

int (* MsfsSysEventHandler)(int ev_id, char *ev_name, void *param, int *result) = mod->text_addr + 0x150;
int (* MsfsSysEventHandler)(int ev_id, char *ev_name, void *param, int *result) = (void *)mod->text_addr + 0x150;

// Perform a MS reinsertion
static int ev_ids[] = { 0x102, 0x400, 0x10000, 0x100000 };
Expand Down
23 changes: 20 additions & 3 deletions cef/systemctrl/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,25 @@ int bus_list[] = { 0, 10, 37, 50, 66, 111, 133, 150, 166 };

#define N_CPU (sizeof(cpu_list) / sizeof(int))

int RestoreSound() {
SceModule2 *mod = sceKernelFindModuleByName661("sceAudio_Driver");
if (!mod)
return -1;

int (* AudioSysEventHandler)(int ev_id, char *ev_name, void *param, int *result) = (void *)mod->text_addr + 0x179C;
AudioSysEventHandler(0x200, NULL, NULL, NULL);
AudioSysEventHandler(0x100000, NULL, NULL, NULL);

return 0;
}

void OnSystemStatusIdle() {
SceAdrenaline *adrenaline = (SceAdrenaline *)ADRENALINE_ADDRESS;

// Restore sound after exiting from pops mode
if (adrenaline->pops_mode)
RestoreSound();

initAdrenalineInfo();

PatchVolatileMemBug();
Expand All @@ -245,10 +263,9 @@ void OnSystemStatusIdle() {
}

// Set fake framebuffer so that cwcheat can be displayed
SceAdrenaline *adrenaline = (SceAdrenaline *)ADRENALINE_ADDRESS;
if (adrenaline->pops_mode) {
sceDisplaySetFrameBuf661((void *)0x0A000000, 512, PSP_DISPLAY_PIXEL_FORMAT_8888, PSP_DISPLAY_SETBUF_NEXTFRAME);
memset(0xAA000000, 0, 16 * 1024 * 1024);
sceDisplaySetFrameBuf661((void *)0x0A000000, PSP_SCREEN_LINE, PSP_DISPLAY_PIXEL_FORMAT_8888, PSP_DISPLAY_SETBUF_NEXTFRAME);
memset(0xAA000000, 0, SCE_PSPEMU_FRAMEBUFFER_SIZE);
}
}

Expand Down
47 changes: 31 additions & 16 deletions cef/systemctrl/sysmodpatches.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,22 +213,9 @@ int SetIdleCallbackPatched(int flags) {
return 0;
}

int RestoreSound() {
SceModule2 *mod = sceKernelFindModuleByName661("sceAudio_Driver");
if (!mod)
return -1;

int (* AudioSysEventHandler)(int ev_id, char *ev_name, void *param, int *result) = mod->text_addr + 0x179C;
AudioSysEventHandler(0x200, NULL, NULL, NULL);
AudioSysEventHandler(0x100000, NULL, NULL, NULL);

return 0;
}

int exit_callback(int arg1, int arg2, void *common) {
sceKernelSuspendAllUserThreads();
SendAdrenalineCmd(ADRENALINE_VITA_CMD_RESUME_POPS);
RestoreSound();

static u32 vshmain_args[0x100];
memset(vshmain_args, 0, sizeof(vshmain_args));
Expand Down Expand Up @@ -272,19 +259,39 @@ SceUID SetupCallbacks() {
return thid;
}

int pause = 0;
SceUID pops_semaid = -1;

int sceKernelWaitEventFlagPatched(int evid, u32 bits, u32 wait, u32 *outBits, SceUInt *timeout) {
int res = sceKernelWaitEventFlag(evid, bits, wait, outBits, timeout);

if (*outBits & 0x1) {
SendAdrenalineCmd(ADRENALINE_VITA_CMD_PAUSE_POPS);
SendAdrenalineCmd(ADRENALINE_VITA_CMD_SET_FRAMEBUF);
pause = 1;
sceKernelSignalSema(pops_semaid, 1);
} else if (*outBits & 0x2) {
SendAdrenalineCmd(ADRENALINE_VITA_CMD_RESUME_POPS);
pause = 0,
sceKernelSignalSema(pops_semaid, 1);
}

return res;
}

int adrenaline_pops() {
while (1) {
// Wait for semaphore signal
sceKernelWaitSema(pops_semaid, 1, NULL);

if (pause) {
SendAdrenalineCmd(ADRENALINE_VITA_CMD_PAUSE_POPS);
SendAdrenalineCmd(ADRENALINE_VITA_CMD_SET_FRAMEBUF);
} else {
SendAdrenalineCmd(ADRENALINE_VITA_CMD_RESUME_POPS);
}
}

return 0;
}

void PatchImposeDriver(u32 text_addr) {
// Hide volume bar
_sw(0, text_addr + 0x4AEC);
Expand All @@ -295,6 +302,14 @@ void PatchImposeDriver(u32 text_addr) {
SetupCallbacks();
MAKE_DUMMY_FUNCTION(text_addr + 0x91C8, PSP_INIT_KEYCONFIG_GAME);
REDIRECT_FUNCTION(text_addr + 0x92B0, sceKernelWaitEventFlagPatched);

// Create pops semaphore
pops_semaid = sceKernelCreateSema("", 0, 0, 1, NULL);

// Create and start pops thread
SceUID thid = sceKernelCreateThread("adrenaline_pops", adrenaline_pops, 0x10, 0x4000, 0, NULL);
if (thid >= 0)
sceKernelStartThread(thid, 0, NULL);
}

ClearCaches();
Expand Down
14 changes: 7 additions & 7 deletions user/files/popcorn.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ static unsigned char popcorn[] __attribute__((aligned(16))) = {
0x00, 0x00, 0x00, 0x00, 0x34, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x07, 0x03, 0x02, 0x00, 0x00, 0x00,
0x46, 0xf7, 0xda, 0xce, 0x39, 0xa7, 0xe2, 0x95, 0x60, 0xc6, 0x0e, 0x6f, 0xbf, 0x97, 0x5b, 0xfe,
0x79, 0x49, 0x54, 0x7c, 0x2e, 0xab, 0xdd, 0x14, 0x4c, 0x64, 0x0d, 0xd8, 0xfc, 0x07, 0xb5, 0xe9,
0xb9, 0x2d, 0xf9, 0x7a, 0x92, 0x59, 0x0f, 0x04, 0x58, 0xdc, 0xd6, 0xfa, 0xff, 0x29, 0x1a, 0x13,
0x52, 0x80, 0x0e, 0x53, 0xff, 0x00, 0xfd, 0xe6, 0x19, 0xbb, 0xe1, 0xf3, 0xbd, 0x15, 0xde, 0x6b,
0xf6, 0x51, 0xf7, 0xba, 0x49, 0xb7, 0x6e, 0x76, 0xa6, 0x4c, 0xc4, 0xf6, 0x3b, 0xdf, 0x23, 0x90,
0x6c, 0x0e, 0x02, 0x9f, 0xeb, 0xd4, 0xf8, 0xdd, 0xe3, 0xcb, 0x3b, 0xba, 0x98, 0x8c, 0xf9, 0xa9,
0xc8, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x8c, 0x57, 0x22, 0x1e, 0xda, 0xaa, 0x3b, 0x95, 0x17, 0x8e, 0xdc, 0x47, 0x65, 0x2e, 0xce, 0x41,
0xca, 0x0c, 0xbf, 0xe1, 0xb1, 0x43, 0x80, 0x41, 0xc3, 0x6f, 0x76, 0x57, 0x47, 0x70, 0x8a, 0xfb,
0xf0, 0xda, 0xda, 0xda, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4, 0xad, 0x19, 0x68,
0x96, 0x8d, 0x66, 0x55, 0xbd, 0x2f, 0x74, 0xad, 0x8b, 0x4f, 0x3a, 0x8c, 0xc2, 0xa3, 0xd1, 0xb6,
0x64, 0xc0, 0x48, 0xfa, 0x6f, 0xbc, 0xc1, 0x83, 0xbd, 0x33, 0xdf, 0xed, 0xdb, 0xf5, 0x1f, 0xb7,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xb1, 0x07, 0xd6,
0x96, 0x8d, 0x66, 0x55, 0x58, 0x95, 0x7c, 0x72, 0x05, 0xe4, 0x02, 0xef, 0xc6, 0xfa, 0x89, 0x53,
0xef, 0xfd, 0xa1, 0x02, 0xb5, 0x5b, 0xc9, 0x57, 0x94, 0xc1, 0xde, 0xe7, 0x3a, 0x02, 0x06, 0xc2,
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xcd, 0x57, 0x7f, 0x68, 0x1b, 0xf7,
0x15, 0x7f, 0xba, 0x93, 0x64, 0x59, 0xf6, 0xc2, 0xb9, 0x51, 0x3b, 0xc1, 0x3c, 0x76, 0x47, 0x2e,
0xb6, 0x60, 0xc6, 0x88, 0x54, 0x05, 0x33, 0x0e, 0xa6, 0xc8, 0x3f, 0x62, 0x13, 0x79, 0x51, 0x63,
Expand Down
14 changes: 7 additions & 7 deletions user/files/recovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ static unsigned char recovery[] __attribute__((aligned(16))) = {
0x00, 0x00, 0x00, 0x00, 0x94, 0x04, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x05, 0x03, 0x04, 0x00, 0x00, 0x00,
0x16, 0x22, 0xa5, 0xbd, 0x34, 0x37, 0x66, 0xa7, 0xb5, 0xc3, 0xc1, 0x3e, 0x4b, 0x3c, 0x25, 0x30,
0x48, 0x03, 0xf4, 0x62, 0x25, 0x2c, 0xbd, 0xf3, 0x19, 0x5e, 0x0c, 0x85, 0xa1, 0x5d, 0x48, 0x98,
0x77, 0x98, 0x98, 0xad, 0x1a, 0x0b, 0x70, 0x03, 0x8c, 0xbb, 0xe6, 0xc4, 0x22, 0x97, 0xf5, 0x07,
0x9c, 0x5e, 0xd0, 0x06, 0xf1, 0x20, 0xda, 0xe6, 0xfe, 0x18, 0xab, 0x91, 0x7b, 0x6b, 0xa8, 0x95,
0x93, 0x3b, 0xdc, 0x8b, 0x01, 0x80, 0xa2, 0xb3, 0x16, 0x3b, 0xdc, 0x4d, 0xbd, 0x0d, 0xa3, 0xa5,
0xfd, 0xef, 0x90, 0xf3, 0x65, 0xfb, 0x82, 0xfa, 0x45, 0x07, 0xe9, 0xcb, 0x7b, 0x89, 0x94, 0xd1,
0x0c, 0x62, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x24, 0x28, 0xb9, 0x4d, 0x78, 0xc3, 0x25, 0xb7, 0xe5, 0x6f, 0x33, 0x98, 0x64, 0x94, 0x6e, 0x9a,
0x09, 0x4b, 0xa8, 0xe9, 0x93, 0x60, 0x05, 0xd2, 0x57, 0x43, 0x5d, 0xab, 0x69, 0x7b, 0x08, 0x34,
0xf0, 0x06, 0x7b, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x3c, 0xc6, 0xbc,
0xf2, 0xab, 0x55, 0x85, 0x47, 0xa7, 0x56, 0xe4, 0x85, 0x2c, 0xe3, 0x63, 0xf3, 0xb8, 0x48, 0x5e,
0x7c, 0x34, 0x05, 0xbe, 0xfa, 0x8c, 0xa1, 0xa2, 0x63, 0x0e, 0x26, 0x68, 0xb8, 0x54, 0x30, 0x23,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x44, 0x46, 0x89,
0xf2, 0xab, 0x55, 0x85, 0x12, 0xae, 0xc5, 0x76, 0x05, 0x15, 0x9a, 0x08, 0x4a, 0x62, 0x32, 0x4a,
0xd0, 0x1d, 0x36, 0x65, 0xf2, 0xfb, 0x9c, 0xd9, 0x1b, 0x66, 0xbc, 0x6d, 0xe2, 0xb0, 0xc6, 0x62,
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xec, 0xbd, 0x7f, 0x7c, 0x5c, 0xc5,
0x75, 0x37, 0x7c, 0xf6, 0xee, 0x4a, 0x5a, 0xcb, 0x32, 0xbe, 0x96, 0x17, 0xb3, 0x18, 0x03, 0x77,
0xad, 0x2b, 0x69, 0x63, 0x09, 0x7b, 0x65, 0x3b, 0x20, 0x78, 0xb6, 0x61, 0x91, 0x64, 0x23, 0x88,
Expand Down
14 changes: 7 additions & 7 deletions user/files/satelite.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ static unsigned char satelite[] __attribute__((aligned(16))) = {
0x00, 0x00, 0x00, 0x00, 0xc4, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x05, 0x03, 0x04, 0x00, 0x00, 0x00,
0xb4, 0x82, 0xb6, 0x4b, 0xd2, 0xcb, 0xed, 0xb1, 0x64, 0x31, 0x36, 0xec, 0x34, 0x51, 0x9c, 0xb8,
0xe5, 0xd9, 0xd0, 0xed, 0x32, 0x7c, 0xab, 0x25, 0x50, 0x50, 0x4c, 0xb6, 0xf7, 0xdb, 0x93, 0xed,
0x6e, 0xf6, 0xc4, 0x4f, 0xcf, 0x04, 0x1d, 0xe7, 0x24, 0x85, 0x83, 0xc0, 0xfe, 0x38, 0xe8, 0xed,
0x10, 0x5d, 0xf3, 0x6a, 0x9d, 0xf3, 0x04, 0xce, 0xdd, 0x7d, 0xc4, 0x85, 0xcd, 0xeb, 0xd3, 0xec,
0xc6, 0x87, 0x4f, 0x6c, 0x87, 0x93, 0x21, 0xc1, 0x11, 0x88, 0x00, 0xad, 0x9d, 0xcf, 0x39, 0x8a,
0x64, 0x72, 0x82, 0x8c, 0xb9, 0xda, 0xd2, 0xc0, 0xde, 0xec, 0x11, 0x96, 0xa4, 0xc8, 0xb0, 0x69,
0x4c, 0x10, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1f, 0x4a, 0xa0, 0x0c, 0xaf, 0xf9, 0x8a, 0x1b, 0x26, 0x34, 0x11, 0xd7, 0x2b, 0x5f, 0x69, 0x04,
0x65, 0xa7, 0xa0, 0xbc, 0x5c, 0xac, 0xa6, 0x47, 0x12, 0x27, 0x6a, 0x96, 0xcb, 0x0d, 0x6e, 0x87,
0xf0, 0x06, 0x7b, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0xd0, 0x3d, 0x6c,
0xf2, 0xab, 0x55, 0x85, 0xd7, 0x7e, 0x99, 0x6c, 0x41, 0x45, 0x8f, 0x69, 0x6d, 0x73, 0x5b, 0x5a,
0x18, 0x0d, 0xf0, 0x8c, 0xde, 0xd6, 0x07, 0x36, 0x9b, 0x9e, 0x0d, 0xcf, 0xa4, 0xed, 0x7c, 0x99,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x45, 0x5b, 0x51,
0xf2, 0xab, 0x55, 0x85, 0x96, 0x73, 0x77, 0x4d, 0x13, 0x4e, 0xea, 0xfb, 0x01, 0x87, 0x92, 0x90,
0x7d, 0x2a, 0x89, 0xce, 0x7a, 0xa2, 0xb9, 0x93, 0xd3, 0x28, 0x1b, 0x70, 0x9a, 0xc6, 0xdb, 0x79,
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe5, 0x59, 0x6f, 0x6c, 0x1b, 0xd9,
0x71, 0x9f, 0x5d, 0x52, 0xf2, 0xea, 0x8f, 0xe5, 0x95, 0x4e, 0x66, 0x58, 0xd7, 0xc9, 0x2d, 0x2f,
0x6b, 0x99, 0x31, 0x0c, 0x7b, 0x65, 0xe9, 0x14, 0x06, 0x20, 0x92, 0xb5, 0x44, 0x39, 0x74, 0x2a,
Expand Down
Loading

0 comments on commit 00ac395

Please sign in to comment.