Resolved: [Bug Report] PCSX2 swap disc broken
#11
That's specific to DW. the issue I was speaking of revolves about MR3/4 whenever the changes were made to the way pcsx2 reads cDVDs it broke disc swap to PSX games for these games.

Sponsored links

#12
Well, since both issues are related to something going wrong when swapping disc, it's possible that the issues are related and that fixing one will also fix the other.

BTW, is there any PS2 disc swapping game where the swap DOES work well in PCSX2? Or does swap just never work in any game?
#13
I don't know of any. IIRC in the Xenosaga games we get around it since the game allows you to save before changing discs, so then we boot with disc 2 and load the save. I'm not completely sure though, would have to check.
[Image: newsig.jpg]
#14
(07-10-2014, 03:17 PM)avih Wrote: Or does swap just never work in any game?
There used to be (read: not tested it in ages+no longer own the game) one game that it did, but it was 100% unreliable. so it was probably a fluke, but I don't remember what game it was now.

also note: I could only see a swap working correctly if the cDVD is flagged as a PS1 game (as the code is now) when it isn't the original game loaded, but since loading ps1 games is broken... can't even do that now unless that gets fixed (which would provide a temporary solution)
#15
(07-10-2014, 03:29 PM)Saiki Wrote: also note: I could only see a swap working correctly if the cDVD is flagged as a PS1 game (as the code is now) when it isn't the original game loaded, but since loading ps1 games is broken... can't even do that now unless that gets fixed (which would provide a temporary solution)

There's a difference between "Loading a PS1 game" and "reading a PS1 disc" (the latter - e.g. by a PS2 game reading _data_ from the PS1 disc and _not_ loading and running PS1 game).

So which is broken? Loading a PS1 game? or reading a PS1 disc?

(07-10-2014, 08:16 AM)Saiki Wrote: Version tested:
Code:
PCSX2 1.3.0.r5919  - compiled on Feb 28 2014
Savestate version: 0x9a0a0000
Version last known working on: 0.9.9r5128

So this means 5128 works, and 5919 doesn't, right? But it's hard to find the bug with this range because between those revisions there are almost 2.5 years.

Could you please try to narrow it down and find the FIRST version where it's broken (so we can check which code changed at this revision, and that's the bug probably)? You can find historic svn builds here, and they go even earlier than 5128, so I think it should be possible to find the first broken version.

So try r5500 (or there about), if it works, try r5700. If 5500 is already broken, try 5300, etc. Like, try to split your range roughly at the middle on each revision you test.
#16
(07-10-2014, 04:12 PM)avih Wrote: There's a difference between "Loading a PS1 game" and "reading a PS1 disc" (the latter - e.g. by a PS2 game reading _data_ from the PS1 disc and _not_ loading and running PS1 game).

So which is broken? Loading a PS1 game? or reading a PS1 disc?
Reading the disc contents while PS2 games are running. (IE to generate monster data)


As for what revision broke it, I can check backwards, I should have most of my old SVNs still (from 0.9.9-1.2.0)

edit: This code added at r5886 is the cause, I'm 99% sure, as r5873 (I downloaded r5885) works perfectly
/trunk/pcsx2/CDVD/CDVD.cpp
Code:
501    
502    static void cdvdDetectDisk()
503    {
504        wxString str;
505        cdvd.Type = DoCDVDdetectDiskType();
506        cdvdReloadElfInfo();
507    }

edit:
Code:
s32 cdvdCtrlTrayClose()
{
    DevCon.WriteLn( Color_Green, L"Close virtual disk tray");
    cdvd.Status = CDVD_STATUS_PAUSE;
    cdvd.Ready = CDVD_READY1;
    cdvd.TrayTimeout = 0; // Reset so it can't get closed twice by cdvdVsync()

    cdvdDetectDisk();
    GetCoreThread().ApplySettings(g_Conf->EmuOptions);

    return 0; // needs to be 0 for success according to homebrew test "CDVD"
}
It's actually probably here^
#17
update:
(the devcon writes were for testing purposes)
Code:
s32 cdvdCtrlTrayClose()
{
    DevCon.WriteLn( Color_Green, L"Close virtual disk tray Saik test"); //so  I can see i trigger off
    cdvd.Status = CDVD_STATUS_PAUSE;
    cdvd.Ready = CDVD_READY1;
    cdvd.TrayTimeout = 0; // Reset so it can't get closed twice by cdvdVsync()

    cdvdReloadElfInfo();  //change is here
        DevCon.WriteLn( Color_Green, L"Re-reading ELF info"); //just a readout so I know it is changing
    GetCoreThread().ApplySettings(g_Conf->EmuOptions);

    return 0; // needs to be 0 for success according to homebrew test "CDVD"
}
this returns the normal function for PSX games, but DVDs still do not work. I do have a theory as to why however.
#18
Saiki, great! Smile

Just to summarize this thread so far:

1. Current PCSX2 can't swap to PSX CDs. It has worked in the past but it's now broken.
2. Saiki found out that it got broken in r5886, and he thinks that the code he posted on comment 17 fixes it, but not sure if it breaks anything else.
3. This does NOT fix the issue of PS2 DVDs - only of PSX CDs.
4. Saiki thinks he has an approach to also fix the PS2 DVDs bug, but no code to show yet.
#19
I've been working with Saiki on this, so I'll comment.

1 - Yes
2 - It fixes it, but we don't know if it breaks anything else
3 - Correct
4 - We have an idea of what's going wrong, but not code to fix. Saiki can explain it better. Basically "something" isn't being properly updated when discs swap. We know this because of the fact that disc swapping doesn't work, and swapping to a DVD in Monster Rancher 3 always produces a "mochi" where different DVDs on PS2 produce different monsters. What produces a "mochi" on PS2? The Monster Rancher 3 DVD itself. So this is the evidence that something is not getting updated.
[Image: XTe1j6J.png]
Gaming Rig: Intel i7 6700k @ 4.8Ghz | GTX 1070 TI | 32GB RAM | 960GB(480GB+480GB RAID0) SSD | 2x 1TB HDD
#20
2: 99% sure it breaks nothing, because removing the check altogether reproduces the old result. (the same as the fix I posted)
4: Saiki is explaining it in irc Tongue (as far as the mochi. SOME other discs do, but none that I can name offhand. MR4 for sure does not make a mochi)




Users browsing this thread: 1 Guest(s)