FlashFloppy / Gotek floppy emu working with OSI disk images

Mark
Posts: 293
Joined: Tue Sep 16, 2008 6:04 am
Location: Madison, WI
Contact:

FlashFloppy / Gotek floppy emu working with OSI disk images

Post by Mark »

(moved this into it's own topic)

OSI disk dump to gotek Flash Floppy conversion success!

[Edit 2019-09-16: So eventually I learned there are (at least) two emulator conversion projects for the Gotek floppy disk emulator hardware, HxC which is a closed-source product for sale, and Flash Floppy an open source project that uses the same "HFE" disk-image file format as HxC. The OSI to HFE conversion works well with Flash Floppy for both read and write, but with HxC only read compatibility seems to work, writing tends to crash the HxC firmware and the drive has to be powered down or reset. These problems may be corrected in future firmware releases or software updates and may no longer apply when you read this, but at this point Flash Floppy is the best choice for OSI replacements. -Mark]

Hi All,
So I've been working on software to do OSI <-> HFE conversions, made possible by the the work Phil & Dave did getting a working gotek HxC kyrofux conversion. Thanks! Now it's time to let it out into the world for some testing. Eventually I hope the HxC firmware will support conversions automatically, but this is a good 1st step.

To convert the OSI disk dump images to HxC compatible images, the timing delays present after index holes and between sectors need to be recreated and the disk data needs to be converted into an inverted serial bitstream (8E1/8N1) simulating the OSI 6850 disk hardware. Both OS65D and OS65U conversions are supported. In addition, other OS like PicoDOS should work fine as long as they stick to the general OSI disk encoding schemes. The only other detail I discovered is that the raw FM disk images used with HxC needed to be 2 sided. The 2nd side is created as blank. The resulting HFE files are at least 10x larger than the OSI disk dumps!

I have been able to test 5.25" conversions, but not 8" conversions... they may work too. Dave is working on getting a kyroflux dump of an 8" disk so we can verify timings.
One cool thing is you can mount a 8" OS65D image on a 5.25" system when you specify a bitrate that is compatible with the 5.25" hardware. (use the '-5' command-line option) Write testing on this configuration has not been done but reading seems to work fine.
Normal 5.25" disk writes do work fine, but I am still leery of rewriting a sector in the middle of a multi-sector track. Timings may have to be tweaked.

My C4PMF setup includes an inline 'D-13'-like data separator between my OSI drives and the controller, so simply plugging in a converted Gotek drive was all I needed to do to get up and running. Phil outlined the gotek conversion here: http://www.osiweb.org/osiforum/viewtopi ... =420#p2687 Once converted, I rename the files DSKA0000.HFE, DSKA0001.HFE etc.. to mount them.

Anyway it's available on the Tools page on my website http://osi.marks-lab.com the direct link is http://osi.marks-lab.com/software/files ... OSIHFE.zip
Source is included so you can change things if you need to. -oh it does compile on Mac & probably linux too without too much changing. Windowss & Mac builds are included.

WinOSI is getting native HFE file support too!

Here is the readme....
V1.0.2
OSIHFE is a Windows command-line utility used to convert between OSI Disk Dump images and HxC Floppy Emulator RAW FM disk images.


OSIHFE recognizes "OSI" HFE image files and OSI disk dump files and will convert between them.

OSIHFE restores the timing delays lost when dumping files using the OSIDump utilities.
It simulates the disk reading and writing process generating flux transitions used by the HxC Floppy Emulator. It can write both OS65D and OS65U format images. The target HFE files are created as double-sided RAW FM images which seem most compatible with HxC devices.

Usage:
OSIHFE -[bdiov5] infile [outfile]
( If [outfile] is not specified, a target file is automatically based on input filetype)
-b65D5/-b65D8/-b65U8 outfile create blank OSI HFE image of specified type
-d infile list directory contents
-i infile identify file type (OS65D5, OS65D8, OS65U)
-5 write 8" image at 5.25" bit rate to allow mounting 8" image on 5.25" system
-o overwrite existing output file

Since a target filename will be generated automatically based on input file, all you need to do is drag & drop the OSI disk image onto OSIHFE for it to generate the corresponding HFE file or vice versa. A Mac build has been provided or you can build one from included source.
-Mark
Last edited by Mark on Tue Sep 17, 2019 3:12 am, edited 2 times in total.
lowrybt1
Posts: 212
Joined: Sun Mar 08, 2015 3:42 pm
Location: New York State

Re: HxC / Gotek floppy emu working with OSI disk images

Post by lowrybt1 »

Hi Mark,

I've converted a number of images and have copied them over to an SD card that will be loaded into my HxC2001 Lotharek floppy emulator. One question before giving it a shot: 1) is there anything unique or different about the HXCSDFE CFG file when working with OSI HFE images or can I just create the CFG file using the typical settings in the HxC Floppy Emulator software?

Thanks, Tom
C8PDF w. 48K, 2x 520 24K RAM boards and Glitchworks 64K board
OSI 567 Telephony board
Spare 8" drives
Klyball D-13
Mark
Posts: 293
Joined: Tue Sep 16, 2008 6:04 am
Location: Madison, WI
Contact:

Re: Flash Floppy / Gotek floppy emu working with OSI disk images

Post by Mark »

The HXCSDFE CFG file I used was from Phil, I don't think there is anything special about it.
As far as HxC is concerned OSI images are just RAW FM floppy images.

I'll attach the one I got from Phil. (Not needed for Flash Floppy)

Cheers
Attachments
HXCSDFE.CFG.zip
HxC config file for raw FM OSI images
(724 Bytes) Downloaded 711 times
Last edited by Mark on Thu Sep 19, 2019 4:57 am, edited 1 time in total.
lowrybt1
Posts: 212
Joined: Sun Mar 08, 2015 3:42 pm
Location: New York State

Hinky C4PMF and Hxc

Post by lowrybt1 »

First, many thanks to Grant and Mark. I finally figured out how to use an oscilloscope and succeeded in calibrating my D-13. So, thanks to Grant, I now have alternatives to my two, very old MPI-B51’s and my Shugart SA400L with homemade data separator. I Tested the D-13 and my C4PDF (the 505 is configured for dual 5.25 drives) with a Panasonic JU-455-5 and everything works great.

Thanks to Mark for OSIHFE. I converted some images, loaded them onto an SDHC card and hooked up my HxC (which I’ve been using with a Sinclair QL since 2013) to the D-13.

An image of OS65DV3.3 loaded beautifully from the HxC. So did an image of Personal Disk 2. Then weird things began to happen. I tried reloading these images and they appeared corrupted, resulting in junk displayed on the monitor. Another result was that the images themselves were no longer “bootable” from the HxC. When I tried to boot from these images, the HxC would virtually seek track zero but sound/act like the track was empty.

I disconnected the HxC from the drive cable, plugged in the Panasonic JU-455-5 and everything ran great. To get the HxC and C4P to happily reload an OSI image, I needed to re-flash the HxC firmware and recreate the SD card with CFG and HFE files. And the same corrupted image thing happened after successfully test-loading a few images. I tested everything on a known working backup HxC and on other SD cards and same thing happens. So, it’s not a bad HxC, it's not a bad SD card, it’s not something with the D-13.

Trying to diagnosis this, a few possible causes come to mind but it’s all conjecture. I’m hoping others on the forum may have thoughts...

Possible source of problem #1: the 505 board has been modified to accommodate two 5.25 drives with separate drive cables for A and B. Somehow this modification creates an incompatibility with the HxC (and/or the D-13 which I’ve not modified in any way). Disabling the dual drive setting in the HxC CFG file does not resolve the issue.

Possible source of problem #2: the drive cable I’m using is creating a problem. The cable attaches to the 34 pin connector on the D-13. I’m attaching the first 34-pin IDC to the HxC taking care to ensure that the cable/pin 1 are oriented correctly. Between the D-13 and the HxC, the cable does NOT have a twist. However, further down the cable there are edge and IDC pin connectors that do have the twist (these are not attached to a drive). The HxC dip switches are set for ID0A and ID1B. I do see something not right when I first connect the HxC to C4PDF: the drive activity light on the HxC is on solid. A few images will boot fine and then, as described above, something gets corrupted.

Any thoughts will be greatly appreciated.

Tom
C8PDF w. 48K, 2x 520 24K RAM boards and Glitchworks 64K board
OSI 567 Telephony board
Spare 8" drives
Klyball D-13
Mark
Posts: 293
Joined: Tue Sep 16, 2008 6:04 am
Location: Madison, WI
Contact:

Re: Hinky C4PMF and Hxc

Post by Mark »

That is hinky. It's crazy the firmware gets corrupted.

What firmware are you running? Actually I'm using flashfloppy_v0.9.25a at the moment. Perhaps that is the difference? I'm new to the floppy emulation world and didn't realize the difference between the HxC and FlashFloppy projects since they both use the HFE data files. There may be some incompatibility that needs to be addressed.

My Gotek is connected to a 2-drive cable with a real 1/2 height DS/DD floppy at the end of the cable which has terminators installed. The Gotek is jumpered as the 1st drive. The activity light does turn off when the motor-on signal turns off -- an added hardware mod on my system.

-Mark
nama
Posts: 357
Joined: Wed Mar 30, 2011 9:44 am
Location: New Zealand
Contact:

Re: HxC / Gotek floppy emu working with OSI disk images

Post by nama »

you could try write protecting the image. This isnt a fix obviously, but my help with diagnosis

Menu 2 - 01 (see list below):
  • Current Menu and sub selection definition :

    Menu 0 - System family selection :
    00 = AUTO (DEFAULT)
    01 = Amiga
    02 = Acorn
    03 = Atari ST
    04 = IBM PC AT/XT
    05 = Camputer Lynx
    06 = Commodore 1581
    07 = Thomson
    08 = x68000
    09 = SAMCOUPE
    0A = MSX
    0B = Spectrum
    0C = Akai
    0D = Casio
    0E = Emax
    0F = Ensoniq
    10 = General Music
    11 = Korg

    Menu 1 - Interface mode :
    00 = AUTO (DEFAULT)
    01 = IBM PC DD
    02 = IBM PC HD
    03 = ATARI ST DD
    04 = ATARI ST HD
    05 = AMIGA DD
    06 = AMIGA HD
    07 = CPC DD
    08 = GENERIC SHUGART DD
    09 = IBMPC ED
    0A = MSX2 DD
    0B = C64 DD
    0C = EMU SHUGART
    0D = S950 DD
    0E = S950 HD

    Menu 2 - Write protect mode :
    00 = AUTO (DEFAULT)
    01 = Write protected.
    02 = Write enabled.

    Menu 3 - Double Step :
    00 = AUTO (DEFAULT)
    01 = Single step
    02 = Double step

    Menus 4<->E : Not currently assigned.

    Menu F - Display firmware version

2P (1mhz 32k) - 502 + 8k + CEGMON + garbage collector fix BASIC, D&N MEM-CM9 + 24k, 540 (mono) [SOLD]
4PMF (2mhz 24k) - 505, 540, 527, D13 + 5.25" + Gotek
Superboard RevD - CEGMON + 610 board 24k + D13
Spares - 3 x 527, 1 x 505, Backplane
lowrybt1
Posts: 212
Joined: Sun Mar 08, 2015 3:42 pm
Location: New York State

Re: HxC / Gotek floppy emu working with OSI disk images

Post by lowrybt1 »

Thanks for you suggestions, Mark and Phil. After additional testing, I believe the issue is either a fundamental incompatibility involving the HxC and/or an inappropriate signal being generated by the C4.

Regarding the potential incompatibility, Mark can you confirm the bitrate, sectors per track and bytes per sectors in the HFE images? I think the HxC might not accommodate 125,000 bit/sec?

Why do I think there might be a signal issue? The HxC drive activity light is on solid from the moment the C4 is powered on. That should not be, I think.

Phil, even with write protect turned on at the firmware level and/or on the SD card itself, the card (and device) get corrupted. I’m wondering if the HxC has some small bit of CMOS memory related to configuration that gets messed up.

Overall, I’m feeling really good about the D-13 being calibrated and having 4 fully-functional 5.25” drives -- but it’s inevitable that those old drives will fail. It’s very exciting to see OSD65D boot from an SD card and I know I’m close to having that sorted out. Is there a version/model of the GoTek you would recommend more than another and can you recommend a good DIY site for updating the GoTek firmware to flashfloppy?

Many thanks, Tom
C8PDF w. 48K, 2x 520 24K RAM boards and Glitchworks 64K board
OSI 567 Telephony board
Spare 8" drives
Klyball D-13
nama
Posts: 357
Joined: Wed Mar 30, 2011 9:44 am
Location: New Zealand
Contact:

Re: HxC / Gotek floppy emu working with OSI disk images

Post by nama »

Just curious what the jumper setting on your D13 are?

Philip

2P (1mhz 32k) - 502 + 8k + CEGMON + garbage collector fix BASIC, D&N MEM-CM9 + 24k, 540 (mono) [SOLD]
4PMF (2mhz 24k) - 505, 540, 527, D13 + 5.25" + Gotek
Superboard RevD - CEGMON + 610 board 24k + D13
Spares - 3 x 527, 1 x 505, Backplane
lowrybt1
Posts: 212
Joined: Sun Mar 08, 2015 3:42 pm
Location: New York State

Re: HxC / Gotek floppy emu working with OSI disk images

Post by lowrybt1 »

They are 1-2, 3-4, 7-8, 9-10, 15-16
C8PDF w. 48K, 2x 520 24K RAM boards and Glitchworks 64K board
OSI 567 Telephony board
Spare 8" drives
Klyball D-13
nama
Posts: 357
Joined: Wed Mar 30, 2011 9:44 am
Location: New Zealand
Contact:

Re: HxC / Gotek floppy emu working with OSI disk images

Post by nama »

I can't quite recall, and as I mentioned my machine is all back together at the moment, but I believe at one point I had either 10-11 or 11-12 jumper connected (can't recall which...sorry)
For me it this helped with returning the head of my 5.25" drive to tk0. Without the jumper, (again, can't recall which one) the head would chatted but not return to track 0.

Worth trying???

Phil

2P (1mhz 32k) - 502 + 8k + CEGMON + garbage collector fix BASIC, D&N MEM-CM9 + 24k, 540 (mono) [SOLD]
4PMF (2mhz 24k) - 505, 540, 527, D13 + 5.25" + Gotek
Superboard RevD - CEGMON + 610 board 24k + D13
Spares - 3 x 527, 1 x 505, Backplane
Post Reply