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).
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.
Created attachment 301573 [details] cut-down patch that adds options for highscore-saving and nagscreens-removal
(In reply to comment #1) > epatch "${FILESDIR}"/${P}.patch Sorry, this is wrong. This has to be: epatch "${FILESDIR}"/${P}-hiscores.patch
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.
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.
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.