Hxcmount for amiga

HxC Floppy Emulator on Amiga support
Post Reply
enemy
Posts: 14
Joined: Thu Dec 24, 2015 2:09 am

Hxcmount for amiga

Post by enemy »

Please can someone port this to amiga! It would for the first thing make transferring large files so much easier from pc to amiga.

On another note ....can anyone tell me a way without a cd drive to tranfser large files from pc to amiga?

norb
Posts: 32
Joined: Tue Oct 13, 2015 3:13 pm

Re: Hxcmount for amiga

Post by norb »

How large files?

enemy
Posts: 14
Joined: Thu Dec 24, 2015 2:09 am

Re: Hxcmount for amiga

Post by enemy »

i want to move whdload install files over without taking the compact flash out of my amiga and buying a reader for my pc. just want to load up a load of files to the sdcard and move them or write them out from the sdcard.

gonk23
Posts: 38
Joined: Sat Jun 15, 2013 4:21 pm
Location: Melbourne, Australia

Re: Hxcmount for amiga

Post by gonk23 »

Yeah, being able to use the HxC to copy files larger than 880kB (the floppy disk size) would be very useful. I've been using a "split" utility (which has versions on both the PC and the Amiga) to split large files on the PC into 880kB chunks so they can fit on individual HFE images, but it's a tedious process.

Writing an AmigaDOS hard disk device driver for the HxC probably requires a lot of detailed AmigaDOS knowledge and presumably isn't easy to do.

However I suspect we can write something a bit simpler; i.e. an AmigaDOS command line utility that does the following:
(1) Allows a directory list of the FAT32 filesystem on the HxC's SD card to be displayed. E.g. "hxcutil list".
(2) Allows a file to be copied from the SD card to the Amiga file system. E.g. "hxcutil copy mygame.lha dh0:".
(3) Optionally allow files to be copied the other way too, however I don't see that as a priority to start with.

Ok, but is there any existing Amiga code (not Atari code) that does something like that? I believe there might be ...

Jeff's Amiga file selector (https://github.com/jfdelnero/HXCFE_Amiga_file_selector) basically does the following:
(1) Reads a config file from the FAT32 filesystem on the HxC's SD card.
(2) Displays a directory list of the FAT32 filesystem on the HxC's SD card.
(3) Allows the user to select a file to use as the boot image and modifies the config file appropriately.
(4) Writes the modified config file back to the FAT32 filesystem on the HxC's SD card.

So even though this existing utility is for a different application, it's able to list directories and read/write files from/to the FAT32 filesystem on the HxC's SD card.

Question to Jeff: how easy do you think it would be to create something like this from your existing code? Can the sector and FAT32 access code be easily used within AmigaDOS, or does it assume that it has complete control over the machine?

enemy
Posts: 14
Joined: Thu Dec 24, 2015 2:09 am

Re: Hxcmount for amiga

Post by enemy »

Sounds promising, i just want to use it as a mass storage device and you seem to be on the right track. Even if its at floppy drive speed it would still be very useful

Jeff
Site Admin
Posts: 8092
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: Hxcmount for amiga

Post by Jeff »

gonk23 wrote:So even though this existing utility is for a different application, it's able to list directories and read/write files from/to the FAT32 filesystem on the HxC's SD card.

Question to Jeff: how easy do you think it would be to create something like this from your existing code? Can the sector and FAT32 access code be easily used within AmigaDOS, or does it assume that it has complete control over the machine?
Of course this will work.
In fact this was planned, but i never got the time to do this tools.
So if you can work on this, this is fine ! :)

gonk23
Posts: 38
Joined: Sat Jun 15, 2013 4:21 pm
Location: Melbourne, Australia

Re: Hxcmount for amiga

Post by gonk23 »

Jeff wrote:So if you can work on this, this is fine ! :)
Ok I'll give it a go. Initially I'll focus on a read-only copy utility (from HxC to amiga). I'll report back in a couple of weeks.

norb
Posts: 32
Joined: Tue Oct 13, 2015 3:13 pm

Re: Hxcmount for amiga

Post by norb »

I reported as a tester.

rfancella
Posts: 17
Joined: Mon Nov 09, 2015 6:54 pm

Re: Hxcmount for amiga

Post by rfancella »

I'll be glad to help out where I can as well. I'd be glad to test on my gear.

Thanks,
Ron

gonk23
Posts: 38
Joined: Sat Jun 15, 2013 4:21 pm
Location: Melbourne, Australia

Re: Hxcmount for amiga

Post by gonk23 »

Ok testers ... attached is a beta version. I assume your system boots from a hard disk.

Copy the "hxc" program in the attached HFE image to C: on the Amiga, i.e. assuming the HxC SD is connected as df1:
copy df1:hxc c:

Then you can run "hxc" to get usage instructions. The idea is that you change to the destination folder on the Amiga, and you then use "hxc" to list directories and copy a file/folder from the HxC. E.g.:
cd work:
hxc dir
hxc dir myfolder
hxc copy myfolder

I seriously don't recommend using this utility to try to copy to a floppy image mounted on the HxC!

Limitations:
* Requires KS/WB 2.x or later. This is a limitation of the build environment I'm currently using.
* Slow! Takes about 5 mins to copy 1MB.
* Shorter filenames will be converted to lowercase.
* Only copies from HxC (i.e. doesn't copy to HxC) at the moment.
* Doesn't do recursive (deep) copies at the moment.

Known bugs:
* Has a memory leak, i.e. chip RAM gets used everytime it's run but doesn't get returned on exit.
* Utility will crash if an SD card isn't inserted in the HxC.

Feedback is welcome. I plan to clean up the code and then put it on github.
Attachments
hxc.hfe.zip
(53.21 KiB) Downloaded 588 times

gonk23
Posts: 38
Joined: Sat Jun 15, 2013 4:21 pm
Location: Melbourne, Australia

Re: Hxcmount for amiga

Post by gonk23 »

The source code is now available at: https://github.com/gonk23/HXCFE_Amiga_copy_utility

The README.md file contains instructions plus a download link for the HFE image containing the binary.

I've renamed the copy utility to "hxcfe".

norb
Posts: 32
Joined: Tue Oct 13, 2015 3:13 pm

Re: Hxcmount for amiga

Post by norb »

Its works. I tested on a1200 and GOTEK ,

gonk23
Posts: 38
Joined: Sat Jun 15, 2013 4:21 pm
Location: Melbourne, Australia

Re: Hxcmount for amiga

Post by gonk23 »

norb wrote:Its works. I tested on a1200 and GOTEK ,
How fast is it? E.g. if you time a copy of a 1MB file, how long does it take?

It's interesting that it also works with the Gotek.

gonk23
Posts: 38
Joined: Sat Jun 15, 2013 4:21 pm
Location: Melbourne, Australia

Re: Hxcmount for amiga

Post by gonk23 »

I've updated the version to 0.2. This fixes the memory leak problem for most normal cases except when there are sector read/write errors (which are uncommon).

Please use the latest version from: https://github.com/gonk23/HXCFE_Amiga_copy_utility

enemy
Posts: 14
Joined: Thu Dec 24, 2015 2:09 am

Re: Hxcmount for amiga

Post by enemy »

gonk23 wrote:I've updated the version to 0.2. This fixes the memory leak problem for most normal cases except when there are sector read/write errors (which are uncommon).

Please use the latest version from: https://github.com/gonk23/HXCFE_Amiga_copy_utility
You are a legend sir, i will try this tomorrow

Post Reply