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
fordp
Posts: 1042
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 » Thu Feb 16, 2017 1:21 pm

Well we have not pushed the boundaries of the Native ARM Copro for a while.

I did some digging and found this:
https://www.riscosopen.org:8443/forum/f ... er_page=50

It is good to dream ;)

It makes some reference to BBC Basic with VFP (Hardware Floating Point)
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
TheCorfiot
Posts: 671
Joined: Mon Jan 08, 2007 5:22 pm
Contact:

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

Post by TheCorfiot » Sat Feb 18, 2017 1:25 pm

I have just installed a PiZero into my Test Master128 With IDE using kjell's excellent Interface board and I am truly blown away by the stability of the system.

Congrats to all involved esp Hoglet, you sir are a GENIUS

:)

User avatar
trixster
Posts: 992
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 » Sat Feb 18, 2017 1:30 pm

They really are, it's a tremendous effort!
A3020 | A3000 | A420/1 | BBC B | Master Turbo | ZX48K | NeoGeo
Atom | Amiga A4000 | A3000 | A1200 | A500 | PC Engine | Enterprise
Falcon | Saturn | PS1 | SNES | CPC6128 | C64 | 3DO | MD | Jaguar | X68000 | CD32

dp11
Posts: 984
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 Feb 18, 2017 1:38 pm

More improvements in the pipeline too :)

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

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

Post by jgharston » Sun Feb 19, 2017 4:05 pm

Right, I've set aside a chunk of time, cleared my desk, and have everything prepared. I'm going to attempt to methodically, step by step, convert my Raspberry into a PiCoPro.

Code: Select all

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

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

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

Post by jgharston » Sun Feb 19, 2017 5:56 pm

Grrr. I don't know how I managed to miss this before starting:
Image

Ok, where do I apply the angle grinder?

Code: Select all

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

User avatar
hoglet
Posts: 8927
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 » Sun Feb 19, 2017 5:59 pm

It can be desoldered, but it's a bit of a pig! You have to go around the pins one at a time and easy the socket out bit-by-bit. It takes about 5 minutes.

Dave

User avatar
BigEd
Posts: 2846
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 » Sun Feb 19, 2017 6:09 pm

I'm reliably informed you can apply side-cutters to the 3 metal lugs and get rid of the socket that way - you don't even need to desolder the remains of the lugs.

mschmalenbach
Posts: 29
Joined: Sun Jun 26, 2016 3:01 pm
Location: Maricopa, AZ, USA
Contact:

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

Post by mschmalenbach » Sat Feb 25, 2017 7:16 pm

All

Now I have finally found some spare time, I've got my BBC Master 128 out, it has RetroClinic datacenter installed, and ADFS.

I've connected up my Pi Zero with the Anaconda release, via a level shifter board from Kjell.

I've been kicking around looking for some final setup instructions or descriptions of how to kick the tires with this thing.
I've not altered the config.txt file for the Anaconda install.

The Beeb powers up fine, but I don't know how to see if the PiTube is working, and if so, which copro it is running in/as.
I'd like to get to the point where the thing is running as a fast 6502, with more memory available for BASIC.

EDIT: I should add that the PiZero is not being powered externally - when I have applied power externally, the Beeb wouldn't boot. I applied the power to the Pi Zero after the Beeb had booted, did the CTRL-BREAK twice, all, OK. But couldn't see any difference etc in behaviour of the machine... then shut the Beeb off via it's switch at the back left of the unit, and it stayed powered up - I guess via the Pi Zero!!?? That doesn't seem right to me...!

Any help/pointers and associated abuse for a noob to all this gratefully received!

Cheers

Martin
==================================================
Martin 'Harry' Schmalenbach
BBC Master 128, DataCenter, and some real grey hair!
A Brit living in Arizona, because...

dp11
Posts: 984
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 Feb 25, 2017 7:30 pm

try
*CO.TUBE
*CO.EXTUBE
and then ctrl break

User avatar
boba
Posts: 92
Joined: Mon Jul 16, 2012 7:43 pm
Location: The Kingdom of Fife
Contact:

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

Post by boba » Sat Feb 25, 2017 7:32 pm

There's a jumper on Kjell's board which you make (usually comes like this) to power from the Master and disconnect if powering externally. Sounds like you've left it installed when you had external power.

You can check if everything is working by the header after a Control-Break which tells you which CoPro is running. Default is the fast 6502 IIRC. mine never comes up with the Master from cold, but always kicks in on the first Control-Break.

If no results you can check if the Pi is coming up OK by connecting a terminal / PC-with-emulator to the header on Kjell's board. You should see a lengthy chit-chat as it comes up.

User avatar
BigEd
Posts: 2846
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 » Sat Feb 25, 2017 7:35 pm

I'm working on a story of what to do on each flavour of core on the PITubeDirect:
https://github.com/hoglet67/PiTubeDirec ... CoPro-core
(Edit: update link for renamed page)

But it's not, presently, a complete set of instructions.

If in doubt, control-break. There's no specific way to tell which copro you have enabled, but each has a different announcement at break. As Dominic says, make sure you have the tube enabled and appropriately configured.

The wiki document is meant to apply to the upcoming 'boa' release, but almost all of it will apply to the present 'anaconda' release.
Last edited by BigEd on Tue Dec 05, 2017 10:14 am, edited 2 times in total.

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

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

Post by jms2 » Sat Feb 25, 2017 8:14 pm

Looking forward to reading it, but before I do, the link got a bit mangled and doesn't work - this one does though.

mschmalenbach
Posts: 29
Joined: Sun Jun 26, 2016 3:01 pm
Location: Maricopa, AZ, USA
Contact:

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

Post by mschmalenbach » Sat Feb 25, 2017 8:58 pm

dp11 wrote:try
*CO.TUBE
*CO.EXTUBE
and then ctrl break
Thanks dp11 - I tried that - couldn't see any difference - no error messages, no other messages saying anything about any coprocessors - just "ACORN MOS" and then "Acorn ADFS" and then "BASIC".

I took care of the jumper issue that was referenced by another kind member.

:(
==================================================
Martin 'Harry' Schmalenbach
BBC Master 128, DataCenter, and some real grey hair!
A Brit living in Arizona, because...

mschmalenbach
Posts: 29
Joined: Sun Jun 26, 2016 3:01 pm
Location: Maricopa, AZ, USA
Contact:

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

Post by mschmalenbach » Sat Feb 25, 2017 9:01 pm

boba wrote:There's a jumper on Kjell's board which you make (usually comes like this) to power from the Master and disconnect if powering externally. Sounds like you've left it installed when you had external power.

You can check if everything is working by the header after a Control-Break which tells you which CoPro is running. Default is the fast 6502 IIRC. mine never comes up with the Master from cold, but always kicks in on the first Control-Break.

If no results you can check if the Pi is coming up OK by connecting a terminal / PC-with-emulator to the header on Kjell's board. You should see a lengthy chit-chat as it comes up.
Thanks boba.

I tried all that - no joy (per my reply to dp11 above).

The next is to try the terminal link to the PC to see what the little thing is saying as it comes up.
Do I need to do anything special with the terminal connection?
I'll have to dig out my RS232 to USB breakout board somewhere, and the soldering iron, but that's half the fun, right? ;)

Cheers

Martin
==================================================
Martin 'Harry' Schmalenbach
BBC Master 128, DataCenter, and some real grey hair!
A Brit living in Arizona, because...

User avatar
BigEd
Posts: 2846
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 » Sat Feb 25, 2017 9:05 pm

As boba says, you should power the Pi from the host, with the link in place, and not power it by other means. If all is well, removing the link will turn the green LED off, and putting it back will turn the green LED on. The LED will also toggle when the host communicates over the Tube, so a control-break should (I think) cause the LED to wink.

If you've never seen your copro working, double check that your cable (if any) is the right way around, and that the adapter board is connected to the pi the right way around. For reference, use the various pictures in this thread:
viewtopic.php?f=8&t=11761

mschmalenbach
Posts: 29
Joined: Sun Jun 26, 2016 3:01 pm
Location: Maricopa, AZ, USA
Contact:

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

Post by mschmalenbach » Sat Feb 25, 2017 9:32 pm

BigEd wrote:As boba says, you should power the Pi from the host, with the link in place, and not power it by other means. If all is well, removing the link will turn the green LED off, and putting it back will turn the green LED on. The LED will also toggle when the host communicates over the Tube, so a control-break should (I think) cause the LED to wink.

If you've never seen your copro working, double check that your cable (if any) is the right way around, and that the adapter board is connected to the pi the right way around. For reference, use the various pictures in this thread:
viewtopic.php?f=8&t=11761
Thanks BigED.

I'm powering now solely from the Beeb.

I edited the config.txt file, which now contains this:

Code: Select all

# Over clocking settings
arm_freq=1000
core_freq=400
force_turbo=1

# Disable adjusting the refresh rate of RAM every 500 ms
disable_pvt=1
When I did this I got a regularly blinking LED which apparently indicates TUBE activity.

But I got no change in behaviour on the Beeb.

I then added in this file 'cmdline.txt' to the SD card:

Code: Select all

copro=1
I got no change in behaviour of the Beeb or the PiZero - still the same blinking of the green LED.

I tried connecting it different ways and I'm pretty sure I have that right (Beeb either doesn't boot or something on the PiZero gets very hot very quickly!, but both are still working fine!).

So right now I'm a little stumped.

I know I'm missing something small, even silly, and I'll kick myself once somebody points it out, but so far, nada :(

EDIT: I've tried the *CO. commands as previously suggested, and then looking at the values for PAGE and HIMEM - they are &E00 and &7C00 respectively.
Last edited by mschmalenbach on Sat Feb 25, 2017 9:35 pm, edited 1 time in total.
==================================================
Martin 'Harry' Schmalenbach
BBC Master 128, DataCenter, and some real grey hair!
A Brit living in Arizona, because...

dp11
Posts: 984
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 Feb 25, 2017 9:34 pm

Take a photo and post it here too. if you can see the LED on the pi take a video of what happens when you turn the machine on and when you press ctrl break.

User avatar
BigEd
Posts: 2846
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 » Sat Feb 25, 2017 9:37 pm

If the LED flashes constantly at about twice a second, it means something went wrong on the Pi. Possibly the card has the wrong files, or files with the wrong content, or has gone bad, or has a bad connection. Best way is to unzip the release onto a freshly formatted card - you can get a zip file from
https://github.com/hoglet67/PiTubeDirect/releases

I'd say don't tweak any files until you have the pristine release working.

mschmalenbach
Posts: 29
Joined: Sun Jun 26, 2016 3:01 pm
Location: Maricopa, AZ, USA
Contact:

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

Post by mschmalenbach » Sat Feb 25, 2017 10:02 pm

dp11 wrote:Take a photo and post it here too. if you can see the LED on the pi take a video of what happens when you turn the machine on and when you press ctrl break.
OK - there are 3 videos, which you should be able to find at
https://www.dropbox.com/sh/ag0jq5gnxyzl ... FXT0a?dl=0

I very much appreciate all the time, effort & help with this.

:-D
==================================================
Martin 'Harry' Schmalenbach
BBC Master 128, DataCenter, and some real grey hair!
A Brit living in Arizona, because...

dp11
Posts: 984
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 Feb 25, 2017 10:08 pm

I would try re formatting the sdcard. and copying the anaconda release files over after unziping.

User avatar
hoglet
Posts: 8927
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 » Sat Feb 25, 2017 10:09 pm

On the Master, even though your PiTibeDirect is external, it's more reliable to use

Code: Select all

*CONF. INTUBE
Can you just say a few words about how you built your SD card? What release did you use?

With the Anaconda release there is minimal (i.e. none!) debug output on the serial console, unless you switch in a debug kernel.

Dave
Last edited by hoglet on Sat Feb 25, 2017 10:10 pm, edited 1 time in total.

User avatar
BigEd
Posts: 2846
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 » Sat Feb 25, 2017 10:10 pm

Ah - four flashes, repeated. I think that does mean the Pi is unhappy about the files on the SD Card. Although I haven't searched for it.

Do you have a clean install from the zip of the release?

The pi forums say this:
Firmware since 20th October 2012 no longer requires loader.bin, and the flashes mean: 3 flashes: start.elf not found 4 flashes: start.elf not launched 7 flashes: kernel.img not found 8 flashes: SDRAM not recognised. You need newer bootcode.bin/start.elf firmware.

User avatar
hoglet
Posts: 8927
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 » Sat Feb 25, 2017 10:16 pm

A possible area of confusion for new users is the wiki instructions are woe-fully out of data, specifically these pages:
https://github.com/hoglet67/PiTubeDirec ... ng-on-a-Pi
https://github.com/hoglet67/PiTubeDirec ... xt-options

It's now much simpler:
- format SD Card to FAT32
- unzip PiTubeDirect_Anaconda.zip release package from https://github.com/hoglet67/PiTubeDirec ... g/anaconda

All files you need are in the release package, and no tweaking should be needed to get this running on a Zero.

Things have changed so much in the last few months that we really should do a complete pass through the wiki and review/clean up everything.

Dave

User avatar
BigEd
Posts: 2846
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 » Sat Feb 25, 2017 10:23 pm

(I've made a quick update to those pages - feel free, of course, to improve my effort!)

mschmalenbach
Posts: 29
Joined: Sun Jun 26, 2016 3:01 pm
Location: Maricopa, AZ, USA
Contact:

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

Post by mschmalenbach » Sat Feb 25, 2017 11:57 pm

hoglet wrote:A possible area of confusion for new users is the wiki instructions are woe-fully out of data, specifically these pages:
https://github.com/hoglet67/PiTubeDirec ... ng-on-a-Pi
https://github.com/hoglet67/PiTubeDirec ... xt-options

It's now much simpler:
- format SD Card to FAT32
- unzip PiTubeDirect_Anaconda.zip release package from https://github.com/hoglet67/PiTubeDirec ... g/anaconda

All files you need are in the release package, and no tweaking should be needed to get this running on a Zero.

Things have changed so much in the last few months that we really should do a complete pass through the wiki and review/clean up everything.

Dave
Thanks Dave.

I did a new install - reformatted the 4Gb SD card to FAT32 (it said it was that already, but still...)
I downloaded a new copy of the anaconda zip file, and expanded it out on to the SD card.
I tweaked nothing.

Then I installed it in the PiZero, and powered up the Beeb.

I got 2 regular flashes of the green LED on the PiZero. then they stopped.
Then the Beeb welcome banenr came up - same as before - no mention of a co processor.

Then I entered these commands on the Beeb:

Code: Select all

*CO.TUBE
*CONF. INTUBE
Then I pressed CTRL-BREAK.

The green LED came on on the PiZero and stayed on.
PAGE and HIMEM are unchanged at &E00 and &7C00
No banner changes.

I did a second CTRL-BREAK and the green LED on the PiZero went out.
No change to the banner.

A *FX 151,230,1 got the Green LED back on, and then with the CTRL-BREAK it went out again.

I do have a Retroclinic DataCenter installed internally, to the 1MHz bus - I've unplugged that - no joy.

:(

EDIT: I've tried another SD card - same
Also, I rebooted the PiZero in question with the NOOBS software - it boots nicely in to a windows desktop.

I'm now going to try a second PiZero...
==================================================
Martin 'Harry' Schmalenbach
BBC Master 128, DataCenter, and some real grey hair!
A Brit living in Arizona, because...

mschmalenbach
Posts: 29
Joined: Sun Jun 26, 2016 3:01 pm
Location: Maricopa, AZ, USA
Contact:

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

Post by mschmalenbach » Sun Feb 26, 2017 12:17 am

OK - tried a second PiZero - it boots happily in to the NOOB windows environment - just like the other PiZero board.
But it won't behave any differently than before.

:(
==================================================
Martin 'Harry' Schmalenbach
BBC Master 128, DataCenter, and some real grey hair!
A Brit living in Arizona, because...

User avatar
BigEd
Posts: 2846
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 » Sun Feb 26, 2017 6:57 am

It's a good sign that the LED is toggling on each Tube communication - that means the Pi is doing something sensible and the host is communicating with it. Doing a *FX 151,230 is a good test of that.

The first question I'd have, I think, is why the host is not finding that there's something on the far side of the Tube.

Can you do a
*STATUS
and
*ROMS
and let us know what you see?

I think we have the beginnings of a troubleshooting guide in this conversation - we'll write it up when we've got your system running!

User avatar
hoglet
Posts: 8927
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 » Sun Feb 26, 2017 7:24 am

Could you try the following test program:

Code: Select all

10 FOR A=0 TO 7
20 PRINT A,~A?&FEE0
30 NEXT
40 ?&FEE0=&7F
50 PRINT ~?&FEE0
60 ?&FEE0=&FF
70 PRINT ~?&FEE0
80 ?&FEE0=&7F
90 PRINT ~?&FEE0
This should let us see if there is anything connected to the Tube.

Dave

dp11
Posts: 984
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 » Sun Feb 26, 2017 7:33 am

Dave , might need to set the magic bit to ensure external tube accesses.

Might be worth a check for bent pins on the tube connector on the master.

Post Reply