Attract-Mode Support Forum
Attract-Mode Support => General => Topic started by: Cisek on June 08, 2015, 12:06:26 AM
-
Hi
Is there any way to delete rom from harddrive while using attract mode? I know I can add the games that i want to favourites, but I would rather delete it from gamelist, or even better from harddrive (while navigating gamelist). Thanks
-
This could be a nice feature.
As hard as I try to filter stuff mahjong and fruit machine stuff still ends up getting through.
A button to just obliterate the rom from the system make things easier or a way to hide a game for deletion later would work.
-
There must be more elegant ways for doing this....but here's two crude approach...
Method 1 : Actual deletion of rom file
#1. Use Plug-in 'Utility Menu', which is included in the AM
#2. Create a 'delete_rom.nut' containing following :
local options = ["Yes", "No"];
local command = fe.overlay.list_dialog( options, "Delete Rom File [" + fe.game_info(Info.Title) + "]");
if ( command != 0 ) return;
if ( OS == "Windows" )
{
fe.plugin_command( "cmd", "/c del \"" + <rom file directory> + fe.game_info(Info.Name) + ".zip\"");
}
else
{
// Use similar approach to above...
}
#3. Note you must modify <rom file directory> in #2 to your actual rom file location manually. (Hence crude approach...)
#4. Save above .nut file into <AM directory>/plugins/UtilityMenu/
#5. Open AM, and change plug-in option,
opt2_cmd @delete_rom.nut
#6. Don't forget to assign keys to 'Utility Menu' plugin as well..
Note : You can reset play count by using similar approach, by deleting corresponding .stat file. (This also can be crude as well)...
Method 2 : Just hide from list
#1. You can easily do this by using custom tags and global_filter.
#2. Mark games that you do not want to see in your list, I use 'Quarantine' tags, for instance.
#3. Add global_filter, that Tags should not contain Quarantine tags.
global_filter
rule Tags not_contains Quarantine
Hope this works. Good luck!
-
Thanks, I'll try that in free time, but still I think it would be nice option to add it for future releases to implement one button delete :)
-
@checkist
I like your idea of "quarantine" list. This is something I could use.
Can you write a little bit more how to achieve that?
I'm planning to transfer my fav-how-to tutorial to wiki (http://forum.attractmode.org/index.php?topic=229.msg1422#msg1422)
I could add that "quarantine" option.
-
@verion
Sorry for the late reply. Below is my description for quarantine list.
[Differences between Tags/Favorites]
#1. Required key strokes (= convenience)
Favorites can be added/removed via single key press (if you disable confirmation, of course)
Tags are added/removed via several keystrokes (shortcut key -> create / select tags)
#2. Layout grammars
-To show games marked as favorites, or tagged by 'Sometag'
Favorites equals 1
Tags contains Sometag (Since there can be multiple tags, you cannot use 'Tags equals Sometag')
-To hide games marked as favorites, or tagged by 'Sometag'
Favorites not_equals 1
Tags not_contains Sometag
-Note
Above method has little unwanted side-effect that tags marked as 'Sometag-1' or '1-Sometag' are also treated like 'Sometag'
(Since [Sometag-1] and [1-Sometag] also 'contains' [Sometag]....)
Usually this does not cause problems, but who knows...
#3. File locations
Favorites are stored in ./attract/romlists/(listname).tag
Tags are stored in ./attract/romlists/(listname)/(tagname).tag
[To hide games from your list]
#1. Tag system in AM is approapriate for this. Set up keys in similar fashion to favorites...
- Open AM
- [Controls]->[Add/Remove Tags], set approapriate keys for shortcut key
#2. In game list, press shortcut key for tags, a menu will appear.
#3. Choose 'Create new Tags', Enter a tag name for marking such games. For example, 'Quarantine'
(You only need to do this once)
#4. Once #3 is done, you can add above tags by simply 'tag shortcut key->[Add Tag : Quarantine]'.
Also as in favorites, pressing shortcut key again on tagged game shows '[Remove Tag : Quarantine]'.
#5. You can hide games marked by above tag by editing filters
- In AM, [Settings]->[Displays]
- Add 'Tags not_contains Quarantine' rule to the approapriate filters.
- Or, add above rule to 'Global-Filter' to hide tagged games from all filters
#6. Tags are stored in same format as favorites. Therefore, you can easily copy favorites to some other tags and vice versa.
-
Tags are stored in ./attract/romlists/(listname)/(tagname).tag
- [Controls]->[Add/Remove Tags], set approapriate keys for shortcut key
Thanks - this was the missing piece of information.
I think I'm all good now.
-
Hey checkist, thanks for the info.
I've tried the tags, and am happy with that.
Now I'm trying and failing to get the delete utility to work.
I think the problem is the syntax of the rom path.
I've stripped the function down to the bare minimum and I can get it to delete a rom in the current directory.
Please could you show me an example for deleting files from a specified directory.
eg:
this works:
local command = "del zzzzdeleteme.7z";
fe.plugin_command( "cmd", "/c " + command );
these don't
local command = "del stats\zzzzdeleteme.7z";
local command = "del stats/zzzzdeleteme.7z";
local command = "del ./stats/zzzzdeleteme.7z";
local command = "del .\stats\zzzzdeleteme.7z";
I'm never sure which way the slash goes!
thanks
-
I use a tool called romlister https://www.waste.org/~winkles/ROMLister/ (https://www.waste.org/~winkles/ROMLister/) to delete most of mine..made it SO much easier! The guide is here: http://wiki.arcadecontrols.com/wiki/RL_tutorials (http://wiki.arcadecontrols.com/wiki/RL_tutorials) No it's not perfect and it will not make a list for attract mode, but it will make a .bat file so you can delete the roms you don't want very easily. I was able to cut out A LOT and saved a lot of space.
-
ocal options = ["Yes", "No"];
local command = fe.overlay.list_dialog( options, "Delete Rom File [" + fe.game_info(Info.Title) + "]");
if ( command != 0 ) return;
if ( OS == "Windows" )
{
fe.plugin_command( "cmd", "/c del \"" + </home/pi/RetroPie/roms/mame-libretro/> + fe.game_info(Info.Name) + ".zip\"");
}
else
{
// Use similar approach to above...
}
Having issues. Please help. I have tried every combination in the rom path with and without <> and the / at the end.
-
You can also delete a game (from a romlist, not the file itself) using the "Edit Game" command in attractmode
configure -> controls -> Edit Game - map this to a key
Now when you are on the game you want to edit, you can press the mapped key, which pops up an edit menu
At the bottom of the edit menu is an option to "Delete this Game"
-
I followed your guide, added a tag "deleted", created a global rule to hide the games tagged and marked some games with it. Unfortunately AM does not hide the games straight away. The changes I made are only visible after restarting AM. This mechanism maybe is ok when you setup your rom collection, but with normal use it's kind off pointless as I do not want to restart AM in the cabinet every time I tag a game.
Is there any solution to this?