• fpga floppy controller??

    From Lawrence Glaister@21:1/5 to All on Fri Feb 18 15:23:05 2022
    Hi Guys, still messing around learning fpga coding.
    John, I had a question for you and I couldn't wait until the Wednesday zoom meeting...
    When designing your recent fdc boards, did you consider using the fpga directly as the controller? It seems all the disk interfaces are 5v ttl logic and that the fpga with a few level conversions, would be pretty good capturing a track of disk data into
    a fpga ram buffer for analysis. Real time performance should be better than most of the old hardware floppy controllers. I would love to hear you ideas as sd cards are cool, but nothing beats the raspy sound of drives seeking and the heads loading!.
    I don't have one of your FDC boards, but I am working on experiments with your fpga_z80 board.
    cheers
    Lawrence VE7IT
    Nanoose Bay BC, Canada

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Higgins@21:1/5 to Lawrence Glaister on Mon Feb 21 12:41:26 2022
    I expect John might have considered implementing the 2793 floppy controller into the FPGA, if an FPGA implementation of the 2793 was already available. Designing a floppy controller in VHDL from scratch would be a significant task on its own. All I have
    been able to find (on www.opencores.org) was a single listing for a floppy controller - but it seemed to be an incomplete project, and it was modelled on the 8272 floppy controller family.

    On Friday, February 18, 2022 at 3:23:07 PM UTC-8, Lawrence Glaister wrote:
    Hi Guys, still messing around learning fpga coding.
    John, I had a question for you and I couldn't wait until the Wednesday zoom meeting...
    When designing your recent fdc boards, did you consider using the fpga directly as the controller? It seems all the disk interfaces are 5v ttl logic and that the fpga with a few level conversions, would be pretty good capturing a track of disk data
    into a fpga ram buffer for analysis. Real time performance should be better than most of the old hardware floppy controllers. I would love to hear you ideas as sd cards are cool, but nothing beats the raspy sound of drives seeking and the heads loading!.
    I don't have one of your FDC boards, but I am working on experiments with your fpga_z80 board.
    cheers
    Lawrence VE7IT
    Nanoose Bay BC, Canada

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Josef Moellers@21:1/5 to Peter Higgins on Tue Feb 22 09:10:25 2022
    On 21.02.22 21:41, Peter Higgins wrote:
    I expect John might have considered implementing the 2793 floppy controller into the FPGA, if an FPGA implementation of the 2793 was already available. Designing a floppy controller in VHDL from scratch would be a significant task on its own. All I
    have been able to find (on www.opencores.org) was a single listing for a floppy controller - but it seemed to be an incomplete project, and it was modelled on the 8272 floppy controller family.

    Hm, this sounds veeery interesting to me!

    I have an SB180FX microcomputer which boots from floppy and then
    switches to the (parallel SCSI) hard disk.
    Some time back I have replaced the disk with a solid state SCSI disk
    which works fine (iirc something out of the Amiga or Atari universe).

    I'm now worried about the floppy part and I would like to replace the
    FDC (8266) AND the drive(s) with an FPGA, a microcontroller (my favorite
    is the ATMega) and an SD card. Has anyone considered this already?
    My idea is to use the FPGA only to handle the bus interface to the
    command, status and data registers, as this is time-critical, and do
    everything else in the uC, the RQM bit in the status register decoupling
    the uC from the HD64180. DMA would be handled by the uC.
    As I'm mostly running from the HD, I do not worry too much about speed
    here, but if the floppy drive(s) I have cease to work, the whole thing
    is useless.

    Josef

    PS My idea is to have drive 1 (the boot drive) "hard-wired" (in
    software) to the first 2KB of the SD card and the rest of the card
    randomly assignable to drives 2-4. That would also allow me to transfer software more easily from a Linux machine to the SB180FX.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dennis Boone@21:1/5 to All on Tue Feb 22 11:55:12 2022
    I'm now worried about the floppy part and I would like to replace the
    FDC (8266) AND the drive(s) with an FPGA, a microcontroller (my favorite
    is the ATMega) and an SD card. Has anyone considered this already?

    Any particular reason you're not just replacing the drives themselves
    with something akin to a gofloppy?

    De

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Randy McLaughlin@21:1/5 to Dennis Boone on Tue Feb 22 11:44:59 2022
    It seems a new floppy controller without new mechanical floppy drives is odd.


    Randy

    On Tuesday, February 22, 2022 at 11:55:19 AM UTC-6, Dennis Boone wrote:
    I'm now worried about the floppy part and I would like to replace the
    FDC (8266) AND the drive(s) with an FPGA, a microcontroller (my favorite
    is the ATMega) and an SD card. Has anyone considered this already?
    Any particular reason you're not just replacing the drives themselves
    with something akin to a gofloppy?

    De

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Josef Moellers@21:1/5 to Dennis Boone on Wed Feb 23 12:50:30 2022
    On 22.02.22 18:55, Dennis Boone wrote:
    > I'm now worried about the floppy part and I would like to replace the
    > FDC (8266) AND the drive(s) with an FPGA, a microcontroller (my favorite
    > is the ATMega) and an SD card. Has anyone considered this already?

    Any particular reason you're not just replacing the drives themselves
    with something akin to a gofloppy?

    I had purchased something like that but it insisted on providing 512
    byte sectors while the SB180FX likes 1024 byte sectors better.
    In fact, I never managed to get the SB180FX to talk to or otherwise
    recognize the GOTEK thingy.

    NB I also regard this project as doing something for fun and (hopefully)
    have some successes.

    Josef

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Josef Moellers@21:1/5 to Randy McLaughlin on Wed Feb 23 12:53:17 2022
    On 22.02.22 20:44, Randy McLaughlin wrote:
    It seems a new floppy controller without new mechanical floppy drives is odd.

    I'm not sure I understand what you're aiming at.

    My idea is to replace the floppy controller and everything behind it by
    the FPGA/uC/SD-Card contraption.

    Dennis suggested leaving the FDC in and just replace the mechanical
    drive with something not moving.

    Josef

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Higgins@21:1/5 to Josef Moellers on Wed Feb 23 07:44:18 2022
    Without modification the Gotek floppy emulator is designed to function as a standard PC-format 3.5" drive with 512 byte sectors, which won't work with most vintage systems like the SB180FX.
    However, with third-party firmware installed on the Gotek (either the HxC firmware, or FlashFloppy) it can be configured to emulate any of the 5.25" floppy formats supported by the SB180FX. No modification of the SB180FX hardware or software is required.
    These alternative firmware solutions for the Gotek provide for a lot of configuration options - for example I have used the Gotek and HxC firmware to emulate a 5.25" double-sided 96tpi drive on a system that creates an 800K format disk using 1024 bytes/
    sector.

    On Wednesday, February 23, 2022 at 3:50:32 AM UTC-8, Josef Moellers wrote:
    I had purchased something like that but it insisted on providing 512
    byte sectors while the SB180FX likes 1024 byte sectors better.
    In fact, I never managed to get the SB180FX to talk to or otherwise recognize the GOTEK thingy.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dennis Boone@21:1/5 to All on Wed Feb 23 10:33:25 2022
    I had purchased something like that but it insisted on providing 512
    byte sectors while the SB180FX likes 1024 byte sectors better.
    In fact, I never managed to get the SB180FX to talk to or otherwise recognize the GOTEK thingy.

    Interesting. A detail I'll have to keep in mind.

    NB I also regard this project as doing something for fun and (hopefully) have some successes.

    Always a perfectly valid reason!

    De

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Josef Moellers@21:1/5 to Peter Higgins on Mon Mar 14 13:58:59 2022
    Hello Peter,

    On 23.02.22 16:44, Peter Higgins wrote:
    Without modification the Gotek floppy emulator is designed to function as a standard PC-format 3.5" drive with 512 byte sectors, which won't work with most vintage systems like the SB180FX.
    However, with third-party firmware installed on the Gotek (either the HxC firmware, or FlashFloppy) it can be configured to emulate any of the 5.25" floppy formats supported by the SB180FX. No modification of the SB180FX hardware or software is
    required. These alternative firmware solutions for the Gotek provide for a lot of configuration options - for example I have used the Gotek and HxC firmware to emulate a 5.25" double-sided 96tpi drive on a system that creates an 800K format disk using
    1024 bytes/sector.

    I successfully (by the 3digit LED display) flashed my GoTek with
    FlashFloppy.

    However, I'm apparently having problems getting the FF.CFG, IMG.CFG, and IMAGE_A.CFG right.
    Do you have any experience and would be able to help me?
    I need an 80cyl, 2hd, 5spt, 1024bps, so I wrote this into my IMG.CFG:

    +---------
    [::819200]
    cyls = 80
    heads = 2
    secs = 5
    bps = 1024
    gap3 = 99
    +---------

    and here's my FF.CFG:

    +---------
    interface = shugart
    host = unspecified
    pin02 = auto
    pin34 = auto
    write-protect = no
    max-cyl = 255
    side-select-glitch-filter = 0
    track-change = instant
    write-drain = instant
    index-suppression = yes
    head-settle-ms = 12
    motor-delay = ignore
    chgrst = step
    ejected-on-startup = no
    image-on-startup = last
    display-probe-ms = 3000
    autoselect-file-secs = 2
    autoselect-folder-secs = 2
    folder-sort = always
    sort-priority = folders
    nav-mode = default
    nav-loop = yes
    twobutton-action = zero
    rotary = full
    indexed-prefix = "DSKA"
    display-type = auto
    oled-font = 6x13
    oled-contrast = 143
    display-order = default
    display-off-secs = 60
    display-on-activity = yes
    display-scroll-rate = 200
    display-scroll-pause = 2000
    nav-scroll-rate = 80
    nav-scroll-pause = 300
    step-volume = 10
    da-report-version = ""
    extend-image = yes
    +---------

    I have an image file BOOT.IMG which has the image of the boot floppy and IMAGE_A.CFG has only one line: "BOOT.IMG"

    When I try to read a sector off this in the monitor, I get a
    Disk R/W Error !
    Drive 0

    ST0 40 01000000
    ST1 04 00000100
    ST2 00 00000000
    Track 00 00000000
    Head 00 00000000
    Sector 11 00010001

    The "01" bits in ST0 ist the "Interrupt Code" and means "Abnormal
    Termination of Command (AT)":
    "Execution of Command was started, but was not successfully
    completed."
    The "1" bit in ST1 means "No Data" (ND):
    "During execution of READ DATA, WRITE DELETED DATA or
    SCAN Command, if the FDC cannot find the Sector specified in the
    IDR Register, this flag is set."
    (The FDC is an FDC9266)

    Any help would be appreciated,

    Josef

    On Wednesday, February 23, 2022 at 3:50:32 AM UTC-8, Josef Moellers wrote:
    I had purchased something like that but it insisted on providing 512
    byte sectors while the SB180FX likes 1024 byte sectors better.
    In fact, I never managed to get the SB180FX to talk to or otherwise
    recognize the GOTEK thingy.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Josef Moellers@21:1/5 to Josef Moellers on Tue Mar 15 10:14:13 2022
    On 14.03.22 13:58, Josef Moellers wrote:
    Hello Peter,

    On 23.02.22 16:44, Peter Higgins wrote:
    Without modification the Gotek floppy emulator is designed to function
    as a standard PC-format 3.5" drive with 512 byte sectors, which won't
    work with most vintage systems like the SB180FX.
    However, with third-party firmware installed on the Gotek (either the
    HxC firmware, or FlashFloppy) it can be configured to emulate any of
    the 5.25" floppy formats supported by the SB180FX. No modification of
    the SB180FX hardware or software is required. These alternative
    firmware solutions for the Gotek provide for a lot of configuration
    options - for example I have used the Gotek and HxC firmware to
    emulate a 5.25" double-sided 96tpi drive on a system that creates an
    800K format disk using 1024 bytes/sector.

    I successfully (by the 3digit LED display) flashed my GoTek with
    FlashFloppy.

    However, I'm apparently having problems getting the FF.CFG, IMG.CFG, and IMAGE_A.CFG right.
    Do you have any experience and would be able to help me?
    I need an 80cyl, 2hd, 5spt, 1024bps, so I wrote this into my IMG.CFG:

    +---------
    [::819200]
    cyls = 80
    heads = 2
    secs = 5
    bps = 1024
    gap3 = 99
    +---------

    Problem solved: the floppies had sector# 17 ("11H") as the first sector
    number in a track, not "1", as is the default.
    I added "id = 17" and ... voila ... it worked!

    So now my SB180FX boots from ... a USB stick, only to switch over to the (flash) HDD immediately ;-)

    Josef

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)