Korg Trinity + Gotek with HxC problem

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

Re: Korg Trinity + Gotek with HxC problem

Post by Jeff »

I am aware of all of this since a while ;)

The question you need to answer is : How many second is needed for the korg to detect a disk change ?

Ramucho
Posts: 37
Joined: Mon Jun 20, 2016 9:36 pm

Re: Korg Trinity + Gotek with HxC problem

Post by Ramucho »

I'll test in a while and tell you soon.

For now, I've compared the Gotek schematic with the standalone HxC SD floppy emulator, especially the floppy interface. I found that there were some little differences. There are 4 NAND gates with open collector that do not exist in the Gotek. 3 of the 4 gates outputs don't have a 1k pull-up resistor. Why ? On the Gotek, all these signals have one. This could be a problem if the resistors are not needed. If these resistors really exist on the FDC PCB, it's like you have 2 resistors in parallel on the Gotek.
Are the gates outputs signals emulated by software in the HxC firmware ?
Last edited by Ramucho on Mon Jul 04, 2016 6:38 pm, edited 2 times in total.

Ramucho
Posts: 37
Joined: Mon Jun 20, 2016 9:36 pm

Re: Korg Trinity + Gotek with HxC problem

Post by Ramucho »

Jeff wrote:I am aware of all of this since a while ;)

The question you need to answer is : How many second is needed for the korg to detect a disk change ?
I put back the original floppy drive in the synth :

1 - Power on the synth
2 - Insert a floppy in the drive
3 - Push the disk button -> about 5s to display the directory
4 - Change the disk to another one
5 - Touch the screen to refresh -> about 5-6s to detect a disk change (refresh) and display the directory

Something I see : every time I touch the screen to select a file without loading it, the synth makes a disk access (motor is on and the drive led is off).

5-6s seem to be the access time to the drive and reading the directory.
If I eject a disk without inserting a new one and make a refresh, a few ms are needed (less than 0.5s) to detect there is nothing inserted.

The problem with the Gotek is that the disk change signal stays in a wrong state after a refresh.

Can you confirm that the HxC SD floppy emulator can read Trinity disks without any problem ?

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

Re: Korg Trinity + Gotek with HxC problem

Post by Jeff »

Ramucho wrote:
The problem with the Gotek is that the disk change signal stays in a wrong state after a refresh.
Can you more specific please ? Which state exactly ?

Ramucho
Posts: 37
Joined: Mon Jun 20, 2016 9:36 pm

Re: Korg Trinity + Gotek with HxC problem

Post by Ramucho »

Jeff wrote:
Ramucho wrote:
The problem with the Gotek is that the disk change signal stays in a wrong state after a refresh.
Can you more specific please ? Which state exactly ?
As I said in a previous post, the disk change/ready signal should be asserted each time the USB stick is inserted or removed or each time the disk image is changed but must be released after a refresh (read) occures.

Is it possible that you send me a modified HxC firmware (from the original) which generates a positive pulse on pin 34 each time I insert a USB stick or I press one of the front buttons ? It's just to test and see if I'm right or wrong. It seems that, each time a positive pulse accures on pin 34, the synth detects a disk change and refreshes correctly the image. I can also use the signal on the red LED, invert it with a transistor and connect it to pin 34.

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

Re: Korg Trinity + Gotek with HxC problem

Post by Jeff »

Ramucho wrote:
Jeff wrote:
Ramucho wrote:
The problem with the Gotek is that the disk change signal stays in a wrong state after a refresh.
Can you more specific please ? Which state exactly ?
As I said in a previous post, the disk change/ready signal should be asserted each time the USB stick is inserted or removed or each time the disk image is changed but must be released after a refresh (read) occures.
But this is how already work the firmware :
In ibm pc mode : DiskChange Low when the drive is selected -> Drive selection + Track step -> DiskChange changed to High -> Image or usb stick changed -> DiskChange Low when the drive is selected.

i think that the problem is just that the image is changed too fast since this seems to work with a usb stick ejection.

Ramucho
Posts: 37
Joined: Mon Jun 20, 2016 9:36 pm

Re: Korg Trinity + Gotek with HxC problem

Post by Ramucho »

I read somewhere that it needs a track step in followed by a track step out. Is that what is done in the firmware ?
What about the NAND gates that do not exist in the Gotek and the missing pull up resistors ?

So, if the firmware does a correct disk detection/change, it may be a timing or delay or duration problem in the chronology and the synth can not detect the disk change correctly.

What is the duration of the high level pulse width of the disk change signal ? Is it long enough to be considered by the synth ?
When I manually emulate the disk change on pin 34 (positive pulse), everything works great. Also, this is asynchronous with the other signals.

Interesting p 23 : http://www.hermannseib.com/documents/floppy.pdf

DC
Disk change signal. It will be set when there is no disk in the drive. It stays set until explicitely
cleared by the FDC. Clearing this line works only if a disk is in the drive, thus attempting to clear the
line and checking its state immediately can be used to probe for a disk. Usually, the FDC clears this
line by seeking the drive. On some drives however, it is enough to select and unselect it. Some
drives also update DC very slowly (i.e. it takes some time after selection to put this line into the state
it should be). With some drives, it is possible to clear this line by seeking them to track -1 (noiseless),
with some others you have to seek it to an existing track. The fact that the DC line has to be cleared
explicitely allows us to make sure that the driver doesn’t miss a disk change.


I've no oscilloscope at home but I've used an LED to see the signals states. I've seen the disk change signal changing but not every time I change a disk image and it does not stay high until a disk change happens as you told me. What about if the FDC only sends the disk delection without a track step ?
Last edited by Ramucho on Tue Jul 05, 2016 6:53 pm, edited 1 time in total.

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

Re: Korg Trinity + Gotek with HxC problem

Post by Jeff »

Ramucho wrote:I read somewhere that it needs a track step in followed by a track step out. Is that what is done in the firmware ?
Sure. Working perfectly on a PC.
Ramucho wrote: So, if the firmware does a correct disk detection/change, it may be a timing or delay or duration problem in the chronology and the synth can not detect the disk change correctly.
Yes, or .... :
Ramucho wrote: When I manually emulate the disk change on pin 34 (positive pulse), everything works great. Also, this is asynchronous with the other signals.
For me this is an active low signal : High -> No disk change , Low : disk changed.
the signal is inverted on your floppy drive ?

Ramucho
Posts: 37
Joined: Mon Jun 20, 2016 9:36 pm

Re: Korg Trinity + Gotek with HxC problem

Post by Ramucho »

I can tell you that the behaviour of the disk change signal is correct and this what I can see on the LED ! :)
So what's wrong ? I don't know what to do now. Is it a hardware problem ?

P.S. : signals are active low -> YES ;)

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

Re: Korg Trinity + Gotek with HxC problem

Post by Jeff »

I ask again this : If you remove the usb stick , wait some second, and reinsert the stick, the disk change is detected ?

Ramucho
Posts: 37
Joined: Mon Jun 20, 2016 9:36 pm

Re: Korg Trinity + Gotek with HxC problem

Post by Ramucho »

Jeff wrote:I ask again this : If you remove the usb stick , wait some second, and reinsert the stick, the disk change is detected ?
Yes, it is detected. You must know that refreshing is not automatically done each time you change a disk. Refreshing is done when the disk button is pressed or if you are already in the disk menu by pressing the touch screen and yes, if a disk or image is changed, refreshing occures correctly.

After that, it is impossible to select a file with the touch screen because a new refresh accures. It's like the synth is always in refreshing mode as if it has detected a disk change. Incredible !

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

Re: Korg Trinity + Gotek with HxC problem

Post by Jeff »

Retry with the firmware i sent to you by email.

Ramucho
Posts: 37
Joined: Mon Jun 20, 2016 9:36 pm

Re: Korg Trinity + Gotek with HxC problem

Post by Ramucho »

Jeff wrote:Retry with the firmware i sent to you by email.
Should I force the drive selection to GND ?

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

Re: Korg Trinity + Gotek with HxC problem

Post by Jeff »

Ramucho wrote:
Jeff wrote:Retry with the firmware i sent to you by email.
Should I force the drive selection to GND ?
Sure ! The gotek floppy I/O are not gated, so all the bus selection are software driven, which is too slow for the Korg Trinity. There is no possibility to speed up it.
The SD HxC doesn't have this issue ;).

Ramucho
Posts: 37
Joined: Mon Jun 20, 2016 9:36 pm

Re: Korg Trinity + Gotek with HxC problem

Post by Ramucho »

Can you confirm that the SD HxC works great with a Korg Trinity synth ? If so, do you have one that I could test. Of course I pay you a caution via Paypal if you agree. I don't want to spend any more time on this problem because I don't have the source code to make tests, I don't have an oscilloscope at home... and it takes too long using the forum and I waste your time (and mine) ;)

Does the STM32 code is compiled with optimizations ?
Is it overclocked ?

Maybe the Gotek responds too fast for the synth or is it a timing problem ? If so, these problems belong to the software.

Post Reply