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 for Mac

Reply to topic
Author Message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8649
  • Location: Paris, France
Reply with quote
Meka for Mac
Post Posted: Sun Sep 11, 2011 11:49 pm
I bought a Mac today and while figuring out how to use the system (its a first time for me!) i ported MEKA.

svn://svn.smspower.org/meka/branches/20110530-allegro5-sound

A few things relying on X86 assembly code are missing (filters).
Otherwise sound work perfectly and I played a few SG-1000 games.

In the process I also made a lot of fixes which should help compiling the UNIX version.

Bear with me but i have no idea how to make Mac "packages" and i'm not even sure if my OS runs in 32-bits or 64-bits mode yet. Will have to figure those things out.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8649
  • Location: Paris, France
Reply with quote
First .dmg package
Post Posted: Sun Sep 11, 2011 11:51 pm
Can someone tell me if this is working?
I followed some tutorials to create a basic .dmg image which as I understand seems to be the standard way to distribute packages for Mac but frankly I'm not sure of anything :)
Testers wanted!

- Known bug: Some UI graphics shows pink instead of transparent color.

  View user's profile Send private message Visit poster's website
  • Joined: 27 Apr 2005
  • Posts: 420
  • Location: Australia
Reply with quote
Post Posted: Mon Sep 12, 2011 12:18 am
I'm sitting amongst some Mac computers today.
I run the meka Unix Executable File and a Terminal window pops up complains about a missing allegro library.

dyld: Library not loaded: liballegro.5.0.dylib

EDIT: and that's it, nothing else happening
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8649
  • Location: Paris, France
Reply with quote
Post Posted: Mon Sep 12, 2011 8:54 am
I see, now I would need to include Allegro within the package.
  View user's profile Send private message Visit poster's website
  • Joined: 20 May 2008
  • Posts: 6
  • Location: Nowhere, USA
Reply with quote
Post Posted: Sat Sep 17, 2011 5:09 pm
Great job on the Mac port. I have been waiting for this for a while.

I can confirm one bug from my build (from yesterdays SVN):
When you drag the windows, they will not release when you release the mouse button. They only release when you click the button again, move the cursor to a blank spot, and release the button again.

Other than that (and known bugs) it's almost perfect.
  View user's profile Send private message
  • Joined: 04 Jul 2010
  • Posts: 540
  • Location: Angers, France
Reply with quote
Post Posted: Tue Sep 20, 2011 9:07 pm
Excellent news !
  View user's profile Send private message
  • Joined: 15 Aug 2009
  • Posts: 74
  • Location: Portland, Oregon
Reply with quote
Post Posted: Fri Oct 28, 2011 3:40 am
If anyone else has a Mac and doesn't know how to compile the source code, I compiled it as an .app and bundled it in a .dmg that you can drag and drop to your applications folder. Let me know if you want it emailed to you.

The only issue that bothers me about the Mac version (and it's due to Allegro) is that Meka won't register a single "tap to click" event on the track pad. Double clicks work fine, but single clicks never work, although pressing the button works fine. I was looking at the Allegro code and seeing if there was some way to fix that (nothing on google about a fix) but nothing yet. Really annoying, I love the tap-to-click feature and wish Allegro supported it better, I'm hoping maybe I can track the problem down though.
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8649
  • Location: Paris, France
Reply with quote
Post Posted: Fri Oct 28, 2011 8:43 am
Could you post the .dmg here by any chance? Did you manage to include Allegro? Any help with making .dmg that works and look standard is appreciated. I've got a nice link from DMEnduro but haven't took the time to get back to the Mac bits yet.
  View user's profile Send private message Visit poster's website
  • Joined: 15 Aug 2009
  • Posts: 74
  • Location: Portland, Oregon
Reply with quote
Post Posted: Fri Oct 28, 2011 8:23 pm
Bock wrote
Could you post the .dmg here by any chance? Did you manage to include Allegro? Any help with making .dmg that works and look standard is appreciated. I've got a nice link from DMEnduro but haven't took the time to get back to the Mac bits yet.


Yeah no prob, I'll post it when I get home and get on my mac. I compiled Allegro as a .framework so it's bundled inside the app. Took forever to figure out Allegro's stupid makefile system to get the framework to compile!
  View user's profile Send private message
  • Joined: 15 Aug 2009
  • Posts: 74
  • Location: Portland, Oregon
Reply with quote
Post Posted: Sat Oct 29, 2011 12:11 am
Last edited by kingofcrusher on Wed Nov 02, 2011 4:24 pm; edited 1 time in total
Ok, here's the .dmg file. Should auto-mount and open a folder and from there you can just drag the meka folder to your applications folder and blam it's ready to go. Let me know if I did anything wrong, it was my first time creating a nice looking .dmg that has its own background and stuff.

*EDIT* Download the one below instead.
  View user's profile Send private message
  • Joined: 15 Aug 2009
  • Posts: 74
  • Location: Portland, Oregon
Reply with quote
Post Posted: Sat Oct 29, 2011 12:13 am
Oh and this little scripting program is awesome, I spent an hour trying to figure out how to get everything to look nice when you mount the .dmg then I found this and it just automates the whole .dmg creation process for you. It lets you set a picture, special icons, window size, etc.

  View user's profile Send private message
  • Joined: 09 May 2007
  • Posts: 137
  • Location: Sampa, Brazil
Reply with quote
Post Posted: Sun Oct 30, 2011 2:27 am
Couldn't run Meka here...

It hangs when trying to launch the App.

I'm running on Snow Leopard 10.6.8
  View user's profile Send private message Visit poster's website
  • Joined: 27 Apr 2005
  • Posts: 420
  • Location: Australia
Reply with quote
Post Posted: Sun Oct 30, 2011 9:55 pm
kingofcrusher, I've just tested it and also got a friend to try it out, both failing. Ran the terminal executable and got some output:

dyld: Library not loaded: @executable_path/../Frameworks/libpng.framework/Versions/1.4.5/libpng

I wasn't able to put it in the Applications folder (school machines locked down) but my friend did with the same result.
  View user's profile Send private message
  • Joined: 15 Aug 2009
  • Posts: 74
  • Location: Portland, Oregon
Reply with quote
Post Posted: Mon Oct 31, 2011 5:45 pm
DMEnduro wrote
kingofcrusher, I've just tested it and also got a friend to try it out, both failing. Ran the terminal executable and got some output:

dyld: Library not loaded: @executable_path/../Frameworks/libpng.framework/Versions/1.4.5/libpng

I wasn't able to put it in the Applications folder (school machines locked down) but my friend did with the same result.


Ok, thanks for the error output! I figured I might be doing something wrong with the png library so that is a big help.

*EDIT* Argh, yeah I'm retarded. It's not copying the png or zlib frameworks over for some reason, I'll fix it and try to repost it to today.
  View user's profile Send private message
  • Joined: 15 Aug 2009
  • Posts: 74
  • Location: Portland, Oregon
Reply with quote
Post Posted: Tue Nov 01, 2011 1:25 am
Ok, think I got it figured out. I guess I had the install paths for the png and zlib stuff set to my own folders instead of the app's folders, they were already installed with Xcode so I just assumed it would change the paths for me when it copied them over. Apparently you have to do it manually.

Anyway, I renamed the framework folder on my hard drive and Meka booted up fine, so I believe everything is set to load from the app now. Let me know if there are any further problems :(
MekaOSX.dmg (2.38 MB)

  View user's profile Send private message
  • Joined: 15 Aug 2009
  • Posts: 74
  • Location: Portland, Oregon
Reply with quote
Post Posted: Wed Nov 02, 2011 4:26 pm
Also, it crashes quite a bit if you change the GUI window size in the .cfg file. I believe it's an Allegro problem, so don't change it from 800x600, hah.
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8649
  • Location: Paris, France
Reply with quote
Post Posted: Wed Nov 02, 2011 5:46 pm
Where does it crash?

Thanks a lot for your help btw :)
  View user's profile Send private message Visit poster's website
  • Joined: 15 Aug 2009
  • Posts: 74
  • Location: Portland, Oregon
Reply with quote
Post Posted: Fri Nov 04, 2011 12:38 am
Bock wrote
Where does it crash?

Thanks a lot for your help btw :)


No prob, I needed it for myself so it was primarily selfish, hah. I'm working on a Coleco game port and I hate sitting at home on my PC-- would much rather be able to code at a coffee shop on my Mac and I need Meka for the debugger. Did you try it out and make sure it works now with Allegro and the zip/png libraries (hopefully) embedded?

I think it only crashes at higher resolutions when you have the debugger enabled, I didn't really test it much after getting a few crashes though and just reset it back to 800x600 which had been previously working just fine.

It could have been the game I was testing was doing weird stuff, or I could have screwed up when compiling and left out something Allegro needs once in a while, hah. I had to compile Allegro about 20 times to get it set up right, not a big fan of it now. Meka works perfect as ever if you leave it at 800x600 though so I figured it was good enough.
  View user's profile Send private message
  • Joined: 15 Aug 2009
  • Posts: 74
  • Location: Portland, Oregon
Reply with quote
Post Posted: Fri Nov 04, 2011 12:53 am
Oh and also for some reason-- at least on my mac-- games run perfectly full screen (or full windowed I mean) when throttled, but about 1 frame per second when played in the GUI. The GUI always runs normally, just the game screen gets slow.

Conversely games run perfectly in the GUI when set to unthrottled, but then when fullscreen it's too fast, hah. Just a tip for anyone who uses it.
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8649
  • Location: Paris, France
Reply with quote
Post Posted: Sun Nov 06, 2011 12:17 pm
Just tested your .dmg on a friend machine and it worked.

- Do you have the issue where pink appear on the border of graphics/icons in the GUI ?

- Could you use the same icon as the Windows version, as the old SMS icon you used is quite horrific? I realize the Windows version icon is a Sega Mark III but I like the mysterious charm it gives to the program. :)

- The Windows version has an interactive setup screen that allows to select drivers, screen resolution etc. Its a bit of an issue that the Mac version doesn't have it now. I'm not sure whats the best way, if it would be easy to code in a MacOS compatible replacement, or shall I rework MEKA in a way that the setup screen isn't required anymore.
  View user's profile Send private message Visit poster's website
  • Joined: 15 Aug 2009
  • Posts: 74
  • Location: Portland, Oregon
Reply with quote
Post Posted: Fri Nov 11, 2011 2:23 am
Bock wrote
Just tested your .dmg on a friend machine and it worked.

- Do you have the issue where pink appear on the border of graphics/icons in the GUI ?

- Could you use the same icon as the Windows version, as the old SMS icon you used is quite horrific? I realize the Windows version icon is a Sega Mark III but I like the mysterious charm it gives to the program. :)


Yeah the pink appeared from the get-go-- didn't think anything of it, just figured it was some bug in the way Allegro handles stuff. Weird.

On the icon, yeah it's easy to switch it out, I'll switch it out next version. I used that one since the other was for windows, thought you must have made this one for the Mac, haha. You can save any image file as as an .icon with the Preview.app, took me a while to figure out you had to save it specifically like that instead of just renaming it to .icon. Then in Xcode you can set an icon for the app in the settings file, it's pretty cool.

Bock wrote
- The Windows version has an interactive setup screen that allows to select drivers, screen resolution etc. Its a bit of an issue that the Mac version doesn't have it now. I'm not sure whats the best way, if it would be easy to code in a MacOS compatible replacement, or shall I rework MEKA in a way that the setup screen isn't required anymore.


I personally think it would be nice if you could change all the settings from within the GUI instead of the config screen, much better than an initial setup menu I think. Maybe the settings tab could open up the first time you started Meka to show people it's there instead of the setup screen that windows has. I just like the idea of being able to mess with screen size, game window size, and sound options from within the GUI.
  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!