Previous Thread
Next Thread
Print Thread
Page 2 of 2 1 2
Bletch #117731 08/27/20 01:04 AM
Joined: Sep 2000
Posts: 463
Likes: 1
M
Senior Member
Offline
Senior Member
M
Joined: Sep 2000
Posts: 463
Likes: 1
(Raises hand from back corner)

I'd be quite interested in taking a look at this... Is there a pre-compiled Mac binary available, or barring that, a set of instructions that even I might be able to follow to compile this for the Mac?

(Retreats to back corner)


The following statement is true...
The preceding statement is false.
Bletch #117732 08/27/20 01:19 AM
Joined: Mar 2001
Posts: 16,679
Likes: 4
R
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,679
Likes: 4
Let me pull the 2.0 release branch and reconstruct how I compiled it from scratch so I have instructions. You will need Homebrew installed (along with Xcode naturally). The good news is it's using CMake so it generates a project file you just load into the Xcode GUI and build.

Bletch #117733 08/27/20 02:37 AM
Joined: Jul 2007
Posts: 225
Senior Member
Offline
Senior Member
Joined: Jul 2007
Posts: 225
This sounds rad.. Guess its time to finally install Xcode on the new Mac mini!

Bletch #117734 08/27/20 02:53 AM
Joined: Mar 2001
Posts: 16,679
Likes: 4
R
Very Senior Member
Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,679
Likes: 4
Mac build instructions. These work on Catalina and Big Sur developer beta 5. They should be OK on Mojave at least as well.

Prereqs: install Xcode from the Mac App Store, and Homebrew following the instructions on https://brew.sh/

Open a Terminal window and install the necessary brew modules:
% brew install cmake
% brew install expat
% brew install zlib
% brew install qt

Get BletchMAME:
% git clone https://github.com/npwoods/bletchmame.git

This gets the BletchMAME source into a newly created folder called "bletchmame".

Currently (August 26, 2020) there's a minor edit you need to do to the source to make Clang happy. Use TextEdit or BBEdit or whatever to open the file lib/quazip/minizip_crypt.h and delete the word "register" on line 57, then save the file.

Setup for cmake:
% cd bletchmame
% mkdir build
% cd build

Run cmake (I recommend copy/pasting this command):
% cmake .. -DEXPAT_INCLUDE_DIR=/usr/local/opt/expat/include/ -DEXPAT_LIBRARY=/usr/local/opt/expat/lib/libexpat.a -DZLIB_ROOT=/usr/local/opt/zlib -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5/

Once this completes, build:
% make -j5 (for a 4-core Mac; use -j3 for a 2-core or -j9 for an 8-core).

And run:
% ./BletchMAME

I haven't gotten BletchMAME to successfully launch MAME yet on the Mac, but it's interesting to play around with.

Bletch #117735 08/27/20 09:31 AM
Joined: May 1999
Posts: 576
Senior Member
Online Content
Senior Member
Joined: May 1999
Posts: 576
I followed all the steps and they completed without errors. But during compilation, I get this error:

Code
In file included from /Users/charel/bletchmame/lib/quazip/unzip.cpp:202:
/Users/charel/bletchmame/lib/quazip/minizip_crypt.h:57:7: error: ISO C++17 does not allow 'register'
      storage class specifier [-Wregister]
      register int keyshift = (int)((*(pkeys+1)) >> 24);
      ^~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/QuaZip.dir/lib/quazip/unzip.cpp.o] Error 1
make[1]: *** [CMakeFiles/QuaZip.dir/all] Error 2
make: *** [all] Error 2

Bletch #117736 08/27/20 10:54 AM
Joined: May 2009
Posts: 1,899
Likes: 1
J
Very Senior Member
Offline
Very Senior Member
J
Joined: May 2009
Posts: 1,899
Likes: 1
If you're getting that error, then no, you didn't follow all the steps.

Bletch #117738 08/27/20 04:47 PM
Joined: Sep 2000
Posts: 463
Likes: 1
M
Senior Member
Offline
Senior Member
M
Joined: Sep 2000
Posts: 463
Likes: 1
I followed all the instructions, and successfully compiled BletchMAME 2.0.

As indicated, I was unable to launch MAME, but still, I appreciate the instructions, and eagerly await a time when we can have BletchMAME working on the Mac.


The following statement is true...
The preceding statement is false.
Bletch #117741 08/27/20 09:14 PM
Joined: Nov 1999
Posts: 676
Likes: 1
B
Bletch Offline OP
Senior Member
OP Offline
Senior Member
B
Joined: Nov 1999
Posts: 676
Likes: 1
On Windows, BletchMAME relies on a command line option "-attach_window" to instruct MAME to "borrow" an existing Window instead of creating its own.

-attach_window is currently Windows-only. I don't see BletchMAME on non-Windows platforms being usable without equivalent functionality on those platforms.

Bletch #117779 09/03/20 01:25 PM
Joined: May 2007
Posts: 554
M
Senior Member
Offline
Senior Member
M
Joined: May 2007
Posts: 554
I was able to build BletchMAME on Linux with

$ cmake .. -DEXPAT_INCLUDE_DIR=/usr/include/ -DEXPAT_LIBRARY=/usr/lib64/libexpat.so.1 -DZLIB_LIBRARY=/usr/lib64/libz.so

but clicking on a driver gives me a sigabrt, after a window for the emulation briefly popped up.

Does BletchMAME make use of the Lua interface? I've already been thinking about a fully detachable UI, text or graphics, using a remote Lua connection. (Would mean to make the Lua console accessible by socket first.)

Bletch #117780 09/03/20 10:37 PM
Joined: Nov 1999
Posts: 676
Likes: 1
B
Bletch Offline OP
Senior Member
OP Offline
Senior Member
B
Joined: Nov 1999
Posts: 676
Likes: 1
Yes, there is a LUA plugin ("worker_ui") distributed with BletchMAME that essentially provides what is sort of a hybrid between a command console and an RPC-like mechanism. Its not using sockets, but rather standard IO - meaning that you can execute MAME with that plugin and control MAME using the same facilities BletchMAME is using.

Page 2 of 2 1 2

Link Copied to Clipboard
Who's Online Now
3 members (mixmaster, Dorando, Carbon), 52 guests, and 2 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,879
Posts116,781
Members4,959
Most Online890
Jan 17th, 2020
Forum Host
These forums are hosted by www.retrogamesformac.com
Forum hosted by www.retrogamesformac.com