Is there a command line for this?
Is there a command line for this?
Hello all! First of all, I've just been messing with PCem for a week now, and I'm so in love with it I started ripping my CDs and building a Win95 games library. My ideal scenario would be to have shortcuts for each game in Windows 10, outside of PCem, each one opening the emulator and executing its respective game file (like is common with DOSBox). So far I've figured I can put a game shortcut on my Startup folder in Win95 and have a .bat file run "PCem.exe --config ".\configs\MyMachine.cfg"" to run the machine directly, and that works. But if I'm going to do that for multiple games, I'm looking at having a bunch of copies of the same HDD image, and multiple instances of Windows 95 with a single installed game in each. That sounds like such a dumb way to go about it.
So my question is... Is there a way to specify a file to be executed inside of the OS with a command line on a .bat file, or something like that? Any other alternate solution for what I'm trying to accomplish would be greatly appreciated as well.
Thanks a lot!
So my question is... Is there a way to specify a file to be executed inside of the OS with a command line on a .bat file, or something like that? Any other alternate solution for what I'm trying to accomplish would be greatly appreciated as well.
Thanks a lot!
Re: Is there a command line for this?
No there is no way because DOSBox emulates one single system (MS-DOS on an x86 PC) while PCem emulates the x86 hardware and can run any kind of system.
So if it assumed a prompt based system, then that would not work for a windowed system, and each windowed system would require its own method.
So if it assumed a prompt based system, then that would not work for a windowed system, and each windowed system would require its own method.
Re: Is there a command line for this?
I heard someone is working on trying to figure out a way to do something similar to that using PCem for a project, but I wouldn't be able to tell you what kind of progress is being made.
Re: Is there a command line for this?
Think the only way one can do it is with some sort of Lua script or some type of script that can send automagical keypresses, but not sure it would work for a guest Windows OS. I know there was a frontend that did it for other emulated machines
-
- Posts: 69
- Joined: Tue 12 Sep, 2017 4:33 am
- Location: Seattle, WA, USA
- Contact:
Re: Is there a command line for this?
With regards to what Cheez was saying, I think the project was part of the eXo set of projects. The thought was to have a base image of like Win95 and then use massive patches that were diffed from the main HDD image to "install" games on the fly. As far as I know, that got nowhere because of the inability to launch a specific configuration from the command line. I don't think that's the best option anyway, since you can configure a *relatively* large hard drive in Win9X and install a lot of old games pretty easily, especially if you have personally backed up images for your game discs at the ready.
Re: Is there a command line for this?
If they were thinking about a base image and specific diff-images on it, that should have worked sufficiently well with the support of VHD disk images that another user was implementing.
Then you wouldn't need any command line switches, just one .cfg configuration for each differential disk that you needed.
Then you wouldn't need any command line switches, just one .cfg configuration for each differential disk that you needed.
- ruben_balea
- Posts: 191
- Joined: Mon 08 May, 2017 11:24 pm
- Location: Spain
Re: Is there a command line for this?
Windows 95 can be really small removing (not installing) most useless (for gaming) things, I think that can be done only by upgrading from 3.x and using Windows 95 floppy release but I will take a look. I did it 25 years ago to use it on a 40MB hard drive.
- JohnElliott
- Posts: 113
- Joined: Sun 31 Jan, 2016 7:29 pm
Re: Is there a command line for this?
If someone seriously wanted to do this, I think the easiest way would be to have a single hard drive image and a bunch of floppy images, one for each program you wanted to launch. On each floppy have a LAUNCH.BAT with the appropriate command to run. Put a shortcut to B:\LAUNCH.BAT in the Windows startup group. Then use --load-drive-b when launching to select the respective floppy image in drive B:.
With the right tools it would even be possible to generate the floppy image on the fly...
With the right tools it would even be possible to generate the floppy image on the fly...
Code: Select all
#! /bin/sh
echo 'c:\\games\\chips.exe' > launch.bat
unix2dos launch.bat
mkp3fs -720 -dosonly -type raw launch.vfd launch.bat
pcem --load-drive-b launch.vfd
- ruben_balea
- Posts: 191
- Joined: Mon 08 May, 2017 11:24 pm
- Location: Spain
Re: Is there a command line for this?
Windows 95 RTM takes only 36.2MB with DirectX 6 installed
And goes to 44.6MB after installing DirectX 7
DirectX 6 is enough (it's the version included on the game CD) to play Commandos: Behind Enemy Lines
Steps were installing MS-DOS 5.00, then Windows 3.1 without any extra option, eve no printers, then upgrading to Windows 95 RTM Retail Upgrade Floppy release, custom install and uncheck all optional features, choose to not to keep previous OS, it keeps anyway C:\DOS folder but you can empty it later to save a couple of MB.
I added a secondary IDE drive to install Commandos there and it plays fine, slow but OK for 133MHz emulated only at 90%, I don't remember if that game recommended 166 or 200 or even 233...
I think that is should be possible to share one "C:" image (even if it's bigger and with a later Windows version) between a lot of machine configurations with alternative "D:" images,
making the Windows installed on "C:" to load run some command on "D:" at startup, like adding a registry entry to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run or HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run like "d:\mygame.bat" and have a "mygame.bat" on each image with the correct parameters for the game installed on that drive.
Each "D:" image size can be made to the size required by the game plus probably some extra MB for savegames and settings.
This can be just only other of my crazy ideas, try it at your own risk
And goes to 44.6MB after installing DirectX 7
DirectX 6 is enough (it's the version included on the game CD) to play Commandos: Behind Enemy Lines
Steps were installing MS-DOS 5.00, then Windows 3.1 without any extra option, eve no printers, then upgrading to Windows 95 RTM Retail Upgrade Floppy release, custom install and uncheck all optional features, choose to not to keep previous OS, it keeps anyway C:\DOS folder but you can empty it later to save a couple of MB.
I added a secondary IDE drive to install Commandos there and it plays fine, slow but OK for 133MHz emulated only at 90%, I don't remember if that game recommended 166 or 200 or even 233...
I think that is should be possible to share one "C:" image (even if it's bigger and with a later Windows version) between a lot of machine configurations with alternative "D:" images,
making the Windows installed on "C:" to load run some command on "D:" at startup, like adding a registry entry to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run or HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run like "d:\mygame.bat" and have a "mygame.bat" on each image with the correct parameters for the game installed on that drive.
Each "D:" image size can be made to the size required by the game plus probably some extra MB for savegames and settings.
This can be just only other of my crazy ideas, try it at your own risk
Re: Is there a command line for this?
PCem emulates a system, not a program. You're asking for a completely different kind of emulator here.
Re: Is there a command line for this?
The closest you would get, would be to create a game size hd image + an additional 50mb. Install windows 95 in the image, install the latest direct X, and some c ++ libraries, then remove everything not needed from windows (you can see videos on youtube explaining which files can be deleted from the windows folder), install the game, edit win.ini, replace "explorer.exe" with the game path , (eg "c:\games\nfsiii.exe") windows properly configured, will start up so fast, that you will not be able to view the boot screen, so as soon as the pcem virtual machine starts up, in a few seconds it will start your game. When you exit the game, windows is closed, and it is automatically closed (if the emulated motherboard supports acpi).
If you need help, I can make a video
If you need help, I can make a video
Re: Is there a command line for this?
This sounds like a very nice option. A similar option would be using Mtools (Windows version), which lets you read and write files in a disk image from the command line. So to tweak the example above a little, say you already had a launch.vfd file, you could replace the mkp3fs command with:JohnElliott wrote: ↑Thu 04 Jun, 2020 12:56 am With the right tools it would even be possible to generate the floppy image on the fly...Code: Select all
#! /bin/sh echo 'c:\\games\\chips.exe' > launch.bat unix2dos launch.bat mkp3fs -720 -dosonly -type raw launch.vfd launch.bat pcem --load-drive-b launch.vfd
Code: Select all
mcopy -i launch.vfd launch.bat ::
If you set up a configuration file for mtools, you can get it to read/write raw hard disk images too, in which case you actually assign them a drive letter like "C:" instead of the temporary "::". If you do that you should probably back up the hard disk image first just in case it does something to the filesystem that your OS doesn't like, but I don't recall having any trouble with it in the past.
Apologies in advance for not responding, I don't check back here very often.