Commodore 1581 3.5 Drive Support

HxC Floppy emulator support for all others computers...
Post Reply
skideric
Posts: 21
Joined: Sat Mar 12, 2011 11:44 pm
Location: LA....... Lower Alabama!

Commodore 1581 3.5 Drive Support

Post by skideric »

Just found out that the 1581 internally uses cable & PS connector just like A500,A600.
So thinking might not be so much trouble to support it.
Any thoughts?
Thanks for a Wonderful Product(s) & this Forum! ; o)
Amiga 500 x2,Action Replay II,A600,A1200 x2(1-030,32MB,Squirrel),A2000,CD32,C128 x3,C128D x2,C64 x5,Com SX64,Com +4,A-30XE,Ti994A x2,T-Sinclair x2,Vic20 x2,TG16,Turbo Duo,CoCo 2,Micro CoCo,AII-GS,AIIe,Jaguar,3DO x2,Virtual Boy x2,C64 AIO x5,A-7800,PONG!

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

Re: Commodore 1581 3.5 Drive Support

Post by Jeff »

skideric wrote:Just found out that the 1581 internally uses cable & PS connector just like A500,A600.
So thinking might not be so much trouble to support it.
Any thoughts?
Thanks for a Wonderful Product(s) & this Forum! ; o)
Very interesting !
In fact i have added the D64 file format support some year ago, but this wasn't tested yet with a real hardware.

/*********************************************************
04/03/2009: HxCFloppyEmulator 1.2.0.11
-> GCR encoding support added.
-> New file Support : D64 file format (Commodore 64). (Experimental only at this date).
-> HFE file interface mode can now be changed through the settings dialog box.
*********************************************************/

But i supposed that the track format is different than a 1541 disk ?

futureman
Posts: 32
Joined: Tue Jan 11, 2011 4:38 pm

Re: Commodore 1581 3.5 Drive Support

Post by futureman »

I wonder if this could also be applied to the 1541.

I've got an Emulator SP12 sampling drum machine, and they use a 1541 to backup. these are massive tanks of a drive..

I was also thinking that it would be good to hack apart a 1541 and use the circuit board and a SDHxC instead.

(Sorry to derail your thread)

skideric
Posts: 21
Joined: Sat Mar 12, 2011 11:44 pm
Location: LA....... Lower Alabama!

Re: Commodore 1581 3.5 Drive Support

Post by skideric »

futureman wrote:I wonder if this could also be applied to the 1541.

I've got an Emulator SP12 sampling drum machine, and they use a 1541 to backup. these are massive tanks of a drive..

I was also thinking that it would be good to hack apart a 1541 and use the circuit board and a SDHxC instead.

(Sorry to derail your thread)

No Prob! Glad u posted. The 1541 is an"Intelligent Floppy" it's on processor,ram & all,very complicated.In fact that's what made it superior to other "Dumber" drives for other systems.No Disk Dos had to be loaded to use it.But the drive itself is a Newtronics or ... can't rem other brand 5.25 floppy drive.Have dissected a few in my time!
Jeff the 1581 has it's on image format (.d81),totally diff & prob simpler than the 1541.Uses partitions,etc like hard drives i believe.Someone else can join in with more info perhaps.As usual got my mind on too many things at once. ; 0 )
Amiga 500 x2,Action Replay II,A600,A1200 x2(1-030,32MB,Squirrel),A2000,CD32,C128 x3,C128D x2,C64 x5,Com SX64,Com +4,A-30XE,Ti994A x2,T-Sinclair x2,Vic20 x2,TG16,Turbo Duo,CoCo 2,Micro CoCo,AII-GS,AIIe,Jaguar,3DO x2,Virtual Boy x2,C64 AIO x5,A-7800,PONG!

lobogris
Posts: 4
Joined: Tue Mar 15, 2011 4:00 am

Re: Commodore 1581 3.5 Drive Support

Post by lobogris »

It's very interesting if the HXC can emulate the 1581. I'm very interested in this matter too.

Yes, the .d81 images are for the 3.5" discs of the 1581 disk drive, totally different format than .d64 (5,25"" discs)

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

Re: Commodore 1581 3.5 Drive Support

Post by Jeff »

lobogris wrote:It's very interesting if the HXC can emulate the 1581. I'm very interested in this matter too.

Yes, the .d81 images are for the 3.5" discs of the 1581 disk drive, totally different format than .d64 (5,25"" discs)
i just have a look to the d81 format.
You should already be able to use this kind of disk image with the HxC Floppy Emulator.
To load a .D81 :
d81loadsetting.gif
d81loadsetting.gif (9.51 KiB) Viewed 12564 times

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

Re: Commodore 1581 3.5 Drive Support

Post by Jeff »

Beta version with the D81 support:
https://hxc2001.com/floppy_drive_emulat ... t_beta.zip
to be tested!

lobogris
Posts: 4
Joined: Tue Mar 15, 2011 4:00 am

Re: Commodore 1581 3.5 Drive Support

Post by lobogris »

Thanks! very nice news...

question now is... how can I connect the HXC to the C64? it needs that special serial IEEC cable that Commodore disk drives use :roll:

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

Re: Commodore 1581 3.5 Drive Support

Post by Jeff »

lobogris wrote:Thanks! very nice news...

question now is... how can I connect the HXC to the C64? it needs that special serial IEEC cable that Commodore disk drives use :roll:
No. you need the 1581 disk drive of course !

lobogris
Posts: 4
Joined: Tue Mar 15, 2011 4:00 am

Re: Commodore 1581 3.5 Drive Support

Post by lobogris »

I understand, thanks

Question is.... Well I have one... but broken :x PSU was down because a low quality USA-EU converter... I think the only part broken is the PSU but I'm not 100% sure...

Perhaps I can made something from all this. I will open the 1581 and I'll see it.

devnull
Posts: 1
Joined: Tue Dec 13, 2011 9:03 am

Re: Commodore 1581 3.5 Drive Support

Post by devnull »

This is what I want the HxC for. I even already have a half-hacked/low-profile 1581 PCB sitting there, waiting for a suitable mech (I was going to build all of this into a flat C= 128).

Question tho: does the HxC support write?

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

Re: Commodore 1581 3.5 Drive Support

Post by Jeff »

devnull wrote:This is what I want the HxC for. I even already have a half-hacked/low-profile 1581 PCB sitting there, waiting for a suitable mech (I was going to build all of this into a flat C= 128).

Question tho: does the HxC support write?
yes (the sd version..).

thijs
Posts: 1
Joined: Wed Feb 26, 2014 9:38 pm
Location: The Netherlands

Re: Commodore 1581 3.5 Drive Support

Post by thijs »

I have replaced the 3.5 inch floppy drive of the 1581 with a SD HxC floppy emulator and -indeed- it works!

However, the default (auto) conversion from .d81 format to .hfe is not functioning properly. The conversion from .hfe to .d81 (backward) is missing.
The solution: After encoding into MFM the contents of the .d81-file, the disk sides should be written to the disk in reversed order. Use the batch converter with "Treat input files as RAW files" option and check "Reverse side" option in "RAW File format configuration" window.
The reason: The 1581 is writing the signal for head 0 at the second side of the floppy and head 1 on the first side.


The long story:

1. With the program OmniFlop on a Windows PC, I have captured the 3.5 inch floppy disks in .d81 image-files.
2. With the batch converter, I have converted the .d81 images-files into .hfe images-files, using the default (auto,none) settings.
3. The HFE file interface mode was set to non-auto, Generic Shugart and the config-file "HXCSDFE.CFG" was written on a SDHC-card. The .hfe images-files were also stored on the same SDHC-card.
4. The removal of the 3.5 inch floppy drive from the 1581 was very easy. Just open the box (2 screws), detach both cables from the floppy drive, remove the mounting plate (4 screws) with the floppy drive and connect the SD HxC floppy emulator. Both power- and data cables are straight and must be connected in the normal way. The voltages of the power connector (CN1) and pin numbers of the data connector (CN2) are printed on the printed circuit board, so it is easy to verify the position of the connectors. The jumper on the floppy emulator must select DS0. That pin (#10) is hard-wired to ground at the controller while other drive select lines are open/not connected, so there is no other option.
5. After powering up the 1581, the Commodore computer, selecting a floppy image and retrieving a directory, the drive reported the error message: "74, DRIVE NOT READY, 00,00". The 1581 generated this error message for all floppy images.
6. However, trying to format a floppy image gave an usable formatted floppy image! 3160 blocks free.
7. Reading the modified .hfe image file, that was formatted with the 1581, unveiled the reason for not able to read the original .hfe image files. It turned out that the .d81 images files were not properly converted into .hfe image files.
8. The logical diskformat of the 1581 consists of 80 tracks (track#01-80) with 40 logical sectors each (sector#00-39), called blocks with 256 bytes each. The disklabel and diskid is written on track 40, sector 0 ($28,$00). The block availability map (BAM) is administered on ($28,$01) for tracks 01-40 and on ($28,$02) for tracks 41-80. The directory starts at ($28,$03). The first two bytes of each block points to the next block (logical track, logical sector) within the directory or an ordinary file. The .d81 specification says that it is a "byte for byte copy of a physical 1581 disk". It is however a byte for byte copy of all 40 sectors for each track of the logical 1581 disk.
The physical diskformat consists of 80 tracks (track#00-79) with 10 sectors (sector#1-10) of 512 bytes on each side of the disk (head#0-1). Two consecutive logical sectors (blocks, 256 bytes) are written in one physical sector (512 bytes). The logical sectors 00-19 are written in consecutive order with head id#0 on the second side of the disk. The logical sectors 20-39 are written with head id#1 on the first side of the disk.
9. Using the batch converter with adjusted settings, I was able to convert .d81 image files into working .hfe images files. Therefore you have to select "Treat input files as RAW files" option and change the parameters in the "RAW File format configuration" window:
- Track type: MFM
- Sector per track: 10
- Format value: 0
- Auto GAP3: not checked (optional)
- GAP3 length: 35 (optional)
- PRE GAP length: 2 (optional)
- Reverse side: checked!
I have tested some other values for GAP3 length (0-80) and pre-GAP length (0-20). All tested values seems to work correct. The mentioned values (GAP3: 35, pre-GAP: 2) gave the same timing (start sector cell, end sector cell) as a 1581 formatted .hfe image file when compared with the track analyzer.
Attachments
1581demo.zip
floppy disk dump to hfe from original 1581 demo/utilities 3.5 inch disk
(180.86 KiB) Downloaded 608 times
1581formatted.zip
hfe file formatted by 1581 controller
(34.32 KiB) Downloaded 533 times

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

Re: Commodore 1581 3.5 Drive Support

Post by Jeff »

Thanks a lot for these very detailed informations, i will corrected the loader ASAP.

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

Re: Commodore 1581 3.5 Drive Support

Post by Jeff »

Jeff wrote:Thanks a lot for these very detailed informations, i will corrected the loader ASAP.
Now done on the beta PC version :wink: :
https://hxc2001.com/download/floppy_driv ... 2_beta.zip

Post Reply