Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mount a cd image option #53

Open
Blad3forc3 opened this issue Apr 3, 2024 · 23 comments
Open

Mount a cd image option #53

Blad3forc3 opened this issue Apr 3, 2024 · 23 comments

Comments

@Blad3forc3
Copy link

I cant see how to mount an image of a cd game within the flatimage.
When the flatimage is created it will automatically mount the cd image (preferably with cdemu as it wont lose any cd audio in mixed mode cd images) and then run the game

@ruanformigoni
Copy link
Owner

This is on the works, some technical issues to get around. I thought of a screen in the wizard, where you'd add a list of iso's that would be mounted every time the image was started, to the selected drive letters. This would also mount them during the install process, allowing to select the default executable to start from the iso or an install path.

@Blad3forc3
Copy link
Author

Ok cool. Please bear in mind that mounting a mixed mode image (1st track is data and then followed by audio tracks) doesn't mount as it should using regular methods in Linux as they just mount the first data track and the game will lose any audio tracks whilst playing the game. Cdemu does work in this regard although it would mean an external dependency from the flat image.
Also could an option to add a prefix to the command to run the actual game. For example using dgvoodoo. After installing a game I find some games work better and look better when putting the dlls into the game folder (within the wine prefix) then executing WINEDLLOVERRIDES=D3D9, D3DIMM,DDRAW=N,B followed by the exe to run the actual game.
Could this be incorporated?

@ruanformigoni
Copy link
Owner

Ok cool. Please bear in mind that mounting a mixed mode image (1st track is data and then followed by audio tracks) doesn't mount as it should using regular methods in Linux as they just mount the first data track and the game will lose any audio tracks whilst playing the game. Cdemu does work in this regard although it would mean an external dependency from the flat image.

Cool, thanks for the info!

Also could an option to add a prefix to the command to run the actual game. For example using dgvoodoo. After installing a game I find some games work better and look better when putting the dlls into the game folder (within the wine prefix) then executing WINEDLLOVERRIDES=D3D9, D3DIMM,DDRAW=N,B followed by the exe to run the actual game.
Could this be incorporated?

You can already do this adding as an environment variable:

override

@Blad3forc3
Copy link
Author

I missed that one Ruan! Thanks

@Blad3forc3
Copy link
Author

Maybe i'm being a little slow here but where exactly is this environment variables option during the creation of the flatimage Ruan?

@ruanformigoni
Copy link
Owner

During the creation there is still no option in the GUI, I'll add it in the wine configure frame. You can set it in the terminal meanwhile and do gameimage.run.

@Blad3forc3
Copy link
Author

Thanks Ruan. It would be a handy option to select whilst creating it.

@ruanformigoni
Copy link
Owner

@Blad3forc3 Now in v1.0.3 you can set environment variables from the configure frame. They'll be saved with the game, so you don't have to re-input them in the launcher. Also, you can modify/erase them in the launcher afterwards.

@Blad3forc3
Copy link
Author

Blad3forc3 commented Apr 6, 2024

So if I've got a cd to mount before the game starts I would just enter cdemu load 0 ?
Where would I store the image file?

@ruanformigoni
Copy link
Owner

Maybe i'm being a little slow here but where exactly is this environment variables option during the creation of the flatimage Ruan?

My previous reply was to this. Mount cd option is still open todo.

@Blad3forc3
Copy link
Author

Sorry Ruan. 😊

@ruanformigoni
Copy link
Owner

ruanformigoni commented Apr 6, 2024

No problem, I forgot to quote. Here is how it is now:

set_environ

set_environ

@Blad3forc3
Copy link
Author

Fantastic. Seems a lot more intuitive having it there and a good idea to have the option still in the launcher too

@Blad3forc3
Copy link
Author

Theres a few older games that actually run off the cd, would it be possible to make it so the exe file list includes exes on the cd image? I've tried copying all the files from the cd to a folder but it doesnt work

@ruanformigoni
Copy link
Owner

Yes, since the images will auto-mount each time the runner executes, I'll be able to list them as selectable in the list even during the wizard install.

@Blad3forc3
Copy link
Author

Is there any update on this area Ruan?

@ruanformigoni
Copy link
Owner

Not yet, multiple .exes #59 will come first.

@Tell-Sackett
Copy link

Tell-Sackett commented May 28, 2024

@Blad3forc3
In the meantime, (while it's not a perfectly comparable experience) here is a somewhat functional workaround (though it would still require you to have the physical disk in a physical drive).

  1. Take the iso of your game you are wanting to play (extracted via K3b, ImgBurn, etc.) and unpack it via an application such as "PeaZip".
  2. When you reach the part of the gui process where you are asked to install the media, figure out how to do this for the files you have. For me, the extracted game files had a "setup.exe", which I selected, and I was prompted through the installation process for the game.
  3. Once you reach the part of the GI gui process where you are prompted to select an executable for your FlatImage, insert your game disk into your physical drive and wait for it to mount.
  4. Now, with your file-browser, go into the flatimage temporary "build" directory > "game_name" directory > "wine" directory > "dosdevices" directory.
  5. Here, open your terminal and and use the following command: ln -s "/path/to/your/currently/mounted/game/disk/directory/" "<lowercase_arbitrary_drive_letter_not_being_used>:". For me, I used the following: ln -s "/media/me/Deer Hunter 2003/" "y:"
  6. After making the symbolic link, proceed with the GI gui process by selecting the executable you want the flatimage to use, etc.

By following this process, you should be able to launch your new flatimage game as long as the disk is in your physical drive.

With all of that said, I actually checked out CDEmu as well (while trying to find a convenient way to get my game portably working), and the above method, again, is certainly no replacement for CDEmu's functionality (assuming I understand the program's functionality correctly). My disk-based game is, from my understanding, abandonware and quite old and I wanted to make sure there was a less-cumbersome way of preserving it. While I didn't bother trying to get CDEmu, itself, set-up (it seemed too complicated for me given the time I had, and there's no way I could understand how it would interact with GameImage/flatimages anyway), I did attempt using Lutris to get both "WinCDEmu" and "Daemon Tools" to work through wine, but both failed due to the fact that they were unable to properly install the drivers during set-up. Other individuals online seemed to be having similar experiences when using wine as well, from my understanding (see WineHQ - WinCDEmu and WineHQ - Daemon Tools). As such, if it is, indeed, possible to get CDEmu working inside a FlatImage, that would be really cool!

Hope this helps!

@Blad3forc3
Copy link
Author

@TellSackett

Thanks for the attempt and while it probably would work for certain images I think the idea of being able to store the image within the flat image as a full cd image is better. There is also the problem that by extracting the data from the cd any games that have mixed mode CDs will lose all cd audio that way.
Cdemu is the only way I have seen in Linux to mount the image fully with data and audio

@ruanformigoni
Copy link
Owner

ruanformigoni commented Oct 18, 2024

@Blad3forc3 , have you looked into pcem? here is a youtube video. For abandonware that require CD-ROM, this seems like a feasible solution, and since the entire thing is emulated, there is no need to interact with cdemu. I that works, I can try to integrate with gameimage.

@Blad3forc3
Copy link
Author

I missed this post Ruan apologies!
I have tried PCem and it does actually work but can be a bit sluggish with certain games.
Is it not possible to incorporate the image within the flatimage and just call it to mount externally using cdemu, like we did with the appimage?

if ! command -v cdemu &>/dev/null; then
notify-send "cdemu not found, please install it to use the gameimage"
exit 1
fi
cdemu load 0 "$APPDIR/app/980310_1103.cue"

@Blad3forc3
Copy link
Author

Blad3forc3 commented Nov 1, 2024

I am trying to incorporate wine within a folder and call a linux script to mount the cd image located within the flatimage and run the game but it is failing. I have uploaded the folder (just need to be copied to the linux folder during the linux flatimage build) and use the script file "start" to run it. The script has been modified from linuxrulez (respect).
When i run "start" without any flatimage involvement it works as I want to. It mounts the cd image, runs the game and unmounts the cd image after closing the game.
WHen testing the script within gameimage it randomly closes the whole program whilst looking for scripts to run.
Also when it does get to a list of scripts selecting start then test on the next screen it doesnt run
Could you take a look at it Ruan?

https://mega.nz/#P!AgFcuFXIsECIezarU3H5--ptwddcSnvxL2Xi1opmOQKw4WBsGwC3O6gHeJ1ci5-mPLKwIbdbmQmbH34CoovyX4FVYi_3ByyeBo8cR2OZ6KQA4XbqI8S41gBqWyh-YAkMHTKJ6biupR4

Password is ActuaGolf2

@ruanformigoni
Copy link
Owner

ruanformigoni commented Nov 3, 2024

No problem! That should be possible to do with fim_portal, I'll try to integrate this with the GUI to avoid headaches with scripting. If you want to run cdemu on the host, you need to run it as fim_portal cdemu load 0 .....

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

No branches or pull requests

3 participants