Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - wrybread

Pages: [1] 2 3 ... 7
Ideally I'd love to switch to a given romlist and then load a specific rom when attract mode is launched. Is there some clever way to do that?

General / Re: Problem running mame's hiscore plugin from attract mode
« on: June 07, 2022, 09:12:24 PM »
And it looks like another way to fix it could be to use the hiscore.ini file as described here:

That's probably a better option, but I can't figure out where to put hiscore.ini. I tried the mame folder, the plugins folder, and the plugins/hiscore folder, but no joy.

Code: [Select]
hi_path /home/wrybread/test

Aha, got it working by modifying the plugin. On my system that's ~/.attract/mame/plugins/hiscore/init.lua.

(And note that I'm using version 1.0.0 of the hiscore plugin, current version is 1.0.1 but that doesn't work with my version of MAME).

I had to hard code the "hiscore_path". The line was:

local hiscore_path = "hi";

I changed that to:
local hiscore_path = "/home/wrybread/.attract/mame/high";

And now all is well in the world.

And here's an odd one though: it doesn't work if I set that path to "/home/wrybread/.attract/mame/hi", which is the normal path it would be using, since that's the subfolder of mame. That was a tough one to figure out, since it made me think hard coding the path wasn't working. If I set it to any subfolder other than "hi" it works fine.

That was a bunch of tricky issues, but I'm super psyched to have high scores finally working on my cabinet. Previously I was using "save state", which kind of works but that means the games are already running when someone starts a game, which is clunky. And it often loses the high scores anyway.

General / Problem running mame's hiscore plugin from attract mode
« on: June 07, 2022, 02:09:31 PM »
This is driving me nuts, I wonder if anyone has a theory. I'm running mame version 0.175 on Ubuntu, and the hiscore plugin works fine when I run it directly:

Code: [Select]
/home/wrybread/.attract/mame/mame64wry2 -rompath /home/wrybread/.attract/mame/roms -skip_gameinfo -pluginspath /home/wrybread/.attract/mame/plugins -plugin hiscore -verbose mspacman

But when I run mame from Attract Mode the plugin will run but it never loads any high scores.

Attract Mode's mame.cfg file looks like this:

Code: [Select]
executable           $HOME/.attract/mame/mame64wry2

args                 -rompath $HOME/.attract/mame/roms -skip_gameinfo -pluginspath /home/wrybread/.attract/mame/plugins -plugin hiscore  -verbose [name]
rompath              $HOME/.attract/mame/roms/
romext               .zip;.7z;<DIR>
system               Arcade
info_source          listxml
artwork    cabinet         $HOME/.attract/mame/cabinets
artwork    flyer           
artwork    marquee         $HOME/.attract/mame/marquees
artwork    snap            $HOME/.attract/mame/videos;$HOME/.attract/mame/snap
artwork    wheel           

When Attract Mode launches a mame ROM the command looks exactly like when I run it directly:

Code: [Select]
Config: /home/wrybread/.attract/attract.cfg

*** Initializing display: 'Every Cocktail Table Game'
 - Loaded master romlist 'cocktail_list' in 4 ms (790 entries kept, 0 discarded)
 - Constructed 2 filters in 0 ms (1580 comparisons)
 - Loaded layout: /home/wrybread/.attract/layouts/WryCadeVert/ (layout.nut)

Running: /home/wrybread/.attract/mame/mame64wry2 -rompath $HOME/.attract/mame/roms -skip_gameinfo -pluginspath /home/wrybread/.attract/mame/plugins -plugin hiscore  -verbose mspacman

But the hiscore plugin never finds any high scores. Every time I run it from AM it says:

Code: [Select]
Starting Ms. Pac-Man
hiscore: found hiscore.dat entry for mspacman
hiscore: scores read FAIL

Even though I can see it writing to the hiscore file during game play:

Code: [Select]
hiscore: write_scores
hiscore: write_scores output
hiscore: write_scores end

My theory is that it's an environmental variable that AM is setting? I tried setting the "workdir" variable in AM's mame.cfg file, but that didn't make any difference for me.

I don't imagine anyone has a theory?

(And on a sidenote, the hiscore plugin wouldn't even load until I put the full path to mame's plugin directory in AM's mame.cfg. In other words, this works: "-pluginspath /home/wrybread/.attract/mame/plugin" but this fails "-pluginspath $HOME/.attract/mame/plugin", even though they both translate to the same thing. )

Themes / Possible to format text in a layout? Trying to make "headers"
« on: April 12, 2021, 10:34:24 PM »
I'm trying to make section headers inside my layout's romlist. For example, in the following screenshot:

In that layout, the "Just the Classics" stays at the top of the screen, which is great. And the romlist scrolls, which is great. But I'd like to be able to have different sized entries in that romlist.

For example, maybe there would be a large item called "vertical games" in the romlist, that kind of thing. It would scroll with the other items in the romlist, but would be larger.

Is anything like that possible currently in the theme scripting?

Thanks for any help.

General / Re: Issue when changing screen resolution
« on: March 30, 2021, 11:41:20 AM »
Thank you! Works great.

General / Issue when changing screen resolution
« on: March 30, 2021, 03:13:37 AM »
I have a game that changes the screen resolution, and when I exit the game AM is no longer fullscreen. In other words:

- I start Attract Mode in 1024x768 resolution

- I launch a game that changes the screen resolution to 1680x1050

- when AM exits the game (and the screen resolution is still 1680x1050) the AM window now only takes up a small part of the screen.

I think I remember seeing a setting for dealing with this, maybe redrawing the window after exiting a game? I can't remember though.

Does anyone happen to have an idea?

Thanks for any help.

General / Re: Good emulator for SNES and AM?
« on: November 07, 2020, 07:56:11 AM »
That makes a lot of sense. And my experience (cabinets, since the 90s) and main use (mame) is the same as yours. But I do have one section of my cabinet for the best few games from each classic console. Fun to fire up Colecovision or NES or whatever when a friend who had that growing up is visiting and watch the memories come flooding back. And Retroarch sure is good for that, once I got past the learning curve. And once I learned to stop expecting it to behave like a normal emulator.

And yeah it was pretty mind boggling that I couldn't map controls from my second joystick encoder to player 1 controls. For example not being able to map Player 2 start to the global start button... The game pad theory makes a lot of sense, but really I think there's some design decisions that really get in that program's way. There's a lot of cases of form over function. Ultimately I can't complain, because with a little retooling (re-wiring a few buttons to use the first joystick encoder) I got great results from it. Ok maybe I can complain a little, ha.

Scripting / Re: Ultimarc Servo-Stik plugin for Linux
« on: November 04, 2020, 03:55:25 PM »
Awesome! And that reminds me, here's the updated Sero-Stik plugin that controls the Servo-Stik directly (as opposed to using a relay).

To use, download SetServoStik from here and place in the utils subfolder of Attract Mode (which you'll probably need to create. Or put it somewhere else and adjust the path below.

Scripting / Re: Joystick button to choose and launch a random game?
« on: November 04, 2020, 03:51:28 PM »
Thanks again rand0m. For anyone stumbling on this thread, I posted the working plugin here:

Scripting / Re: A plugin to choose and run a random ROM...
« on: November 04, 2020, 10:39:57 AM »
I know all that, but what does the & between the two signals you're sending do? I assume it's supposed to allow sending both signals in one line but it throws an error for me.  "bitwise op between 'null' and 'null'"

Scripting / Re: A plugin to choose and run a random ROM...
« on: November 03, 2020, 11:43:06 AM »
And looking closer, I see that both versions you posted with the line 'fe.signal("random_game") & fe.signal("select")' throw this error:

Code: [Select]
[sig] "random_game"
[this] TABLE
Script Error in signal handler: random_press - bitwise op between 'null' and 'null'

AN ERROR HAS OCCURED [bitwise op between 'null' and 'null']

*FUNCTION [random_press()] /home/wrybread/.attract/plugins/Random ROM2.nut line [9]

And they throw the error over and over again, without exiting, freezing the system, so the recursion issue is still there. Odd that that would work in Windows but not Linux.

What is the & supposed to do here?

"fe.signal("random_game") & fe.signal("select")"

No biggie, all working fine with the version that listens for one of the "custom" signals, just curious.

Scripting / Re: A plugin to choose and run a random ROM...
« on: November 02, 2020, 08:37:17 PM »
That's really odd, both of those freeze my system. As does:

Code: [Select]
function random_press(sig)
if (sig == "random_game")
return true;
  return false;

fe.add_signal_handler( "random_press" );


Scripting / Re: A plugin to choose and run a random ROM...
« on: November 02, 2020, 08:10:54 PM »
And thank you! Been wanting to solve that forever.

Scripting / Re: A plugin to choose and run a random ROM...
« on: November 02, 2020, 08:07:24 PM »
I think I figured it out. I think it keeps firing again and again (recursion) because it's sending the "select" signal, which in turn gets caught by the function again so it fires the "select" signal, and on and on.

This works for me as a plugin, note that it's now intercepting the "custom2" signal.

Code: [Select]
function random_press(sig)
if (sig == "custom2")
//print ("choosing something....");
return true;
  return false;

fe.add_signal_handler( "random_press" );

Pages: [1] 2 3 ... 7