Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arch Linux installation not running sdlmame #1

Open
tuxertech opened this issue Mar 7, 2016 · 8 comments
Open

Arch Linux installation not running sdlmame #1

tuxertech opened this issue Mar 7, 2016 · 8 comments

Comments

@tuxertech
Copy link

Compilation works just fine, gmameui starts, but even after configuring it does not work.

% file /usr/lib/sdlmame/sdlmame /usr/lib/sdlmame/sdlmame: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=1c568ea445136897ea8e9bfd3d66b9be2bdee0de, stripped

A screenshot here: http://i.imgur.com/ZXtEXFS.jpg

I'm not sure what other information to provide at this time. If you would like to know more, just ask and I can make it happen.

@sergiomb2
Copy link
Owner

Hi, did you received my message ?
First in options you need specify location of mame etc ,
sdlmame , what is the version ?
have you any rom installed in you computer ?

@tuxertech
Copy link
Author

Options have specified location of sdlmame binary to /usr/lib/sdlmame/sdlmame, and I have a couple roms installed. I have the path for the roms and samples.

Also, I checked the option to let it use 'default options' and many more options opened up, but restarting, pressing the 'refresh' button, it says it audits the games, but then nothing shows up still.

sdlmame is 0.170.

@sergiomb2
Copy link
Owner

/usr/lib/sdlmame/sdlmame is very old ? what is the version ? if is >= mame-0.163 , it needs a fix , like I wrote in email that I send to you.
https://bugzilla.rpmfusion.org/buglist.cgi?list_id=9063&query_format=advanced&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&component=gmameui&product=Fedora

@tuxertech
Copy link
Author

I had to edit to include the version. I am re-reading the link, thanks.

@tuxertech
Copy link
Author

Okay, I found a contribution of 0.171 to Arch Linux in AUR and updated. The problem persists, but now I get the following error after I try to build the game list:

Child PID: 28876 exit status: 512 Child PID: 28876 exited with an error (code 2).

@sergiomb2
Copy link
Owner

@tuxertech
Copy link
Author

I agree. I think game_list.c will need the most work.

@tuxertech
Copy link
Author

I have identified a few functions that maybe key here. I am not a great programmer, so I am not sure how this will need to be done.

from src/game_list.c:
`static void
mame_gamelist_print (FILE *handle, MameRomEntry *rom)
{

    gchar *romname, *gamename, *gamenameext;
    gboolean thetrailer, is_vector, horizontal;
    gchar *year, *manufacturer, *cloneof, *romof, *driver;
    gint num_channels, num_roms, num_samples;
    DriverStatus status, driver_status_colour, driver_status_sound, driver_status_graphics;
    ControlType control;

    g_return_if_fail (rom != NULL);

    g_object_get (rom,
                  "romname", &romname,
                  "gamename", &gamename,
                  "gamenameext", &gamenameext,
                  "the-trailer", &thetrailer,
                  "year", &year,
                  "manufacturer", &manufacturer,
                  "cloneof", &cloneof,
                  "romof", &romof,
                  "driver", &driver,
                  "driver-status", &status,
                  "driver-status-colour", &driver_status_colour,
                  "driver-status-sound", &driver_status_sound,
                  "driver-status-graphics", &driver_status_graphics,
                  "num-channels", &num_channels,
                  "control-type", &control,
                  "is-vector", &is_vector,
                  "is-horizontal", &horizontal,
                  "num-roms", &num_roms,
                  "num-samples", &num_samples,
                  NULL);

    fprintf (handle,
            "%s" SEP        /* romname */
            "%s" SEP        /* gamename */
            "%s" SEP        /* gamenameext */
            "%i" SEP        /* the trailer */
            "%i" SEP        /* is_bios */
            "%s" SEP        /* year */
            "%s" SEP        /* manu */
            "%s" SEP        /* clone of */
            "%s" SEP        /* rom of */
            "%s" SEP        /* driver */
            "%d" SEP        /* status */
            "%d" SEP        /* driver color status */
            "%d" SEP        /* driver sound status */
            "%d" SEP        /* driver sound graphic */
            "%d" SEP        /* control */
            "%i" SEP        /* vector */
            "%s" SEP        /* orientation */
            "%i" SEP        /* channels */
            "%i" SEP        /* roms */
            "%i" SEP        /* samples */
            "\n",
            romname,
            gamename,
            gamenameext,
            thetrailer,
            mame_rom_entry_is_bios (rom),
            year,
            manufacturer,
            cloneof,
            romof,
            driver,
            status,
            driver_status_colour,
            driver_status_sound,
            driver_status_graphics,
            control,
            is_vector,
            horizontal ? "horizontal" : "vertical",
            num_channels,
            num_roms,
            num_samples
    );

    g_free (romname);
    g_free (gamename);
    g_free (gamenameext);
    g_free (year);
    g_free (manufacturer);
    g_free (cloneof);
    g_free (romof);
    g_free (driver);

}

gboolean mame_gamelist_save (MameGamelist *gl) {
GList *listpointer;
FILE *gamelist;
GMAMEUI_DEBUG ("Saving gamelist");
g_message (_("Saving gamelist."));

    g_return_val_if_fail (gl != NULL, FALSE);

    gchar *filename = g_build_filename (g_get_user_config_dir (), "gmameui", "gamelist", NULL);

    gamelist = fopen (filename, "w");
    g_free (filename);

    g_return_val_if_fail (gamelist != NULL, FALSE);

    fprintf (gamelist,
            "# GMAMEUI %0.03f\n"
            "# Name %s\n"
            "# Version %s\n"
            "# list of xmame games for GMAMEUI front-end\n"
            "# The fileformat is: "
            "romname" SEP
            "gamename" SEP
            "gamenameext" SEP
            "the_trailer" SEP
            "is_bios" SEP
            "year" SEP
            "manufacturer" SEP
            "cloneof" SEP
            "romof" SEP
            "driver" SEP
            "driverstatus" SEP
            "drivercolorstatus" SEP
            "driversoundstatus" SEP
            "drivergraphicstatus" SEP
            "control" SEP
            "vector" SEP
            "horizontal" SEP
            "channels" SEP
            "num_roms" SEP
            "num_samples" SEP
            "sampleof\n",
            GAMELIST_DEFINED_VERSION,
            gl->priv->name,
            gl->priv->version
    );

    listpointer = g_list_first (gl->priv->roms);

    while (listpointer) {
            mame_gamelist_print (gamelist, (MameRomEntry*) listpointer->data);
            listpointer = g_list_next (listpointer);
    }

    fclose (gamelist);

GMAMEUI_DEBUG ("Saving gamelist... done");
return TRUE;
}`

I could see changing the 'gamename' variable to 'machinename' but it would cascade to elsewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants