Pi and the Floppy Disc?

for all subjects/topics not covered by the other forum categories
alex_farlie
Posts: 35
Joined: Sun Jul 07, 2013 9:46 pm

Pi and the Floppy Disc?

Postby alex_farlie » Sat Sep 30, 2017 8:47 pm

I have some old BBC/ARC discs...

I'd like to read these on a PI under RISC OS 5.

Had anyone implemented an OLD-drive (in my instance 3.5" and 5.25" to Pi interface board that would let me drive an old style disc/drive from an RpI Model B. I am strongly thinking that some kind of FPGA will be involved, to essentially in circuit emulate an old style disc controller (and there is a WD1772 implementation somewhere on the net)+ buffered serial over a GPIO pin.

On the software side, there would need to be some kind of !DinoFS to access the discs, and potentially image them.
(Read only is what I was needing, but if it could be two way even better.)

There used to be an Amiga board called a Catweasel, but it doesn't seem to be on sale currently.

User avatar
danielj
Posts: 5114
Joined: Thu Oct 02, 2008 4:51 pm
Location: Manchester

Re: Pi and the Floppy Disc?

Postby danielj » Sat Sep 30, 2017 8:56 pm

No, alas not :(

Best options: BBC with 1770 controller and datacentre, Archimedes or RiscPC networked, PC with on board floppy controller that can run omniflop. Beyond that, something like a kryoflux:
https://kryoflux.com/

d.

User avatar
jgharston
Posts: 2658
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield

Re: Pi and the Floppy Disc?

Postby jgharston » Sun Oct 01, 2017 1:14 am

alex_farlie wrote:I have some old BBC/ARC discs...
I'd like to read these on a PI under RISC OS 5.

ADFS is built into RISC OS, and !DFS (filing system) and !ImageDFS (desktop file extractor) is available from various places.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

steve3000
Posts: 1689
Joined: Sun Nov 25, 2012 12:43 am

Re: Pi and the Floppy Disc?

Postby steve3000 » Sun Oct 01, 2017 7:54 am

jgharston wrote:ADFS is built into RISC OS

Not on all RISC OS 5 builds. There's no floppy disc hardware on the Pi, so ADFS isn't present on the Pi builds (or it may be present but dormant?), either way it uses SDFS for the SD card.
alex_farlie wrote:Had anyone implemented an OLD-drive (in my instance 3.5" and 5.25" to Pi interface board that would let me drive an old style disc/drive from an RpI Model B. I am strongly thinking that some kind of FPGA will be involved, to essentially in circuit emulate an old style disc controller (and there is a WD1772 implementation somewhere on the net)+ buffered serial over a GPIO pin.

I thought about this some time ago, and started sketching out plans to hack together an actual WD1772 based interface (since I had a 1772 chip spare - and I think they can be picked up fairly easily too?) with access by the GPIO pins.

Never made it into reality though as I ran out of time :(, but my hope was then to find and patch an old version of the 1772 ADFS source code (if it was available) to access the interface via the GPIO pins, and load at boot up of the Pi...

alex_farlie
Posts: 35
Joined: Sun Jul 07, 2013 9:46 pm

Re: Pi and the Floppy Disc?

Postby alex_farlie » Sun Oct 01, 2017 3:37 pm

steve3000 wrote:
jgharston wrote:ADFS is built into RISC OS

Not on all RISC OS 5 builds. There's no floppy disc hardware on the Pi, so ADFS isn't present on the Pi builds (or it may be present but dormant?), either way it uses SDFS for the SD card.
alex_farlie wrote:Had anyone implemented an OLD-drive (in my instance 3.5" and 5.25" to Pi interface board that would let me drive an old style disc/drive from an RpI Model B. I am strongly thinking that some kind of FPGA will be involved, to essentially in circuit emulate an old style disc controller (and there is a WD1772 implementation somewhere on the net)+ buffered serial over a GPIO pin.

I thought about this some time ago, and started sketching out plans to hack together an actual WD1772 based interface (since I had a 1772 chip spare - and I think they can be picked up fairly easily too?) with access by the GPIO pins.


Modern nominal USB floppy drives can't do anything other than DOS formats.. which whilst understandable is somewhat annoying.

What ADFS/Filecore would see for a {Pi Floppy) is essentialy a block device accessed over a serial line. You send a command to the 'drive interface' and you get back a bit-stream representing a file, directory etc...

This would need some FPGA I think?

steve3000
Posts: 1689
Joined: Sun Nov 25, 2012 12:43 am

Re: Pi and the Floppy Disc?

Postby steve3000 » Sun Oct 01, 2017 5:36 pm

alex_farlie wrote:Modern nominal USB floppy drives can't do anything other than DOS formats.. which whilst understandable is somewhat annoying.

What ADFS/Filecore would see for a {Pi Floppy) is essentialy a block device accessed over a serial line. You send a command to the 'drive interface' and you get back a bit-stream representing a file, directory etc...

This would need some FPGA I think?

Yes, or as I suggest, a custom wd1772 interface hanging off the gpio pins. So we're saying the same thing. A custom version of ADFS would then be needed to make use of the interface, which shouldn't be too difficult providing the source to the 1772 ADFS is available (and I don't know if this is, but I remember reading that someone had added HD support to it, to work with a clock-doubled 1772, so possibly...?).

ADFS is not used for USB floppy access on the Pi, as you said, it's the USB block filesystem which allows access to USB floppy drives on the Pi, effectively treating the floppy as a very very small USB data stick! In my experience this doesn't work with all USB floppy drives either, so even accessing DOS discs is a challenge.

alex_farlie
Posts: 35
Joined: Sun Jul 07, 2013 9:46 pm

Re: Pi and the Floppy Disc?

Postby alex_farlie » Sun Oct 01, 2017 7:02 pm

steve3000 wrote:
alex_farlie wrote:Modern nominal USB floppy drives can't do anything other than DOS formats.. which whilst understandable is somewhat annoying.

What ADFS/Filecore would see for a {Pi Floppy) is essentialy a block device accessed over a serial line. You send a command to the 'drive interface' and you get back a bit-stream representing a file, directory etc...

This would need some FPGA I think?

Yes, or as I suggest, a custom wd1772 interface hanging off the gpio pins. So we're saying the same thing. A custom version of ADFS would then be needed to make use of the interface, which shouldn't be too difficult providing the source to the 1772 ADFS is available (and I don't know if this is, but I remember reading that someone had added HD support to it, to work with a clock-doubled 1772, so possibly...?).


The ADFS source exists for RISC OS Open (albiet shared source)... and there certainly used to be really ancient driver in the arm Linux kernel repository. Arguably what would be written here isn't ADFS as such but the lower level "media access" parameters Filecore calls? (Kind of like the Floppy.sys/FDC.sys split in Windows NT.)
(I can't find my PRM copies right now, so not sure how it used to work in RISC OS ver<=3 )


steve3000 wrote:ADFS is not used for USB floppy access on the Pi, as you said, it's the USB block filesystem which allows access to USB floppy drives on the Pi, effectively treating the floppy as a very very small USB data stick! In my experience this doesn't work with all USB floppy drives either, so even accessing DOS discs is a challenge.


How much of a the other portions of a BBC Micro would you need to implement on FPGA to have a semi-intelligent driver board, that could be communciated via I2C or GPIO pins.... ( Does the PI even have 5 spare GPIO lines?)

sirbod
Posts: 608
Joined: Mon Apr 09, 2012 8:44 am
Location: Essex
Contact:

Re: Pi and the Floppy Disc?

Postby sirbod » Mon Oct 02, 2017 3:35 am

This might be easier to implement that you'd imagine, you literally just pass FileCore_DiscOp/MiscOp calls through to the 1772 and read the responses for the most part.

As pointed out, the Pi build doesn't contain ADFS, but you can either use the ADFS source to build it (or copy from the Iyonix build) and implement the relevant HAL interface. Alternatively take the stub ADFS Module from the ADFFS source and replace the FileCore upcalls with direct reads/writes to the 1772.

My memory is a little hazy on the 1772 itself, but I thinks it only uses one or two bytes of memory to interface so bit-banging GPIO could possibly work.

User avatar
1024MAK
Posts: 6669
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...

Re: Pi and the Floppy Disc?

Postby 1024MAK » Mon Oct 02, 2017 6:51 am

Jean Louis-Guerin (DrCoolZic), a member of the Atari ST community has this very useful document about the WD1772 on his web site :wink:.

Mark
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

User avatar
jonb
Posts: 2041
Joined: Sat May 21, 2011 12:42 pm
Location: South Coast of England

Re: Pi and the Floppy Disc?

Postby jonb » Mon Oct 02, 2017 10:59 am

alex_farlie wrote:Modern nominal USB floppy drives can't do anything other than DOS formats.. which whilst understandable is somewhat annoying.


Mostly true - but not entirely. For example, I had success with a Dell slot-in laptop drive over USB and OmniFlop. One of these I believe:

http://www.ebay.co.uk/itm/162692978009

Cheap as chips, too.

It has some sort of bus connector that engages when slotted into the Dell's drive bay, but also (on one side at the rear corner) a USB B socket so it can be used outside the laptop when the slot is already in use. I pulled the drive mechanism and USB interface out of the odd shaped case and fitted it into a slim line case that formerly contained one of those DOS-formatter only drives.

User avatar
geraldholdsworth
Posts: 293
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Pi and the Floppy Disc?

Postby geraldholdsworth » Mon Oct 02, 2017 1:01 pm

I have a friend who has designed and built an interface board to connect a BBC floppy direct to a Pi. He has also written the software for it too, but AFAIK, only for Linux:
https://github.com/picosonic/bbc-fdc
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk

crj
Posts: 123
Joined: Thu May 02, 2013 4:58 pm

Re: Pi and the Floppy Disc?

Postby crj » Mon Oct 02, 2017 2:51 pm

Are they for sale? I'd buy one!

alex_farlie
Posts: 35
Joined: Sun Jul 07, 2013 9:46 pm

Re: Pi and the Floppy Disc?

Postby alex_farlie » Mon Oct 02, 2017 3:05 pm

geraldholdsworth wrote:I have a friend who has designed and built an interface board to connect a BBC floppy direct to a Pi. He has also written the software for it too, but AFAIK, only for Linux:
https://github.com/picosonic/bbc-fdc


Hmm, looks more like a Kyroflux device than a 2-way interface but it's a start :).

Thanks, for mentioning this. Anyone able to take it further?

User avatar
geraldholdsworth
Posts: 293
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Pi and the Floppy Disc?

Postby geraldholdsworth » Mon Oct 02, 2017 3:20 pm

crj wrote:Are they for sale? I'd buy one!

I'm sure if there was enough interest, he'd happily get some more boards made. Not sure on costs though - but that probably depends on demand.
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk

User avatar
jgharston
Posts: 2658
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield

Re: Pi and the Floppy Disc?

Postby jgharston » Mon Oct 02, 2017 4:13 pm

sirbod wrote:As pointed out, the Pi build doesn't contain ADFS, ....

I'm fairly certain the build does contain ADFS, but - as with anything dependent on hardware being present - disables itself when it finds no hardware present.

Also remember that it is FileCore that actually implements ADFS-like filing systems. ADFS provides the device drivers, so you can implement an ADFS-like filing system without writing a filing system, just by writing the device drivers and responding to FileCore.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

sirbod
Posts: 608
Joined: Mon Apr 09, 2012 8:44 am
Location: Essex
Contact:

Re: Pi and the Floppy Disc?

Postby sirbod » Mon Oct 02, 2017 8:05 pm

jgharston wrote:I'm fairly certain the build does contain ADFS, but - as with anything dependent on hardware being present - disables itself when it finds no hardware present.

It's not included in the build as it requires a 1772 FDC which the Pi obviously doesn't and can't have.
jgharston wrote:Also remember that it is FileCore that actually implements ADFS-like filing systems. ADFS provides the device drivers, so you can implement an ADFS-like filing system without writing a filing system, just by writing the device drivers and responding to FileCore.

Correct, it just needs an replacement ADFS. ADFFS works in this way on a Pi, by providing the missing ADFS Module so pass-thru FileCore calls can be trapped and responded too as if a 1772 were present.

steve3000
Posts: 1689
Joined: Sun Nov 25, 2012 12:43 am

Re: Pi and the Floppy Disc?

Postby steve3000 » Mon Oct 02, 2017 8:40 pm

geraldholdsworth wrote:
crj wrote:Are they for sale? I'd buy one!

I'm sure if there was enough interest, he'd happily get some more boards made. Not sure on costs though - but that probably depends on demand.

Likewise, I'd snap one up if available :)

If I have time, I'd happily have a go at writing a RISC OS driver for this too, although that'd have to be after Christmas...

User avatar
geraldholdsworth
Posts: 293
Joined: Tue Nov 04, 2014 9:42 pm
Location: Inverness, Scotland
Contact:

Re: Pi and the Floppy Disc?

Postby geraldholdsworth » Tue Oct 03, 2017 7:31 pm

steve3000 wrote:
crj wrote:Are they for sale? I'd buy one!

Likewise, I'd snap one up if available :)

Jasper has just emailed me back - he still has 8 boards available, unpopulated. He doesn't have enough spare time to build them, but is willing to let the boards go for cost, which is "about £2 plus postage".

Anyone who is interested, PM me and I'll put you in touch with Jasper.

He has just written a driver to read C64 discs and output a D64 image file. All source is/will be made available at his github page.
Gerald Holdsworth
Repton Resource Page
www.reptonresourcepage.co.uk


Return to “off-topic”

Who is online

Users browsing this forum: No registered users and 6 guests