Demon
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Running SDL ports on multicore processors
 
Author
All times are GMT. The time now is 05:01. Post New Thread    Post A Reply
Quasar
Moderator


Posts: 2133
Registered: 08-00


If you have a multicore processor, the Windows versions of SDL-based DOOM ports may suffer random sound-related crashes.

To fix this, you need to check out the instructions on this page:

http://articles.techrepublic.com.co...11-6168870.html

This will enable you to set the processor affinity for the port in question, allowing it to behave like it is executing on a single-core processor. This appears to eliminate SDL_mixer's unexplained problems with running on a separate core.

Addendum:

For port authors, it may be prudent to look up information on the SetProcessAffinityMask Windows API function:
http://msdn2.microsoft.com/en-us/li...223(VS.85).aspx

Last edited by Quasar on 03-01-08 at 05:11

Old Post 03-01-08 05:04 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
fraggle
Super Moderator


Posts: 4247
Registered: 07-00


PrBoom-plus and Chocolate Doom already have a fix for this that entryway developed :-)

Old Post 03-01-08 05:10 #
fraggle is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
Quasar
Moderator


Posts: 2133
Registered: 08-00



fraggle said:
PrBoom-plus and Chocolate Doom already have a fix for this that entryway developed :-)

Care to share the details? ;)

Old Post 03-01-08 05:11 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
fraggle
Super Moderator


Posts: 4247
Registered: 07-00



Quasar said:

Care to share the details? ;)

This is the commit to the Chocolate Doom svn.

Old Post 03-01-08 05:19 #
fraggle is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
entryway
Senior Member


Posts: 1180
Registered: 01-04


http://www.doomworld.com/vb/showthr...2425#post692425

http://pastebin.com/m69510e52

Last edited by entryway on 03-01-08 at 09:17

Old Post 03-01-08 08:46 #
entryway is offline Profile || Blog || PM || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
Quasar
Moderator


Posts: 2133
Registered: 08-00


Thanks guys ;)

Old Post 03-01-08 18:02 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
Csonicgo
This post is probably useless


Posts: 1705
Registered: 03-04


Has this been added to EE yet?

Old Post 05-21-08 18:37 #
Csonicgo is offline Profile || Blog || PM || Email || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
Quasar
Moderator


Posts: 2133
Registered: 08-00


Not yet, it'll be in the next official release though.

Old Post 05-21-08 18:44 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
entryway
Senior Member


Posts: 1180
Registered: 01-04



Quasar said:
Not yet, it'll be in the next official release though.

You should fix such things more quickly IMHO (immediately?), because it is impossible to use your port on all up to date (most?) systems. 3.33.33.1 would be cool in the same day you got to know it.

Look at this and replace "prboom" with "Eternity"
http://www.doomworld.com/vb/showthr...9166#post699166

Last edited by entryway on 05-22-08 at 11:43

Old Post 05-22-08 10:02 #
entryway is offline Profile || Blog || PM || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
Quasar
Moderator


Posts: 2133
Registered: 08-00


I should ;)

One question I have is still outstanding, however. It is possible for Windows machines to have access denied to particular users to run processes on a given CPU. If this is the case, then the system processor affinity mask may not be "1" or "2" or any other particular value. While it is unlikely that this would affect the vast majority of DOOM source port users, I'd like to know why the approach of just using "1" as the process's affinity mask is valid when MSDN docs demand that you make certain the mask you set is a subset of the system mask. :)

I can imagine that the consequences of setting the affinity mask to an invalid value would be an application stall or crash, or at the least, failure to actually do anything at all.

Old Post 05-22-08 18:33 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
entryway
Senior Member


Posts: 1180
Registered: 01-04


I do not use 1 as constant, I use process_affinity_mask variable from cfg and you can set it to any value. 1 is by default and it means the first processor. Is it possible when the first processor is not allowed, but some other is allowed? I assumed there is no such possibility. In any case if SetProcessAffinityMask failed you can see it in stdout.txt:

code:
M_LoadDefaults: Load system defaults. default file: D:\games\Doom2/glboom-plus.cfg found D:\games\Doom2/prboom-plus.wad I_SetAffinityMask: failed to set process affinity mask (errorcode: 87)


With wrong process_affinity_mask GetLastError() will return 87 - "The parameter is incorrect"

Last edited by entryway on 05-22-08 at 21:27

Old Post 05-22-08 21:16 #
entryway is offline Profile || Blog || PM || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
Quasar
Moderator


Posts: 2133
Registered: 08-00


Ahh, ok. Thanks.

Old Post 05-23-08 07:20 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy Report to mod || IP || Edit/Delete || Quote
All times are GMT. The time now is 05:01. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Source Ports > Running SDL ports on multicore processors

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Forums Directory