2nd processor software

discussion of beeb/electron applications, languages, utils and educational s/w
User avatar
roland
Posts: 2941
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

2nd processor software

Post by roland » Mon Jun 09, 2014 3:04 pm

Hi,

Today I came across my 6809 cpu that I once used on my Atom. The project silently died because of the lack of usable software and the was no public (except me, myself and I) to write the software for.

So I start wondering what you guys (and girls if you are still active on this forum) do with a 2nd cpu connected to a Beeb or Elk. I know that the 6502 as 2nd cpu runs most of the native Beeb software, but what about Z80, 32016 or 6809 processors? Where do you get useful software from?

Would you share your 2nd cpu secrets with us?

Regards,
Roland
256K + 6502 Inside
MAN WOMAN :shock:

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

Re: 2nd processor software

Post by flaxcottage » Mon Jun 09, 2014 4:31 pm

At the moment my 65C102 in a Master is used as a Level 3 fileserver.

It is an important job it does but I always think that tying up a Master with a 65C102 and a Datacentre plus 500Mb CF HDD just to run my network is a bit of overkill.

Top of my to-do list is to set up a spare A3020, which has a broken floppy drive, as a Level 4 fileserver so that I can use the Master 2nd processor for something "useful". Ideally I'd like a Filestore but maybe I have better chance of winning the National Lottery!

But what is "useful"?

1. running HIBASIC so that I can write bigger and faster programs

2. write a program to calculate 1994! . I did this in Pascal ages ago but ISO-Pascal quickly runs out of memory as I need three 10K byte arrays.

After that I shall have a deep think ...
- John
Image

User avatar
retroclinic
Posts: 3022
Joined: Thu Jul 03, 2008 1:22 pm
Location: East Riding of Yorkshire
Contact:

Re: 2nd processor software

Post by retroclinic » Mon Jun 09, 2014 8:02 pm

flaxcottage wrote:But what is "useful"?

1. running HIBASIC so that I can write bigger and faster programs

2. write a program to calculate 1994! . I did this in Pascal ages ago but ISO-Pascal quickly runs out of memory as I need three 10K byte arrays.
Don't forget ELITE! Or does that not count as "useful"?
flaxcottage wrote:After that I shall have a deep think ...
Don't think too deep, or you'll just come up with 42. :lol:

Mark.
Image

User avatar
BeebMaster
Posts: 2615
Joined: Sun Aug 02, 2009 4:59 pm
Location: Lost in the BeebVault!
Contact:

Re: 2nd processor software

Post by BeebMaster » Mon Jun 09, 2014 8:46 pm

I use second processors quite a bit. All my permanent Econet stations have second processors:

Station 1 (Master 128) has an internal Sprow ARM7, which I use for duplicating floppy discs where I can do it in one pass using the extra RAM. It's also very handy for duplicating unusual format discs (like a Level 3 Econet floppy disc) where normal backup utilities don't work because they look at the free space map and ignore the Econet bit. I read in all sectors from 0-&9FF and then write them out again.

Station 128 (BBC B) has an Acorn 6502 cheese wedge attached, its main use these days is to run BASIC IV! The serial interface on Station 1 is on the blink, and the Domesday/laserdisc serial utilities I wrote using Master 128 machines make use of some of the facilities only available from BASIC IV onwards (such as ON...PROC) so with Station 128 being the next nearest machine to connect to the laserdisc player, I use the BBC B nowadays and run BASIC IV, which doesn't work in the host processor but does work in the second processor.

Station 200 (Master Turbo) is probably a genuine Master Turbo (if such a thing ever left the factory as such rather than being a dealer or user upgrade) so it has the 65C102 co-processor and runs my Econet Level 3 file server.

Station 201 is a Master 512, but I've never really found much of a use for DOS Plus. I actually thought it was going to be really handy for Beeb to PC file transfers in the days when I did that kind of thing using 720K DOS discs, but whenever I tried to copy files to a DOS disc in DOS Plus it would never work in the PC. Fortunately I use CPFS which has a very handy file transfer buffer facility which comes in useful for transferring files between floppy discs and other filing systems or formats by using the CPFS buffer as an intermediate step.

I have an Acorn Z80 and a couple of Torch variants but I don't use them.

My "Tesco cheese wedge" is a 6502 second processor which gets quite a bit of use depending on when or where it is needed, although a lot of the time it only gets used as a power source because it has a BBC B PSU in it where I can use the aux output or two of the three sets of 0V/5V lines.

After never being used (apart from to check it functioned) from its arrival shortly after being invented, my external ARM7 is going to start having a lot of use now that I am doing file transfers and disc backups using CF cards. I used it in March and April with Station 114 as a RAM buffer for reading ADFS and DFS floppy discs to make backup images. Last month I used it to commence a backup of the Domesday discs.
Image

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

Re: 2nd processor software

Post by flaxcottage » Mon Jun 09, 2014 10:38 pm

42!

It took me years to work that out. :lol:
- John
Image

User avatar
pstnotpd
Posts: 393
Joined: Wed Jan 20, 2010 11:05 am
Contact:

Re: 2nd processor software

Post by pstnotpd » Thu Jun 12, 2014 6:56 pm

It won't work, I have an exceptionally large mind.

User avatar
padge
Posts: 59
Joined: Fri Dec 14, 2012 1:34 am
Contact:

Re: 2nd processor software

Post by padge » Thu Jun 12, 2014 9:24 pm

flaxcottage wrote:42!

It took me years to work that out. :lol:
it took the white mice 7.5 million years !

:lol: :lol:

User avatar
hoglet
Posts: 7600
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol
Contact:

Re: 2nd processor software

Post by hoglet » Thu Jun 12, 2014 9:36 pm

1405006117752879898543142606244511569936384000000000

Now, what was the question? :lol:

Dave

User avatar
DutchAcorn
Posts: 1901
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands
Contact:

Re: 2nd processor software

Post by DutchAcorn » Wed Aug 13, 2014 8:23 pm

Since the question came up in another thread: there are a few more uses that were not mentioned yet:

- the Acorn BitStik CAD software required a double disc drive and a 6502 Second Processor to run
- According to the NovaCad manual four (!) colours are supported when using a 6502 Second Processor (or a BBC+).
- I rember using a 3D CAD program that performed a lot better when using the second processor (can't think of the name now).
*edit*: Found it: it's the 3-D Graphics Development System (Honeyfold Software)

So in general: Some CAD programs make use of the 6502 second processor.
Last edited by DutchAcorn on Thu Aug 14, 2014 5:04 am, edited 1 time in total.
Paul

RobC
Posts: 2324
Joined: Sat Sep 01, 2007 9:41 pm
Contact:

Re: 2nd processor software

Post by RobC » Wed Aug 13, 2014 8:51 pm

Apart from using the internal 6502 co-pro on my Domesday machine and writing odd bits of C for the ARM7TDMI and 32016, I don't really use my second processors for much.

There's a reasonable amount of PD software for the M512 but again, I don't really use it very often.

I have been looking at building a 6809 second processor for some time though. This would then allow me to run Flex on the Beeb. It looked like it wouldn't be too difficult to write the necessary drivers - maybe you could do the same for the Atom? That would in theory open up all the available Flex software to you.

User avatar
roland
Posts: 2941
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: 2nd processor software

Post by roland » Wed Aug 13, 2014 9:44 pm

Hi Rob,

That would be a first step, in theory the software on the 6809 could be the same for both the BBC and the Atom. And it might be easier to implement the communication between the two cpu's when Hoglet finishes the reverse engineering of the Tube. Although, the way I did that in the past was working also.

But first I have to finish my new Atom design. Today I started my Atom again and it took me about 15 minutes to get the 'Acorn Atom' message on the screen. High time for a new main board :x

Greetings,
Roland
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
leenew
Posts: 3690
Joined: Wed Jul 04, 2012 3:27 pm
Location: Doncaster, Yorkshire
Contact:

Re: 2nd processor software

Post by leenew » Sun Nov 30, 2014 2:27 pm

OK so to bump this thread in light of all the co - pro action that is happening at the moment...
Can we compile a list of software that can utilise the Co-pro.
Lists for 6502 6809 and Z80 welcome.
Thanks
Lee.

User avatar
CMcDougall
Posts: 6304
Joined: Wed Feb 02, 2005 3:13 pm
Location: Shadow in a Valley of Scotland
Contact:

Re: 2nd processor software

Post by CMcDougall » Sun Nov 30, 2014 2:34 pm

here is the Elite's:
http://www.stairwaytohell.com/filesearc ... rch=Search
and the Executive version is not in the STH archive :-k , so upped below
as that has the 'Star Wars' style title /credits :D ...or was it 'Superman'... #-o
Attachments
ELITEexecuti.zip
ssd
(125.35 KiB) Downloaded 132 times
ImageImageImage

dangardner
Posts: 164
Joined: Sun Apr 01, 2012 12:30 pm
Location: The Wicklow Mountains
Contact:

Re: 2nd processor software

Post by dangardner » Sun Nov 30, 2014 11:28 pm

According to http://chrisacorns.computinghistory.org ... dproc.html there was Hi-Wordwise as well as the more well-known Hi-Basic and Hi-View. Does anybody have a copy of Hi-Wordwise floating around? I guess there was also the 6502 Development Package (MASM etc.) that made use of the 2P. Did the 2P come with that or was it a separate purchase?

I just spotted that the Wikipedia page on Revs suggests an enhanced 2P version existed. Also http://8bs.com/mag/34/lang1.txt says that SYSTEM ADE+ would use the memory in the 65C02 CoPro.

So, I think that now gives us the following for the 6502:
  • 6502 Development Package
  • Hi-Basic
  • Hi-View
  • Bitstick CAD
  • Level 3 Fileserver
  • Elite Enhanced version
  • Revs Enhanced version (unconfirmed)
  • Hi-Wordwise (unconfirmed)
  • SYSTEM ADE+ (unconfirmed)
Any others? I'm sure there were other language ROMs that needed a 2P.

User avatar
retroclinic
Posts: 3022
Joined: Thu Jul 03, 2008 1:22 pm
Location: East Riding of Yorkshire
Contact:

Re: 2nd processor software

Post by retroclinic » Sun Nov 30, 2014 11:35 pm

I've got several disks of a program called "Compass CAD systems", by British Thornton. I tried to boot one up on a Model B, and it said:

"This is for a Master Turbo only" (Or words to that effect!)

So I presume it also needs a second processor in an M128. I didn't go any further as the disc was making bad noises, and there is some "crap" on the other disc surfaces, so I'll need to look at them closely with a special drive, but I'll try and SSDize them when I can.

Mark.
Image

User avatar
richardtoohey
Posts: 3590
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand
Contact:

Re: 2nd processor software

Post by richardtoohey » Mon Dec 01, 2014 3:10 am

How difficult would it be to write games for the 2P?

I mean, is it x2 more difficult, or x10 or ?

Did people not write games for it because of the difficulty or the small market? Probably both.

From my reading, any screen work (fiddling with the video RAM) becomes difficult - you can't just write to &3000 in MODE 2 and expect pixels to light up - all you are doing is setting the 2P's RAM at &3000, not the I/O processor's RAM.

So would you use the OSWORD call to write host memory at &3000 - or would that be too slow? e.g. something along the lines of

Code: Select all

10 DIM B% 5
20 !B%=&3000
30 ?(B%+4)=&FF
40 A%=6:X%=B% MOD 256:Y%=B% DIV 256
50 CALL &FFF1
Or do you try and process in parallel (somehow?)

:-k

I've got lots more reading and experimenting to do! :-k :idea: :?:

User avatar
jms2
Posts: 2051
Joined: Mon Jan 08, 2007 6:38 am
Location: Derby, UK
Contact:

Re: 2nd processor software

Post by jms2 » Mon Dec 01, 2014 6:56 am

richardtoohey wrote:How difficult would it be to write games for the 2P?:
This is a very good question and one which I have often wondered about. I am sure the OSWORD method would be too slow - you would instead set up the two processors to work in parallel, with one doing the maths and the other doing the graphics. But has anyone ever disassembled Elite 2P to find out how it actually works in detail? Could an Electron Tube Elite be created? [-o<

Regarding Revs over the tube, I don't think this is correct as I have never heard about it before. Whilst it sounds great, I am not sure how Revs could be improved by using a second processor. It's hard to imagine how it could be improved at all, to be honest. :D

User avatar
richardtoohey
Posts: 3590
Joined: Thu Dec 29, 2011 5:13 am
Location: Tauranga, New Zealand
Contact:

Re: 2nd processor software

Post by richardtoohey » Mon Dec 01, 2014 7:19 am

There was this thread that started me thinking:

viewtopic.php?f=1&t=8877

But the available detail isn't enough for me to understand how it is done.

A 6502 second processor version of Elite-A is also included on the disc. If a second processor is detected during boot-up, then this version is loaded. It is slightly faster than the single-processor version, because the screen handling is done by the I/O processor, and the calculation by the second processor.

So does the I/O processor run in the foreground (as it were), passing calculation jobs to the 2nd processor (if so, how?)

Or does the 2P run, passing I/O updates to the I/O processor? How do you do that fast enough? Or do you not say "update this pixel, this pixel, this pixel", but instead say "Cobra at x,y,z, missile at x1,y1,z1 and so on" - so all you are passing is objects, rather than trying to update the screen memory?

Or - most likely - something completely different?

User avatar
DutchAcorn
Posts: 1901
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands
Contact:

Re: 2nd processor software

Post by DutchAcorn » Mon Dec 01, 2014 11:03 am

dangardner wrote: So, I think that now gives us the following for the 6502:
  • 6502 Development Package
  • Hi-Basic
  • Hi-View
  • Bitstick CAD
  • Level 3 Fileserver
  • Elite Enhanced version
  • Revs Enhanced version (unconfirmed)
  • Hi-Wordwise (unconfirmed)
  • SYSTEM ADE+ (unconfirmed)
Any others? I'm sure there were other language ROMs that needed a 2P.
And:
  • Novacad (Technimatic)
    3-D Graphics Development System (Honeyfold Software)
Paul

User avatar
roland
Posts: 2941
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: 2nd processor software

Post by roland » Mon Dec 01, 2014 11:45 am

richardtoohey wrote: So does the I/O processor run in the foreground (as it were), passing calculation jobs to the 2nd processor (if so, how?)
Or does the 2P run, passing I/O updates to the I/O processor? How do you do that fast enough? Or do you not say "update this pixel, this pixel, this pixel", but instead say "Cobra at x,y,z, missile at x1,y1,z1 and so on" - so all you are passing is objects, rather than trying to update the screen memory?
I don't know how it is in Elite, but in general it is completely dependent of how the programmer builds it. You can delegate tasks to from the I/O processor to the second processor and retrieve the results. But the other way round is also possible.

If you choose the 2P as main cpu you can achieve good performance by running a piece of code that handles sprites like objects that are placed on the screen. In fact, I used this approach in my Atom-in-PC. The 6502 was the main cpu, the Pentium II was a copro or I/O processor. The 6502 told the Pentium II to draw a line from point x1,y2 to x2,y2 so passing only 10 bytes through the I/O channel. Two bytes were the draw command, the other eight were the four 16 bit coordinates. That was really faster than plotting every single point which required 6 bytes per pixel. Another advantage was that while the pc was drawing the line, the 6502 continued its other work. The same goes for sprites.
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
jms2
Posts: 2051
Joined: Mon Jan 08, 2007 6:38 am
Location: Derby, UK
Contact:

Re: 2nd processor software

Post by jms2 » Mon Dec 01, 2014 12:13 pm

I would imagine that Elite works in the way Roland describes. In normal single-processor Elite the 3D routines work out what lines need to be drawn and pass those co-ordinates to a special fast line-drawing algorithm. In second processor Elite that algorithm must live in the I/O processor and the co-ordinates are passed to it across the Tube. Similarly keypresses are passed back the other way.

At least, that's how I think it must work. What I don't have any idea about are detail things such as:

- How much of the code lives in the I/O processor?
- How many Tube registers are used?
etc

I would imagine that all the other software mentioned on here uses the operating system to control the Tube. Elite is possibly the only piece of software that accesses the hardware directly. This strongly suggests that the possibilities of the Tube, in terms of gaming, have not yet been fully exploited! :D

The ideal Tube game would be one that requires loads of memory and processor speed, without requiring many man-years of development to write. Some kind of procedurally generated 3D thing maybe?

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

Re: 2nd processor software

Post by jgharston » Mon Dec 01, 2014 2:25 pm

A lot of properly-written software will run on the Tube without it knowing or caring what processor it is running on, so you could add a large amount of "ordinary" programs to the "2nd processor software" list.

A lot of BASIC code will run on a second processor unchanged, and will run on any second processor unchanged if it makes no assumptions about the processor it is running on. Almost all my BASIC code will run on 6502 IO, 6502CoPro, Z80CoPro, 32000CoPro and ARM CoPro.

Properly written 6502 code should run on a 6502 CoPro. If it's something that wants to frob the hardware (ie, direct screen access), then just make sure its load/exec addresses are in the I/O processor (ie &FFxxxxxx). If it's something that wants to run as a language/application, just make sure its load/exec addresses are in the second processor (ie &0000xxxx).

I wrote an unpublished article for Micro User about how to write 6502 that wants to run in the same environment as BASIC and how to ensure it would run when BASIC was running on a second processor. I tweeked it and it's on 8BS Issue 67. I'll put it on my website when I get around to it.

Code: Select all

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

User avatar
george.h
Posts: 1027
Joined: Wed Apr 13, 2011 5:32 pm
Location: Chelmsford Essex
Contact:

Re: 2nd processor software

Post by george.h » Mon Dec 01, 2014 2:47 pm

IIRC didn't Acorn use some in-house written software (running with the 6502 2nd processor) to do the Electron gate array and early ARM prototyping?

Or am I talking rubbish? :lol:
Pic Caption: "One day son, this will all be yours..."

User avatar
Rich Talbot-Watkins
Posts: 1367
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca
Contact:

Re: 2nd processor software

Post by Rich Talbot-Watkins » Mon Dec 01, 2014 3:48 pm

The reason Elite is so suited to a second processor is that what it does can be very clearly split into two parallel tasks - the second processor can be performing all its calculations to transform vertices in 3D space and projecting and clipping into 2D screen coordinates, while meanwhile the main CPU can be pulling clipped line coordinates from the TUBE and rendering them in parallel.

Normally the most costly part of a game is rendering the graphics, and since this has to be done on the main CPU, there's not normally much use for the 2nd processor. Since Elite has so much number crunching to do, this is a perfect candidate for being farmed out to the other processor.

Something like Exile has enough going on outside the actual rendering that I can imagine the 2nd processor being useful. In fact, as I remember it, the actual game logic aside from the rendering is driven by interrupts, which would actually make it a good candidate for running on a second processor.

firthmj
Posts: 227
Joined: Tue May 26, 2009 8:37 am
Location: Ipswich, UK
Contact:

Re: 2nd processor software

Post by firthmj » Mon Dec 01, 2014 7:05 pm

dangardner wrote:According to http://chrisacorns.computinghistory.org ... dproc.html there was Hi-Wordwise as well as the more well-known Hi-Basic and Hi-View. Does anybody have a copy of Hi-Wordwise floating around?

<snip>
Interestingly, further searching on Chris's site suggest that Hi-Wordwise was actually produced by a company other than Computer Concepts, and for their non-standard 6502 Co-Pro alternative:

http://chrisacorns.computinghistory.org ... 2PHiWW.pdf

and

http://chrisacorns.computinghistory.org ... _B2PUG.pdf

I had never heard of PMS or this alternative Co-Pro before - is it me being poorly informed, or is it indeed something that's not widely known about?

Regards

Michael
Had fun at the
Image
Meeting 13th May 2017

User avatar
Arcadian
Site Admin
Posts: 2941
Joined: Fri Nov 24, 2000 12:16 pm
Contact:

Re: 2nd processor software

Post by Arcadian » Mon Dec 01, 2014 7:15 pm

I've got two versions of the PMS Second Processor (both BBC and Electron versions).

I stumbled across the Beeb version earlier today as it happens, whilst rooting around in the loft. I could bring it along to the January User Gp meeting if that would be of any use to Jason (Flynn)?
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk

Image
ABug SOUTH (Hampshire) (1-3 June 2018)

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

Re: 2nd processor software

Post by sydney » Mon Dec 01, 2014 7:18 pm

Is there any documentation for programming using the co-pro's? If so what, and where, is it? Or do I need some kind of mind meld with jgh?

User avatar
MartinB
Posts: 4980
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity
Contact:

Re: 2nd processor software

Post by MartinB » Mon Dec 01, 2014 7:35 pm

I've written some fairly complex Tube stuff just using the attached Acorn Application Note as my knowledge source for the interface.
AppNote-004.zip
(58.78 KiB) Downloaded 131 times

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

Re: 2nd processor software

Post by 1024MAK » Mon Dec 01, 2014 7:43 pm

sydney wrote:Or do I need some kind of mind meld with jgh?
Now this would make for an interesting picture :lol:

Mark

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

Re: 2nd processor software

Post by sydney » Mon Dec 01, 2014 8:17 pm

MartinB wrote:I've written some fairly complex Tube stuff just using the attached Acorn Application Note as my knowledge source for the interface.
AppNote-004.zip
Oh well if you can do it then it must be really easy then! :lol:

I had a quick look and I think I might need a bit of hand holding with this. Anyone got any simple examples? I take it BASIC programs will automagically just use the co-pro or do I need a specific BASIC rom?

Post Reply