External High Density FDD

Hardware, coding, music, graphic and various applications

Moderators: Mug UK, moondog/.tSCc., [ProToS], lp, Moderator Team

Pastor
Captain Atari
Captain Atari
Posts: 184
Joined: Wed Sep 19, 2007 3:40 pm
Location: Dublin
Contact:

External High Density FDD

Postby Pastor » Fri Feb 15, 2008 11:34 am

I have replaced the 1mb disk drive in my Cumana external drive with an Epson SMD-340 purchased from E-bay. I changed the jumpers on the drive to 14-15 (set to DS0), 4-5 (mode switched internaly) and 1-2 (2M mode set by HDI inp). I am able to now use both HD & DD disks on my B drive which is great. I just wanted to confirm that using the 4-5 jumper setting is correct as some people advise setting the 5-13 (Mode switched by HDI inp) jumper instead of the 4-5 setting, any suggestion as to which is correct? My TT030 does not have an AJAX chip but the earlier controller chip but I have no problems using HD disks. I actually have the replacement AJAX chip I just have not had the time to replace it yet.

Any help would be appreciated.

Paul

simbo

Re: External High Density FDD

Postby simbo » Fri Feb 15, 2008 4:15 pm

i would leave it to switched internaly
this just means the lsi on the drive detects what disk type you inserted and will use it
or the machine knows what types it takes when set to machine imposed

i dont think ataris spit this data out like a pc would or other
if i remember its best left as you have it

the older ic suffers data corruption {packet loss} but still works maybe missing a few sequencial reads
this is ok if you use disks formated on the drive its self
but as errors increase on the disk crc so does the paket loss and it can get jammed {gid gid gid gid gid then runs a little and carries on}

so replace the chip im sure with the newer one you have when you get time

User avatar
Greenious
Hardware Guru
Hardware Guru
Posts: 1160
Joined: Sat Apr 24, 2004 5:39 pm
Location: Sweden

Re: External High Density FDD

Postby Greenious » Fri Feb 15, 2008 9:05 pm

This is interesting.

But I think some things need to be explained so that you understand what potential problems you might encounter...

Switching mode internally is preffered, because Atari never tells the floppy what mode it is in.

But it is very important that the floppy outputs what kind of floppy is inserted into the drive, because Atari use that information to feed either 8 or 16 MHz to the floppy controller. (HD detect is expected at pin 2 of the 34 pin floppy connector)

Since the 14 pin DIN connector to the external drive does not provide for that, the floppy controller works according to the information it gets from the internal drive, meaning that when you have no DS floppy inserted into the internal drive, it will assume that the external drive has a HD floppy. (With no floppy, or a HD floppy inserted, the floppy drives HD detect circuit will believe a HD floppy is inserted, since it can not distinguish between a hole in the floppy, and no floppy at all)

Thus, if you insert a DS floppy into the internal drive, you should not be able to get the external one working with a HD floppy.

As for the floppy controller... Many WD1772-02-02 work well in 16 MHz, if yours do, there is no panic to change it into an AJAX. Most TTs (and Mega STEs) use a socketed floppy controller, so switching is painless.
Updated my guides as of june 28th, 2016. Check'em out and feedback!
viewtopic.php?t=5040

Pastor
Captain Atari
Captain Atari
Posts: 184
Joined: Wed Sep 19, 2007 3:40 pm
Location: Dublin
Contact:

Re: External High Density FDD

Postby Pastor » Sat Feb 16, 2008 7:23 pm

Thanks simbo & Grennious

From your comments I have chosen the correct jumper settings for the drive?

Since the 14 pin DIN connector to the external drive does not provide for that, the floppy controller works according to the information it gets from the internal drive, meaning that when you have no DS floppy inserted into the internal drive, it will assume that the external drive has a HD floppy. (With no floppy, or a HD floppy inserted, the floppy drives HD detect circuit will believe a HD floppy is inserted, since it can not distinguish between a hole in the floppy, and no floppy at all)

Thus, if you insert a DS floppy into the internal drive, you should not be able to get the external one working with a HD floppy.


I am slightly confused :oops: if I understand the above correctly it will not be possible for me to copy a DS disk from A - B? but I will be able to copy a HD disk from A-B? Can you please clarify this for me, I will also try this out.

Thanks

Paul

User avatar
Desty
Atari God
Atari God
Posts: 1948
Joined: Thu Apr 01, 2004 2:36 pm
Location: 53 21N 6 18W
Contact:

Re: External High Density FDD

Postby Desty » Sat Feb 16, 2008 10:28 pm

Pastor wrote:
Since the 14 pin DIN connector to the external drive does not provide for that, the floppy controller works according to the information it gets from the internal drive, meaning that when you have no DS floppy inserted into the internal drive, it will assume that the external drive has a HD floppy. (With no floppy, or a HD floppy inserted, the floppy drives HD detect circuit will believe a HD floppy is inserted, since it can not distinguish between a hole in the floppy, and no floppy at all)

Thus, if you insert a DS floppy into the internal drive, you should not be able to get the external one working with a HD floppy.


I am slightly confused :oops: if I understand the above correctly it will not be possible for me to copy a DS disk from A - B? but I will be able to copy a HD disk from A-B? Can you please clarify this for me, I will also try this out.

Sounds like that would work because both drives would have the same disk type, but maybe copying from a HD disk in one drive to a DD disk in the other, or vice versa, would not work? Or even that no HD access would work on the external drive at all if the internal drive contains a DD disk.
tá'n poc ar buile!

User avatar
Klapauzius
The Klaz
The Klaz
Posts: 4302
Joined: Sun Jul 04, 2004 7:55 am
Location: Bavaria
Contact:

Re: External High Density FDD

Postby Klapauzius » Sun Feb 17, 2008 1:45 am

Greenious wrote:But it is very important that the floppy outputs what kind of floppy is inserted into the drive, because Atari use that information to feed either 8 or 16 MHz to the floppy controller. (HD detect is expected at pin 2 of the 34 pin floppy connector)


Are you sure about that?
I've done a bit of research when making my floppy DMA routines compatible with high density disks: it seems that from the Mega STE up and from TOS 2.05 on, TOS is 'detecting' HD disks by a simple trial-and-error method. After detecting a media change it tries to read in one sector (with the current FDC clock speed, I believe) and if the read goes ok it keeps the current FDC clock, if not it's toggled by writing to $ffff860e.w (0 = 8MHz = DD/ 3 = 16MHz = HD).
This would also apply to the TT.

Or am I mixing things up here? ;-)
http://www.klapauzius.net
http://dbug.kicks-ass.net/klaz

The tears are welling in my eyes again, I need twenty big buckets to catch them in, twenty pretty girls to carry them down, twenty deep holes to bury them in.

ppera

Re: External High Density FDD

Postby ppera » Sun Feb 17, 2008 2:27 pm

If looking schematics of Mega STE and Falcon it is visible that floppy conn. pin 2 is used by clock generator for FDC.
I made simple test on Mega STE - covering HD/DD hole resulted in not recognising HD floppy, what means that no TOS trial-error system (2.06) .

What Greeny says us true - it is caused by lack of pins on 'ST inherited' external FDC connector.
Complete solution would be additional wire and OC HD signal active only when external floppy is selected (AND gate). It should be so by factory in most of drives where can set that pin 2 is HD/DD signal.

In any case, jumper should be set for internal detection.

User avatar
Greenious
Hardware Guru
Hardware Guru
Posts: 1160
Joined: Sat Apr 24, 2004 5:39 pm
Location: Sweden

Re: External High Density FDD

Postby Greenious » Sun Feb 17, 2008 9:02 pm

Since the working frequency of the floppy controller is set by the internal floppy, you should have no problem doing straight copying from a DD to DD disk, or HD to HD disks.

But if you insert a DD floppy in the internal drive, and a HD floppy in the external drive, the DD floppy will set the working frequency, and reading HD should not work.

It gets even more confusing when you have a HD floppy in the internal drive, and a DD floppy in the external drive. And use the format function to format it DD... It might look like it works... But in reality you format it in HD mode, making sure you will have great difficulties reading that floppy in another drive.

Anyway, I see no reason why you can't have an external HD floppy, but you need to be aware of these pitfalls.

To make the floppy configuration clear, you made the correct configuration. The floppydrive itself should automatically set mode depending on inserted floppy. and it also needs to output what kind of floppy is inserted on pin 2. Ofcourse, pin 2 is only useable on an internal floppy.

As for the extra register in STE/F030 Klaupazius refers to, I am unfamiliar with that, are you sure it is a control register? Personally I would think it is a status register.
Updated my guides as of june 28th, 2016. Check'em out and feedback!
viewtopic.php?t=5040

User avatar
Klapauzius
The Klaz
The Klaz
Posts: 4302
Joined: Sun Jul 04, 2004 7:55 am
Location: Bavaria
Contact:

Re: External High Density FDD

Postby Klapauzius » Sun Feb 17, 2008 10:05 pm

Greenious wrote:As for the extra register in STE/F030 Klaupazius refers to, I am unfamiliar with that, are you sure it is a control register? Personally I would think it is a status register.


Sorry, off to bed now, will try to check again tomorrow. :-)
In the meantime: the register is mentioned in a few (not all) docs. For example here:
wiki/index.php/DMA_&_SCSI
It's read/write for sure.
http://www.klapauzius.net
http://dbug.kicks-ass.net/klaz

The tears are welling in my eyes again, I need twenty big buckets to catch them in, twenty pretty girls to carry them down, twenty deep holes to bury them in.

User avatar
Klapauzius
The Klaz
The Klaz
Posts: 4302
Joined: Sun Jul 04, 2004 7:55 am
Location: Bavaria
Contact:

Re: External High Density FDD

Postby Klapauzius » Mon Feb 18, 2008 10:55 am

Hmm, I'm still a bit baffled... :?

While doing a multi-disk game (Black Sect), I got my MegaSTE with a HD floppy drive, which was the reason I wanted to have my DMA floppy routs being high density compatible.
It soon was obvious that my old routines were able to read from HD disks (with a 6ms steprate) if the program was initially launched from a HD disk. But as soon as I had to swap disks and inserted a DD disk as the 2nd disk, the disk couldn't be read by my routines. The same was true when I started the game from a DD disk and swapped a HD disk for the second one.
If the FDC clock speed switch was done automatically by hardware, there should have been no problems in reading both formats with a 6ms steprate? The different sector/track/etc. layout was of course taken into account by the routines.
After some chat with ijor and a (maybe too short) look at TOS 2.x, I ended up with a 'HD/DD detection routine', which works well for me on the MegaSTE and Falcon:

Code: Select all

fdc_chkdisk:               * check whether there's a HD or a DD disk in drive
      cmp.l #MEGASTE,_machtype(a6)   * running on MegaSTE or bigger?
      blo   fdc_cdret         * no, HD disks (if present) would be handled differently
      tst.b   _ddhdchk_flag(a6)   * DD/HD mode has already been determined?
      bne   fdc_cdret         * yes, no need to check again
      clr.w   _side(a6)              * set side 0
      bsr   seldrive         * select drive
      move.w   _ddhdmode(a6),$ffff860e.w * set current FDC clock speed
      clr.w   _steprate(a6)      * test with 6ms step rate (ok for DD and HD)
      move.w   #$82,(a5)      * get current track
      bsr   waitfdc         * "
      move.w   -2(a5),d0      * "
      and.w   #$00ff,d0      * "
      cmp.w   #79,d0      * track position ok for test?
      ble.s   fdc_cdtrkok      * yes
      move.w   #79,_track(a6)   * no, step to track 79
fdc_cdsrchtrk:   
      bsr   searcht         * "
      tst.w   _fail(a6)         * went ok?
      beq.s   fdc_cdtrkok   * yes
      clr.w   _track(a6)         * no, try again with track 0
      bra.s   fdc_cdsrchtrk      * "
fdc_cdtrkok:   
      move.w  #1,_sector(a6)      * set sector 1
      moveq   #1,d5      * one retry for reading the test sector
fdc_cdretry:   
      bsr   selread         * read test sector in
      cmp.w   #_timeout,_fail(a6)   * timeout error?
      beq.s   fdc_cderr      * yes
      and.b   #%00011000,d6      * FDC status in D6, CRC or RNF error?
      beq.s   fdc_cdclkok   * no, FDC clock was ok
fdc_cderr:   
      bsr   flreset         * yes, reset FDC
      bsr   seldrive         * just to be sure...
      dbf   d5,fdc_cdretry      * try a second time
      eor.w   #3,_ddhdmode(a6)   * didn't help, so toggle FDC clock
      move.w   _ddhdmode(a6),$ffff860e.w    * "
fdc_cdclkok:   
      st   _ddhdchk_flag(a6)   * remember that mode has been determined
      tst.w   _ddhdmode(a6)   * DD mode (8 MHz)?
      bne.s   fdc_cdret      * no, HD, step rate is ok then
      move.w   #3,_steprate(a6) * yes, set 3ms steprate for DD
fdc_cdret:   
      rts


My question would be: if TOS is not responsible for switching the clock speed of the FDC, how does it know what type of disk is in the drive to adjust the steprate (3ms/6ms)?
http://www.klapauzius.net
http://dbug.kicks-ass.net/klaz

The tears are welling in my eyes again, I need twenty big buckets to catch them in, twenty pretty girls to carry them down, twenty deep holes to bury them in.

ppera

Re: External High Density FDD

Postby ppera » Mon Feb 18, 2008 2:27 pm

Klapauzius wrote:...
My question would be: if TOS is not responsible for switching the clock speed of the FDC, how does it know what type of disk is in the drive to adjust the steprate (3ms/6ms)?


I'm afraid that code snippet what you posted here is not used. When Mega STE with TOS 2.06 is set in HD mode (microswitch pos 7) and we have DD floppy inserted, it has real 6 mS steprate (horrible sound).
This is typical lame lazy programmer solution, not onlyone in Atari machines.
I even made some simple steprate setting accesory SW in 1992, when I get TOS 2.06 and built in HD floppy drive in my Atari ST. It was placed in free space of TOS EPROM chips, and mapped as cartridge, so was always on desktop as small c (read only) drive.
What I wrote now is based on real tests with Mega STE. I can check it on Falcon too...
Although, whole floppy usage is something to be minimized as possible by me... Especially on machines with hard disks.

User avatar
Klapauzius
The Klaz
The Klaz
Posts: 4302
Joined: Sun Jul 04, 2004 7:55 am
Location: Bavaria
Contact:

Re: External High Density FDD

Postby Klapauzius » Mon Feb 18, 2008 2:52 pm

ppera wrote:I'm afraid that code snippet what you posted here is not used.

No, it's not used in TOS, that's right. It is my own way to detect HD/DD disks...
ppera wrote:When Mega STE with TOS 2.06 is set in HD mode (microswitch pos 7) and we have DD floppy inserted, it has real 6 mS steprate (horrible sound).

Yeah, I know that noise. :-)
Very odd. In my MegaSTE (TOS 2.05) the 'stepping sound' is totally identical with HD and DD disks. So I'm still assuming TOS would use different steprates in the track seek and restore commands, resulting in the same effective steprate for the two different FDC clock speeds. The same goes for the HD drive in my Falcon.
Ok, thanks for your help anyway. I guess I'll have a closer look at TOS' FDC/DMA routines when I find the time. :-)
http://www.klapauzius.net
http://dbug.kicks-ass.net/klaz

The tears are welling in my eyes again, I need twenty big buckets to catch them in, twenty pretty girls to carry them down, twenty deep holes to bury them in.

ppera

Re: External High Density FDD

Postby ppera » Mon Feb 18, 2008 3:00 pm

Klapauzius wrote:..
No, it's not used in TOS, that's right. It is my own way to detect HD/DD disks...
...
Very odd. In my MegaSTE (TOS 2.05) the 'stepping sound' is totally identical with HD and DD disks. So I'm still assuming TOS would use different steprates in the track seek and restore commands, resulting in the same effective steprate for the two different FDC clock speeds. The same goes for the HD drive in my Falcon.
Ok, thanks for your help anyway. I guess I'll have a closer look at TOS' FDC/DMA routines when I find the time. :-)


Ah, I did not read enough carefully. (But there is some 'dead' code in some TOS versions, no doubt.)
Don't know about 2.05 - I smashed it out quickly from Mega STE - maybe detection was buggy, so they replaced it with more 'robust' solution :mrgreen:

User avatar
Greenious
Hardware Guru
Hardware Guru
Posts: 1160
Joined: Sat Apr 24, 2004 5:39 pm
Location: Sweden

Re: External High Density FDD

Postby Greenious » Tue Feb 19, 2008 12:09 am

Actually, I took a quick look at the Mega STE schematics, and particularly the floppy circuit part, something I've never bothered with before, as these questions normally only concerns those using the HD floppy retrofit hacks for ST/STE.

As it turns out, Klaupauzius seems to be correct about the hardware control registers.

The PAL chip responsible seems to be adressable, and even have a 2 bit register (lower 2 bits), that looks like it is R/W.

Also, I had a look at the HD floppy kit upgrade instructions, and it indeed say that the drive is to be configured so that HD floppy mode is set by INPUT from HDI (pin 2).

These documents can be found here by the way.

But since the external floppy connector does not have HDI (pin 2), the external drive needs to be set to automatically set mode, as Pastor did.

Pastor wrote:I changed the jumpers on the drive to 14-15 (set to DS0), 4-5 (mode switched internaly) and 1-2 (2M mode set by HDI inp)

If you hook up the floppy internally in the Mega STE, pin 5-13 is correct, if you use it externally, or use any of the hacks out there for ST/STE retrofitting a HD floppy, pin 4-5 has to be set. Pin 1-2 is correct aswell, but is only important if you set pin 5-13, if you use pin 4-5, that setting is ignored.

This also means that any well written floppy routine, should have no problems handling your external drive, regardless of what you throw at it.

The extra register allows you to separately set frequency of the fdc, aswell as the working mode of the drive, I wonder what kind of funny formats could be achieved with that kind of control. But that is Ijors domain I think.
Updated my guides as of june 28th, 2016. Check'em out and feedback!
viewtopic.php?t=5040

ppera

Re: External High Density FDD

Postby ppera » Tue Feb 19, 2008 9:39 am

Yes, there are some extra registers and lines in Mega STE about FDC. But my floppy drive(s) as Teac 236, some newer Sony etc. have no jumpers to set it to external HD/DD control (they support not media change detection too). Probably most of (newer)drives have not too jumpers about it.
I don't think that mode of switching HD/DD is relevant about floppy formats. In theory is possible to make weird, mixed HD/DD formatted disks, but it will be readable only on machines where we can control density by SW - Mega STE,Falcon, TT , but depending of built in floppy drive ?

User avatar
troed
Atari God
Atari God
Posts: 1146
Joined: Mon Apr 30, 2012 6:20 pm
Location: Sweden

Re: External High Density FDD

Postby troed » Thu Aug 18, 2016 12:40 pm

Greenious wrote:Actually, I took a quick look at the Mega STE schematics, and particularly the floppy circuit part, something I've never bothered with before, as these questions normally only concerns those using the HD floppy retrofit hacks for ST/STE.

As it turns out, Klaupauzius seems to be correct about the hardware control registers.

The PAL chip responsible seems to be adressable, and even have a 2 bit register (lower 2 bits), that looks like it is R/W.

Also, I had a look at the HD floppy kit upgrade instructions, and it indeed say that the drive is to be configured so that HD floppy mode is set by INPUT from HDI (pin 2).

These documents can be found here by the way.

But since the external floppy connector does not have HDI (pin 2), the external drive needs to be set to automatically set mode, as Pastor did.

Pastor wrote:I changed the jumpers on the drive to 14-15 (set to DS0), 4-5 (mode switched internaly) and 1-2 (2M mode set by HDI inp)

If you hook up the floppy internally in the Mega STE, pin 5-13 is correct, if you use it externally, or use any of the hacks out there for ST/STE retrofitting a HD floppy, pin 4-5 has to be set. Pin 1-2 is correct aswell, but is only important if you set pin 5-13, if you use pin 4-5, that setting is ignored.

This also means that any well written floppy routine, should have no problems handling your external drive, regardless of what you throw at it.

The extra register allows you to separately set frequency of the fdc, aswell as the working mode of the drive, I wonder what kind of funny formats could be achieved with that kind of control. But that is Ijors domain I think.


Necromancing a bit, since I don't think the content of this thread became widely known. Also, since I can verify some of it now.

I recently put an Epson 340 in a Mega STE, and as well into a regular 1040 STE with an HD-kit for the 8/16MHz signal. For the Mega STE the Epson 340 indeed needs to be configured for external HDI input (jumper 5-13), which means the Mega STE is the component deciding whether to use DD or HD. Since the drive does not report any signal back to the computer as to whether there's a DD or HD disk in the drive, this means the only possible explanation indeed is that TOS uses trial & error setting both modes and see which works.

Using an HD-kit in the 1040 STE is another matter (see viewtopic.php?f=15&t=30149 ). There us Atarians have always used an HD-select signal coming from the drive to tell us whether to clock the 1772 at 8 or 16MHz. I managed to find such a signal on the Epson 340 (and at the same time found that it's not enough to let the drive use internal switching, the signal has to be routed to the HDI input as well as the HD-kit).

What it does mean, though, is that it would be possible to design an HD-kit that's "Mega STE" compatible, in that it decodes the $ffff860e.w address (0 = 8MHz = DD/ 3 = 16MHz = HD) and thus wouldn't need a drive with an externally routed HD-select signal at all. It seems it would only work with TOS 2.05 and up though.

/Troed

edit: Of course, this "only" works well with drives that follow the Atari way of detecting media change. That's why the Epson 340 is so attractive, since it - of course - does.

edit2: Forgot half my point. The "Mega STE" compatible way should work with external drives as well, over the regular floppy cable. The OP in this thread did that with a TT.


Social Media

     

Return to “Professionals”

Who is online

Users browsing this forum: No registered users and 1 guest