Welcome, Guest. Please login or register.

Author Topic: Zorro III memory card... now with Ethernet  (Read 17542 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline tnt23Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 195
    • Show all replies
Zorro III memory card... now with Ethernet
« on: November 16, 2013, 01:17:15 PM »
A new 1.2 revision of Z3SDRAM, an open Zorro III memory card design, is now sharing up to 64MB of SDRAM and an Ethernet controller (based on DM9000 chip from Davicom) on one PCB. Also the new board can be used in Zorro II configurations, as the rest of Zorro signals are now also been routed to the FPGA.



The hardware side seems to be functional, and SANA-compatible dm9000.device is in its early development stage (read: I was able to compile the 'hello.c' somehow).





The project page will hopefully be updated soon: http://code.google.com/p/z3sdram/
 

Offline tnt23Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 195
    • Show all replies
Re: Zorro III memory card... now with Ethernet
« Reply #1 on: November 16, 2013, 02:45:30 PM »
Well, as soon as Poseidon is USB stack and Z3SDRAM has no USB host (yet) - I'd say yes, Poseidon would work even without Z3SDRAM :)
 

Offline tnt23Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 195
    • Show all replies
Re: Zorro III memory card... now with Ethernet
« Reply #2 on: November 16, 2013, 06:17:19 PM »
I doubt I could invent something to exceed the 8M barrier for ZII, but volunteers are welcome to try :)
 

Offline tnt23Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 195
    • Show all replies
Re: Zorro III memory card... now with Ethernet
« Reply #3 on: November 17, 2013, 09:23:10 AM »
Quote from: Dr.Bongo;752860
Very interesting. Are these for sale?


I have one spare unpopulated PCB left. More PCBs could be ordered for those who don't mind sourcing the components, soldering and JTAGging on their own. Besides, there's no device driver for the network part yet.
 

Offline tnt23Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 195
    • Show all replies
Re: Zorro III memory card... now with Ethernet
« Reply #4 on: November 17, 2013, 09:29:43 AM »
Quote from: jkonstan;752869
Your posted sch & pcb files on Google project page for  Z3SDRAM, appear to be Altium or PCAD. When you update project page for Z3SDRAM, are you going to post Gerber files for the PCB for the  Z3SDRAM project as well?


The schematics and PCB are in old PCad 200x format. My local PCB house happily accepts PCad PCB file saving me the trouble of converting it to Gerber. If someone wants to do the conversion they are welcome.

Anybody willing to help in developing device driver for the DM9000, you are more than welcome, too.
 

Offline tnt23Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 195
    • Show all replies
Re: Zorro III memory card... now with Ethernet
« Reply #5 on: November 17, 2013, 01:39:55 PM »
For the CS8900 driver I was using the 3C589 sources available on Aminet. Same thing with DM9000 driver, both were based on (widely vandalized) 3C589 code. I was able to do TX and was fiddling with RX part under Roadshow just before switching to DM9000 chip.
 

Offline tnt23Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 195
    • Show all replies
Re: Zorro III memory card... now with Ethernet
« Reply #6 on: November 18, 2013, 07:00:18 PM »
Quote from: olsen;752892

How do you feel about open sourcing the resulting driver? As things stand, we do not have enough SANA-II Ethernet driver examples which can be reviewed and adapted by anybody interested in the matter. The networking driver source code, as part of the original SANA-II kit, explains how one might create a SLIP driver, but that is so obsolete it's not even funny any more.


I would not mind sharing the driver at all, only there's a bit of chicken and egg problem. To come up with a decent driver I'd take a look at a sample one written by someone else (and preferrably not in assembler). It is really great 3c589.device  sources are available, although the code seems rather complex to me. I think I'm going to hack it quickly to get ping or DHCP reply before posting.
 

Offline tnt23Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 195
    • Show all replies
Re: Zorro III memory card... now with Ethernet
« Reply #7 on: November 21, 2013, 04:21:40 PM »
Quote from: olsen;753153
As far as I can tell from my past experience, 3c589.device is a good SANA-II Ethernet device driver design. It may appear to be complex, but this is in fact how you would implement this kind of driver. It properly separates the basic device I/O, the individual hardware units, and the low level hardware access. This is really how it's supposed to be done.

Well, give me some more time and we'll see the difference :) I have just implemented my first /INT2 server (which I am very proud of), and the resulting progress so far is slightly over zero.
 

Offline tnt23Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 195
    • Show all replies
Re: Zorro III memory card... now with Ethernet
« Reply #8 on: November 24, 2013, 05:33:22 PM »
There are some minor issues, but basic RX code is working. SANAUTIL network tool opens device, requests orphan packets and dumps them.
« Last Edit: November 24, 2013, 05:49:30 PM by tnt23 »
 

Offline tnt23Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 195
    • Show all replies
Re: Zorro III memory card... now with Ethernet
« Reply #9 on: November 26, 2013, 06:32:32 AM »
TX code is working now, too. Packets sent from Amiga are seen on the remote side. (Will have to set up a way to grab screenshots instead of using my mobile phone's camera.)



Remote host (Raspberry Pi running tcpdump):



For that reason I've bought the RoadShow TCP/IP stack last night :)
 

Offline tnt23Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 195
    • Show all replies
Re: Zorro III memory card... now with Ethernet
« Reply #10 on: November 26, 2013, 08:50:03 AM »
Quote from: olsen;753451

I guess it's too late to talk you out of buying Roadshow, but the demo version should be able to handle test setups like these just fine ;)


Well, I've got enough reasons to reboot on my own to deal with demo's 30 minute expiration :)
 

Offline tnt23Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 195
    • Show all replies
Re: Zorro III memory card... now with Ethernet
« Reply #11 on: November 26, 2013, 02:07:36 PM »
Quote from: Bobo68;753456
sgrab ?


Will take a look. So far I have tried MasterGrabber and GrabScreen, both kinda work, producing IFF files, and I was hoping for JPG/PNG output.
 

Offline tnt23Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 195
    • Show all replies
Re: Zorro III memory card... now with Ethernet
« Reply #12 on: November 26, 2013, 02:28:07 PM »
Quote from: Themamboman;753467
Can you post a better picture of the actual card? Thanks!


I'm afraid this one is the best I can do without my DSLR (another one taken with flash is even worse). Should you want some particular closeup just let me know :)
 

Offline tnt23Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 195
    • Show all replies
Re: Zorro III memory card... now with Ethernet
« Reply #13 on: November 29, 2013, 04:38:09 PM »
Quote from: olsen;753153
I had a quick look at the 3c589.device source code, and it looks good to me (I'd probably rewrite the basic device I/O code to be more paranoid, though, and the cleanup procedures in case of errors should be reworked).

So I've been having fun with sashimi and MiamiDX and at some point have tracked an issue with my driver's code freezing when calling S2_CopyToBuff hook. I will have a look into buffer management the MiamiDX provides when opening the device, but here's a piece of code (borrowed from the abovementioned 3c589 sources) that puzzles me.

An opener structure is being allocated:

Code: [Select]
/* Set up buffer-management structure and get hooks */

request->ios2_BufferManagement = opener = AllocVec (sizeof (struct Opener), MEMF_PUBLIC);

And then it is being filled using GetTagData () calls. If I get it right GetTagData () returns either found tag value or default value (second param). However, the same (uninitialized) opener->rx_function var is provided as the default value:

Code: [Select]
opener->rx_function = (APTR)GetTagData (rx_tags [i], (UPINT)opener->rx_function, tag_list);

This would probably make sense if the AllocVec () call used MEMF_CLEAR in addition to MEMF_PUBLIC, but this is not the case. Even if the allocated memory has been zeroed previously why not provide NULL as the default value? The same very source uses NULL just a couple lines of code further:

Code: [Select]
opener->filter_hook = (APTR)GetTagData (S2_PacketFilter, NULL, tag_list);
opener->dma_tx_function = (APTR)GetTagData (S2_DMACopyFromBuff32, NULL, tag_list);

Or perhaps there is some reason of (not) doing so?

Looked into cnetdevice assembler sources, default value is also NULL:

Code: [Select]
; get copyfrom functions:

 move.l  #S2_COPYFROMBUFF,d0
 moveq   #0,d1
 move.l  a2,a0
 jsr     _LVOGetTagData(a6)

« Last Edit: November 29, 2013, 04:41:12 PM by tnt23 »
 

Offline tnt23Topic starter

  • Full Member
  • ***
  • Join Date: Dec 2005
  • Posts: 195
    • Show all replies
Re: Zorro III memory card... now with Ethernet
« Reply #14 on: December 01, 2013, 08:32:47 AM »
Quote from: nyteschayde;753590
This is awesome and please don't take this question as a complaint, but with RAM being so cheap, why only 64MB? Is there some limitation that I'm unaware of? Is this so it can be used in Zorro II in addition to Zorro III? I actually am unaware of the limitation per card for these devices in regards to addressable memory.


64M was the biggest SDRAM chip I was able to find in TSSOP package. The common approach is to have two or more chips on board, but I wasn't brave enough to route another one. Zorro III itself is able to address more than 1G per card.

Speaking of Zorro II, the limit is 8M there, unless someone comes with some sort of banking driver or something.