Minimig Discussion Forum

Discussing the Open Source FPGA Amiga Project
It is currently Thu Jun 22, 2017 11:59 am

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: How to mount hardfile.hdf on uae
PostPosted: Tue Jan 15, 2013 3:43 pm 
Offline

Joined: Tue Sep 25, 2012 7:15 pm
Posts: 105
I am trying to find a convenient way to get data from the Desktop into Minimig. My hope was that i can directly write to the hardfile.hdf with UAE 0.8.29 (a version distributed with ubuntu linux).

On boot my device reports the hardfile to be CHS 627/4/63, so i tried to setup the very same hardfile in uae with:
Reserved Blocks: 2
Surfaces: 4
Blocksize: 512
Blocks per track: 63
Boot prority: 1

However, the image that lets the DE1 minimig core just boot fine results in a "Not a DOS disk in device DH0" System Request.

What am i doing wrong?


Top
 Profile  
 
 Post subject: Re: How to mount hardfile.hdf on uae
PostPosted: Tue Jan 15, 2013 4:45 pm 
Offline

Joined: Tue Dec 13, 2011 7:48 pm
Posts: 341
Hardfile geometry can be a bit of a nightmare, as you've found.

Firstly, is your HDF a simple partition image, or a complete drive image? (I.e. is it selected in the firmware as "Hardfile (disk img)" or "Hardfile (filesys)")?

If the former, then you might have more luck leaving the geometry parameters in UAE as 0 and letting it figure them out for itself. (I don't think you can do this via the UI, though - it involves editing the .uaerc file by hand.)

If the latter, and all else fails, then one option is to use the Linux FFS filesystem driver, like so:
sudo modprobe affs
sudo losetup /dev/loop0 /path/to/file.hdf
sudo mount -taffs /dev/loop0 /mnt/

The other option is to set the IDE slave in the OSD to MMC/SD card, then try and mount the SD card itself using fat95. Again, it's hit and miss - I still have some firmware hacking to do to make it work on all cards, but it does work with some.
Non-bootable ADF with Fat95 and a premade sd0: (master) and sd1: (slave) icon here: http://npandd.co.uk/Amiga/Fat95.zip

_________________
~ Amiga 4000/030 ~ Amiga 1200 030/50MHz ~ Turbo Chameleon 64 ~ Altera DE1 with Minimig core ~
Details of my projects: http://retroramblings.net


Top
 Profile  
 
 Post subject: Re: How to mount hardfile.hdf on uae
PostPosted: Wed Jan 16, 2013 12:53 pm 
Offline

Joined: Mon Dec 01, 2008 9:58 pm
Posts: 1566
Location: .de
I have tried the mount option but it failed.
Most likely due to the existing RDB offset, affs report "no valid root block found".
If the HDF would start-up with the partition bootblock ("DOS " string), it would work fine.
Until now I also never could make a Minimig hardfile useable in Linux (e)uae.
I use directory-mount as hardfile and adf image to transfer data. This is not the best solution but it works fine.

In MinimigV1 you can not access SD/MMC card directly. Ony .HDF is selectable.
Is this feature supported by the DE1/2 port?

_________________
_____________________________
JMP $00000BED ; will guru-meditation until next morning


Top
 Profile  
 
 Post subject: Re: How to mount hardfile.hdf on uae
PostPosted: Wed Jan 16, 2013 1:24 pm 
Offline

Joined: Tue Dec 13, 2011 7:48 pm
Posts: 341
boing4000 wrote:
Until now I also never could make a Minimig hardfile useable in Linux (e)uae.


It's do-able, but I can't remember off the top of my head the exact syntax - I'll document it sometime because it's one of those things that seems to be impossible to find!

Quote:
In MinimigV1 you can not access SD/MMC card directly. Ony .HDF is selectable.
Is this feature supported by the DE1/2 port?


Yes, adding that feature to the Chameleon 64's Minimig core firmware is how I got involved in the Minimig project in the first place. I also added the ability to mount a WinUAE-style hardfile (i.e. one with no RDB) - and that's the kind of hardfile that can be mounted via loopback.

(It'd be nice to backport that to the original Minimig sometime, but getting the toolchain up and running seemed quite daunting!)

_________________
~ Amiga 4000/030 ~ Amiga 1200 030/50MHz ~ Turbo Chameleon 64 ~ Altera DE1 with Minimig core ~
Details of my projects: http://retroramblings.net


Top
 Profile  
 
 Post subject: Re: How to mount hardfile.hdf on uae
PostPosted: Wed Jan 16, 2013 7:50 pm 
Offline

Joined: Tue Sep 25, 2012 7:15 pm
Posts: 105
MMrobinsonb5 wrote:
Firstly, is your HDF a simple partition image, or a complete drive image? (I.e. is it selected in the firmware as "Hardfile (disk img)" or "Hardfile (filesys)")?

If the former, then you might have more luck leaving the geometry parameters in UAE as 0 and letting it figure them out for itself. (I don't think you can do this via the UI, though - it involves editing the .uaerc file by hand.)

If the latter, and all else fails, then one option is to use the Linux FFS filesystem driver, like so:
...


Are you sure you aren't confusing both here? I doubt i can mount the entire image. I could mount the partition like i've mounted floppy images before.


Top
 Profile  
 
 Post subject: Re: How to mount hardfile.hdf on uae
PostPosted: Wed Jan 16, 2013 8:07 pm 
Offline

Joined: Tue Dec 13, 2011 7:48 pm
Posts: 341
Master of Gizmo wrote:
Are you sure you aren't confusing both here? I doubt i can mount the entire image. I could mount the partition like i've mounted floppy images before.


Darn - yes, sorry - I got them the wrong way round in the first sentence.

_________________
~ Amiga 4000/030 ~ Amiga 1200 030/50MHz ~ Turbo Chameleon 64 ~ Altera DE1 with Minimig core ~
Details of my projects: http://retroramblings.net


Top
 Profile  
 
 Post subject: Re: How to mount hardfile.hdf on uae
PostPosted: Tue Jul 09, 2013 10:34 am 
Offline

Joined: Tue Sep 25, 2012 7:15 pm
Posts: 105
In the meantime i've learnt how to accomplish what i wanted to do. The reason why i was unable to use plain uae was that it doesn't support rdsk (whole disk) images and this is what minimig uses.

On Windows WinUAE can deal with those images and for Linux and MacOS (and also windows) the fs-uae http://fs-uae.net/ works nicely.

I have simmarized this on one page in the MIST wiki:
http://code.google.com/p/mist-board/wik ... assStorage


Top
 Profile  
 
 Post subject: Re: How to mount hardfile.hdf on uae
PostPosted: Tue Jul 09, 2013 10:40 am 
Offline

Joined: Thu Jun 18, 2009 9:54 am
Posts: 349
FS-UAE, now the "official" Linux UAE port wich includes every WinUAE improvement without the Windows stinking dead rat smell, supports rdsk images as well.
It's what I used to put all these whdload and installable games on the Minimig HDF :)

Oops, it seems you also mentioned it! Sorry! FS-UAE is a great tool anyway and I recommend it to every Linux+Amiga hardware user.


Top
 Profile  
 
 Post subject: Re: How to mount hardfile.hdf on uae
PostPosted: Tue Nov 25, 2014 12:16 pm 
Offline

Joined: Tue Sep 25, 2012 7:15 pm
Posts: 105
With the latest AGA improvement the problem of getting files into minimig arrived again. I just managed to mount a minimig hardfile (disk img format) under linux which is very handy when transferring files from the PC to the minimig. The procedure is rather simple. First determine the exact location and size of the affs partition inside the disk image.
Parted does this out of the box:


Code:
$ parted hardfile.hdf
WARNING: You are not superuser.  Watch out for permissions.
GNU Parted 2.3
Using hardfile.hdf
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) u b                                                             
(parted) p                                                               
Pralloc = 0, Reserved = 2, blocksize = 1, root block at 79254
Model:  (file)
Disk hardfile.hdf: 80936960B
Sector size (logical/physical): 512B/512B
Partition Table: amiga

Number  Start    End        Size       File system  Name  Flags
1      258048B  80898047B  80640000B  affs3        DH0   boot


This tells us that the first partition starts at byte 258048 and is 80640000 bytes long. This can just be mounted:

Code:
mount -t affs -o loop,offset=258048,sizelimit=80640000 hardfile.hdf /mnt


The file system is now available at /mnt and can easily be filled with data.


Top
 Profile  
 
 Post subject: Re: How to mount hardfile.hdf on uae
PostPosted: Wed Nov 26, 2014 11:19 am 
Offline

Joined: Thu Jun 18, 2009 9:54 am
Posts: 349
Wow, now that's some useful info, MasterOfGizmo! :)
It saves me from using FS-UAE just to transfer files into HDFs for the FPGA Amigas.
Thanks!!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Translated by Xaphos © 2007, 2008, 2009 phpBB.fr