B-Em and econet

discuss bbc micro and electron emulators (including mame) here!
Post Reply
User avatar
Winston
Posts: 73
Joined: Tue Apr 01, 2008 3:24 pm
Location: Isle of Man
Contact:

B-Em and econet

Post by Winston »

I'm trying to get Econet working with b-em, and I'm not convinced it's working at all and I've probably fallen at the first hurdle. This is on Debian 11. What I'm trying to achieve - two or more b-em instances on the same machine being able to talk over econet.

Step 1 - git pull then checked out branch sf/econet (git branch confirms I am indeed on sf/econet)
(note, I already had the b-em source code built off master some time earlier).
Step 2 - make clean, ./configure, make
Step 3 - edit the BBC Master entry in ~/.config/b-em/b-em.cfg to add econet=true
Step 4 - add ANFS ROM to rom 03 for the same machine. My b-em.cfg reads as such for the Master:

Code: Select all

[model_10]
name=BBC Master 128 Econet
fdc=master
65c02=true
b+=false
master=true
modela=false
os01=false
compact=false
econet=true
os=mos320
cmos=cmos
tube=none
romsetup=master
rom08=vdfs
rom03=anfs425
Add econet.cfg under ~/.config/b-em - at the moment it contains just:

Code: Select all

0 254 192.168.178.25
0 250 192.168.178.25
(which I believe is net (0) station (two defined as possibly havinig this IP) and the IP of my workstation. Really I want two b-em instances on the same machine to be able to see each other on econet.)

Then run b-em. However, *NET returns "No clock" which makes me think econet support hasn't been compiled into the emulator at all. How do I check that econet support has actually been enabled? There's no option in ./configure to enable/disable it.
User avatar
Winston
Posts: 73
Joined: Tue Apr 01, 2008 3:24 pm
Location: Isle of Man
Contact:

Re: B-Em and econet

Post by Winston »

I seem to have got past the stage of econet not existing in b-em at all, but now I get:

"Econet: Failed to find free station/port to bind to"

So far my search for documentation on b-em and econet has proven fruitless, and I don't know enough about how the econet emulation works to figure it out (at least within the time I have free today) how it works from the source code.

Some information on how to get a basic Econet station running with b-em would therefore be extremely helpful!
User avatar
Winston
Posts: 73
Joined: Tue Apr 01, 2008 3:24 pm
Location: Isle of Man
Contact:

Re: B-Em and econet

Post by Winston »

Never mind, I did some more digging and got the basics working, with this config:

econet.cfg in ~/.config/b-em

Code: Select all

aunmode 0
learn 1
aunstrict 0
0 25 127.0.0.1 32768
0 254 127.0.0.1 10101
b-em is station 25, and I have aund providing the file server on station 254. There are some other frustrations with aund but these were easily overcome by modifying the source code (b-em wants to use fileserver 254 on net 192, aund only seems to care about net 0).

My intentions are to write a getting started guide, because the documentation on how to make your own virtual econet network is lamentable at the moment. Also I'll probably make a GitHub repository to modify aund with the intention of fixing the giant FIXME about station/net configuration in the source code!

(The purpose of all of this: I'm going to the Econet event at Bletchley park next month, and I would like to revive the MUD that a friend and I wrote for Econet back when we were 15 or so, on the school's econet network. The teacher who ran the computer room sent me all the discs a few years ago, and the MDFS-format floppy with all my code on was perfectly readable, but kind of useless without a working econet network. Ideally I'd like to run it on my real BBC Master, but I don't yet have enough hardware to make a physical econet network).
shifters74
Posts: 433
Joined: Mon Mar 04, 2019 9:44 am
Contact:

Re: B-Em and econet

Post by shifters74 »

Hi Winston,

If you get your MUD up and working again, could you post details of it (any maybe be a youtube demo of it!) here for interest?

cheers

Shifters
User avatar
Winston
Posts: 73
Joined: Tue Apr 01, 2008 3:24 pm
Location: Isle of Man
Contact:

Re: B-Em and econet

Post by Winston »

I'll do something! Hopefully it'll be running at the Bletchley event. I did get the server to run (although whether it actually works is a different question altogether) - this was mostly an exercise of getting stuff in the right place on the fileserver. (A complication I had when getting the data off the MDFS discs was that MDFS allowed rather more entries per directory than the ADFS target, so I had to modify the program to add more directories for the excess, but now I can merge them all back together since the files are now on my PC. The other complication is some of the machine code stuff is missing its metadata it would have had on MDFS, e.g. load and execute address).

The main complication will be that in an effort to make the client run on a model B, back in the day I used a BBC BASIC minifier, and then promptly lost the original source code. 16 year old me also did some other aggravating stuff to prevent players from listing the BBC BASIC code and cheating, which I now need to reverse! (which should be a bit easier given I can use tools on Linux to strip bits off, especially as I found the source code to the machine code header/loader I'd put on the client).
WrightStuff
Posts: 81
Joined: Fri Mar 16, 2012 1:54 pm
Location: Derby
Contact:

Re: B-Em and econet

Post by WrightStuff »

Hi Winston, I'm hoping to have something up and running MUDwise at the event. It'd be interesting to compare notes.
Tbh if my server stays up more than 5 mins without running out of memory or hitting a bug that would be an achievement :?
Which day(s) are you attending ? Cheers.
stevei2791
Posts: 92
Joined: Sat Aug 29, 2015 1:21 pm
Location: Irchester
Contact:

Re: B-Em and econet

Post by stevei2791 »

Winston wrote: Sun Apr 16, 2023 4:11 pm Never mind, I did some more digging and got the basics working, with this config:

econet.cfg in ~/.config/b-em

Code: Select all

aunmode 0
learn 1
aunstrict 0
0 25 127.0.0.1 32768
0 254 127.0.0.1 10101
b-em is station 25, and I have aund providing the file server on station 254. There are some other frustrations with aund but these were easily overcome by modifying the source code (b-em wants to use fileserver 254 on net 192, aund only seems to care about net 0).
b-em is using beebem emulation of Econet because you are using aunmode 0. The version of AUND that I know of doesn't include anything but Beebem emulation which is why aunmode 1 won't work, and so doesn't connect to the PIEconet Bridge for example. There is an assumption(might be a standard) in b-em that AUN networks start at network 128+ for emulated econets, the beebem code using another file, AUNMap.cfg that maps an ip range to a network. There is an example in the beebem source code, I don't think that b-em includes this by default.

Create a file in the b-em (config?) directory called AUNmap.cfg
add the line

Code: Select all

AddMap 127.0.0.0 0
| An entry like 'AddMap 1.0.128.0 128' will tell the software   |
| that IP address 1.0.128.x maps to AUN address 128.x.          |
Could you share the link to AUND? Are you using the original from Simon Tathan and Ben Harris?
User avatar
Winston
Posts: 73
Joined: Tue Apr 01, 2008 3:24 pm
Location: Isle of Man
Contact:

Re: B-Em and econet

Post by Winston »

WrightStuff wrote: Mon Apr 17, 2023 5:34 pm Hi Winston, I'm hoping to have something up and running MUDwise at the event. It'd be interesting to compare notes.
Tbh if my server stays up more than 5 mins without running out of memory or hitting a bug that would be an achievement :?
Which day(s) are you attending ? Cheers.
Both days I expect.

The challenge with our mud is that I did a LOT of aggravating things to stop other students fiddling with the client code and cheating, and now I'm having to unpick all these things. There's also some machine code bits, which I will have to disassemble because I don't seem to have the source code (and other machine code bits that seem to make b-em lock up hard).
User avatar
Winston
Posts: 73
Joined: Tue Apr 01, 2008 3:24 pm
Location: Isle of Man
Contact:

Re: B-Em and econet

Post by Winston »

stevei2791 wrote: Mon Apr 17, 2023 6:29 pm Could you share the link to AUND? Are you using the original from Simon Tathan and Ben Harris?
It's 1.04 off the tarball provided by sgtatham and Ben Harris.

All I've done is to modify the hard coded station number for the BeebEm stuff (there's a big FIXME saying "this should be configurable"!)
stevei2791
Posts: 92
Joined: Sat Aug 29, 2015 1:21 pm
Location: Irchester
Contact:

Re: B-Em and econet

Post by stevei2791 »

I've made some updates to the 1.04 version previously

these include
* Individual users (all under one Unix UID) with passwords and Privilege flags
* Owner permission on directories under the users URD
* Access permissions now supported
* Locked files now supported
* File Server can now be any station number not just 254
* NEWUSER command has been implemented, you can use NEWUSER user, or
NEWUSER group.user. The login directory will be created based on what
you entered. Note: You cannot have a user created with the same name
as a group.
* REMUSER command has been implemented. This does not remove the user
files or directory structure.

if you need it to be more L3 server like. https://github.com/sai2791/aund
User avatar
arg
Posts: 1289
Joined: Tue Feb 16, 2021 2:07 pm
Location: Cambridge
Contact:

Re: B-Em and econet

Post by arg »

Winston wrote: Mon Apr 17, 2023 11:05 am A complication I had when getting the data off the MDFS discs was that MDFS allowed rather more entries per directory than the ADFS target, so I had to modify the program to add more directories for the excess, but now I can merge them all back together since the files are now on my PC. The other complication is some of the machine code stuff is missing its metadata it would have had on MDFS, e.g. load and execute address).
There will be MDFSs at the event, and other fileservers that can provide the same facilities.
User avatar
Winston
Posts: 73
Joined: Tue Apr 01, 2008 3:24 pm
Location: Isle of Man
Contact:

Re: B-Em and econet

Post by Winston »

stevei2791 wrote: Wed Apr 19, 2023 12:37 pm I've made some updates to the 1.04 version previously
That will be very useful. I have some future hardware projects in mind with this too.

(Incidentally, my Dad used to live in Irchester)
User avatar
danielj
Posts: 9900
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: B-Em and econet

Post by danielj »

If you get RPCEmu working with the aun-bridge you can just drag off the MDFS onto hostfs and zip up the files, preserving load/execute addresses.
stevei2791
Posts: 92
Joined: Sat Aug 29, 2015 1:21 pm
Location: Irchester
Contact:

Re: B-Em and econet

Post by stevei2791 »

Winston wrote: Sun Apr 16, 2023 10:51 am
Then run b-em. However, *NET returns "No clock" which makes me think econet support hasn't been compiled into the emulator at all. How do I check that econet support has actually been enabled? There's no option in ./configure to enable/disable it.
I'm trying to recreate an error I found in aund with different clients and thought I would try b-em. Unfortunately I am getting the No clock message, although I am getting the correct econet station number

I get

Econet Station Number 137 No Clock and *net also gives No Clock.

I can't see a configuration switch to turn the clock on is there something I am missing?

ta
User avatar
KenLowe
Posts: 4675
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: B-Em and econet

Post by KenLowe »

Does anyone have a Windows x64 build of this Econet branch available? Preferably a version that includes the 'Integra-B: CTRL-@-BREAK is not triggering reset #210' fix:

https://github.com/stardot/b-em/issues/210

Thanks!
Post Reply

Return to “8-bit acorn emulators”