sergiomb2 / gmameui

Fork of GMAMEUI, the front-end for MAME under Linux, extending the now-defunct GXMame front-end
http://sourceforge.net/projects/gmameui/
GNU General Public License v3.0
7 stars 4 forks source link

Arch Linux installation not running sdlmame #1

Open tuxertech opened 8 years ago

tuxertech commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

/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 commented 8 years ago

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

tuxertech commented 8 years ago

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 commented 8 years ago

sdlmame is 0.170. we need copy some code from https://git.gnome.org/browse/gnome-video-arcade

These is the commits that I have saved to analise :

https://git.gnome.org/browse/gnome-video-arcade/commit/?id=9dfb0f7d1f5fc8cc4a9b52df28e1c4d8ad556b7e https://git.gnome.org/browse/gnome-video-arcade/commit/?id=c4efcb9f26dd1ca41fd67cc1879a4c04cb0eb1e7 https://git.gnome.org/browse/gnome-video-arcade/commit/?id=c171f24129eabcc982a877bcb4e1171b8a309a3b https://git.gnome.org/browse/gnome-video-arcade/commit/?id=ea123fc913711e81860706b906c97bce8211bb5e

Gmameui stopped to work in version 0.163, and I hadn't time to fix it yet ... , update sdlmame will not fix it either, we need do some code before.

tuxertech commented 8 years ago

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

tuxertech commented 8 years ago

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"); gmessage (("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.