Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Meka and Sound

Reply to topic
Author Message
  • Joined: 30 Dec 2008
  • Posts: 25
  • Location: Naples,Italy
Reply with quote
Meka and Sound
Post Posted: Sun Mar 22, 2009 6:50 pm
After i've changed my old computer with a new amazing Phenom II 720 trial core, i was very excited to test it with meka because my old computer sometimes have slowdown and what i've found?
A choppy,cracky and boring sound.
I'm very bored. Upgrade the computer to have a worse experience.
Hope sometime this will be fixed.
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8649
  • Location: Paris, France
Reply with quote
Post Posted: Mon Mar 23, 2009 12:14 am
Sorry, this is an old known problem with MEKA on some computers. :(
It will be fixed someday hopefully..
  View user's profile Send private message Visit poster's website
Chaos-net
  • Guest
Reply with quote
Post Posted: Sun Sep 06, 2009 12:57 pm
Bit of a bump i know, but after doing a google search it sent me here, but i think i have found a semi workaround for this issue as i was getting it with my dual core laptop and quadcore pc.

Grab 0.72 or 0.73 (im using 0.73 but shouldnt make any difference)
start meka (but dont load any roms) then press the windows key so it brings you to the desktop
press ctrl+alt+del to bring up task manager and look for mekaw.exe (on 64bit systems it will have *32 after it)
right click on the process and select set affinity
and untick all but the first cpu

Then click in the menubar to bring mekaw back up and load any rom you like, works here 99.999% of the time

Obviously if this is a single core cpu i doubt it will work :D

I think if mekaw was to be made multi core aware this might squash this particular bug/issue
 
  • Joined: 06 Sep 2009
  • Posts: 10
Reply with quote
Post Posted: Sun Sep 06, 2009 12:59 pm
^^^^^

sorry about that i thought it had logged me in :/ - been working fine with ulima4 :)
  View user's profile Send private message
  • Joined: 24 Sep 2007
  • Posts: 64
  • Location: Umeå
Reply with quote
Post Posted: Sun Sep 06, 2009 1:40 pm
Oh so that's how to solve it! Thanks man, I've been wondering what caused the bad sound.
  View user's profile Send private message
  • Joined: 10 Jun 2006
  • Posts: 29
Reply with quote
Post Posted: Sat Sep 19, 2009 7:22 am
I tried to do this from version 072, but when I right-clicked on the process for mekaw.exe in the task manager, it doesn't give me the option to "select affinity". All it says when I right-click on it is "End Process", "End Process Tree", "Debug", which is grayed out, and "Set Priority", which has an arrow next to it, and when I place the cursor on the part that says "Set Priority", it lists a few other options: "Realtime", "High", "AboveNormal", "Normal", "BelowNormal" and "Low". It's set by default to "Normal". I have no idea what that even means.

So...what does this all mean? Can I still get to this "select affinity" option somehow and do this to fix the sound problems in Meka? If not, is there any alternative way for me to fix the sound problems in Meka?

If anyone can help me with this, please do. It would be greatly appreciated.

Thanks.

Oh, and one more thing. Also, I remember having no sound issues with Meka version 063b, so I downloaded the Windows version of that also and tried it, and it seemed okay, I think, although I didn't test it for long because for some reason, when I unloaded the ROM Meka had an error and closed down. Then it made that one window come up that comes up sometimes when programs have an error that says there was an error and asks if you want to send an error report or not. The ROMs I were testing was Zillion and Wonder Boy 3: The Dragon's Trap, two of my favorites. After that I didn't want to try it anymore because it makes me kinda nervous that it keeps closing down because of some unknown error like that.

If anyone knows why this is happening, any information or help would be greatly appreciated for this issue too.

Okay, that really is it now. Thanks in advance if anyone helps me with either of these two issues.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14735
  • Location: London
Reply with quote
Post Posted: Sat Sep 19, 2009 8:58 am
Maybe you don't have multiple CPUs?
  View user's profile Send private message Visit poster's website
  • Joined: 06 Sep 2009
  • Posts: 10
Reply with quote
Post Posted: Sat Sep 19, 2009 4:59 pm
i did say if you had a single core cpu this may not work ;)
  View user's profile Send private message
  • Joined: 10 Jun 2006
  • Posts: 29
Reply with quote
Post Posted: Tue Sep 22, 2009 9:06 am
But if I have a single-core CPU, then shouldn't Meka's sound be right anyway as if I did do this fix you're talking about? I mean, if the sound is messing up because of it not working right on dual-core CPUs, then if it is the case that I have a single-core CPU, then...it seems like it shouldn't be having problems with sound, but it is. Well, not at first. At first it sounds great, but then after a few minutes the sound starts sounding horrible.

...I've been thinking, maybe it's not just that one version of Meka, version 063b, that I used to use that wasn't having a problem with sound. Maybe the reason that version of Meka never gave me any problems is because I was running that one from pure DOS without Windows running in the background. Could that be why the sound on that one was always great? ...I guess with Windows, it causes it to mess up. Unfortunately, though, now I currently have no choice but to run it in Windows because this laptop I'm using now has Windows XP, and...you know how that goes.

The laptop I'm using, by the way, is a Dell Latitude D610.

...Well, if anyone knows any further information that could help, please let me know.

...This music bug is so frustrating because if it weren't for that, Meka would *easily* be the very best Sega Master System emulator ever. ...And it always was before on my old computer. ...I sure miss those days of being able to play all the great old Sega Master System games on Meka without the annoying music bug and enjoying them all in basically flawless emulation, like I remember them from the past. :-(

I was gonna use the emulator Dega until this whole sound issue blew over because I read that Dega had excellent sound emulation. Unfortunately, though, the latest version doesn't even have a way to configure the video mode, so it's stuck on the default resolution which covers the whole entire screen but causes it to be very blurry. If I could only change the video resolution on Dega, like to 320X240, that would fix the blurriness, but...apparently I can't, so that annoying blurriness renders what could be a great emulator useless basically.

[sighs]...
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14735
  • Location: London
Reply with quote
Post Posted: Tue Sep 22, 2009 9:33 am
Meka has always had sound problems on some computers. It originally used a rather brittle DOS interrupt-based sound system that worked better on some computers than others. Under Windows it is even more unreliable, but core-switching seems to make it even worse.

The solution is to re-architect the whole program, but unfortunately Bock is not very free to work on it recently. I did have a look at how easy it would be to make a simple SDL app and then try to stick Meka into it, but it turned out to be rather complicated.
  View user's profile Send private message Visit poster's website
  • Joined: 01 Feb 2004
  • Posts: 1464
  • Location: Sunny ol Tamworth, New England NSW AU
Reply with quote
Post Posted: Tue Sep 22, 2009 3:52 pm
I tried the set affinity thing, and it actually seemed to work for me. Don't know how or why but it did improve things a vast amount!

For those interested I am running an E6550, its an older CPU from the earlyish core2duo days.

Cheers,
Scott
  View user's profile Send private message Visit poster's website
  • Joined: 16 Mar 2005
  • Posts: 25
  • Location: Houston metro area, TX, USA
Reply with quote
Post Posted: Tue Sep 22, 2009 10:20 pm
If this seems to work, I wonder if there's a way to automatically set the affinity to the first core...
  View user's profile Send private message
  • Joined: 27 Apr 2005
  • Posts: 420
  • Location: Australia
Reply with quote
Post Posted: Tue Sep 22, 2009 10:37 pm
This didn't fully work for me, but there something like an 80% improvement. There should be a way to set it automatically, as this sort of fix is popular for getting old Win9x games that don't like multi-cpus to work. As I recall it is a modification to the .exe. I suppose Meka could also be compiled with this flag set? It seems like a band-aid fix for a broken bone.
  View user's profile Send private message
  • Joined: 10 Jun 2006
  • Posts: 29
Reply with quote
Post Posted: Wed Sep 23, 2009 5:36 am
Okay, I don't know much at all about programming, and I'm sure if this would work it probably would have been done already, but I was just wondering, wouldn't it be possible to take one of the Sega Master System emulators that does have very good sound, one that has its source code available, and just copy and paste the whole part of the emulator's code that's for the sound emulation and delete all of Meka's sound code and then just do a control and V to paste the exact sound code to the emulator that has good sound into Meka's source code and save it like that?

...I guess people that know about programming are gonna laugh at me now. Like I said, I don't know much about programming, but it seems like that would work.

...I wish I did know how to program, 'cause I'd be trying to fix it myself, although I know it's probably pretty hard to do. ...If it could be arranged somehow, I'd also be more than willing to *pay* Bock/Omar to fix it, but I don't know how that could be done. I mean, it'd be worth it instead of waiting an indefinite amount of time for all of these games to come out on Wii's Virtual Console. They take entirely too long to release games on Virtual Console. That's why I decided to start getting back into emulation.

...So anyway, is it possible to do that with the copying of the source code?
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14735
  • Location: London
Reply with quote
Post Posted: Wed Sep 23, 2009 8:27 am
Zillion Knight wrote
just do a control and V

Unfortunately it doesn't work that way.
  View user's profile Send private message Visit poster's website
  • Joined: 12 Apr 2005
  • Posts: 391
  • Location: London, United Kingdom
Reply with quote
Post Posted: Wed Sep 23, 2009 2:38 pm
DMEnduro wrote
This didn't fully work for me, but there something like an 80% improvement. There should be a way to set it automatically, as this sort of fix is popular for getting old Win9x games that don't like multi-cpus to work. As I recall it is a modification to the .exe. I suppose Meka could also be compiled with this flag set? It seems like a band-aid fix for a broken bone.

A call to SetThreadAffinityMask should do the trick.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14735
  • Location: London
Reply with quote
Post Posted: Wed Sep 23, 2009 4:50 pm
benryves wrote
A call to SetThreadAffinityMask should do the trick.

I may have a go at building Meka again tonight and stick that in for good measure.

Edit: No Allegro binaries for VC9. I give up...

Edit 2: Latest NASM gives approximately 1,000,000 warnings on all .asm files. zlib compiles to a strange place. Windows SDK lacks DirectX SDK. DirectX SDK is 553MB.

Why is compiling Meka such a pain? :)
  View user's profile Send private message Visit poster's website
  • Joined: 12 Apr 2005
  • Posts: 391
  • Location: London, United Kingdom
Reply with quote
Post Posted: Thu Sep 24, 2009 10:12 pm
It looks like I should have recommended SetProcessAffinityMask anyway. :-\
  View user's profile Send private message Visit poster's website
AquaTheHedgehog
  • Guest
Reply with quote
Post Posted: Fri Oct 02, 2009 2:21 am
Shion wrote
After i've changed my old computer with a new amazing Phenom II 720 trial core, i was very excited to test it with meka because my old computer sometimes have slowdown and what i've found?
A choppy,cracky and boring sound.
I'm very bored. Upgrade the computer to have a worse experience.
Hope sometime this will be fixed.

I just tuned down the sample rate on the latest version. Works like a charm now.
 
  • Joined: 03 Jan 2011
  • Posts: 1
Reply with quote
Post Posted: Mon Jan 03, 2011 10:55 pm
Changing the sample rate made no difference for me.. what did work was changing the Meka.exe process priority from normal to High.

As with one of the earlier methods, open Meka, press the windows key then open task manager, click processes then right click the meka process then set priority.. set to high.. click on meka in the toolbar to bring back up.

Defo helped for me.. may be that some things work for some and not others?
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8649
  • Location: Paris, France
Reply with quote
Post Posted: Wed Jun 01, 2011 12:04 am
I started rewriting the sound engine from scratch and I've got a new test build I would like some of you guys to test.

See this post:
http://smspower.org/forums/viewtopic.php?p=66137#66137

Thanks!
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!