Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Decrypting

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th March 2025, 23:52   #901  |  Link
nalor
Registered User
 
Join Date: Dec 2013
Posts: 526
Quote:
Originally Posted by SamuriHL View Post
Looks like I already had that set and it doesn't seem to take affect for validatedisc unless I'm doing something wrong. (So apparently I did know about it last time I updated the ini file LOL)
Checked the code and you're right - is not working yet.

Whats your preference:
* eject disc and exit
* or just exit
* or use the ini parameter EjectDisc to define if the disc shall be ejected before the exit?
nalor is offline   Reply With Quote
Old 18th March 2025, 23:53   #902  |  Link
SamuriHL
Registered User
 
SamuriHL's Avatar
 
Join Date: May 2004
Posts: 5,472
Quote:
Originally Posted by nalor View Post
Checked the code and you're right - is not working yet.

Whats your preference:
* eject disc and exit
* or just exit
* or use the ini parameter EjectDisc to define if the disc shall be ejected before the exit?
I'd prefer to have the ini params honored if possible. Thanks so much for looking at this!
__________________
HTPC: Windows 11, AMD 5900X, RTX 3080, Pioneer Elite VSX-LX303, LG G2 77" OLED
SamuriHL is online now   Reply With Quote
Old 19th March 2025, 00:29   #903  |  Link
Toad King
Registered User
 
Join Date: Dec 2018
Posts: 16
Quote:
Originally Posted by nalor View Post
Please try again - I've changed the entry in the db to "validated=0" - so I think a new validation should result in an update.

There are 11 more entries that look strange .. will check tomorrow in detail.
That did it! Thanks for the help.
Toad King is offline   Reply With Quote
Old 19th March 2025, 00:55   #904  |  Link
coricopat
Registered User
 
Join Date: Jan 2024
Posts: 54
Quote:
Originally Posted by nalor View Post
* eject disc and exit
* or just exit
* or use the ini parameter EjectDisc to define if the disc shall be ejected before the exit?
IMO it would be neat if one could control both via config setting:
- whether the programs run in a loop
- whether the disc would be auto-ejected (would also be nice for Linux, where that fails as Toad King mentioned, so one could simply disable it).

Last edited by coricopat; 19th March 2025 at 00:56. Reason: correct typo
coricopat is offline   Reply With Quote
Old 19th March 2025, 04:58   #905  |  Link
Toad King
Registered User
 
Join Date: Dec 2018
Posts: 16
Quote:
Originally Posted by coricopat View Post
- whether the disc would be auto-ejected (would also be nice for Linux, where that fails as Toad King mentioned, so one could simply disable it).
In the meantime, I've been able to patch the executable to fix ejection on Linux. I don't recommend doing this for Windows users. And you need a recent version of Wine for ejection to still work properly. (Anything after 10.0 should work.)

You can patch the 1.81 executable with this command:

Code:
xxd FindVUK.exe | sed -e 's/00217fd0: 8b5c 2418 83fb 020f 8503/00217fd0: 8b5c 2418 83fb 090f 8403/' -e 's/00218330: 0448 2d00 ff74 2420 e87d 76f2 ff21 c074/00218330: 0448 2d00 ff74 2420 e87d 76f2 ff21 c066/' -e 's/00218340: 0431/00218340: 9031/' | xxd -r > FindVUK.patched.exe
Afterwards the new patched executable should have a SHA1 checksum of 8f5e0033b2247af683b94b1c50f6d1efcc52c802.

This patches two things:
* Always do the FSCTL_LOCK_VOLUME/FSCTL_DISMOUNT_VOLUME/IOCTL_STORAGE_MEDIA_REMOVAL ioctls, regardless of drive type.
* Skip checking the return value of IOCTL_STORAGE_MEDIA_REMOVAL, since that fails in Wine.

EDIT: After some more investigating it looks like FindVUK tries to eject the disc drive twice in a row, which is the part that's triggering the bug.

Code:
2025-03-18 23:27:07 # 5444 # [I] findvuk_showresult / _EjectDisc / Eject the disc now from drive >e:\<
2025-03-18 23:27:07 # 5444 # [I] drive_ms / DRVMS_EjectMedia / Eject drive >e<
2025-03-18 23:27:10 # 8177 # [I] findvuk_showresult / _EjectDisc / Successfully ejected the media in drive e!
2025-03-18 23:27:10 # 8178 # [I] FindVUK_Main /  / Eject disc from drive >e< - insert next disc to validate or exit with ESC
2025-03-18 23:27:10 # 8178 # [I] FindVUK_Main / FVMAIN_Mode_ValidateDisc_EjectDisc / Eject the disc now from drive >e:\<
2025-03-18 23:27:10 # 8179 # [I] drive_ms / DRVMS_EjectMedia / Eject drive >e<
2025-03-18 23:27:10 # 8219 # [E] drive_ms / DRVMS_EjectMedia / ERROR! Couldn't remove the media in drive e!
2025-03-18 23:27:10 # 8269 # [E] FindVUK_Main / FVMAIN_Mode_ValidateDisc_EjectDisc / ERROR! Couldn't remove the media in drive e!
The first eject succeeds here but the second one called immediately after it is failing. If that is fixed then the IOCTL_STORAGE_MEDIA_REMOVAL call won't have to be patched to ignore the return value. Only the unmounting stuff for CD drives will still be required.

Last edited by Toad King; 19th March 2025 at 05:34.
Toad King is offline   Reply With Quote
Old 20th March 2025, 23:01   #906  |  Link
nalor
Registered User
 
Join Date: Dec 2013
Posts: 526
Quote:
Originally Posted by Toad King View Post
This patches two things:
* Always do the FSCTL_LOCK_VOLUME/FSCTL_DISMOUNT_VOLUME/IOCTL_STORAGE_MEDIA_REMOVAL ioctls, regardless of drive type.
* Skip checking the return value of IOCTL_STORAGE_MEDIA_REMOVAL, since that fails in Wine.

EDIT: After some more investigating it looks like FindVUK tries to eject the disc drive twice in a row, which is the part that's triggering the bug.
Found it - will prevent the double ejection in next release
nalor is offline   Reply With Quote
Old 21st March 2025, 23:23   #907  |  Link
nalor
Registered User
 
Join Date: Dec 2013
Posts: 526
Quote:
Originally Posted by Toad King View Post
The first eject succeeds here but the second one called immediately after it is failing. If that is fixed then the IOCTL_STORAGE_MEDIA_REMOVAL call won't have to be patched to ignore the return value. Only the unmounting stuff for CD drives will still be required.
A workaround is to set "EjectDisc=0" in the ini file - this prevents the first of the 2 ejects.

The fix will be to skip the 2nd eject in case the parameter is set to 1.
nalor is offline   Reply With Quote
Old Yesterday, 02:06   #908  |  Link
Toad King
Registered User
 
Join Date: Dec 2018
Posts: 16
Quote:
Originally Posted by nalor View Post
A workaround is to set "EjectDisc=0" in the ini file - this prevents the first of the 2 ejects.

The fix will be to skip the 2nd eject in case the parameter is set to 1.
That works here. With that the only other thing required for Wine support is the FSCTL_LOCK_VOLUME/FSCTL_DISMOUNT_VOLUME/IOCTL_STORAGE_MEDIA_REMOVAL calls for disc drive volumes.
Toad King is offline   Reply With Quote
Old Today, 00:34   #909  |  Link
nalor
Registered User
 
Join Date: Dec 2013
Posts: 526
Quote:
Originally Posted by Toad King View Post
That works here. With that the only other thing required for Wine support is the FSCTL_LOCK_VOLUME/FSCTL_DISMOUNT_VOLUME/IOCTL_STORAGE_MEDIA_REMOVAL calls for disc drive volumes.
The code used for disc-eject is basically the one as recommended by Microsoft:

MS KB165721

Update: just noticed there's a major difference, because the example always locks, dismounts and media-removes ... will check tomorrow in detail ...

Last edited by nalor; Today at 00:43.
nalor is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 22:20.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.