VOGONS

Common searches


First post, by Mu0n

User metadata
Rank Member
Rank
Member

Here's what I work with:

Win98SE running inside a weeCee (Tiny Vortex86-based DOS gaming PC - weeCee )
DAEMON Tools 3.47

a script.bat file that does 2 steps:
-unmount drive 0's mounted CD image
-mount a specific CD image

contents of the bat file:

"c:\program files\d-tools\daemon.exe" -noicon -unmount 0
"c:\program files\d-tools\daemon.exe" -noicon -mount 0,"C:\dump\my2ndCD.cue"

What I want to do:
1) Have a 'my1stCD.cue' mounted through normal means (using the graphical interface of DAEMON Tools, whatever)
2) launch a fullscreen game that stays focused and never gets alt-tabbed to desktop (otherwise, it crashes)
3) while the game is still running, have my batch run as a background task that doesn't steal focus away from the game and swaps the mounted image, so that 'my1stCD.cue' is unmounted and 'my2ndCD.cue' gets mounted

*the game needs the first cd to launch itself, but then asks for disc 2 at a specific point in time because I'm nearing the end in my playthrough*

Things I've tried that failed including the [reason]:

1) Just alt-tabbing away from the game to swap the disc myself [the game crashes due to a surface render error, aka it's not alt-tab friendly at all]
2) Use Win98SE task scheduler to perform a do-once task set 2 minutes in the future [fails because it steals focus and forces the view to come back to desktop, crashing the game]
3) tack on a CHOICE /c:y /t:y,60 as the first line of the script.bat file, and I run it *before* I start the game [the choice command needs windows focus of its ms-dos command window in order to run its course and elapse time]
4) mount both discs on D: and E: [the game stubbornly only accepts discs on drive D:]

The solution must NOT:
involve a physical optical drive, I don't have access to a vintage one, I'd rather do the solution through software only please, and I'll learn a new trick in the process

Note: if you must know, the game is the 7th Guest.
I don't want to run it in another environment, I don't want to start my game over, I just want to push through a solution with the tools and ressources I have.

1Bit Fever Dreams: https://www.youtube.com/channel/UC9YYXWX1SxBhh1YB-feIPPw
DOS Fever Dreams: https://www.youtube.com/channel/UCIUn0Dp6PM8DBTF-5g0nvcw

Reply 2 of 8, by Mu0n

User metadata
Rank Member
Rank
Member
DosFreak wrote on 2023-05-18, 00:27:

Is this the Windows version of the game?
Are you using the DirectX player beta for the game?

Although I can certainly provide these details, it doesn't change the end goal of being able to run no-focus-grabbing background tasks, that could be useful in many other contexts.

It's the DOS version of the game.
I patched it to v1.30, then used the Beta player (v32tng.exe) so that it doesn't run with glitchy corrupted graphic that show up under the mouse cursor.

1Bit Fever Dreams: https://www.youtube.com/channel/UC9YYXWX1SxBhh1YB-feIPPw
DOS Fever Dreams: https://www.youtube.com/channel/UCIUn0Dp6PM8DBTF-5g0nvcw

Reply 3 of 8, by Mu0n

User metadata
Rank Member
Rank
Member

Found a solution!

Inside a Win98se command window, I type:

wscript sol.vbs /nologo /b

(wscript is vbs script hosting that appeared in late win95 and stayed on with win98 henceforth)

inside sol.vbs, I have:

Set WshShell = WScript.CreateObject("WScript.Shell")
Dim dteWait
dteWait = DateAdd("s",65,Now())
Do Until (Now() > dteWait)
Loop
WshShell.Run "c:\progra~1\d-tools\daemon.exe -unmount 0",6,true
WshShell.Run "c:\progra~1\d-tools\daemon.exe -mount 0,C:\dump\7thGCD~1\T7G2.cue",6,true

The lines from Dim to Loop is adjusted to wait about 65s, plenty of time to launch the script with the wscript line above, then launch the game through the Directx beta player, wait for the intro laughter to end, load my saved game that's on the 2nd floor, navigate left, fwd, fwd, fwd, right, fwd, fwd to open the door leading to the stairs of the 3rd floor (it's where you're asked to swap to disc 2), fiddle my thumbs for about 15s, then I saw it....

the cursor turned to the hourglass while daemon tools unmounted the disc 1 in D:
a few seconds pass
the cursor once against transformed into the hourglass indicated the disc 2 was inserted in D:
then I could click on the giant CD swap image and it worked!

I finally beat the game and now have a method for mounting discs at key moments for non-alt-tab-friendly games.

Here's how I arrived at it:

-realizing the way to go is with Windows Script Hosting
-realizing that it comes already installed in Win98SE, just type wscript in a command window followed by your script file (I called it sol.vbs, sol as in solution) with /nologo /b
-realizing that the operations should just 100% come from this using a WshShell object that can issue run commands, with option 6 to execute inside an already minimized window without stealing focus, exactly what I wanted

1Bit Fever Dreams: https://www.youtube.com/channel/UC9YYXWX1SxBhh1YB-feIPPw
DOS Fever Dreams: https://www.youtube.com/channel/UCIUn0Dp6PM8DBTF-5g0nvcw

Reply 4 of 8, by RandomStranger

User metadata
Rank Oldbie
Rank
Oldbie

Did you apply a crack to the game?
GTA III is a little bit different, it never needs Disc 1, but maybe what I did with that works in your case.
So, I added the complete second disc to the image of Disc 1. The game doesn't care, it finds the files it normally looks for on Disc 2. I even burned it to a large capacity CD.

sreq.png retrogamer-s.png

Reply 5 of 8, by Mu0n

User metadata
Rank Member
Rank
Member
RandomStranger wrote on 2023-05-20, 06:16:

Did you apply a crack to the game?

No.

1Bit Fever Dreams: https://www.youtube.com/channel/UC9YYXWX1SxBhh1YB-feIPPw
DOS Fever Dreams: https://www.youtube.com/channel/UCIUn0Dp6PM8DBTF-5g0nvcw

Reply 6 of 8, by doshea

User metadata
Rank Member
Rank
Member

AutoHotkey might be useful for this. It seems to be pretty good at trapping keystrokes regardless of what is running, and you can get it to run external programs. I don't like its language very much but you can find plenty of examples, in fact there seem to be plenty of examples of using it specifically with Daemon Tools although they might be mostly with newer versions of AutoHotkey, Windows and Daemon Tools, I don't know.

There are older versions of AutoHotkey which work back to Windows 95 although they won't work on a clean install of 95 RTM, you need to install some extra libraries or something (I made a build which works on 95 RTM, must release it one day!). They should work just fine on 98 SE.

Reply 7 of 8, by Mu0n

User metadata
Rank Member
Rank
Member
doshea wrote on 2023-05-22, 11:47:

AutoHotkey might be useful for this. It seems to be pretty good at trapping keystrokes regardless of what is running, and you can get it to run external programs. I don't like its language very much but you can find plenty of examples, in fact there seem to be plenty of examples of using it specifically with Daemon Tools although they might be mostly with newer versions of AutoHotkey, Windows and Daemon Tools, I don't know.

There are older versions of AutoHotkey which work back to Windows 95 although they won't work on a clean install of 95 RTM, you need to install some extra libraries or something (I made a build which works on 95 RTM, must release it one day!). They should work just fine on 98 SE.

I don't see how. If Daemon Tools had a keyboard stroke to swap discs (and 'if' is doing a lot of work here), you'd need focus of daemon tools in order for it to trigger, which would make you go back to desktop and crash the game, defeating the whole purpose.

I also found a working solution and I was able to swap to disc 2 and finish the game, see my last post above!

1Bit Fever Dreams: https://www.youtube.com/channel/UC9YYXWX1SxBhh1YB-feIPPw
DOS Fever Dreams: https://www.youtube.com/channel/UCIUn0Dp6PM8DBTF-5g0nvcw

Reply 8 of 8, by doshea

User metadata
Rank Member
Rank
Member
Mu0n wrote on 2023-05-22, 12:19:

I don't see how. If Daemon Tools had a keyboard stroke to swap discs (and 'if' is doing a lot of work here), you'd need focus of daemon tools in order for it to trigger, which would make you go back to desktop and crash the game, defeating the whole purpose.

AutoHotkey can run external programs, so it should be able to run the Daemon Tools command line tool just like you did from your .vbs script, or in fact it could probably run a .vbs script. I suppose there is a chance that neither the "Min" or "Hide" options actually prevent the game from losing focus though, in which case it might still crash the game.

I mention it because it could probably be used for a more general solution where there isn't a good time to swap discs automatically, which you don't need but someone else might. I wouldn't be surprised if someone has already made a script which lets you cycle through discs like in DOSBox.