CPCWiki forum

General Category => Amstrad CPC hardware => Topic started by: d_kef on 20:15, 08 February 23

Title: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: d_kef on 20:15, 08 February 23
Cyboard is a Symbiface II clone with an embedded Ethernet controller for the Amstrad CPC/Plus.
Unlike Symbiface II, Cyboard doesn't integrate RAM or ROM expansion.

It is an open hardware / open source project so anyone can built one or built on it.
You can find the project files at https://github.com/salafek/cyboard-for-cpc

It has the following devices integrated:
Compact Flash card. Compact flash cards, unlike SD cards, are very easy to be integrated in a hardware design as they need no special controller and they are much more reliable than SD card (at least to my experience). The CF card in my design works in memory mode so it can be directly addressed as an 8-bit device and has no need for initialization via software. Of course it is still recognized by the software as a true IDE device making it compatible with everything I've tried so far. (eg. UniDOS, SymbOS, FutureOS, HDCPM)
RTC. The DS12887 was my first and only choice as it was already supported by SymbOS and FutureOS.
Mouse. A PS/2 implementation with a USB connector. It is based on a PIC16F84A micro-controller which is easy to be found and programmed.
Network. This I consider to be my real contribution. The W5100 was the controller of my choice because you can find many cheap W5100 modules in the market and it is used in many retro-computer interfaces (MSX, Spectrum, KC85 etc.) and there is a big library of TCP/IP routines and software out there that I could reuse or even ask for help from the authors. For example I was able to compile a driver for SymbOS and I was also able to port the KCNet (http://kc85.info/index.php/kcnet-75.html) software to the Amstrad CPC with the permission of the author.

The KCNet utilities include:
CPMNET: test program for the Ethernet interface
NCFG: network configuration utility (like ifconfig)
PING: ping utility
TFTP: file transfer with TFTP protocol as client and server
KERMIT: modified Kermit-80 version 4.11 as TELNET client or for the file transfer with KERMIT protocol as client or server
WOL: WakeOnLan client
NTIME: SNTPv4 client for setting the system clock of ZSDOS/ZDDOS-CP/M's and CP/M Plus via NTP server
FTP: "full featured" FTP terminal client
NPRINT: print Client for JetDirect print Server

All utilities have been tested working with CP/M Plus as well as CP/M 2.2

The sources and binaries of the CP/M utilities and the SymbOS driver will be published as soon as I find some time to organize my files.

Here are some videos that demonstrate the utilities.





d_kef
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: Prodatron on 21:26, 08 February 23
This is just fantastic!!

Quote from: d_kef on 20:15, 08 February 23For example I was able to compile a driver for SymbOS
It seems, that the driver is pretty fast!
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: d_kef on 21:38, 08 February 23
Quote from: Prodatron on 21:26, 08 February 23This is just fantastic!!

Quote from: d_kef on 20:15, 08 February 23For example I was able to compile a driver for SymbOS
It seems, that the driver is pretty fast!
Compared to CP/M it's super fast  :laugh:

d_kef 
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: Prodatron on 22:00, 08 February 23
Phew, you are right! I didn't watch the CP/M video before. The difference between CP/M and SymbOS looks crazy!...

But it also seems, that your W5100 implementation is really good!
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: d_kef on 22:14, 08 February 23
Quote from: Prodatron on 22:00, 08 February 23Phew, you are right! I didn't watch the CP/M video before. The difference between CP/M and SymbOS looks crazy!...

But it also seems, that your W5100 implementation is really good!
Yes. I think so.
So far everything works flawlessly.
I tried wget on Symbos and I was able to download pictures and pdf files that were several MB in length and everything looked as it should; not on the CPC though...

d_kef
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: Prodatron on 22:17, 08 February 23
Really cool! I remember that we had some problems on the "Denyonet" Ethernet card on the MSX, which was using the W5100 as well, but had hangs and was slow etc.
At least you should be able to download big ZIP files in SymbOS with WGET and then list and Unzip them with the SymShell UNZIP :P
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: Richard_Lloyd on 22:49, 08 February 23
Awesome!
Thank you.
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: HAL6128 on 23:00, 08 February 23
Yeah! impressive fast and smooth access to the net. very nice project!
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: abalore on 23:44, 08 February 23
First class development. Congratulations.
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: Gryzor on 05:05, 09 February 23
Cool! Hope someone produces a batch! 

Why did you decide against RAM/ROM expansion?
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: poulette73 on 06:21, 09 February 23
Nice job! 
Very interesting! 
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: TotO on 07:28, 09 February 23
Good. Because your contribution is the Ethernet module support, an 8x5 cm PCB with the network feature would be great.
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: d_kef on 16:25, 09 February 23
Quote from: Gryzor on 05:05, 09 February 23Cool! Hope someone produces a batch!

Why did you decide against RAM/ROM expansion?
Some people want more.....

Quote from: TotO on 07:28, 09 February 23Good. Because your contribution is the Ethernet module support, an 8x5 cm PCB with the network feature would be great.
Some people want less....

Well you can't make everyone happy :D :D
Anyway it's open hardware so one can build part of it or make it part of a bigger design.
For now I have to upload the gerbers of the current board and the software.
Later I might design different variants and possibly an Ethernet only board. To tell you the truth, that was what I had in mind in the first place.

d_kef
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: Gryzor on 16:39, 09 February 23
Didn't ask for expansions, it was just a question😄
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: d_kef on 16:44, 09 February 23
Well then, to answer your question...I was just lazy I suppose.   :laugh:

d_kef 
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: Gryzor on 16:45, 09 February 23
Good enough for me! 
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: GUNHED on 17:27, 09 February 23
Nice project! 

Well, out of curiosity: What is the difference between the Cyboard and the M4 expansion regarding access to the internet?
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: d_kef on 18:04, 09 February 23
I'm not sure about that. I do have an M4 but never tried its networking capabilities. Hmm.. 

Regarding the Cyboard, at the moment, it can do NTP, FTP, TFTP, DNS forward and reverse lookup, WGET and TELNET. No HTTP and certainly no SSL, TLS.
If a W6100 module is used instead of the W5100S also IPv6 is possible, although code to support it has yet to be written.
But you are welcome to add some new features yourself.

d_kef 
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: Prodatron on 18:19, 09 February 23
The W5100 provides TCP and UDP on hardware level, so everything which is based on this can easily be implemented. As nearly everything is either based on TCP and/or UDP, you can do all what you want.

IIRC you can switch one of its 4 sockets to a lower level and could implement some lower protocols by yourself.


Quote from: d_kef on 18:04, 09 February 23WGET and TELNET. No HTTP
Wget is HTTP ;)
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: TotO on 18:24, 09 February 23
Quote from: d_kef on 16:25, 09 February 23Some people want more..... Soeme people want less.... Well you can't make everyone happy :D :D
Hehe. I just said that, because it is interresting to have your Ethernet standalone feature in MX4 format to plug on a MotherX4, when a lot of people already own the compatible mass storage (X-MASS) the ROM/RAM expansion (X-MEM) to complete this setup.
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: d_kef on 18:27, 09 February 23
Quote from: Prodatron on 18:19, 09 February 23The W5100 provides TCP and UDP on hardware level, so everything which is based on this can easily be implemented. As nearly everything is either based on TCP and/or UDP, you can do all what you want.

IIRC you can switch one of its 4 sockets to a lower level and could implement some lower protocols by yourself.


Quote from: d_kef on 18:04, 09 February 23WGET and TELNET. No HTTP
Wget is HTTP ;)

True! But you  know what I meant.

Regarding the routines and software you can write there's always the limitation of Z80. I don't think SSL or TLS is possible and today almost everything is encrypted out there.

d_kef
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: d_kef on 18:30, 09 February 23
Quote from: TotO on 18:24, 09 February 23
Quote from: d_kef on 16:25, 09 February 23Some people want more..... Soeme people want less.... Well you can't make everyone happy :D :D
Hehe. I just said that, because it is interresting to have your Ethernet standalone feature in MX4 format to plug on a MotherX4, when a lot of people already own the compatible mass storage (X-MASS) the ROM/RAM expansion (X-MEM) to complete this setup.
I know... That's why I plan to design one.

Ok. The truth is that it's almost ready. It also has a name - Net4CPC.
I couldn't resist.......

d_kef 
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: zhulien on 07:01, 15 February 23
Quote from: GUNHED on 17:27, 09 February 23Nice project!

Well, out of curiosity: What is the difference between the Cyboard and the M4 expansion regarding access to the internet?
M4 has DMA (not the typical Z80 type - but Direct to ROM transfer)
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: zhulien on 07:17, 15 February 23
what is the fastest you can stream data from a good server with the Cyboard? - if you repeatedly fetch e.g. a 100 byte file over a minute - how many kb's come down?  I am really interested in the number of calls it can make per second.
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: d_kef on 10:43, 16 February 23
Quote from: zhulien on 07:17, 15 February 23what is the fastest you can stream data from a good server with the Cyboard? - if you repeatedly fetch e.g. a 100 byte file over a minute - how many kb's come down?  I am really interested in the number of calls it can make per second.
I'll have to make some tests and report back.
With CP/M don't expect too much, the real limitation is the OS.
With SymbOS we'll see....

d_kef
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: d_kef on 14:13, 16 February 23
Quote from: d_kef on 18:30, 09 February 23
Quote from: TotO on 18:24, 09 February 23
Quote from: d_kef on 16:25, 09 February 23Some people want more..... Soeme people want less.... Well you can't make everyone happy :D :D
Hehe. I just said that, because it is interresting to have your Ethernet standalone feature in MX4 format to plug on a MotherX4, when a lot of people already own the compatible mass storage (X-MASS) the ROM/RAM expansion (X-MEM) to complete this setup.
I know... That's why I plan to design one.

Ok. The truth is that it's almost ready. It also has a name - Net4CPC.
I couldn't resist.......

d_kef
Net4CPC is now on github (https://github.com/salafek/Net4CPC).
Mind you that the design has yet to be tested for errors; it seems OK to me but you never know.

So now there is a stand alone network solution that would make a great companion to e.g. X-MASS or Albireo.
And there is already software that make use of it.

Speeking of which, I've also uploaded the KCNet utilities (https://github.com/salafek/KCNet-software-for-Net4CPC) for Cyboard and Net4CPC on github.

d_kef
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: Prodatron on 18:15, 16 February 23
Thanks a lot! :) Looking forward to it!
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: zhulien on 10:19, 17 February 23
Quote from: d_kef on 10:43, 16 February 23
Quote from: zhulien on 07:17, 15 February 23what is the fastest you can stream data from a good server with the Cyboard? - if you repeatedly fetch e.g. a 100 byte file over a minute - how many kb's come down?  I am really interested in the number of calls it can make per second.
I'll have to make some tests and report back.
With CP/M don't expect too much, the real limitation is the OS.
With SymbOS we'll see....

d_kef
The test can be to ram repeatedly, not nessary to disc... for the purpose of online realtime games.
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: d_kef on 17:00, 19 February 23
Quote from: zhulien on 10:19, 17 February 23
Quote from: d_kef on 10:43, 16 February 23
Quote from: zhulien on 07:17, 15 February 23what is the fastest you can stream data from a good server with the Cyboard? - if you repeatedly fetch e.g. a 100 byte file over a minute - how many kb's come down?  I am really interested in the number of calls it can make per second.
I'll have to make some tests and report back.
With CP/M don't expect too much, the real limitation is the OS.
With SymbOS we'll see....

d_kef
The test can be to ram repeatedly, not nessary to disc... for the purpose of online realtime games.
Today I found some time to do some generic speed test.
The test was done between a CPC and a PC connected to the same ethernet switch.
The PC was running a small loopback TCP/IP server that I made just for this purpose.
The loopback server works like this: it listens for TPC connections, reads a stream of data and then sends them back to the client. Then it repeats the receive and send procedure until the socket is closed.
The CPC was running the loopback TCP/IP client.
The loopback client works like this: it sends 100 bytes of data and a control character. Then it waits to receive data from the server. It stores the received data to memory and then retransmits the data it received to the server. The send / receive procedure repeats 100 times.

There's no check in the programs for data errors. I was checking visually with Wireshark that after 100 repetitions the data received were the same as those transmitted in the first place.

The time for completing the data "ping pong" is about 400ms. That's about 20KBytes/s downstream.
This speed is consistent for more than 100 repetitions (I tested with up to 1000).
Not bad for a 8-bit system.

d_kef
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: zhulien on 17:15, 19 February 23
so about 2.5 calls with responses per second?
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: d_kef on 17:26, 19 February 23
Yes. If you keep the socket open between calls.

d_kef
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: Prodatron on 20:50, 19 February 23
20KB/s is really good!
For the test I would use bigger sizes than 100bytes, or not? Better 2KB or even more, so that the W5100 buffer is fully used.
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: zhulien on 13:03, 20 February 23
That 20kb/second is in a single request right? if only 2.5 requests per second are made (100 bytes each way) then the total is about 500 bytes/second in ping pong? (or is my calculation wrong)
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: d_kef on 13:23, 20 February 23
No. 400ms for 100 x 100bytes send and receive.
In other words 400ms to send 10000 bytes and receive them back in packets of 100.

d_kef 
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: zhulien on 19:15, 21 February 23
For a multiplayer arcade game where we don't keep a socket open, we need to make a request and get a response.  My POC from my pc using javascript to my server gives max about 15 calls per second to both make a call and get a response.  I put a hard limit of 10 for consistency across different devices. 
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: d_kef on 20:15, 21 February 23
Ok. I'll try to reproduce it.


Edit*
Open socket, send 101 bytes, receive 101 bytes, close socket: just under 81ms
See attachment net4cpc.zip

d_kef

Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: zhulien on 15:41, 22 February 23
wow, that's great.  what that means is... about 12 calls per second which is pretty good.  if they are blocking calls (z80 waiting for a response) then we can perhaps half that for gameplay logic to be processed - but more ideally, if they are non-blocking calls... (z80 continues but checks for a status) then we can approach that 10 per second and have even more CPU time for game play logic.

I'd say that is pretty fantastic - if anyone wants to make a multiplayer action / arcade game of some sort - happy to help - at the server-side.  

Can net4cpc work along-side M4 or is it compatible with it?
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: d_kef on 16:31, 22 February 23
What do you mean? If it is possible for example to have both connected on the same CPC and use the M4's SD card and Net4CPC's network?

d_kef
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: zhulien on 16:51, 22 February 23
Are cyboard and net4cpc the same product or 2 separate products? Also are they available assembled by anyone?
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: d_kef on 17:04, 22 February 23
Quote from: zhulien on 16:51, 22 February 23Are cyboard and net4cpc the same product or 2 separate products? Also are they available assembled by anyone?
Cyboard contains the functionality of Net4CPC.
The 2 interfaces use the same Ethernet module.
So software written for Net4CPC is compatible with Cyboard.
There are only 2 prototype Cyboards and I'm expecting to have a Net4CPC ready next week but for now I don't plan to build more.
But it's open hardware so anyone can build their own.

d_kef
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: zhulien on 05:58, 23 February 23
what is the price of a made cyboard and net4cpc?
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: GUNHED on 13:23, 23 February 23
Quote from: d_kef on 17:04, 22 February 23Cyboard contains the functionality of Net4CPC.
The 2 interfaces use the same Ethernet module.
Since I'm not too much into internet stuff.... What can Cyboard do, but not the M4 card?
Trying to understand the commons and differences.

Quote from: d_kef on 17:04, 22 February 23There are only 2 prototype Cyboards and I'm expecting to have a Net4CPC ready next week but for now I don't plan to build more.
But it's open hardware so anyone can build their own.
From my experiences the CPC scene contains few persons soldering their own hardware. But if there is enough interest, then maybe some producer could do a batch.
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: d_kef on 22:09, 23 February 23
Quote from: zhulien on 15:41, 22 February 23Can net4cpc work along-side M4 or is it compatible with it?

I did some tests and It works just fine. I loaded CP/M from the SD card and used the KCNet utilities to setup my Net4CPC and then logged in to my favorite BBS.
I even pinged successfully the M4's WiFi.
Now that I think about it I have the first CPC with dual network interface... Woo-hoo!!!  :D :D :D

@Prodatron I wonder if I can load both network drivers in SymbOS and what will happen with the network applications!? 

d_kef 
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: d_kef on 22:17, 23 February 23
Quote from: zhulien on 05:58, 23 February 23what is the price of a made cyboard and net4cpc?
The components cost is about 65.00 EUR for Cyboard and about 30.00 EUR for Net4CPC.
The W5100S module alone costs about 25.00 EUR

So the price for a made board will be the above plus manufucturing cost plus whatever margin the producer thinks fair.

d_kef

Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: d_kef on 22:39, 23 February 23
Quote from: GUNHED on 13:23, 23 February 23Since I'm not too much into internet stuff.... What can Cyboard do, but not the M4 card?
Trying to understand the commons and differences.
Regarding the networking, the M4 has an integrated web server which is a unique feature. Besides that it's all about what the software can do. I mean if you take for example SymbOS, you load the driver for whatever interface you have and then all networking apps and games behave exactly the same. They don't even care or know anything about the interface you have.

Of course the low level routines that setup the network hardware and cope with the TCP/IP stack are quite trivial in M4 and a bit more challenging in Net4CPC.(at least to my understanding)

d_kef

Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: Prodatron on 11:37, 24 February 23
Quote from: d_kef on 22:09, 23 February 23@Prodatron I wonder if I can load both network drivers in SymbOS and what will happen with the network applications!?
The Network Daemon refuses double execution. If you start it twice (no matter with which network driver), the second one will check, if it's already running and quit itself immediately.
As it has a unique ID, with which the apps are communicating, it wouldn't make sense to run it two times. So you can either run the M4 driver or the Cyboard/Net4CPC driver.
Not sure, if it makes sense to implement multiple interface support in SymbOS. CPC working as a firewall? ;D
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: GUNHED on 16:42, 24 February 23
My question was targeting the hardware side.
Anyway, I'll have a closer look at that in decent time.  :)
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: d_kef on 17:08, 24 February 23
Quote from: GUNHED on 16:42, 24 February 23My question was targeting the hardware side.
Anyway, I'll have a closer look at that in decent time.  :)
Well, on the hardware side FutureOS already supports half of it - mouse and RTC. :D

So the only thing that Cyboard offers more than M4 is the mouse interface.
On the other hand M4 offers upper and lower ROM expansion, cartridge emulation and a web portal for easy configuration and file exchange.

d_kef
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: GUNHED on 14:29, 28 February 23
Looking forward to see a well documentation for this project some day, this will help programmers.  :) :) :)
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: d_kef on 19:23, 28 February 23
Quote from: GUNHED on 14:29, 28 February 23Looking forward to see a well documentation for this project some day, this will help programmers.  :) :) :)
I know that being mainly a hardware project it's a bit underdocumented.
The W5100S is very well documented though. WizNET offers a very detailed datasheet (https://docs.wiznet.io/img/products/w5100s/w5100s_ds_v127e.pdf) with flow diagrams and programming examples that can help any programmer.
For reference, you can also take a look at the Z80 code of the low level (https://github.com/salafek/KCNet-software-for-Net4CPC/blob/main/n4c-w51.inc) and high level  (https://github.com/salafek/KCNet-software-for-Net4CPC/blob/main/w5100-12.inc)W5100 routines in the
KCnet utilities for Net4CPC. (https://github.com/salafek/KCNet-software-for-Net4CPC)
d_kef
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: zhulien on 13:26, 01 March 23
Quote from: d_kef on 22:17, 23 February 23
Quote from: zhulien on 05:58, 23 February 23what is the price of a made cyboard and net4cpc?
The components cost is about 65.00 EUR for Cyboard and about 30.00 EUR for Net4CPC.
The W5100S module alone costs about 25.00 EUR

So the price for a made board will be the above plus manufucturing cost plus whatever margin the producer thinks fair.

d_kef


Anyone currently selling made boards?
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: Richard_Lloyd on 20:55, 18 March 23
Thanks @d_kef 
Soon there will be NET4CPC!
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: craem on 21:16, 19 March 23
it's possible buy one or two units ?
Title: Re: CYBOARD for Amstrad CPC – Yet another hardware project
Post by: Richard_Lloyd on 22:00, 22 March 23
More progress....
CPC4NET finished, connected to a CPC6128 and powered up.
Photo - CPC6128 with NET4CPC (192.168.1.103) can PING it's Gateway (192.168.1.254)
Photo - PCW8512 WiFi modem on the network (192.168.1.247)
Photo - CPC6128 with NET4CPC (192.168.1.103) can PING the WiFi modem on the PCW8512
All under CP/M Plus

Powered by SMFPacks Menu Editor Mod