MiSTer Extensions
- wizzo
- Scripting Wizard
- Posts: 183
- Joined: Sat Mar 12, 2022 11:32 am
- Has thanked: 15 times
- Been thanked: 243 times
MiSTer Extensions
https://github.com/wizzomafizzo/mrext
Make sure to check the linked documentation for each script you use. Most are simple and work out-of-the-box, but some require manual setup before they do anything useful.
Re: MiSTer Extensions
This is quite handy. Most often than not we are spoiled for options and it can be very difficult to pick something to play. It would be awesome to be able to set filters such as "only pick selected cores" for example.
-
- Top Contributor
- Posts: 375
- Joined: Sun Sep 27, 2020 10:16 am
- Has thanked: 209 times
- Been thanked: 87 times
Re: MiSTer Extensions
Remastering Classic Game Cinematics: My new Youtube fun, check it out
https://www.youtube.com/@neocaron87
- wizzo
- Scripting Wizard
- Posts: 183
- Joined: Sat Mar 12, 2022 11:32 am
- Has thanked: 15 times
- Been thanked: 243 times
Re: MiSTer Extensions
I've decided to go in a bit of a different direction with this one and turn it into something to search for games instead. I've kept the random script in the repo if anyone still wants to try it, though a major downside of it is it won't ever support zip files. I'm going to implement the random launch functionality into this new script though which will support them plus the filtering suggestion.
On first run this creates a database of all your files, which can take a minute or two, but after that it's very fast to search everything. Right now you'll need a keyboard to input text but I was also going to mess around with some ideas for controller input.
It's probably still buggy but you can give it a shot here (the old url redirects here):
https://github.com/wizzomafizzo/MiSTer_Search
And these are some screenshots of it working so far.
- mrchrister
- Scripting Wizard
- Posts: 295
- Joined: Tue Mar 30, 2021 6:23 pm
- Location: Canada
- Has thanked: 32 times
- Been thanked: 122 times
Re: MiSTer Extensions
Super Attract Mode has a setting in the menu called game roulette, which will let you play random games for a set timer. It also has zip support since it creates game lists on first launch of all files in a directory and uses an unzipper tool called partun (written for MiSTer large zip support) to list all files in a zip.
-
- Top Contributor
- Posts: 1441
- Joined: Mon May 25, 2020 7:54 pm
- Has thanked: 496 times
- Been thanked: 467 times
Re: MiSTer Extensions
EDIT: scratch that, it got saved as HTML. Oh, github...
Ok, works fine. Seriously impressive - the indexing is so fast! (of +40k files) And search itself is pretty snappy too. Very neat feature I never knew I needed Hope you can do still do something on the random front (with zips) too, I love RNG gaming.
One thing is, it kind of takes a long time on quitting? (after Press any key to continue)
Also, is it possible to run the indexing again? I did mine when my HDD was disconnected..
CRT SCR$ Project - building a collection of high-quality photos of CRT displays
CRT ART Books - retro-gaming books with authentic CRT photos
- wizzo
- Scripting Wizard
- Posts: 183
- Joined: Sat Mar 12, 2022 11:32 am
- Has thanked: 15 times
- Been thanked: 243 times
Re: MiSTer Extensions
First one, I am not sure. When that "Press any key" message is displayed the script has already exited and mister is back in control. Does it happen with other scripts or just this one in particular? I don't recall it being particularly slow for me either.
Second one, just delete the "search.db" file in the root of your SD card. It will make a new one when you re-run. In the future I'll add a menu option to regenerate it.
- wizzo
- Scripting Wizard
- Posts: 183
- Joined: Sat Mar 12, 2022 11:32 am
- Has thanked: 15 times
- Been thanked: 243 times
Re: MiSTer Extensions
- Attachments
-
- 2022-07-12_15-54-01.png (23.44 KiB) Viewed 21910 times
-
- Top Contributor
- Posts: 375
- Joined: Sun Sep 27, 2020 10:16 am
- Has thanked: 209 times
- Been thanked: 87 times
Re: MiSTer Extensions
Remastering Classic Game Cinematics: My new Youtube fun, check it out
https://www.youtube.com/@neocaron87
- mrchrister
- Scripting Wizard
- Posts: 295
- Joined: Tue Mar 30, 2021 6:23 pm
- Location: Canada
- Has thanked: 32 times
- Been thanked: 122 times
Re: MiSTer Extensions
BTW, on my setup it says "Found 0 games" but the script seems to work!
Edit:
Spoke too soon, when launching games I get an error:
Code: Select all
Traceback (most recent call last):
File "/media/fat/Scripts/./search.sh", line 897, in <module>
display_keyboard_input(db)
File "/media/fat/Scripts/./search.sh", line 708, in display_keyboard_input
display_search_results(db, text)
File "/media/fat/Scripts/./search.sh", line 856, in display_search_results
launch_game(selected[0], selected[1])
File "/media/fat/Scripts/./search.sh", line 333, in launch_game
mgl = create_mgl_file(system_name, path)
File "/media/fat/Scripts/./search.sh", line 121, in create_mgl_file
generate_mgl(*to_mgl_args(system, match_system_file(system, path), path))
File "/media/fat/Scripts/./search.sh", line 110, in to_mgl_args
match[1],
TypeError: 'NoneType' object is not subscriptable
/media/fat/Scripts#
- wizzo
- Scripting Wizard
- Posts: 183
- Joined: Sat Mar 12, 2022 11:32 am
- Has thanked: 15 times
- Been thanked: 243 times
Re: MiSTer Extensions
I'm definitely doing this.mrchrister wrote: ↑Mon Jul 18, 2022 5:21 pm What do you think about adding the favorites maker to this script? Search for a game and make it a favorite.
A little update on this one. I've been working on a compiled version of these 2 scripts. The search one is still in progress but I've just got the random one to a state I'm happy with. You can test it here:
https://github.com/wizzomafizzo/mrext/r ... /random.sh
Same as any other script, just throw it in the Scripts folder and run it from the menu. This one now supports zip files and is a lot "more random" than the old method of traversing directories. There's a couple seconds of delay for giant zip files like snes and c64 packs but in general it's instant.
I've also added 2 arguments to the script: -filter and -ignore. Filter lets you restrict the app to certain directories:
Code: Select all
/media/fat/Scripts/random.sh -filter arcade,psx,snes
Code: Select all
/media/fat/Scripts/random.sh -ignore c64,atari7800
Code: Select all
#!/usr/bin/bash
/media/fat/Scripts/random.sh -filter psx
- wizzo
- Scripting Wizard
- Posts: 183
- Joined: Sat Mar 12, 2022 11:32 am
- Has thanked: 15 times
- Been thanked: 243 times
Re: MiSTer Extensions
https://github.com/wizzomafizzo/mrext
This is MiSTer Extensions. It's a few new scripts I've written plus my old scripts in one place. While I always want the scripts to remain independent of each other, they had a lot of overlapping code I was repeating and it became hard to maintain. Now the new ones have shared code for those parts which is much easier for me to deal with (and no more Python which really sucks to work with in a single 2000 line file). Eventually I also want to rewrite my old stuff, but it's pretty low priority since they seem to work fine as is and are basically stable
What I'd like this to become eventually is a shared library for managing all parts of a MiSTer system. Right now I'm working on expanding support for the number of cores the scripts can interact with and supporting custom cores. It's a bit complex, because each core is a somewhat unique, and I have to come up with a unified way to handle them all. But it's coming together pretty well
Anyway, no cool new stuff to show off sorry! Just wanted to get this out there. Always happy to hear feedback though
- wizzo
- Scripting Wizard
- Posts: 183
- Joined: Sat Mar 12, 2022 11:32 am
- Has thanked: 15 times
- Been thanked: 243 times
Re: MiSTer Extensions
LaunchSync has been up in my repo for a while now but I haven't really "announced" it anywhere. This is a script that uses special "sync" files to generate game playlists in the menu. They use search queries to match games on the target system, so they should be quite portable. They're also subscriptable. You can host your own sync file somewhere, make updates to it, and those updates will show up for everyone else's menu. Potential for some really cool stuff if it catches on.
PlayLog is a service that runs in the background and keeps track of what games and cores you've been playing. It tracks total time played and a history of events. Right now it only shows your top 10 games and cores, but in the future it could generate more complex reports. There's even potential to plug it into services like Discord statuses.
- wizzo
- Scripting Wizard
- Posts: 183
- Joined: Sat Mar 12, 2022 11:32 am
- Has thanked: 15 times
- Been thanked: 243 times
Re: MiSTer Extensions
Hi forum friends.
Since I made this post I've mostly been working on Remote in the other thread. But I also released these goodies lately:
LastPlayed is a service which dynamically created shortcuts in the MiSTer menu. Right now it can create a "last game played" shortcut which will always point to the last game launched, and a "recently played" folder which lists all the most recently launched games (unlike the official recents menu, which can only list cores and mgls). The first feature is also usable with the bootcore option so you can automatically launch the last played game on boot, which was the original intention of the script.
NFC is a service which lets you use cheap consumer grade USB NFC scanners to launch cores, game and custom commands. It's a pretty new one but I've gotten good feedback on it so far. I've tried to make launching files from it as robust as possible, and it also does cool stuff like launch a randomly selected game from a system. Works with Amiibos too. The intention for this script is to make NFC scanning more accessible. Current solutions are awesome, but most people don't want a soldering project. This is plug and play.
- wizzo
- Scripting Wizard
- Posts: 183
- Joined: Sat Mar 12, 2022 11:32 am
- Has thanked: 15 times
- Been thanked: 243 times
Re: MiSTer Extensions
I'm also enjoying the NFC script. Thank you!!
Would it be possible to run scripts from the NFC Tag?
- wizzo
- Scripting Wizard
- Posts: 183
- Joined: Sat Mar 12, 2022 11:32 am
- Has thanked: 15 times
- Been thanked: 243 times
Re: MiSTer Extensions
Glad to hear it
You can run system commands with it: https://github.com/wizzomafizzo/mrext/b ... md#command
Perhaps in the future I can add an option to enable those written to cards.
If you mean launch from the scripts menu like that. I could probably reuse the way Remote launches them
Re: MiSTer Extensions
wizzo wrote: ↑Wed Aug 30, 2023 12:48 pmGlad to hear it
You can run system commands with it: https://github.com/wizzomafizzo/mrext/b ... md#command
Perhaps in the future I can add an option to enable those written to cards.
If you mean launch from the scripts menu like that. I could probably reuse the way Remote launches them
Yes, I was wondering if I could launch downloader.sh from a NFC tag.
Thank you.
-
- Posts: 261
- Joined: Sun May 24, 2020 10:06 pm
- Has thanked: 136 times
- Been thanked: 78 times
Re: MiSTer Extensions
I'm really interested in jumping into the NFC stuff, I've checked Amazon and Ali Express and it seems there are tons of different vendors selling the ACR122U reader with wildly different prices.
Is any ACR122U as good as another? can I just grab the cheapest one?
- wizzo
- Scripting Wizard
- Posts: 183
- Joined: Sat Mar 12, 2022 11:32 am
- Has thanked: 15 times
- Been thanked: 243 times
Re: MiSTer Extensions
Lightwave wrote: ↑Thu Aug 31, 2023 7:26 amI'm really interested in jumping into the NFC stuff, I've checked Amazon and Ali Express and it seems there are tons of different vendors selling the ACR122U reader with wildly different prices.
Is any ACR122U as good as another? can I just grab the cheapest one?
My advice at the moment is do not get the cheapest one. There's a certain clone that doesn't work with the script and I have no way to identify the listing if it's a dud or not.
These links I can confirm are legit:
https://www.amazon.com/dp/B07KRKPWYC
https://www.ebay.co.uk/itm/145044206870
You are welcome to give AliExpress a go! But yeah just a warning for now until I can either support the clone or work out how to tell before buying
-
- Posts: 261
- Joined: Sun May 24, 2020 10:06 pm
- Has thanked: 136 times
- Been thanked: 78 times
Re: MiSTer Extensions
Ah, I'm in Asia so those US/UK links aren't really good for me. Ali Express would be ideal, but I'd rather not waste my money on an incompatible version, so I think I'll hold off for now until things are clearer as you mentioned.
Thanks for all your work on these scripts! Looking forward to the iOS remote app.
-
- Posts: 261
- Joined: Sun May 24, 2020 10:06 pm
- Has thanked: 136 times
- Been thanked: 78 times
Re: MiSTer Extensions
Ok, I ended up taking a chance after all because I was excited about this, and I managed to get a reader that works!
I have a question about using the .csv file:
Will having many entries add a noticeable delay to launching games (vs writing the commands directly to NFC)? I'm assuming it needs to load and parse the list each time?
I'm trying to figure out my approach before I add a bunch of cards, and using the csv method seems more flexible to me.
- wizzo
- Scripting Wizard
- Posts: 183
- Joined: Sat Mar 12, 2022 11:32 am
- Has thanked: 15 times
- Been thanked: 243 times
Re: MiSTer Extensions
Lightwave wrote: ↑Fri Sep 15, 2023 4:50 amOk, I ended up taking a chance after all because I was excited about this, and I managed to get a reader that works!
I have a question about using the .csv file:
Will having many entries add a noticeable delay to launching games (vs writing the commands directly to NFC)? I'm assuming it needs to load and parse the list each time?I'm trying to figure out my approach before I add a bunch of cards, and using the csv method seems more flexible to me.
It's only loaded when the file is changed for exactly that reason I don't think it would ever be slow unless it was insanely big, but I found it was causing screen flickering in the menu. It has a monitor running and will auto reload the CSV each edit
Re: MiSTer Extensions
I have a question regarding the ini switching via NFC. I've been able to load games via the cards, but not switching inis. I made sure to use the latest script, and I made a few NFC cards where I entered the text as described in the github (**ini:1 ) but when I tap them, I get some kind of error beeps and nothing happens.
I don't know if it matters, but I also created a nfc.ini that I put in the Script folder, and I changed "allow_commands" to "yes", but that didn't help. Am I missing something obvious, or perhaps I've used the wrong syntax? I tried to troubleshoot as best I can: I used the same type of cards (even the same card via rewriting) to load the game successfully and switch ini unsuccessfully, I've double-checked the spelling and syntax on the github, I re-ran the nfc script after updating it, just to be sure.
Re: MiSTer Extensions
Djiem wrote: ↑Sat Sep 30, 2023 12:34 amI have a question regarding the ini switching via NFC. I've been able to load games via the cards, but not switching inis. I made sure to use the latest script, and I made a few NFC cards where I entered the text as described in the github (**ini:1 ) but when I tap them, I get some kind of error beeps and nothing happens.
I don't know if it matters, but I also created a nfc.ini that I put in the Script folder, and I changed "allow_commands" to "yes", but that didn't help. Am I missing something obvious, or perhaps I've used the wrong syntax? I tried to troubleshoot as best I can: I used the same type of cards (even the same card via rewriting) to load the game successfully and switch ini unsuccessfully, I've double-checked the spelling and syntax on the github, I re-ran the nfc script after updating it, just to be sure.
Have you updated to the latest nfc.sh?
Try download it and replace it in the Scripts folder if it doesn't automatically download.
Code: Select all
#TAGNR#,,**ini:1
worked for me without further configuration, but i use the nfc.csv to define each nfc tag action.
To get the tagnumber, run the nfc.sh script and scan an empty tag and you will get the nr.
Don't forget to restart the nfc.sh service if you add stuff to nfc.cvs.
Re: MiSTer Extensions
Unfortunately, nothing worked, even though I'm using the latest nfc.sh and restarted the service after updating. I was able to load a random SNES game, so commands do work and I believe I'm using the right syntax. With that said, I see the script is still being worked on, and that a script from sigboe is being created to have some sort of GUI. I'm gonna wait a bit and work around with those and see if they help; maybe I am doing something wrong.
Re: MiSTer Extensions
Djiem wrote: ↑Tue Oct 03, 2023 3:59 amUnfortunately, nothing worked, even though I'm using the latest nfc.sh and restarted the service after updating. I was able to load a random SNES game, so commands do work and I believe I'm using the right syntax. With that said, I see the script is still being worked on, and that a script from sigboe is being created to have some sort of GUI. I'm gonna wait a bit and work around with those and see if they help; maybe I am doing something wrong.
Maybe it is your NFC tag that is unsupported?
You can check tag version with the android app recommended on the github and see if it is supported.
Re: MiSTer Extensions
chimaera wrote: ↑Tue Oct 03, 2023 5:06 pmDjiem wrote: ↑Tue Oct 03, 2023 3:59 amUnfortunately, nothing worked, even though I'm using the latest nfc.sh and restarted the service after updating. I was able to load a random SNES game, so commands do work and I believe I'm using the right syntax. With that said, I see the script is still being worked on, and that a script from sigboe is being created to have some sort of GUI. I'm gonna wait a bit and work around with those and see if they help; maybe I am doing something wrong.
Maybe it is your NFC tag that is unsupported?
You can check tag version with the android app recommended on the github and see if it is supported.
It should be supported normally; I used the very same tag (not just a tag of the same type, literally the same tag) to load a specific NES game, and even to use the command to load a random SNES game, both before and after failing to use it for ini changes. It only gives me an error beep when I try to change ini files.
-
- Posts: 261
- Joined: Sun May 24, 2020 10:06 pm
- Has thanked: 136 times
- Been thanked: 78 times
Re: MiSTer Extensions
Are your ini files named using the original convention (MiSTer.ini, MiSTer_alt_1.ini, MiSTer_alt_2.ini, etc.)?
Or are you using the newer naming that allows arbitrary labels (MiSTer_CRT.ini, MiSTer_HDMI.ini, etc.)?