When it comes to using emulated hard drives in FS-UAE, you have several choices:
The best choice depends on how you want to use it. The most convenient is directory hard drives, and I recommend to use this unless you have a good reason not to, especially with FS-UAE v2.1.28+, when support for file permission and metadata was added.
The advantages of using directory hard drives compared with other approaches are:
Note: You should be somewhat careful about modifying the directory hard drive from the Amiga and from the host system at the same time. Ideally, you should only modify the hard drive from the host system when FS-UAE is not running, since some information about the file system may be cached in the Amiga.
Some file names which are valid on the Amiga are not allowed on the host file system. This is particularly true on Windows, which has one of the most restrictive set of allowed file names (Linux and macOS are more flexible).
FS-UAE handles this by "escaping" the invalid Amiga file names so the can be stored on the local file system. This is only done when necessary, so most file names will not be escaped. Also, the escaping is done so the host file name is valid on all supported FS-UAE platforms.
For example, the following file name is valid on the amiga: Foo\Bar
. This is
not valid on Windows however, so the file name is escaped and stored as
Foo%5cBar
. The Amiga will see a file called Foo\Bar when it accesses a
directory with a host file called Foo%5cBar
. Since Foo\Bar
is not allowed
on Windows, the file is stored as Foo%5cBar
on all platforms. This makes
the directory hard drives portable across multiple operating systems.
See also "Extracting Amiga archives" for more relevant information.
When FS-UAE looks up existing files in a directory hard drives, it initializes metadata about the file either from the host file system, or if it exists, from an accompanying metadata file.
When a file has an accompanying metadata file, date/time, file permissions and comment are read from the metadata file. If a metadata file does not exist, then:
----rwed
.When files are created/modified from within the Amiga, the host file mtime (last modified time) is updated based on the Amiga file date/time. FS-UAE then decides if it needs to store more information about the file in a metadata file:
Additional metadata is stored in files with .uaem extension. If the original file is called Image.jpg, the additional metadata is stored in Image.jpg.uaem in the same directory. The metadata is stored in a text format, and you can even edit this file manually from the host side to alter the information about the file. Here’s an example of the content of a metadata file (where "hello" is a file comment):
----rwed 2013-02-12 21:20:52.02 hello
FIXME Format might be outdated, file comments start on the next line now?
If you have an .lha archive with Amiga software, you have two choices when you want to extract it:
lha
program (or similar) inside the Amiga.In many cases, both approaches will work well, but there are some cases where you should extract the archive from inside the emulated Amiga:
----rwed
).So whether you can extract an archive without (significant) loss of information on the host system depends on the archive. To be sure, you can always extract archives from inside the Amiga.
HDF files are "raw files" containing the content of hard drives, used directly by the Amiga as storage devices (like it would use a real hard drive). This means that the Amiga manages the file system.
There are two common variants of HDF files:
When you mount a .hdf file as a hard drive in FS-UAE, FS-UAE will automatically
recognize it as an RDB file when the HD is already partitioned (the file begins
with the RDSK
header). If the file is completely empty, FS-UAE will think
that it is a partition HDF instead, but you can use the hard_drive_x_type
options to force FS-UAE to handle it as an RDB file.
Note: When you use the ADF/HDF creator in FS-UAE Launcher to create a HDF file in RDB format, the file is created in a way that allows FS-UAE to autodetect it as an RDB file.
Empty hard drive images must be partitioned and formatted before use. Workbench
may come with a tool called “HDToolBox” which you can use to partition the
image. By default, the hard drive is accessed through a HD controller called
uaehf
.device. You need to tell HDToolBox
to use this device when you start
it, for example by running the command:
DF0:Tools/HDToolBox uaehf.device
Alternatively, if you emulate an Amiga 600 or Amiga 1200, you can attach the
drives to an emulated IDE controller instead (see hard_drive_x_controller).
When you use this controller, you can only use hard drive images which are
less than 4 GB. The uaehf.device does not have this limitation, so using the
default uaehf.device is recommended unless you have a very good reason not to
use it. Additionally, uaehf.device
is likely more efficient (faster) to use.
After you have partitioned the file, you may need to restart the Amiga. Then you can proceed to format the partition(s).
When you use an empty partition HDF file, you’ll not partition it – but you still need to format it inside the Amiga before you can use it.
FS-UAE needs to know the geometry of the HDF file. Currently, FS-UAE assumes – and only supports – the default geometry (sectors=32, surfaces=1, reserved=2, block_size=512). There is no option to override this yet. This is compatible with most HDF partition files < 512 MB.
FS-UAE supports mounting ZIP files as hard drive. This works more or less like a read-only directory hard drive.
Note: There is currently no support for .uaem metadata files in ZIP archives.
When you mount ZIP files and start FS-UAE via FS-UAE Launcher, the ZIP file is handled differently:
Via FS-UAE Launcher, ZIP files work more like a hard drive template, and you get support for metadata files and get a writable file system. The ZIP file itself will remain untouched.
Note: This is not an officially supported feature, but it is described here because it works on some platforms. This does not work on MS Windows.
On Unix-like systems, devices can be accessed like files. This means that you can mount a block device (for example a real hard drive or a compact flash (CF) card) as a hard drive, and FS-UAE will use it like it was a HDF file.
You need to make sure FS-UAE have read and write access to the device (you may need to chmod it and/or change device ownership), and also that you use the correct device -you don’t want to overwrite another device by accident.
People have been using this feature on Linux and macOS, but no guarantee is given that it works. The most common use is to mount a CF card which is also used as a hard drive on a real Amiga.
Hi,
I have installed fs-uae on my opensuse 13.2 system and am really enjoying it. I created a 1gb hard file (.hdf not a hard folder) for use with this. I have it in a folder I created specifically for Amiga stuff. However when booting into workbench it’s just not seeing it at all? (I have the correct A1200 roms and workbench and the hardfile is selected within fs-uae)
Can anybody help with this, please ….
Hi, the HDF file (in RDB/RDSK) format needs to be partitioned before Workbench will see any partitions – and after that you need to format the partition with a file system, for example FFS. See the section “Using HDF Files in RDB Format” for some brief information about how to partition.
Ok, cheers. I did actually figure this out lol but thanks for the reply.
Can you help with another question?
I’m getting an A600 and going to pick up a 4.8gb 2.5″ HD for it. Is it possible to use my usb caddy and format it within fs-uae then copy contents of my emulated System classic workbench onto it. Obviously the idea being I can then copy everything I need to it, disconnect and pop it in the A600.
Does this work?
Thanks
Yes, preparing your HD with FS-UAE works if you use Linux or OS X as host system. You mount the HD as if it were a .hdf file. You just need to make sure you have read/write permission to the hard drive device. I have done the same with Compact Flash cards instead of HD. You should probably add the config hard_drive_0_controller = ide0 to your Amiga 600-based config in FS-UAE, so the emulated A600 with attached disk is more identical to your real one.
Ok cool, thanks man 🙂
Great stuff, thanks for the quick reply 🙂 I may post again when I actually get the hardware lol .. cheers for your help 🙂
Hi FrodeSolheim,
I now have a 4.8GB ide drive (connected via usb caddy) which I intend to use in the Amiga. I’m using Linux, have chmod the drive (it’s listed as sdb1 & sdb2 within /dev/disk) and it’s formatted in 2 FAT32 partitions (obviously the Amiga will only see up to 4gb partitions.
I did add the config hard_drive_0_controller = ide0 to the config file in fs-uae however how do I get fs-uae to even see it / create hard files etc so that I can work on it in fs-uae, copy stuff across so it can then be used natively in an a real Amiga?
Is there any way in Linux to format this drive as ffs? Sorry for all the questions, I really appreciate your help and the work you’ve done with fs-uae 🙂 cheers
You won’t be using the FAT32 partitions, or even the PC-style partition table for that matter. What you need to do is:
* hard_drive_0 =
/dev/sdb
(as long as this refers to the disk you want to use)* You can then run
HDToolBox
from Workbench in FS-UAE to *initialize* the drive and create partition(s)* Then the partition(s) will show up in Workbench in FS-UAE and you can then format with FFS!
(I’m not sure how AmigaOS reacts to larger than 4GB disks, you may have to restrict partition(s) to the first 4 GB and leave the remaining space unused, or perhaps you need to patch AmigaOS. I have only tried with 4 GB compact flash cards on an Amiga with an IDE adapter)
Ok, I am going to give that a try …
Tried it, hmm not much joy the config reads like this
# FS-UAE configuration saved by FS-UAE Launcher
# Last saved: 2015-05-15 19:31:33
[fs-uae]
amiga_model = A600
chip_memory = 2048
hard_drive_0 = /dev/sdb
hard_drive_1 = System.hdf
hard_drive_2 = Work.hdf
kickstart_file = /home/mark/Amiga/AmigaStarterKit/KickStart_ROMS/amiga-os-204.rom
also when accessing HDToolBox it just gives me driver not installed?!?!
I’m sorry for all this hassle, but I want to get this sorted if I can 🙂 The HD is currently formatted as 1 drive (/dev/sdb) 4.6gb as FAT32 now my understanding is Amiga should see it as can read up to 8gb drives but I know I need to format and partition it (within workbench on fs-uae) as the Amiga can only address 4gb partitions.
Anyway, appreciate all your help 🙂
One obvious problem is the kickstart version. You have explicitly specified an Amiga 500+ ROM, which does not contain the IDE driver… It is much better to let FS-UAE choose the best kickstart automatically. If you still want to manually use
kickstart_file
, you need to make sure it points to an A600 HD kickstart ROM.(Btw, as I said earlier: You should not expect to see any existing PC-style partitions from the Amiga in any case. Amiga uses its own partition layout format (RDSK / RDB)).
Hello,
is there a reason why using directory hard drives with a qemu-based FS-UAE installation running OS4.1FE doesn’t work? As soon as I try to enable a directory hard drive in 2.5.30dev in the OS4.1 profile results in a “NOTIFY_USER MSG #22” message and seeing constantly rebooting the Amiga system between the rainbow colored screen of the picassoiv rom. Is there anything I need to do to get directory hard drives working in that installation?
Directory hard drive does not work at all with AmigaOS 4.1. The reason for this is that directory hard drives are implemented by injecting a virtual 68K driver into AmigaOS, and intercepting 68000 function calls. AmigaOS 4.1 uses another CPU architecture (PPC), so this feature does not work there!
Are there plans to implement this feature for OS4.1/PPC as well? Because here it would become very handy for development and data exchange purposes.
No such plans, I don’t know of anyone else working on it either.
Quick question.. How do I boot a directory hard drive folder?
I’ve copied the System drive to a CF card, and then copied that to the Hard Drives directory in FS-UAE. Your help is appreciated. (Great software BTW!) Mark
I should ask the question in a better way.
I am trying to boot a directory hard drive. I have copied the contents of the System drive from my A1200 onto a CF Card. From there, I’ve copied the CF card to FS-UAE (OSX 10.10) to /users/myname/Documents/FS-UAE/Hard Drives. In FS-UAE (which is awesome btw) I’ve selected the folder as ‘hard drive 1’ but I can’t get it to boot. Any ideas please?
Thanks
Mark
Hi, it’s a bit difficult to comment due to lack of information. At minimum, I need the following information:
– FS-UAE.log.txt
– A description of how it fails to boot (what happens instead of booting as you expected).
– A directory listing of the System “hard drive folder”, so I can see if looks like it contains the expected files/directories.
Hi Frode, I built an Amiga 500 Hard Disk-based system with KS 1.3 and Workbench 1.3 under FS-UAE. All is working fine except for the problem that on the HD I do create new drawers but when I close the main window and reopen it, the new drawers are not there anymore. I tried snapshot, I checked the .info files and every file and directory can be seen and used via AmigaShell. I also tried to change kickstart but nothing seems to solve this issue. Any ideas?
I’m using Lubuntu 12.04
Thanks for bringing us FS-UAE. It’s just great.
David
For the solution read below.
Having a weird problem with FS-UAE version 2.4.1. It seems really random when the emulator actually saves to hd, and when it just pretends to (meaning that it seems to save the changes but whenever I quit and start the emulator again, the changes are gone). Messing about with files in workbench (usually?) works fine, but whenever a game tries to save to hd or whatever, it just doesn’t work and the save game is gone the next time I want to play. There’s no error messages or anything, everything looks just fine until I quit. If I go to check using Windows Explorer, I see that the files aren’t there even though they were on the emulated Amiga, or that changes I made to them at certain times haven’t been stored. This is really getting kind of annoying, and I’m wondering if it’s a problem that’s been fixed for the development versions. I’m running Windows 7, and I’m using directories and not hardfiles BTW.
Hi, it is a bit difficult for me to say exactly what the problem is, since I don’t know exactly what software (games) you are running. But there is one thing you should be aware of. Many WHDLoad games supporting saving to disk, but many of these do not actually store anything on disk before the WHDLoad slave quits. So in these cases, it is very important to use the WHDLoad quit key so save data is written to the Amiga hardware (which in turn is written to the directory hard drive). If you just quit FS-UAE, the save data may still be held in memory only by the WHDLoad slave…
Hi Frode,
Apologies, its me again! I am having great difficulty in Workbench 1.3 with folders, anything I create is hidden, I copy Empty, rename it to what I want, and when I open and close the window the folder icon is gone, despite have a .info file in the directory listing. all the files have rwed permissions, so I am really perplexed :-/
Any ideas?
Thanks.
System is FreeBSD.
I have created a folder called “DH0” within ~/FS-UAE/Hard Drives as a hard drive and the OS is Workbench 1.3. System boots up fine and can be used apart from this problem. Again thanks for any light that you can shed.
Are you creating the folders from the host/native side? Perhaps there is something wrong with the .info files and/or they are named incorrectly. Please reply with the output of
ls -l
of the parent directory containing the “invisible folders”, and I can check if I see anything suspicious.Also, I assume the folders appear in Workbench if you enable
Window
->Show
->All Files
?Hi Frode,
Thanks for getting back to me!
I replaced the kickstart.rom and workbench.adf’s and then as if by magic everything started working as it should be, so I’m guessing dodgy rom/adf.
It’s great now. thanks!
😀
I seem to experiment the same problem with the new drawers disappearing. Can you please tell me how you solved it in details. Did you change the kickstart? Did you reinstall the Workbench on the HD?
Thanks.
Found the solution in the forum. Just delete the ‘.info’ file in the root directory using Amiga Shell/CLI. Close and re-open the main window of the hard drive (double-click on the icon) and the drawers are now there as expected.
How do i mount the cf card on osx? i have the cf card usb reader and it’s already formatted to be used as hd0: on my A1200 but osx doesn’t want to mount it without initialising it, which will wipe it surely?
Yes, you don’t want OS X to initialize it, please cancel those questions (you don’t want to mount the device either). See this thread for more information: http://eab.abime.net/showthread.php?p=859217&postcount=8
It is possible to partition and format a compact flash from Linux using the following commands.
Assume the CF is /dev/sdc and that the current user has R/W access rights to it. Then this line should be added to the configuration file of FS-UAE:
hard_drive_0 = /dev/sdc
Once you add that line the GUI may have problems accessing that configuration file so you should start fs-uae from the command line.
Start with the workbench install floppy (version 3.1) and check for the HD tools. Right click on the icon and select information from the menu. Change the SCSI parameter to:
SCSI_DEVICE_NAME=uaehf.device
now you should be able to partition the drive and format it using FS-UAE. The drive then can be used from the real Amiga.
Once the drive is partinioned and formatted, you can also mount it directly from linux using a command like:
mount -t affs /dev/sdc1 /mnt
Have Fun!
Wow, the hard drive issue under workbench is terrible. If a utility can create a hard drive file that the operating system can’t detect…… we’ll that kinda shorty work right there.
Fooling workbench to detect an empty hard drive is not a feature… its just broke
Hello!
I was wondering if there is a way to run a HD installed game without entering workbench? Maybe some kind of adf boot disk which would start the game on HD?
Thanx, BR, Matt
Yes, it would be possible to create such as boot disk. It is also possible to auto-start the game with the file S/Startup-Sequence on the hard drive.
(Also, some recognized HD-games in the online game database (oagd.net) support auto-booting via a feature which automatically creates S/Startup-Sequence for the game).