Close PCem after Windows Shutdown

Support and general discussion.
Post Reply
otavioraposojr
Posts: 2
Joined: Sun 03 Jan, 2021 6:49 pm

Close PCem after Windows Shutdown

Post by otavioraposojr »

Is it possible to configure PCem to automaticaly close itself (shutdown the machine) after a Windows shutdown has been performed?
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: Close PCem after Windows Shutdown

Post by leilei »

If you've started PCem with the --config parameter, and the guest uses a newer APIC supported motherboard and Windows 98+ is configured for that, then it should completely exit.
otavioraposojr
Posts: 2
Joined: Sun 03 Jan, 2021 6:49 pm

Re: Close PCem after Windows Shutdown

Post by otavioraposojr »

Could you give me an example for an APIC supported motherboard compatible with a Pentium MMX 233 ?
Also, what/where should I configure the option in Windows 98?
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: Close PCem after Windows Shutdown

Post by leilei »

I typoed, I meant ACPI. The FIC VA-503+ should do it at least.
User avatar
ruben_balea
Posts: 191
Joined: Mon 08 May, 2017 11:24 pm
Location: Spain

Re: Close PCem after Windows Shutdown

Post by ruben_balea »

otavioraposojr wrote: Sun 03 Jan, 2021 10:05 pm Could you give me an example for an APIC supported motherboard compatible with a Pentium MMX 233 ?
Also, what/where should I configure the option in Windows 98?
The easiest way is (re)installing Windows 98 from MS-DOS command line and using the pj parameter to enable ACPI support, for example d:\win98\setup.exe /pj
*If your copy of Windows is in Spanish "setup.exe" was renamed to "instalar.exe"

To install Windows 98 from MS-DOS command line you can boot from a floppy with CD-ROM drivers or directly from the Windows 98 CD-ROM, but you may need to enable and/or change the boot order of CD-ROM on BIOS setup, on Award BIOS it's under BIOS FEATURES SETUP:
*Of course you need a bootable Windows 98 CD-ROM or image file, I think that some releases of Windows 98 first edition weren't bootable.

Screenshot from 2021-05-01 05-19-17.png
Screenshot from 2021-05-01 05-19-17.png (8.47 KiB) Viewed 4974 times
If you already have an operating system installed on the hard drive then set the CDROM as the first device to boot from (CDROM, C, A) otherwise it will boot from the hard drive.

Screenshot from 2021-05-01 05-19-38.png
Screenshot from 2021-05-01 05-19-38.png (11.5 KiB) Viewed 4974 times
Step 1: Boot from CD-ROM the first time to run the installer from DOS, on subsequent reboots choose boot from hard disk to continue installation and loading Windows after installation:

Screenshot from 2021-05-01 05-05-44.png
Screenshot from 2021-05-01 05-05-44.png (2.41 KiB) Viewed 4974 times
Step 2: Start computer with CD-ROM support:

Screenshot from 2021-05-01 05-05-58.png
Screenshot from 2021-05-01 05-05-58.png (4.33 KiB) Viewed 4974 times
Step 3: Go to CD-ROM drive letter (usually d:) change to folder win98 and run setup /pj

Screenshot from 2021-05-01 05-06-37.png
Screenshot from 2021-05-01 05-06-37.png (9.28 KiB) Viewed 4974 times
After you install Windows 98 you can revert the BIOS boot sequence to the default option (A, C, SCSI) or any other combination you prefer.
*In the boot sequence you can choose any drive types even if your machine does not have them installed, those not present will simply be skipped.
User avatar
cnterr
Posts: 4
Joined: Thu 13 Apr, 2023 2:40 pm
Location: Italy - Pesaro

Re: Close PCem after Windows Shutdown

Post by cnterr »

Hi all, I configured PCem to emulate a machine with:

MB: Gigabyte GA-686BX
CPU: PII 450
RAM: 512 MB
GPU: 3dfx Voodoo 3 3000
Sound: Sound Blaster AWE32

I created a 2GB virtual HDD, single partition in FAT32 using FDISK;
Copied the contents of the CD folder "Win98" to "C:\Windows\Options\Cabs";
Installed Windows using the above folder as source and using the "setup /pj" command to enable ACPI;
At the end of the "Windows 98 SE" installation I installed the latest drivers for chipset, video and audio.

Everything works great and without lag, including the games I tried, however, while restarting the system works fine, shutting down does not close the emulator and it gets stuck on the Windows screen "Shutting down".
Windows actually shuts down correctly because the classic scan is not performed when restarted, but in fact it seems not to be able to "turn off" the emulated PC.
Is there something to add in the config file or some command line parameter?
User avatar
ruben_balea
Posts: 191
Joined: Mon 08 May, 2017 11:24 pm
Location: Spain

Re: Close PCem after Windows Shutdown

Post by ruben_balea »

It may be Windows 98 SE itself, sometimes hangs during shutdown, there was a patch for it called "Windows 98 Second Edition Shutdown Supplement" but it's no longer available from MS, the file name is "239887UP.EXE"
Download it here: https://www.computerhope.com/download/w ... 9887UP.EXE
User avatar
cnterr
Posts: 4
Joined: Thu 13 Apr, 2023 2:40 pm
Location: Italy - Pesaro

Re: Close PCem after Windows Shutdown

Post by cnterr »

OK, thanks, I'll try as soon as possible.
User avatar
cnterr
Posts: 4
Joined: Thu 13 Apr, 2023 2:40 pm
Location: Italy - Pesaro

Re: Close PCem after Windows Shutdown

Post by cnterr »

Nothing to do, not even by running it with the command --config and shutdown patch installed... :cry:
User avatar
ruben_balea
Posts: 191
Joined: Mon 08 May, 2017 11:24 pm
Location: Spain

Re: Close PCem after Windows Shutdown

Post by ruben_balea »

It seems a lot ot times it is the video card IRQ, try another video card, if it was due to the video card try this: https://support.industry.siemens.com/cs ... 0&lc=en-ME

Take a look to the Microsoft Knowledge Base Article - 238096 for more tips https://web.archive.org/web/20030201171 ... bid=238096

Here are a few other tips: http://www.helpwithwindows.com/windows98/troub-51.html If you need to update the shutdown supplement to the 23 October 1999 release you can download it here: http://web.archive.org/web/200610240630 ... 756US8.EXE

I think Internet Explorer 4.01 also caused shutdown problems.

You could change (without having to reinstall Windows, I can try to make a guide if required) from ACPI system to traditional BIOS system, but I have tried and it works perfectly for me in both ways, but in ACPI mode Windows uses less CPU, Among other things, it executes the HLT instruction on idle cycles to stop the CPU when it's not needed.
Post Reply