Recent Posts

Pages: 1 ... 8 9 [10]
91
Themes / Re: Ideal of new theme - Parallelism
« Last post by kent79 on February 13, 2018, 12:59:32 AM »
If you use a fixed grid, maybe with square cells, then you have to add a transition callback and modify the texture x,y,width and height of the snap artwork. You can use this trick to "crop" the original image so that only the square center area is used. If you have thumbs with incorrect aspect ratio (pixel perfect thumbs) you can use the same tick to correct the aspect ratio to 3:4 or 4:3.

Sorry, my coding skill doesn't good enough. Could you make a sample (nut file) to me based on your theme? Many Thanks.
92
Themes / Re: Ideal of new theme - Parallelism
« Last post by zpaolo11x on February 13, 2018, 12:46:06 AM »
If you use a fixed grid, maybe with square cells, then you have to add a transition callback and modify the texture x,y,width and height of the snap artwork. You can use this trick to "crop" the original image so that only the square center area is used. If you have thumbs with incorrect aspect ratio (pixel perfect thumbs) you can use the same tick to correct the aspect ratio to 3:4 or 4:3.
93
Themes / Re: Ideal of new theme - Parallelism
« Last post by kent79 on February 13, 2018, 12:13:20 AM »
I think "irregular" grid is difficult to do. So, I will pass it and using fixed grid. But one thing would like to do.For AM default coding, it can be only handle fixed size of box art image. If you see Parallelism web layout, it can handle different size of image very well whether is vertical image or horizontal. Do you have any idea?  :)
94
Themes / Re: Ideal of new theme - Parallelism
« Last post by zpaolo11x on February 12, 2018, 11:49:24 PM »
Do you know how to let first box display "game system"? like as above ideal mod "MAME" text box? 

This is something I haven't done before, probably the part of the theme that requires a bit of tricking. It would be easier to have the system box at full height, then the two rows of thumbnails.

Also, how to display game name in each box? :) Agree with one row is easy, but do you know how to make 2 rows?

Adding the name is not difficult, I made it in a test theme that is not published, it's a simple extension of the carrier.nut module where instead of just adding a snap artwork you add also texts or wheel artwork. Two rows like in my theme is quite easy too, although the theme will be a bit less fluid than the standard one line theme. The difficult part would be to implement an "irregular" grid like the one you showed in your mockup, but if it's predetermined I think it can be done too.

It's intriguing and I like the look of the theme, but I don't have time to code right now, otherwise I'd be glad to try it :D
95
Scripting / Ultimarc Servo-Stik plugin for Linux
« Last post by wrybread on February 12, 2018, 11:43:30 PM »
I couldn't find a reliable way to control my ServoStik under Linux so I made a plugin to control it using "hardware mode" and these cheapie USB relays ($4 shipped!):

https://github.com/darrylb123/usbrelay

Works beautifully with Attract Mode and my joystick is finally always in the right mode for whatever game I'm playing. Whoohoo!

Setup notes:

- put the Servo-Stik's control board into "hardware mode" as described here:

https://www.ultimarc.com/servostik.html

Note that this makes it so you can't control the Servo-Stik via USB anymore, which is a shame. And the change is permanent! So proceed with caution, and you might want to read my "alternative methods" section below before proceeding.

Once you make this change you're essentially switching the mode of the Servo-Stik with a relay acting as a toggle switch.

- Get your relay using the instructions here https://github.com/darrylb123/usbrelay, I got the single relay for $4 shipped to California.

- Strip the wires from a USB mini cable. Connect the red and black wires to a 5v power supply (the 5v pins on the USB relay didn't seem to provide enough power for reliable operation), then connect the white wire to the NO pin of the relay, the green wire to the NC pin of the relay, and roll up the shielding and connect it to the common pin of the relay.

- When you're done it'll look something like the attached image, except that I wouldn't recommend getting power from the relay board itself as in the picture, things were really flaky for me until I connected the power to a stripped down 5v wall wort.

- You'll need to install the usbrelay program as described here (https://github.com/darrylb123/usbrelay), or in Debian variants you can just run "sudo apt-get install usbrelay". After installing run "usbrelay" to see the address of your relay and adapt this plugin if needed. You can adapt it either through Attract Mode's plugin configuration section, or directly in the code of the plugin.

On my system this command turns on the relay:

usbrelay HURTM_1=1

And this turns off the relay:

usbrelay HURTM_1=0

If you have things wired up you should see your Servo-Stik magically switching between 4 and 8 way. If not, run simply "usbrelay" to get the address of the relay ("HURTM" in the example above). I don't know if the address varies from relay to relay. If you have a different address you'll need to edit the plugin either directly or by going to it's plugin config section of Attract Mode. You should be able to switch the mode of the Servo-Stik with the above lines of code at this point. If not, go over the steps above carefully.

- With the configuration here, I'm turning on the relay for 2 and 4 way games, and turning it off for 8 way games. Works great.

- And note that this plugin was adapted from http://forum.attractmode.org/index.php?action=post;msg=14283;topic=1898.0

Feel free to email directly with any questions, since I don't think the post notification feature is working on this board. My email is wrybread at gmail dot you know what.


Alternate methods:

- I'm really impressed with the Servo-Stik, but it would be nice if we didn't have to put the control board into "hardware board" to control it in from a relay or switch, since doing so is a permanent change, meaning we can't control it via USB ever again. Andy, if you're listening, how about adding a couple of pins to the board so this is always possible, even in regular USB mode? Or a jumper to return the board to regular USB mode?

- I tried RGBCommander, which was able to control the ServoStik, but not in conjunction with Attract Mode since my version of MAME (.175) isn't supported. Most of my ROMs didn't work with later versions of MAME so I abandoned that route, but more notes on the issue are in this thread http://forum.arcadecontrols.com/index.php?topic=156479.0.

- the author of RGBCommander said he has a commandline utility to switch the Servo-Stik, which would solve the issue completely, but as of now he hasn't released it yet. Please do?

- I'd love to make a Python script to control the Servo-Stik directly using pyusb, but couldn't find very many details on the protocol. Andy sent this over, maybe someone can make sense of it?

Code: [Select]
Private Sub button4_Click()
    OutputReportData(3) = 0
    OutputReportData(2) = 0
    OutputReportData(1) = 0
    OutputReportData(0) = 0
    Call ReadAndWriteToDevice
 
End Sub
 
Private Sub button8_Click()
    OutputReportData(3) = 1
    OutputReportData(2) = 0
    OutputReportData(1) = 0
    OutputReportData(0) = 0
    Call ReadAndWriteToDevice
End Sub

Anyway, plugin attached and pasted below, hopefully it's useful to someone.

Code: [Select]
/*

This is an Attract-Mode plugin to use a ServoStik under Linux (or other OS's)
with a USB relay. These USB relays are dirt cheap, under $5 shipped to the U.S.,
and work beautifully with a ServoStik in hardware mode.

More notes on the relays here:

https://github.com/darrylb123/usbrelay

More setup notes for this plugin here:

http://forum.attractmode.org/index.php?topic=2123.0

wrybread at gmail dot you know what
February 12, 2018

*/



// user config
class UserConfig </ help="Plugin to use a ServoStik joystick in hardware mode under Linux. See the header of the ServoStikUSBRelay plugin for more information." /> {

// path to usbrelay if necessary
</ label="Executable name", help="Full path to the usbrelay utility if necessary", order=1 />
command = "usbrelay";

// command to turn on the relay
</ label="Command relay on", help="Command to turn on the relay for 2 and 4 way games", order=2 />
command_relay_on = "HURTM_1=1";

// command to turn off the relay
</ label="Command relay off", help="Command to turn off the relay for 8 way games", order=3 />
command_relay_off = "HURTM_1=0";

}

// process the local config
local config=fe.get_config();

// register the callback for when games are launched
fe.add_transition_callback( "joytray_plugin_transition" );

// function to  process each game's launch
function joytray_plugin_transition( ttype, var, ttime ) {

if ( ScreenSaverActive ) return false;

switch ( ttype )  {

case Transition.ToGame:

// turn relay on for 4 way games
if (fe.game_info( Info.Control ) == "joystick (4-way),joystick (4-way)") fe.plugin_command_bg(config["command"], config["command_relay_on"] );

// turn relay on for 2 way games
else if (fe.game_info( Info.Control ) == "joystick (2-way),joystick (2-way)") fe.plugin_command_bg(config["command"], config["command_relay_on"] );

// turn relay off for 8 way games
else fe.plugin_command_bg( config["command"], config["command_relay_off"]);

break;

}

return false; // must return false
}


96
Scripting / How to put cabinet artwork in layouts?
« Last post by wrybread on February 12, 2018, 11:01:35 PM »
I'm trying to put pictures of the arcade cabinets behind the list of games during scrolling. I can show the marquee with:

   local snap = fe.add_artwork( "marquee", 0, 0,  fe.layout.width,  fe.layout.height );

And snapshots with:

   local snap = fe.add_artwork( "snap", 0, 0,  fe.layout.width,  fe.layout.height );

But I can't figure out how to show the cabinets. I have a folder called "cabinets", but changing that keyword to cabinet doesn't work.

Any ideas?



97
Themes / Re: Ideal of new theme - Parallelism
« Last post by kent79 on February 12, 2018, 10:56:10 PM »
Do you know how to let first box display "game system"? like as above ideal mod "MAME" text box?  Also, how to display game name in each box? :) Agree with one row is easy, but do you know how to make 2 rows?

Anyway, thank you first, I will try to make a mod up base on your theme later
98
Themes / Re: Ideal of new theme - Parallelism
« Last post by zpaolo11x on February 12, 2018, 10:44:28 PM »
The first implementation of my Arcadeflow theme looked a bit like that, if you add a white border around the icons it looks very similar with game titles overlapping the game graphics. The main difference is that the thumbnails are square, I have to think if different sized thumbs are possible. A theme like that with one row will be very easy to do with carrier.nut.
99
Themes / Re: Vertical CRT layout 0.2
« Last post by FrizzleFried on February 12, 2018, 10:08:26 PM »
FWIW I am using an ARpiCADE Pi3 system running on an arcade monitor that is in vertical orientation.

Unfortunately this layout comes up horizontally... and only takes up approximately 1/3 of the horzontal screen (pretty much like the video shows) that has been posted.

If I turn the image using the keyboard in attract it still only takes up 1/3 of the vertical screen and the images are super stretched.

This should be a vertical layout... right?   So it should fit the entire screen of a low-res crt screen that is oriented vertically.

What am I doing wrong?  Also... is it right that there are no display options?

Finally... how do you switch between tabs?  I only have a single stick and 2 buttons to work with (well,  and P1 and p2).

Thanks for the help...

100
Themes / Re: SNES Classic Theme
« Last post by akafox on February 12, 2018, 08:21:05 PM »
Still waiting...
Pages: 1 ... 8 9 [10]