HFS Utilities for OSX

About BasiliskII, a 68k Mac emulator for Windows, MacOSX, and Linux that can run System 7.x through MacOS 8.1.

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
User avatar
sentient06
Mac Mechanic
Posts: 188
Joined: Tue Mar 29, 2011 8:57 pm
Location: London, UK

HFS Utilities for OSX

Post by sentient06 »

Hello,

I've been working in a small application to generate HFS formatted disk images on Mac OS X.
It is yet in an early stage and by now the interface only allows to create a formatted image. In the near future I hope to attach a file browser so people can copy to and fro the image file (I managed to do it with a hard-coded solution) and I am also working on HFS+ support (maybe it will be done first).

The application is made in Cocoa, it uses HFS Utilities by Robert Leslie (http://www.mars.org/home/rob/proj/hfs/), it is open-source and I am going to add the repository on GitHub this week.

The current version is 64-bit-only. I'm afraid it doesn't work in Leopard, but if I get enough feedback I can try to add Leopard support.

I remember you that this is still in an alpha stage. I didn't finish all coding and I am not sure when I'll be able to release a proper beta because of the file browser, that will consume some time of coding.

Anyway, if you want to try, here it is:

https://dl.dropboxusercontent.com/u/469 ... a2.dmg.zip

I'll add the features of this app in my VM manager in the future. One step at a time!

Cheers!

-- UPDATE --

Project in GitHub.

https://github.com/sentient06/HFSUtilsGUI

-- UPDATE 06th June --

I added support for HFS+ and inserted a default option to create 1.44MB floppy disk images.
I also fixed the progress bar on the image creation window (more or less).

https://dl.dropboxusercontent.com/u/469 ... a2.dmg.zip

I am still working on adding MFS support and files copying between HFS and host system.
Last edited by sentient06 on Thu Jun 06, 2013 9:21 am, edited 4 times in total.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7832
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: HFS Utilities for OSX

Post by Ronald P. Regensburg »

Would it allow writing to a HFS volume in OSX 10.6 and later? (OSX 10.6 and later only support reading a HFS volume.)
User avatar
sentient06
Mac Mechanic
Posts: 188
Joined: Tue Mar 29, 2011 8:57 pm
Location: London, UK

Re: HFS Utilities for OSX

Post by sentient06 »

Yes! But not using Finder.. it would require more digging into the system and I honestly didn't study this option too much. But I am already working on a small interface, something similar to an FTP access application.

If you want you can test HFSUtils in the console. I downloaded the original source and compiled into the application bundle in the "Contents/MacOS/" directory.

I give a practical example:

Let's say I have the Mac OS 7.5.3 installer in my folder IS and I wish them to be copied into a file called MacOS755.img, in a folder in the root called Mac OS 7.5.3 Install Segments, so I can use on Basilisk.

The action the interface triggers at the moment can be manually executed like this:

Code: Select all

dd if=/dev/zero of=/Users/me/Desktop/MacOS755.img bs=1048576 count=25
cd /Applications/HFSUtilsGUI.app/Contents/MacOS/HFSTools/
./hformat -l "System 7.5.3" /Users/me/Desktop/MacOS755.img
Now, to write files to the disk images manually we can use these tools like this:

Code: Select all

./hmount /Users/me/Desktop/MacOS755.img
./hmkdir "Mac OS 7.5.3 Install Segments"
./hcopy -r "/Users/me/Desktop/IS/B-System 7.5.3 01of19.smi" "System 7.5.3:Mac OS 7.5.3 Install Segments:"
./hcopy -r "/Users/me/Desktop/IS/B-System 7.5.3 02of19.smi" "System 7.5.3:Mac OS 7.5.3 Install Segments:"
./hcopy -r "/Users/me/Desktop/IS/B-System 7.5.3 03of19.smi" "System 7.5.3:Mac OS 7.5.3 Install Segments:"
(...)
./humount
As you can see, each of the files require a single command. This is not too intuitive, this is why I decided to work in the interface. So far I did a code that can find all files within a folder and copy all of them to the image. =D
User avatar
24bit
Forum All-Star
Posts: 1424
Joined: Wed Nov 11, 2009 5:47 pm
Location: Germany

Re: HFS Utilities for OSX

Post by 24bit »

Would be a really worthy addition, if you could donate an app with a (FileZilla like) GUI to move some files via r/w HFS images to and from the emulators!

Much better than my workaround in 10.6 Server:
  • Create a new DMG and move files there.
    Select the DMG in DU and choose "New Image". For Image Format choose NDIF read/write.
    Unmount in OSX (if needed) and mount in emualtor.
User avatar
sentient06
Mac Mechanic
Posts: 188
Joined: Tue Mar 29, 2011 8:57 pm
Location: London, UK

Re: HFS Utilities for OSX

Post by sentient06 »

Well, we can generate writable HFS+ images, mount them on OSX and modify the contents.
For HFS is necessary a tool. I can get the contents from the host system easily enough, I just need to develop the HFS image side of the thing. I will start this interface this weekend, you can check on github and give any feedbacks you want. All help is welcome.

In the meantime I thought in adding a window with two text fields in which we can put the original path of a folder or file to copy and the destiny in the image file. This way, if we want a larger amount of files to be copied into the disk, is enough to have all of them inside a folder. =D
Jorpho
Master Emulator
Posts: 380
Joined: Fri Sep 17, 2004 4:22 am

Re: HFS Utilities for OSX

Post by Jorpho »

24bit wrote:Would be a really worthy addition, if you could donate an app with a (FileZilla like) GUI to move some files via r/w HFS images to and from the emulators!
Isn't that pretty much HFVExplorer?

In theory, the source code for HFVExplorer is available upon request (see http://web.archive.org/web/200112020358 ... ailability ), but if it was that easy I would have to wonder why no one has thought to ask for it (and subsequently port it) before.

Perhaps it is worth inquiring before re-inventing the wheel? Has anyone tried tracking down Lauri Pesonen before?
User avatar
Cat_7
Expert User
Posts: 6172
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: HFS Utilities for OSX

Post by Cat_7 »

I mailed several people called Lauri Pesonen in the past. Some interesting reactions, but not from the intended recipient ;-)

Good luck!

Cat_7
User avatar
sentient06
Mac Mechanic
Posts: 188
Joined: Tue Mar 29, 2011 8:57 pm
Location: London, UK

Re: HFS Utilities for OSX

Post by sentient06 »

Hi Jorpho,

Yes, this is some sort of HFVExplorer. I don't think, however, that it means reinventing the wheel, for the core of the HFS support is HFSUtils, which is already compiled and is used in both projects.
The only big change is the interface. I won't replicate HFVExplorer's interface because the project is for OSX. Also, we must consider HFVExplorer is from 1997. It means 16 years! Is too old. The few of us willing to make new tools for free should not be idle and I feel I can contribute a little bit, so let's do it.
Now I added HFS+ support, which uses hdiutils. It creates finder-writable HFS+ volumes (check first post). I want to make some interface adjustments and update support and later I will disappear for a while to make the file browser. It will be time-consuming. I will update this thread when it is done.

Thanks for the support guys, I appreciate!
Jorpho
Master Emulator
Posts: 380
Joined: Fri Sep 17, 2004 4:22 am

Re: HFS Utilities for OSX

Post by Jorpho »

sentient06 wrote:It will be time-consuming.
Well, that's exactly what I was thinking. I think HFVExplorer has a pretty good interface, especially considering that it seems to be platform-independent. Coding interfaces sucks.
User avatar
adespoton
Forum All-Star
Posts: 4276
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: HFS Utilities for OSX

Post by adespoton »

Slightly off topic, but as there's recently been new life breathed into the vbox osxfuse plugin, I was thinking... A HFSFuse plugin based on the lib would make a LOT of sense, and you'd gain the benefit of an entire OS it would work almost seamlessly with... And the ability to mount physical HFS as well.

Right now what I use for HFS/MFS is Mini vMac with the file import and export apps, so I can drag an image to mount and then drop file on it to copy them to the image.

Just some thoughts....
Post Reply