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
KenLowe
Posts: 323
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 » Sat Jan 20, 2018 9:32 pm

I'm not personally affected by this issue (don't have any master boards), but what great service from someone who is effectively doing this as a bit of a hobby =D> =D> =D>. Couldn't ask for more!

sundbyk
Posts: 86
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 » Sun Jan 21, 2018 10:26 am

KenLowe wrote:I'm not personally affected by this issue (don't have any master boards), but what great service from someone who is effectively doing this as a bit of a hobby =D> =D> =D>. Couldn't ask for more!
Thanks Ken,

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

dp11
Posts: 813
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 Mar 25, 2018 2:58 pm

With the release of a new raspberry pi ( RPi3B+) it is time for a new release of PiTubeDirect to support it.

Highlights of this beta release :

Added support for RPi3B+
Static Analysis tidying up
Fast 6502 performance increased to about 290MHz for PiZero and 336MHz for RPi3B+
Simplified config.txt to also support PiZeroW out of the box .

Potential change you might notice :

To support the new RPi3B+ there is new raspberry pi firmware this is slightly slower to boot than the original firmware that was being used. This might mean from power on the beeb may not boot into the copro first time ( some beebs booted so fast they never did boot into the copro at power up). Just do a ctrl break and the copro should be present.

Unzip the attached zip file to your SDCARD and off you go.

NB the original 6502 copro was clocked at 3MHz so with a new RPi3B+ you could now have over 111 times the performance !

Let us know any issues you might have.
Attachments
EggEater250318.zip
PiTubeDirectEggEater250318
(1.38 MiB) Downloaded 30 times

User avatar
marcusjambler
Posts: 389
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 » Sun Mar 25, 2018 8:39 pm

=D> =D> =D>
Really tempted to get a Pi 3B+...
Any hoo, heres a screen shot of 'eggeater' release on my Pi Zero.
I think the internal Master connection gives it a speed boost
IMG_3292a.jpg

User avatar
BigEd
Posts: 1967
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 Mar 25, 2018 8:42 pm

(If you're on a Master, you're running Basic 4, so you need to run a differently-calibrated ClockSp program, or find a way to run Basic 2 from sideways RAM. I've fallen into exactly this, and wondered at the speed reading.)


dp11
Posts: 813
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 Mar 25, 2018 8:48 pm

BigEd beat me to it. I run on a master using the internal tube . I have BASIC II in a ROM for timing purposes. I might sometime have to have a more physically stable test rig as I've regularly swapping between Pis

User avatar
marcusjambler
Posts: 389
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 » Sun Mar 25, 2018 8:52 pm

Hmmm. Will a standard BBC B Basic ROM suffice?
And *Insert / *unplug the desired one?
Last edited by marcusjambler on Sun Mar 25, 2018 10:37 pm, edited 1 time in total.

dp11
Posts: 813
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 Mar 25, 2018 8:54 pm

Standard ROM would be fine. Just *conf. lang <romnumber>

User avatar
marcusjambler
Posts: 389
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 » Sun Mar 25, 2018 9:13 pm

Thats making more sense now...
IMG_3294a.jpg

dp11
Posts: 813
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 Mar 25, 2018 9:18 pm

Excellent. NB Basic IV is perfectly fine to use and as you can see effectively faster.

User avatar
simoni
Posts: 415
Joined: Wed May 25, 2016 6:18 pm
Contact:

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

Post by simoni » Mon Mar 26, 2018 4:43 am

Quick question; I was under the impression that hoglet's github (hoglet67) was the primary place for the pitubedirect code; but I don't see the 'easteregg' version there (or any commits since Dec 2017). Where is the version control for this latest beta release and is there an intention to merge it, or has another fork become the main release now?

dp11
Posts: 813
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 » Mon Mar 26, 2018 5:57 am

All the work is checked into the "egg-eater-dev" dev branch not "easter egg" which doesn't exist. Dave built it yesterday from github to test and spotted an issue which was fixed. Hoglet bigEd and myself are in regular contact over the project.

User avatar
simoni
Posts: 415
Joined: Wed May 25, 2016 6:18 pm
Contact:

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

Post by simoni » Mon Mar 26, 2018 6:35 am

Ah, ok - I should have looked more closely at the dev branches :) I've always downloaded the releases from the github links before, so I was curious why a .zip was posted. As always, thanks for all the work!

User avatar
mlouka
Posts: 47
Joined: Wed Sep 27, 2017 3:57 pm
Location: Halden, Norway
Contact:

Temp20180404

Post by mlouka » Wed Apr 04, 2018 4:53 pm

In case others will find this useful, this is my little cheat sheet for the FX calls. Print it out at 100%, cut it to size, then leave it on top of your beeb for easy access.
Attachments
PiTubeDirect-Info.pdf
(32.78 KiB) Downloaded 88 times
BBC Master 128, BBC Model B i7, Watford Electronics Solderless Sideways ROM board, PMS B2P-6502 2nd proc., PiTubeDirect (both internal and external), RetroClinic Multi-OS Selector, Sundby 256k RAM/ROM card, MMFS, ++

User avatar
fordp
Posts: 958
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 Apr 05, 2018 12:27 pm

I just saw this Bare Metal serial terminal project and thought it may be of use as a base for an acorn project (including alongside the Pi Copro):

https://github.com/fbergama/pigfx
Last edited by fordp on Thu Apr 05, 2018 9:07 pm, edited 2 times in total.
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
mlouka
Posts: 47
Joined: Wed Sep 27, 2017 3:57 pm
Location: Halden, Norway
Contact:

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

Post by mlouka » Thu Apr 05, 2018 6:30 pm

fordp wrote:I just saw this Bare Metal serial terminal project and thought it may be of use as a base for an acorn project (including a long side the Pi Copro):

https://github.com/fbergama/pigfx
Interesting -- it uses uspi for USB-support and that project seems to be making interesting progress on bare metal support for accessing usb-devices:

https://github.com/rsta2/uspi
BBC Master 128, BBC Model B i7, Watford Electronics Solderless Sideways ROM board, PMS B2P-6502 2nd proc., PiTubeDirect (both internal and external), RetroClinic Multi-OS Selector, Sundby 256k RAM/ROM card, MMFS, ++

User avatar
Lardo Boffin
Posts: 1129
Joined: Thu Aug 06, 2015 6:47 am
Contact:

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

Post by Lardo Boffin » Sun May 13, 2018 6:32 am

Having just moved I have unpacked (mostly) my beeb stuff - I plugged in and switched on my pi3 co proc last night and the beeb hung at boot up.
Below is a photo of my co proc. It has been so long since I first set it up is it still jumpered correctly? It should be powered by the beeb.
A50A2EA1-A6B7-4BDD-B4AC-703301AA1649.jpeg
I assume I have the cable the right way round?

I have tested the pi on its own and it boots fine (swapping sd cards). When booted the red led on it glows. When connected to the beeb it doesn’t.
I have a 6502 cheese wedge somewhere in a box so will test that when I find it to make sure it is not the beeb at fault.
Any thoughts? :D
BBC model B 32k issue 4, 16k sideways RAM, Watford 12 ROM board, Retroclinic Datacentre + HDD, Viglen twin 40/80 5.25" discs, acorn cassette, Acorn 6502 coproc
BBC model B 32k issue 7, turboMMC, Opus Challenger 3 512k, Pi 3 coproc
BBC Master

User avatar
hoglet
Posts: 7353
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 May 13, 2018 6:38 am

Lardo Boffin wrote: I assume I have the cable the right way round?
It's impossible to say without being able to see the other end.

User avatar
Lardo Boffin
Posts: 1129
Joined: Thu Aug 06, 2015 6:47 am
Contact:

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

Post by Lardo Boffin » Sun May 13, 2018 7:21 am

hoglet wrote:
Lardo Boffin wrote: I assume I have the cable the right way round?
It's impossible to say without being able to see the other end.
Good point. In the orientation of the photo the notch at the beeb end is on the top. Will try and get a photo later.

Edit - photo added
CB0A5C43-DCF7-4E95-9D5D-1A1B808DA5FE.jpeg
BBC model B 32k issue 4, 16k sideways RAM, Watford 12 ROM board, Retroclinic Datacentre + HDD, Viglen twin 40/80 5.25" discs, acorn cassette, Acorn 6502 coproc
BBC model B 32k issue 7, turboMMC, Opus Challenger 3 512k, Pi 3 coproc
BBC Master

User avatar
Elminster
Posts: 2619
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 » Sun May 13, 2018 8:23 am

I am sure Hoglet will have a better answer but could you not just trace back power from pi, shift board to Beeb?

No light means no correct supply of power. Even a non booting pi should have a red light.

User avatar
Lardo Boffin
Posts: 1129
Joined: Thu Aug 06, 2015 6:47 am
Contact:

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

Post by Lardo Boffin » Sun May 13, 2018 8:36 am

Elminster wrote:I am sure Hoglet will have a better answer but could you not just trace back power from pi, shift board to Beeb?

No light means no correct supply of power. Even a non booting pi should have a red light.
I will try that when I find my tools! I hate moving house. [-X
BBC model B 32k issue 4, 16k sideways RAM, Watford 12 ROM board, Retroclinic Datacentre + HDD, Viglen twin 40/80 5.25" discs, acorn cassette, Acorn 6502 coproc
BBC model B 32k issue 7, turboMMC, Opus Challenger 3 512k, Pi 3 coproc
BBC Master

User avatar
Elminster
Posts: 2619
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 » Sun May 13, 2018 12:46 pm

I moved 6 years ago and decide to not move for about 100 years, besides can5 afford to keep paying stamp duty.

Have you tried using rodents, the live sort, when fur stands on end you have power.
Last edited by Elminster on Mon May 14, 2018 11:37 pm, edited 1 time in total.

User avatar
Lardo Boffin
Posts: 1129
Joined: Thu Aug 06, 2015 6:47 am
Contact:

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

Post by Lardo Boffin » Mon May 14, 2018 10:13 pm

Elminster wrote:I move 6 years ago and decide to not move for about 100 years, besides can5 afford to keep paying stamp duty.

Have you tried using rodents, the live sort, when fur stands on end you have power.
I may have to see if I can catch something small and furry...
I did manage to unpack my cheese wedge (maybe I can use this as bait?) and try that. The real 6502 co proc works fine.
BBC model B 32k issue 4, 16k sideways RAM, Watford 12 ROM board, Retroclinic Datacentre + HDD, Viglen twin 40/80 5.25" discs, acorn cassette, Acorn 6502 coproc
BBC model B 32k issue 7, turboMMC, Opus Challenger 3 512k, Pi 3 coproc
BBC Master

User avatar
Elminster
Posts: 2619
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 » Mon May 14, 2018 11:38 pm

Which means, I am sure you can guess the next question, do you have another cable or level shifter to try.

User avatar
hoglet
Posts: 7353
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 May 17, 2018 4:42 pm

Hello all,

I've just made available a first release candidate of the EggEater release of PiTubeDirect:
https://github.com/hoglet67/PiTubeDirect/releases

Here are the full release notes:

Features:
- Added support for the new Raspberry Pi 3 B+ model
- Simplified config.txt to also support Raspberry Pi ZeroW out of the box
- Performance improvements to 65C02 Co Pro (290MHz for PiZero and 336MHz for RPi3B+)
- Added a new PDP-11 Co Processor (in slot 11)
- Added full debugger support for the PDP-11 Co Processor
- Debugger improvements:
-- Improved help command
-- Added base command (output in hex or octal)
-- Added width command (allows 8-bit, 16-bit or 32-bit memory accesses)
-- Added an optional end address to dis and mem commands
-- Clean out debugger state when switching between Co Processors
-- Better error reporting

Fixes:
- Native ARM Co Processor now implements type 6/7 transfers
- Some of the Co Processors were incorrectly named in the debugger
- Static Analysis tidying up

Please do let us know if you spot any new issues in this release.

Dave

User avatar
fordp
Posts: 958
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 May 17, 2018 4:55 pm

hoglet wrote: - Added a new PDP-11 Co Processor (in slot 11)
Dave
Great to see a new version and PDP-11 support too.

Is the PDP "core" from elsewhere or new?
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

User avatar
BigEd
Posts: 1967
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 May 17, 2018 5:03 pm

Thanks for the new pre-release Dave!

(This is an actual egg-eater doing its thing.)

User avatar
hoglet
Posts: 7353
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 May 17, 2018 5:07 pm

fordp wrote: Is the PDP "core" from elsewhere or new?
It's from elsewhere:
https://github.com/davecheney/cpp11/

But I ended up having to fix quite a few bugs:

Code: Select all

3ec7d84b PDP-11 Co Pro - fixed a bug in ADD() (incorrect carry out)
9d6b77de PDP-11 Co Pro - fixed bug inserting an interrput into the prioritized queue
971c8bf1 PDP-11 Co Pro - fix ROR incorrectly setting Z flag
31aa04d3 PDP-11 Co Pro - fix SWAB incorrectly setting Z flag
a41816fd PDP-11 Co Pro - fix SUB incorrectly setting V flag
ef26c2c3 PDP-11 Co Pro - fix SBC incorrectly setting C and Z flags
02eaf775 PDP-11 Co Pro - fix ROR/ASR incorrectly setting V flag
26a45f3f PDP-11 Co Pro - fix incorrect branches (C xor different to C++)
fbe3d5ee PDP-11 Co Pro - fixed MARK instruction
1dcebb00 PDP-11 Co Pro - fix INC/INCB incorrectly setting V flag
079b658f PDP-11 Co Pro - fix NEGB incorrectly setting V flag
fc9fa831 PDP-11 Co Pro - fix ADCB incorrectly setting C and V flags
1b21667c PDP-11 Co Pro - fix SBCB incorrectly setting V flag
1b269956 PDP-11 Co Pro - fix SXT/SXTB incorrectly setting Z and V flags
e0c918e3 PDP-11 Co Pro - added MTPS/MFPS to emulator
fb255892 PDP-11 Co Pro - sign extend MFPS if da is a register
fb1b21aa PDP-11 Co Pro - don't allow setting of T bit in PS via @#177776
6f8ed251 PDP-11 Co Pro - switch modes as appropriate via @#177776
54ee0e9a PDP-11 Co Pro - fix MFPI/MTPI incorrectly setting C flag, and not clearing V flag
b95139fc PDP-11 Co Pro - support byte access to PSW via @#177776
5fa70a21 PDP-11 Co Pro - correct trap for invalid instruction
044edb25 PDP-11 Co Pro - fix CCC affecting more than NVZC flags
28ead39d PDP-11 Co Pro - illegal addressing modes should trap to 000004
30464aef PDP-11 Co Pro - fix ASH incorrectly calculating the V flag
a6fd4cef PDP-11 Co Pro - fix ASHC, several issues
1adde77f PDP-11 Co Pro - fix MUL incorrectly generating C flag
b019152d PDP-11 Co Pro - fix DIV, several issues
28bba0af PDP-11 Co Pro - added SPL to emulator
bfe384e4 PDP-11 Co Pro - fix SOB in disassembler
d26ed11c PDP-11 Co Pro - fix SOB
b47fe546 PDP-11 Co Pro - fix DIV for compat with 11/70
With hindsight, I probably should have started with the SimH code, but this core was far more compact, understandable and easy to extract from the original system.

Surprisingly, one one of these (the top one) prevented the Tube Client ROM from working,

DEC have some amazingly useful CPU diagnostic tests, so I've been working through those for a few of the models. I ended up building a standalone test harness, like we did for the NS32K:
https://github.com/hoglet67/PiTubeDirec ... /notes.txt
https://github.com/hoglet67/PiTubeDirec ... est/test.c

This is able to load the diagnostic program directly (they are in a weird block format).

Dave

User avatar
Elminster
Posts: 2619
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 » Thu May 17, 2018 8:54 pm

Is there any speed benefit using the 3b+ ? I have a couple of them but they are being used for other things currently. My pitube is still a pi2.

Post Reply