Skip to content

Conversation

@Manicsteiner
Copy link

Target game: それいゆ -PREMIE'RE- (PC) https://vndb.org/v5130

Problem: The compressed file contains both v101 and v200 versions of the image, and the v200 version’s content cannot be decoded (occasionally it can be successfully decoded using a tricky method, once).

Analysis: In the UnpackV200 method, the m_key input is usually 0. If the Properties.Settings.Default.MCGLastKey has not been selected beforehand, this value will be 0, which equals m_key. This causes the method to exit directly during the first loop and throw an exception. If MCGLastKey has been selected or the v101 version of the image has been decoded, the loop will trigger an exit condition after a few iterations with the previous key value and throw an exception.

Solution: Before attempting the key, first try using MCGLastKey, as both formats in this game share the same key. If successful, the process can return normally. If MCGLastKey is 0 and fails, then continue trying with m_key=1. If MCGLastKey is not 0 and still fails… does this situation even exist? In cases where the real key is greater than MCGLastKey, the issue cannot be properly handled. It is recommended to restart the process.

@crskycode crskycode merged commit 6e8e61d into crskycode:master Sep 27, 2025
1 check passed
@Manicsteiner Manicsteiner deleted the fix_MCG branch September 27, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants