ojaksch / MiSTer_tty2rpi

The even bigger brother of tty2oled and tty2tft. A simple but powerful Marquee solution.
8 stars 2 forks source link

TapTo integration? #4

Open BulletMag opened 4 weeks ago

BulletMag commented 4 weeks ago

Arcade marquees are working brilliantly however when loading console games the standard marquee is loaded e.g NeoGeo, SuperNintendo etc. Would it be possible to use the same method as TapTo so we can use custom marquees for console and NeoGeo games ?

ojaksch commented 4 weeks ago

TapTo isn't on my scope yet (that doesn't mean I'm not interested in), but you already can have individual images, for example NeoGeo games! Have a look at the corresponding thread at the MiSTer Wiki what to do.

Yeah, I know that this also has to find its way to the Readme here. Good things need good times ;)

BulletMag commented 4 weeks ago

Ah awesome I didn't even think of looking at the wiki ... Thanks for that

ojaksch commented 4 weeks ago

Please gimme sign whether it works or not and/or where I can help. And may I ask - for internal statistics - where you are located? Country and region were great to know... see here for a map of active users.

BulletMag commented 2 weeks ago

Please gimme sign whether it works or not and/or where I can help. And may I ask - for internal statistics - where you are located? Country and region were great to know... see here for a map of active users.

Strangely it only semi works, I'm primarily using this for Neo Geo games, after following the instructions in the wiki i was happy when Garou Mark of the Wolves marquee came up, however after switching to KOF94 i get the Marquee not found image, I thought this may be a sizing issue so batch converted all of the PNG images i have to the same as the Garou marquee, again no joy It's a little hit and miss what Neo Geo Marquees load, I'm going to keep trying as the fact its loading some marquees consistently gives me hope it's something simple

As requested I'm from Nottingham in the UK

ojaksch commented 2 weeks ago

I'll have a look at it tomorrow. The trick of a working image is the existence of an exact naming or the game and the corresponding image. Take KOF94: If the ROM is named kof94.neo, the image name has to be kof94.png (or jpg etc) too. Not "kof-94" nor "kof 94". The search and find routine is (should be) case insensitive.

As requested I'm from Nottingham in the UK

Ah, great, one of the most active user of tty2rpi :thumbsup: Many thanks for trusting my work!

BulletMag commented 2 weeks ago

You're welcome, as I have mentioned previously this project ticks all of the boxes for me and I'm happy it exists.

As far as naming the files I have gone through and double checked the naming even going as far as copy/pasting the name from the rom (minus file extension) to the picture and sadly this does not work either. I'm only using the marquees that were in the marquee pack I have only resized them and put them in a NeoGeo folder within the marquee-pictures folder. My next idea is to make a list and manually go through each rom with a marquee available to see what works and what doesn't

ojaksch commented 2 weeks ago

Let's differentiate. There are two NeoGeo Cores available:

If anything is still unclear, just ask. No question, no answer, no joy :)

BulletMag commented 2 weeks ago

I'm using the NeoGeo_20240418.rbf However I have renamed all of the files to their original rom names i.e 'King of Fighters '94, The (kof94).neo' to 'kof94.neo' I have repeated this on the picture names i.e 'kof94.png' if I load into the core manually and select '2020 Baseball' (2020bb) it loads and so does the marquee next I manually load 'Alpha Mission II' (alpham2) this also loads as does the marquee however when I try and load 'Aggressors of dark Kombat' (aodk) the game loads but the marquee does not and loads the Marquee Not Found I even made a copy of kof94 and renamed it testrom.neo and renamed the kof94.png to testrom.png ... this failed with the same result as above :( It's strange that some work and others don't

ojaksch commented 2 weeks ago

Meeeh! This shouldn't happen. Will try the same at my site tomorrow...

ojaksch commented 2 weeks ago

Just tested with NeoGeo_20240418.rbf and "Aggressors of Dark Kombat", copied into a subfolder as "aodk", but when loading this it is still using "Aggressors of Dark Kombat" as setname (and so as picture). This is coming from the index file /media/fat/games/NEOGEO/romsets.xml and I have no influence on it.

Best practice would be to hold all NeoGeo pictures in a double version, one named in the long form and one in the short form (MAME naming scheme).

BulletMag commented 1 week ago

Seems you're correct, after renaming all of the images to their corresponding names from the romsets.xml almost all of them work however any names containing special character i.e ':/><' etc get removed upon renaming and sadly then don't match. I suppose I could edit the .neo metadata and rebuild my library but this would be on a personal scale and wont be helpful to the whole project and others. Thanks for your help

ojaksch commented 1 week ago

Yeah, some characters are impossible for filenames, like / (Linux) or \ (Windows). But are there any special characters in the romsets.xml or (one of) the .neo files? I didn't notice. Before you are going to start rebuilding any huge library task, gimme a day or two to investigate this interesting "special character" issue. Maybe helpful if you could post an/some example(s) as text or screenshot.

BulletMag commented 1 week ago

Quite a few contain the ':' e.g aof3 - Art of Fighting 3: The Path of the Warrior and mslug2 - Metal Slug 2: Super Vehicle-001/II contains the '/'

I'm in the process of going through and testing each one I'll update you on progress soon

ojaksch commented 1 week ago

I see. Looks like you are using Windows, a Windows based filesystem (FATxx) or a SMB share to edit/create/rename files, where ":" isn't allowed while okay in Linux' filesystems ;) But the "/" is a bad ass. Maybe I'll add a filter for this...

ojaksch commented 1 week ago

Wait a moment... While experimenting with a "problematic character filter" I discovered that MiSTer is already doing this job! Having tested Metal Slug 2 (mslug2).neo, XML name Metal Slug 2: Super Vehicle-001/II and MiSTer is giving Metal Slug 2 which is used for the picture name then. Same for King of Fighters '98, The (kof98).neo, XML name King of Fighters '98, The: The Slugfest, MiSTer name King of Fighters '98, The.

Rightyright, nothing to do at my site, only renaming a handful problematic picture files and we are set.

EDIT: Picture's filename can be longer then expected. For exmaple: MiSTer is giving King of Fighters '94, The, picture is named King of Fighters '94, The (kof94) and also works...this is my find routine on the RPi, which shortens the string until something matches - in this case King of Fighters '94, The :1st_place_medal:

EDIT: Another useful thing you can use while testing all ROMs/Pictures is to ssh to the RPi (as user tty2rpi) and to enter the command journalctl -f there. When choosing a ROM on the MiSTer you can see some debugging output on the RPi in the form of

Jun 24 12:40:35 tty2rpi tty2rpi[3973]: Socket got CORE »NEOGEO« Jun 24 12:40:36 tty2rpi tty2rpi[3994]: Socket got GAME »NEOGEO/King of Fighters '94, The«

which should help to rename the corresponding picture.

BulletMag commented 1 week ago

Awesome :) I started going through some games and renaming accordingly, Admittedly i was doing this at random (i'll do a more structured approach later) I did find an issue with Samurai Shodown though, I have marquees for 1, 2 and 3 all named Samurai Shodown, Samurai Shodown II and Samurai Shodown III respectively (these are same names requested as per the debugging feed) 'GAME »NEOGEO/Samurai Shodown III' Of these three games only SS3 loads a marquee, could this be the string shortening routine causing this, if so could this be an issue moving forward with any games with sequels?

Other than that progress is being made, I now intend to go through and catalogue the games and their setnames so I can make the marquees (only Neo Geo at this point but others later)

Cheers

BulletMag commented 1 week ago

Doing a little more investigation I did find that the games like King of the Monsters loaded the KOTM2 marquee and Last Blade, Last Blade 2 loaded the Last Resort Marquee instead this appears to happen with sequels like i mentioned previously.

On another note I managed to come across a complete marquee pack for the NeoGeo so I can now better test as all games should have a marquee, Here's where i got them from should you also want them... https://forums.launchbox-app.com/files/file/1433-neo-geo-classic-marquees-redone/

ojaksch commented 1 week ago

Samurai Shodown is a good example and is producing the same wrong picture here. I'm sure that there is something quirky with my shortening routine - or it is throwing out an unexpected multiple find (I, II, III - the I fits all)... I'm in the process of checking.

ojaksch commented 1 week ago

Hehe, no fix necessary. Have a look at your neogeo pictures's directory on the RPi. It should be name NEOGEO, not neogeo, NeoGeo or similar. That is the exact named core which is set by MiSTer and Linux is explicit case sensitive!

While the search and shortening routine itself is case insensitive, the folder is not and set by MiSTers parameter/core name. On the other hand, if nothing is found nor matches anything, the search routing continues to find anything in the root folder (~/marquee-pictures). That is why III is found but II and I not (multiple matches). Could be optimized, yes, for sure, but it makes the routine more confusing ;)

ojaksch commented 1 week ago

BTW: I'm using the SNK Neo-Geo MVS (Marquees-Custom)(MAME)(EM 20151019) pack from emumovies, they look more "individual" to me... like this:

samsho

BulletMag commented 1 week ago

Hehe, no fix necessary. Have a look at your neogeo pictures's directory on the RPi. It should be name NEOGEO, not neogeo, NeoGeo or similar. That is the exact named core which is set by MiSTer and Linux is explicit case sensitive!

While the search and shortening routine itself is case insensitive, the folder is not and set by MiSTers parameter/core name. On the other hand, if nothing is found nor matches anything, the search routing continues to find anything in the root folder (~/marquee-pictures). That is why III is found but II and I not (multiple matches). Could be optimized, yes, for sure, but it makes the routine more confusing ;)

After renaming all of the images to the expected setnames it does seem that the first in the series seems to be the one that doesn't load it's marquee e.g Art of Fighting, 1 and 2 load fine but the first does not. this is also the same with Samurai Shodown with only 3,4 and five loading correctly.

However if the first in the series has a setname like Real Bout Fatal Fury (bugfix) then the rest of the series will work fine.

I do like the individual marquees but I wanted to try and emulate the original marquee as much as possible

ojaksch commented 1 week ago

After renaming all of the images to the expected setnames it does seem that the first in the series seems to be the one that doesn't load it's marquee e.g Art of Fighting, 1 and 2 load fine but the first does not. this is also the same with Samurai Shodown with only 3,4 and five loading correctly.

However if the first in the series has a setname like Real Bout Fatal Fury (bugfix) then the rest of the series will work fine.

But have you checked (and renamed if needed) the folder ~/marquee-pictures/NEOGEO <- need to be uppercase

I do like the individual marquees but I wanted to try and emulate the original marquee as much as possible

Everyone the way they like it best! :heart:

BulletMag commented 1 week ago

But have you checked (and renamed if needed) the folder ~/marquee-pictures/NEOGEO <- need to be uppercase

WOW ! that seems to have worked !!! Had you not pointed it out I would have never even considered that to be the issue seeing as all of the rest of the images works fine :)

Now that's resolved it's back to the topic of this thread (TapTo integration) :) If I'm manually selecting the NeoGeo core from the Console menu all marquees load now :) However if I use my 'Load Random NeoGeo' TapTo card It'll only load the default NeoGeo image from the marquee-pictures folder Debug reports the following ...

Jun 25 14:11:23 tty2rpi tty2rpi[1971]: Socket got CORE »NEOGEO« Jun 25 14:11:23 tty2rpi tty2rpi-inotify.sh[1980]: convert-im6.q16: unable to open image/home/tty2rpi/marquee-pictures/NEOGEO.*': No such file or directory @ error/blob.c/OpenBlob/2924. Jun 25 14:11:23 tty2rpi tty2rpi-inotify.sh[1980]: convert-im6.q16: no decode delegate for this image format ' @ error/constitute.c/ReadImage/587. Jun 25 14:11:23 tty2rpi tty2rpi-inotify.sh[1980]: convert-im6.q16: no images defined/dev/shm/CORE.png' @ error/convert.c/ConvertImageCommand/3229. Jun 25 14:11:23 tty2rpi tty2rpi[1991]: Socket got GAME »NEOGEO« ` Same happens when I use a Card that points to a specific game, just the default marquee comes up :(

The Arcade cards work flawlessly both specific game cards and the random Arcade game card.

Its' another head scratcher :) ill keep digging and see if i can find a solution :)

Thanks for all of your help :)

ojaksch commented 1 week ago

Great, one problem solved :crown:

However if I use my 'Load Random NeoGeo' TapTo card It'll only load the default NeoGeo image from the marquee-pictures folder Debug reports the following ...

Difficult to analyse w/o having a TapTo setup... Looks like it isn't setting any of the values/files I'm looking for when using the standard MiSTer menu system, just only setting NEOGEO. For that ensure that you are having a picture like /home/tty2rpi/marquee-pictures/NEOGEO.png (jpg or whatever). I'll try to have a look at the TapTo software.

Meanwhile, please have a look on MiSTers /tmp directory and post the content of the files CORENAME, CURRENTPATH, FULLPATH, RBFNAME, and STARTPATH after loading a specific game with a TapTo card.

EDIT: ...and /tmp/NFCSCAN on MiSTer... !

BulletMag commented 1 week ago

Ok I think I may see the issue ... First I loaded 'The Punisher' Arcade game using the TapTo card ...

CORENAME : punisher
CURRENTPATH : _Arcade
FULLPATH : <- this was blank
RBFNAME : JTCPS15
STARTPATH : /media/fat/_Arcade/The Punisher (World 930422).mra
TOKENREAD : 042830cc780000,_Arcade/The Punisher (World 930422).mra

Note NFCSCAN doesn't exist but TOKENREAD gives the info you require I think.

Next a random NeoGeo Tapto card ...

CORENAME : NEOGEO
CURRENTPATH : _Arcade
FULLPATH : <- this was blank
RBFNAME : NEOGEO
STARTPATH : /tmp/1762653775.mgl
TOKENREAD : 0430ed98780000,**launch.random:NeoGeo

As you see the CURRENTPATH is pointing to _Arcade, I'm unsure if this is significant ... Next the dedicated KOF96 card ...

CORENAME : NEOGEO
CURRENTPATH : _Arcade
FULLPATH : <- this was blank
RBFNAME : NEOGEO
STARTPATH : /tmp/2045284237.mgl
TOKENREAD : 04bcbfa3682681,NeoGeo/kof96.neo

From here I manually loaded 2020 Super Baseball from the menu ...

CORENAME : NEOGEO
CURRENTPATH : 2020 Super Baseball (set 1)
FULLPATH : games/NEOGEO
RBFNAME : NEOGEO
STARTPATH : /tmp/2045284237.mgl
TOKENREAD : 04bcbfa3682681,NeoGeo/kof96.neo

I assume TOKENREAD still showed the previous selection as I had manually selected a game.

I'm going to experiment with a couple of other console cores to get marquees working and then see if this is isolated to NeoGeo or if its a wider issue.

ojaksch commented 1 week ago

I see... Could you send me some of these used/created MRA and MGL files, please?

BulletMag commented 1 week ago

I see... Could you send me some of these used/created MRA and MGL files, please?

I'm unsure where to find these, the .mgl listed doesnt appear to be in the tmp folder as it states

ojaksch commented 1 week ago

Another approach: I'll open an issue at the official repo of TapTo tomorrow to ask if he's interested to officially support tty2rpi (tty2oled is already supported). Stay tuned...

ojaksch commented 1 week ago

Issue at TapTo opened

BulletMag commented 5 days ago

I see now that Wizzo has added extra stuff to the ACTIVEGAME folder, does this help at all?

ojaksch commented 5 days ago

Cannot test, having no TapTo device and I'm down by illness :(

BulletMag commented 5 days ago

Oh sorry to hear that chap, get well soon buddy