Elite over Econet (BBC Master, 6502SP, BBC Micro)

reminisce about classic bbc micro and acorn electron games here
Related forum: adventures


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

Re: Elite over Econet (BBC Master, 6502SP, BBC Micro with SRAM)

Post by KenLowe »

Unfortunately no difference, but thanks for trying.
User avatar
MarkMoxon
Posts: 606
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Elite over Econet (BBC Master, 6502SP, BBC Micro with SRAM)

Post by MarkMoxon »

KenLowe wrote: Tue Apr 16, 2024 4:17 pm Unfortunately no difference, but thanks for trying.
Rats, never mind. Not sure I know how to fix this one, I'm afraid. If anyone has any ideas, I'm open to suggestions!

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

Re: Elite over Econet (BBC Master, 6502SP, BBC Micro with SRAM)

Post by KenLowe »

If it helps at all, this is what I see on the PiFS with OSMODE set to 0:

Code: Select all

[+      62.696999] tid    5773 FS      :                              from   0.103 Login as ELITE     , index 0, id 9, disc 0, URD $.GAMES.ELITE, CWD $.GAMES.ELITE, LIB $.Library, priv 0x01
[+      69.744003] tid    5773 FS      :                              from   0.103 RUN ELITEB
[+      69.815002] tid    5773 FS      :                              from   0.103 DIR $.Games.Elite
[+      69.838997] tid    5773 FS      :                              from   0.103 RUN ELTSC
[+      70.164001] tid    5773 FS      :                              from   0.103 LOAD ELTMN
[+      70.394997] tid    5773 FS      :                              from   0.103 LOAD ELTRM
[+      71.177002] tid    5773 FS      :                              from   0.103 RUN ELTIN
[+      72.514000] tid    5773 FS      :                              from   0.103 LOAD ELTTC
[+      74.208000] tid    5773 FS      :                              from   0.103 DIR
[+      74.232002] tid    5773 FS      :                              from   0.103 DIR ELITE
[+      82.513000] tid    5773 FS      :                              from   0.103 RUN EliteB
[+      82.602997] tid    5773 FS      :                              from   0.103 DIR $.Games.Elite
[+      82.622002] tid    5773 FS      :                              from   0.103 RUN ELTDC
[+      84.019997] tid    5773 FS      :                              from   0.103 DIR
[+      84.053001] tid    5773 FS      :                              from   0.103 DIR ELITE
With OSMODE set to non zero value:

Code: Select all

[+       6.200000] tid    5773 FS      :                              from   0.103 Login as ELITE     , index 0, id 9, disc 0, URD $.GAMES.ELITE, CWD $.GAMES.ELITE, LIB $.Library, priv 0x01
[+      16.142000] tid    5773 FS      :                              from   0.103 RUN ELITEB
[+      16.216999] tid    5773 FS      :                              from   0.103 DIR $.Games.Elite
[+      16.252001] tid    5773 FS      :                              from   0.103 RUN ELTSC
[+      16.742001] tid    5773 FS      :                              from   0.103 LOAD ELTMN
[+      16.974001] tid    5773 FS      :                              from   0.103 LOAD ELTRM
[+      17.740000] tid    5773 FS      :                              from   0.103 RUN ELTIN
[+      19.066999] tid    5773 FS      :                              from   0.103 LOAD ELTTC
[+      20.774000] tid    5773 FS      :                              from   0.103 DIR
[+      20.790001] tid    5773 FS      :                              from   0.103 DIR ELITE
...and it gets stuck at that point. It doesn't get as far as re-running EliteB.

I tried to look at the code, but I got a bit confused about the whole git structure!

I notice that you fixed the headers, which really confused me earlier. There are still some references to EliteSP in the EliteB file, though:

https://github.com/markmoxon/elite-over ... sc.asm#L23
https://github.com/markmoxon/elite-over ... c.asm#L439
User avatar
MarkMoxon
Posts: 606
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Elite over Econet (BBC Master, 6502SP, BBC Micro with SRAM)

Post by MarkMoxon »

KenLowe wrote: Tue Apr 16, 2024 5:32 pm If it helps at all, this is what I see on the PiFS with OSMODE set to 0:

<snip>

...and it gets stuck at that point. It doesn't get as far as re-running EliteB.
So the docked code is definitely crashing before it can run the *EliteB D command. Interesting. I suspect that shadow memory is enabled somehow and that's breaking things (though the code I added in the last test was supposed to disable shadow memory, so it might not be that).

My next step is to get a proper emulated network set up, with B+ and Integra clients, so I can test them all. I have a BBC Micro and a BBC Master, both with co-pros, on my real network, so I know they all work, but I'm going to have to emulate the rest. It gives me a reason to finally get to grips with Econet in BeebEm!

Given that the SRAM version works, it shouldn't be difficult to fix it on Integra/B+, once I have a test environment. It's on the list...
KenLowe wrote: Tue Apr 16, 2024 5:32 pm I tried to look at the code, but I got a bit confused about the whole git structure!
I am planning to document how that works at some point, but essentially the game code gets pulled in from the econet branches of the relevant game repositories, using git submodules (so the game code comes from disc-elite-beebasm in the case of EliteB). It's a bit of a dark art, but it works well.
KenLowe wrote: Tue Apr 16, 2024 5:32 pm I notice that you fixed the headers, which really confused me earlier. There are still some references to EliteSP in the EliteB file, though:
Excellent, thank you, I've fixed them. I am sure there will be plenty of other typos in there... :-)

Thanks again for all the feedback. It's so useful!

Mark
User avatar
MarkMoxon
Posts: 606
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Elite over Econet (BBC Master, 6502SP, BBC Micro)

Post by MarkMoxon »

I've released a new version of Elite over Econet that works on the unexpanded BBC Micro. I've had to remove the docking sequence and planetary details (i.e. craters, equators and meridians), but it's still Elite, and it means that all 8-bit BBC machines can now load Elite over Econet.

Downloads and details can be found here:

https://www.bbcelite.com/hacks/elite_ov ... loads.html

Note that the deployment process, filenames and directory structure has changed in this version, so it's probably best to remove any old versions before installing the new one. If you want to install the game to a different location, that's still possible by editing the same files, but note that these files have been updated, so you'll have to edit the loader files again.

I've also added multiplayer scoreboards, but that feature feels like it deserves its own thread.

Mark
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Elite over Econet (BBC Master, 6502SP, BBC Micro)

Post by lovebug »

Now that elite is working on econet how about modding it to become a multiplayer game :shock:
Image Image Image Image
User avatar
MarkMoxon
Posts: 606
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Elite over Econet (BBC Master, 6502SP, BBC Micro)

Post by MarkMoxon »

lovebug wrote: Thu May 02, 2024 12:04 am Now that elite is working on econet how about modding it to become a multiplayer game :shock:
You mean like this? :-)

(Well, it's kind of multiplayer, anyway...)

Mark
User avatar
MarkMoxon
Posts: 606
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Elite over Econet (BBC Master, 6502SP, BBC Micro with SRAM)

Post by MarkMoxon »

Hi Ken.
KenLowe wrote: Tue Apr 16, 2024 3:19 pm The only outstanding issue I have now is that the game hangs of F10 / f0 when I try to load with my IntegraB board set to the default OSMODE4. This happens on both BeebEm and on real hardware:

...

It's not a major issue, I just need to switch the board to IntegraB OSMODE0, and it works.
I've been looking into this, and I've found the reason for the crash. It looks like the IntegraB board's software stores a handler routine between locations &0880 and &08AC (the MOS printer buffer) and points the CLIV vector here, so the code gets called whenever an OS command is run. The code pages in the IBOS ROM, calls a subroutine and pages it back out.

Unfortunately, Elite uses this extact part of page 8 to store the two-letter text tokens during flight, so when you launch from the station, Elite copies the two-letter token table to &0880, overwriting the IntegraB code. It then does a star-command to load the flight code... which crashes the system as the CLIV vector now points to a text token table, rather than the IntegraB code.

In OSMODE0 the IntegraB handler code is still there, but CLIV does not point to it, so Elite can happily overwrite the IntegraB code with the text tokens, as the handler at 0880 is never called.

So it appears that OSMODEs other than 0 are incompatible with the disc version of Elite (and by extension, the Econet version of Elite), as they both use the same bit of memory.
KenLowe wrote: Tue Apr 16, 2024 3:19 pm However, I've just checked the original disc based SWRAM version of Elite, and it loads fine in OSMODE4, so wonder if it's something that would be fixable?
Interesting. I just tried the sideways RAM version of Elite in BeebEm with the IntegraB board enabled, and it crashes for me when launching. So does standard disc Elite. This makes sense, as they all use the exact same text token code on launching, which overwrites the IntegraB handler.

Are you sure you can run Elite on IntegraB in OSMODE4? As I'm pretty sure OSMODE4 will break all Elites that are based on the disc version... :-k

Mark
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Elite over Econet (BBC Master, 6502SP, BBC Micro)

Post by lovebug »

MarkMoxon wrote: Thu May 02, 2024 9:25 am
lovebug wrote: Thu May 02, 2024 12:04 am Now that elite is working on econet how about modding it to become a multiplayer game :shock:
You mean like this? :-)

(Well, it's kind of multiplayer, anyway...)

Mark
I mean like real multiplayer where each player appears in the same elite universe and can trade / fight not only with the aliens but also with each other
I know this is a major rewrite but would be amazing :lol:
Image Image Image Image
User avatar
MarkMoxon
Posts: 606
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Elite over Econet (BBC Master, 6502SP, BBC Micro with SRAM)

Post by MarkMoxon »

MarkMoxon wrote: Thu May 02, 2024 1:52 pm
KenLowe wrote: Tue Apr 16, 2024 3:19 pm t's not a major issue, I just need to switch the board to IntegraB OSMODE0, and it works.
Elite copies the two-letter token table to &0880, overwriting the IntegraB code. It then does a star-command to load the flight code... which crashes the system as the CLIV vector now points to a text token table, rather than the IntegraB code.
So thinking about it, I could probably fix this by simply reasserting the original value of the CLIV vector when Elite runs.

I'll knock something together and see if that helps...

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

Re: Elite over Econet (BBC Master, 6502SP, BBC Micro with SRAM)

Post by KenLowe »

MarkMoxon wrote: Thu May 02, 2024 1:52 pm I've been looking into this, and I've found the reason for the crash. It looks like the IntegraB board's software stores a handler routine between locations &0880 and &08AC (the MOS printer buffer) and points the CLIV vector here, so the code gets called whenever an OS command is run. The code pages in the IBOS ROM, calls a subroutine and pages it back out.
Thanks for looking into this. Makes sense that the issue is in that area of memory. IBOS uses its own memory for printer buffer, so will have assumed the original buffer is available for other IBOS stuff.
MarkMoxon wrote: Thu May 02, 2024 1:52 pm I just tried the sideways RAM version of Elite in BeebEm with the IntegraB board enabled, and it crashes for me when launching. So does standard disc Elite. This makes sense, as they all use the exact same text token code on launching, which overwrites the IntegraB handler.

Are you sure you can run Elite on IntegraB in OSMODE4? As I'm pretty sure OSMODE4 will break all Elites that are based on the disc version... :-k
I'm fairly certain that was the case, but i won't be able to confirm for a couple of weeks. The wife wouldn't let me take a beeb on holiday with us :(.

Edit: Actually, thinking about it a bit more... IIRC, BeebEm loads with the original Computech IBOS 1.20. I was testing with a newer rev 1.26 which may be the reason for the difference you're seeing.
Last edited by KenLowe on Thu May 02, 2024 9:33 pm, edited 1 time in total.
User avatar
MarkMoxon
Posts: 606
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Elite over Econet (BBC Master, 6502SP, BBC Micro)

Post by MarkMoxon »

lovebug wrote: Thu May 02, 2024 8:02 pm
MarkMoxon wrote: Thu May 02, 2024 9:25 am
lovebug wrote: Thu May 02, 2024 12:04 am Now that elite is working on econet how about modding it to become a multiplayer game :shock:
You mean like this? :-)

(Well, it's kind of multiplayer, anyway...)

Mark
I mean like real multiplayer where each player appears in the same elite universe and can trade / fight not only with the aliens but also with each other
I know this is a major rewrite but would be amazing :lol:
It would! The big challenge is that the universe model in Elite is player-centric. The player is always at the origin, and everything else moves around them. So when you rotate, you don't actually move, and instead all the other ships rotate around you in the opposite direction. This makes sharing coordinates between players quite difficult, as each player has a completely different frame of reference; there is no universal concept of up, down or origin, in essence.

That said, it isn't impossible to imagine a setup where the universe is modelled in one networked machine, and this either transmits or memory-injects the entire universe state into each instance of Elite, transforming the universe that it sends into each player's individual frame of reference as it does so. I'm not sure if contemporary 1980s machines and networks would be capable of this level of sophistication, but it could definitely be done with, say, multiple emulators on modern machines. A big job! But feasible.

But for now, I hope you like my multiplayer scoreboards. They're pretty cool too. :D

Mark
User avatar
MarkMoxon
Posts: 606
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Elite over Econet (BBC Master, 6502SP, BBC Micro with SRAM)

Post by MarkMoxon »

KenLowe wrote: Thu May 02, 2024 9:29 pm
MarkMoxon wrote: Thu May 02, 2024 1:52 pm Are you sure you can run Elite on IntegraB in OSMODE4? As I'm pretty sure OSMODE4 will break all Elites that are based on the disc version... :-k
I'm fairly certain that was the case, but i won't be able to confirm for a couple of weeks. The wife wouldn't let me take a beeb on holiday with us :(.
Never mind, I can replicate the issue on BeebEm anyway, so hopefully I'll have a fix for you to try by the time you get home. :-)

Mark
User avatar
lovebug
Posts: 1739
Joined: Sun Jan 31, 2021 5:07 pm
Location: Magrathea
Contact:

Re: Elite over Econet (BBC Master, 6502SP, BBC Micro)

Post by lovebug »

MarkMoxon wrote: Thu May 02, 2024 9:32 pm The big challenge is that the universe model in Elite is player-centric.
I had looked at the elite disassembly a while ago but I had forgotten about the way its rotated, sorry
Image Image Image Image
atsampson
Posts: 67
Joined: Fri Dec 16, 2022 4:54 pm
Location: Dundee, Scotland
Contact:

Re: Elite over Econet (BBC Master, 6502SP, BBC Micro)

Post by atsampson »

MarkMoxon wrote: Thu May 02, 2024 9:32 pm That said, it isn't impossible to imagine a setup where the universe is modelled in one networked machine, and this either transmits or memory-injects the entire universe state into each instance of Elite, transforming the universe that it sends into each player's individual frame of reference as it does so.
Even just doing the first half of that would be kind of interesting - make it so that you can run multiple copies of Elite, displaying the same universe as a primary copy that the player is controlling. Then you could watch someone else play over the network, or set up multiple computers rendering the different direction displays on different monitors, flight-simulator-style...
User avatar
MarkMoxon
Posts: 606
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Elite over Econet (BBC Master, 6502SP, BBC Micro with SRAM)

Post by MarkMoxon »

MarkMoxon wrote: Thu May 02, 2024 9:37 pm
KenLowe wrote: Thu May 02, 2024 9:29 pm
MarkMoxon wrote: Thu May 02, 2024 1:52 pm Are you sure you can run Elite on IntegraB in OSMODE4? As I'm pretty sure OSMODE4 will break all Elites that are based on the disc version... :-k
I'm fairly certain that was the case, but i won't be able to confirm for a couple of weeks. The wife wouldn't let me take a beeb on holiday with us :(.
Never mind, I can replicate the issue on BeebEm anyway, so hopefully I'll have a fix for you to try by the time you get home. :-)
Hi Ken.

I have added what I hope is a fix for the IntegraB OSMODE4 issue to the latest release of Elite over Econet. It seems to work for me in BeebEm, so fingers crossed it works on the real thing.

The latest version is available from the usual place:

https://www.bbcelite.com/hacks/elite_ov ... loads.html

The only change for the bug fix is to the ELTBI file, though I'm not sure which version you're on - the file structure has changed a fair bit in the last couple of versions, so you might want to reinstall the whole lot from scratch.

Anyway, something to look forward to for when you get back from holiday. :-)

Mark
Post Reply

Return to “8-bit acorn software: classic games”