Switch to USB mode - requirements

For topics which do not fit in other specific forums.
LXZ
Posts: 18
Joined: Sun May 24, 2020 9:17 pm
Has thanked: 1 time
Been thanked: 6 times

Switch to USB mode - requirements

Unread post by LXZ »

I know you now can easily store roms on a USB HDD. However, I am curious to learn more about the "switch to USB mode" option to fully operate from a HDD. However, I can't seem to find any documentation on Github or anywhere else. Anyone able to hook me up? Thanks!
User avatar
darksakul
Posts: 353
Joined: Mon May 25, 2020 4:34 pm
Has thanked: 397 times
Been thanked: 73 times

Re: Switch to USB mode - requirements

Unread post by darksakul »

You still need the SD card for the DE 10 nano to boot from, I would just make your game folders on your HDD and migrate your roms to that.
Pay attention to capitalization as the folder names are case sensitive

I would the MiSTer keep it on SD card, delete or cut your games folder from the SD card and copy and paste the games folder to your USB hard drive or USB thumb drive.
It is my great regret that we live in an age that is proud of machines that think and suspicious of people who try to.
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Switch to USB mode - requirements

Unread post by jca »

At some point someone said that the Switch to USB mode was causing some problems. It seems that most people using USB HDD do not use this option and just place their game folder on the HDD. This is what I did. On the SD card I still have the game folder and all its sub-folders but everything is empty. Everything is working fine. The only thing I did is in regard of the update all script, in particular MAME Getter and HBMAME getter.
I created update_mame-getter.ini and update_hbmame-getter.ini in the Scripts folder with the following lines:
ROMMAME=/media/usb0/games/mame
ROMHBMAME=/media/usb0/games/hbmame
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Switch to USB mode - requirements

Unread post by jca »

A thread which gives some info on Switch to USB mode
viewtopic.php?f=30&t=1270
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Switch to USB mode - requirements

Unread post by jca »

Update on Switch to USB mode:
There is no documentation.
Some users reported problems with scripts and configs.
I have been intrigued by this mode -> I decided to see for myself.
I started with a spare SD card and a spare HDD.
I formatted the HDD with NTFS (may be not the best idea - see further down). My everyday HDD is formatted ext4 as it is linux native.
I connected the HDD to the USB HUB.
I used Mr. Fusion to prepare the SD card.
Note: several users mentioned Mr. Fusion not working (without saying what the problem was). I ran into a problem; I use a HDMI monitor (I am not sure if I turned it on before booting the SD card or after) and while doing its initialization the Mr. Fusion looked odd with characters bigger than what they should, the screen shifted right and down so only part of the screen was visible. After the initialization the screen went dark and pressing the reboot button did not fix the problem but MISTer seemed alive. I FTPed into it, saw there was no MISTer.ini file, created one with HDMI 1080p, rebooted and voila. The instructions for Mr. Fusion do not mention this. Could it be the problem when users say that Mr. Fusion does not work?
Back to USB HDD.
With FTP I checked what was on /media/fat (the usual stuff) and /media/usb0 (empty).
In the OSD I Switched to USB mode and checked again /media/fat (no change) and /media/usb0 (the config folder has been copied from SD to HDD - - At that time I did not really checked if it was copied or created as towards the end I checked and did not find the file device.bin on the HDD ).
Time to run the update script: I created /media.fat/Scripts/update.ini containing the line BASE_PATH="/media/usb0" and ran the script.
After the script ran I checked again SD and HDD: no change on SD. On HDD a bunch of folders _Arcade, _Computer, _Console, _Other, _Utility, cheats, Filters, games, Gamma and Scripts. All these folder filled with the same things if the script had been run on the SD card.
The games folder contains all the sub-folders (empty as you have to fill them yourself) for the installed cores, it includes the 2 empty folders mame and hbmame.
Next step is to run the Update All script which has to be downloaded. In this case you have to download update_all_usb0.zip. After unzipping copy the 2 files update_all.sh and update_all.ini to /media/usb0/Scripts.
Time to run Update all:
From the OSD Scripts->update_all gives an error and goes back to the menu so fast that it is impossible to see what it is. I should have looked in the log but instead went to the console:
cd /media/usb0/Scripts
./update_all.sh -> Permission denied
I tried to chmod +x and sudo chmod +x but I always get Permission denied
bash ./update_all.sh works
FTP showed that the scripts are not executable and cannot be made executable. I think it is because the HDD has been formatted NTFS. On my regular HDD formatted ext4 there is no such problem.
After running the script, at the bottom of the screen there was an error message from BIOS-Getter saying /media/fat/games/GBA missing. The message should be /media/usb0/games/GBA as the BIOS files have been put in /media/usb0/games/... I guess the message is hard coded.
Indeed there was no /media/usb0/games/GBA but /media/usb0/games/GBASS3E000000:100000 ?????????????????????????????????????????
I also wanted to see the update all log: it is not in /media/usb0/Scripts but in /media/fat/Scripts
There were 3 404 errors:
Acorn-Atom which is "normal" as the structure of the repository has to be updated to play well with the updates scripts.
Arcade-Asteroids-MISTer and Arcade_AsteroidsDeluxe_MISTer I don't know the reason and sis not have a look yet.
Time to play some games:
At this stage the only roms available are Arcade roms. I did only a very short test, it seems to work but I don't get any sound; I use HDMI sound and so far did not find the reason for the no sound problem.
Someone mentioned problems with configs so I checked the config folder:
on the SD card I have device.bin and MENU.CFG.
on the HDD I do not have device.bin, I have MENU.CFG, Volume.dat and script_confirm (I suppose it is some kind of switch used for not asking confirmation when running scripts as I set it up that way in the OSD. I also have the configuration file for the cores I tested along with corresponding settings in the dips and inputs sub-folders. I do not know the importance of the device.bin file. Is it related to the missing sound? I will copy it from the SD card and see what happens.
Conclusion: I have to do more tests; so far I can play silent arcades. I will put roms for consoles, test some computers, see if the configuration of cores is persistent after reboot ...
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Switch to USB mode - requirements

Unread post by jca »

I got my HDMI sound back.
I copied the device.bin from SD to HDD, did a cold reboot from OSD -> No sound.
To be sure I did not mess with MISTer.ini I copied the one from my working setup, did a cold reboot from OSD -> No sound.
This morning I powered up MISTer -> Sound!
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Switch to USB mode - requirements

Unread post by jca »

Rats!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :oops: :oops: :oops: :oops: :oops: :oops: :cry: :cry:

After looking on the internet: by default It is not possible to make a file executable on a NTFS volume. It is possible to change the mount command to do it:
"I had the exact same problem and the solution in my case was to write de exec mount option after the users option. That's because the users option implicitly activate the noexec option, so you have to explicitly specify exec."

I did not want to mess up with MISTer - I am not even sure where to look - plus it seems to me that using a native file system make more sense. This is the reason why my regular setup which does not use "Switch to USB" and just contains the games directory uses a HDD formatted ext4.
So back to square one and format the disk with ext4.
What a disappointment: the "Switch to USB" option is grayed out!!!!!! :lol: :lol:
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Switch to USB mode - requirements

Unread post by jca »

Back to square one with NTFS. I started to investigate this thing and really want to know if it is usable.
I proceeded like before with the following changes:
I used the latest Mr. Fusion (2.2), before I had V 2.1. I don't think it is that important as one of the first things I do is to run the update.
I made sure that my monitor was powered before booting the SD card with Mr. Fusion. Now I am sure that I had it powered off the first time I tried: nice install screen and no black screen as before.
Once the install finished I created my MISTer.ini file and also setup my spin forever scripts in order for the USB HDD not to spin down. This HDD was spinning down after 5 minutes. These scripts should be used when you have a USB HDD, even if you did not switch to USB.
viewtopic.php?p=14964#p14964
Next I ran the regular update script.
After that I checked /media/usb0/games: the GBA folder was already screwed GBASS3E000000:100000 which I fixed before running the Update All script.
I put the update_all.sh script and update_all.ini in /media/fat/Scripts instead of /media/usb0/Scripts, just for fun. In both cases I have to run the script from the console. On the SD card I can run it with <Script Name> on the HDD with bash <Script Name>.
I tried an arcade: no sound. I did a cold reboot from the OSD: no sound. I powered down/up MISTer: now sound.
I did not copy the device.bin this time so it is unrelated to the sound.
Now I am ready to do more tests.
One thing I noticed is in regard with the buttons defined for a core. For the first core tested I defined the buttons. As I had no sound I restarted MISTer; I started the same core and when I pressed a button the little window showing the buttons association poped up like when the buttons are not defined but the buttons functioned like I defined them before the restart. I do not know if this is normal but it look strange to me.
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Switch to USB mode - requirements

Unread post by jca »

I figured out what was the problem with the window showing the button associations poping up. I vaguely remembered something in MISTer.ini and here it is:
; 1-10 (seconds) to display controller's button map upon first time key press
; 0 - disable
controller_info=6
I must have changed it on my regular setup but completely forgot about it.

For the latest news on Switch to USB go to the Linux sub-forum which seems to be more appropriate.
LXZ
Posts: 18
Joined: Sun May 24, 2020 9:17 pm
Has thanked: 1 time
Been thanked: 6 times

Re: Switch to USB mode - requirements

Unread post by LXZ »

jca wrote: Sun Dec 27, 2020 9:17 pm For the latest news on Switch to USB go to the Linux sub-forum which seems to be more appropriate.
Right, seems more appropriate. I will watch closely as my initial motive for asking was to find out if moving to fully operate from HDD wouldn't make most sense considering the limited lifetime of SD cards. Please understand that I was under the impression of having lost one of my phat SD cards which I used in my DSLR camera the day I started this topic ;)
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Switch to USB mode - requirements

Unread post by jca »

I have always been intrigues by this function and after seeing your post I decided to "waste" my time trying to figure out what it is about. I like to experiment with new stuff and it was a good occasion and hope it will clarify the status of this function. At the present time my main setup is with a USB HDD with just the games directory: the TG16 CDs take a lot of space and as you mentioned it SD card wear out. Some users use 256 and 512GB cards which are not cheap and I wonder how long they will last. It is true that it makes for a more compact and convenient setup. At work we have IP cameras, a few of them recording on SD cards: 64GB seem to last but we had failures with 128GB. When I setup my USB HDD I initially wanted to use Switch to USB for that reason which I did not as I got the same answer as you did. So far I did not find any major problem with Switch to USB but I don't know what are the real problems mentioned and so far my tests have been limited.
Shuffle7
Posts: 112
Joined: Sun Jan 17, 2021 5:43 pm
Has thanked: 134 times
Been thanked: 7 times

Re: Switch to USB mode - requirements

Unread post by Shuffle7 »

Help needed , looking back at jca’s posts. I have a usb stick so I can put some cores on that as run out of space on my sd card. Can this be done ? I only want to store the psx games. So can I delete the PSX folder on the sd card and create one on the usb stick so mister would automatically detect ? I formatted the stick on windows laptop then a folder named games, then for a test I put Apple 2 in there folder to try - just as it is from mister . But when I go back into mister it’s not seen the usb stick . It must be obvious to what I’m doing wrong , any ideas ? Thank you

Edit.. the way I did was create games/ then console or computer name etc in root. Didn’t need to delete those folders off sd card. It worked by plugging in the fire stick while the mister was on doesn’t seem to recognise the usb stick from cold boot ? So not ideal any ideas appreciated so half way there
LXZ
Posts: 18
Joined: Sun May 24, 2020 9:17 pm
Has thanked: 1 time
Been thanked: 6 times

Re: Switch to USB mode - requirements

Unread post by LXZ »

Shuffle7 wrote: Fri Feb 04, 2022 11:01 am Help needed , looking back at jca’s posts. I have a usb stick so I can put some cores on that as run out of space on my sd card. Can this be done ? I only want to store the psx games. So can I delete the PSX folder on the sd card and create one on the usb stick so mister would automatically detect ? I formatted the stick on windows laptop then a folder named games, then for a test I put Apple 2 in there folder to try - just as it is from mister . But when I go back into mister it’s not seen the usb stick . It must be obvious to what I’m doing wrong , any ideas ? Thank you

Edit.. the way I did was create games/ then console or computer name etc in root. Didn’t need to delete those folders off sd card. It worked by plugging in the fire stick while the mister was on doesn’t seem to recognise the usb stick from cold boot ? So not ideal any ideas appreciated so half way there
Why cores and not ROMs, which have the most impact on space. AFAIK the folder in the root of your USB stick could / should only be the PSX folder, no games folder

Also, maybe the filesystem matters?
LXZ
Posts: 18
Joined: Sun May 24, 2020 9:17 pm
Has thanked: 1 time
Been thanked: 6 times

Re: Switch to USB mode - requirements

Unread post by LXZ »

However, what didn't work for me, was moving the whole _CPS2 folder I set up to the root of the USB. Because the folder mixes roms and cores, it seems to not work - or did anyone manage to get this to work?
Shuffle7
Posts: 112
Joined: Sun Jan 17, 2021 5:43 pm
Has thanked: 134 times
Been thanked: 7 times

Re: Switch to USB mode - requirements

Unread post by Shuffle7 »

Hi yes I’m only moving cores for storage & I’m
Leaving the arcade roms alone so they will stay on the sd card . I have ordered a portable hard drive see how that goes :)
Post Reply