VOGONS


Memory, CPU? leaks & Hercules bug

Topic actions

  • This topic is locked. You cannot reply or edit posts.

First post, by Spotted Cheetah

User metadata
Rank Newbie
Rank
Newbie

I spotted several bugs in the newest CVS of DosBox, see image below... I guess it explains everything 😜

http://xs.to/xs.php?h=xs62&d=06014&f=dosbox_bugs.png
(There right - click, and select "View Image". XS.TO will resize it badly! 29Kb)

Some textual description:

1. The Hercules emulation. The game running there is Stunts, catched in fading from the Brodebund logo to the Stunts logo screen. The bug is the vertical dotted lines (This bug exists ever since i am triing out DOSBox).

2. See that SysMon window, that huge red area. Before starting DOSBox, at around 60Mb was allocated, and while NC was running, every time i opened a directory, at around 100Kb for displaying each file was allocated what was not released as long as DOSBox ran (The STUNTS directory had that much files in it that it completely exhausted all my memory...).

3. See the blue area: the CPU usage. I have got a Pentium 233MHz, but i do not really think it is normal on 500 cycles. Not to mention that it only started to degrade when i set the cycles to something that low like 50, but actually if i pushed it high, the speed increased like the CPU could actually deal with it (If i calculate just by the MHzs then if for me 50 is suitable then for a 2.3GHz machine 500? - no way...). The same time nothing else than SysMon could indicate that "something is wrong", the sound only started to become more choppy than what it was by default at at around 600 - 800 cycles.

EDIT: I meant this CVS:

HunterZ wrote:
CVS-Compile (aka AEP Emulation) build Last Updated: 11 Dec 2005 URL: http://cvscompile.aep-emu.de/dosbox.htm Description: A dire […]
Show full quote

CVS-Compile (aka AEP Emulation) build
Last Updated: 11 Dec 2005
URL: http://cvscompile.aep-emu.de/dosbox.htm
Description: A direct build (i.e. no modifications or unofficial patches) from the official CVS source code. Good for testing games that have problems in 0.63.

Left this dictatoric junk. No. IV.

Reply 1 of 22, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

1.) Well... not my area of expertise. I guess it boils down to "someone with a Hercules should check that it is not a bug in stunts"

2.) DOSBox has a directory cache that reads all directories that are accessed and reuses the data for the whole lifetime of DOSBox. This is not a memory leak, it is live data that has not been leaked. I think Ctrl-F4 can clear the directory cache while you are running. If one directory makes your machine go out of memory, sort your tracks into subdirectories (Stunts supports them). Although see the next answer:

3.) 233MHz isn't nearly enough for playing anything but very old games. You should not use DOSBox on your machine, install real DOS or Windows 95/98 on a second partition. If there is absolutely no way around DOSBox (Try hard! It's simply impossible on your machine to get satisfactory results.), then you might be interested in my tips from the time I used DOSBox on a 333MHz box: http://dosbox.sourceforge.net/wiki/index.php? … eDemandingGames

Reply 2 of 22, by Spotted Cheetah

User metadata
Rank Newbie
Rank
Newbie

🤣 - how the heck could you think that i would emulate anything on this great museal piece of hardware! Of course everything runs in pure DOS, i just test things with DOSBox for example especially for Hercules' sake 😁 - i can not remember which game, but as i can remember i think i had others than Stunts too - and they also produced the same bug... I am not sure.

2 - but why at around 100Kb is needed to store the informations about each file? I had Stunts organized in sub - directories, only the cruical game files are in the root of Stunts - and still, those files gradually as NC loads the contents take up at about 50Mb of space. Horrible...

3 - the problem with it that actually if i set the cycles to that low like 1 per second, the CPU usage dropped to less than 25%. So actually the other portions of DOSBox not take up too much, the emulation can use up at least 3/4 of my PCs power. It means at about 160MHz for the emulation. As i could see, at 50 cycles it used up 100%, so to emulate 50 cycles based on SysMon 160MHz is needed. So to emulate 3000, almost 10GHz would be needed(!), to emulate that amount like which worked perfect on a 2GHz machine, 15000 cycles, then 50GHz would be needed (!!!). So with this something appears to be really wrong... (But as i told in the patrice i could push the cycles up to 500 safely, and for example Cat and Zaxxon ran perfectly with DOSBox).

Left this dictatoric junk. No. IV.

Reply 3 of 22, by Spotted Cheetah

User metadata
Rank Newbie
Rank
Newbie

I tried to test some other Hercules stuff, but i only found one: Prince of Persia. It started, and worked properly in Hercules mode. So maybe the case of Stunts was really the game's bug. Maybe - it may happen that on original Hercules Stunts would work.

During this i also monitored my CPU and memory usage:

Memory: No matter what i did, i could not track considerable increase when i just wandered around with cd commands and called "dir"s. No matter how much directories i listed, nothing reasonable happened in my memory. So that bug appears to only happen with NC (I doubt NC itself had that bug - it would have been funny on some original XT with 640Kb of RAM 😜 ).

CPU: The bug is around the sound card emulation. When for long there is no sound, the CPU usage (i think after at about 10 seconds) drops to the excepted level: so at 500 emulated cycles i experience a fluctuation around 85% and 95%. When sound is emulated, it goes high, so even if i just emulate 50 cycles, it is at 100%. I guess this should not happen. For WinAmp i have AdPlug installed, running it with FM emulation causes at around 50% of CPU usage when nothing else runs. So considering that DOSBox used 25% at 1 cycles, the FM emulation 50%, 25% still remains. If on the remained 75% i could safely emulate 500 cycles, it would mean that on 25% i must had 160 cycles. But i had 50 (I guess i only had that "high" since there because of the slowness music also slowed down meaning less FM commands per second). So something there appears to take away more resources than what it should.

(By the way studiing AdPlug setting it to true OPL output i had 10% CPU usage. So this means the actual emulation cost 40%. Does not really matter, it shows that the FM emulation in DOSBox is much slower - while even on a better PC i could not find any reasonable difference in quality. By the way that "DosBox uses 25%" is incorrect too - it uses at around 5%. The 25% stood when sound was playing - at 1 cycles per sec 😜 So actually if i ran DOSBox with AdPlug, i would have at least 50% for emulating cycles - meaning at around 250 cycles if without sound my machine could deal with 500)

Remembering to occasions when i set up DOSBox on various PCs i can recall that tampering the sound was always a problem. The behavior of the program appears to be first serving the emulated cycles, and then the sound output. No problem with this, just mentioned. It answers why the emulation speed increased above 50 cycles for me: the resources were taken away from the sound emulation. I guess my PC is too slow even for pure DOSBox FM emulation (I tried this: i wrote a DOS program in the past for the only purpose of playing back FM music. Even that did not work properly, only when i slowed down that much that the music itself became slow - this meant at about 12 - 16 cycles).

Left this dictatoric junk. No. IV.

Reply 4 of 22, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

Thanks for your effort, I'll leave the memory issue for those who know that better. I'm not yet convinced that it is a bug, but your testing shows me my expertise in that area is exceeded 😉 Did you check if Ctrl-F4 or the "rescan" command changes anything?

About sound and emulation and speed and so on, some remarks to bear in mind:

- A 2GHz machine isn't just 10 times faster than a 200MHz box. Pipelining, out-of-order execution, huge cache sizes, branch prediction and many other tricks used in modern CPUs improve performance even more.
- Never ever trust your OSes "cpu usage in %" statistics, there is no platform where that is more than a mere hint. It may even be totally wrong. Correct timing is hard to get, as timing will influence the program. I use oprofile, a Linux-based profiler that uses the performance counters on the CPU and can tell many details about where time is spent, and why.
- Sound (adlib+sblaster digital) emulation on my 333MHz box took about 80% of the CPU. Adlib is a killer on slow boxes.
- DOSBox suffers badly from small L1-caches (like really old CPUs have), adlib again worsens that quite a bit
- because of that, the DOSBox adlib emulation is probably slower than adplug
- With adlib, it doesn't matter how man "commands per second" are issued, only the polyphony matters, and that can't vary widely, since there aren't many channels (2? 3?) in FM sound
- A bad quality audio chip/driver can easily chew 50% of your CPU - and that is invisible in the statistics, as drivers "don't count"; I found that out with oprofile, which is able to profile the running kernel
- On such a slow box, there are many effects which are simply hidden on fast boxes - while you wait 1ms for some disk/sound/video IO, a fast box can do many more things than a slow box, so many little side effects vanish competely which would otherwise slow down emulation.

Add all these effects, and you can see that everything is fine. There is no bug.

Reply 5 of 22, by Spotted Cheetah

User metadata
Rank Newbie
Rank
Newbie
Moe wrote:

Did you check if Ctrl-F4 or the "rescan" command changes anything?

:huh: ! I was so busy with configuring my Linux that i completely forgot 😜 - i will do - at least hope i will do 😜

Yes, i can accept that 2GHz is not just 10 times faster. I experienced that all the time tampering with ASM stuff. But.

But there is the fact that the AdPlug plugin which emulates the same FM system like DOSBox runs just fine, and based on that it not slows down too much even compiling (when i am programming), i can tell that that 50% should be correct. So all what you told can be true, but it can not doubt the same time that DOSBox's FM emulation is worse than what it could be - since an existing solution could (greatly) overperform it.

Based on what i experienced in my PCs performance changes - that how DOSBox itself behaved, how responsive were other applications during running, how choppy was the sound produced by DOSBox i can strengthen the values i got with SysMon. At 50 cycles choppiness usually gone - indicating that the emulation could go at full speed.

The FM - for which OPL2 is the most common - has 9 or 10 channels depending on how it was set up. OPL3 has 18 or 19 (or 20?). So the music which was outputted maximally could have that much channels.
The AdPlug for Winamp emulates OPL2, and can play very complex music pieces without trouble - as i could see at a steady 50% of CPU usage. My home made program what i also tested tried to do the same (on OPL2, 9 channels), and like i told, it could only produce continous music at 12 - 16 cycles where the program itself slowed down (so the music played at about at 1/5 of it's real speed).

By the way based on a few tests - i mean when a friend ran my program on some other faster systems to see how it performs - i got these results for MHz / actual speed:
(It was a program what through a short graphic demo made the CPU calculating some things)
Mine: 233MHz / 1
Intel PIII: 800MHz / 0.5 (!)
Intel Celeron: 2.8GHz / 0.4 (!!!)
AMD 64bit: 2.4GHz / 2.5
By "actual speed" i mean that i compared the running time of the app to the value what was excepted calculated from the time experienced on my PC and the speed of the target in MHz.

So actually this can prove that you are true with what you tell - although it can effect in the opposite way too! The PIII had older motherboard with slow SD - RAM, the Celeron i guess not needs much explanation, it is simply crap, while the AMD with good hardware proves that technology really not only develops by MHzs.

Left this dictatoric junk. No. IV.

Reply 6 of 22, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

It's amazing how much processor speed growth has decreased in the last three years, hopefully this will provide incentive to allow FSB/Memory/HD speeds to catch up. Of course HD will always be slower until we replace it with Flash/whatever else we are going to use.

I was testing DosBpx on my parent's P4 3ghz and I was suprised (well not that much) at how little of an improvement it was over my Athlon XP 2800+.....haven't done much testing but I doubt there was any improvement at all. Need to do more testing. It looks like if processor architecture doesn't change that much for the next couple of years that the only speed increases we can hope to get out of DosBox will be through further optimizations. (Not that we really have to worry much now tho since DosBox can run most resource demanding games just fine on a high end processor today)

How To Ask Questions The Smart Way
Make your games work offline

Reply 7 of 22, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

Well, just because on program manages a given task with a given speed, it doesn't mean another one does, too 😉

Really, since DOSBox is running so many other things at the same time, that slows down Adlib as well. When running just adlib, the L1 cache will always be warm, there's no MMX<->fpu switchover, and so on.

Just a little math to clarify the reason why that what you observe is expected behaviour:

Imagine your real CPU does 1000 instructions per second (ips). Your OS kills 300 ips (30% - expected regular overhead, badly written drivers, poor hardware, slow ISA bus - whatever). SysMon will not show that. There's 700ips left, and that's what SysMon would show as 100%. So let's imagine 50% = 350 ips of that is Adlib. 350 ips left. Let's assume the video subsystem takes 250 ips. 100 ips left. You get 50 cycles, so we imagine we get one cycle per 2 ips. Remember: All this is just made up to clarify the general principle.

So, move on to a faster CPU, ten times faster. 10000 ips. The OS kills 1000 ips (just 10% because some of the overhead is constant). 9000 ips left. That's what SysMon will show as 100%. Adlib again takes 350ips (that's constant!), a mere 3.8%. Surprise! It's not 5% as you would have expected. Now we still have 8650 ips left. Video subsystem is 250 ips again (constant!), 8400 ips remain. 2 ips was 1 cycle, so this machine could do 4200 cycles. A machine ten times as fast does almost 100 times as many cycles.

No magic. It's logical as soon as you recognize that a lot of activities that go on in your PC are constant, and that there are a lot more activities going on that you don't know about, and that are not accounted in SysMon.

Reply 8 of 22, by Kippesoep

User metadata
Rank Oldbie
Rank
Oldbie
`Moe` wrote:

With adlib, it doesn't matter how man "commands per second" are issued, only the polyphony matters, and that can't vary widely, since there aren't many channels (2? 3?) in FM sound

It can vary wildly. A single OPL2 chip has two operating modes. One with 9 channels and one with 11 channels. OPL3 is conceptually similar to having 2 OPL2's, so with Adlib emulation, maximum polyphony is 11, for the SBPro 2, it is 22.

Reply 9 of 22, by Spotted Cheetah

User metadata
Rank Newbie
Rank
Newbie

I tested CTRL + F4: When i hit it, at around 1Mb was freed 😜

Here are two pictures about what and how happens:
The first one was taken during NC was entering in a directory with 300 files in it. Memory usage increased from 90Mb to almost 160Mb.
The second one was taken after i closed DOSBox. Memory freed. Note the CPU usage too before the exit: it is not at a steady low level like where it was before starting NC (I exitted from NC before so that usage was when DOSBox was idle waiting for input on the command line. That time CPU usage is typically reported to be low like less than 10% - but here not. Sound emulation was not started).

http://xs.to/xs.php?h=xs62&d=06016&f=300_file … 60_disaster.png
http://xs.to/xs.php?h=xs62&d=06016&f=after_dosbox.png

By the way with the CPU things you still appear to be wrong...

First of all i meant that i have an FM emulator which runs perfectly at me - i am even using it regularly to listen to those nice old pieces of musics, while DOSBox doing the same utterly struggles. So compared to that software DOSBox is buggy.

From my Windows everything is ripped out... I doubt it can take away too much - although it really does since DOS is a bit faster. But you can not answer with these the relation between the 2.8GHz Celeron and the 2.4GHz AMD 😜 . By the way the testing software did mostly calculations and some memory loads and saves. I wrote it in ASM, so i should really know what it did 😜 .

FM:
OPL2 has 9 channels. In percussion mode (I was wrong), 11. OPL3 has 18 channels, in percussion mode, 20. On bi - OPL2 cards maybe both chips can be set to percussion mode resulting 22 channels. OPL3 may also work in 4 operator / channel mode when - if fully used - it has 12 channels: six 4 op. one, and six 2 op. one.

Moe wrote:

Imagine your real CPU does 1000 instructions per second (ips). Your OS kills 300 ips (30% - expected regular overhead, badly written drivers, poor hardware, slow ISA bus - whatever).
...
So, move on to a faster CPU, ten times faster. 10000 ips. The OS kills 1000 ips (just 10% because some of the overhead is constant). 9000 ips left

So, move on to Win XP, the OS kills 5000 ips 😜 🤣 (It should be really true! Even 900MHz PCs can die in utter pain under the pressure of that thing...)

Moe wrote:

Really, since DOSBox is running so many other things at the same time, that slows down Adlib as well. When running just adlib, the L1 cache will always be warm, there's no MMX<->fpu switchover, and so on.

Then if it uses similar engine to AdPlug, the problem is in how DOSBox shares it's resources and how it control the things 😜 . AdPlug could not be killed even if i compiled in the foreground or did other "heavy" tasks.

Left this dictatoric junk. No. IV.

Reply 10 of 22, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

About windows: You'd be surprised how much CPU cycles Windows kills just for multithreading. Multitasking takes even more. On windows, even mere thread context switches are more expensive that full process context switches on linux. And since this is hidden, no one notices. DOSBox uses SDL, by the way, and SDL is multithreaded.

And about Adlib: DOSBox might do something entirely different with Adlib than AdPlug. As you surely know, there's not just one way to do something. So just because your specialized FM emulator works for you, while a full virtual machine emulation with a built-in FM emulator (which might work completely differently) doesn't, that is not a bug. It is a too slow machine. It might also be code that could be optimized, but there's always that can be optimized - that's not a bug, it behaves as intended. No one is interested at making DOSBox fast enough to play Adlib songs on a 233MHz PC. Point out significant slowdowns on significant machines and it's worth talking about. (Check SF - I made a patch to improve adlib on my old 333MHz box. It works. No one but me seems to care, as the gain is negligible on anything an average user would run DOSBox on.)

Reply 11 of 22, by Spotted Cheetah

User metadata
Rank Newbie
Rank
Newbie

Damn, you can not understand 😜

I had a 25MHz 4.86 SX with 8 MB of old SIMM RAM, and even that could run Win95 fine, it could even play back MP3s nicely on it. In Pentium cycles that speed would have been equal to at around 15MHz. So i doubt that on my P233MHz the same OS could steal too much. By the way with my PC i could even beat 400MHz ones - i mean certain games and such ran better on mine than - a that time high - end - 400MHz box. I also could run things fine signed with "Minimal system requirements: 333MHz" or such.

(And by the way i tampered with Windows' multitasking behavior too to gain on performance)

I not mean to improve DOSBox's performance just for my P233. If you do this, it will also result in that for example on a 2GHz machine you may set 25000 cycles instead of 20000 resulting in that for example Megarace starts working perfectly (So far i could not set that game running properly anywhere without choppy sound - indicating that the sound emulation could not deal with it). I rather mean this bug for these purposes.

I do not know where i found - but i could read in AdPlug's internal work: it is based on a complete FM chip emulator - so AdPlug actually just decodes the old FM music formats, and pass them to a complete virtual OPL2 chip.

(By the way my system spec:)
233MHz Pentium MMX
160Mb 66MHz SD - RAM (the chips are actually faster, but the mobo supports 66MHz)
30Gb 7200RPM Maxtor HDD
8Mb ATI RAGE PRO PCI video card
ESS AudioDrive 1868F ISA sound card (100% SB compatible - it works even better than my older PCI XWave QS3000A card, so you can not say that it's driver is "buggy").
(Just the cruical parts)

EDIT:

Remembering to past experiences on various PCs i can recall that sound was always a trouble. No matter what i set up, if it was a more needy kind of stuff, it was always lots of tricking to do it (cycles / sound buffering) to make the sound continous, not delayed too much, and to make the game running on a reasonable speed. So sound emulation is something what should really be revised - for any kind of PCs, not just for my "crappy old" P233.

And by the way please do not run in the same like how they humilinated me on an other board finally making it appearing that whole Hungary is just a virtual reality, all the news here lie, here there is dictature and socialism, and nothing behaves like other places on the world. They did it, and the worst was that the entire forum believed all the nonsense crap what the admin smacked to my head 😜

Left this dictatoric junk. No. IV.

Reply 12 of 22, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

Rest assured that no one is going to harass you over your nationality or similar here.

But please realize that DOSBox is entirely different than your mp3 player on your 486 or than Adplug. Realize that Windows can take widely varying amounts of CPU time depending on hardware, settings and drivers: On one of my PCs (around 600MHz), the sound driver (just the driver!) takes 50%. Your box may have too much software - some piece if intentionally or unintentionally installed software (virus, spyware) interfering. You simply can't tell - there are too many possibilities.

All of the conclusions you draw could mean something. Or they could be completely off, that's the point. It doesn't help us in any way. If you want to help optimize, then test on significant machines, compare with truly equal circumstances, and do not compare apples with oranges.

I not mean to improve DOSBox's performance just for my P233. If you do this, it will also result in that for example on a 2GHz machine you may set 25000 cycles instead of 20000

One word: Incorrect.

Even if it was DOSBox's fault, optimizing that might not mean any gain for fast boxes. It might even make their behaviour worse. Trust me, that is possible. If a 2GHz machine is what you want, test a 2GHz machine, period.

Reply 13 of 22, by Spotted Cheetah

User metadata
Rank Newbie
Rank
Newbie

I meant that i had seen how DOSBox and it's sound emulation performs on some recent machine. On a 2GHz Celeron it was simply impossible to set up any DOS4GW game to function properly (Not because of DOS4GW, i mean the speeed) since although i could push the cycles up, but exactly the same happened like on the P233. Sound became choppy, although the emulation was perfectly functional. Almost the same happened - although only with some bit more demanding games - on a Pentium 2.4GHz equipped with good hardware.

And no matter what you tell, it is simply impossible to believe that when i run DOSBox - and only for that time - my OS starts harassing my hardware. I meant the MP3 player with the 4.86 to mention that the OS what i run on the P233 simply can not take away 30% since then the 4.86 would have died. It is simple mathematics: if on the P233 30% was taken away by Windows, that means 70MHz. So the 4.86 with it's 25MHz would have crashed - or at least it would have been completely impossible to listen to MP3 on it (what is also resource - costly since MP3 needs to be decoded on the fly). And by the way on the 4.86 i did not even disable Explorer like i did on the P233 - so on this last the only program what loads in addition to the most - cruical parts of Windows is the task manager.

With that forum example i referred to this. Now you appear to try to make me believing something what is completely nonsense. It simply has no any sense - at least based on what you tell - that this is the absolute maximum on my PC what can be achieved in DOS emulation.

(Just to mention a few others. CCS64 which is a C64 emulator - with sound - runs at 30 - 40FPS. An SNES emulator which is a really resource - costly thing can function fine, again with sound, at 15 - 20FPS. A GameBoy emulator works perfect too, and a Genesis emulator also gives just fine quality. AdPlug with it's complete OPL2 emulation works perfect, never causing any trouble)

EDIT:
I doubt i can push this debate anyhow forth eith it, but i rather - at least try - to mention:

I have a DOS based media player called Quick View Pro, and i have a 640x480 DIVX movie. Based on how this performs in Windows and in pure DOS i can safely tell that Windows must use at maximum 10% of my CPU. In DOS really nothing else runs - not even a sound card driver since the ESS card is natively Sound Blaster compatible - so not requires drivers, only a tool to set it's ports up which does not stay resident. So when this software runs in DOS, it only relies on what is in my BIOS - it works even fine from a pure DOS disk.

Left this dictatoric junk. No. IV.

Reply 14 of 22, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

I meant that i had seen how DOSBox and it's sound emulation performs on some recent machine. On a 2GHz Celeron it was simply impossible to set up any DOS4GW game to function properly (Not because of DOS4GW, i mean the speeed) since although i could push the cycles up, but exactly the same happened like on the P233. Sound became choppy, although the emulation was perfectly functional. Almost the same happened - although only with some bit more demanding games - on a Pentium 2.4GHz equipped with good hardware.

A 2ghz Celeron is nowhere close to a "recent" machine. A Celeron ANYTHING is nowhere close to a decent machine.

With that said a P4 2.4ghz is nowhere near a decent machine. 1st it's a P4. 'nuff said. Secondly it's at 2.4ghz....which basically means AMD 1800mhz speed. 😉

Use DosBox on some decent hardware for cryin' out loud. It's not the DosBox devs fault that people use DosBox on shitty processors.

And no matter what you tell, it is simply impossible to believe that when i run DOSBox - and only for that time - my OS starts harassing my hardware.

For processor emulation DosBox is just as intensive as any other processor intensive application.

If your using shaders it can be just as intensive as Doom 3.

If your playing sounds and depending on sound card/motherboard/drivers/OS it can be just as intensive as any other sound program that uses your hardware to the fullest.

I meant the MP3 player with the 4.86 to mention that the OS what i run on the P233 simply can not take away 30% since then the 4.86 would have died.

Not sure what you mean by this. I was playing MP3's on my 486DX4/100 on Windows 95/NT4 using Winamp just fine. Can't tell you what the processor utilization was fine but I remember dialing into BBS's and surfing the internet using the precursor to AOL....damn can't remember the name.

It is simple mathematics: if on the P233 30% was taken away by Windows, that means 70MHz.

uhhhhh.....yeah ok.....

So the 4.86 with it's 25MHz would have crashed - or at least it would have been completely impossible to listen to MP3 on it (what is also resource - costly since MP3 needs to be decoded on the fly).

Probably. For me Windows 98 could barely run acceptably for me on my 486DX4/100 with 24meg of ram unless I used 98lite. A 25mhz machine is definetly a DOS/Windows 3.x/OS/2 machine.
I'd probably only risk playing MP3's in DOS on that thing and probably only @ 11hz AVG MP3's.

WTF someone would play MP3's on such ancient ass hardware is beyond me.

And by the way on the 4.86 i did not even disable Explorer like i did on the P233 - so on this last the only program what loads in addition to the most - cruical parts of Windows is the task manager.

I still can't believe your running 9x on a 25mhz machine. Do you hate yourself?

As Moe has stated before....a process monitor cannot tell you everything about system. "Programs" are not the only thing eating up computer resources.

With that forum example i referred to this. Now you appear to try to make me believing something what is completely nonsense. It simply has no any sense - at least based on what you tell - that this is the absolute maximum on my PC what can be achieved in DOS emulation.

Which PC is this? The shitty 233mhz machine that your trying to run DosBox with and complaining because of crappy sound?

(Just to mention a few others. CCS64 which is a C64 emulator - with sound - runs at 30 - 40FPS. An SNES emulator which is a really resource - costly thing can function fine, again with sound, at 15 - 20FPS. A GameBoy emulator works perfect too, and a Genesis emulator also gives just fine quality. AdPlug with it's complete OPL2 emulation works perfect, never causing any trouble)

You can't be serious, comparing DosBox to emulators that emulate static systems designed around the mid-late 80's/early 90's?

I doubt i can push this debate anyhow forth eith it, but i rather - at least try - to mention:

I hope not. I can barely read it without my head hurting.

I have a DOS based media player called Quick View Pro, and i have a 640x480 DIVX movie. Based on how this performs in Windows and in pure DOS i can safely tell that Windows must use at maximum 10% of my CPU. In DOS really nothing else runs - not even a sound card driver since the ESS card is natively Sound Blaster compatible - so not requires drivers, only a tool to set it's ports up which does not stay resident. So when this software runs in DOS, it only relies on what is in my BIOS - it works even fine from a pure DOS disk.

Is this your 233mhz machine? Are you using any special hardware?

I know back in the "day" (1999). I had to use a decoder card to play DVD's on my K63-400. I can't imagine that there would be an DOS player that could play DIVX material that could offload to any other hardware so I'm assuming that it's just using your processor.

If that's so it must be a low frame rate, extremly early DIVX codec, @ 256 color video.....even if the video was more than that a DIVX capable DOS media player is nowhere near as complicated as DosBox.

How To Ask Questions The Smart Way
Make your games work offline

Reply 15 of 22, by Spotted Cheetah

User metadata
Rank Newbie
Rank
Newbie

I started to get enough of this, so i decided to take action. I wrote a program using which it could be measured how much cycles are taken away - see the attachment. It should report the speed in MHZs - although i got certainly "strange" results considering that i have a P233...

So the results (After running the program more and calculating the average):
309 - in pure DOS
291 - in Windows running nothing else
160 - Running an usual FM piece with AdPlug (AdPlug functioned properly - no choppiness)
200 - DOSBox at 500 cycles, 3 frameskip, at startup, waiting for input
218 - DOSBox - the same - during on the way of littering full my memory with NC
218 - DOSBox after exitting from NC with filled memory

(Of course the calculator always ran in the foreground)

I do not know how the heck i could get 309MHz with it - since the program then really squeezed through 309 million instructions per second in my P233 - while it's speed is really 233MHz, nobody ever tampered with it. But it proves that in Windows i have only at about 5% of loss what is really far away from that horrid 30% what you tried to feed with me! It also proves that my report about AdPlug is correct: if the program could gain 160MHz without disturbing it with any noticeable way, then it really uses less than 50% of my CPU.

You can not believe.

First of all, this is Hungary. Here who has something above 2GHz - regardless to what kind of junk is that - rocks. People here still use old 700MHz and such PCs - here there is not so much money like in America. And they also wish to run old DOS games, even if they have to live with Windows XP. To make worse, the government hecks with us since years stuffing on us crappy computers from which they pay off half of their price from the tax, so everyone usually have such... And suffer...

The DIVX movie i have was encoded with DIVX5 i think, it is at 24 bit color depth, and 25FPS (and 640x480). It runs fine as well as some others. I must have learned how to push things to their limits 😀 I just mentioned that like for what i coded the above: to make you believe that my CPU runs almost at it's full possible speed on Windows, and 30% not just disappears...

So what i tried to mention in overall is that the sound emulation appears to be much worse than what it could be - and maybe it is even implemented a bit wrong what causes these troubles with choppiness. (See AdPlug. I found it now: http://adplug.sourceforge.net/ )

DosFreak wrote:

You can't be serious, comparing DosBox to emulators that emulate static systems designed around the mid-late 80's/early 90's?

DOSBox emulates a static system too 😜 . It is just a set of a few pre - defined virtual hardwares just like any other emulator. In all of the emulators i mentioned sound emulation for example can be turned off (I not mean that they just not send the music to the speaker, they detach the emulation module), in one of them - now i do not know which - there are even two emulation modules from which the user can choose. All C64 emulators offer the emulation of two types of SID chips. So DOSBox is not any different - maybe there are more modules to choose from, but the system is actually similar.

Attachments

  • Filename
    cpuspeed.txt
    File size
    5.39 KiB
    Downloads
    151 downloads
    File comment
    NASM ASM coding, DOS - 16 bit
    File license
    Fair use/fair dealing exception

Left this dictatoric junk. No. IV.

Reply 16 of 22, by 5u3

User metadata
Rank Oldbie
Rank
Oldbie
Spotted Cheetah wrote:

I do not know how the heck i could get 309MHz with it - since the program then really squeezed through 309 million instructions per second in my P233 - while it's speed is really 233MHz, nobody ever tampered with it.

Mhz != MIPS 😲

Reply 17 of 22, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie
Spotted Cheetah wrote:

So the results (After running the program more and calculating the average):
309 - in pure DOS
291 - in Windows running nothing else

So, what does your program do? Do you have any idea what CPUs of that age were able to do, how they work? Do you know how the program interacts with your other test programs? What relevance has this artificial benchmark compared to real software, especially in terms of instructions and CPU units used, etc.? Answer these questions correctly, and I may listen to you. Ignore it, and you show that you have no clue what you are talking about.

Your result is obviously flawed, as you say yourself - how can you ignore that and go on arguing, while you clearly do not understand what's going on. After a surprising result, a researcher finds out why it is surprising, he doesn't ignore it.
And why on earth do you keep on bragging about an IRRELEVANT platform? I'll repeat: If you want your 2GHz rig to be fast, test your 2GHz rig. Optimizing for 233MHz has almost NOTHING to do with that. Optimizing for 233MHz may even make it slower your 2GHz rig.

So what i tried to mention in overall is that the sound emulation appears to be much worse than what it could be - and maybe it is even implemented a bit wrong what causes these troubles with choppiness. (See AdPlug. I found it now: http://adplug.sourceforge.net/ )

Stuttering is not a bug. It is a too slow PC. Stuttering happens on every single machine, regardless how fast, when DOSBox exceeds the CPU's horsepower.

DosFreak wrote:

You can't be serious, comparing DosBox to emulators that emulate static systems designed around the mid-late 80's/early 90's?

DOSBox emulates a static system too 😜 . It is just a set of a few pre - defined virtual hardwares just like any other emulator.

DOSBox emulates something that changed massively over 15 years. Something that finally ran at more than 100fold speed than a C64 you are trying to compare with. Something with up to sixty thousand times as much memory (at least theoretical - the real hardware supports it, so it must be emulated, at least partially). Something with sound subsystems tens of times more complex. Something icky and full of hacks, which already slows down the original thing.

You want us to understand anything? Well, then get the facts right first, understand what you are talking about, how things work before you offer ill-informed judgements.

And you didn't even mention your exact hardware or how you've configured DOSBox.

Reply 18 of 22, by Spotted Cheetah

User metadata
Rank Newbie
Rank
Newbie
Moe wrote:

Ignore it, and you show that you have no clue what you are talking about.

Ignore me, and lose Hungary and all the countries liing to the East with more poor people with more poor and crappy PCs. That's it.

You seem to not even wishing to interpret properly what i tell. I point out the bugs since they happen the same way even on the most modern equipments, the only difference is that for example for me it makes SkyRoads unuseable while on a recent PC Megarace II.

And never think you are the top of the world since a C64 emulator's coder probably had to do much more to achieve at least somehow suitable emulation. Those old and static machines relied on precise timing so who writes emulation to those has to synchronize every module properly - yes, modules, since C64's disk drive for example could be replaced with a tape drive both requiring microsecond accurate timing - and they could actually do it!
You with DOSBox can not even do the "simple" task of PC Speaker emulation cheated with the PIT chip. You had to implement way less accurate emulation for everything as the equipments changed that much over time that it had no point to figure out something deep and use such effects like they used on the C64.

If you will emulate 100% accurately Pinball Fantasies ran with it's PC Speaker driver, then you may start comparing things. But until then - sorry - shut up and rather study who did it better.

It is true that the code i did was not perfect - but it proved perfectly that my CPU could not have been overhelmed by Windows. And by the way the "fault" itself could be thought about too. If you looked in the code, you might have noticed that it does the test by running instructions which supposed to take exactly one cycle. And i just wrote it to give some obvious idea on how Windows, and other software stresses my system, and NOT actually to calculate my CPU's speed.

And again: i never wanted to run Megarace on my P233 with DOSBox. Neither any other game. But i would have been happier if you admitted this problem for the sake of the whole East with these poor people who will probably only able to afford such equipment you use now after three or four years.

For the configuration it does not really matter. I turned off everything else than Sound Blaster emulation, at the SB emulation i tried out many things, but it was not possible to gain any speed - it is simply slow. Again: go home and study AdPlug's source before getting on me 😜

Left this dictatoric junk. No. IV.

Reply 19 of 22, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

Ignore me, and lose Hungary and all the countries liing to the East with more poor people with more poor and crappy PCs. That's it.

WTF. Do you have like self-esteem issues or something? No one's bashing your country. Hell, the average American probably doesn't know WTF Hungary even IS. 😁

Also America doesn't have streets made of gold or dual processor P4's in every household. America has just as many crappy old computers as any other country.

You seem to not even wishing to interpret properly what i tell. I point out the bugs since they happen the same way even on the most modern equipments, the only difference is that for example for me it makes SkyRoads unuseable while on a recent PC Megarace II.

Can you specify what bugs that you are talking about? The thread has seemed to degenerate into a discussion on DosBox sound quality and processor utilization. Is this the "bug" you are referring to?

And never think you are the top of the world since a C64 emulator's coder probably had to do much more to achieve at least somehow suitable emulation.

Uhhh, I don't even think the DosBox devs are American. There you go again. You got something against Americans? I don't have any problem with Hungarians.....hell I don't even know where Hungary is!

Dream on. A C64 emulator coder having to do much more to emulate a C64 than a DosBox coder? HA!

You with DOSBox can not even do the "simple" task of PC Speaker emulation cheated with the PIT chip. You had to implement way less accurate emulation for everything as the equipments changed that much over time that it had no point to figure out something deep and use such effects like they used on the C64.

Your obviously the expert. Program yourself. The source code is there. Get going, nobody is stopping you.

If you will emulate 100% accurately Pinball Fantasies ran with it's PC Speaker driver, then you may start comparing things. But until then - sorry - shut up and rather study who did it better.

So is this a game that has one of your "bugs"? You never mentioned this game earlier. I'm assuming that you have a problem with the games PC speaker emulation on your ancient P233mhz machine in DosBox? WTF don't you run the game in MS-DOS then?

It is true that the code i did was not perfect - but it proved perfectly that my CPU could not have been overhelmed by Windows.

My CPU is overloaded by "windows" hundreds of times a day and it's an XP 2800!.

And again: i never wanted to run Megarace on my P233 with DOSBox. Neither any other game. But i would have been happier if you admitted this problem for the sake of the whole East with these poor people who will probably only able to afford such equipment you use now after three or four years.

What problem?

and P233mhz machines were in common usage around I want to say 97-98?. If your machine is typical of the machines in your country it looks like your about 8 years behind. So you can expect to have a top-of the line P4 3ghz in yo' hands in about 2014. 😁

How To Ask Questions The Smart Way
Make your games work offline