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: MESS and MaLa a marriage made in heaven (after some modifications).  (Read 3211 times)

0 Members and 1 Guest are viewing this topic.

sho

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 47
  • Last login:February 10, 2022, 10:44:00 am
HI,

Just wanted to document this here in case it helps anyone in the future on a Google rampage, I had to work my Google-Fu to it's limits to come up with this solution.

When you want to emulate a computer system in MESS, the Multi Emulator Super System (which shares its codebase with MAME), the emulator will start up in full keyboard mode. This is suboptimal for keyboardless operation, such as in an arcade cabinet since then you need to go into a partial keyboard emulation mode (default via the "Scroll Lock" key) to be able to exit the emu (via a remappable key a-la MAME). There is no -partial command line option, although it seems to be a much requested feature.

There I was wanting to use MESS for Sinclair Spectrum Emulation (my first baby), ripping my hair out trying to find a way to exit the emulator via a joystick button. Having to press Scroll Lock every time before Joy1 Button8 to exit was not an option, since even though I have a Motorola NYXboard attached at all times for emergencies I don't want to fiddle with it during normal operations.

As I said I was about to give up on my Googling when I came across Wolfmess which enables -partial keyboard emulation as per default. Ecstatic with joy I installed it only to find out that it has a menu bar running on top that apparently can only be turned off via mouse.

That meant I had to get down and dirty. I had to bite the bullet and roll my own mess.

Compared to the time I used trying to finding a solution, this was a breeze. Below are step-by-step instructions in case anyone is interested.
Note, everything is based off v.1.51 of both MESS and Wolfmess although the method could probably be applied to future versions and using Windows 7 (64 bit although that's irrelevant) to compile.

Download the following from the mamedev site.
  • Latest source "mame0151s.zip"
  • And the approprate building tools (In my case "mingw-mame-w32-20121207.exe" since I am building for 32 bit Windows XP Tiny.)
  • Latest Wolfmess source "wolfmess151-src.zip" from the Wolfmess site
Unpack all to individual subdirectories (mingw, mess sources and wolfmess sources)
Find wolfmess151.diff, search for "partial" until you find the relevant code change (should be the first hit)
Code: [Select]
machine.set_ui_active(1); /* partial emulation to be enabled by default, map keys or switch to full emu mode if your emulation needs to get around ui keys */You can see on the context where to insert the code into ui.c in the main mess source .

Now on to the building:
  • Edit makefile with a text editor in the mame/mess source and set "TARGET = mess"
  • Open a command line window (cmd) and browse to the directory above all the above mentioned subdirectories.
  • Go into the mingw directory and run setenv.bat to set the path to the compile binaries
  • Now cd to the Mame/Mess source directory and run "make -j5"*
  • Voila you should have a fresh Mess.exe with -partial keyboard emulation as default
* I use the -j5 option even though I have no idea what it does, haven't even bothered to look it up.. just something I saw on the mrdo mame build page ;)
« Last Edit: December 09, 2013, 06:06:32 am by sho »
Bubble Bobble YAWN

EssexMame

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 472
  • Last login:May 20, 2025, 09:13:39 am
  • Mame Weekender
Re: MESS and MaLa a marriage made in heaven (after some modifications).
« Reply #1 on: December 09, 2013, 05:50:58 am »
Excellent - I will take a look as I've also struggled with the ScrollLock/Esc needed. I did do it in autohotkey but not needing that will help I'm sure.

-j5 compiles it all faster, if you have a (quad?) core processor. I think -j3 is for dual-core processor compile. Not sure what it would do if you've got a single-core though.

sho

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 47
  • Last login:February 10, 2022, 10:44:00 am
Re: MESS and MaLa a marriage made in heaven (after some modifications).
« Reply #2 on: December 09, 2013, 09:11:06 am »
One thing that still bothers me is the inability to have multiple control schemes per system.
Comparing MESS to MAME, each system is it's own "game", so if you set custom controls for let's say a certain Spectrum game, it applies to all spectrum games (spectrum.cfg).
My first instinct was to create a controller file for each game and load it via the command line (-ctrlr %rom%).
It seems that custom controllers are not fully implemented for MESS, at least I was unable to map keys to buttons in /ctrlr/%rom%.cfg
So back to the drawing board.
MaLa has this intriguing option called "Pre commands" that does not seem to be documented much.
My idea was to do something like "copy %rom%.cfg spectrum.cfg /y" before running every spectrum "rom", but the option does not seem to run a shell instance, so built ins like copy and such are not recognized.
I ended up having to create a gamename.bat containing "copy gamename.cfg spectrum.cfg /y" for every rom and run it as a pre command, which is very inelegant in my opinion. Does anyone have a better solution for me?
Bubble Bobble YAWN