Author Topic: CPC / Raspberry Pi Bridge Card  (Read 10097 times)

0 Members and 1 Guest are viewing this topic.

Offline zhulien

  • 464 Plus
  • *****
  • Posts: 481
  • Country: au
    • 8bitology
  • Liked: 187
  • Likes Given: 138
CPC / Raspberry Pi Bridge Card
« on: 16:14, 08 May 16 »
Hi Everyone...


I am Julian, I am a very inactive active CPCer from the start  I have much to do...


Anyway, I have previous suggested the following to a couple of people and thought now is time to suggest to this forum and see if there is any interest.

I am wanting someone to partner with to create a hardware expansion for CPC.  Mostly it will be funded by me.

HW Requirements:


- as an Mother X4 expansion card - perhaps it can fit in the 5th slot (that is the through connector) so 5 cards can fit...
- lets the CPC user connect a Raspberry Pi directly to the expansion port
- if the cost is marginal to allow two Pi's to connect to the expansion port at the same time, will consider this


current Work In Progress circuit:

https://docs.google.com/spreadsheets/d/1bS1CLDIN0jPP3GI2pCcTU7_VIf2otQ10bVm-NL0F2eQ/edit#gid=0


SW Requirements:


- build a minimal communication method (API or just a pattern) between CPC and Pi C application.  From this pattern we can then pass data back and forth and work from there, whether the CPC is a dumb terminal to the Pi, or whether there is a greater integration through RSXs



[Added 20170128...
Ultimate Goal of this board when a Raspberry Pi 3B is attached:



- 16kb Memory Mapped I/O Space
- 512Mb General Use RAM 8192 x 64kb blocks accessed as 32768 x 16kb blocks (available in addition to other CPC RAM expansions) usable for data and turbomode
- ARMv8 Native code libraries callable from CPC covering:
   - text, window and 2d graphics primitives
   - opengl 3d graphics
   - video and mp3 playback
   - keyboard, joystick & mouse I/O
- Z80 CPU emulation to run code in turbomode (with fallback to standard CPC if PI board is not present)
- RSXs to make use of the above from BASIC
- a CPC ROM to make the above facilities more easily available without taking up too much of the CPC's RAM

...]


Possible Uses:

- run Z80 emulators on the Pi in parallel to CPC and offload Z80 code
- play NES and other games on your Amstrad CPC (ok, on the Pi... but do we only support Pi video? CPC video is it possible?  or... passthrough the video Genlock style?)
- use the Pi's ethernet from the CPC indirectly thereby gaining internet access
- use the Pi's USB and even HDMI as additional modes on CPC
- use the Pi's audio capabilities from the CPC
- use other PI facilities and RAM (as a RAM drive) from the CPC indirectly


Funding:


- well, I did say 'mostly' funded by me, so this can be done in a few ways.  I am not limited to the following suggestions but I am happy to kick off the project...
    - i fund it 100% and i retain 100% of profits from sales of it (I don't expect to make money from it, but recoup some of my costs if not all)
    - it is funded by myself in conjunction with the partner i can find

Other requirements:


- for me to fund you, you must have proven to have already created a commercial piece of CPC hardware or similar.

I am not a bottomless pit of money but just something fun for me to give to the CPC community (if it cannot even come even with cost)...  I am a software guy, not a hardware guy


Now, it is all in fun but if done in a pretty simple way as Pi's get upgraded we can replace them with newer Pis using this same bridge card.


Anyone want to discuss with me?


Julian (From Melbourne, Australia)
« Last Edit: 05:55, 08 February 17 by zhulien »

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 15.572
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 3139
  • Likes Given: 5794
Re: CPC / Raspberry Pi Bridge Card
« Reply #1 on: 18:21, 08 May 16 »
This is an interesting proposition. But, I think, before discussing funding etc we need to discuss what is feasible and useful with this setup...

Offline steve

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.263
  • Country: gb
  • Liked: 178
  • Likes Given: 210
Re: CPC / Raspberry Pi Bridge Card
« Reply #2 on: 20:54, 08 May 16 »
They used to link a CPC to a PC for software development, maybe the Pi could perform the same functions as the development PC?, secondly if we want doom like games on the CPC the Pi could function as a graphics terminal like CP/M required.

Offline zhulien

  • 464 Plus
  • *****
  • Posts: 481
  • Country: au
    • 8bitology
  • Liked: 187
  • Likes Given: 138
Re: CPC / Raspberry Pi Bridge Card
« Reply #3 on: 21:26, 08 May 16 »
Well if the hardware can be interfaced in a fairly efficient way so that the cpc can leverage off the pi hardware and the pi can be easily connected or removed so it is easily upgradable to future pi's then i am happy to fund it... of course to a negotiated amount. I can think of several cheap ways to connect them but lets see what ideas come up that are feasable. If no dma it could still be feasable for fun projects and i also like the idea of a self hosted cross dev system...  if it can be done at the right price i will fund it for myself to have 2...

Perhaps if someone wants to opensource the hardware design and work on a budget if it is worth to go ahead then maybe that would be better? I am thinking a 4 figure budget... not including cents.  Not quite like a comellion card for c64 but a good way to let lots of software experiments happen... could run a full lamp stack c dev env emulated cpus hardware access etc cheaply from the cpc...
« Last Edit: 21:32, 08 May 16 by zhulien »

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 11.546
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 4118
  • Likes Given: 430
Re: CPC / Raspberry Pi Bridge Card
« Reply #4 on: 10:32, 09 May 16 »
Hi Zhulien,
          first off, DMA isn't possible, the CPC has no provision for this. Next I'd suggest you take a look at the 50 pin expansion connector to see how much access this port actually allows. Other than the data bus, address bus and a few control signals it doesn't offer very much else. You could map i/o pins from the RPi to every pin which would then allow you to emulate things like ROM or RAM expansions. You can also pass data between the two devices, however it would always require software to be running on the CPC side to handle this, there is no real way to control the CPC externally. What the Pi then does with the data is up to you.

Bryce.

Offline zhulien

  • 464 Plus
  • *****
  • Posts: 481
  • Country: au
    • 8bitology
  • Liked: 187
  • Likes Given: 138
Re: CPC / Raspberry Pi Bridge Card
« Reply #5 on: 12:05, 09 May 16 »
I have looked at the cpc expansion bus but as said im not a hardware guy. Elementary at best. If we just pligged a few io ports of the pi to the address and databus of the cpc what throughout is likely possible? Yep i am fully expecting to code on the cpc side and the pi for them to communicate.  I can code both sides actually pretty well.

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 11.546
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 4118
  • Likes Given: 430
Re: CPC / Raspberry Pi Bridge Card
« Reply #6 on: 12:15, 09 May 16 »
I'm a pure hardware guy, not sure what the theoretical max speed is, but I'm sure some of the coders here will be able to tell you. It will of course depend on what the Z80 needs to do between sending bits.

Bryce.

Offline zhulien

  • 464 Plus
  • *****
  • Posts: 481
  • Country: au
    • 8bitology
  • Liked: 187
  • Likes Given: 138
Re: CPC / Raspberry Pi Bridge Card
« Reply #7 on: 12:34, 09 May 16 »
well... let's see if anyone want's to charge out their services to build the card so that everyone who wants one (which is at least me twice) can get one and cheaply (not including cost of dev and production) upgrade their CPC in a unique way...
« Last Edit: 12:40, 09 May 16 by zhulien »

Offline zhulien

  • 464 Plus
  • *****
  • Posts: 481
  • Country: au
    • 8bitology
  • Liked: 187
  • Likes Given: 138
Re: CPC / Raspberry Pi Bridge Card
« Reply #8 on: 17:59, 30 July 16 »
Just bumping this as there is no job board in the forums... id rather someone with cpc hardware creation experience than someone who has never seen a cpc... the job offer is still opened.

Offline zhulien

  • 464 Plus
  • *****
  • Posts: 481
  • Country: au
    • 8bitology
  • Liked: 187
  • Likes Given: 138
Re: CPC / Raspberry Pi Bridge Card
« Reply #9 on: 16:39, 01 August 16 »
I have found someone locally here who will be quoting me on the project over the next week or two.  The project has now been scoped as:


- a card in the Mother X4 form factor that has some form of RAM on it that will be 16kb in size (usable) that can be switched into the CPC at #4000 like a Multiface 2/dkTronics but likely different IO port.  It will be directly read/written to by the PI2 or PI3 (both have same pinouts).  Pi will see 16kb at this stage we are considering a 2 stage write process vs paging, so that we can get away with 9 GPIO lines for the full 16kb and 8 GPIO lines for the data, 9 left for control.
- prove CPC / PI stability with constant transfers of data both ways.


After that, *if* we get as far as a production run, the card will be offered for sale below AU$100.  I won't be expecting to make back my 4 figure investment, but it is all in fun - I want two even if i don't sell any more.


Software goal beyond that: HDMI, Ethernet, RAMDISK, WiFi, Analog IO ports, Audio, Video... whatever other wonderful PI hardware we can create an Amstrad CPC API to access...


Will keep you posted...


Offline Duke

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.164
  • Country: dk
    • spinpoint.org
  • Liked: 1278
  • Likes Given: 981
Re: CPC / Raspberry Pi Bridge Card
« Reply #10 on: 19:34, 01 August 16 »
Cool 8)


Offtopic: Please check your messages regarding M4 boards....

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 15.572
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 3139
  • Likes Given: 5794
Re: CPC / Raspberry Pi Bridge Card
« Reply #11 on: 14:30, 08 August 16 »
This sounds so cool. Hopefully it's not set in the realms of dreams...

Offline zhulien

  • 464 Plus
  • *****
  • Posts: 481
  • Country: au
    • 8bitology
  • Liked: 187
  • Likes Given: 138
Re: CPC / Raspberry Pi Bridge Card
« Reply #12 on: 22:24, 11 August 16 »
Amiga 600 has the vampire 2 card and c64 has the chameleon... do you think an fpga on the cpc if it pushes up the price is worth the extra cost vs a pi bridgeboard?  For me coding with the pi solution is easier and opens up lots of possibilities that a pure fpga might not... unless the fpga was also the bridge to the pi... best of both worlds but what cost would be acceptable to the cpc community?

For a PI bridgeboard i am hoping to keep the cost below au $100... for use with a Pi 2 or Pi 3...

But if adding an fpga likr a cyclone?  In small qty maybe it will almost double that cost...

Gryzor... if someone wants to be paid to build the card then it will go ahead if we can agree on a cost...  i have one person in the process of quoting but will also need to manage his time between this project and a double degree at uni...


Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1978
  • Likes Given: 4650
Re: CPC / Raspberry Pi Bridge Card
« Reply #13 on: 23:09, 11 August 16 »
What exactly could be done with a Rasp-PI connected to the CPC?


I mean, is there already some software on the PI which allows to to some things? What could it be?


I don't have one, so I have to ask.  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 11.546
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 4118
  • Likes Given: 430
Re: CPC / Raspberry Pi Bridge Card
« Reply #14 on: 23:39, 11 August 16 »
Amiga 600 has the vampire 2 card and c64 has the chameleon... do you think an fpga on the cpc if it pushes up the price is worth the extra cost vs a pi bridgeboard?  For me coding with the pi solution is easier and opens up lots of possibilities that a pure fpga might not... unless the fpga was also the bridge to the pi... best of both worlds but what cost would be acceptable to the cpc community?

For a PI bridgeboard i am hoping to keep the cost below au $100... for use with a Pi 2 or Pi 3...

But if adding an fpga likr a cyclone?  In small qty maybe it will almost double that cost...

Gryzor... if someone wants to be paid to build the card then it will go ahead if we can agree on a cost...  i have one person in the process of quoting but will also need to manage his time between this project and a double degree at uni...

To interface between a Pi and the CPC requires nothing more than an address decoder and some line buffering. Using an FPGA to do this is cracking a nut with a sledgehammer.

And as TFM just said... But why?

Bryce.

Offline cpc4eva

  • 464 Plus
  • *****
  • Posts: 473
  • Country: au
  • Liked: 144
  • Likes Given: 147
Re: CPC / Raspberry Pi Bridge Card
« Reply #15 on: 23:43, 11 August 16 »
Hi Everyone...

I am Julian, I am a very inactive active CPCer from the start  I have much to do...

Julian (From Melbourne, Australia)


Julian Cassin ?

Offline zhulien

  • 464 Plus
  • *****
  • Posts: 481
  • Country: au
    • 8bitology
  • Liked: 187
  • Likes Given: 138
Re: CPC / Raspberry Pi Bridge Card
« Reply #16 on: 06:13, 12 August 16 »
What exactly could be done with a Rasp-PI connected to the CPC?


I mean, is there already some software on the PI which allows to to some things? What could it be?


I don't have one, so I have to ask.  :)

New hdmi screenmodes.  Cross development hosted in the cpc to build direct to cpc ram. USB. Ethernet. Wifi. Cpu power. Can use the cpc as a terminal for the pi and vice versa... or complete hybrid software...

Offline zhulien

  • 464 Plus
  • *****
  • Posts: 481
  • Country: au
    • 8bitology
  • Liked: 187
  • Likes Given: 138
Re: CPC / Raspberry Pi Bridge Card
« Reply #17 on: 06:13, 12 August 16 »

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1978
  • Likes Given: 4650
Re: CPC / Raspberry Pi Bridge Card
« Reply #18 on: 23:36, 12 August 16 »
New hdmi screenmodes.  Cross development hosted in the cpc to build direct to cpc ram. USB. Ethernet. Wifi. Cpu power. Can use the cpc as a terminal for the pi and vice versa... or complete hybrid software...

The Berry as an terminal? That's an interesting idea for sure. Just thinking if the Pi fits in the case of the CPC...  ;)


Maybe there are f.e. some math libraries on the Pi already to allow it to be a math co-processor. Or some kind of intelligent device.

« Last Edit: 23:40, 12 August 16 by TFM »
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline zhulien

  • 464 Plus
  • *****
  • Posts: 481
  • Country: au
    • 8bitology
  • Liked: 187
  • Likes Given: 138
Re: CPC / Raspberry Pi Bridge Card
« Reply #19 on: 08:36, 24 August 16 »
Hi everyone. I got my 6128 plus up and running again after a long vacation (he was asleep in the cupboard for many years).  Ive ordered a couple of cpc wifi cards and have a couple of neat projects under way with them... but aside from that.  I have decided to look first at the fpga options i have.  Currently i have had a terasic trex and used to program my c-one all those years back so have a little experience in fpga programming (but not a lot). Trex is out of production but tersasic DE0 looks like a good replacement candidate... it has lots of IOs... perhaps enough to cover the whole cpc bus and more... and floppy? But it isnt really a cpc hardware.  Still if i can get it to communicate with cpc i should also be able to use it as a bridge to the PI.  Benefits being that... yes you can create custom cores in the fpga but also in software entirely on the PI side as an option. 

Aside from the terasic boards can anyone recommend an alternative for this tentatively called "Schwarzenegger" board that i should investigate first?

Offline Ygdrazil

  • Global Moderator
  • 464 Plus
  • *****
  • Posts: 486
  • Country: dk
  • Liked: 47
  • Likes Given: 247
Re: CPC / Raspberry Pi Bridge Card
« Reply #20 on: 16:35, 07 September 16 »
Hi there


Any progress on the CPC-RPI bridge card?


This would really come in handy :-)


Regards,
/Ygdrazil

Offline zhulien

  • 464 Plus
  • *****
  • Posts: 481
  • Country: au
    • 8bitology
  • Liked: 187
  • Likes Given: 138
Re: CPC / Raspberry Pi Bridge Card
« Reply #21 on: 18:46, 08 September 16 »
nope... i have a person willing to take on the project who is an honors uni student but have to wait... unless someone else volunteers.   


I have been in the mean time looking at 5v tolerant FPGAs - seems there are a few, but not too many - it's a lot of voltage levelers if i was to level 50 pins of the expansion port for a 3.3v FPGA, even if they are 8bit ones, that's like 7....

Offline zhulien

  • 464 Plus
  • *****
  • Posts: 481
  • Country: au
    • 8bitology
  • Liked: 187
  • Likes Given: 138
Re: CPC / Raspberry Pi Bridge Card
« Reply #22 on: 08:18, 09 September 16 »
just a minor update... i have found a possible stopgap solution to interface a PI with the CPC - but am working on getting a quote from the guy who makes those boards to make it less complex and more 'CPC'... to bring the costs down. if he cannot or won't or we cannot agree to make it go forward, it 'could' be the basis of a development board to produce the final solution... or at least as a self-hosted PI->CPC cross compiling solution (I believe the hardware will work out of the box - but isn't the cheapest least complicated solution).

Offline zhulien

  • 464 Plus
  • *****
  • Posts: 481
  • Country: au
    • 8bitology
  • Liked: 187
  • Likes Given: 138
Re: CPC / Raspberry Pi Bridge Card
« Reply #23 on: 08:25, 09 September 16 »
For an FPGA solution... although it doesn't readily have PI connectivity - I am thinking the GODIL40_XC3S500E DIL FPGA module (40 pin DIL) might suit.  Almost sounds to good to be true, unless i misread the docs wrong... pop out the Z80, wire in this one with the appropriate core (with some awesome extras) and you have a super fast (for new software) but compatible with old software turbo board for CPC...

Z80 drop-in replacement FPGA board
https://shop.trenz-electronic.de/en/TE0261-00B-GODIL40_XC3S500E-DIL-FPGA-module-40-pin-DIL?c=97
http://www.oho-elektronik.de/pics/UM_GODIL.pdf

Graphics drawing accelerator cartridge creation - Commodore 64 (C64) Forum
Ruud's Commodore Site: RB6502
Ruud's Commodore Site: RB6502

The 50 pin version would give 10 additional IO ports for PI integration or other... need to create a socket adapter too for this which would raise the profile of it... i think i like the 40 more because of this...
https://shop.trenz-electronic.de/en/TE0262-00B-GODIL50_XC3S500E-DIL-FPGA-module-2-x-50-pin-IDC

and a suitable core?
Projects :: OpenCores,a-z80

I'm almost sold on this one...
« Last Edit: 09:27, 09 September 16 by zhulien »

Offline zhulien

  • 464 Plus
  • *****
  • Posts: 481
  • Country: au
    • 8bitology
  • Liked: 187
  • Likes Given: 138
Re: CPC / Raspberry Pi Bridge Card
« Reply #24 on: 08:24, 13 September 16 »
I have ordered my Xilinx programmer and a couple of GODIL's to see what I can do... will keep you posted