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 - qqplayer

Pages: [1] 2 3 ... 19
1
Scripting / Re: filter to text script help
« on: December 07, 2019, 09:39:58 AM »
''filter_offset''

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


Code: [Select]
// Category
local categoryW = floor( bth * 2.5 )
local categoryH = floor( bth * 0.25 )
local categoryX = floor(( flw - crw ) * 0.5 - categoryW * 0.5 + flx)
local categoryY = floor( bth * 0.5 ) - floor( categoryH * 0.5 )
local category = fe.add_text("[FilterName]", categoryX, categoryY, categoryW, categoryH )
category.align = Align.Centre
category.filter_offset = 0
category.style = Style.Regular
category.charsize = floor(category.height * 1000/701)
category.font = "BebasNeueBold.otf"

local categoryLeft = fe.add_text("[FilterName]", 0, categoryY, categoryW, categoryH )
categoryLeft.align = Align.Centre
categoryLeft.filter_offset = -1
categoryLeft.set_rgb(selRGB[0],selRGB[1],selRGB[2])
categoryLeft.style = Style.Regular
categoryLeft.charsize = floor(category.height * 1000/700)
categoryLeft.font = "BebasNeueBook.otf"

local categoryRight = fe.add_text("[FilterName]", 0, categoryY, categoryW, categoryH )
categoryRight.align = Align.Centre
categoryRight.filter_offset = 1
categoryRight.set_rgb(selRGB[0],selRGB[1],selRGB[2])
categoryRight.style = Style.Regular
categoryRight.charsize = floor(category.height * 1000/701)
categoryRight.font = "BebasNeueBook.otf"

local categoryLeft2 = fe.add_text("[FilterName]", 0, categoryY, categoryW, categoryH )
categoryLeft2.align = Align.Centre
categoryLeft2.filter_offset = -2
categoryLeft2.set_rgb(selRGB[0],selRGB[1],selRGB[2])
categoryLeft2.style = Style.Regular
categoryLeft2.charsize = floor(category.height * 1000/701)
categoryLeft2.alpha = 0
categoryLeft2.font = "BebasNeueBook.otf"

local categoryRight2 = fe.add_text("[FilterName]", 0, categoryY, categoryW, categoryH )
categoryRight2.align = Align.Centre
categoryRight2.filter_offset = 2
categoryRight2.set_rgb(selRGB[0],selRGB[1],selRGB[2])
categoryRight2.style = Style.Regular
categoryRight2.charsize = floor(category.height * 1000/701)
categoryRight2.alpha = 0
categoryRight2.font = "BebasNeueBook.otf"

2
Emulators / Re: Problem leaving SSF emu, AM crashes
« on: October 09, 2019, 02:21:29 PM »
you have to add the exact name of your display (see attract-folder\emulator), did you?
my display for Sega Saturn is named "Sega Saturn".
i'm using "EmuHawk" for sega saturn games.

it works with this config:
Code: [Select]
executable           "C:\attract\EMU\Sega Saturn\EmuHawk.exe"
args                 --fullscreen "[romfilename]"
rompath              C:\attract\EMU\Sega Saturn\ROMS
romext               .cue

Yes, I've done it but it doesn't work.

I do not know programming but I have thought this ...

I think the problem is the executable, Attract Mode launch EmuHawk.exe and when it closes EmuHack, Attract Mode use ResFix.
But I use Bat file to launch SSFLoader.exe and this program make virtual CHD disk and launch SSF.exe and SSFLoader it close.
Perhaps Attract Mode is waiting SSFLoader and when it close, return to menu. And when I add "Pause" to bat file, Attract Mode is waiting but if I close SSF.exe, Attract Mode still wait that I close SSFLoader.exe and now i´m using SSF.exe... :P

Sorry, I don't speak English and I don't know if I explained myself well...

Hola, yo tambien uso el ssfloader.
Con las ultmas versiones no necesitas modificar el ssf.exe


Code: [Select]
# Generated by Attract-Mode v2.5.1
#
executable           cmd
args                 /c Y: & cd "Y:\Attrack Mode\systems\SSF\SSF 0.12 PreviewVer R5" & start /wait SSFLoader.exe "[romfilename]"
romext               .chd
nb_mode_wait         5

3
Emulators / Re: Argument for games NeoGeo CD with Raine ?
« on: October 05, 2019, 06:07:29 AM »
Code: [Select]
executable           cmd
args                 /c cd "C:\AM\systems\NeoRaine\NeoRaine 1.4.3" & start /wait neoraine32.exe -nogui "[romfilename]"

This worked for me.

Just add
Quote
-nogui
to your command.

4
Themes / Re: Vintage DOS theme [Release v1.2]
« on: September 28, 2019, 06:49:13 AM »
Hello I understand why it's not centered... my screen is 1680 x 1050...

I tried with a screen in 1920 x 1080 it is centered... how to do with my screen in 1680 x 1050 so that it is centered ?

Thanks best regards !


Code: [Select]
fe.layout.width = 1680;
fe.layout.height = 1050;
fe.layout.preserve_aspect_ratio=false;


/////////////////////////////////////////////////////////////////////////////////////////
// Load background image
local presentacion = fe.add_image("bg.png", 0, 0, 1680, 1050);


Try this, but mayybe you need to set the other objets coordinates manually.

5
Scripting / Re: [ListSize]
« on: September 24, 2019, 02:58:02 PM »
Just replace 'size' with 'index '
Something like this, cant test atm

Code: [Select]
//
//


 ::OBJECTS2 <- {

system2= fe.add_text("",0, 25, 640, 30)

}


function transition_system2(ttype, var, ttime)
{
    switch ( ttype )
    {
        case Transition.ToNewList:
case Transition.StartLayout:
case Transition.ToNewSelection:
case Transition.FromOldSelection:

local display2 = fe.list.index - 3
OBJECTS2.system2.msg = display2;
    break;
    }

}

fe.add_transition_callback("transition_system2" );

//
//


P.D. Should be better create a single working function but I think this its better for you to understand how it works  ;)

Code: [Select]
This class is a container for status information regarding the current display. The instance of this class is the fe.list object. This class cannot be otherwise instantiated in a script.

Properties:

    name - Get the name of the current display.
    display_index - Gett the index of the current display. Use the fe.set_display() function if you want to change the current display.
    filter_index - Get/set the index of the currently selected filter. (see fe.filters for the list of available filters).
    index - Get/set the index of the currently selected game.
    search_rule - Get/set the search rule applied to the current game list. If you set this and the resulting search finds no results, then the current game list remains displayed in its entirety. If there are results, then those results are shown instead, until search_rule is cleared or the user navigates away from the display/filter.
    size - Get the size of the current game list. If a search rule has been applied, this will be the number of matches found (if > 0)

So you can use all this properties depending on what you need, I mean fe.list.name, fe.list.size, fe.list.index...

6
General / Re: RPi4 - Attract Mode with RPi3 image
« on: September 20, 2019, 10:21:17 AM »
I think you have made a mistake in the forum...
Here nobody is going to provide you with an img neither for pi 3 nor for 4.
This is a forum dedicated to the Attract-Mode frontend, not the Raspberry Pi, and not to the preconfigured images...

http://attractmode.org/download.html

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

7
General / Re: RPi4 - Attract Mode with RPi3 image
« on: September 20, 2019, 10:19:48 AM »
http://forum.attractmode.org/index.php?topic=3052.0

package debian Buster

Code: [Select]
git clone http://github.com/mickelson/attract attract
dpkg-buildpackage -rfakeroot

8
Emulators / Re: Launch Ranma ½
« on: September 19, 2019, 07:01:12 AM »
What about media, I mean I´ve forgot to paste the entire name , my problem is pcengine cd version:

Code: [Select]
Ranma ½ - Datou, Ganso Musabetsu Kakutou-Ryuu! (Japan)

9
Emulators / Launch Ranma ½
« on: September 19, 2019, 03:41:04 AM »
Im having problems launching "Ranma ½" games.
I  assume "½" character is the reason.
Because AM seems to be unable to show the media neither.

10
Scripting / Re: [ListSize]
« on: September 18, 2019, 03:50:37 PM »
This works, just need to set the right position and color.
I mean, you will need to show ListEntry and in this case system1 its like a fake ListSize with 3 less items.


Code: [Select]
//
//


 ::OBJECTS <- {

system1= fe.add_text("",0, 25, 640, 30)

}


function transition_system(ttype, var, ttime)
{
    switch ( ttype )
    {
        case Transition.ToNewList:
case Transition.StartLayout:
case Transition.ToNewSelection:
case Transition.FromOldSelection:

local display1 = fe.list.size - 3
OBJECTS.system1.msg = display1;
    break;
    }

}

fe.add_transition_callback("transition_system" );

//
//

11
Scripting / Re: [ListSize]
« on: September 17, 2019, 11:36:24 AM »
I think I know exactly what you want.
I made something similar some time ago, dukpoki helped me.

http://forum.attractmode.org/index.php?topic=2250.msg15278#msg15278

You need to modify this functions with fe.CurrentList , so attrack mode will check the size of your list,rest 3 and ten, return (list -3) as the result,
If you cant make the function Ill try to make the code this weekend.


12
Scripting / Re: [ListSize]
« on: September 17, 2019, 10:07:48 AM »
I think you can´t use magic tokens for this purpose.
I suppose you need to create a function with "fe.CurrentList"

Code: [Select]
#### `fe.CurrentList` ####

This class is a container for status information regarding the current display. The instance of this class is the fe.list object. This class cannot be otherwise instantiated in a script.

Properties:

    name - Get the name of the current display.
    display_index - Get the index of the current display. Use the fe.set_display() function if you want to change the current display. If this value is less than 0, then the 'Displays Menu' (with a custom layout) is currently showing.
    filter_index - Get/set the index of the currently selected filter. (see fe.filters for the list of available filters).
    index - Get/set the index of the currently selected game.
    search_rule - Get/set the search rule applied to the current game list. If you set this and the resulting search finds no results, then the current game list remains displayed in its entirety. If there are results, then those results are shown instead, until search_rule is cleared or the user navigates away from the display/filter.
    size - Get the size of the current game list. If a search rule has been applied, this will be the number of matches found (if > 0)

13
Scripting / Re: fe.signal Q:
« on: September 09, 2019, 02:40:07 PM »
The problem here its you are adding this:

Code: [Select]
when = Transition.ToNewSelection,
I suppose you are using this code in your grid sega genesis mini.
Up,down,left and right is like a new selected game.
So, just avoid this part.
Look into my savestate plugin.
Im using fe.get_input_state, but what I want to do is almost the same.

Code: [Select]
local is_statesnap = fe.get_input_state ("J+Joy0 PovXneg")
if (is_statesnap) {
local alpha_bgstate = {
              property = "alpha", start = 0 end = 255, time = 500 easing = Easing.In,
        }
        animation.add( PropertyAnimation( bgstate, alpha_bgstate ) );


Last problem its the animation will be triggered again when you press left...
But not when you press the other signals...

14
I forgot to mention I've attached a beta version on the first post.
All seems to work fine.

15
Scripting / [Plugin WIP] SavestateLoader (only for retroarch-windows)
« on: August 26, 2019, 10:12:44 AM »
This plugin allows you to launch your retroarch savestates directly from AM.



Inspiration:
https://retropie.org.uk/forum/topic/15029/savestate-loading-from-es-like-on-snesmini-with-screenshot

First of all Im not responsable for .cfg corrupted filed, lost savestates...
Use the plugin under your own responsability.
Be aware that the plugin deletes the main auto savestate file from your retroarch folder.

As always I must thank all the community for the help (specially keilmillerjr).

So, Ill try to explain how it works.All paths and config files should be precisely created, otherwise the plugin doesnt work propertlly.
Steps:

retroarch.cfg (emulator main .cfg file)

Code: [Select]
savestate_auto_index = "false"
savestate_auto_load = "true"
savestate_auto_save = "false"
savestate_directory = ":\states"
savestate_thumbnail_enable = "true"
savestates_in_content_dir = "false"
auto_overrides_enable = "false"



emulator.cfg (AM emulator example .cfg file to understand where you need to create your appendconfig_emulator.cfg file)

Code: [Select]
# Generated by Attract-Mode v2.2.1
#
executable           cmd
args                 /c cd "Y:\Attrack Mode\systems\RetroArch" & start /wait retroarch -L cores\emulator.dll "[romfilename]" --appendconfig "Y:\Attrack Mode\systems\RetroArch\config\AutoSavestate\appendconfig_emulator.cfg"

Every emulator (AM) needs an 'appendconfig_emulator.cfg'

appendconfig_emulator.cfg
Code: [Select]
savestate_directory = ":\states\emulator"

I'm using 'emulator' as the main name, should be 'Atari 5200','Game Boy'...

Inside your retroarch installation should be a states folder.
A hard link shell shortcut needs to be created from the emulator to the plugin folder.



This program can make it and its free.
http://schinagl.priv.at/nt/hardlinkshellext/linkshellextension.html

atract.cfg  (AM main .cfg file)

Code: [Select]
plugin SavestateLoader
enabled              yes
param                command SavestateLoader.bat
param                extension_1 .state1
param                extension_2 .state2
param                extension_3 .state3
param                slash /

To launch your savestates you need to asign three 'signal_str' , I've chosen this ones.

Code: [Select]
input_map
toggle_rotate_right  T
toggle_flip          Y
toggle_rotate_left   U


Quote
input_map
   toggle_rotate_right  T ("savestate_1")
   toggle_flip          Y ("savestate_2")
   toggle_rotate_left   U ("savestate_3")


https://github.com/mickelson/attract/blob/master/Layouts.md#add_signal_handler

plugin.nut  (plugin main .nut file)

Code: [Select]
show_statesnap ---> fe.get_input_state ("G")
hide_statesnap ---> fe.get_input_state ("H")

Default keys to show or hide your savestates.






And that's it  ;)



EXTRA: SavestateClear.bat THIS FILE DELETES THE .STATE.AUTO FILE WHEN YOU RETURN FROM THE GAME.
It doesnt matter because its a copy of your .state1, .state2 or .state3 file.
But I advise you to test the plugin propertly creating and launching your savestates before putting this file alongside your plugin.nut

Pages: [1] 2 3 ... 19