Welcome, Guest. Please login or register.

Author Topic: FAT95 and removable SD Card  (Read 1845 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline kolla

Re: FAT95 and removable SD Card
« on: June 10, 2019, 11:17:06 PM »
Set "mount" or "active" tooltype for SD0 to "0", then it will not be actively mounted on boot, and instead be mounted when you first access "SD0:" somehow (for example from CLI) after you have inserted a card. To "eject" a card, you need to issue two commands... "assign SD0: dismoaunt", and "assign <volume>: dismount", where volume is the voume name of whatever filesystem that is mounted in SD0:

Sadly there is no straight forward command in the OS to ask what the volume name of a specific device is (well, C:Info, but then parsing is needed), but there is an ugly workaround you can do... try saving the below as S:Dismount, for example, and do "protect S:Dismount +s"

Code: [Select]
.key DEVICE/A
.bra [
.ket ]
FailAt 10
CD [DEVICE]
If NOT WARN
  Set _volume `cd`
  CD ram:
  Assign ${_volume} dismount
  Assign [DEVICE] dismount
  UnSet _volume
EndIF

Then you test it with "S:Dismount DS0:"

(the whole "if not warn ... endif" is a work-around for a bug in shell v46, in case you are using OS 3.1.4)
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS