Gotek into an SF-354 case working as drive B

Troubles with your machine? Just want to speak about the latest improvements? This is the place!

Moderators: Mug UK, Zorro 2, Greenious, spiny, Moderator Team

btp
Atariator
Atariator
Posts: 26
Joined: Fri Aug 28, 2020 4:21 pm

Gotek into an SF-354 case working as drive B

Post by btp »

I had the idea to replace the single-sided floppy drive inside my SF-354 with a Gotek and create an external drive that will allow easy software transfer if connected to an Atari ST machine.

Now, I have a MEGA2 with a working internal floppy drive (EPSON SMD-380). Upon connecting my SF-354 with its original single-sided floppy drive, everything works as expected and both internal and external floppy drives are fully operational. So I take it this means that all components (ICs, ports, cables, PSUs, etc.) related to the utilization on the internal and external drives are working properly.

The Gotek is the SFRKC30.AT3 model with an Artery AT32F415 micro-controller. It has been flashed with flash floppy v3.41 and tested working fine when connected alone to the internal floppy controller of the MEGA2 (GOTEK is jumpered on S0).

The Gotek has been replaced the single-sided floppy drive in my SF-354 and connected as shown in the attached photo.
IMG_20230916_150926.jpg

Now about my experiments so far:
  • Status: SF-354 with the Gotek jumpered on S0 connected externally and the EPSON drive connected internally
    Result: I cannot read/open any disks in both drives (double-click on the floppy disk icons gives: "Drive is not responding" messages)
  • Status: SF-354 with the Gotek jumpered on S1 connected externally and the EPSON drive connected internally
    Result: both drives disappear
  • Status: SF-354 with the Gotek jumpered on S0 & M0 being the only drive connected to the system (externally)
    Result: Gotek works fine
  • Status: SF-354 with the Gotek jumpered on S0 & M0 and the EPSON also connected internally
    Result: Only GOTEK is identified and works fine as drive A (boot drive)
  • Status: SF-354 with the Gotek jumpered on S1 & M0 and the EPSON also connected internally
    Result: GOTEK works both as drive A & B (double-clicking both of the A & B floppy icons on TOS gives me the content of the image file selected in the GOTEK)
:?: My question is has anyone managed to connect a Gotek in the external floppy port of an Atari ST with a floppy drive also connected internally in the machine, and have both drives working as they should?

If yes, can you provide some guidance on how you've done it? :shrug:

Any help/advice on this issue is much appreciated! :thumbs:
You do not have the required permissions to view the files attached to this post.
czietz
Hardware Guru
Hardware Guru
Posts: 2279
Joined: Tue May 24, 2016 6:47 pm

Re: Gotek into an SF-354 case working as drive B

Post by czietz »

Yes, but an older Gotek and with HxC firmware. See my article in German here: https://www.chzsoft.de/site/hardware/us ... -atari-st/
btp
Atariator
Atariator
Posts: 26
Joined: Fri Aug 28, 2020 4:21 pm

Re: Gotek into an SF-354 case working as drive B

Post by btp »

Thanks for your reply czietz
I was worried that what I wanted to achieve wasn't feasible but your results prove it is!

FlashFloppy supports an HXC compatibility-mode (https://github.com/keirf/flashfloppy/wi ... ility-mode) so I will give it a try and report back!
btp
Atariator
Atariator
Posts: 26
Joined: Fri Aug 28, 2020 4:21 pm

Re: Gotek into an SF-354 case working as drive B

Post by btp »

I'm afraid its no dice :(
I read the guide but whatever I've tried with the FlashFloppy firmware it doesn't seem to improve things.

Did anyone managed to accomplish what I'm trying (Gotek externally and normal disk drive internally) using the FlashFloppy firmware?
User avatar
LynXX
Atari maniac
Atari maniac
Posts: 90
Joined: Wed Jul 19, 2017 3:15 am
Location: Bern, Switzerland
Contact:

Re: Gotek into an SF-354 case working as drive B

Post by LynXX »

Not helping, but just to say that I was in the exact situation, got the same results and never got it to work 😢
ijor
Hardware Guru
Hardware Guru
Posts: 4426
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: Gotek into an SF-354 case working as drive B

Post by ijor »

Something doesn't seem right. The behavior you describe is not normal. Many people connected a Gotek as an external drive. I have one myself, except I used a 314 box, not a 354 one. There might be an issue there with the logic on some 354 boards. But seems you have at least some other issue.

The normal jumpering for a Gotek is S0. This should work both as internal and as external. Don't connect the M0 jumper. It works both with FlashFloppy and HxC firmware.
Fx Cast: Atari St cycle accurate fpga core
ijor
Hardware Guru
Hardware Guru
Posts: 4426
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: Gotek into an SF-354 case working as drive B

Post by ijor »

I was thinking that perhaps newer cheaper Gotek units don't have open collector drivers. All drives, Gotek or not, are supposed to use open collector drivers. That's needed to avoid interfering with other drives on the same bus. Using non open collector buffers might explain the behavior you are describing.

It is possible that it is not using any buffers at all. If you are good at electronics you might want to open the box and look at the components. May be even posting a high rez picture. Or perhaps ask on some of the flashfloppy or Hxc forums if they are aware of Gotek units without open collector drivers.
Fx Cast: Atari St cycle accurate fpga core
btp
Atariator
Atariator
Posts: 26
Joined: Fri Aug 28, 2020 4:21 pm

Re: Gotek into an SF-354 case working as drive B

Post by btp »

Hi ijor and many thanks for your feedback!

I'm attaching a high-res photo of my Gotek PCB
IMG_20230918_093323.jpg
Does it help to tell if there is an issue with buffering?
You do not have the required permissions to view the files attached to this post.
joska
Hardware Guru
Hardware Guru
Posts: 5498
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Gotek into an SF-354 case working as drive B

Post by joska »

ijor wrote: Sun Sep 17, 2023 11:01 pm I was thinking that perhaps newer cheaper Gotek units don't have open collector drivers. All drives, Gotek or not, are supposed to use open collector drivers.
I would expect the microcontroller itself to have open collector input/outputs. I don't have any experience with the microcontroller used in the Gotek, but the microcontrollers I do have experience with do have this option.

I have used a Gotek as drive B in one of my Megas, but that was with HxC firmware and not FlashFloppy. It may be worth checking out HxC in this case.
btp wrote: Mon Sep 18, 2023 6:43 am I'm attaching a high-res photo of my Gotek PCB
Looks exactly like my Gotek.
Jo Even

VanillaMiNT - Falcon060 - Milan060 - Falcon040 - MIST - Mega STE - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64
mikro
Hardware Guru
Hardware Guru
Posts: 3670
Joined: Sat Sep 10, 2005 11:11 am
Location: Kosice, Slovakia
Contact:

Re: Gotek into an SF-354 case working as drive B

Post by mikro »

I have a spare SF-314 for exactly this reason. As I have both HxC and FlashFloppy Goteks, I can report my findings when I get to it.
User avatar
Greenious
Hardware Guru
Hardware Guru
Posts: 1587
Joined: Sat Apr 24, 2004 5:39 pm
Location: Sweden

Re: Gotek into an SF-354 case working as drive B

Post by Greenious »

I'm wondering if the gotek is trying to act as both A/B drive... anyway, try this

Have you reset your gotek to factory default?
Out of the box, FlashFloppy uses the default values described in the Options list. When these are modified by values in FF.CFG they are recorded into the Gotek's Flash memory and become the new default values when the drive is next powered on.

If you wish to return to "factory defaults", press the Prev and Next buttons (or Select, or the rotary encoder, if you have them) for three seconds with no USB stick inserted. The display will show RST or Reset Flash Configuration: Factory defaults are restored when the buttons are released.
Delete your FF.CFG, the default settings should work with ST.
Jumper on S0

Does that make any difference?
Updated my guides as of june 28th, 2016. Check'em out and feedback!
http://www.atari-forum.com/viewtopic.php?t=5040
ijor
Hardware Guru
Hardware Guru
Posts: 4426
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: Gotek into an SF-354 case working as drive B

Post by ijor »

btp wrote: Mon Sep 18, 2023 6:43 am I'm attaching a high-res photo of my Gotek PCB
Does it help to tell if there is an issue with buffering?
Yeah, looks like a normal Gotek PCB. The open collector drivers, realized as discrete transistors, are there as far as I can see.

It still sounds like the Gotek is activating, at least, some signals even when it is not supposed to be selected. You probably need some tools to perform some diagnostic.

What exactly happens when you jumper the Gotek as S1? Does the Gotek activity led turn on when the computers attempts to boot? What happens if no USB pendrive is inserted in the Gotek?

It might, conceivable, be a firmware issue. But seems more like a hardware problem to me.
Fx Cast: Atari St cycle accurate fpga core
czietz
Hardware Guru
Hardware Guru
Posts: 2279
Joined: Tue May 24, 2016 6:47 pm

Re: Gotek into an SF-354 case working as drive B

Post by czietz »

joska wrote: Mon Sep 18, 2023 11:04 am I would expect the microcontroller itself to have open collector input/outputs.
Iirc, my Gotek (much older HW revision than btp's) uses discrete transistors for the open-collector/open-drain outputs. Maybe because some floppy drive interfaces have quite strong pull-up resistors and therefore require a significant current drive. I see a number of discrete transistors on btp's photo, too; thus, I assume they serve the same purpose there.
ijor
Hardware Guru
Hardware Guru
Posts: 4426
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: Gotek into an SF-354 case working as drive B

Post by ijor »

joska wrote: Mon Sep 18, 2023 11:04 am I would expect the microcontroller itself to have open collector input/outputs. I don't have any experience with the microcontroller used in the Gotek, but the microcontrollers I do have experience with do have this option.
Yes, the output signals can be configured as open drain. But you normally don't want to connect the unbuffered MCU pins directly. It is dangerous and there is risk to damage the MCU. Also, depending on the pull ups on the host, the MCU outputs might have not enough high current drivers.

In the case of the Gotek the design is very conservative. There are two stage output buffers drivers. A 74HC inverter plus discrete transistors.
Fx Cast: Atari St cycle accurate fpga core
joska
Hardware Guru
Hardware Guru
Posts: 5498
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Gotek into an SF-354 case working as drive B

Post by joska »

Having thought a bit about this I can't see how this can be anything other than an issue with the Gotek or it's firmware.

On a Mega ST, the drive B select signal is connected to the external floppy connector's pin 5 (drive 0 select). The drive 1 select signal on the external floppy connector (pin 6) is permanently grounded. So on these machines (if unmodified) it's not possible for external (correctly working) disk drives to act as drive A. AFAIK this applies to all Ataris with internal drives - drive 0 select on the external port is always connected to the internal drive 1 select signal.

On ST's with no internal drive OTOH the internal drive 0 select is connected to external drive 0, and drive 1 select is connected to external drive 1.

I don't have a 354, but I have a 314 and pin 6 (drive 1 select) on the "in" connector is not connected to the internal floppy. It is connected to the "out" port's drive 0 select. This means that if you connect a drive to an ST with no internal drive, you can connect a second drive to the first drive's "out" port and it will respond to the ST's drive 1 select. On an ST with an internal drive this second drive will never be accessed.

Btw here's what appears to be the schematic of your Gotek. I said above that yours looks exactly like mine - that's not true. My Gotek has as STM32, yours has an AT32F. I don't know what that means in practice, I believe the AT has less RAM than the STM but I don't know if this matters for FlashFloppy.

Image
Jo Even

VanillaMiNT - Falcon060 - Milan060 - Falcon040 - MIST - Mega STE - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64
btp
Atariator
Atariator
Posts: 26
Joined: Fri Aug 28, 2020 4:21 pm

Re: Gotek into an SF-354 case working as drive B

Post by btp »

mikro wrote: Mon Sep 18, 2023 11:28 am I have a spare SF-314 for exactly this reason. As I have both HxC and FlashFloppy Goteks, I can report my findings when I get to it.
Thank you! I would be very interested to learn the FlashFloopy version you are using and if you have any special configuration.

Greenious wrote: Mon Sep 18, 2023 11:42 am I'm wondering if the gotek is trying to act as both A/B drive... anyway, try this

Have you reset your gotek to factory default?
Out of the box, FlashFloppy uses the default values described in the Options list. When these are modified by values in FF.CFG they are recorded into the Gotek's Flash memory and become the new default values when the drive is next powered on.

If you wish to return to "factory defaults", press the Prev and Next buttons (or Select, or the rotary encoder, if you have them) for three seconds with no USB stick inserted. The display will show RST or Reset Flash Configuration: Factory defaults are restored when the buttons are released.
Delete your FF.CFG, the default settings should work with ST.
Jumper on S0

Does that make any difference?
Thank you for your suggestion but I'm already using FlashFloppy with the default configuration since I have put no FF.CFG file on my USB stick! There are only .st image files on the root of the USB stick. Anyway, I tried the reset as per the instructions and unfortunately nothing changed. Also, jumper was present only at S0 position. Mind you this configuration and exactly same Gotek connected directly on the internal floppy controller of my MEGA is working fine.

ijor wrote: Mon Sep 18, 2023 12:24 pm
btp wrote: Mon Sep 18, 2023 6:43 am I'm attaching a high-res photo of my Gotek PCB
Does it help to tell if there is an issue with buffering?
Yeah, looks like a normal Gotek PCB. The open collector drivers, realized as discrete transistors, are there as far as I can see.

It still sounds like the Gotek is activating, at least, some signals even when it is not supposed to be selected. You probably need some tools to perform some diagnostic.

What exactly happens when you jumper the Gotek as S1? Does the Gotek activity led turn on when the computers attempts to boot? What happens if no USB pendrive is inserted in the Gotek?

It might, conceivable, be a firmware issue. But seems more like a hardware problem to me.
Without a USB inserted the Gotek just displays F-F on its screen.
Jumper on S0: With a USB inserted the Gotek screen displays 000. When the MEGA is turned on the Gotek led flashes one time (briefly) and after a couple of seconds flashes again (also briefly). Both internal drive and Gotek are not working in TOS.

Jumper on S1: With a USB inserted the Gotek screen displays 000. When the MEGA is turned on the Gotek led does not flash at all. Both internal drive and Gotek are not working in TOS.
btp
Atariator
Atariator
Posts: 26
Joined: Fri Aug 28, 2020 4:21 pm

Re: Gotek into an SF-354 case working as drive B

Post by btp »

joska wrote: Mon Sep 18, 2023 4:46 pm Having thought a bit about this I can't see how this can be anything other than an issue with the Gotek or it's firmware.

On a Mega ST, the drive B select signal is connected to the external floppy connector's pin 5 (drive 0 select). The drive 1 select signal on the external floppy connector (pin 6) is permanently grounded. So on these machines (if unmodified) it's not possible for external (correctly working) disk drives to act as drive A. AFAIK this applies to all Ataris with internal drives - drive 0 select on the external port is always connected to the internal drive 1 select signal.

On ST's with no internal drive OTOH the internal drive 0 select is connected to external drive 0, and drive 1 select is connected to external drive 1.

I don't have a 354, but I have a 314 and pin 6 (drive 1 select) on the "in" connector is not connected to the internal floppy. It is connected to the "out" port's drive 0 select. This means that if you connect a drive to an ST with no internal drive, you can connect a second drive to the first drive's "out" port and it will respond to the ST's drive 1 select. On an ST with an internal drive this second drive will never be accessed.

Btw here's what appears to be the schematic of your Gotek. I said above that yours looks exactly like mine - that's not true. My Gotek has as STM32, yours has an AT32F. I don't know what that means in practice, I believe the AT has less RAM than the STM but I don't know if this matters for FlashFloppy.
According to the FlashFloppy wiki on github the current version support the AT32F415 MCU. Indeed it has only 32kb RAM but the functionality is the same and only some advanced features are left out because of the less memory. Its really puzzling because on the same machine when I connect the Gotek (as it is) on the internal floppy controller it works just fine.

Something I forgot to mention - and I'm not sure if it can be of any significance in this case - is that I have also connected internally to my MEGA an ACSI2STM (which is working fine).
joska
Hardware Guru
Hardware Guru
Posts: 5498
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Gotek into an SF-354 case working as drive B

Post by joska »

btp wrote: Sun Sep 17, 2023 1:11 pm The Gotek has been replaced the single-sided floppy drive in my SF-354 and connected as shown in the attached photo.

IMG_20230916_150926.jpg
Isn't the floppy cable connected the wrong way here? The connector on the old Shugart drives used in the large button 314/354 and early ST's/Megas is upside-down compared to "modern" drives, which is why the floppy cable in more recent ST's is longer as it has to be twisted 180 degrees.
Jo Even

VanillaMiNT - Falcon060 - Milan060 - Falcon040 - MIST - Mega STE - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64
btp
Atariator
Atariator
Posts: 26
Joined: Fri Aug 28, 2020 4:21 pm

Re: Gotek into an SF-354 case working as drive B

Post by btp »

The colored stripe marks pin 34 instead of the usual pin 1 (it's written on the silk screen of the SF-354 PCB). If I try to connect it otherwise the Gotek displays the error message for the wrong orientation of the data ribbon (rib).
ijor
Hardware Guru
Hardware Guru
Posts: 4426
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: Gotek into an SF-354 case working as drive B

Post by ijor »

btp wrote: Mon Sep 18, 2023 8:14 pm Without a USB inserted the Gotek just displays F-F on its screen.
I know it would display that. But what else happens? Does the led on the internal drive turn on? Do you hear the internal drive moving the head?
Jumper on S0:
Forget about the "correct" jumper on S0 for the time being. That is the correct way to jumper the Gotek. But for diagnostic purposes it is more interesting the exact behavior when the jumper is on S1, or for that matter with no jumper at all.
Jumper on S1: With a USB inserted the Gotek screen displays 000. When the MEGA is turned on the Gotek led does not flash at all. Both internal drive and Gotek are not working in TOS.
Ok, but please give us more details. Again, the internal drive attempts to work in that case or not at all? Internal drive led turns on, flashes? Do you hear internal drive moving the head?

Any difference with no jumper at all?

Do you have electronic equipment to monitor some signals?
Fx Cast: Atari St cycle accurate fpga core
User avatar
mpattonm
Hardware Guru
Hardware Guru
Posts: 823
Joined: Mon Oct 21, 2002 8:52 am
Location: Czech republic
Contact:

Re: Gotek into an SF-354 case working as drive B

Post by mpattonm »

I remember servicing an external drive someone bought in auction at one time. The board of the drive was subtly modified for "PC drive", effectively swapping pins 5 and 6 on data connector. Based on this experience, may I suggest you to check the drive PCB for hacks/mods as well?
It is maybe also worth to mention there are two data connectors on your SF drive and only ONE of them can be used to connect the drive to the ST. Again, the drive ID signal is swapped on the other connector to support daisy chaining, so you would see the exact same issue you are experiencing.
They are labeled IN and OUT and this is where it gets confusing, because IIRC IN connector should be hooked to ST and OUT goes to secondary drive, eventually. Somebody please correct me if I am wrong. Anyway, doublecheck you connect it correctly.
Finally, some drive ID swapping mods could also be performed on your ST mainboard itself as an attempt to implement A/B drive boot switch of some kind.
In any case, unmodified SF drive enclosures are designed for unmodified ST drives. Those are _always_ set as ID0. Remove the M0 jumper as well.
Last edited by mpattonm on Tue Sep 19, 2023 10:20 am, edited 1 time in total.
tzok
Captain Atari
Captain Atari
Posts: 292
Joined: Fri Jun 30, 2017 7:22 pm
Location: Bielsko-Biala, PL
Contact:

Re: Gotek into an SF-354 case working as drive B

Post by tzok »

btp wrote: Mon Sep 18, 2023 8:14 pm Jumper on S0: With a USB inserted the Gotek screen displays 000. When the MEGA is turned on the Gotek led flashes one time (briefly) and after a couple of seconds flashes again (also briefly). Both internal drive and Gotek are not working in TOS.

Jumper on S1: With a USB inserted the Gotek screen displays 000. When the MEGA is turned on the Gotek led does not flash at all. Both internal drive and Gotek are not working in TOS.
When Gotek is jumpered as S1 (or without a jumper at all), the internal drive should work normally, and Gotek should be inactive. Something is connected wrong or your Gotek is faulty.
btp
Atariator
Atariator
Posts: 26
Joined: Fri Aug 28, 2020 4:21 pm

Re: Gotek into an SF-354 case working as drive B

Post by btp »

In order to leave out any unknown factors I tested again using a stock 520STFM with TOS 1.02 and a working internal disk drive.

Baseline: Connecting the SF-354 with its original single-sided drive, everything works as expected. Both drives are recognized in TOS and can read/write disks.

Tests with the Gotek installed in the SF-354:
  • Gotek without jumpers => On boot no drive leds are turned on. In TOS no disk drives are available
  • Gotek with jumper only on S0 => On boot both drives are seeking disks (leds turn on). In TOS drive B is working and I can see the contents of the disk image mounted in the Gotek. Drive A cannot access disks (led lights up and motor rotates when I double-click its icon but I get the not responding error)
  • Gotek with jumper only on S1 => On boot only internal drive led turns on but then in TOS no disk drives are available

And something that I found by accident:

Gotek connected only with 34-pin data cable on the SF-354 and the overall SF-354 is not powered => No disk drives are available in TOS !!!

Obviously something is not working as expected with this GOTEK. Whether this is caused by a hardware fault or firmware incompatibility or some misconfiguration, I don't know. Remember that the same GOTEK with the same flashfloppy firmware (and default config since I don't use any FF.CFG) has been tested in a single-drive configuration (both with an Atari and an Amiga) successfully.

Does anyone have a suggestion what may be causing this and if there is a way to fix it?
ijor
Hardware Guru
Hardware Guru
Posts: 4426
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: Gotek into an SF-354 case working as drive B

Post by ijor »

btp wrote: Wed Sep 20, 2023 5:49 pm Gotek with jumper only on S0 => On boot both drives are seeking disks (leds turn on). In TOS drive B is working and I can see the contents of the disk image mounted in the Gotek. Drive A cannot access disks (led lights up and motor rotates when I double-click its icon but I get the not responding error)

Gotek with jumper only on S1 => On boot only internal drive led turns on but then in TOS no disk drives are available
I asked before, and I am asking once again. This is important. In both these cases, does the internal drive head move or not at all? You normally can hear the click stepping sound when the head moves.

But anyway, without some electronic tools you are unlikely to find the problem. Ideally you'll need a scope. But if you can make some measurements with a multimeter it might still be helpful.
Fx Cast: Atari St cycle accurate fpga core
btp
Atariator
Atariator
Posts: 26
Joined: Fri Aug 28, 2020 4:21 pm

Re: Gotek into an SF-354 case working as drive B

Post by btp »

Thanks again for your reply ijor

I will repeat these 2 tests and report back if the internal driver's heads are moving or not.

I have a multimeter but not a scope. Please let me know if there is anything I can check with the multimeter that will help in diagnosing this issue.
Post Reply

Return to “Hardware”