HxC Rev F as PC Drive A: with Real 1.2MB Drive B Issues

Post Reply
cube1us
Posts: 17
Joined: Wed Feb 05, 2014 12:59 am

HxC Rev F as PC Drive A: with Real 1.2MB Drive B Issues

Post by cube1us » Mon Jan 19, 2015 2:33 am

Bonjour everyone.

I have a brand new (arrived this week) HxC Rev F emulator from Lotharek. After a bit of fiddling around, I got it to function as drive A: on an old PC compatible machine that had two floppy drives (A: 1.44MB, B: 1.2MB 5"). I made the following discoveries, and also have some questions.

Firmware is V1.8.2.40 L:2A89

Observations:

A. The documentation could be a bit more clear about what it means by a "twisted" cable. A normal PC with two drives WILL ALMOST ALWAYS have a twist between drive B: and A:. One puts drive A on the end, normally, and sets it for DS1 (which might or might not be the same as your ID1 - I have not checked the pinouts). But, for an HxC, based on my testing, if you put the HxC on the end of the chain where A: normally would be, then you must set it for ID3, not ID2 as often seems to be suggested. (At least, on my HxC Rev F, to make it work as A: I have to turn ON ID3A.). I have seen posts by others struggling with this same issue. The end result is that if you try and set the switches from the documentation, you won't get it to work.

B. The documentation for the Rev F user interface seems nonexistent. MOST of the Rev C stuff applies, but there are differences. And there is no labeling on Lotharek's panel stickers. It took a while to figure out that the left LED is SD card accessed/present and the right LED is drive select.

C. The documentation could make it more clear that the configuration file File Interface Mode setting "Auto" means "Use the settings in the HFE file". (Am I correct on that?)

BUGS:

1. I set it up with my existing Drive B: and the HxC the way one would expect: Controller ====== Real Drive B (1.2MB) === [usual cable twist] === HxC as Drive A: . The HxC is set to Drive B OFF, ALL drive B switches OFF, and only ID3A On (toward the front of the unit). I can read and write from A: just fine. I can also copy a file from B: to the console (CON:) OK. But if I try and copy a file from B: to A: I get a "General error" (Echec general: lecture sur lecteur B). This may be because of #2 and #3, below.

2. I note that the HxC emulator drive light lights up when B is active.

3. I also note that when only drive B should be changing tracks (stepping), the HxC ALSO makes stepping sounds.

My conclusion is that there is a bug in the HxC drive select line handling.

4. On several occasions, the LCD has gone weird, such that the top line is all black blocks (though I can see some unusual characters if I look at just the right angle - looks like garbage), and the bottom line is all blank. The unit still responds as a floppy drive, and *seems* to respond to the buttons, but the LCD is unusable. When it got into this state, I had to unplug the power AND the drive interface cable, and leave them disconnected for several seconds, before plugging the power back into the unit. Disabling standby and setting the display to always on MAY have helped, and it hasn't happened in the last hour. It is possible that this resulted from drives fighting over the drive select, I suppose.

QUESTIONS

a) What is the configuration file setting "indexed mode" supposed to do? What is its purpose?

b) What is the configuration file setting "disable disk drive selection" supposed to do? What is its purpose?

c) If you go back to olden days, long before the PC, floppy drive select could work two different ways. One was "binary" - one selected based on the binary number used on the select lines, and the other was "radial" - each drive used a separate select line. It seems to me that HxC is essentially always radial. Is there a way to configure the emulator to do a binary select, where one would enable all the select lines, and configure the drive *number* somewhere? (I am guessing that the answer will be no - not a big deal - just curious).

cube1us
Posts: 17
Joined: Wed Feb 05, 2014 12:59 am

Re: HxC Rev F as PC Drive A: with Real 1.2MB Drive B Issues

Post by cube1us » Mon Jan 19, 2015 7:10 am

I did a little more research. There is a good article on PC floppy disk cabling at http://pinouts.ru/Storage/InternalDisk_pinout.shtml . It has a very good explanation of what is what.

Normally on a PC the lines are pulled high by 330 ohms on BOTH drives. It looks like maybe the HxC rev F has NO terminators in place, by measuring with my multimeter, and pads R11 - R16 are unused, but connected to be used for termination. (It is unfortunate that you didn't use DIP spacing there, so one could easily solder in a resistor pack, making it easier to remove and insert, rather than surface mount component space.)

Anyway, looking at everything, I am puzzled that ID2:A did not work. It appears ID3:A may have worked because it is using the PC motor signal (that starts out as pin 10, but becomes pin 16 after the "twist") rather than the drive select signal. But that might also explain the interference with drive B, maybe - if the controller leaves its Motor A (pin 10) on for a while, even if drive B gets selected - so both drives would think they were selected.

Hmmm: I wonder. With nothing to pull up the DS1 line, if that might be the real issue here. If so, a 300 ohm resistor should fix this issue. I will try again, with ID2, tomorrow morning (my timzeone is GMT-6 - Wisconsin, USA) and report my findings.

Because of how I plan to use the HxC emulator (on old S100 equipment, Color Computer, etc. etc.), it is important that I understand exactly how the drive select logic on the emulator works.

I also noted that, upon doing a "Load config file" of the configuration file, the HFE file Interface mode was unaffected on the GUI (version 2.0.26.0). Furthermore, in looking at the documentation of the HXCSDFE.CFG file format, there isn't anything mentioned about the interface mode at all. I also note that the buzzer step duration is apparently 0xE8 (octal 350, below) rather than the 0xD8 that appears in the documentation.

Can I get more current documentation of the config file format somewhere? Or is it just that the GUI has a check box and pull down for an interface mode that doesn't actually do anything? (If I have time, maybe I check out the GUI source code to see if there are any hints there, but I'd rather do other things with my time).

Here is a dump of my config file:

H:\>od -c HXCSDFE.CFG
0000000 H X C F E C F G V 1 . 0 \0 \0 \0 \0
0000020 377 377 024 024 \0 @ \0 \0 \0 \0 \0 350 226 \0 \0 \0
0000040 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
*
0020000

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

Re: HxC Rev F as PC Drive A: with Real 1.2MB Drive B Issues

Post by Jeff » Mon Jan 19, 2015 8:41 am

cube1us wrote: 1. I set it up with my existing Drive B: and the HxC the way one would expect: Controller ====== Real Drive B (1.2MB) === [usual cable twist] === HxC as Drive A: . The HxC is set to Drive B OFF, ALL drive B switches OFF, and only ID3A On (toward the front of the unit). I can read and write from A: just fine. I can also copy a file from B: to the console (CON:) OK. But if I try and copy a file from B: to A: I get a "General error" (Echec general: lecture sur lecteur B). This may be because of #2 and #3, below.

2. I note that the HxC emulator drive light lights up when B is active.

3. I also note that when only drive B should be changing tracks (stepping), the HxC ALSO makes stepping sounds.

My conclusion is that there is a bug in the HxC drive select line handling.
No this is just because you use the drive the drive B motor signal as drive A select signal.
On PC the right drive select signals are DS2 or DS1. So just set ID2A or ID1A depending of your floppy ribbon twist...

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

Re: HxC Rev F as PC Drive A: with Real 1.2MB Drive B Issues

Post by Jeff » Mon Jan 19, 2015 8:48 am

cube1us wrote: Normally on a PC the lines are pulled high by 330 ohms on BOTH drives. It looks like maybe the HxC rev F has NO terminators in place, by measuring with my multimeter, and pads R11 - R16 are unused, but connected to be used for termination. (It is unfortunate that you didn't use DIP spacing there, so one could easily solder in a resistor pack, making it easier to remove and insert, rather than surface mount component space.)
Sure there is pull up on these lines into the HxC... but of course to be able measure them, you need to have the right switch position (ID1A or ID2A to ON).

cube1us
Posts: 17
Joined: Wed Feb 05, 2014 12:59 am

Re: HxC Rev F as PC Drive A: with Real 1.2MB Drive B Issues

Post by cube1us » Mon Jan 19, 2015 5:22 pm

OK, so I got it working. First, I measured the pull ups on a real drive, and found that the lines for pins 2, 12, 16, 18, 20, 22, 24 and 32 were pulled up. So I then set the HxC to PC mode, and measure dthe pull ups, and found that pins 10, 12, 14, 16, 18, 20, 22, 24 and 32 were pulled up. (I measured 10, 12, 14, 16 on the other side of the switch). That looked right to me. I also confirmed that the switches ID0, ID1, ID2 and ID3 corresponded to pins 10, 12, 14 and 16. Seeing all of that, it seemed to me that if the HxC was set in IBM PC HD mode, that one ought to turn on switch *ID1A* for drive A on the end of the chain, since that would correspond to DS1 on a real drive. (Of course, all of these signals are active low).

So, I did that, and everything worked as expected. My guess is that when I was testing yesterday, the drive may have been in Shugart interface mode (or Auto, and ending up in who knows what interface mode). [See my questions earlier regarding the interface mode not seeming to be set in the configuration file].

cube1us
Posts: 17
Joined: Wed Feb 05, 2014 12:59 am

Re: HxC Rev F as PC Drive A: with Real 1.2MB Drive B Issues

Post by cube1us » Mon Jan 19, 2015 6:01 pm

After some study, I also now think I understand how the interface mode works. Although the GUI (HxCFloppyEmulator.exe V2.0.26.0) shows an entry under SDCard HxC Floppy Emulator settings, this is really about the setting in the individual HFE files when you save them, not the floppy emulator configuration. I see that the GUI tries to make this apparent by having one box "SD HxC Floppy Emulator settings" and another box "HFE file Interface mode", but it still confused me. Maybe it would work better to have that setting on the main GUI panel, or perhaps as part of a dialog when one clicks on "Export" to make it a little less confusing.

After understanding that, I looked in my HFE file, and the byte for the interface setting was indeed 0x01 (IBMPC_HD_FLOPPYMODE). And, when I load that file into the GUI, it does say "IBM PC 1.44MB" in the grayed out selection box, along with the "Auto" check box marked.

It would also be helpful if the results/impact of each of the possible interface modes were documented somewhere. I will post this suggestion separately.

cube1us
Posts: 17
Joined: Wed Feb 05, 2014 12:59 am

Re: HxC Rev F as PC Drive A: with Real 1.2MB Drive B Issues

Post by cube1us » Mon Jan 19, 2015 6:14 pm

One last comment. I had intended that this thread end up under the PC and compatible support section. Not sure if I did something wrong?

Post Reply