Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: moonchilddave on July 09, 2009, 01:34:50 pm

Title: Scanlines bottleneck?
Post by: moonchilddave on July 09, 2009, 01:34:50 pm
In setting up my mame cab, I've run across a few things... I'm running .131 with the hiscore/no nag patch applied, compiled to be optimized for my system (I686/P4). 

One thing I've noticed is that when I turn on "effect scanlines" that some games slow way down - such as Pac-Mac which goes from running at 100% down to about 60-70%, and all of a sudden gets choppy sound.

Now what I'm wondering is would a newer graphics card do much to help this situation or is the bottleneck in my actual processor.  My system is running on an Intel P4 @ 1.6G, 1G RAM, and Nvidia Geforce 2 MX/MX 400 under Windows XP Home SP3.

I don't think the RAM is the bottleneck, but I could be wrong.  Basically, short of going to another computer, what would give me the most bang for the buck?  And would it really be worth it (would I see much improvement)?   Really, I'm not interested in running anything past say 1990 under mame (mostly want just the classics).
Title: Re: Scanlines bottleneck?
Post by: HaRuMaN on July 09, 2009, 02:39:13 pm
Add ram, it's cheap, it's easy.
Title: Re: Scanlines bottleneck?
Post by: u_rebelscum on July 09, 2009, 02:52:09 pm
I'd guess it's your graphic card; scanlines uses directX stuff, but before you spend the $50 or so to buy any decent directX 9.0 card (gf2 MX is 8.1 IIRC) try the stuff below.

- Make sure you're using direct3d: set video to "d3d"  (this is the default)
- Set mame to dx 8: change d3dversion in mame.ini to "8"  (9 is the default)
- Try using mame's multithreading: set multithreading in mame.ini to "1"
- Benchmark pacman without screenline effect: From command line, run mame pacman -str 90 -nothrottle.  Do not use the other options usually set for general benchmarking mame on different computers; you're benchmarking your setup, not your CPU vs others.

Benchmark at least a few times, as it varies 5-10% +/- error range.

If the benchmark is just barely about 100%, buying a video card might not help enough.  Pacman isn't a low end CPU use anymore with the discrete sound simulation, so your system might be boardline already.
Title: Re: Scanlines bottleneck?
Post by: moonchilddave on July 09, 2009, 03:37:00 pm
Ok, interesting results... when I switched to d3d v8 I got a message saying "Unable to initialize Direct3d" - so I set it back to 9.  When I ran the benchmark, I got about 115% consistantly.  Then I realized I had forgot to turn on the multithreading.  Turned that on and re-ran the benchmarks and got an average of about 450%.  Should there be THAT much of a difference?
Title: Re: Scanlines bottleneck?
Post by: moonchilddave on July 09, 2009, 05:51:24 pm
Wow, the multithreading allowed me to take like 21 or so games I was running in older versions up to current... and PacMan now runs with scanlines with no issue.  There were a few games that ran 120% to 130% - but dropped under 100 when I turned scanlines on... do you think a new card would help with those? 

If a new card seems like it might help... would I want an AGP card or PCI?  My current card is AGP, but I do have an open PCI slot.
Title: Re: Scanlines bottleneck?
Post by: Ginsu Victim on July 09, 2009, 05:55:21 pm
You using a CRT or LCD?
Title: Re: Scanlines bottleneck?
Post by: Ginsu Victim on July 09, 2009, 05:56:47 pm
If a new card seems like it might help... would I want an AGP card or PCI?  My current card is AGP, but I do have an open PCI slot.

AGP for sure.
Title: Re: Scanlines bottleneck?
Post by: u_rebelscum on July 09, 2009, 06:07:30 pm
Ok, interesting results... when I switched to d3d v8 I got a message saying "Unable to initialize Direct3d" - so I set it back to 9.  When I ran the benchmark, I got about 115% consistantly.  Then I realized I had forgot to turn on the multithreading.  Turned that on and re-ran the benchmarks and got an average of about 450%.  Should there be THAT much of a difference?

Multiple threading puts the directX stuff (direct3D, directdraw, directInput, and maybe directsound) on the second thread.  If the bottleneck is in one of those, and it's sharing one core with the rest of mame (say 25% of the time), moving the bottle neck to a second, unused core/hyperthread, so the bottleneck gets to use ~100% of the core, it's possible. 

Also if the bottleneck is in the video, and your video card is doing it in software not hardware (very possible with geforce2 mx & d3d 9)), then this could be about the same speed increase of getting a new card that does it on hardware.  Maybe.  I'm surprised at the d3d 8 caused that error, though. ???

115-130% is boardline, as that's the average, and you notice anything below 100%.  Whether a new video card will help enough even after -multiplethreading is enabled in your case I can't be sure.  It's possible, but not guarantees.
Title: Re: Scanlines bottleneck?
Post by: moonchilddave on July 09, 2009, 06:52:13 pm
You using a CRT or LCD?

Right now I'm using a CRT (21" Dell Ultrascan P1110).  I don't ever see myself going LCD.  If and when I do upgrade, it will probably be to either a presentation monitor (if I can ever find one - such as a NEC) or a Nieman display.

When exactly did mame become multithreaded?  I don't see the option in some of my older versions.  I might want to try setting up an older version of mame that has multithreading and see if I can get things tweaked enough so I can run scanlines in more games.

Right now I'm fairly happy with the performance increase I've seen in some games just by turning on multithreading (thanks for the tip rebelscum).