English Amiga Board


Go Back   English Amiga Board > Support > support.FS-UAE

 
 
Thread Tools
Old 19 December 2012, 15:48   #1
mr_a500
Amiga-based Cyborg
 
mr_a500's Avatar
 
Join Date: Dec 2004
Location: Canada
Posts: 808
FS-UAE & real Amiga hard drives on OS X [Solved]

In FS-UAE, is there a way to mount real Amiga hard drives? (like in WinUAE)

If not, are there any plans to add support for this in the future?

Last edited by FrodeSolheim; 03 January 2013 at 14:57. Reason: Changed title
mr_a500 is offline  
Old 19 December 2012, 17:53   #2
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
It doesn't directly support this, and I have deliberately avoided to add too much functionality which depends on OS-specific code.

But it works on Linux because the device can be opened as a file...

It would also (probably) work on OS X for the same reason, except that OS X does not return a file size for the device (I checked this when another OS X user asked the same question). It may work by simply #ifdef'ing in a couple of OS X ioctls to get the size of the device when trying to open the hard drive device as a file.
FrodeSolheim is offline  
Old 19 December 2012, 17:57   #3
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
See http://eab.abime.net/showthread.php?t=65366 for more information.

But as I indicated, a fix for OS X may be really simple. Perhaps you can compile / try it out if a give a couple of pointers / code to insert? It will require that you give your user access to the raw device, and it would be a good idea to have a backup of the HD
FrodeSolheim is offline  
Old 02 January 2013, 17:46   #4
lallafa
Registered User
 
Join Date: Aug 2010
Location: Erlangen, Germany
Posts: 24
Hi Frode,

attached you'll find a patch to correctly determine the size of block devices on osx. With this patch applied you can boot/use a "raw" hdf on e.g. a sd-card.

Note that your user must be a member of the group "operator" to access the block device read-only. For write access you have to modify the device's permissions...
Attached Files
File Type: zip osx_blkdev_size.zip (1,019 Bytes, 588 views)
lallafa is offline  
Old 02 January 2013, 18:55   #5
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
Great! Merged for inclusion in 2.1.15
FrodeSolheim is offline  
Old 02 January 2013, 22:11   #6
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
Could you check if 2.1.15 works as expected with block devices on OS X? Thanks.
FrodeSolheim is offline  
Old 02 January 2013, 22:52   #7
nexusle
Banned
 
Join Date: Jul 2010
Location: Earth
Age: 46
Posts: 500
I could test it too, but I need a little assistance how to do this.
nexusle is offline  
Old 02 January 2013, 23:11   #8
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
You must first figure out what device your Amiga HD/CF is, say it is /dev/disk2...

Then, assuming this Amiga HD/CF has an RDB header, just use FS-UAE option hard_drive_0 = /dev/disk2

As noted in a previous post here, you must have permissions to use the device, for full read/write permissions, you can use something like:
Code:
chmod a+rw /dev/disk2
Warning: this will give all users read/write access to the device, and make sure to use the correct device.

Disclaimers:
- I have not tried myself on OS X
- Don't try to mount your system drives
- The instructions may be incorrect
- Make sure to have a backup (at least if you enable write access)
FrodeSolheim is offline  
Old 02 January 2013, 23:16   #9
nexusle
Banned
 
Join Date: Jul 2010
Location: Earth
Age: 46
Posts: 500
This means I must prepare a SD Card on a real Amiga before I can use it it FS-UAE? Or could I use a plain SD Card and setup with AOS 3.1 (example) in FS-UAE?
nexusle is offline  
Old 02 January 2013, 23:17   #10
nexusle
Banned
 
Join Date: Jul 2010
Location: Earth
Age: 46
Posts: 500
How can I see, which /dev/... my SD Card is? Any Terminal command for this?
nexusle is offline  
Old 02 January 2013, 23:23   #11
FrodeSolheim
FS-UAE Developer
 
FrodeSolheim's Avatar
 
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
Quote:
Originally Posted by nexusle View Post
This means I must prepare a SD Card on a real Amiga before I can use it it FS-UAE? Or could I use a plain SD Card and setup with AOS 3.1 (example) in FS-UAE?
You should be to use it like an empty disk image file, which means you must also specify
Code:
hard_drive_0_type = rdb
to force RDB mode when the device is not initialized (as discussed in the earlier RDB thread).

Quote:
Originally Posted by nexusle View Post
How can I see, which /dev/... my SD Card is? Any Terminal command for this?
Good question, I'm really a Linux guy

Try the naive approach? Run
Code:
ls /dev/disk*
without the CF inserted, then insert it, wait a few seconds, try the same command again and see what new diskX device has appeared?

Alternatively, if it has an OS X-recognized file system, you can mount the card via "Finder" and use the following command in a terminal:
Code:
df
Remember to unmount before using... -and you probably want to use the full device (/dev/diskX), not a partition (/dev/diskXsY)...

Edit: Looks like you can also run:
Code:
disktool -l

Last edited by FrodeSolheim; 02 January 2013 at 23:36. Reason: Merged
FrodeSolheim is offline  
Old 03 January 2013, 09:21   #12
nexusle
Banned
 
Join Date: Jul 2010
Location: Earth
Age: 46
Posts: 500
Command to list all drives is:

Code:
diskutil list
this results in an output like this:

Code:
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *320.1 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Media                   319.7 GB   disk0s2
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *128.0 GB   disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:                  Apple_HFS System                  127.2 GB   disk1s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk1s3
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        *77.2 MB    disk2
   1:        Apple_partition_map                         32.3 KB    disk2s1
   2:                  Apple_HFS Mkvtoolnix-5.9.0_201... 77.1 MB    disk2s2
The SD Card (or another drive) should show in this list.
nexusle is offline  
Old 03 January 2013, 12:06   #13
mr_a500
Amiga-based Cyborg
 
mr_a500's Avatar
 
Join Date: Dec 2004
Location: Canada
Posts: 808
Yes! It seems to be working fine. I just plugged in my Amiga-formatted flashdrive, put "hard_drive_0 = /dev/disk1" in the config file and it booted right up, all partitions visible.

Thanks lallafa and Frode!

Now I just need to find out why my IDE to USB adapter doesn't work.
mr_a500 is offline  
Old 03 January 2013, 15:57   #14
nexusle
Banned
 
Join Date: Jul 2010
Location: Earth
Age: 46
Posts: 500
Have tried it and worked also for me.

One hint: The hard drive may not have any partition!! I must first kill all partitions on my SD Card before it worked!
nexusle is offline  
Old 03 January 2013, 16:54   #15
lallafa
Registered User
 
Join Date: Aug 2010
Location: Erlangen, Germany
Posts: 24
Quote:
Originally Posted by nexusle View Post
One hint: The hard drive may not have any partition!! I must first kill all partitions on my SD Card before it worked!
Usually an SD/CF-card used for real Amigas has to have the RDB (Rigid Disk Block) partitioning scheme. With this you define partitions for your Amiga volumes stored on this card. The RDB is not detected by OS X and therefore gives only a very brief list for such devices in diskutil:

Code:
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                                                   *1.0 GB     disk1
OS X even suggests to initialize this volume with a "proper" partition scheme/file system So please ignore these dialogs...

(Sidenote: With FS-UAE you might also store a raw HDF (i.e. only a file system of a single volume) on the SD-Card (without any partitioning scheme!) and use this in FS-UAE but that disk won't work on a real machine and is somewhat pointless...)

For creating a RDB paritioning scheme on OS X (and other OSes as well) I use (my own) rdbtool:

Example:
Code:
sudo ./rdbtool /dev/disk1 init + add size=50% bootable  + add
Creates two volumes DH0 and DH1 with 50% size each.

You can then use FS-UAE to format and fill the volumes inside the emulator.

... or use xdftool to copy Amiga files directly from OSX:

Example:
Code:
sudo ./xdftool /dev/disk1 open part=DH0 + repack myhdf.hdf
This copies the whole volume hdf image into the first partition on SD card...

Thats the way I use to quickly setup cards for real Amigas on my OS X console.

Last edited by lallafa; 03 January 2013 at 16:55. Reason: typo
lallafa is offline  
Old 03 January 2013, 17:49   #16
nexusle
Banned
 
Join Date: Jul 2010
Location: Earth
Age: 46
Posts: 500
The plain disk could also completely setup in FS-UAE (also with RDB). So I have made it.

It would be cool, if everyone write/has wrote a MacFUSE module for AmigaFFS. On Linux, AFFS should be supported built-in.
nexusle is offline  
Old 03 January 2013, 18:45   #17
nexusle
Banned
 
Join Date: Jul 2010
Location: Earth
Age: 46
Posts: 500
Is it right, that one must redo the permission procedure everytime unplug/plug the disk to the mac, or is there a ability to give permanent read/write permission to the disk?
nexusle is offline  
Old 22 January 2013, 14:32   #18
osiris37
 
Posts: n/a
Hi I've got an Amiga partitioned CF disk with Workbench 3.0 installed (this was formatted through WINuae and boots natively in my stock os3.0 A1200), I'm trying to follow the instructions above to mount the drive in FS-UAE as i'd prefer to work on my Mac rather than boot into WINuae in my bootcamp partition, but am falling short of getting it recognised, I don't really understand unix commands through the terminal enough to work out what i need to do, and i'm afraid i'll likely do some irrepairable damage to my HD. I'm working on a Macbook Pro running 10.7.5.

Basically I was wondering if anyone has done an idiot proof guide for how to this? If not any help you can give will be hugely appreciated

Cheers.
 
Old 22 January 2013, 16:58   #19
mr_a500
Amiga-based Cyborg
 
mr_a500's Avatar
 
Join Date: Dec 2004
Location: Canada
Posts: 808
The information is in this thread.

1. Connect your CF card, open Terminal and type "diskutil list". Take a look at which disk looks like your CF card (probably "/dev/disk1").

2. Open the FS-UAE config file (/Documents/FS-UAE/Configurations/Default.fs-uae) and add the line "hard_drive_0 = /dev/disk1" (or disk2 or whatever your CF card was)


I had a problem where my CF wasn't showing up at all in diskutil - but that was because my CF adapter was defective (cheap Chinese junk!). When you connect your CF, if you don't see the OSX "Disk Insertion" popup complaining that it was unreadable, then it probably wasn't detected.
mr_a500 is offline  
Old 22 January 2013, 17:12   #20
nexusle
Banned
 
Join Date: Jul 2010
Location: Earth
Age: 46
Posts: 500
*** Deleted ***

Last edited by nexusle; 25 March 2013 at 15:20.
nexusle is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
GVP 4.15 Roms & Large Hard drives... Info-Seeker support.Hardware 21 09 August 2010 12:06
Repairing real Amiga (hard) disks on E-UAE macce2 support.OtherUAE 7 23 July 2007 19:13
replacing amiga floppy drives with hard drives Gordon support.Hardware 2 06 March 2007 00:44
Hard drive install real amiga & winuae, please help magnox support.Hardware 3 28 February 2006 22:35
Advice needed regarding hard drives and uae! ElectroBlaster support.WinUAE 4 11 October 2005 08:42

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:26.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.23628 seconds with 14 queries