VOGONS


First post, by eddman

User metadata
Rank Member
Rank
Member

I started experimenting with PCem yesterday. I had no prior experience with PC emulation and my understanding of emulation in general is quite basic.

My PC:
Ryzen 2600 (stock)
16 GB

My emulated test specs:
Mobile Pentium MMX 300
128 MB
Mach64 VT2
Voodoo 2
SB16
Windows 98 SE

I've noticed that the effective clockspeed & emulation speed constantly change during the usage of pcem. While idling in the windows environment the clockspeed sits at 300 MHz and emulation speed sits at about 80% which, from what I've understood so far, means that my PC isn't powerful enough to emulate a PMMX 300.

I then thought of testing a game to see how it would actually perform. I ran Need for Speed 2 SE and noticed that the clockspeed hovered about 250-260 MHz but the emulation speed was now at 100% with minor fluctuations and the game performed very smoothly.

Why does the effective clockspeed change when doing different tasks? How come a game (which I thought would be more taxing) runs at full emulation speed and yet windows itself doesn't?

P.S. is there a way to check/monitor the in-game frame rate?

Attachments

Reply 1 of 6, by leileilol

User metadata
Rank l33t++
Rank
l33t++

You can run an old HLT-spamming systray 'cooling' app like Rain, Waterfall etc. to reduce the idle usage on execution.

Also execution % all depends on what you run on it, usually for me what brings it down is self-modifying code making the recompiler thrash a bit for some games (like the effects in Terra Nova), and too many frames being rendered (Voodoo2 emulation at times)

apsosig.png
long live PCem

Reply 2 of 6, by eddman

User metadata
Rank Member
Rank
Member

But why does the clockspeed change? How could the clockspeed be lower than the selected CPU and yet emulation speed be reported at 100%?

I tried quake 2 in software mode at 1024x768 to put as much load as I can on the system (the average fps was ~9). Again, the clockspeed dropped but emulation speed was at ~100%.

Does PCem automatically choose the appropriate clockspeed to hit 100% in applications? If so, why that doesn't happen for windows itself?

Reply 3 of 6, by jesolo

User metadata
Rank l33t
Rank
l33t

It's been a while since I've played with PCem but, you need a very fast CPU to emulate a 300 MHz CPU.

A while back I read somewhere that the developer purposely decided not to emulate any faster CPU above that of a Pentium 1, due to the high demand that it places on the host PC.

Unless my understanding is incorrect, 100 % means that your host CPU is able to run the emulated (or virtual) PC at full capacity. Also bear in mind that you can't get more than 100 % out of your host CPU. Therefore, when the emulator pushes your host CPU over 100 % utilisation, and depending on what other resources are taxing your host CPU (i.e., is it just idling or are you running a very CPU intensive game inside your emulator) it will naturally start to throttle back on the CPU speed of the emulator, since that is effectively all what your host CPU can give you.

I'm not sure myself why Windows sits idling at 80 % but, I think there might be a threshold that applies within PCem whereby it can apply a "buffer" until you tax your host CPU too much. I'm willing to bet that, as soon as you start to run some CPU intensive tasks within Windows (opening a couple of applications, running one or two file compressions), you will probably see it also throttling back on the emulated CPU frequency in order to keep up with demand.

I would say that a Pentium 233 MMX is probably the maximum CPU speed that you should try to emulate on your host PC, taking into consideration the additional resources required to run a game inside your emulator.

Reply 4 of 6, by leileilol

User metadata
Rank l33t++
Rank
l33t++
eddman wrote on 2020-02-22, 17:36:

But why does the clockspeed change? How could the clockspeed be lower than the selected CPU and yet emulation speed be reported at 100%?

That's "effective" clockspeed you're reading. This drops when something else (usually the video card's timing) gives a bottleneck.

jesolo wrote on 2020-02-22, 19:30:

A while back I read somewhere that the developer purposely decided not to emulate any faster CPU above that of a Pentium 1, due to the high demand that it places on the host PC.

V15 has AMD K6-III+'s and I can even 100% some games on K6-2 300... There's also higher end Cyrix6x86 CPUs.

apsosig.png
long live PCem

Reply 5 of 6, by Jo22

User metadata
Rank l33t++
Rank
l33t++
leileilol wrote on 2020-02-22, 01:27:

You can run an old HLT-spamming systray 'cooling' app like Rain, Waterfall etc. to reduce the idle usage on execution.

+1

That's also recommending for running good ol' Windows 3.1 in modern VMs.
Without a HLT helper program like WQGHLT.386 (a VXD; needs 386 Enhanced Mode running) or activating
an artificial CPU usage limit manually in the VM config, 3.1 will keep the CPU busy at 90-100% most of the time.
CPU usage on Mac

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 6 of 6, by Tertz

User metadata
Rank Oldbie
Rank
Oldbie

Seems, that PCem needs own benchmark theme so people could assume what computer analogue they may expect to get.
For Win9x era computers, applications and games the perfrormance in Unreal + Voodoo 2 mb messured, for example. Though, newer Direct3D card emulation would be better for Win9x tasks as Win95 had up to DirectX 8.0a what leads to GF3-4.
PCem was at raw stage and slow to be used for games recently. Mb now the situation has changed for this research.

DOSBox CPU Benchmark
Yamaha YMF7x4 Guide