Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
dp11
Posts: 830
Joined: Sun Aug 12, 2012 8:47 pm
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by dp11 » Fri May 18, 2018 5:06 am

Pi3b+ is much faster.

Timings from memory for fast 6502

Pi2 slower than pizero
Pizero 290MHz
Pi3 290MHz
Pi3B+ 336MHz

I have some more speed increases in the pipeline that take the 3b+ to 340MHz.

The original acorn external 6502 copro was 3MHz so 3b+ is over 110 times faster.

Other cores see a speed increase with the 3b+ too.

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

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by Elminster » Fri May 18, 2018 8:38 am

Great thanks. Perhaps I need another Pi 3B+ then. Trouble is I already have 15 RPIs. Perhaps I shall have to have a clear out soon!

dp11
Posts: 830
Joined: Sun Aug 12, 2012 8:47 pm
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by dp11 » Fri May 18, 2018 5:35 pm

Just tried running CLOCKSP on native ARM and rpi3b+. Unfortunately it is too fast and gives a divide by zero error as the time for the floating point test <10mS . I guess the speed result to be around 19-20GHz as bas135 floating point is much faster than BASIC II on a beeb.

northernbob
Posts: 84
Joined: Fri Nov 24, 2017 6:49 am
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by northernbob » Sun May 20, 2018 2:25 pm

dp11 wrote:Pi3b+ is much faster.

Timings from memory for fast 6502

Pi3 290MHz
Pi3B+ 336MHz

I have some more speed increases in the pipeline that take the 3b+ to 340MHz.

.
i realise this is getting a bit silly, but have you tried overclocking the 3b+ ? or does this just mess things up?

https://youtu.be/RxBaEiQHzLU

guide to overclocking the beast.....1.6ghz max
https://youtu.be/aT0OX8TXRCM

sundbyk
Posts: 90
Joined: Thu Jun 16, 2016 10:03 am
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by sundbyk » Sat May 26, 2018 12:01 pm

dp11 wrote:
Fri May 18, 2018 5:06 am
Pi3b+ is much faster.

Timings from memory for fast 6502

Pi2 slower than pizero
Pizero 290MHz
Pi3 290MHz
Pi3B+ 336MHz

I have some more speed increases in the pipeline that take the 3b+ to 340MHz.

The original acorn external 6502 copro was 3MHz so 3b+ is over 110 times faster.

Other cores see a speed increase with the 3b+ too.
Hi,

Which version of the Pi Zero are you testing on?
My Pi Zero V1.3 report 417Mhz in Combined Average.

Kjell S.
***************************
Kjell Sundby
Web: http://www.sundby.com
****************************

dp11
Posts: 830
Joined: Sun Aug 12, 2012 8:47 pm
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by dp11 » Sat May 26, 2018 12:46 pm

I suspect you are using basic IV e.g. A master. To be consistent we using Basic II for all the timinigs.

sundbyk
Posts: 90
Joined: Thu Jun 16, 2016 10:03 am
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by sundbyk » Sat May 26, 2018 1:34 pm

dp11 wrote:
Sat May 26, 2018 12:46 pm
I suspect you are using basic IV e.g. A master. To be consistent we using Basic II for all the timinigs.
Hi,

Your are right.
I did use the Master version.
Thanks for clearing that up for me.
:-)

Kjell S.
***************************
Kjell Sundby
Web: http://www.sundby.com
****************************

User avatar
marcusjambler
Posts: 423
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by marcusjambler » Tue May 29, 2018 8:01 am

I think there maybe an issue with running the 286 processor on a PI Zero.
I have it booting fine to DOS from BeebSCSI.
If I catalogue a disk that has a large no of files in a sub_directory on GOTEK using DIR it hangs randomly during that process.
If I swap the PI Zero for a PI 3, no issue. ( Using the same SD card and image )

Marcus

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

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by hoglet » Tue May 29, 2018 8:58 am

Marcus,

Is there any way we could get a copy of the hard disk image that provokes this problem?

Dave

User avatar
marcusjambler
Posts: 423
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by marcusjambler » Tue May 29, 2018 9:06 am

Hi Dave

Its one I got from RobC but the standard Data Centre image also does it.
I'll post a 720k DOS disk image for 'Treasure Island' when I get home.
All the files are in 'Treas' sub-directory because of the Root directory limit ( IIRC 77 files max )

Marcus

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

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by hoglet » Tue May 29, 2018 9:19 am

marcusjambler wrote:
Tue May 29, 2018 8:01 am
I have it booting fine to DOS from BeebSCSI.
If I catalogue a disk that has a large no of files in a sub_directory on GOTEK using DIR it hangs randomly during that process.
I'm just trying to get my head around this configuration.

Is this all correct?
- You are running on a Master 128
- You are using the standard ADFS 1.50, with other file systems (DFS and RAMFS) unplugged
- The C:/ drive is implemented with BeebSCSI and is using RobC's hard disc image
- The A:/ drive is implemented with a GOTEK and you are using the "Treasure Island" 720K DOS image.

Ir's doing a DIR A:/ on a image with a lot of files that is causing a random hang on the Pi Zero, but not the Pi 3.

What release of PiTubeDirect are you running?

I don't have a GOTEK myself (yet...) but if someone could bring one along to ABUG this weekend I can look into this.

Dave

User avatar
marcusjambler
Posts: 423
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by marcusjambler » Tue May 29, 2018 9:26 am

Is this all correct?
- You are running on a Master 128
yes
- You are using the standard ADFS 1.50, with other file systems (DFS and RAMFS) unplugged
yes although the issue arises under MOS 3.2 and 3.5
- The C:/ drive is implemented with BeebSCSI and is using RobC's hard disc image
Yes
- The A:/ drive is implemented with a GOTEK and you are using the "Treasure Island" 720K DOS image
Yes - using Up to date FlashFloppy release.

User avatar
marcusjambler
Posts: 423
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by marcusjambler » Tue May 29, 2018 9:32 am

What release of PiTubeDirect are you running?
Egg Eater RC0 although Diamond Back does this as well.

I've had this situation pop up for a while and I convinced my self it was a cabling issue.
And I had it come and go whilst swapping peripherals from my Beeb SCSI master to my Retro Clinic Master.
But behind all the swapping was one fundamental difference.
The Beeb SCSI master has an internal level shifter with a PI zero mounted whereas the Retroclinic one has an External level shifter with PI 3 hung off it.

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

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by hoglet » Tue May 29, 2018 9:42 am

marcusjambler wrote:
Tue May 29, 2018 9:32 am
The Beeb SCSI master has an internal level shifter with a PI zero mounted whereas the Retroclinic one has an External level shifter with PI 3 hung off it.
Is the internal level shifter one of Kjell's new batch (i.e. bought or swapped out since Feb 2018).

Would it be possible to try the Pi Zero on the external level shifter in the BeebSCSI master?

Dave
Last edited by hoglet on Tue May 29, 2018 9:43 am, edited 1 time in total.

User avatar
BigEd
Posts: 2091
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by BigEd » Tue May 29, 2018 9:42 am

Is the Pi in both cases powered by the Beeb?

User avatar
marcusjambler
Posts: 423
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by marcusjambler » Tue May 29, 2018 9:47 am

Is the internal level shifter one of Kjell's new batch (i.e. bought or swapped out since Feb 2018).
Yes Kjell very kindly sent me a new one.
Would it be possible to try the Pi Zero on the external level shifter in the BeebSCSI master?
Yes I'll do that and post the result
Is the Pi in both cases powered by the Beeb?
Yes both Beeb powered.

User avatar
marcusjambler
Posts: 423
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by marcusjambler » Tue May 29, 2018 4:09 pm

Would it be possible to try the Pi Zero on the external level shifter in the BeebSCSI master?
Of course... The PI Zero is working fine now on both internal and external level shifters :shock: :roll:

I'll monitor it and try and pin the cause down.

Here's the Treasure Island image:
Attachments
treasure island.zip
(181.81 KiB) Downloaded 7 times

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

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by hoglet » Fri Jul 27, 2018 5:48 pm

Hello all,

I just wanted to bring it to people's attention that Mark Haysman (Retroclinic) is now producing his own PiTubeDirect level shifters:
https://www.ebay.co.uk/itm/ACORN-BBC-MO ... 3779798184

PiTubeDirect is open source (GPL licensed), so Mark is free to do this, and it's good to see more vendors embracing PiTubeDirect. One thing to be aware of is that he has, for now at least, not included the 3-pin header for the serial debugger cable. So you won't be able to make use of the integrated debug capability that's built into many of the Co Pros.

As a reminder, the integrated debugger allows you to debug code running on a Co Processor. You can disassemble, single step, set watch points, set break points, dump memory, change memory, view and change processor register, etc. It's a very powerful capability for anyone developing new software, or debugging existing software.

The following Co Pro's include the debug capability:

Code: Select all

    2 lib6502
    3 lib6502
    4 Z80
    5 OPC5LS
    6 OPC6
    7 OPC7
    8 80x86
    9 6809
   11 PDP11
   12 ARM2
   13 32016
(It needs to be better documented, something I'll try to do shortly).

All you need to use this is a Pi serial cable, like this:
https://thepihut.com/products/adafruit- ... rial-cable

Dave
Last edited by hoglet on Fri Jul 27, 2018 6:20 pm, edited 2 times in total.

AndyGarton
Posts: 191
Joined: Tue May 21, 2013 2:47 pm
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by AndyGarton » Thu Sep 06, 2018 9:41 am

Received my PiTubeDirect(s) yesterday and am really happy with them so far, thanks to everybody involved for making this happen.

I have one simple question/concern - when I set up the cmdline file so that it defaults to the copro on (at 0 say), it cold starts fine, without needing to press break or anything. When I default the copro off (14) however, the machine hangs at a blank screen (with flashing cursor), and needs break pressing to bring it to life. Is this normal/known? Clearly it's no big deal having to press one key (!), but if there is a way of getting it to start totally clean, I'd prefer that obviously.

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

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by johnkenyon » Thu Sep 06, 2018 10:40 am

AndyGarton wrote:
Thu Sep 06, 2018 9:41 am
Received my PiTubeDirect(s) yesterday and am really happy with them so far, thanks to everybody involved for making this happen.

I have one simple question/concern - when I set up the cmdline file so that it defaults to the copro on (at 0 say), it cold starts fine, without needing to press break or anything. When I default the copro off (14) however, the machine hangs at a blank screen (with flashing cursor), and needs break pressing to bring it to life. Is this normal/known? Clearly it's no big deal having to press one key (!), but if there is a way of getting it to start totally clean, I'd prefer that obviously.
1) Is this a BBC B?
If yes:
2) Have you seen the fix posted elsewhere with a resistor on one of the data lines.

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

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by hoglet » Thu Sep 06, 2018 10:46 am

AndyGarton wrote:
Thu Sep 06, 2018 9:41 am
I have one simple question/concern - when I set up the cmdline file so that it defaults to the copro on (at 0 say), it cold starts fine, without needing to press break or anything. When I default the copro off (14) however, the machine hangs at a blank screen (with flashing cursor), and needs break pressing to bring it to life. Is this normal/known? Clearly it's no big deal having to press one key (!), but if there is a way of getting it to start totally clean, I'd prefer that obviously.
Edit: Cross posted with John, who says the same thing....

If you are using a Model B, then yes it is a known issue.

What Pi Model are you using, and what PiTubeDirect firmware version?

If you always want to start with the Co Pro disabled, then you could try the fix described here:
viewtopic.php?p=208474#p208474

Dave
Last edited by hoglet on Thu Sep 06, 2018 10:47 am, edited 1 time in total.

AndyGarton
Posts: 191
Joined: Tue May 21, 2013 2:47 pm
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by AndyGarton » Thu Sep 06, 2018 11:06 am

Thanks guys, it is a model B, and I'm using the "InTube" version supplied by Kjell Sundby. I'll live with the break key workaround I think, as I'm not yet sure what I'd like the default to be, so I probably won't do the hardware mod (that, plus I'm hopeless at hardware and would probably break something!).

(How do I check which firmware version I'm on please?)
Last edited by AndyGarton on Thu Sep 06, 2018 11:06 am, edited 1 time in total.

User avatar
guddler
Posts: 493
Joined: Sat Apr 04, 2009 9:43 am
Location: W.Somerset
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by guddler » Thu Sep 06, 2018 11:19 am

Quick question - is the serial debugging linux based?

Call me mad but I have this idea to use a 3B+ for the co-pro and also stick a ZeroW in there (maybe a Zero and a Zero W?), all powered by the master and just SSH to the 0W for debugging sessions. I guess it would make sense to mount a double pole switch somewhere so I can completely turn the zero off when not in use.

The only thing here is that I'm not sure how linux is going to take to just being switched off without shutting down. I've not searched for info yet but there are tonnes and tonnes of devices with embedded linux so there must be things you can do in linux so just flicking the switch doesn't corrupt stuff.

Following this thought through to it's conclusion, it's a shame that the serial signals couldn't be routed through to the cartridge port on the master. Sticking a Pi Zero in a cartridge would make for a really neat debug cart :lol:

scruss
Posts: 54
Joined: Sun Jul 01, 2018 3:12 pm
Location: Toronto
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by scruss » Thu Sep 06, 2018 1:13 pm

guddler wrote:
Thu Sep 06, 2018 11:19 am
The only thing here is that I'm not sure how linux is going to take to just being switched off without shutting down.
Badly. The usual way to do this is to have a read-only root filesystem and have the user filesystem in RAM. You might be able to do this on a Zero, but I'd be more worried about the combined power draw on your beeb's PSU.

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

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by hoglet » Thu Sep 06, 2018 1:18 pm

guddler wrote:
Thu Sep 06, 2018 11:19 am
Quick question - is the serial debugging linux based?
It will work on any OS - all you need is a dumb terminal program.

User avatar
guddler
Posts: 493
Joined: Sat Apr 04, 2009 9:43 am
Location: W.Somerset
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by guddler » Thu Sep 06, 2018 1:33 pm

Cool. Ok, so maybe the 2nd internal PI won't work out so well. Back to the drawing board on that one then.

User avatar
BigEd
Posts: 2091
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by BigEd » Thu Sep 06, 2018 3:58 pm

Give it a go: tinycorelinux is a distribution which runs from RAM.
http://tinycorelinux.net/ports.html

Or, possibly, use a linux on USB instead of SDcard - I have an idea it will react much better to abrupt power-off.

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

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by johnkenyon » Fri Sep 07, 2018 12:07 am

guddler wrote:
Thu Sep 06, 2018 11:19 am
Quick question - is the serial debugging linux based?

Call me mad but I have this idea to use a 3B+ for the co-pro and also stick a ZeroW in there (maybe a Zero and a Zero W?), all powered by the master and just SSH to the 0W for debugging sessions. I guess it would make sense to mount a double pole switch somewhere so I can completely turn the zero off when not in use.

The only thing here is that I'm not sure how linux is going to take to just being switched off without shutting down. I've not searched for info yet but there are tonnes and tonnes of devices with embedded linux so there must be things you can do in linux so just flicking the switch doesn't corrupt stuff.

Following this thought through to it's conclusion, it's a shame that the serial signals couldn't be routed through to the cartridge port on the master. Sticking a Pi Zero in a cartridge would make for a really neat debug cart :lol:

https://hackaday.com/2015/09/18/transpa ... al-bridge/ looks like a better bet. Should be able to power off at will.

Jk

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

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by Elminster » Fri Sep 07, 2018 8:20 am

johnkenyon wrote:
Fri Sep 07, 2018 12:07 am

https://hackaday.com/2015/09/18/transpa ... al-bridge/ looks like a better bet. Should be able to power off at will.

Jk
That is exactly what the ESP wifi module does on RC2014. Probably Spencer took the idea form Hackaday page.

https://rc2014.co.uk/modules/esp8266-wifi-module/

Maybe it could be squeezed into Daniel's Beeb FreeWifi module.

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

Re: Pi-based Co-Pro on the cheap - 100MHz 6502 for £10? (now 274MHz)

Post by danielj » Fri Sep 07, 2018 8:48 am

The freefi would be complete overkill - you don't need RS232 level anything for this. Just the esp module. A NodeMCU would be easier.
Last edited by danielj on Fri Sep 07, 2018 8:49 am, edited 1 time in total.

Post Reply