Open-ps2-loader: OPL VMC BUG

Created on 16 Aug 2018  路  10Comments  路  Source: ps2homebrew/Open-PS2-Loader

Issue checklist

Open PS2 loader version

Open PS2 Loader 0.9.3+.1166-Beta-e57ded9
Open PS2 Loader 0.9.3+.1152-Beta-58a493e
Open PS2 Loader 0.9.3+.1129-Beta-49267e9

Open PS2 loader mode (USB, SMB, HDD)

USB, HDD

Open PS2 type (Normal, Childproof, VMC, GSM, PS2RD)

VMC, GSM, PS2RD

Issue description - Describe the problem you are having

After creating a VMC, I get an error when I try to launch the game.

Expected result

should launch the game.

Actual result

error when trying to launch the game.

How to reproduce the issue

In a nutshell, the bug happens this way:

  1. Create a new VMC via USB HDD or Internal HDD for a PS2 Game in OPL. -- (Make sure to select the option to create the VMC that has the GAME ID and not a generic named VMC -- example: ABCD_123.45_0.)
  2. Once you've created it and saved the Game Settings to update the game's CFG file.
  3. Then try to launch the PS2 Game.
  4. OPL will display the following error screen: _"Error with VMC ABCD_123.45_0, continue with physical MC (slot 1)?"_
  5. Even if you restart OPL, you will still not able to launch the PS2 Game with VMC enabled because of this error.
  6. Plus if we create the VMC with OPL Manager it will work. So it seems OPL is making corrupted new VMC files??

More details:

@sp193 , there are reports that there is a new bug when creating a VMC via USB and Internal HDD. See this thread: http://www.ps2-home.com/forum/viewtopic.php?f=13&t=6077

Does not happen with SMB, this is why I never was able to detect it, plus I hardly use OPL to create the VMCs, I prefer OPL Manager for that task. Plus I haven't purchased a PS2 Game in ages, I got everything I will ever need.

I figure it may be the changes you made in this commit or perhaps the recent updates after commit: 58a493e -- since that is so far the last version of OPL that doesn't show this bug.

_UPDATE_:

@SP193 (my apologies), I just tested another older ifcaro build: Open PS2 Loader 0.9.3+.1129-Beta-49267e9 -- and the bug also exists there, and that commit is a lot older than the one I linked above, so it seems this bug has been around a while back.

So that means the new changes made in this current commit that I started this report is wrong, and it may be further back...

Once I find where the bug started, I will report back. Though kind of difficult, since I don't collect the older ifcaro builds and I know if I wanted to compile them, some older PS2SDK versions will be required. Hopefully I can count on you to assist me in finding where and when this bug started??

Most helpful comment

USBHDFSD does not have such a function.

You can make your own pull requests too, if you want to make a suggestion. But because I am going to make a pull request myself, I will be adding a new line for indicating if the VMC file is fragmented.

All 10 comments

I SUPPOSE it is simply missing a refresh of the game-dependent file-list.

What happens if you have multiple games installed, scroll through the game-list, or even change the setting of another game and then start the game you have created a VMC for?

Yes, I also tried that today.

Yesterday I was only testing that one game that I wrote about in the topic at PS2-HOME -- but then later that night (very late--like vampire time), I was able to test that theory also by messing with another game on my USB HDD and then on my list then returning the the game in question, but I could not fool OPL.

Plus that theory would also work when I restart OPL, but it still doesn't like the VMC it created for that game.

I'm beginning to believe in gremlins... this VMC bug has me baffled.

For USB devices, VMC files must not be fragmented. Hence this is by design. You can say that the VMC creation feature of OPL probably can't be used alone for creating VMC files, for USB disks.

For the HDD unit, there is code for handling up to a certain degree of fragmentation, but it will refuse any VMC images that are very fragmented. There are no tools for defragmenting PFS partitions.

Ah, okay, that makes sense. I will share that piece of info to the troops.

From what I understood from what you just explained...

I guess, after creating a VMC on a USB HDD, it would be advised to defrag the disc or the VMC on a PC and that should then allow the game to be able to load it, right?

But for HDD users, without being able to defrag, that does sucks for them. :(

You could say that they'll likely have to do defragmentation - what are the odds of the VMC file being written without any fragmentation, at all?

Since this is not a real bug, I would recommend that this ticket be closed.

It would be neat, if OPL's GUI (specifically the VMC-Creation-algo) could detect the 'first continuous free chunk', where a VMC (depending on it's filesize) could be written to.
However, I am not sure if USBHDFS(D) does even support writing to selective sectors.

Just a sugestion...
If the problem is fragmentation it should show up "Can't use VMC due to fragmentation. Desfrag the disk first", instead of showing the general VMC not error message.

Yes, either that or it should create non-fragmented VMC's if there is enough continuous space, or even both.

USBHDFSD does not have such a function.

You can make your own pull requests too, if you want to make a suggestion. But because I am going to make a pull request myself, I will be adding a new line for indicating if the VMC file is fragmented.

Well, a warning is enough, but it would be interesting to know, how to scan for sizes of empty chunks in an effective way... Via a sector-table or indexes of files?

Hm... I can dig a bit into it and give it a try (even tho' I am rather interested in other features and stuff).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eadmaster picture eadmaster  路  11Comments

PGAnonamous picture PGAnonamous  路  11Comments

Aced14 picture Aced14  路  4Comments

J013k picture J013k  路  4Comments

carl0sjt picture carl0sjt  路  8Comments