PS1EMU vs PS1NETEMU, in need of opinions for future COBRA release

Joonie

Developer
Hi there everyone, I've been trying to improve psx playback on COBRA CFW..

[MENTION=89]aldostools[/MENTION] [MENTION=872]sandungas[/MENTION] [MENTION=600]_NzV_[/MENTION] [MENTION=20]habib[/MENTION] have been very helpful, however, none of us have enough experiences with psx games running on PS3.

So I'm kindly asking everyone's opinion about this matter, because with current source I've been developing can only choose one emu for default psx playback for COBRA..

The original COBRA 7 had this patch in basic_plugin.sprx, but commented by default, I was not sure about the dev's intention, but I assumed it was better to keep things as close to the original method that PS3 uses.

Code:
SprxPatch basic_plugins_patches[] =
{
	//{ ps1emu_type_check_offset, NOP, &condition_true }, // Changes ps1_emu.self to ps1_netemu.self (DISABLED)
	{ 0 }
};

So if I enable this patch, following will happen when launching PSX games.

Now patching basic_plugins.sprx b5988de200020143
Offset: 0x00020234 | Data: 0x60000000 // { ps1emu_type_check_offset, NOP, &condition_true }, // Changes ps1_emu.self to ps1_netemu.self (DISABLED by default since 4.46)

Disc auth: 5004 1 (process: 01000300_main_vsh.self)

Now patching ps1_netemu.self 7a300dd2000be26f
Offset: 0x000A440C | Data: 0x38600082 // { ps1_netemu_get_region_offset, LI(R3, 0x82), &condition_true }, // PSX Region free patch

PROCESS /dev_flash/ps1emu/ps1_netemu.self (01010200) loaded
PROCESS /dev_flash/ps1emu/ps1_netemu.self (01010200_main_ps1_netemu.se) (0101020[/B]
0) created from parent process: 01000300_main_vsh.self
Game: game exec processID = [0x01010200]
PS1 emulator Build Date 15/02/04/23:55 -sgpu-sli4 [titledb:r11556]
argc=7
argv[0]=/dev_flash/ps1emu/ps1_netemu.self

as you can see, this will force load ps1_netemu for all psx rips unless you manually swap this via multiMAN or IRIS.

COBRA fakes PS3's BD functions completely, as a result, it provides "FULL" disc-less experience, so when playing PSX games with COBRA core, all users are forced to use default emu [ps1_emu.self], UNLESS, you use mmCM or IRIS forks to choose emu.

I've heard that some games do work better on PS1EMU, and some games only work on PS1_NETEMU.

for ex)

2bosjo9yc82yqdgzg.jpg


This X-MEN mutant academy game only works with ps1_netemu, which was designed for psx classic contents.

So, I'd like to ask your opinion about enabling this patch for better PSX Emulation experiences.

[MENTION=7]atreyu187[/MENTION] any idea?
 
Last edited:
I'd go with what works for more items. At that point, working on improving the netemu might be the next step :)
 
There are a few games that come to mind that don't work from disc or Cobra mounting them but work as a Classic Gundam Battle Assault is one that directly comes to mind. Its never really been an issue with me as I try the normal mounting or playing from disc and if it doesn't work I just convert to classic format. I'll try to make a list of what doesn't work using the normal standard as of now. I know I have 10 or so games that simply don't play on my slim. Now that being said they did work on my old CECHA-01 all but one game comes to mind. It can't be completed on a BC PS3, slim PS3 or even a PS2. Well it does work as Classic but other then that I have to play on my old PS1 and it is one of my favorite games of all time. Grandia 1 is the game I speak of that simply won't work via Cobra or PS2. I'm sure there is more but I haven't really gotten into it as I keep my PS1 hooked up always. And I was able to finally run it on PS2 using POPS Loader.
 
I'd go with a new OPCODE that allow to select the ps1 emu like the current opcode SYSCALL8_OPCODE_PSP_CHANGE_EMU.
 
I believe there are also a few games that work fine normally as ps1_emu but perform better in ps1_netemu.
Now I can't remember for certain which ps1 games they were, but I do remember a few that ran better in netemu than in the normal emu. I'll probably go through my ps1 collection when I have the time.

Btw Joonie, can the same be done with the ps2 emus because there are some games that work fine in classics but not in the gxemu (Manhunt comes to mind) and there were some that performed better in the gxemu or netemu compared to the hwemu (GTA VCS and Max Payne come to mind, there were also a few others but I can't remember them off the top of my head).
 
Well I should say grandia plays on PS3 slim with cobra but can't be completed.

Well found another not working from disc but does as a classic. Alundra will not work from my original disc but works great converted. Never ran into a game that doesn't work well as a classic TBH
 
Last edited:
hey guys, i have modified cobra source to toggle ps1_emu and ps1_netemu manually with button shortcut on startup of mounted psx iso.
i also know now how to call these sprx patches manually now.

it is basically the same like the button shortcut to block peek for multiman to be run in normal mode.

in modulespatch add following:
Code:
uint64_t condition_toggle_psxemu = 1;

and in function
Code:
LV2_PATCHED_FUNCTION(int, modules_patching, (uint64_t *arg1, uint32_t *arg2))
under process
Code:
if (((ptr[0x10/8] << 24) >> 56) == 0xFF)
next to
Code:
if (condition_psp_keys)
add following code
Code:
		if (condition_toggle_psxemu){
			
			if (hash == BASIC_PLUGINS_HASH){

				pad_data data;

				if (pad_get_data(&data) >= ((PAD_BTN_OFFSET_DIGITAL+1)*2)){
					if((data.button[PAD_BTN_OFFSET_DIGITAL] & (PAD_CTRL_CROSS|PAD_CTRL_L2)) == (PAD_CTRL_CROSS|PAD_CTRL_L2)){

						DPRINTF("Button Shortcut detected! Changing default ps1_emu to ps1_netemu...\n");

						DPRINTF("Now patching %s %lx\n", hash_to_name(hash), hash);
						
						uint32_t data = NOP;
						buf[ps1emu_type_check_offset/4] = data;			
						
						DPRINTF("Offset: 0x%08X | Data: 0x%08X\n", ps1emu_type_check_offset, data);
					}
				}
			}
		}
this will switch to ps1_netemu everytime you press and hold L1+X when trying to start mounted psx iso. otherwise ps1_emu will be used

edit
of course you will have to remove sprx patch definition of basic_plugins and patch_table entry in modulespatch
[MENTION=89]aldostools[/MENTION]
we also have to find a way to run certain multidisc psx games with webman, just like irismanager. somehow it is impossible for few games to be run. from a user report such a game is abe's exoddus
 
Last edited:
hey guys, i have modified cobra source to toggle ps1_emu and ps1_netemu manually with button shortcut on startup of mounted psx iso.
i also know now how to call these sprx patches manually now.

it is basically the same like the button shortcut to block peek for multiman to be run in normal mode.

in modulespatch add following:
Code:
uint64_t condition_toggle_psxemu = 1;

and in function
Code:
LV2_PATCHED_FUNCTION(int, modules_patching, (uint64_t *arg1, uint32_t *arg2))
under process
Code:
if (((ptr[0x10/8] << 24) >> 56) == 0xFF)
next to
Code:
if (condition_psp_keys)
add following code
Code:
		if (condition_toggle_psxemu){
			
			if (hash == BASIC_PLUGINS_HASH){

				pad_data data;

				if (pad_get_data(&data) >= ((PAD_BTN_OFFSET_DIGITAL+1)*2)){
					if((data.button[PAD_BTN_OFFSET_DIGITAL] & (PAD_CTRL_CROSS|PAD_CTRL_L2)) == (PAD_CTRL_CROSS|PAD_CTRL_L2)){

						DPRINTF("Button Shortcut detected! Changing default ps1_emu to ps1_netemu...\n");

						DPRINTF("Now patching %s %lx\n", hash_to_name(hash), hash);
						
						uint32_t data = NOP;
						buf[ps1emu_type_check_offset/4] = data;			
						
						DPRINTF("Offset: 0x%08X | Data: 0x%08X\n", ps1emu_type_check_offset, data);
					}
				}
			}
		}
this will switch to ps1_netemu everytime you press and hold L1+X when trying to start mounted psx iso. otherwise ps1_emu will be used

edit
of course you will have to remove sprx patch definition of basic_plugins and patch_table entry in modulespatch
[MENTION=89]aldostools[/MENTION]
we also have to find a way to run certain multidisc psx games with webman, just like irismanager. somehow it is impossible for few games to be run. from a user report such a game is abe's exoddus

The multidisc psx games are possible in Iris Manager thanks to the modified rawiso plugin (sprx_iso), included in webMAN as raw_iso.sprx

Iris Manager calls the plugin in a special way (with certain parameters like p_args->emu_mode = EMU_PSX_MULTI; in psx_iso_prepare), that webMAN MOD is not doing. So even including the same plugin there is not support for multidisc psx games because there are extra processing needed to set these parameters.


EDIT:
I like your idea of a Combo to toggle the emu. But also it would be nice if it is persistent like in this code (modified from yours ftw):

Code:
		if (hash == BASIC_PLUGINS_HASH)
		{
			condition_toggle_psxemu = config.ps1netemu;

			pad_data data;

			if (pad_get_data(&data) >= ((PAD_BTN_OFFSET_DIGITAL+1)*2))
			{
				if((data.button[PAD_BTN_OFFSET_DIGITAL] & (PAD_CTRL_R2|PAD_CTRL_L2))
				{
					if((data.button[PAD_BTN_OFFSET_DIGITAL] & PAD_CTRL_L2)==PAD_CTRL_L2) condition_toggle_psxemu = 0;
					if((data.button[PAD_BTN_OFFSET_DIGITAL] & PAD_CTRL_R2)==PAD_CTRL_R2) condition_toggle_psxemu = 1;

					DPRINTF(condition_toggle_psxemu ? "Selecting ps1_netemu as default emu...\n" : "Selecting ps1_emu as default emu...\n");

					config.ps1netemu = condition_toggle_psxemu;
					save_cobra_config();
				}
			}

			if (condition_toggle_psxemu)
			{
					DPRINTF("Now patching %s %lx\n", hash_to_name(hash), hash);
					
					uint32_t data = NOP;
					buf[ps1emu_type_check_offset/4] = data;			
					
					DPRINTF("Offset: 0x%08X | Data: 0x%08X\n", ps1emu_type_check_offset, data);
			}
		}
 
The multidisc psx games are possible in Iris Manager thanks to the modified rawiso plugin (sprx_iso), included in webMAN as raw_iso.sprx

Iris Manager calls the plugin in a special way (with certain parameters like p_args->emu_mode = EMU_PSX_MULTI; in psx_iso_prepare), that webMAN MOD is not doing. So even including the same plugin there is not support for multidisc psx games because there are extra processing needed to set these parameters.


EDIT:
I like your idea of a Combo to toggle the emu. But also it would be nice if it is persistent like in this code (modified from yours ftw):

Code:
		if (hash == BASIC_PLUGINS_HASH)
		{
			condition_toggle_psxemu = config.ps1netemu;

			pad_data data;

			if (pad_get_data(&data) >= ((PAD_BTN_OFFSET_DIGITAL+1)*2))
			{
				if((data.button[PAD_BTN_OFFSET_DIGITAL] & (PAD_CTRL_R2|PAD_CTRL_L2))
				{
					if((data.button[PAD_BTN_OFFSET_DIGITAL] & PAD_CTRL_L2)==PAD_CTRL_L2) condition_toggle_psxemu = 0;
					if((data.button[PAD_BTN_OFFSET_DIGITAL] & PAD_CTRL_R2)==PAD_CTRL_R2) condition_toggle_psxemu = 1;

					DPRINTF(condition_toggle_psxemu ? "Selecting ps1_netemu as default emu...\n" : "Selecting ps1_emu as default emu...\n");

					config.ps1netemu = condition_toggle_psxemu;
					save_cobra_config();
				}
			}

			if (condition_toggle_psxemu)
			{
					DPRINTF("Now patching %s %lx\n", hash_to_name(hash), hash);
					
					uint32_t data = NOP;
					buf[ps1emu_type_check_offset/4] = data;			
					
					DPRINTF("Offset: 0x%08X | Data: 0x%08X\n", ps1emu_type_check_offset, data);
			}
		}

I have submit an source to joonie (using an opcode from habib instead of a combo) with user choice about emu saved in config file like your code did [MENTION=89]aldostools[/MENTION], and restored on each reboot.

Code:
		case SYSCALL8_OPCODE_CHANGE_PSXEMU:
			#if !defined(NO_PS1) && !defined(IS_MAMBA)
			condition_ps1netemu = (uint8_t)param1;
			return save_cobra_config();
			#else
			return ENOSYS;
			#endif
		break;

And patch was modified like this (without changing other code in patchtable or module patching function):

Code:
	SprxPatch basic_plugins_patches[] =
	{
		{ ps1emu_type_check_offset, NOP, &condition_ps1netemu }, // Changes ps1_emu.self to ps1_netemu.self (DISABLED)
		{ 0 }
	};
 
Last edited:
I have submit an source to joonie (using an opcode instead of a combo) with user choice about emu saved in config file like your code did [MENTION=89]aldostools[/MENTION], and restored on each reboot.

Code:
		case SYSCALL8_OPCODE_CHANGE_PSXEMU:
			#if !defined(NO_PS1) && !defined(IS_MAMBA)
			condition_ps1netemu = (uint8_t)param1;
			return save_cobra_config();
			#else
			return ENOSYS;
			#endif
		break;

yes I know... it was not a coincidence that I used the variable config.ps1netemu ;)

Anyway I like both approaches: an user selected combo and the opcode to select the ps1emu from an application.

Although thinking it twice... the combo should be at application level, not at middleware level.
 
Wow good stuff going on here. Im so excited to see how all this plays out in the latest CFW. So many additions and tweaks. Gonna make me for sure leave 4.46 for good lol
 
Back
Top