PS3 Cobra improvement for PSX/PS2 emulation

FYI, all ps1_netemu internal configs do not work via WebMAN/Cobra. This is easily tested with Vib-Ribbon freezing on a black screen when loading a level, or Gaiaseed/Um Jammer Lammy not booting into ps1_newemu. I assume this applies to all games with internal configs, and I assume this applies to ps1_emu as well, unless this is a side effect of loading the game through bin/cue rather than PBP. I am not exactly sure where/when netemu grabs the serial from to enable the config.

EDIT: I see from the PS1 Emulation page that it is enabled via the checksum. The checksum is probably not performed for some reason, then.
 
Then something is/has been broken for me ever since I can remember. Have you tried Vib-Ribbon? Both the Japanese and the PAL versions black screen for me, but the PS one Classics versions obviously work fine. The same is said for Um Jammer Lammy/Gaiaseed booting into newemu instead of netemu on the PS one Classics versions but not via bin/cue through WebMAN MOD.
 
It does black screen for me too. But I rather think it is an audio read issue. As I said before, the LC configs did work to me when I tried them while back (I even replaced one of them with my own, including a checksum, and it worked too).

Only the SCUS-94448 version of Um Jammer Lammy has got ps1_newemu switch in the netemu's internal config table. Make sure you are trying the right version.
 
It seems IRISMAN boots Vib-Ribbon fine with its payload when either old_emu or old_netemu are enabled. The other two games still do not boot into newemu with either setting in IRISMAN, so it seems its payload doesn't perform the switch either.

EDIT: It could be that WebMAN MOD/IRISMAN may force the use of the selected emulator regardless of the config.
 
Last edited:
@Agrippa Here is a new build.

I didn't remove the patch for video mode. I only added the patch LI(R29, 0x85) in modulespatch.c when a PAL game is detected. For non PAL games, it uses the default patch LI(R29, 0x82) as before.

About the payload not working on 4.89, I would need to investigate if the hashes changed. Maybe when Evilnat release his source code.

I tested the payload in Evilnat 4.88.2 and it's working fine, just in case you wish to downgrade to test it.

In regards to the Libcrypt games, I don't have any European game protected to test.

It seems IRISMAN boots Vib-Ribbon fine with its payload when either old_emu or old_netemu are enabled. The other two games still do not boot into newemu with either setting in IRISMAN, so it seems its payload doesn't perform the switch either.

IIRC IRISMAN calls the ps1 emulator directly if the ISO is in internal HDD or FAT32.
For NTFS it uses Cobra/Mamba payload.

EDIT:
I forgot to apply the patch to netemu. This version 2 now applies LI(R29, 0x85) / LI(R3, 0x85) to ps1_emu and ps1_netemu respectively for PAL games.
 
Last edited:
Hmm, it seems that ps1_emu's command 0x15 does successfully switch to netemu when testing with the Japanese version of PaRappa the Rapper. It seems that only netemu does not switch to newemu from the tested games.
 
About the payload not working on 4.89, I would need to investigate if the hashes changed. Maybe when Evilnat release his source code.

I tested the payload in Evilnat 4.88.2 and it's working fine, just in case you wish to downgrade to test it.

Sorry, I have downgraded to the Evilnat 4.88.2 and it does not work too. Maybe I am doing something wrong, but I cannot figure it out. Does the webMAN MOD need a special configuration for the Mamba to work? How can I check if the Mamba is loaded?
 
Last edited:
Sorry, I have downgraded to the Evilnat 4.88.2 and it does not work too. Maybe I am doing something wrong, but I cannot figure it out. Does the webMAN MOD need a special configuration for the Mamba to work? How can I check if the Mamba is loaded?

Try installing boot_mamba.pkg (this pkg was updated with the latest changes)

1. The pkg copies mamba_489C.bin to /dev_hdd0/plugins/kernel (it should work fine on 4.88)
2. It creates /dev_hdd0/boot_plugins_kernel_nocobra.txt that loads:
/dev_hdd0/plugins/kernel/mamba_489C.bin
3. It creates /dev_hdd0/boot_plugins_nocobra.txt that loads the full edition from:
/dev_hdd0/plugins/webftp_server.sprx

Disable Cobra. After reboot webMAN should load and show FW: 4.88 Mamba 8.4 when you press SELECT+START
 
@aldostools Thank you for taking the time to look into this functionality.

However, I am still getting the 80028F10 error when trying to boot PAL games through WebMAN MOD. Regardless of what I do with the display settings, it will not boot. The 576p option is there and greyed out after mounting the game (instead of 480p), but the game will still not launch.

The games boot properly through IRISMAN as stated before, but it is just inconvenient to only be using IRISMAN for this. WebMAN MOD is just too good. :)
 
@aldostools Thank you for taking the time to look into this functionality.

However, I am still getting the 80028F10 error when trying to boot PAL games through WebMAN MOD. Regardless of what I do with the display settings, it will not boot. The 576p option is there and greyed out after mounting the game (instead of 480p), but the game will still not launch.

The games boot properly through IRISMAN as stated before, but it is just inconvenient to only be using IRISMAN for this. WebMAN MOD is just too good. :)

I don't know why you're getting the error. I have a couple of PAL games that play fine without errors.

The latest mamba payload basically applies the patch 0x85 suggested by Agrippa.
It also allows to force a video mode, but only if the file name has the words NTSC or PAL in upper case.

A workaround is that you create a XMB shortcut using RetroXMB Creator
I updated it to use latest IRISMAN and to make it compatible with app_home
 
Hmm, it seems that ps1_emu's command 0x15 does successfully switch to netemu when testing with the Japanese version of PaRappa the Rapper. It seems that only netemu does not switch to newemu from the tested games.
Im looking at the list of commands in wiki for that games trying to figure where is the problem but i dont understand it well, im just quoting you as a recap, basically, we have 6 redirections:
From ps1_emu -------to---> ps1_newemu (ID=2)
From ps1_emu -------to---> ps1_netemu (ID=3)
From ps1_newemu ---to---> ps1_emu (ID=1)
From ps1_newemu ---to---> ps1_netemu (ID=3)
From ps1_netemu ----to---> ps1_emu (ID=1)
From ps1_netemu ----to---> ps1_newemu (ID=2)

Not sure if all this redirections could be broken individually, but as far i understand from your reports the last 2 of the list could be broken
Btw, i dont think the format of the BIN/ISO is the problem, because if are valid for one of the ps1 emus they should be valid as well for the other ps1 emus


EDIT:
I mean... if the BIN/ISO have an MD5 identical to the one mentioned in redump.prg.... we can assume the data required to calculate the CRC (used to identify the game, and responsible to load the specific commands for that game) is located at the correct offset, and the data is fine
So... (at least in theory)... the emus are generating that CRC correctly
Now while thinkinig in this and while writing this... im wondering if the netemu is applying some displacement in the BIN/ISO causing a disaligment and as a consequence is not able to find the correct data for the CRC :rolleyes: ... but in that case it should affect all games from the list (not only the ones doing the redirections, but 100% of them because all them requires to calculate the CRC)
 
Last edited:
Try installing boot_mamba.pkg (this pkg was updated with the latest changes)

1. The pkg copies mamba_489C.bin to /dev_hdd0/plugins/kernel (it should work fine on 4.88)
2. It creates /dev_hdd0/boot_plugins_kernel_nocobra.txt that loads:
/dev_hdd0/plugins/kernel/mamba_489C.bin
3. It creates /dev_hdd0/boot_plugins_nocobra.txt that loads the full edition from:
/dev_hdd0/plugins/webftp_server.sprx

Disable Cobra. After reboot webMAN should load and show FW: 4.88 Mamba 8.4 when you press SELECT+START

Ok, I am so dumb. There was a "nocobra" version of webMAN specified in the boot_plugins_nocobra.txt. That is why the webMAN MOD was not detecting MAMBA.

I made some quick tests, because of limited time:
1. PSX boot screen in the PAL mode seems squished vertically (black bars on top and bottom, just like a NTSC signal sent on the PAL resolution).
2. Cracktros are finally working at the right speed, thanks to the proper BIOS patching.
3. SBI2SUB converted subchannel file does crash the console when the protection kicks on (hard power off by holding the button is needed). .SUB extension was renamed to the .SCH one, as you asked.
 
Ok, I am so dumb. There was a "nocobra" version of webMAN specified in the boot_plugins_nocobra.txt. That is why the webMAN MOD was not detecting MAMBA.

I made some quick tests, because of limited time:
1. PSX boot screen in the PAL mode seems squished vertically (black bars on top and bottom, just like a NTSC signal sent on the PAL resolution).
2. Cracktros are finally working at the right speed, thanks to the proper BIOS patching.
3. SBI2SUB converted subchannel file does crash the console when the protection kicks on (hard power off by holding the button is needed). .SUB extension was renamed to the .SCH one, as you asked.

1. Is that what you expected? The patch for video mode is applied as in the original payload.
2. I guess the new bios patch is ok.
3. Is the SUB using the format specified in the struct? Could you PM me your example to test it?
I mainly need to know what is the exact format of the SUB that you provided to convert it to the right format.

Also currently the new code for subchannel override is skipping the first 3 minutes.
If the SUB is including the subq for the first 3 minutes, then the custom subchannels are displaced.
Code:
// custom subchannel
ret = UNDEFINED;
const u32 lba_start = 13500; // 3 min * 60 secs * 75 frames (lba_start = 0 sets subchannel from LBA 0)
if(subqfd != UNDEFINED && lba >= lba_start)
{
    size_t r = (lba - lba_start) * sizeof(SubChannelQ);
    if(r < sub_size)
    {
        cellFsLseek(subqfd, r, SEEK_SET, &r);
        ret = cellFsRead(subqfd, (void *)subq, sizeof(SubChannelQ), &r);
        if(subq->control_adr <= 0) ret = UNDEFINED;
    }
}

If only the crc needs to be changed, I could update the code to only change this line:
subq->crc = calculate_subq_crc((u8 *)subq);

Code:
if(ret)
{
    ScsiTrackDescriptor *track = find_track_by_lba(lba);
    subq->control_adr = ((track->adr_control << 4)&0xF0) | (track->adr_control >> 4);
    subq->track_number = track->track_number;
    subq->index_number = 1;
    if (user_data)
        lba_to_msf_bcd(lba, &subq->min, &subq->sec, &subq->frame);
    lba_to_msf_bcd(lba + 150, &subq->amin, &subq->asec, &subq->aframe);
    subq->crc = calculate_subq_crc((u8 *)subq);
}
 
Last edited:
1. Is that what you expected? The patch for video mode is applied as in the original payload.
2. I guess the new bios patch is ok.
3. Is the SUB using the format specified in the struct? Could you PM me your example to test it?
I mainly need to know what is the exact format of the SUB that you provided to convert it to the right format.

Also currently the new code for subchannel override is skipping the first 3 minutes.
If the SUB is including the subq for the first 3 minutes, then the custom subchannels are displaced.
1. Yeah, it seems it is the correct behaviour. But I think the old video mode patch needs to be removed at all, as the modulespatch should sort out the video mode as well. Moreover, there is a bug with MAMBA (I did not test the Cobra) when you run the official PS1 Classic after playing the ISO backup. It throws out an 80028f17 error after launching the game and the console restart is needed for the Classic to work. I think it may be related to it, as the patched video mode settings are still present after exiting the payload's mounted game.
2. Yes, thank you for your contribution!
3. It is a .M3S file but with .SCH extension. Truly speaking, the .M3S format is the least frequent in the scene, I had to make this file by hand.
 
1. Yeah, it seems it is the correct behaviour. But I think the old video mode patch needs to be removed at all, as the modulespatch should sort out the video mode as well. Moreover, there is a bug with MAMBA (I did not test the Cobra) when you run the official PS1 Classic after playing the ISO backup. It throws out an 80028f17 error after launching the game and the console restart is needed for the Classic to work. I think it may be related to it, as the patched video mode settings are still present after exiting the payload's mounted game.
2. Yes, thank you for your contribution!
3. It is a .M3S file but with .SCH extension. Truly speaking, the .M3S format is the least frequent in the scene, I had to make this file by hand.

Thank you for your feedback.
1. The patched bios doesn't handle the video patch in modulespatch, If I remove the video patch, the PAL game runs at 60Hz on my console. With the video patch it runs at 50Hz. I'm including both payloads so you can test yourself.
2. I just followed your suggestions.
3. Yes,it looks like M3S. The format is something that can be handled after we get the custom subq working.

I fixed the black screen issue in Sydney 2000 (Europe). The kernel required a call to extend_kstack(0);
I also adjusted the initial threshold to start at 2:58.00. Previously it was starting at 3:00.00.

Now Sydney 2000 reaches the copyright screen, but shows a red line and stops there.
It looks like something is wrong with the subchannel data.

I'm including the source code with the latest changes.
 

Attachments

Moreover, there is a bug with MAMBA (I did not test the Cobra) when you run the official PS1 Classic after playing the ISO backup. It throws out an 80028f17 error after launching the game and the console restart is needed for the Classic to work. I think it may be related to it, as the patched video mode settings are still present after exiting the payload's mounted game.
This has been a Cobra bug for a long time, so I can confirm it is not limited to Mamba.
 
3. Yes,it looks like M3S. The format is something that can be handled after we get the custom subq working.

I fixed the black screen issue in Sydney 2000 (Europe). The kernel required a call to extend_kstack(0);
I also adjusted the initial threshold to start at 2:58.00. Previously it was starting at 3:00.00.

Now Sydney 2000 reaches the copyright screen, but shows a red line and stops there.
It looks like something is wrong with the subchannel data.

I'm including the source code with the latest changes.

The subchannel data is fine, as I have tested the .m3s with no$psx successfully. So the problem is at the payload's end.
 
The subchannel data is fine, as I have tested the .m3s with no$psx successfully. So the problem is at the payload's end.

Ok. Then there must be something else that must be done to make it accept the subchannel data.

The code basically overrides the calculated subchannel record (subq) with the one provided in the file.
 

Similar threads

Back
Top