DOS running at 65Hz instead of 70Hz, audio issues.

Support and general discussion.
Post Reply
User avatar
James-F
Posts: 88
Joined: Tue 30 May, 2017 10:26 am

DOS running at 65Hz instead of 70Hz, audio issues.

Post by James-F »

Something confuses PCem to run DOS in 65Hz instead locked 70Hz, it affects some Mode 13 games and produce choppy audio.
Prince of Persia 2 for example will have stuttering audio in the intro because PCem runs it at 65Hz instead of standard 70Hz, but only the intro... very strange.
I don't think It's related to the host CPU since Doom for example is much more demanding game and it runs at 70Hz no problem.
Sara, any idea what's going on?
Attachments
65Hz 2.png
65Hz 2.png (204.58 KiB) Viewed 12644 times
65Hz.png
65Hz.png (63.45 KiB) Viewed 12649 times
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: DOS running at 65Hz instead of 70Hz, audio issues.

Post by SarahWalker »

Please provide your configuration.
User avatar
James-F
Posts: 88
Joined: Tue 30 May, 2017 10:26 am

Re: DOS running at 65Hz instead of 70Hz, audio issues.

Post by James-F »

Emulated:
Machine: ASUS P55T2P4, Pentium 133, 16MB.
GPU: S3 ViRGE/DX Fast VLB/PCI
Sound: SBPro2.

Host:
i7 3770k at 3.9GHz all cores.
GTX660

I don't think it's a host speed issue, since I've mentioned that much heavier games like Doom or Duke3D run at 70Hz perfectly fine with emulation speed 100% locked (CPU Time below 100%),, but DOS text mode does not.
I don't understand why the refreshrate fluctuates at all? It should be locked at 70Hz in Text Mode and Mode 13h.

EDIT:
When executing EDIT.EXE/COM for example the refresh rate is back to normal 70Hz....
Maybe it's an issue with CPU running in Protected vs Real mode?

EDIT2:
I've noticed that in DOS the "CPU Speed MIPS" are significantly higher then when playing a game (like Doom).
At DOS idle it's running at 0.324 MIPS, and Doom is running at 0.001 MIPS.
User avatar
James-F
Posts: 88
Joined: Tue 30 May, 2017 10:26 am

Re: DOS running at 65Hz instead of 70Hz, audio issues.

Post by James-F »

Sorry for double posting, I found the problem.

In config.sys REM-ing the EMM386.EXE line fixes the MIPS overload in DOS, and no more audio issues in games.
Apparently EMM386.EXE produces a lot of instructions in PCem.
EMM386 is essential to load drivers into high memory and free conventional memory for DOS games.

According to wikipedia: https://en.wikipedia.org/wiki/EMM386
When running protected mode applications emm386 is bypassed, that's why I was seeing MIPS getting much lower in games.

EDIT:
Found a better replacement for EMM386.EXE,, it's called UMBPCI.SYS and it works like magic to load drivers in high memory, but only on compatible motherboards (chipset).
The EMM386 high MIPS usage should still be investigated.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: DOS running at 65Hz instead of 70Hz, audio issues.

Post by SarahWalker »

It's already known what causes excessive recompilation with EMM386.
User avatar
James-F
Posts: 88
Joined: Tue 30 May, 2017 10:26 am

Re: DOS running at 65Hz instead of 70Hz, audio issues.

Post by James-F »

Wow, that was quick!
I'm sure many people using EMM386 are oblivious to that it drastically slows down emulation.
Probably should be documented somewhere until the next release of PCem.
User avatar
SarahWalker
Site Admin
Posts: 2054
Joined: Thu 24 Apr, 2014 4:18 pm

Re: DOS running at 65Hz instead of 70Hz, audio issues.

Post by SarahWalker »

If I listed all the things that slow down emulation we'd be here all day. It's not worth it.
SeanB
Posts: 12
Joined: Wed 07 Mar, 2018 12:57 am

Re: DOS running at 65Hz instead of 70Hz, audio issues.

Post by SeanB »

This is new to me too. Which supported motherboards are compatible with UMBPCI.SYS?

It looks like at a minimum that it only supports Pentium and above.

https://www.uwe-sieber.de/umbpci_e.html
User avatar
James-F
Posts: 88
Joined: Tue 30 May, 2017 10:26 am

Re: DOS running at 65Hz instead of 70Hz, audio issues.

Post by James-F »

Yes, 430xX motherboards in PCem.
You don't really have to use EMM386 or UMBPCI.SYS, but note that every DOS driver you load (Mouse, CD-ROM, etc..) will take conventional memory and most DOS games need at leask 500KB.
User avatar
te_lanus
Posts: 135
Joined: Tue 28 Jul, 2015 4:47 am

Re: DOS running at 65Hz instead of 70Hz, audio issues.

Post by te_lanus »

Anyone tried JEMM?
User avatar
omarsis81
Posts: 945
Joined: Thu 17 Dec, 2015 6:20 pm

Re: DOS running at 65Hz instead of 70Hz, audio issues.

Post by omarsis81 »

te_lanus wrote: Fri 09 Aug, 2019 4:40 am Anyone tried JEMM?
No, but I will. Thanks for the information :D
User avatar
James-F
Posts: 88
Joined: Tue 30 May, 2017 10:26 am

Re: DOS running at 65Hz instead of 70Hz, audio issues.

Post by James-F »

jemmex.exe works great, thanks for that.
No MIPS overload either.

PS. himem.sys has to be removed (rem) too for jemm to work.
Post Reply