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

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
User avatar
vanekp
Posts: 539
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands
Contact:

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

Post by vanekp » Thu Oct 19, 2017 9:27 pm

inside of beeb shot I sent before I took the ram board out Image
setup you mean like what roms I have loaded ?

User avatar
hoglet
Posts: 7114
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 Oct 19, 2017 9:30 pm

It's hard to make anything out on that photo, as it's only 400px wide!

I'm just trying to avoid asking you loads of point questions about your setup - a few decent pictures can really help.

I'd like to be able to see the Issue of the main board, what sort of 6502 is fitted, any other atypical hardware, how the Pi is connected, how it's powered, etc, etc.

User avatar
vanekp
Posts: 539
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands
Contact:

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

Post by vanekp » Thu Oct 19, 2017 9:39 pm

okay will look at it tomorrow as its getting rather late now time to sleep, so will send more then and won't reduce the photo size either.
its a standard 6502 processor, only extra hardware is the rom/ramboard and was powering the Pi 3 from the BBC (jumper in on the converter board)
But will send some better pics tomorrow.
Thanks for your help so far.
Peter.

User avatar
KenLowe
Posts: 283
Joined: Mon Oct 18, 2004 4:35 pm
Location: Scotland
Contact:

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

Post by KenLowe » Thu Oct 19, 2017 10:09 pm

hoglet wrote:I think the problem is you 32K RAM board, even when disabled, seems to stop PiTubeDirect working reliably. Another user (KenLowe) discovered this a few months ago:
viewtopic.php?p=172451#p172451
Although test results varied between having the RAM board installed and removed, I'm pretty sure the issue I had turned out to be with the Cobra release. I don't think I've seen any issues once I upgraded to DiamondBack - even with the RAM board plugged back in. I'll set up that system again tomorrow and test.

Edit: Got a chance to test this evening, and I can confirm that the CoPro is working perfectly for me with Watford 32k Shadow RAM board installed. Note that I have the CoPro running on a RPiZeroW with a close coupled Kjell Sundby level shifter. I don't have any ribbon cable running between the tube edge connector and the level shifter. I also have a Kjell Sundby 256k ROM/RAM board installed in this machine.
hoglet wrote:I don't have access to one of these, so I've not had a chance to debug the issue
Happy to lend you one of my boards if that would help.
vanekp wrote:inside of beeb shot I sent before I took the ram board out
What is that odd block mounted to the side of the case next to the PSU? Is it a fan?

User avatar
vanekp
Posts: 539
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands
Contact:

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

Post by vanekp » Fri Oct 20, 2017 4:04 pm

Yes it's a cooling fan to the left, I find the BBC psu's get far to hot for my liking so have fitted forced cooling on it.
Here are some new photos of my BBC:-
Pi3 with cable attached
SDC14724.JPG
Pi3 (no cables attached)
SDC14723.JPG
MMC card reader
SDC14720.JPG
BBC
SDC14719.JPG
Files I unzipped from here on to a SD card formated FAT32
Pi3CoProFiles.png
When I tried to power the Pi3 with it's own power supply I get no tube msg at all, it only displays something if I power it from the BBC (i.e. it starts up at the same time as the bbc).

User avatar
hoglet
Posts: 7114
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 Oct 20, 2017 4:39 pm

Thanks for the photos - I can't see anything obviously wrong there.

Does it always power up successfully, and always fail on a subsequent BREAK?

If so, from the symptoms, I'm wondering if there is a break somewhere in the reset line between the Beeb and the Pi. This would explain why it's recognised on first power up, but not on subsequent breaks. This could be in one of several places (the Beeb, the cable, the level shifter, or on the Pi itself).

Do you have a serial cable for your Pi (it would attach to the three-pin header on the level shifter)? If so, I can talk you through testing with the debug build. That log lots of useful info s to the serial port, including whether reset is detected.

Another test you could try is on initial power up, the just type OLD and then RUN and that will run the SPHERE benchmark, which is pre-loaded into the 6502 Co Pro on the Pi. This is a good test of overall stability, as graphical glitches are very obvious. If that run's successfully for a while (10 minutes say) than that would reinforce the issue is a problem with reset.

Also, do you have a multimeter. We could use that to test whether Reset is getting as far as the Pi.

Dave

dp11
Posts: 797
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 Oct 20, 2017 4:45 pm

close up photos of both sides of the level shifter would be useful.

User avatar
vanekp
Posts: 539
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands
Contact:

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

Post by vanekp » Fri Oct 20, 2017 4:56 pm

20171020_185241.jpg
20171020_185222.jpg
Here are pics of the level converter, its brand new came in the post yesterday and the cable I am using was a bough made up cable also arrived yesterday.
And yes if I power it from the BBC it always comes up with the 2nd processor message on switch on only.

User avatar
KenLowe
Posts: 283
Joined: Mon Oct 18, 2004 4:35 pm
Location: Scotland
Contact:

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

Post by KenLowe » Fri Oct 20, 2017 5:01 pm

Is that a photo of your actual level shifter? It shows jumper JP1 set.

The photo you posted earlier shows it removed. If you're powering the Pi externally, then the jumper should be removed.

User avatar
vanekp
Posts: 539
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands
Contact:

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

Post by vanekp » Fri Oct 20, 2017 5:13 pm

I only get something if I power the Pi from the bbc, had removed it to try it with its own power source but I got nothing and know it must not be in if you are using it from an external power source :wink:
And yes that is the photo of my level converter that I am using to try to get it working.

User avatar
KenLowe
Posts: 283
Joined: Mon Oct 18, 2004 4:35 pm
Location: Scotland
Contact:

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

Post by KenLowe » Fri Oct 20, 2017 5:24 pm

Are the tube connector pins on the BBC board clean? They can get tarnished over time, and the connection can become unreliable. It might be worth repeatedly removing and re-inserting the ribbon cable to try and clean them up a bit and then try again.

I'm also puzzled to know why the external supply doesn't work. I assume the PI does power up with the external PSU?

User avatar
hoglet
Posts: 7114
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 Oct 20, 2017 5:28 pm

KenLowe wrote: I'm also puzzled to know why the external supply doesn't work. I assume the PI does power up with the external PSU?
That might be related to the reset issue. If the Pi is getting powered up first, and then not seeing a reset from the Beeb, then initial reset message will be lost.

Does anything change if you power the Beeb up first, and then the Pi?

Do try the SPHERE benchmark for a while, and let us know if you have a serial cable or a multi meter...

User avatar
hoglet
Posts: 7114
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 Oct 20, 2017 5:34 pm

KenLowe wrote: It might be worth repeatedly removing and re-inserting the ribbon cable to try and clean them up a bit and then try again.
If you have never used the Tube connector before, then this is definitely worth doing. Anecdotally, it takes about 10-20 insert/remove cycles to clean a tarnished socket.

User avatar
vanekp
Posts: 539
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands
Contact:

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

Post by vanekp » Fri Oct 20, 2017 7:16 pm

gremlins.......
Checked the reset line pin 10 on tube side it goes from 4.89v to 0v when pressing break and the line on the Pi side pin 7 goes from 3.31v to 0v
while I was doing the checks all of a sudden the second processor started to work...... not sure if this is temperature related, but will see after its been off for some time.
But boots up fine each time now.
Low Clk speed test.
20171020_204142.jpg
High Clk speed test.
20171020_204222.jpg
Tube/Enhanced version of Elite also works at both speeds.
20171020_211217.jpg
I am confused as to why it suddenly decided to work, will see if it still works tomorrow.
That was after insterting and removing the connector several times, but maybe it was the connector as when I just moved it now with elite running it crashed on me, and no I have not used the tube since got this BBC a few years ago.

User avatar
hoglet
Posts: 7114
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 Oct 20, 2017 7:55 pm

This does sound like a cabling or connector tarnish issue. Do keep us posted on progress.

User avatar
vanekp
Posts: 539
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands
Contact:

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

Post by vanekp » Fri Oct 20, 2017 9:01 pm

Will do and thanks Dave and all the others for your help in getting it going.

User avatar
trixster
Posts: 588
Joined: Wed May 06, 2015 11:45 am
Location: York
Contact:

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

Post by trixster » Fri Oct 20, 2017 9:08 pm

Hi guys,

I had some issues getting my Pi2 running alongside a WE Ram card. With an approx 15cm cable from Tube to gpio I found I had to halve the cable length from the 6502 socket to the socket on the WE card. Any longer cable length seemed to stop things working. With that cable length I also found I had to overclock the core of the Pi2 to compensate - up to about 450mhz or so. This was with the pre-anaconda builds. I couldn't get anaconda or boa to work and o never got around to trying dp11's timing tweak.

With a PiZero and sundbyk level convertor the WE card works fine with the latest Diamondback release.
A3020 | A3000 | A420/1 | BBC B + 128K RAM/ROM + 20K Shadow + Pi0 + VideoNuLA
Master Turbo + DC + BeebSID | Atom | A4000 060 | A3000 060 | A1200 060 | A500
Atari Falcon 060 | Saturn | PS1 | SNES | CPC6128 | C64 | 3DO | MD | Jaguar

Andrewcee
Posts: 51
Joined: Thu Sep 21, 2017 4:27 pm
Location: Swindon
Contact:

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

Post by Andrewcee » Thu Nov 09, 2017 11:01 am

Another success story... Now to get each of the processor options working. Brilliant fun, thanks!!
Attachments
76DD21B6-C607-473C-BB17-C7A323849D98.jpeg
Master 128 with Turbo MMC & 3.5” floppies (thanks Martin!)
CE3FCF1E-07BA-4B12-BE70-D1A07A641CC6.jpeg
BBC B with Solidisk 4meg 256k fitted...
41C1173A-10BB-4C57-9096-66BD66D4E80A.jpeg
Runs fine at 2meg
193781F5-1019-4DEF-8173-ABD75A339238.jpeg
Hangs at 4Meg


dp11
Posts: 797
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 » Thu Nov 09, 2017 10:49 pm

Does anyone know if solidisk at 4MHz ends up overclocking the tube? If so I'm afraid it is very unlikely to ever work.

cmorley
Posts: 459
Joined: Sat Jul 30, 2016 7:11 pm
Location: Oxford
Contact:

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

Post by cmorley » Fri Nov 10, 2017 8:12 am

dp11 wrote:Does anyone know if solidisk at 4MHz ends up overclocking the tube? If so I'm afraid it is very unlikely to ever work.
I'd doubt that but it may interfere with phi1 like the WE 32K RAM does. That could throw your timing off as 2MHzE is derieved from phi1 not phi2O on the Beeb IIRC.

I'd love to see a schematic for the 4meg board. Mine works so I'm not going to desolder everything to put it on a flatbed scanner!

dp11
Posts: 797
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 Nov 10, 2017 8:33 am

I doubt it too. Would you consider sketch out the circuits around the clocks?

In the config file you can adjust the sampling point that might help.

Andrewcee
Posts: 51
Joined: Thu Sep 21, 2017 4:27 pm
Location: Swindon
Contact:

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

Post by Andrewcee » Fri Nov 10, 2017 9:32 am

Recently got to know how the STL256 rom select works on main pcb having attempted the 'diy 256meg rom/ram upgrade' on my Beeb, essentially it takes over from the rom select chip, ic76. Makes sense as it has to also switch its own roms and swr. Best I can see can use only up to 128k Roms on the main pcb. Be interesting understanding the clocking too. Apologies, bit off-topic.
Last edited by Andrewcee on Fri Nov 10, 2017 10:18 am, edited 4 times in total.

Andrewcee
Posts: 51
Joined: Thu Sep 21, 2017 4:27 pm
Location: Swindon
Contact:

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

Post by Andrewcee » Fri Nov 10, 2017 9:39 am

Managed to get CP/M working last night with Turbo MMC. Seems it likes a CP/M 'system disk' in drive 0 or A:. Still to succeed running anything other than dir a: & dir b: as machine (Master) hangs. Will try with floppy, i.e. DFS, once I can get Omnifop running on PC to write correctly formatted disks (fails with Omniflop driver error) or more likely, I can write to floppy from MMFS on Master.

northernbob
Posts: 76
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 » Fri Nov 24, 2017 1:39 pm

Can you confirm that this co=pro setup, requires a baremetal os booting on the pi ?
or does it not matter what OS boots on the pi ??

I dont have hardware to test this atmo. ive misplaced my pi and other reasons)

Came across this odd software, while doing some searches. its seems to be an altered bare metal os.

https://github.com/bestm80eva/NextSpecOS

its not really clear, what its meant to do. I assumed it was to do with using the pi as an accelerator, but really thats a guess.

It may be of some interest, tbh it seems to have been a project, started but abandoned?

anyway, very interesting thread )

dp11
Posts: 797
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 Nov 24, 2017 3:06 pm

Yes this thread is all about a bare metal ( for maximum performance) Co Pro for the BBC micro and with AP5 electron too.

We have tried to make it as simple as we can to get to work. You will need a level shifter board and an SDCARD. Download the zip file and copy the contents to a blank SDCARD.

We have hundreds of users of this.

NextSpecOS is probably best discussed in another thread.

northernbob
Posts: 76
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 » Sat Nov 25, 2017 10:11 am

`NextSpecOS is probably best discussed in another thread.`

tbh mate i think you misunderstood me here.

the link i posted is an adaption of ian seylers bare metal os, but i dont have the gear to test it atmo.

in theory it should work, with a beeb pi, setup. its configured to boot on the pi...the z80 side of matters should be irrelevant.

AM very curious to find out if it actually works. Think i spoke to the writer about 6months ago, but havent heard from him since(i believe hes working in romania atmo).

if someone was bored and wanted to test it. I might have the chance to try it latter next week, but my aunty passed away this morning, so next week is gonna be very busy!!

User avatar
hoglet
Posts: 7114
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 Dec 05, 2017 5:15 pm

Hi all,

Just a quick note to say there's a new release candidate of Diamonback available (RC2):
https://github.com/hoglet67/PiTubeDirect/releases

Changes since RC1 (23rd June 2017):

Features:
- Updated 6809 Client ROM to 1.05 (8e9823ac)
- Added OPC5 Co Processor (in slot 5, experimental)
- Added OPC6 Co Processor (in slot 6, experimental)
- Added OPC7 Co Processor (in slot 7, experimental)
- Native ARM Co Pro: increased memory from 2MB to 16MB

Fixes:
- Tube ULA: make unused status bits read back as '1'
- Lib6502 Co Pro: Fix Bug in decimal flag in BRK instruction
- ARM Co Pro: Re-instate just the reset vector (word 0) on break
- Native ARM Co Pro: Restore probable missing else (command line args parsing)
- Native ARM Co Pro: fixed a hang with SWI &0C (GBPB) - thanks RobC

For more details on the OPC5/6/7 work, see: https://revaldinho.github.io/opc/

Dave

User avatar
fordp
Posts: 955
Joined: Sun Feb 12, 2012 9:08 pm
Location: Kent, England
Contact:

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

Post by fordp » Tue Dec 05, 2017 7:03 pm

cmorley wrote:
dp11 wrote:Does anyone know if solidisk at 4MHz ends up overclocking the tube? If so I'm afraid it is very unlikely to ever work.
I'd doubt that but it may interfere with phi1 like the WE 32K RAM does. That could throw your timing off as 2MHzE is derieved from phi1 not phi2O on the Beeb IIRC.

I'd love to see a schematic for the 4meg board. Mine works so I'm not going to desolder everything to put it on a flatbed scanner!
Sorry I just noticed this. The hang may be caused by the tube code running faster. I read that the 4M board runs the ROMs plugged in to the 4M board faster. It may be worth moving the filing system rom to the normal ROM sockets if they are not there already.
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

crj
Posts: 834
Joined: Thu May 02, 2013 4:58 pm
Contact:

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

Post by crj » Tue Dec 05, 2017 7:57 pm

Hmm.

I realise I always assumed that disc/Econet filesystems accessed the Tube directly from their NMI handlers when loading or saving to/from a second processor, in which case in practice the delay NOPs would likely not be needed because the transfer was slow enough anyway.

If this is an issue, I guess it's loading into the host processor then separately copying it across. But... where is it allowed to put the data temporarily? I thought the application in the second processor also "owned" PAGE to HIMEM in the host processor.

Post Reply