Skip to content

Commit

Permalink
add cdda enabler code
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseAaronLopezGarcia committed Jul 23, 2023
1 parent 63e1595 commit 5d61360
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
3 changes: 2 additions & 1 deletion core/compat/pentazemin/imports.S
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
IMPORT_START "SystemCtrlPrivate",0x00090000
IMPORT_FUNC "SystemCtrlPrivate",0x5D7817CF,msstorCacheInit
IMPORT_FUNC "SystemCtrlPrivate",0xBC7554DF,strcasecmp
IMPORT_FUNC "SystemCtrlPrivate",0xAC7554DF,strncasecmp
IMPORT_FUNC "SystemCtrlPrivate",0xAC7554DF,strncasecmp
IMPORT_FUNC "SystemCtrlPrivate",0x77E68D5F,sctrlHENSetPluginHandler
2 changes: 1 addition & 1 deletion core/compat/pentazemin/syspatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ int pluginHandler(const char* path, int modid){
SceModule2* mod = sceKernelFindModuleByUID(modid);

static char* forbidden_plugins[] = {
"CDDA Enabler", "popsloader",
"popsloader", "CDDA Enabler",
};

for (int i=0; i<NELEMS(forbidden_plugins); i++){
Expand Down
17 changes: 17 additions & 0 deletions core/compat/vita/popspatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,21 @@ void patchPspPopsSpu(SceModule2 * mod)
unsigned int text_addr = mod->text_addr;
// Replace Media Engine SPU Background Thread Starter
int res = hookImportByNID(mod, "sceMeAudio", 0xDE630CD2, _sceMeAudio_DE630CD2);

// enable CDDA
for (u32 i = 0; i < mod->text_size; i += 4)
{
u32 addr = mod->text_addr + i;

/* Fix index length */
if ((_lw(addr) == 0x14C00014 && _lw(addr + 4) == 0x24E2FFFF) ||
(_lw(addr) == 0x14A00014 && _lw(addr + 4) == 0x24C2FFFF))
{
_sh(0x1000, addr + 2);
_sh(0, addr + 4);
break;
}
}
//_sh(0x1000, text_addr + 0x0001B17C + 2);
//_sh(0, text_addr + 0x0001B17C + 4);
}

0 comments on commit 5d61360

Please sign in to comment.