News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

CPC Ethernet card development.

Started by rpalmer, 10:13, 02 May 11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rpalmer

Hello again,

While I have been waiting to get more parts to complete my first batch of the IDE/8255 interface, I have been looking at various 8-Bit ethernet interfaces and find one which uses the CS8900 chip.

A further search of the PDF for this chip shows that it is quite simple to create a interface with it.

I have begun to draft a version which uses again the 8255 (more later in future posts).

You can find attached the draft eagle file and associated PDF.

It seems quite easy to do, so hopefully the draft is all i need to get one working.

regards
rpalmer

TFM

#1
Well, there was a presentation some years ago at a spanish meeting. So maybe some spanish guys can tell more here. It was the expansion card for the SF2, which includes an Ethernet port.
Up to now this expansion card can't be ordered. However I doubt that compatbility can be made between the two solutions. Dr. Zed did create that card. I heart nothing about it for a year or so. And I got no idea if it is still unter developpment or not. I try to find out...
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

rpalmer

hello TFM,

The SF2 card currently does not have an ethernet interface as seen in the attached picture i downloaded from prodatron's website.
It does include a PS-2 port for a mouse, so maybe that was what you were referring to.

I also look forward to the day when a CPC can communicate to the world via ethernet.

rpalmer

Octoate

TFM refers to the ethernet card which was planned for the Symbiface. This is a picture of the prototype from the XzentriX 2007 meeting in Seeshaupt / Germany:



There was also a working SymFTP version:



Well, there were no big news since then, so I guess, they don't work on it anymore.
--

TFM

Well, roughly a year ago Dr. Zed told me that he is short before releasing it, but then he discovered a new hobby: horses. So I got no idea honestly.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

MacDeath

#5
I got myself an Arduino mega card with its ethernet/SD shield.

http://arduino.cc/en/Main/ArduinoBoardMega
http://arduino.cc/en/Main/ArduinoEthernetShield


I wanted to turn this into an internet solution (or any other expansion stuff), but to be fair I don't have time to learn to code it at the moment.
(this use some moded sort of C/C+ language)
As it would need both the Arduinos to be coded and some OS on Amstrad to be done too...(web browser)

Also this card seems a little light on RAM/ROM... I may need to get myself some RAM/ROM board.
I was planning to get this for my Amstrad PLUS because :

-Cartridge : easy ROM box which is not connected to the extension port...(I have spare GX4000burninrubber cartidges to hack)

-Plus features : perhaps better for a web-browser GUI (HardSprites for pointer, Rasters interrupts for menus in mode2.... better palette)


Anyway such Protoboard may be quite interesting IMO...
This can also be turned into some soundcards (emulate a second AY or even a SID...) or whatever.

I always find it a shame that the Hardwareguys here produces their own custom cards... while generic do exist.

After all, they often put the exact same chips (micro controlers or whatever) on theirs, but loose the "generic and kustomisable" aspect due to their closed design.

Arduino mega (or any comparable stuff) are easy to find, not that expensive (quite a bit actually...) and solid multy-purpose cards.


Also I like the "shield" design...
Easier way to get more stuff in an actually more compact stacked/racked design.

Symbiface : why can't you simply connect/plug an existing ethernet shield on this ? ;)

other related topics :
http://cpcwiki.eu/forum/index.php/topic,1690.0.html
http://cpcwiki.eu/forum/index.php/topic,1805.0.html


rpalmer

Hi macdeath,

There are indeed many solutions to bring an ethernet to any micro-computer, but the one i wanted to build would allow for the access to the TCP/IP functions and buffers from within TCP/IP so that HDOS can use them as well, rather than have all of it away from the amstrad.

rpalmer

Bryce

#7
@MacDeath,
        the reason why most hardware designers avoid generic cards is due to cost. Although they are great for prototype or concept development, they are very expensive to use as a single solution, because they offer a little bit of everything. A small PCB developed just for a single purpose such as Ethernet / USB or whatever can sometimes be reduced down to less than 10€ component price, whereas an Arduino will set you back around 45€ just for the board, which you will still need to build an adapter for so that it can be connected to the CPC. If the project is intended as a low cost DIY project (as mine usually are) the Arduino is not an option.

@rpalmer, as I've said in a PM, nice project. Do you have a reasonably priced source for the CS8900A ? I've seen prices ranging from 3€ to 27€ !!

Bryce.

MaV

Quote from: Bryce on 08:18, 03 May 11
@MacDeath,
        the reason why most hardware designers avoid generic cards is due to cost.

I like the Arduino and have bought two as well, but there's a reason you don't use generic card for special solutions.


Let's see:

Your configuration (approximately)
Arduino Mega 2560 (the normal Mega is not produced anymore): ~49 Euro
Arduino Ethernet Shield: 33 Euro

That's about 82-ish.


Probably cheapest Arduino configuration (approx.)

Arduino Uno (as cheaper replacement to the Mega 2560): ~26 Euro
Ethernet-Shield for Xport/Wiznet (Adafruit) - Arduino compatible: ~14 Euro

About 40-ish.

(Prices based on Watterott online shop)


Perhaps you can shear off a few Euros if you keep searching for the best priced shop, but I doubt it. Not quite the cheapest config to put as an extension into a CPC. Besides putting a 16 MHz AVR to use next to a 4 MHz Z80 is a bit overkill.

Bryce is right, the Arduino is excellent for prototyping and experimenting, but an expensive solution to add to a CPC.

MaV
Black Mesa Transit Announcement System:
"Work safe, work smart. Your future depends on it."

Ynot.zer0

Due to my interest in robotics (and robot arms) I have a couple of Arduino boards knocking around.  I agree, they are very handy for generic prototyping - I can use them to do very different things from one day to the next.  As Bryce points out, it's an expensive option to then only use the Arduino to do something that would have been better to build custom hardware - my problem is, I'm actually not a hardware / chip / electronics guru, so I don't have the knowledge to know that I can get an XYZ chip for $x that will do what I need.  I usually build a concept with the Arduino and then google for what other people have done and then usually find a chip number and spec sheet.  mostly though the project doesn't go beyond the Arduino stage  ;D


I really like the idea of a CPC Ethernet card and the overlaying TCP/IP support (wasn't there a cpc tcp/ip stack project online once?).
I was previously running a Hiawatha web server on Puppy Linux, until the CF Card corrupted itself (and guess who didn't take a backup...) - I would "love" to replace that PC based setup with an Amstrad CPC running a much simpler version of this http://www.hiawatha-webserver.org/howto
I'm not after running amazon.com from my CPC but it would be a real geek-trip to have my own personal web server serving up some basic things from my Amstrad - static html pages with some images would suit me fine.


If memory serves me right, I recall writing my own web server (in C) a few years back, it handled very very basic things - if someone is going to build the hardware to make this happen, I'll be happy to prototype options for software    8)


rpalmer

yes indeed someone had wrote a tcp/ip stack and i have put it into a rom, so less main memory is used.
for links see other comments in this topic (it is still under development at the moment).

rpalmer

MacDeath

#11
QuoteArduino is far too expensive to be used for a CPC
QuoteBut I have a pair...
QuoteYeah me too, they are so kool
So Actually everybody already got one as I see...  :laugh:
(ok not everybody but quite a nice amount of you indeed...)

Where is the CPC friendly library then ?
:'(

My point is that you don't get an Arduino protoboard to get it runnning one expansion only... but to have an actual library of ...many expansion (not all at the same time of course... I guess) as you see fit.


Then why those generic protoboards aren't supported at all by SymbOS/FuturOS or any Amstrad friendly application ?


So please mister Hardboyz... when you prototype your stuff, do some Generic version for commercial protoboard too at the same time...Even if not all the stuff you then put in your kustommade card are emulated...
This is still better than nothing and just need some cables. ::)

TFM

#12
MacDeath my friend, usually I really enjoy your lyrics here, but sometimes it's too much to read  ;D

Quote from: MacDeath on 18:19, 03 May 11
Then why those generic protoboards aren't supported at all by SymbOS/FuturOS or any Amstrad friendly application ?

Well...
- SymbOS developpment has ended seemingly. PDT is a bit pissed off, because nobody creates apps for it - that's what I heart from a third person.
- About FutureOS: I don't know the mentioned Ethernet card, because I never heart about it. So up to now there is no support.

Support will be added as soon as more than 10 people use the same hardware (and as soon as actual CPC projects have been finished).

EDIT: Thank's to Bryce I could correct some errors in this post and btw: Great humor ;D
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

MacDeath

Then it would be cool to get some inquiry/pool to learn which Amstradist may own such Protoboards and which models.
:)

Bryce

@TFM/FS: FutureOS is a Graphic OS for the Amstrad, much like SymbOS, you should try it out, it's really not bad at all. You can find more information about it here: http://www.cpcwiki.eu/index.php/FutureOS  :D

Bryce.

TFM

Quote from: Bryce on 19:28, 03 May 11
@TFM/FS: FutureOS is a Graphic OS for the Amstrad, much like SymbOS, you should try it out, it's really not bad at all. You can find more information about it here: http://www.cpcwiki.eu/index.php/FutureOS  :D

Bryce.

Thanks for the link. I'll check it out!
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

MacDeath

Yeah but the GUI lacks colours IMO...

SymbOS is also betterly supported, new Addons are released each month.






(And i believed i was the only Troll here...)

HAL6128

Quote from: TFM/FS on 18:44, 03 May 11
Well...
- SymbOS developpment has ended seemingly. PDT is a bit pissed off, because nobody creates apps for it - that's what I heart from a third person.
- About FutureOS: I don't know the mentioned Ethernet card, because I never heart about it. So up to now there is no support.

Support will be added as soon as more than 10 people use the same hardware (and as soon as actual CPC projects have been finished).
Every OS will rise/fall with it's applications/games or whatever. I can understand Prodatrons attitude. Even in TFM/FS case I  admire his patience supporting/developing his fast OS. For none-coders or BASIC-is-a-difficult-program-language-freaks like me it's hard to program an app in assembler without an exact "how-to-guide":) ... even if ideas drops out of the head.
I've seen that it is possible to program via SDCC (together with a special-library) SymbOS-Apps. C could be feasible. Even in FutureOS you can also program via Small-C and some special "lib's".
So... the easier it is to create applications for a OS the more people will use it. It's an ergonomic matter (not for professionals of course - but for 'dummies'). Therefore SymbOS has a little visual advantage, cause' it take after an elaborate ergonomical design of high-paid psychologists (...this should not be a performance assessment!!)
... need more time for build programing experienced... damn, too late.
You can found CPC/IP v0.20, a TCP/IP stack for Amstrad CPCs at http://genesis8.free.fr. I think the old website has ended?
There's also a link (german website) http://www.icplan.de/#embedded with a DIY TCP/IP Stack based on a Z80 with 32K bufferd RAM, 32K ROM, parallel & serial interfaces (RS232) etc.
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

TFM

#18
Sorry for getting offtopic, just for a moment...

Quote from: MacDeath on 19:44, 03 May 11
Yeah but the GUI lacks colours IMO...

Well, that's what we call Mode 2. It's a working environment, dedicated to show a high resolution. BTW: You can (or I can do that for you) change the colors in which way you want.
Mode 1 or 0 wouldn't allow to display 64 file-names at the same time. However, any kind of apps can be as colorful as you like.

Secret information: I have planned an alternative Desktop version, manly half a new OS (but compatible), its name will be FutureOS Fatul. It will provide a Mode 0 Desktop in simulated 3D. You will work only with icons that are arranged in 3 dimensions. However, the actual Desktop is still the most efficient Desktop I can imagine (in my weary mind).

Quote from: MacDeath on 19:44, 03 May 11
SymbOS is also betterly supported, new Addons are released each month.

Oh really, must have missed them for quite a long time ;-)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

TFM

Quote from: hal 6128 on 21:19, 03 May 11
Every OS will rise/fall with it's applications/games or whatever. I can understand Prodatrons attitude.
Absolutely! The best OS has no advantage, if there are no apps which use it. On the other hand you can't code ALL apps by yourself. I must admit also for FutureOS only very few peoples did some software. So I have to do it, but I lack time  :(

Quote from: hal 6128 on 21:19, 03 May 11
Even in TFM/FS case I  admire his patience supporting/developing his fast OS.
Thanks a lot, I appreciate. Support will not end before my physical death 8)

Quote from: hal 6128 on 21:19, 03 May 11
For none-coders or BASIC-is-a-difficult-program-language-freaks like me it's hard to program an app in assembler without an exact "how-to-guide" :) ... even if ideas drops out of the head.
Right! And for OS developpers it's hard to create a good manual. Because you are too close and so you forget to mention a lot of important things.

Quote from: hal 6128 on 21:19, 03 May 11
I've seen that it is possible to program via SDCC (together with a special-library) SymbOS-Apps. C could be feasible. Even in FutureOS you can also program via Small-C and some special "lib's".
Yes, FIOLIB works with Small-C and somebody told me it works also with SDCC, I wish I would have more time to care about it.

Quote from: hal 6128 on 21:19, 03 May 11
So... the easier it is to create applications for a OS the more people will use it. It's an ergonomic matter (not for professionals of course - but for 'dummies'). Therefore SymbOS has a little visual advantage, cause' it take after an elaborate ergonomical design of high-paid psychologists (...this should not be a performance assessment!!)
SymbOS looks pretty much like Windows, so people can use it without learning much. However, IMHO I don't like Windows on a computer screen with limited resolution, because it just will not work with some apps. But this is obvious. So I preferred to create some new, however people seem not to like it much, because it's strange for them.

Quote from: hal 6128 on 21:19, 03 May 11
... need more time for build programing experienced... damn, too late.
You can found CPC/IP v0.20, a TCP/IP stack for Amstrad CPCs at http://genesis8.free.fr. I think the old website has ended?
There's also a link (german website) http://www.icplan.de/#embedded with a DIY TCP/IP Stack based on a Z80 with 32K bufferd RAM, 32K ROM, parallel & serial interfaces (RS232) etc.

Thanks for the link! Now, to get on topic again, I really hope to see a working Ethernet card for the CPC in this year maybe already :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

MaV

#20
Quote from: MacDeath on 18:19, 03 May 11
Where is the CPC friendly library then ?

Ok, I've given it a thought.

You don't need a library, these already exist for the arduino shields. You'll need glue code to establish communication between the shields and the CPC. That'll be the least of your problems. The CPC does not have any hardware that enables communication with the "outside" world.

Let's start with the Arduino Mega 2560 and the CPC expansion bus. Don't even think about the cheaper Arduinos, they lack the pins and the flash memory. For proper communication you'll need the data bus (8 pins), address bus (16 pins), MREQ, IOREQ (probably), RD, WR; and perhaps even one or two more.

That's about 30 pins (+/- 2 pins).

The CPC needs a ROM, which the arduino probably can emulate. I'm not sure how the CPC roms are initialized - I've forgotten that after all these years - but you'll have to do initialization + deliver the correct rom bytes via data bus if the Z80 asks for them. You'll also have to discern somehow if it is your emulated rom that is being addressed and not one of the many others.

Your code has to be fast as hell, since you're communicating low-level with the z80, so no Arduino C but proper AVR assembly needed. I'm still not sure, if that'll be enough.

And don't forget that your shields use pins as well, so you're probably able to use two shields at the most (I'm being optimistic here.)

MaV
Black Mesa Transit Announcement System:
"Work safe, work smart. Your future depends on it."

MacDeath

#21
My Arduino seems to have quite enough pins... even with its Ethernet shield on.

Concerning ROM, as I was aiming at a PLUS version, I just have to get a proper cartridge done (I have spare GX4000 Burnin' rubber carts to cannibalize...
Need some proper flash 512K eprom then.
This should be quite enough to get all the Amstrad may need in ROM..?
and get the Extansion port freed from additionnal ROMboard so only the Arduino is connected to it.

Quite more convenient IMO than a CPC old generation.

Also i have the proper 50way plugs (centronic) and a stock of spare flat cables (IDE cables).



I knew the Ethernet shield allready manage all the stuff/library, and that It only nned a good soft connection between the Arduino and the CPC.

There the one I have:
http://arduino.cc/en/Main/ArduinoBoardMega

Yet it is quite a bit short on built-in "RAM/flash/EEprom...
This Card is just there to do the link between CPC/PLUS and the ethernet shield, from what I thought.

Shields : I intend to use only the Ethernet/SDcard one (don't have any others)... Yet I know it can't use both ethernet and SDcards at the same time.

QuoteYour code has to be fast as hell, since you're communicating low-level with the z80, so no Arduino C but proper AVR assembly needed. I'm still not sure, if that'll be enough.
So the Arduino card can actually be programmed in assembly instead of pseudo C ?

MaV

Quote from: MacDeath on 11:37, 09 May 11
My Arduino has quite enough pins... even with it's Ethernet shield on.

Concerning ROM, As I was aiming at a PLUS, I just have to get a proper cartridge done (I have spare GX4000 Burnin' rubber carts to cannibalize...
Need some proper flash 512K eprom then.

I knew the Ethernet shield allready manage all the stuff/library, and that It only nned a good soft connection between the Arduino and the CPC.

I'm still not sure if the Arduino can handle the ports that quickly.

The data bus and adress bus make three 8 bit ports on the Arduino and they have to be read separately, since it's an 8-bit microcontroller. It also needs to discern whether it's the Arduino itself that's being addressed and ignoring all the other memory accesses.

Z80 reads/writes:
What the Arduino needs to do:
1) wait for the correct signal (interrupt handling or polling)
2) read the address bus (read two ports)
3) load correct byte (from ethernet) OR read the data bus
4) send byte


We're talking about multiple clock cycles per step for the Arduino.

Writing to the data bus means that you'll need to keep the port in a high impedance state (or input state and ignore the signals) until the AVR receives the right signals then change the port to input then send the byte. You might even need to check if the CPC's components are ready for your transaction. After that you return the bus to the high impedance state (or input). You need to do that to avoid bus conflicts which lead to indeterminable states. While it may be feasible for one port, it may not be so if you want to do the same with the address bus, but you have to in order to transmit the data from the ethernet card. Double the ports, double the work. And changing from input to output to high impedance might take too long for proper communication.

Basically you're emulating a part of the chip hardware in software.  ???

MaV

PS: I'm planning a CP/M board with an AVR and an 8MHz Z80 + SRAM. The problems are much the same, but I don't have to put up with the extra hardware of the CPC. The AVR will control be the multi-purpose peripheral device. Since the AVR is the only peripheral, I'll just check the IO pin for the correct signal. The value of the OUT on the address bus is the code to identify which action the AVR needs to take, while the data bus send the actual values if needed. Nothing to see yet, the project's still in its infant state. I may change them yet.
Black Mesa Transit Announcement System:
"Work safe, work smart. Your future depends on it."

MaV

Quote from: MacDeath on 11:37, 09 May 11
So the Arduino card can actually be programmed in assembly instead of pseudo C ?

Yes, but it's a hassle.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1188341312/14#14


It's probably better to buy a programmer and program the Arduino via AVR Studio in assembly (or C). You can always return the boot code to make it an Arduino again.

MaV
Black Mesa Transit Announcement System:
"Work safe, work smart. Your future depends on it."

rpalmer

hello all,

I already have recieved 3 CS8900 chips to build into the ethernet boards as well as some 8255's, but I am waiting for the edge card connectors and PCBs to arrrive to begin building and then testing.

When I have completed the first build of the ethernet board using the cs8900 chip, it should be a simple matter to create a set of driver routines (read API's) so that the CPC can communicate with the outside world.

The source code for the drivers/APIs will be freely available so that others who wish to create apps (like a twitter app) can do so with relative ease.
I have seen the high level support for the chip, so it does not seem to much of a hassle to create the base foundation routines.
I have a great deal of experience with putting code into the CPC ROMs, so if anyone wants more info about what and how its done I am more than happy to supply them with the necessary details (although I imagine it is not that hard once they look at the drivers which will detail how ROMs are structured).

My first test will be to simply see if i can setup a PC with a server (like unbuntu with apache) which i can telnet into using the ethernet card and my converted TCP/IP in ROM S/W, along with a telnet app.

As for the card being usable in FutureOS, Symbos, or whatever there will no doubt some additional code required by the OS's to allow for the ethernet card.

It would be great to setup a CPC with my IDE/8255 and ethernet card as a network server and have people on the 'net accessing files...... HERE COMES THE CPC TO TAKE OF THE INTERNET..... LOL

rpalmer

Powered by SMFPacks Menu Editor Mod