Good news if your a fan of retro emulation and have a jailbroken PS3, as developer @OsirisX has made a bit of a breakthrough for emulation on the PS3. Following OsirisX other emulation release's / contributions like the unofficial PS4 port of RetroArch and the progress of the RetroArch Psl1ght PS3 port The developer is now tackling taking on a new adventure on the PS3.
One of the issues on the PS3, has always been the supporting of later generations (the 3d era+) of emulation. While we have seen PS1 / PSP / PS2 emulated on the PS3, they are using the unlocked system's firmware emulator's from Sony,. homebrew emulation has not achieved the same success, without support of a dynarec and the emulators re-written to support such a dynarec on the PS3, user's have been stuck side-scrolling in their Retro experiances. We seen an early example years ago when developer IngPeria released a PoC PS1 emulator (not Sony's firmware one) with dynarec support, but not many other developer's took on the task for any other emulators.
Now in late 2022 things are looking brighter (at least for one emulator) as @OsirisX added support to the PSMAPI lib for "page freeing" (helping app not crash on exit) this has also helped the developer add support for a dynarec with the libretro (retroarch) core PicoDrive. This is fascinating news as there has not been a homebrew emulator to support a dynarec on the PS3 and this will be the first time we will have the ability for a working and playable Sega 32x emulator with imrovements to Sega CD as well. There are some changes needed for Cobra and Mamba developer's @aldostools (Mamba) and @Evilnat (Cobra) who maintain the current projects will have to adopt the lasted changes to PS3MAPI, This is still an evolving project as @OsirisX awaits implementation into Cobra / Mamba payloads. Stay Tuned...
One of the issues on the PS3, has always been the supporting of later generations (the 3d era+) of emulation. While we have seen PS1 / PSP / PS2 emulated on the PS3, they are using the unlocked system's firmware emulator's from Sony,. homebrew emulation has not achieved the same success, without support of a dynarec and the emulators re-written to support such a dynarec on the PS3, user's have been stuck side-scrolling in their Retro experiances. We seen an early example years ago when developer IngPeria released a PoC PS1 emulator (not Sony's firmware one) with dynarec support, but not many other developer's took on the task for any other emulators.
Now in late 2022 things are looking brighter (at least for one emulator) as @OsirisX added support to the PSMAPI lib for "page freeing" (helping app not crash on exit) this has also helped the developer add support for a dynarec with the libretro (retroarch) core PicoDrive. This is fascinating news as there has not been a homebrew emulator to support a dynarec on the PS3 and this will be the first time we will have the ability for a working and playable Sega 32x emulator with imrovements to Sega CD as well. There are some changes needed for Cobra and Mamba developer's @aldostools (Mamba) and @Evilnat (Cobra) who maintain the current projects will have to adopt the lasted changes to PS3MAPI, This is still an evolving project as @OsirisX awaits implementation into Cobra / Mamba payloads. Stay Tuned...
-
Building on @TheRouLetteBoi's page_allocate additions in Mamba/Cobra, I've also added support for page freeing which fixes the issue where program crashes on exit. Any program that uses page_allocate will need to keep track of a page_table which is the kernel page address to user process page address mapping. See below code example of its usage that's based off of TheRouLetteBoi's and Crystal's example.
Code:#include <sys/process.h> #include <ps3mapi_ps3_lib.h> #define KB(n) (1024*n) #define MB(n) (1048576*n) char fret5[32] = {0xfb, 0xe1, 0xff, 0xf8, 0xf8, 0x21, 0xff, 0xc1, 0x7c, 0x3f, 0x0b, 0x78, 0x39, 0x20, 0x00, 0x05, 0x7d, 0x23, 0x4b, 0x78, 0x38, 0x3f, 0x00, 0x40, 0xeb, 0xe1, 0xff, 0xf8, 0x4e, 0x80, 0x00, 0x20}; uint64_t page_table[2]; int main(int argc, char *argv[]) { int ret = ps3mapi_page_allocate(sysProcessGetPid(), KB(650), PAGE_SIZE_AUTO, 0x2F, 1, page_table); // After ps3mapi_page_allocate return // page_table[0] holds program page_address mapping // page_table[1] holds kernel page_address allocation if (ret != 0) { printf("failed to allocate page\n"); return; } memcpy(page_table[0], fret5, sizeof(char)*32); int(*func)() = (int (*)())&page_table[0]; int result = func(); printf("fret5 result: %d\n", result); ps3mapi_process_page_free(sysProcessGetPid(), 0x2F, page_table); return 0; }
With some minor modifications to Retroarch's picodrive, I was able to get dynarec working which significantly sped up performance for 32x and Sega CD.
Star Wars Arcade runs at full speed no problem
Source code for these changes can be found below. Note that you will need the Mamba payload changes to get it to run after compiling.
https://github.com/OsirizX/Mamba/tree/page_table
https://github.com/OsirizX/ps3mapi-lib/tree/page_free
https://github.com/OsirizX/picodrive/tree/ps3_dynarec
credits: @TheRouLetteBoi, @Crystal, @bucanero
I've created the PR to the maintainer here.
https://github.com/irixxxx/picodrive/pull/82
-
PicoDrive was updated in the RetroArchCE repository
via Crystal
.via Crystal said:Picodrive updated with latest changes by @OsirisX to have Dynarec for 32x Sega games.
Dynarec options (In game menu -> Options -> Performance -> Dynamic Recompilers) are disabled by default. If you have Mamba 8.4, or when you will have Cobra 8.4, with PS3 MAPI enabled, enable dynarec and enjoy
@aldostools provides updated MAMBA and HEN payloads (@bucanero made changes for PS3HEN)
https://www.psx-place.com/threads/mapi-dynarec-lib.33875/page-5#post-349479
@Evilnat will debut Cobra 8.4 with release of 4.89.3 Evilnat CFW
Source: psx-place.com
Last edited: