From 51976aa06b63174718383f2309d759a97edd79b3 Mon Sep 17 00:00:00 2001 From: kozarovv <15552250+kozarovv@users.noreply.github.com> Date: Sat, 17 Oct 2020 13:44:08 +0200 Subject: [PATCH] CDVD: Fix iLink issues Previously iLinkId was writen/overwriten to .nvm only when user not supplied own file. But when user supplied file with empty iLinkId, then value is never set. So games fail to get correct data. That implementation return hardcoded ilinkId when read is requested, and correct iLinkId is not found. --- pcsx2/CDVD/CDVD.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pcsx2/CDVD/CDVD.cpp b/pcsx2/CDVD/CDVD.cpp index 6dae09280c..f91f565138 100644 --- a/pcsx2/CDVD/CDVD.cpp +++ b/pcsx2/CDVD/CDVD.cpp @@ -1677,6 +1677,18 @@ static void cdvdWrite16(u8 rt) // SCOMMAND case 0x12: // sceCdReadILinkId (0:9) SetResultSize(9); cdvdReadILinkID(&cdvd.Result[1]); + if ((!cdvd.Result[3]) && (!cdvd.Result[4])) // nvm file is missing correct iLinkId, return hardcoded one + { + cdvd.Result[0] = 0x00; + cdvd.Result[1] = 0x00; + cdvd.Result[2] = 0xAC; + cdvd.Result[3] = 0xFF; + cdvd.Result[4] = 0xFF; + cdvd.Result[5] = 0xFF; + cdvd.Result[6] = 0xFF; + cdvd.Result[7] = 0xB9; + cdvd.Result[8] = 0x86; + } break; case 0x13: // sceCdWriteILinkID (8:1)