New hardware suggestion - Pi econet server

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
User avatar
Lardo Boffin
Posts: 1226
Joined: Thu Aug 06, 2015 6:47 am
Contact:

New hardware suggestion - Pi econet server

Post by Lardo Boffin » Fri Sep 14, 2018 7:41 am

I have just got an econet starter kit thanks to Beebmaster and have decided to nominate my Master as the server as it has a built in co-proc and ADFS CF HDD thanks to my datacentre. Hopefully I will be putting it all together over the next weeks / months as time permits.

This leads to me to two problems:-
1) No more Master. This is great for programming on with the extra RAM and slots etc.
2) I can’t leave it running for fear of burning the house down as it is over 30 years old

So my suggestion to those capable of such things is a Pi based econet server! On the assumption that an Archimedes can run an econet file server then the Pi can already emulate the Arc I believe. It also has plenty of storage space on its SD card.

*All* that leaves is some method of connecting the Pi to the econet system!

Any thoughts? Apart from stop dreaming...

Lardo
BBC model B 32k issue 4, 16k sideways RAM, Watford 12 ROM board, Viglen twin 40/80 5.25" discs, Acorn 6502 coproc
BBC model B 32k issue 7, turboMMC, Opus Challenger 3 512k, Pi 3 coproc
BBC Master, Datacentre + HDD, pi co-proc

User avatar
flaxcottage
Posts: 3193
Joined: Thu Dec 13, 2012 8:46 pm
Location: Derbyshire
Contact:

Re: New hardware suggestion - Pi econet server

Post by flaxcottage » Fri Sep 14, 2018 9:09 am

I have that dream too.

The snag is I don't have the design skills with modern electronics even to know where to begin. :(
- John
Image

User avatar
Lardo Boffin
Posts: 1226
Joined: Thu Aug 06, 2015 6:47 am
Contact:

Re: New hardware suggestion - Pi econet server

Post by Lardo Boffin » Fri Sep 14, 2018 9:41 am

Hopefully one of the hardware geniuses will pick up the challenge!
BBC model B 32k issue 4, 16k sideways RAM, Watford 12 ROM board, Viglen twin 40/80 5.25" discs, Acorn 6502 coproc
BBC model B 32k issue 7, turboMMC, Opus Challenger 3 512k, Pi 3 coproc
BBC Master, Datacentre + HDD, pi co-proc

User avatar
Elminster
Posts: 2933
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK
Contact:

Re: New hardware suggestion - Pi econet server

Post by Elminster » Fri Sep 14, 2018 9:46 am

I should think more of a software issue than hardware, as the hardware is known. You could pretty much just copy the hardware from the schematic. (You could of course simply with a CPLD, but that would require knowledge). Would be a case I guess of taking code from emulator and getting it to talk to the right pins on the GPIO.

Would also open up the possibility of an expansion using the pi to give internet access to the econet, via utp or wifi.
Last edited by Elminster on Fri Sep 14, 2018 9:47 am, edited 1 time in total.

User avatar
Lardo Boffin
Posts: 1226
Joined: Thu Aug 06, 2015 6:47 am
Contact:

Re: New hardware suggestion - Pi econet server

Post by Lardo Boffin » Fri Sep 14, 2018 9:50 am

Hopefully one of the software geniuses will take up the challenge. I class myself firmly outside of that group. :)

I had not even thought about the extra functionality it could add.
Last edited by Lardo Boffin on Fri Sep 14, 2018 9:50 am, edited 1 time in total.
BBC model B 32k issue 4, 16k sideways RAM, Watford 12 ROM board, Viglen twin 40/80 5.25" discs, Acorn 6502 coproc
BBC model B 32k issue 7, turboMMC, Opus Challenger 3 512k, Pi 3 coproc
BBC Master, Datacentre + HDD, pi co-proc

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

Re: New hardware suggestion - Pi econet server

Post by danielj » Fri Sep 14, 2018 10:00 am

It was discussed over on the ROOL forum IIRC. You'd bodge the econet module onto the raspberry PI's GPIO pins but then, as Duncan says, it's a question of writing the drivers for RISCOS so it sees it.

d.

User avatar
Elminster
Posts: 2933
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK
Contact:

Re: New hardware suggestion - Pi econet server

Post by Elminster » Fri Sep 14, 2018 10:16 am

danielj wrote:
Fri Sep 14, 2018 10:00 am
as Duncan says
Be careful endorinsing me, people migh think I know what I am talking about :)

If the code for ANFS is not already in RISCO OS on the Pi would it make any difference (i.e. be easier) to do it in RISCOS PI vs any other Pi OS? I am assuming that any of them would be quick enough and you wouldnt need to go bare metal.

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

Re: New hardware suggestion - Pi econet server

Post by danielj » Fri Sep 14, 2018 10:19 am

All the econet code is in there afaik, it's a question of "joining it up" with the hardware. c.f. https://www.riscosopen.org/forum/forums/9/topics/2627

d.

User avatar
Lardo Boffin
Posts: 1226
Joined: Thu Aug 06, 2015 6:47 am
Contact:

Re: New hardware suggestion - Pi econet server

Post by Lardo Boffin » Fri Sep 14, 2018 10:22 am

At least my suggestion is only 4 years behind the times.
BBC model B 32k issue 4, 16k sideways RAM, Watford 12 ROM board, Viglen twin 40/80 5.25" discs, Acorn 6502 coproc
BBC model B 32k issue 7, turboMMC, Opus Challenger 3 512k, Pi 3 coproc
BBC Master, Datacentre + HDD, pi co-proc

SteveBagley
Posts: 156
Joined: Sun Mar 15, 2015 8:44 pm
Contact:

Re: New hardware suggestion - Pi econet server

Post by SteveBagley » Fri Sep 14, 2018 10:57 am

I wonder if the BeagleBone Black might be a better choice than the PI to become an Econet server — it has a couple of micro controllers on board that can also communicate via shared memory with Linux running on the ARM. There is an example on the web, where Ken Shiriff used one to speak Ethernet to a Xerox Alto. I suspect it would be quite easy to take the same approach to speak Econet (if nothing else the clock speed is much lower)

http://www.righto.com/2018/01/xerox-alt ... lding.html

Steve

Prime
Posts: 2535
Joined: Sun May 31, 2009 11:52 pm
Contact:

Re: New hardware suggestion - Pi econet server

Post by Prime » Fri Sep 14, 2018 2:09 pm

I thought I remember someone had made the hardware and was working on the software (for an Econet server) for one of the ARM boards that seem to ba available now.
Could have been one of the STM32 boards, but I could be wrong.

Edit: This is what I was thinking of.....viewtopic.php?f=3&t=13940

Of course the hardware is relitively easy, just use a Master econet module and bit-bang a bus to it, using one of the ARMs that has 5V tollerent I/O (e.g. some of the Atmel & ST chips), if you pick the right pins to connect to D0..D7 you could even do byte reads / writes for speed :) Also some of the STM32 chips have an 'external bus' mode designed for interfacing to memory e.g. SRAM, that could also be used after all a master module is just memory mapped I/O.

Cheers.

Phill.
Last edited by Prime on Fri Sep 14, 2018 2:12 pm, edited 1 time in total.

Stair69
Posts: 1
Joined: Tue Nov 21, 2017 3:36 pm
Contact:

Re: New hardware suggestion - Pi econet server

Post by Stair69 » Sat Sep 15, 2018 7:33 am

I've been thinking a bit about the same thing too!

I have a question for people who've looked at it before. My first thought for doing this was to hook the Pi up to the 5 pins on the Econet jack via some level shifters and have the Pi emulate the clock etc as well as the file server. Looking at the links to past projects it seems like most people instead get an econet board and interface the Pi to that at 2MHz.

Is there a reason why connecting direct to the econet lines isn't a good way to go? I guess you don't get the collision detection that the 68B54 offers so you have to build that in software, but on the other hand the clock speed is at least an order of magnitude lower so you have more time to do everything. (In fact I was even thinking of starting with the clock running at the minimum speed for debugging which IIRC is in the single digit KHz range.)

Thanks!

User avatar
lcww1
Posts: 274
Joined: Wed Mar 15, 2017 11:16 pm
Location: Moon Base Alpha
Contact:

Re: New hardware suggestion - Pi econet server

Post by lcww1 » Sat Sep 15, 2018 10:10 am

It would be great to have an Econet interface for the Pi, or the BBB - there has been an Econet USB project on this forum in the past, but as yet it appears not to have come to fruition:

there’s this one from flynnjs -
viewtopic.php?f=3&t=6065&hilit=econet+raspberry+pi

and then there’s this project from myelin -
https://github.com/google/myelin-acorn- ... /README.md

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

Re: New hardware suggestion - Pi econet server

Post by 1024MAK » Sat Sep 15, 2018 10:14 am

Stair69 wrote:
Sat Sep 15, 2018 7:33 am
I have a question for people who've looked at it before. My first thought for doing this was to hook the Pi up to the 5 pins on the Econet jack via some level shifters and have the Pi emulate the clock etc as well as the file server. Looking at the links to past projects it seems like most people instead get an econet board and interface the Pi to that at 2MHz.

Is there a reason why connecting direct to the econet lines isn't a good way to go? I guess you don't get the collision detection that the 68B54 offers so you have to build that in software, but on the other hand the clock speed is at least an order of magnitude lower so you have more time to do everything. (In fact I was even thinking of starting with the clock running at the minimum speed for debugging which IIRC is in the single digit KHz range.)
I suspect the answer is a combination of the ease of getting a Master style econet module (the prices may have gone up recently, but they were dirt cheap about five years ago) and by using a ready made module, the level shifting, bus driver and the parallel to serial and serial to parallel data conversation is all ready done for you. So making the hardware side easy and reducing the amount of work needed in software on the Pi.

With many interfaces from CPU to the outside world, there is normally a choice between having special hardware to make the software easier and quicker and reduce the load on the CPU, or to have really simple hardware, but then have to have software that bit bashes each signal level transition on the output and watch the input for any signal level transitions.

If the CPU does not have anything better to do, bit bashing is cheaper, but if there is other work for the CPU, special hardware means the CPU can get in with it's work, and only service the special hardware when a byte has been received, or it has finished transmitting the last byte of data.

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

User avatar
Elminster
Posts: 2933
Joined: Wed Jun 20, 2012 8:09 am
Location: Essex, UK
Contact:

Re: New hardware suggestion - Pi econet server

Post by Elminster » Sat Sep 15, 2018 10:22 am

The free(wi)fi method could work. Use easy available hardware to get software sorted, then go down the custom/easier hardware and better software later.

Sounds like an interesting project although I should think would only really get used in anger at abug/RISC events or households with even more understanding partners than usual.

User avatar
helpful
Posts: 458
Joined: Tue Sep 22, 2009 12:18 pm
Location: London
Contact:

Re: New hardware suggestion - Pi econet server

Post by helpful » Sat Sep 15, 2018 9:17 pm

RISC OS Pi still has the Econet code in it and even prints "Econet hardware not found" at every boot!
RISC OS User Group Of London - http://www.rougol.jellybaby.net/
RISC OS London Show - http://www.riscoslondonshow.co.uk/

User avatar
Lardo Boffin
Posts: 1226
Joined: Thu Aug 06, 2015 6:47 am
Contact:

Re: New hardware suggestion - Pi econet server

Post by Lardo Boffin » Sun Sep 16, 2018 7:36 am

Following the famous phrase ‘if in doubt add another Pi’ could you put a Pi zero in a box with level shifters etc. and an econet connecter and use this purely to bit bang? It would take in raw econet data and convert it to something that the Pi server could use. It would also take meaningful data from the server and convert it back to raw econet.
BBC model B 32k issue 4, 16k sideways RAM, Watford 12 ROM board, Viglen twin 40/80 5.25" discs, Acorn 6502 coproc
BBC model B 32k issue 7, turboMMC, Opus Challenger 3 512k, Pi 3 coproc
BBC Master, Datacentre + HDD, pi co-proc

philb
Posts: 144
Joined: Sat Aug 05, 2017 6:05 pm
Contact:

Re: New hardware suggestion - Pi econet server

Post by philb » Sun Sep 16, 2018 10:31 am

Stair69 wrote:
Sat Sep 15, 2018 7:33 am
I have a question for people who've looked at it before. My first thought for doing this was to hook the Pi up to the 5 pins on the Econet jack via some level shifters and have the Pi emulate the clock etc as well as the file server. Looking at the links to past projects it seems like most people instead get an econet board and interface the Pi to that at 2MHz.

Is there a reason why connecting direct to the econet lines isn't a good way to go? I guess you don't get the collision detection that the 68B54 offers so you have to build that in software, but on the other hand the clock speed is at least an order of magnitude lower so you have more time to do everything. (In fact I was even thinking of starting with the clock running at the minimum speed for debugging which IIRC is in the single digit KHz range.)
I think it's mostly because the Master module takes care of all the analogue bits for you, including as you say collision detect (though this isn't actually done by the 68B54, there is external circuitry on the module for that) so in some senses it saves a bit of hassle. But actually, the 68B54 is slightly annoying to interface to modern microcontrollers, and the Master modules aren't as readily available as they used to be, so I think that advantage is fading slightly.

It's certainly possible to make an Econet interface that doesn't use a 68B54. There were several products back in the day that used a Z80 SIO instead, and nowadays as you say it'd be perfectly viable to use something else to do the synchronous serial interfacing. I have a half-done design using an Atmel microcontroller and a CPLD lying around somewhere which I keep meaning to finish off.

If your device is going to be generating the clock as well then that certainly would make it easier to bit-bang the data. Of course that way you could only have one of them on a network, but still.

User avatar
sydney
Posts: 2218
Joined: Wed May 18, 2005 9:09 am
Location: Newcastle upon Tyne
Contact:

Re: New hardware suggestion - Pi econet server

Post by sydney » Sun Sep 16, 2018 8:20 pm

Could this Arduino filestore be a good start?
viewtopic.php?f=3&t=13940&hilit=Econet+microcontroller

awilliams
Posts: 9
Joined: Sun Feb 22, 2015 10:51 am
Contact:

Re: New hardware suggestion - Pi econet server

Post by awilliams » Mon Sep 17, 2018 12:24 am

I have been thinking about this topic recently too.

I started thinking about using CPLD to try to pre/post process the Econet bit steam into SPI by adding the zero insertions/removal and flag detection. There are some cheap Xilinx boards on ebay intended for xbox chipping that looks like easy to solder targets for this. But I think I found difficulties going this way.

I looked for bigger PLDs and came across TinyFPGA I have AX and BX now. A USB interfaced SDLC would be a start but there is a project on the BX which implements an Apple 1. So this made me think that since the main difficulty with Econet is in implementing the protocol correctly if you start with a 6502 core and add an ADLC and USB DMA you can effectively build the modern version of the Ecolink card. I am thinking the 6502 code from that would make a good starting point, though it would need to be patched for the changes to broadcasts that came with RISC OS Econet.

Having thought that though I started to think why not (possibly needing a bigger FPGA) do a 6502 core + ADLC and run the filestore code. Filestore MOS could map the osword 72 to an SD card for media access.

Before I started to contemplate the FPGA Filestore was intending the hardware to interface to a pi via USB.
It strikes me as being possibly simpler to try to drive a usb econet interface from Linux than try to integrate it properly into the RISC OS Econet stack which tends to be monolithic. (I think they took the all the Acorn socket stuff out of the linux kernel somewhere between version 2.xx and 3.xx which might yet turn out to be a pity)

Available server software may affect the OS. If its RISC OS !awSever probably works since I wrote it in Basic. I don't know if the compiled Level4 server would run on a pi. For linux there is AUND but I think that is for serving RISC OS clients as it didn't ever expect 6502 clients to be able to connect to it. I started a another NeFSFS which I intended to be portable C, (this was at the time when portable to Netware sounded like a good idea) I only ever worked on the RISC OS version though. This has never seen the light of day but I would dig it out if anybody was interested.

It would probably be a good idea for any such hardware to also include a clock generator and active termination. (Avoid the non stacking Filestore circuit for ideas on this they got the clock pins reversed).

Having said all that A Ethernet to Econet bridge might also prove to be a solutions, Phil Blundall did one taking an ADF10 module in 2005.

I am not sure if I will get far with this, time being the main enemy, zero skill with FPGA coming second, and no actual purpose comes a close third.

Alan

johnkenyon
Posts: 167
Joined: Wed Jul 20, 2011 2:21 pm
Location: Coventry
Contact:

Re: New hardware suggestion - Pi econet server

Post by johnkenyon » Mon Sep 17, 2018 10:42 am

Lardo Boffin wrote:
Sun Sep 16, 2018 7:36 am
Following the famous phrase ‘if in doubt add another Pi’ could you put a Pi zero in a box with level shifters etc. and an econet connecter and use this purely to bit bang? It would take in raw econet data and convert it to something that the Pi server could use. It would also take meaningful data from the server and convert it back to raw econet.
I would suggest taking the circuit diagram for the Master Econet module, and replacing the ADLC with a bit banging Pi Zero.
That would require 3 inputs: clock, data in, "clock present", and two outputs: Data out, and transmit driver enable.

The next issue is, "how much processing should the module do?", I suspect that using a Pi Zero to simply replace an ADLC would be a waste of CPU.

/John

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

Re: New hardware suggestion - Pi econet server

Post by 1024MAK » Mon Sep 17, 2018 12:57 pm

Lardo Boffin wrote:
Sun Sep 16, 2018 7:36 am
Following the famous phrase ‘if in doubt add another Pi’ could you put a Pi zero in a box with level shifters etc. and an econet connecter and use this purely to bit bang? It would take in raw econet data and convert it to something that the Pi server could use. It would also take meaningful data from the server and convert it back to raw econet.
A suitable microcontroller would be a better (and cheaper) choice rather than a PI Zero.

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

User avatar
flynnjs
Posts: 798
Joined: Tue Jul 06, 2010 9:33 pm
Contact:

Re: New hardware suggestion - Pi econet server

Post by flynnjs » Mon Sep 17, 2018 6:54 pm

lcww1 wrote:
Sat Sep 15, 2018 10:10 am
there’s this one from flynnjs -
The USB Econet dongle works. But there's been lack of enthusiasm to finish
the host software. We have something mostly working on Linux+Windows
but none of those involved would attempt anything on riscos.

I could make dongles available to anyone willing to commit to doing
something on the host software side.

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

Re: New hardware suggestion - Pi econet server

Post by danielj » Mon Sep 17, 2018 7:52 pm

What's left on the host side?
Last edited by danielj on Mon Sep 17, 2018 7:53 pm, edited 1 time in total.

User avatar
flynnjs
Posts: 798
Joined: Tue Jul 06, 2010 9:33 pm
Contact:

Re: New hardware suggestion - Pi econet server

Post by flynnjs » Mon Sep 17, 2018 8:07 pm

Not alot, we have all the USB stuff working and some socketry stuff going on
for the the AUN side. Just needs some state tracking and some header addition
and stripping when passing between each side.

There are a couple of threads going as libusb receive is a bit weird: if you
receive in timeout mode and you're half way through receiving a USB frame
it times out and gives you a partial frame, not ideal. So we had to run in
blocking mode and therefore run other stuff in another thread.

The code compiles under Linux and MinGW so far and at last test the USB
stuff also worked under MacOS but we might have broken something else
as we've not tried it for ages.

philb
Posts: 144
Joined: Sat Aug 05, 2017 6:05 pm
Contact:

Re: New hardware suggestion - Pi econet server

Post by philb » Mon Sep 17, 2018 8:38 pm

1024MAK wrote:
Mon Sep 17, 2018 12:57 pm
A suitable microcontroller would be a better (and cheaper) choice rather than a PI Zero.
Right, agreed. The design that I just exhumed from my hard disk has an ATSAME53 doing most of the work and a Lattice iCE40 in front of it. Originally I think the micro was going to be a SAMS70 but the E53 seemed like a better bet in the end.

I will see if I can actually get some of those built... !

philb
Posts: 144
Joined: Sat Aug 05, 2017 6:05 pm
Contact:

Re: New hardware suggestion - Pi econet server

Post by philb » Mon Sep 17, 2018 8:42 pm

awilliams wrote:
Mon Sep 17, 2018 12:24 am
Having said all that A Ethernet to Econet bridge might also prove to be a solutions, Phil Blundall did one taking an ADF10 module in 2005.
Yes. Gosh, that was a long time ago.

awilliams
Posts: 9
Joined: Sun Feb 22, 2015 10:51 am
Contact:

Re: New hardware suggestion - Pi econet server

Post by awilliams » Wed Sep 19, 2018 12:11 am

johnkenyon wrote:
Mon Sep 17, 2018 10:42 am
I would suggest taking the circuit diagram for the Master Econet module, and replacing the ADLC with a bit banging Pi Zero.
That would require 3 inputs: clock, data in, "clock present", and two outputs: Data out, and transmit driver enable.
There is a lot of circuitry relating to collision detection on an Econet module. On a quiet Econet of maybe two machines I recon that can all be dispensed with and a couple of single chip RS 485 line driver/receivers would do.
Alan

philb
Posts: 144
Joined: Sat Aug 05, 2017 6:05 pm
Contact:

Re: New hardware suggestion - Pi econet server

Post by philb » Wed Sep 19, 2018 11:35 am

awilliams wrote:
Wed Sep 19, 2018 12:11 am
There is a lot of circuitry relating to collision detection on an Econet module. On a quiet Econet of maybe two machines I recon that can all be dispensed with and a couple of single chip RS 485 line driver/receivers would do.
I think you're probably right that collision detect is not strictly necessary on a quietish network, though describing it as "a lot" of circuitry is maybe over-egging the pudding. It's basically one extra chip and about eight passive components so personally I would leave it on.

johnkenyon
Posts: 167
Joined: Wed Jul 20, 2011 2:21 pm
Location: Coventry
Contact:

Re: New hardware suggestion - Pi econet server

Post by johnkenyon » Wed Sep 19, 2018 2:37 pm

awilliams wrote:
Wed Sep 19, 2018 12:11 am
johnkenyon wrote:
Mon Sep 17, 2018 10:42 am
I would suggest taking the circuit diagram for the Master Econet module, and replacing the ADLC with a bit banging Pi Zero.
That would require 3 inputs: clock, data in, "clock present", and two outputs: Data out, and transmit driver enable.
There is a lot of circuitry relating to collision detection on an Econet module. On a quiet Econet of maybe two machines I recon that can all be dispensed with and a couple of single chip RS 485 line driver/receivers would do.
Alan
The collision detect circuit uses half a LM319 - you need the other half to handle the incoming clock and received data, so there's no additional silicon required there. If you don't have explicit detection of a collision, then you have to detect collisions by implication - e.g. timeout waiting for an acknowledgement, and even then you don't know if the timeout occurred because of a collision or the far end being to busy.

The "clock present" detection is a definite candidate for deletion - I can't see much difficulty using software to emulate this function.

Post Reply