Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Strange Hyperthreading Issue  (Read 4411 times)

0 Members and 1 Guest are viewing this topic.

brad808

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 818
  • Last login:May 22, 2023, 08:18:15 pm
Strange Hyperthreading Issue
« on: April 08, 2012, 01:09:45 pm »
So I'll start with a quick background - a short while ago I upgraded my mame version to 0.145. I'm now using a custom version of mame plus that someone else compiled with cavesh3 support, no nag, and hi score support built in. I don't remember having this problem before I upgraded so it's completely possible my solution is going to have to be change my new version of mame. Hopefully there is another way around this because this version of mame has everything I need/want and I'm happy with it.

The problem:

Certain games will crash mame if hyperthreading is enabled (The king of fighters 2003), and certain games will crash mame if hyperthreading is disabled (The Last Blade 2). There are  more games but these two are easy to test because they are right beside each other. I've tested it multiple times and the problem seems completely related to hyperthreading. I should also add that the games don't even load. No menu or loading screen just crash after a few seconds.

I'm using hyperspin as my frontend. It's running as a shell and explorer.exe never runs until after I exit out of hyperspin (completely hidden windows, which I'd like to keep). Now the strange thing is if I exit out of hyperspin and explorer.exe runs then the problem goes away. Both games will run if hyperthreading is enabled or disabled. Doesn't seem to have any effect on them as far as crashing.



Anybody experience anything like this before or have some good solutions?
« Last Edit: April 08, 2012, 01:11:56 pm by brad808 »

brad808

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 818
  • Last login:May 22, 2023, 08:18:15 pm
Re: Re: Strange Hyperthreading Issue
« Reply #1 on: April 11, 2012, 06:27:06 pm »
No thoughts on this one?

Sent from my Desire HD

ChrisK

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:April 23, 2017, 12:06:50 pm
Re: Strange Hyperthreading Issue
« Reply #2 on: April 12, 2012, 09:23:42 pm »
All I can say is, weird crap happens when you replace the shell in Windows!  It's always an adventure!

Maybe try updating drivers and/or firmware and/or Windows?  Maybe it's a fixed bug.  But probably not.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Strange Hyperthreading Issue
« Reply #3 on: April 13, 2012, 11:24:40 am »
All I can say is, weird crap happens when you replace the shell in Windows!  It's always an adventure!

Maybe try updating drivers and/or firmware and/or Windows?  Maybe it's a fixed bug.  But probably not.

Yup.  There's absolutely no reason to replace the shell in windows and it causes more harm than good.  Throw a shortcut to your FE in the startup folder and you are good to go.  If you don't like looking at windoze while it loads there are tons of threads right on this site dedicated to making windows look blank when it loads... no icons, no taskbar or nothing.  It takes slightly more work, but it is the safer way to go.

Also there's no "hyperthreading" option in mame.  There is a multi-threading option.... is that what you are talking about?

ChrisK

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:April 23, 2017, 12:06:50 pm
Re: Strange Hyperthreading Issue
« Reply #4 on: April 13, 2012, 07:42:15 pm »
Hyperthreading is an Intel feature that essentially creates two logical CPU cores on one physical CPU.  The logical cores aren't full speed, but on highly-threaded processes they can be beneficial.

Some Pentium 4's had it, making them seen by the OS as two core systems.  It's not something you'd want to use on newer dual-core systems.  At least not for emulation.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Strange Hyperthreading Issue
« Reply #5 on: April 13, 2012, 07:45:44 pm »
Yeah I know what it is, I just don't know how it would apply to MAME.  I wasn't really aware that it was something you could turn on and off either. 

ChrisK

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:April 23, 2017, 12:06:50 pm
Re: Strange Hyperthreading Issue
« Reply #6 on: April 13, 2012, 08:11:36 pm »
Some BIOSes will let you toggle it on or off.  Even some low-end (ie: Dell/HP) boards do.

Gray_Area

  • -Banned-
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3363
  • Last login:June 23, 2013, 06:52:30 pm
  • -Banned-
Re: Strange Hyperthreading Issue
« Reply #7 on: April 16, 2012, 10:27:29 pm »
It's toggle-able on all my HT-capable machines. I thought Hyper-threading had to do with memory handling. I might turn it off, then.
-Banned-

ChrisK

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:April 23, 2017, 12:06:50 pm
Re: Strange Hyperthreading Issue
« Reply #8 on: April 17, 2012, 12:16:00 am »
From what I read MAME can take advantage of two cores, but it isn't highly parallelized so it's not a huge benefit.  Quad core is almost certainly overkill.  If you've got a P4 I'd turn it on, but if you've got a dual or quad core CPU it's probably not going to help much, if at all.

I'm just talking out my butt, though.  I haven't tested MAME with >2 cores, personally.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Strange Hyperthreading Issue
« Reply #9 on: April 17, 2012, 01:29:20 am »
Quad core gives a noticable boost actually.  I'm not sure why, but it does.  I think it has to do with the fact that you have additional cores to deal with the art system and hlsl effects but I'm not sure.  I know the game emulation itself doesn't benefit much from it.  The difference between single core and dual core is negligable though.

ChrisK

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:April 23, 2017, 12:06:50 pm
Re: Strange Hyperthreading Issue
« Reply #10 on: April 17, 2012, 07:56:25 am »
Hey, there you go!  A perfect example of why you should trust first-hand experience over regurgitated knowledge someone has gleaned by reading Internet forums.  :D

headkaze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2943
  • Last login:August 14, 2023, 02:00:48 am
  • 0x2b|~0x2b?
Re: Strange Hyperthreading Issue
« Reply #11 on: April 17, 2012, 03:25:09 pm »
Quad core gives a noticable boost actually.  I'm not sure why, but it does.  I think it has to do with the fact that you have additional cores to deal with the art system and hlsl effects but I'm not sure.  I know the game emulation itself doesn't benefit much from it.  The difference between single core and dual core is negligable though.

Have you tried running MAME with and without the -mt switch? Does it make a noticable difference?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Strange Hyperthreading Issue
« Reply #12 on: April 17, 2012, 04:00:50 pm »
Quad core gives a noticable boost actually.  I'm not sure why, but it does.  I think it has to do with the fact that you have additional cores to deal with the art system and hlsl effects but I'm not sure.  I know the game emulation itself doesn't benefit much from it.  The difference between single core and dual core is negligable though.

Have you tried running MAME with and without the -mt switch? Does it make a noticable difference?

It's in interesting question, because my ears say yes, but mame says no.  I tried crusin USA without and frameskipping because that game has issues on any system.  According to mame, the difference is negligable (around 2% speed increase) BUT the sound is less "skippy" when multithreading is on and there is less screen tearing.  So I dunno, maybe it's just my imagination. 

It could very well be that the added performance is due to the fact that multi-core procesors are so much faster than dual/single core processors.  Either way a quad core does seem to make a big difference, even if it isn't due to multi-threading.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Strange Hyperthreading Issue
« Reply #13 on: April 17, 2012, 04:14:44 pm »
Actually... upon a second test, you can see the difference more noticably, even though mame still says there isn't much difference. 

I ran the first test with hlsl effects on, but because crusin is so demanding it struggled regardless (topping out at around 80%).

Once hlsl was turned off, however, you CAN see the difference quite noticably if you have the fps turned on.  With multithreading, the game stays at 100% nearly all the time... gameplay is consistent and solid.  With it turned off, the game also runs at around 100% BUT whenver you crash into something, hit a boost or do anything that either loads new textures onto the screen or plays a sound effect, the fps drop to 85-90% for a split second and there is a hiccup in gameplay.  It's like mame it's a little stuck trying to poll new resources while still handling the render of the game.  Now again, the overall difference according to mame was only around 2%, but I'll bet if I played for several minutes instead of just one or two the drops would have added up and you would see a biger difference. 

Nightbring3r

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 28
  • Last login:February 25, 2023, 04:27:31 pm
Re: Strange Hyperthreading Issue
« Reply #14 on: April 18, 2012, 01:35:38 am »
I'd make sure you and hyperspin are calling mame with the same parameters. If it crashes when multi-threading is enabled in mame and hyperthreading is enabled in the bios that would be really odd - maybe compiled for a similar, but not identically compatible architecture? It's my understanding that at the application level, there shouldn't be a difference between hyperthreading and SMP. The app doesn't know the difference between a virtual cpu and a physical one (that's the operating system's job). Performance will be different though.