Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 402875 - games-emulation/sdlmame: Add a flag for highscore-patch?
Summary: games-emulation/sdlmame: Add a flag for highscore-patch?
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-09 16:03 UTC by Stefan Borschtel
Modified: 2012-02-12 01:47 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
cut-down patch that adds options for highscore-saving and nagscreens-removal (sdlmame-0.144-hiscores.patch,25.06 KB, text/plain)
2012-02-11 16:45 UTC, Stefan Borschtel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Borschtel 2012-02-09 16:03:21 UTC
Is it possible to implement a use-flag "highscores" or similar that, when turned on, patches sdlmame with a patch found here: 

http://forum.arcadecontrols.com/index.php?topic=64298.0

and offers the highscore.dat-file that can be downloaded here:

http://highscore.mameworld.info/

? In addition after emerging a message then could be displayed, mentioning that this is an unofficial patch and that the highscore.dat has to be copied to the mame-directory and a "hi"-directory needs to be created.

 I would really appreciate to save highscores as the official solution to use savestates for saving them does not work for some games (some games do not support savestates).
Comment 1 Stefan Borschtel 2012-02-11 16:43:01 UTC
I've been experimenting a little more with this. Unfortunately my knowledge is not the best to get this done clean.

I noticed that the full patch provided at the above mentioned site does not work. So I took out some parts of it. I completely removed the changes for the files of src/osd/windows/ as I assume these are not needed for Linux-sdlmame.
 Also the disable-whitebox-patch-part does not work for Linux so I removed the related parts as well. After this applying the patchfile and compiling the source-code worked and tests with two mame-games (snowbros, raiden) were all positive. I'll attach the patch-file, which i used.

The modified ebuild I used was not that cleanly coded. So I do not want to provide it here in full length. However the part that does the patching should be fine:

    if use hiscores ; then
       einfo "Adding hiscore-save-support"

        edos2unix src/emu/emu.mak
        edos2unix src/emu/emuopts.c
        edos2unix src/emu/emuopts.h
        edos2unix src/emu/machine.c
        edos2unix src/emu/machine.h
        edos2unix src/emu/mame.c
        edos2unix src/emu/profiler.c
        edos2unix src/emu/profiler.h
        edos2unix src/emu/romload.c
        edos2unix src/emu/ui.c
        edos2unix src/emu/video.c
        edos2unix src/emu/video.h
        edos2unix src/mame/machine/cps2crpt.c
        edos2unix src/osd/osdepend.c
        edos2unix src/osd/osdepend.h

       epatch "${FILESDIR}"/${P}.patch 
    fi

Due to my little knowledge on ebuilds, I didn't manage to modify the rest in a fully proper way. But I got it to work for me.

What's left to do is:

- Implementing the related highscore.dat within /usr/share/games/sdlmame-hiscores/ (also a directory named "hi"?)
- Implementing a modified mame.ini that contains the new parameters that are available with the patch (disable_hiscore_patch, disable_nagscreen_patch, hiscore_directory)
- The patch does two things in one: adds highscore-saving and option to remove nagscreens. Might be cleaner to do this in two use-flags, but I'm not sure how this is exactly done with two patchfiles.
- verify the correctness of the patch-file. It works, but I'm not sure if i removed a little bit too much or too few.

Feedback and help on this is welcome.
Comment 2 Stefan Borschtel 2012-02-11 16:45:28 UTC
Created attachment 301573 [details]
cut-down patch that adds options for highscore-saving and nagscreens-removal
Comment 3 Stefan Borschtel 2012-02-11 16:50:09 UTC
(In reply to comment #1)

>        epatch "${FILESDIR}"/${P}.patch 

Sorry, this is wrong. This has to be:

epatch "${FILESDIR}"/${P}-hiscores.patch
Comment 4 Stefan Borschtel 2012-02-11 18:29:58 UTC
I noticed an issue by now with the provided patch: The highscores do save (into a file in .sdlmame/hi/<gamename>.hi), but, when i log out (gnome-session) and in again and start sdlmame again, then the hiscore-list is reset. Strange. I need to investigate into this.
Comment 5 Stefan Borschtel 2012-02-11 19:04:07 UTC
Another note: There seems to be some mame-sourcecode-rule that disabling the nagscreen by default is not allowed (I read about it in some forum). So I either have to disable it by default or need to come up with a patch solely for hiscore-saving (without nagscreen-removal).

I'm not sure when i will/can come up with something like this.
Comment 6 Mr. Bones. (RETIRED) gentoo-dev 2012-02-12 01:47:21 UTC
I can see how that feature would be neat, but it doesn't really fit with the Gentoo tendency to follow upstream.  We don't carry feature-adding patches to packages.  As a result this isn't a candidate for inclusion in the portage tree.  I encourage you to work with upstream to get the feature added to the upstream feature set.  Thanks.