Is there a command line for this?

Support and general discussion.
Post Reply
maajin
Posts: 1
Joined: Wed 27 May, 2020 7:21 am

Is there a command line for this?

Post by maajin »

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!
JosepMa
Posts: 163
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Is there a command line for this?

Post by JosepMa »

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.
Cheez
Posts: 52
Joined: Tue 19 Dec, 2017 4:08 am

Re: Is there a command line for this?

Post by Cheez »

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.
User avatar
te_lanus
Posts: 130
Joined: Tue 28 Jul, 2015 4:47 am

Re: Is there a command line for this?

Post by te_lanus »

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
darksabre76
Posts: 62
Joined: Tue 12 Sep, 2017 4:33 am
Location: Seattle, WA, USA
Contact:

Re: Is there a command line for this?

Post by darksabre76 »

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.
JosepMa
Posts: 163
Joined: Tue 20 Jun, 2017 6:25 pm

Re: Is there a command line for this?

Post by JosepMa »

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.
User avatar
ruben_balea
Posts: 123
Joined: Mon 08 May, 2017 11:24 pm
Location: Spain

Re: Is there a command line for this?

Post by ruben_balea »

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.
User avatar
JohnElliott
Posts: 106
Joined: Sun 31 Jan, 2016 7:29 pm

Re: Is there a command line for this?

Post by JohnElliott »

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...

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
User avatar
ruben_balea
Posts: 123
Joined: Mon 08 May, 2017 11:24 pm
Location: Spain

Re: Is there a command line for this?

Post by ruben_balea »

Windows 95 RTM takes only 36.2MB with DirectX 6 installed

Win95B+DX6.png
Win95B+DX6.png (9.63 KiB) Viewed 726 times
And goes to 44.6MB after installing DirectX 7
Win95B+DX7.png
Win95B+DX7.png (14.36 KiB) Viewed 726 times
DirectX 6 is enough (it's the version included on the game CD) to play Commandos: Behind Enemy Lines

Win95B+DX6+Commandos1-BEL.jpg
Win95B+DX6+Commandos1-BEL.jpg (271.81 KiB) Viewed 726 times
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.

:roll: This can be just only other of my crazy ideas, try it at your own risk ;)
User avatar
leilei
Posts: 796
Joined: Fri 25 Apr, 2014 4:47 pm

Re: Is there a command line for this?

Post by leilei »

PCem emulates a system, not a program. You're asking for a completely different kind of emulator here.
User avatar
Rikintosh
Posts: 5
Joined: Sat 06 Jun, 2020 5:10 pm
Location: São Paulo, Brazil

Re: Is there a command line for this?

Post by Rikintosh »

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
Post Reply