English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   support.FS-UAE (https://eab.abime.net/forumdisplay.php?f=122)
-   -   FS-UAE & real Amiga hard drives on OS X [Solved] (https://eab.abime.net/showthread.php?t=67082)

mr_a500 19 December 2012 15:48

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?

FrodeSolheim 19 December 2012 17:53

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 19 December 2012 17:57

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 ;)

lallafa 02 January 2013 17:46

1 Attachment(s)
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...

FrodeSolheim 02 January 2013 18:55

Great! Merged for inclusion in 2.1.15 :)

FrodeSolheim 02 January 2013 22:11

Could you check if 2.1.15 works as expected with block devices on OS X? Thanks.

nexusle 02 January 2013 22:52

I could test it too, but I need a little assistance how to do this.

FrodeSolheim 02 January 2013 23:11

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)

nexusle 02 January 2013 23:16

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 02 January 2013 23:17

How can I see, which /dev/... my SD Card is? Any Terminal command for this?

FrodeSolheim 02 January 2013 23:23

Quote:

Originally Posted by nexusle (Post 859218)
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 (Post 859219)
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

nexusle 03 January 2013 09:21

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.

mr_a500 03 January 2013 12:06

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! :cool

Now I just need to find out why my IDE to USB adapter doesn't work. :banghead

nexusle 03 January 2013 15:57

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!

lallafa 03 January 2013 16:54

Quote:

Originally Posted by nexusle (Post 859342)
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.

nexusle 03 January 2013 17:49

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 03 January 2013 18:45

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?

osiris37 22 January 2013 14:32

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.

mr_a500 22 January 2013 16:58

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.

nexusle 22 January 2013 17:12

*** Deleted ***


All times are GMT +2. The time now is 15:54.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04826 seconds with 11 queries