Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A2osX Ethernet Driver #11

Open
burniouf opened this issue Dec 31, 2022 · 17 comments
Open

A2osX Ethernet Driver #11

burniouf opened this issue Dec 31, 2022 · 17 comments

Comments

@burniouf
Copy link

Where could i find documentation to add an ETH driver to support this board ?

https://github.com/A2osX/A2osX

actually supporting, U1, U2, LANCEGS, SSC/PPP...

https://github.com/A2osX/A2osX/tree/master/DRV

@profdc9
Copy link
Owner

profdc9 commented Jan 1, 2023

Support for ethernet on this board has already been implement on IP65. It is based on plugging a W5500 Wiznet module into the board via SPI into the ATMEGA328P. A picture of the board with the ethernet module attached:

https://github.com/profdc9/Apple2Card/blob/main/pics/picver11-with-ethernet.jpg

This is a commonly available W5500 ethernet module. The IP65 version patched to use the Dan ][ controller with W5500 attached is here:

https://github.com/profdc9/ip65

The file that shows how to communicate with the ATMEGA328P to exchange packets is this one:

https://github.com/profdc9/ip65/blob/main/drivers/dan2d.s

It is pretty simple, as most of the logic to actually control the W5500 is implemented by the ATMEGA328P. You can ignore the stuff for "ATARI" as it doesn't really apply here.

A command is sending bytes to the 82C55 port A (wrbt) and receiving them (rdbt).

Initialize:
Send $AC,$10,$XX,$XX,$XX,$XX,$XX,$XX (six bytes of MAC addr to initialize W5500)
receive $00 as confirmation

Poll: (read packet)
Send $AC,$11,packet buf size low byte,packet buf size high byte
Receive two bytes which is length of packet. If $00 $00, no packet is available.
Otherwise is low byte, high byte of length of packet
Then receive that number of bytes as the packet

Send:(transmit packet)
Send $AC,$12,packet size low byte,packet size high byte
Send exact number of packet bytes
Read one byte of result, zero if no error

Hopefully that will get you started.

@burniouf
Copy link
Author

burniouf commented Jan 2, 2023

Ok, Perfect! i can quickly write something...
as i have no HW yet to test, could you send me one of your team able to test at :

https://join.slack.com/t/a2osx/shared_invite/zt-ens62cl0-xeAFLjlRfUSMtzdc6o~Xew

is Dan2eth.drv a proper name for this driver ?

@profdc9
Copy link
Owner

profdc9 commented Jan 2, 2023

Dan2eth.drv is just fine as a name for the driver.

@profdc9
Copy link
Owner

profdc9 commented Jan 2, 2023 via email

@burniouf
Copy link
Author

burniouf commented Jan 2, 2023

Ok, thanks... maybe i will order from that guy....

i m almost done writing the DRV.

Any "CLOSE" or "SHUTDOWN" command ?
Any way to get Link Status and 10/100 or HD/FD ?

if someone can test, i will probably get it done today or tomorrow....

@burniouf
Copy link
Author

burniouf commented Jan 2, 2023

I would also need a way to detect if WIZ is plugged in....or not....for auto-detection routine.

@profdc9
Copy link
Owner

profdc9 commented Jan 2, 2023 via email

@burniouf
Copy link
Author

burniouf commented Jan 2, 2023

it is not mandatory, but other drivers are written like this :
image
image

@burniouf
Copy link
Author

burniouf commented Jan 2, 2023

DRV done....
image
image

meet me at SLACK if you want a TEST media

@Daniel102010
Copy link

Daniel102010 commented Jan 2, 2023 via email

@burniouf
Copy link
Author

burniouf commented Jan 2, 2023

Sure !!

Happy new year!!!

i will contact you at "@.***" with no delay ;-)

Remy

@burniouf
Copy link
Author

burniouf commented Jan 4, 2023

Guys, any chance i get a test report about code submitted to Daniel Marks at our SLACK place ?

@profdc9
Copy link
Owner

profdc9 commented Jan 6, 2023 via email

@burniouf
Copy link
Author

burniouf commented Jan 6, 2023

ZIP file & instructions to use it posted at SLACK. enjoy.

@profdc9
Copy link
Owner

profdc9 commented Jan 6, 2023 via email

@Micheledipaola
Copy link

Hey @burniouf and @profdc9 , I have a card assembled by @Daniel102010 and I am very curious about the A2osX driver, since I am waiting for a W5500 module from China. Is it available somewhere? I am wondering also if building a driver for the IIGS could be complicated...

@burniouf
Copy link
Author

hoy @Micheledipaola !
dan2eth.drv Driver is included in most of available A2osX STABLE medias.
An timing issue may be still present when running A2osX on IIgs with this driver....still awaiting test reports....
About driver for other TCP/IP stacks, feel free to get the code from A2osX, and of course you can point any other developer to A2osX team if additional information required about supporting this W5500 eth device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants