Page 1 of 3

Econet podule for RISCPC & A7000

Posted: Sat May 03, 2014 4:53 am
by IanB
I've wanted to add my two RISCPCs and an A7000+ to my Econet setup for some time but it looked like an expensive option as the Econet NICs are rare and I'd also have to get Podule Ethernet cards to replace my existing Ethernet NICs.
Over Easter, I came across this archive of a post by Theo Markettos on his website:

http://www.chiark.greenend.org.uk/~theo ... podule.txt

Which discusses the possibility of connecting a standard M128/Archimedes Econet module to the RISCPC podule bus although it was just a theory and apparently no-one including Theo himself had tried it.

I decided to give it a go and made up a podule to module adaptor using the suggested wiring.
When plugged into the podule bus this appeared with a simple podule identity of "Acorn Digital Joysticks".
This was because RISCOS was reading the first ADLC register as a simple podule identity byte which just happened to match that allocation.

The next thing was to get the Econet relocatable module patched to see if it would work with this hardware.
Fortunately the source code for Econet module is available on the RISC OS Open website so I was quickly able to determine that it already scanned for a simple podule identity but was looking for a different value to the one actually read back from my hardware.

I didn't have the RISC OS development kit so rather than build a new module, I extracted the existing Econet module from RISCOS 3.70 and patched just one byte relating to the simple podule identity. I loaded that patched module into my predesk boot folder and much to my surprise it worked first time.

However when I tried the interface in my StrongArm RISCPC it didn't work properly even though the RISCOS 3.70 module is StrongArm compliant when used with the official Econet NIC.

There was a warning on the 6854 ADLC datasheet that after writing to a register, any software must wait at least 500ns before reading a register to allow changes to propagate so I suspected that the StrongArm was so fast that it was breaking this restriction.

Although this seemed a likely cause, the official Econet NIC didn't have this problem but after looking at some photos of it on beebmaster's website I came up with a theory:

http://www.beebmaster.co.uk/Econet/RISCPCEconet.html

The ADLC requires synchronous access with a clock on its E input and there is no clock on the NIC interface so Acorn had to generate one using a 16Mhz crystal and a PLD (See above pictures). The timing of the non synchronous NIC interface then had to be stretched using the ready signal to sync it up with the new clock and the result of that whether by accident or design was that sequential access was slowed down enough to avoid breaking the 500ns limit above.

To test my theory, I patched the Econet module so that every read of the ADLC was preceeded by a dummy read of an ADLC status register which provided the necessary delay and amazingly this worked and the Econet interface is now functioning on my StrongArm RISCPC.

I'll post the patch for the Econet module in a week or so once I've done some more testing but if anyone wants to buid an interface and do some betatesting with the current version, send me a PM.

Meanwhile here are some photos of the interface and a screenshot of my StrongArm RISCPC acting as a Level 4 fileserver to my Electron and also simultaneously logged onto an A5000 fileserver both over Econet:

Re: Econet podule for RISCPC & A7000

Posted: Sat May 03, 2014 6:24 am
by Zarchos
Wow !
=D> =D> =D>
Very impressive !

Re: Econet podule for RISCPC & A7000

Posted: Sat May 03, 2014 6:37 am
by flaxcottage
Respect.

And very cool.

Re: Econet podule for RISCPC & A7000

Posted: Sat May 03, 2014 8:15 am
by steve3000
Great piece of work! And an excellent write up. =D>

This looks really useful. Real shame the sources to the module are not available on ROOLs website... It would have been nice to take a look and consider what's needed to make it RISC OS 5 (and Iyonix) compatible.

Steve

Re: Econet podule for RISCPC & A7000

Posted: Sat May 03, 2014 8:35 am
by jms2
Brilliant work! =D>

For me, the idea of installing econet inches a bit further forward....

Re: Econet podule for RISCPC & A7000

Posted: Sat May 03, 2014 12:50 pm
by paulv
Very cool. =D> =D>

Paul

Re: Econet podule for RISCPC & A7000

Posted: Sat May 03, 2014 3:50 pm
by IanB
steve3000 wrote:Real shame the sources to the module are not available on ROOLs website... It would have been nice to take a look and consider what's needed to make it RISC OS 5 (and Iyonix) compatible.

As I said in my post the sources for Econet ARE available on the ROOL site but I don't have a copy of the development system (which is not freeware) to assemble them. I don't think any work has been done on them other than a few minor tweaks so they are very close to the version shipped with RISCOS 3.70

https://www.riscosopen.org/viewer/view/ ... ng/Econet/

However I have done some further research and it looks like there is a free assembler which is compatible with the assembler used in the dev kit so this merits further investigation.

Re: Econet podule for RISCPC & A7000

Posted: Sat May 03, 2014 4:11 pm
by steve3000
IanB wrote:As I said in my post the sources for Econet ARE available on the ROOL site but I don't have a copy of the development system (which is not freeware)

Ahhh, ok (misread your original post) - that is really good to know. So this makes possible (with some work...) your econet podule adaptor on an Iyonix. :D

Re: Econet podule for RISCPC & A7000

Posted: Sat May 03, 2014 7:36 pm
by hoglet
I just stumbled across someone on eBay selling new Econet modules for £10.
http://www.ebay.co.uk/itm/Econet-Interf ... 1383829946

Almost tempted to get a couple myself. I wonder if I could adapt one for the Atom? Here's a BeebMaster picture of the original Atom Econet:
http://www.beebmaster.co.uk/Econet/AtomEconet1.html

Dave

Re: Econet podule for RISCPC & A7000

Posted: Sat May 03, 2014 7:52 pm
by flaxcottage
CJE micros stock them too. BNIB same price but post paid.

Also worth checking with Retroclinic and the BeebMaster.

Re: Econet podule for RISCPC & A7000

Posted: Sat May 03, 2014 9:48 pm
by jms2
I've just had a thought...

Looking at your nice stripboard podule card, it occurs to me that there is plenty of spare room on there. This would surely be an ideal place to mount Dan Gardner's homemade Econet clock circuit (see this thread). This would turn the risc pc into a file server and clock generator.

I know next to nothing about econet, so this is first econet-related idea I've ever had! Is it sensible?

Re: Econet podule for RISCPC & A7000

Posted: Sat May 03, 2014 10:31 pm
by IanB
hoglet wrote:I just stumbled across someone on eBay selling new Econet modules for £10
I wonder if I could adapt one for the Atom?

That ebay seller is CJE under their other company 4D. Cheaper to go direct.

Beebmaster has a picture of an Atom to econet module adaptor so it's definitely possible:
http://www.beebmaster.co.uk/AcornWorld/AcornWorld2.html
You could omit the linkblock and tristate buffer if you patched the NFS ROM to give the Atom a fixed station ID.

jms2 wrote:This would surely be an ideal place to mount Dan Gardner's homemade Econet clock circuit

Yes putting a clock on the board is a sensible idea.

Re: Econet podule for RISCPC & A7000

Posted: Mon May 05, 2014 1:24 pm
by danielj
CJE do those modules in packs of 5:
http://www.cjemicros.co.uk/micros/indiv ... CO-A40ECO5

Amazingly they seem to have gone up in price - I paid £26 2 years ago. Still good value though if you're looking at bodging econet into/onto a few things...

Ian, I'm going to try knocking one of these together over the next few weeks as I get a few moments but probably won't be in a position to test properly for a while as 1/3 of what I need to get an econet up and running is in an unidentified box somewhere...

d.

Re: Econet podule for RISCPC & A7000

Posted: Mon May 05, 2014 5:35 pm
by IanB
danielj wrote:Amazingly they seem to have gone up in price - I paid £26 2 years ago.

They went up quite recently after their availability was promoted on here. I suspect quite a few were ordered and the laws of supply and demand kicked into action...

danielj wrote:Ian, I'm going to try knocking one of these together over the next few weeks as I get a few moments but probably won't be in a position to test properly for a while

Thanks, it definitely needs some beta testing. I've already found a couple of problems:
Using the "Acorn digital joysticks" simple podule ID doesn't always work after a CTRL-BREAK because the ADLC register may have a different value compared to a power on reset. There are several ways around this, one is to build a proper podule ID into the card but that would require at least a PLD or several TTL chips and make construction without a PCB more difficult. Another way is to scan all unrecognised podule slots for the ADLC in software. For the moment I have just tweaked the software to assume that the ADLC is in podule slot 0 and that works with all types of reset but requires a different version of the module for each slot.
The other problem is that the Strong Arm version is behaving strangely at some times with network activity slowing down so there is still some investigating to do there.

The good news is that I have managed to build the ROOL econet module sources using the freeware ASASM assembler so I can try switching on all the debug features built into the source code.

Re: Econet podule for RISCPC & A7000

Posted: Tue May 06, 2014 7:54 am
by danielj
A 16v8 and a NOT or a 22v10 wouldn't be the end of the world, I guess (and not too awful to "wire in") but it does disrupt the elegance of the solution :D

d.

Re: Econet podule for RISCPC & A7000

Posted: Sat May 17, 2014 10:20 am
by IanB
danielj wrote:A 16v8 and a NOT or a 22v10 wouldn't be the end of the world, I guess (and not too awful to "wire in") but it does disrupt the elegance of the solution :D

The detection problem seems to have only occurred when I was running a buggy version of my strongarm patch. Once I got that a bit more reliable the issue seems to have disappeared although I have come up with a potential workaround: When the Econet module starts up, after successfully detecting the card it writes the podule slot to CMOS ram (which will always work on a power up). After any other sort of reset, if it can't find the podule it uses the value in the CMOS.
I've been experimenting further with the strongarm and found that if I added a NOP between every instruction in the transmit and receive sources that the resulting module worked and was more stable than my original patch. I suspect that only a few NOPs are required in a few critical areas but finding those areas takes time.

I've also been experimenting with a different way to connect the Econet module by mounting it on the rear of the backplane. I'm using a two slot backplane but it has address decoding for four slots so it's possible to make the module appear in slot 3 or 4 leaving the two normal slots available for other podules.
If you look closely at the attached photos, you can see one wire going to the podule 4 chip select line on IC1 rather than the main backplane connector.
This also provides another workaround to the above potential problem of finding the podule slot because the software can fall back to using podule 4 if detection fails.

Here's some pictures of the new mounting:

Re: Econet podule for RISCPC & A7000

Posted: Sat May 17, 2014 2:27 pm
by steve3000
IanB wrote:If you look closely at the attached photos, you can see one wire going to the podule 4 chip select line on IC1 rather than the main backplane connector.
This also provides another workaround to the above potential problem of finding the podule slot because the software can fall back to using podule 4 if detection fails.

Here's some pictures of the new mounting:

All looking very neat there, great use of the extra decoding on the 2 slot backplane! Nice work =D>

Re: Econet podule for RISCPC & A7000

Posted: Tue Jul 08, 2014 5:42 pm
by danielj
Right. *cracks knuckles*
I'm going to start building this tonight... It's going on a podule card as it's going to need to be swappable between a double and single slice machine. Also doing one for beebmaster :)

d.

Re: Econet podule for RISCPC & A7000

Posted: Sat Aug 16, 2014 9:41 am
by IanS
IanB wrote:I'll post the patch for the Econet module in a week or so once I've done some more testing but if anyone wants to buid an interface and do some betatesting with the current version, send me a PM.


Is the module available to download anywhere?

Re: Econet podule for RISCPC & A7000

Posted: Sun Aug 17, 2014 8:17 pm
by IanB
Here is a copy of the patched econet module and loader.
Extract in RISCOS to maintain filetypes and put the obey file and folder in:
$.!Boot.Choices.Boot.PreDesk.
If your Econet podule is showing up as "Acorn Digital Joysticks" when you type *PODULES then the module should load on bootup.

I haven't posted it before now as I've been trying to track down an occasional crashing problem which looks like the RMA/Heap is getting corrupted. I'm not sure if this is a compatability issue with !Internet5 or some additional timing issue but it seems to come and go depending on the order modules are loaded during bootup.

I tried patching the module in a RISCOS 3.71 image and blowing that into EPROM rather than softloading the module as that was the closest to simulating a standard 3.71 setup and so far that hasn't had the problem.

Note this version won't work on a StrongArm. I have modified the ROOL source to get it working on the StrongArm but I was hoping to track down the crash problem before releasing that.
Unfortunately I haven't had much time to work on it recently.

EDIT:
Don't use this version, a fixed version is posted on page 2

Re: Econet podule for RISCPC & A7000

Posted: Sun Aug 17, 2014 9:17 pm
by paulv
IanB wrote:I haven't posted it before now as I've been trying to track down an occasional crashing problem which looks like the RMA/Heap is getting corrupted.


What version of FPEmulator are you using?

Paul

Re: Econet podule for RISCPC & A7000

Posted: Sun Aug 17, 2014 9:31 pm
by IanS
paulv wrote:
IanB wrote:I haven't posted it before now as I've been trying to track down an occasional crashing problem which looks like the RMA/Heap is getting corrupted.


What version of FPEmulator are you using?

Paul

I've not built the hardware yet, but without the software to test it, I was reluctant to build it.
I'll post again when I've powered the risc-pc up (and swapped back to an arm 6)

Re: Econet podule for RISCPC & A7000

Posted: Sun Aug 17, 2014 10:43 pm
by IanB
paulv wrote:What version of FPEmulator are you using?
Paul

4.08 (17 Jan 1977) (1.07z) on an A7000+ with RISCOS 3.71
4.09 (25 Mar 1998) (1.07) on a RISC PC with RISCOS 4.02

Re: Econet podule for RISCPC & A7000

Posted: Sun Aug 17, 2014 10:47 pm
by richardtoohey
Maybe 1997 rather than 1977? :shock:

Re: Econet podule for RISCPC & A7000

Posted: Mon Aug 18, 2014 6:59 am
by paulv
IanB wrote:
paulv wrote:What version of FPEmulator are you using?
Paul

4.08 (17 Jan 1977) (1.07z) on an A7000+ with RISCOS 3.71
4.09 (25 Mar 1998) (1.07) on a RISC PC with RISCOS 4.02


Ok, it may well be worth upgrading that to 4.32 or above, I can't remember when the bug was introduced but it was only fixed last year. The bug in old versions of FPEmulator can cause major instability including memory corruption "Non heap block" errors and random hangs.

Paul

Re: Econet podule for RISCPC & A7000

Posted: Mon Aug 18, 2014 7:19 am
by daveejhitchins
hoglet wrote:I just stumbled across someone on eBay selling new Econet modules for £10.
http://www.ebay.co.uk/itm/Econet-Interf ... 1383829946
This e-bay seller is CJE's e-bay part of the company.

Dave H :D

Re: Econet podule for RISCPC & A7000

Posted: Mon Aug 18, 2014 8:24 am
by Prime
hoglet wrote:Almost tempted to get a couple myself. I wonder if I could adapt one for the Atom? Here's a BeebMaster picture of the original Atom Econet:
http://www.beebmaster.co.uk/Econet/AtomEconet1.html


They can deffo be used on the Atom, I know of at least two people who have done so (IanS and myself).

The disadvantage is that the Econet module and the AtoMMC both use the same connector and same address range. I did manage to solve this by changing AtoMMC to use the top half of the window af available addresses, but I was also using a custom built version of AtoMMC.

Cheers.

Phill.

Re: Econet podule for RISCPC & A7000

Posted: Sun Nov 23, 2014 8:19 am
by danielj
Ian, we just tried this (finally!) with your RiscOS module - seems to be working fine on 3.71 and an Arm710 - any ideas for rigorous tests that will see if it corrupts the heap?

Only took me from July... :?

d.

Re: Econet podule for RISCPC & A7000

Posted: Sun Nov 23, 2014 10:24 am
by Prime
Yeah I'm going to have a go at building one too just as soon as I can get a podule connector.

Should be able to test on both Strongarm and 610 as I have two CPU cards.

Cheers.

Phill.

Re: Econet podule for RISCPC & A7000

Posted: Sun Nov 23, 2014 12:37 pm
by BeebMaster
It lives! I was there and everything! Who needs tripods landing on space rocks when we can do this !
NetModPod1.jpg

NetModPod2.jpg