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

Pages: [1] 2 3 ... 7
1
Scripting / Re: Pop up window for Infos
« on: February 03, 2024, 04:46:28 AM »
I liked this ideia!!! "I created" this with some infos:

// Step 1: Create a surface to store information objects
local infoSurface = fe.add_surface(fe.layout.width, fe.layout.height);
infoSurface.visible = false;

// Step 2: Add game information objects to the surface
local infoText = fe.add_text("", 50, 50, infoSurface.width - 100, infoSurface.height - 100);
infoText.set_rgb(255, 255, 255);
infoText.set_font("your_font", your_font_size);

local closeButton = fe.add_text("Close", infoSurface.width - 100, infoSurface.height - 50, 100, 50);
closeButton.set_rgb(255, 0, 0);
closeButton.set_font("your_font", your_font_size);
closeButton.preserve_aspect_ratio = true;

// Step 3: Add signal handler for the custom button
local showInfoButton = fe.add_text("Show Info", 100, 100, 100, 50);
showInfoButton.set_rgb(0, 255, 0);
showInfoButton.set_font("your_font", your_font_size);

showInfoButton.add_signal("on_trigger", "toggleInfoVisibility");

// Toggle visibility function
function toggleInfoVisibility()
{
    infoSurface.visible = !infoSurface.visible;
}

// Use this function to update the information displayed on the infoText
function updateInfoText()
{
    infoText.msg = "Game Title: " + fe.game_info(Info.Title) + "\n" +
                   "Year: " + fe.game_info(Info.Year) + "\n" +
                   "Genre: " + fe.game_info(Info.Genre);
}

// Add a signal handler to update the information when a game is selected
fe.add_signal("on_game_selected", "updateInfoText");

BUT i dont know how this work exacly... some part code or almost code dont work or something its wrong  :-\

2
Emulators / Help with MAME CD+floppy i dont find in anywere... please...
« on: August 20, 2023, 04:09:28 AM »
i use this: mame fmtmarty -cdrom 38man -skip_gameinfo

LOAD GAME OK, but in game the game needs the disk/floppy inserted (boot disk/floppy) and i dont know how i put this in code for LOAD CD and the boot disk togetter

3
Thanks friend, i see this too but i belive, have way to make it... auto play the tape... but i dont know how... maybe @hermine.potter know some thing about this..

4
With this .bat:

mame fmnew7 -skip_gameinfo -autoboot_command "load\n" -autoboot_delay 4 backgamm -uimodekey F2

I open the game XXXX after that I click on F2 and it (MAME) autoloads(PLAY) the cassette(tape) then just hold the insert for a few seconds and it accelerates the tape(PLAY) until the end and after that the game was loaded then I need to type RUN and press ENTER on the keyboard.. only then the game opens and is ready to be played!!!  ;D

Manually after opening the .bat, I need to MANUALLY click on F2 and then click and HOLD the Insert key and after finishing the reading type RUN and press enter MANUALLY...

Question is... how do I automate this in .bat? Because I get it in .bat I will transfer the modifying code to use in attractmode. or can you automate these commands directly in attractmode  :-\?

5
for example, read cbr and pdf with no choose, but automatic.. :P

6
How i make the sumatra read all formats with no need change options!!! have this way?!!! have this way?

plugin.nut

Code: [Select]
///////////////////////////////////////////////////
//
// Attract-Mode Frontend - SumatraPDF  WIP plugin (By Machiminax)
//
// For use with the SumatraPDF Reader
//
///////////////////////////////////////////////////

//
// The UserConfig class identifies plugin settings that can be configured
// from Attract-Mode's configuration menu
//
class UserConfig </ help="Read your Manuals with SumatraPDF" /> {

    </ label="Command", help="SumatraPDF launcher", order=1 />
    command="SumatraPDF.bat";
    </ label="Extension", help="File extension to use", options=".pdf, .chm, .djvu, .djv, .epub, .fb2, .fb2.zip, .mobi, .prc, .oxps, .xps, .cb7, .cbr, .cbt, .cbz", order = 2 />
    extension=".pdf";
    </ label="Path", help="Path to manuals - can include [Name], [Emulator], [Year], [Manufacturer], [System], [DisplayName]", order = 3 />
    path="Game Manuals/[Emulator]";
    </ label="View Key", help="Key to use to view", options="custom1,custom2,custom3,custom4,custom5,custom6", order = 4 />
    key="custom1";
    </ label="Missing Image", help="Path to 'missing' image - can include [Name], [Emulator], [Year], [Manufacturer], [System], [DisplayName]", order = 5 />
    missing="png/Manual_not_found.png";
}

local config=fe.get_config(); // get user config settings corresponding to the UserConfig class above

//
// Copy the configured values from uconfig so we can use them
// whenever the transition callback function gets called
//

class PDFManualReader
{
    VERSION=1.1;
    game_name=null;

    constructor()
    {
        fe.add_signal_handler( this, "on_signal" )
    }


    function on_signal( signal )
    {
            if ( signal == config["key"] )
            {
                local path = get_magic_token_path(config["path"]);
                local game_name = fe.game_info(Info.Name);
                local filename = "\"" + path + game_name + config["extension"] + "\"";
                local missing_path = get_magic_token_path(config["missing"]);
                local missing = "\"" + missing_path.slice(0, missing_path.len() - 1) + "\"";
                local exe = FeConfigDirectory  + "/plugins/SumatraPDF/" + config["command"];
                print("Launching SumatraPDF:\n");
                print(" " + exe + " " + filename + " " + missing + "\n");
                fe.plugin_command_bg( exe, filename + " " + missing );
                return true;
            }
            return false;
    }
   
    //replace specified magic tokens in path
    function get_magic_token_path(path) {
        local tokens = {
            "Name": fe.game_info(Info.Name),
            "Emulator": fe.game_info(Info.Emulator),
            "Year": fe.game_info(Info.Year),
            "Manufacturer": fe.game_info(Info.Manufacturer),
            "Category": fe.game_info(Info.Category),
            "System": fe.game_info(Info.System),
            "DisplayName": fe.list.name
        }
        foreach( key, val in tokens)
            path = replace(path, "[" + key + "]", val);
           
        //replace slashes with backslashes
        path = replace(path, "\\", "/");
        //ensure trailing slash
        local trailing = path.slice(path.len() - 1, path.len());
        if ( trailing != "/") path += "/";
        return path;
    }
   
    //replace all instances of 'find' in 'str' with 'repl'
    function replace(str, find, repl) {
        local start = str.find(find);
        if ( start != null ) {
            local end = start + find.len();
            local before = str.slice(0, start);
            local after = str.slice(end, str.len());
            str = before + repl + after;
            str = replace(str, find, repl);
        }
        return str;
    }
}

PDFManualReader();

7
Jedione how plugin you use? i use one here sumatra and works good but after load PDF i put right or left for read the manual the attractmode in background go to sides change games in list, i need after load the plugin block/disable the controles in background/attractmode so and after closes the plugin/sumattra back controles to attractmode!!! you understand?

8
General / Help this code works? i try but not sucess!!
« on: March 27, 2023, 01:20:44 PM »
I tried to create a simple and elegant layout to experiment with. This layout displays a background image and a list of available games on the main screen. When selecting a game, a menu should appear with the options "Play", "Manual" and "Video".

But do I think something is missing, or is the code completely wrong?

Code: [Select]
// Configurações
local bg = fe.add_artwork("backdrop", fe.add_image(bg_image)) // nome da imagem de fundo
local font_name = "Roboto Regular" // nome da fonte
local font_size = 20 // tamanho da fonte
local title_offset_y = 80 // distância do título em relação ao topo
local item_height = 40 // altura de cada item da lista
local item_spacing = 10 // espaçamento entre os itens da lista
local menu_options = [    ["Jogar", "emulator", "[name]"],
    ["Manual", "exec", "[rompath]/manual.pdf"],
    ["Vídeo", "exec", "[rompath]/video.mp4"]
]

// Imagem de fundo
local bg = fe.add_artwork("backdrop", bg_image)
bg.preserve_aspect_ratio = true
bg.trigger = Transition.EndNavigation
bg.post_trigger = Transition.ToNewVideo

// Título
local title = fe.add_text("[Title]", 0, title_offset_y, fe.layout.width, font_size*2, font_name, font_size*2, 0xffffffff, Effect.Fade)
title.word_wrap = true
title.align = Align.Center
title.trigger = Transition.EndNavigation
title.post_trigger = Transition.ToNewVideo

// Lista de jogos
local list = fe.add_list("romlist", 0, title_offset_y + title.height + item_spacing, fe.layout.width, fe.layout.height - (title_offset_y + title.height + item_spacing), font_name, font_size, 0xffffffff, Effect.Fade)
list.spacing = item_spacing
list.trigger = Transition.EndNavigation
list.post_trigger = Transition.ToNewVideo

// Ações
list.on_change = function( selected_item ) {
    title.set_text( selected_item.parent.get_name( selected_item ) )
}

list.on_select = function( selected_item ) {
    local sel = fe.do_menu(menu_options, "Menu")
    if (sel == -1) fe.exit()
    fe.do_action(sel)
}

9
Themes / Re: new attractmode arcade_downloader theme, "preview"
« on: March 06, 2023, 01:57:52 PM »
Cool  ;D

10
Themes / Re: My New Jukebox Theme
« on: May 25, 2022, 02:47:49 PM »
Cool man!!! great!!

11
Scripting / Dobout with Sumatra
« on: April 21, 2022, 01:22:45 PM »
I Have many manuals in PDF and CBR!!! example: abadox.PDF and batletoads.CBR I have in same folder 100pdf and 100 cbr mixed one game in pdf other in cbr!!
Have a way i use(plugin look) 2 extension sametime? For example: .PDF and .CBR? How i make this works?

How i change this in code?

Other dobout... how i make the "sumatra/code/plugin,etc.." delete the sumatrapdfcache when i exit from game manual? sumatra creates one cache and this with the time pass its a BIG GB's trash space lost!!

12
This work yet???

//pdfIcon

i put this code in my nut(NES) and dont appears a manual.png  :-\

13
Emulators / Re: How ad this emulator PC6001VX????
« on: April 04, 2022, 05:44:56 PM »
Thanks for you atention Mark!

It's really a shame.. I'm "new" to programming, i am noobie... from 0 to 10 I understand only 1 or at most 2 in programming, so it's really a shame, I can't make "emulate" i cant make this emulator work in attract mode alone only my self.

First do not be so hard on yourself. Emulation is not easy..it never has been. Second emulating a old computer system is harder than games. Third emulating an old Japanese is computer is almost impossible (unless you are japanese of course!  ;D

I will look into it..I have that Emulator myself...or at least I thought i did...

from what I can tell it is not going to work under AM..the computer system itself doesn't allow for auto-loading of games that I can tell..so AM would be useless i think..I will be honest though..I took more time to learn how to use it then I did trying with AM...Japanese computers are a pain in the tail! I never could load the game from the GUI much less the command line in windows..

I was thinking of using a launcher... for example.. using rocketlauncher to execute commands that AM can't, but using this in AM Frontend of course...

But please if you get something let me know I'll be waiting carefully, and I'm still struggling with this emulator to make it work on AM...

PLEASE let me know if you have any news!!!  ;D

14
Oops then I'm out.. LOL thanks for the tip Mark!  ;D

15
Oh Mark yes i read in my start... but "I dont find in anywhere eCarddass??? where i found(Download) the cards?"

Pages: [1] 2 3 ... 7