mrchrisster / MiSTer_SAM

154 stars 22 forks source link

Add option to ignore games that are require a vertical monitor rotation #213

Closed TheRealBenForce closed 2 years ago

TheRealBenForce commented 2 years ago

I see a lot of games come up in SAM that require the monitor to be rotated 90 degrees. I like to keep these in my collection because sometimes I will want to play one and manually rotate through software. But during SAM, it would be great to just not select these titles.

mrchrisster commented 2 years ago

That's an option, check pathfilter in MiSTer_SAM.ini

mrchrisster commented 2 years ago

any success with pathfilter? arcadepathfilter="_Horizontal" should do the trick

TheRealBenForce commented 2 years ago

any success with pathfilter? arcadepathfilter="_Horizontal" should do the trick

Just threw it in there. I'll keep an eye on it.

TheRealBenForce commented 2 years ago

any success with pathfilter? arcadepathfilter="_Horizontal" should do the trick

Sorry I see this is in the readme now.

One of the problems I'm having though is that only two or three games play before rotation stops so it is hard for me to test this. I noticed that the "Next game in" countdown never starts in these cases using the ssh mode. I have these settings but haven't learned anything that could help diagnose the issue other than the countdown not running:

samdebug="Yes" samquiet="No"

I couldn't find a bug report for this. Any quick ideas or should I open one?

mrchrisster commented 2 years ago

Hmm strange. There are a couple things we can check.. First, make sure you update to the newest version. Which cores do you have enabled? When rotation stops, check the files /tmp/SAM_Games.log and /tmp/SAM_game.mgl

mrchrisster commented 2 years ago

Note: If you have a mouse connected and bump it, sam will stop. Same obviously for typing a key or pushing a button. Could that be the issue?

Edit: Actually that can't be the reason if SAM doesn't stop and only the countdown does. Another reason could be that SAM is working in the background and creating file lists, that will slow it down at first. Just be patient and give it a minute and see if that is the issue..

I also just moved blacklist filtering in the background to not slow down SAM anymore, so the new update might also help with this

TheRealBenForce commented 2 years ago

So those two logs didn't provide anything useful. I didn't have any changes to cores, just what was setup by default. But since reading your message, I removed all cores I don't have games for, which is a lot, and haven't run into any issues. I did the update too. If you want to know if its related to blocklist, I could add the cores back in and see if the problem occurs again. The only difference at that point would be the update. Pretty sure I updated a few days ago though.

mrchrisster commented 2 years ago

Ok, glad it's working now. SAM should delete a core from corelist if no games for that system have been found. Please re-add the cores and check if the problem persists, that would be good to know. Also, any samquiet output in ssh should be helpful

TheRealBenForce commented 2 years ago

The problem came back as soon as I added back default core list. Here are two examples:

Example 1 Starting Super Attract Mode... Let Mortal Kombat begin!

Selected core: GBC Creating game list at /media/fat/Scripts/.MiSTer_SAM/SAM_Gamelists/gbc_gamelist.txt Finding system folders... Scanning GameboyColor: /media/fat/games/GAMEBOY Indexing complete (0 games in 0s) Can't find games for Nintendo Game Boy Color Selected core: ATARI2600 250 Games in list after removing duplicates. Selected file: /media/fat/games/ATARI7800/BurgerTime.zip/BurgerTime (USA).a26 Starting now on the Atari 2600: BurgerTime (USA) fgrep: /media/fat/Scripts/.MiSTer_SAM/SAM_Gamelists/gbc_gamelist.txt: No such file or directory fgrep: /media/fat/Scripts/.MiSTer_SAM/SAM_Gamelists/gbc_gamelist.txt: No such file or directory awk: /media/fat/Scripts/.MiSTer_SAM/SAM_Gamelists/gbc_gamelist.txt: No such file or directory cat: /tmp/.SAM_List/gbc_gamelist.txt: No such file or directory 0 Games in list after removing duplicates. sed: /tmp/.SAM_List/gbc_gamelist.txt: No such file or directory fgrep: /tmp/.SAM_List/gbc_gamelist.txt: No such file or directory Blacklist creation failed. Will try again on next core launch. Trying another rom... fgrep: /tmp/.SAM_List/gbc_gamelist.txt: No such file or directory cat: /media/fat/Scripts/.MiSTer_SAM/SAM_Gamelists/gbc_gamelist.txt: No such file or directory File not found. Creating new game list now... Finding system folders... Scanning Atari2600: /media/fat/games/ATARI7800 Indexing complete (250 games in 2s) cat: /tmp/.SAM_List/gbc_gamelist.txt: No such file or directory Selected file: awk: /tmp/.SAM_List/gbc_gamelist.txt: No such file or directory ERROR: Failed 1 times. No valid game found for core: atari2600 rom: Trying to find another rom... Selected file: /media/fat/games/ATARI7800/Marine Wars.zip/Marine Wars (USA).a26 Starting now on the Atari 2600: Marine Wars (USA)

Example 2 Starting Super Attract Mode... Let Mortal Kombat begin!

Selected core: SMS 238 Games in list after removing duplicates. Selected file: /media/fat/games/SMS/Baku Baku Animal.zip/Baku Baku Animal (Brazil).sms Starting now on the Sega Master System: Baku Baku Animal (Brazil) 231 Games after removing blacklisted. (Next run of sms) Selected core: GBA Creating game list at /media/fat/Scripts/.MiSTer_SAM/SAM_Gamelists/gba_gamelist.txt Finding system folders... Scanning GBA: /media/fat/games/GBA Indexing complete (0 games in 0s) Can't find games for Nintendo Game Boy Advance Selected core: NES 477 Games in list after removing duplicates. Selected file: /media/fat/games/NES/Teenage Mutant Ninja Turtles II - The Arcade Game.zip/Teenage Mutant Ninja Turtles II - The Arcade Game (USA).nes Starting now on the Nintendo Entertainment System: Teenage Mutant Ninja Turtles II - The Arcade Game (USA) 353 Games after removing blacklisted. (Next run of nes) fgrep: /media/fat/Scripts/.MiSTer_SAM/SAM_Gamelists/gba_gamelist.txt: No such file or directory fgrep: /media/fat/Scripts/.MiSTer_SAM/SAM_Gamelists/gba_gamelist.txt: No such file or directory awk: /media/fat/Scripts/.MiSTer_SAM/SAM_Gamelists/gba_gamelist.txt: No such file or directory cat: /tmp/.SAM_List/gba_gamelist.txt: No such file or directory 0 Games in list after removing duplicates. sed: /tmp/.SAM_List/gba_gamelist.txt: No such file or directory Blacklist creation failed. Will try again on next core launch. Trying another rom... fgrep: /tmp/.SAM_List/gba_gamelist.txt: No such file or directory fgrep: /tmp/.SAM_List/gba_gamelist.txt: No such file or directory cat: /media/fat/Scripts/.MiSTer_SAM/SAM_Gamelists/gba_gamelist.txt: No such file or directory File not found. Creating new game list now... Finding system folders... Scanning NES: /media/fat/games/NES Indexing complete (477 games in 0s) cat: /tmp/.SAM_List/gba_gamelist.txt: No such file or directory Selected file: awk: /tmp/.SAM_List/gba_gamelist.txt: No such file or directory ERROR: Failed 1 times. No valid game found for core: nes rom: Trying to find another rom... Selected file: /media/fat/games/NES/Teenage Mutant Ninja Turtles II - The Arcade Game.zip/Teenage Mutant Ninja Turtles II - The Arcade Game (USA).nes Starting now on the Nintendo Entertainment System: Teenage Mutant Ninja Turtles II - The Arcade Game (USA)

TheRealBenForce commented 2 years ago

Closing this since the conversation beyond the original reported issue which is configurable in the ini.

mrchrisster commented 2 years ago

can you check if this problem is gone now? cores without games will now be removed from the ini and shouldn't cause any output anymore.

mrchrisster commented 2 years ago

please try https://github.com/mrchrisster/MiSTer_SAM/blob/b30f266aa52e82dea66039489c3357b5848b2d5a/MiSTer_SAM.ini#L95

TheRealBenForce commented 2 years ago

@mrchrisster , sure thing. will let you know.

TheRealBenForce commented 2 years ago

@mrchrisster sorry haven't had much time to mess with it. It seems to be working, although its not really clear to me what it does. Like what if I didn't want to use "0". What happens if I use something different. So some info in readme could be helpful maybe. Also I notice this error now in ssh mode that I didn't notice before, but it doesn't seem to have an affect on selection.

shuf: invalid input range: ‘’

mrchrisster commented 2 years ago

I just uploaded a new version. Can you turn samdebug on in the ini? It should give you more insight what's it doing

mrchrisster commented 2 years ago

Would be interesting to know how your core distribution looks like.

TheRealBenForce commented 2 years ago

@mrchrisster here is first output after an update with samdebug="Yes" and samquiet = "No". What do you mean about core distribution?

Gamelist check
corelist: amiga arcade genesis megacd nes sms snes tgfx16 psx
corelisttmp: arcade psx tgfx16 snes genesis nes sms megacd amiga
shuf: invalid input range: ''
Selected core: AMIGA
ERROR - MegaAGS Pack not found in Amiga folder. Skipping to next core...
Gamelist check
corelist: arcade genesis megacd nes sms snes tgfx16 psx
corelisttmp: arcade psx tgfx16 snes genesis nes sms megacd
shuf: invalid input range: ''
Selected core: TGFX16
79 Games in list after removing duplicates.
70 Games after removing blacklisted. (Active on next run of tgfx16)
Selected file: /media/fat/games/TGFX16/R-Type.zip/R-Type (USA).pce
Starting now on the NEC TurboGrafx-16 : R-Type (USA)
Next game in 240...
mrchrisster commented 2 years ago

Thanks for testing. Strange that it gives you an error. I'll try with a new install and see if i can reproduce it

mrchrisster commented 2 years ago

It should give you a percentage of how likely it is that a core gets selected

mrchrisster commented 2 years ago

So it turns out the shuf error was unrelated but is fixed now as well. You have to enable 'coreweight=yes' in ini or use the new settings feature in the menu and go to settings -> miscellaneous options -> enable alternative core selection mode.

TheRealBenForce commented 2 years ago

Seems to be showing the % now correctly, that's cool thanks! When it pulls arcade games though every time I'm getting "no rbf found" on the screen. I never noticed this before, I definitely had arcade cores playing properly.

mrchrisster commented 2 years ago

Try deleting the gamelists through the menu. Can you also confirm the mra it's trying to load (selected file info) exists?

TheRealBenForce commented 2 years ago

Not sure what happened but all my rbf files were missing. Reran update_all and all is well in the mister world again.

mrchrisster commented 2 years ago

Good to hear - and SAM is definitely not deleting Rbf files ;) Still curious about your core percentage if you get a chance to post it.

TheRealBenForce commented 2 years ago

@mrchrisster here you go. This what you are looking for?

[genesis] = 28
[snes] = 24
[nes] = 18
[arcade] = 15
[sms] = 12
mrchrisster commented 2 years ago

Yes. Just curious if the values make sense for other setups, looking good