English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   request.UAE Wishlist (https://eab.abime.net/forumdisplay.php?f=56)
-   -   Ethernet card hardware emulation (https://eab.abime.net/showthread.php?t=47388)

gilgamesh 10 September 2009 10:43

Ethernet card hardware emulation
 
Is CDROM (ISO9660) support or networking planned for WinUAE sometime?

What would be the best strategy for implementing CDROM: IDE, SCSI or something else?
How about networking? There could a tap-device to the outside. But what bus should that be attached to?

Toni Wilen 10 September 2009 11:16

Quote:

Originally Posted by gilgamesh (Post 593422)
Is CDROM (ISO9660) support or networking planned for WinUAE sometime?

Network card, maybe (it can be useful in AmigaOS emulation). CDROM, unlikely.

(btw, cdrom logical format, ISO9660, has nothing to do with emulation)

Quote:

What would be the best strategy for implementing CDROM: IDE, SCSI or something else?
Bus type does not really matter much, hardware level SCSI/IDE CDROM is not worth the trouble. (Just for installing Linux = not worth the trouble. MMU at least can be used in AmigaOS side too)

Quote:

How about networking? There could a tap-device to the outside. But what bus should that be attached to?
What is the most common Amiga network card that is also supported in _every_ Linux/BSD/some random unix? (PCMCIA most likely not, perhaps some Z2 board?)

alexh 10 September 2009 12:05

PCMCIA would probably be 3COM 3C589?

There are also AmigaOS drivers with source code.

http://aminet.net/package/driver/net/3c589

Toni Wilen 10 September 2009 12:10

Quote:

Originally Posted by alexh (Post 593441)
3COM 3C589 PCMCIA? There are also AmigaOS drivers with source code.

http://aminet.net/package/driver/net/3c589

Yeah but PCMCIA was "new feature" and not supported in big box Amigas. (Amiga Linux/Unix most likely was not targeted for A1200..)

EDIT: the point I am making: I am only going to emulate single network card in hardware. It MUST be common one that is supported by every Amiga compatible OS.

alexh 10 September 2009 12:15

Z2 would perhaps be AMD Am7990 (A2065, AE2000 & Ariadne I) or Realtek RTL8019AS (Ariadne II & X-Surf)?

There are linux drivers & AmigaOS drivers for both.

http://www.kneuro.net/cgi-bin/lxr/ht...iadne.c?a=m68k
http://www.kneuro.net/cgi-bin/lxr/ht...adne2.c?a=m68k
http://www.kneuro.net/cgi-bin/lxr/ht...a2065.c?a=m68k

Toni Wilen 10 September 2009 14:40

Quote:

Originally Posted by alexh (Post 593446)
Z2 would perhaps be AMD Am7990 (A2065, AE2000 & Ariadne I) or Realtek RTL8019AS (Ariadne II & X-Surf)?

At least AM7990 looks very nice for emulation, no need for specific timings, uses dma and memory buffers (makes emulation simple and fast)

Final confirmation needed: Does all Amiga compatible operating systems, all AmigaOS TCP/IP stacks support A2065? (emulated Z2 card in non-Z2 slot Amiga is not a problem and won't cause any problems)

EDIT: does any m68k Linux distribution support net install? (without cdrom)

thomas 10 September 2009 14:59

Quote:

Does [...] all AmigaOS TCP/IP stacks support A2065?
AmiTCP 2.2 on Aminet contains SANA-II driver for A2065 and all TCP/IP stacks support SANA-II.

Miami also supports it natively (z2-am7990.mni).

JohnF 10 September 2009 15:36

Quote:

Originally Posted by alexh (Post 593446)
Z2 would perhaps be AMD Am7990 (A2065, AE2000 & Ariadne I) or Realtek RTL8019AS (Ariadne II & X-Surf)?

Almost all of those are supported by NetBSD - http://www.netbsd.org/ports/amiga/ (scroll down).

Source code is available too, of course.

gilgamesh 10 September 2009 19:35

Quote:

Originally Posted by Toni Wilen (Post 593505)
Does all Amiga compatible operating systems, all AmigaOS TCP/IP stacks support A2065?

Linux/m86k does support A2065. See here

Quote:

Originally Posted by Toni Wilen (Post 593505)
EDIT: does any m68k Linux distribution support net install? (without cdrom)

Sarge does. See here under 2.2.4

EDIT:
Quote:

Originally Posted by Toni Wilen (Post 593427)
(btw, cdrom logical format, ISO9660, has nothing to do with emulation)

Yes, I see. Just wanted to distinguish it from CDTV and CD32.

Toni Wilen 10 September 2009 20:27

Great, A2065 it is :) (someday or soon. not sure yet :))

Toni Wilen 12 September 2009 10:59

We may have a problem.. Does A2065 drivers accept user configured MAC address? Default / "ROM" MAC seems to be 00:08:01:xx:xx:xx where last three xx's are autoconfig last 3 serial number bytes.

Solution 1: driver must accept real MAC address (same as real card or nothing will work) but this is something user should not need to do.

I think manually entered MAC address was something you were never ever allowed to do at that time... (at least officially)

Solution 2: examine all sent and received packets and replace "fake" MACs with real MACs and vice versa. There shouldn't be too many different ethernet packet types (at least packets that Amiga software uses) that need adjustments but this would be usual megaboring programming task.. (but it would be also completely transparent)

Toni Wilen 12 September 2009 17:43

A2065 emulation done, that was (too) easy and simple task, biggest problem was MAC translation for DHCP support (Ethernet frames, ARP and DHCP only supported in MAC translation)

http://www.winuae.net/files/b/winuae.zip

Add "a2065=<mac or name of physical device, check the log for names>" to config file. (XX:XX:XX:XX:XX:XX format) No gui support yet. WinPCap required (uses same interface as uaenet)

Emulated device's MAC (only visible to emulation) is always 00:80:01:xx:yy:zz where xx:yy:zz are last 3 numbers of real physical device's MAC.

Not supported: multicast (always dropped), loopback tests, most error condications (checksums, collisions, other receive/send related errors) can never happen (who cares?)

Do not ask, do not touch if you don't know how to configure Amiga and/or Linux networking. Do not ask about winpcap either.

gilgamesh 12 September 2009 20:56

Please tell me you didn't do this in one afternoon. :shocked

Things get a little complicated, now. Maybe I'll have to install XP in VirtualBox before testing networking. Wine seems not to work correctly for networking, or maybe I'm just acting stupid? I'll see...

Toni Wilen 12 September 2009 21:16

Quote:

Originally Posted by gilgamesh (Post 594236)
Please tell me you didn't do this in one afternoon. :shocked

Few days of datasheet reading and other research, 2 days of coding. I said it was too easy :D

Quote:

Things get a little complicated, now. Maybe I'll have to install XP in VirtualBox before testing networking. Wine seems not to work correctly for networking, or maybe I'm just acting stupid? I'll see...
afaik only Windows version of pcap supports transmit.

btw, second NIC only for Amiga emulation is recommended, two OS's accessing same card can cause interesting problems.. (especially if using DHCP) Also make sure Windows IPv4 and IPv6 are both disabled in second card.

Shadowfire 13 September 2009 00:34

A2065 emulation & MAC addresses
 
Toni - here's a little background information on MAC addresses.

IEEE assigns MAC addresses. The first three bytes are the manufacturer number, 00:80:01 is probably AMD's number.

The manufacturer sets the last three bytes, and they must be unique for *every* device the manufacturer makes. If they make more than 16million devices, they need to get a new manufaturer number from IEEE.

This is so that every single MAC of every device on your network is different. Ethernet switches make switching decisions based on a frame's destination MAC address, and constantly build a list on each port of every source MAC address seen at that frame.

Needless to say, if you have devices on different ports with the same MAC address, you will have serious network problems. This is also why nobody in their right mind exposes a NIC's ability to choose a new MAC address to the user.

Your proposed solution (00:80:01:XX:XX:XX on emulated side only) seems like the best compromise between compatibility and network safety.

Edit: Just saw that last part of your last post. That would definitely solve the problem. It is probably best to pass the real MAC address thru to the Amiga side, as I would be pissed if my network software was lying to me about the MAC address. Add-in 10/100/1000 NIC's are incredibly cheap, anyways.

gilgamesh 13 September 2009 09:20

Well, if nobody intends to build a WinUAE<->WinUAE network, then one fixed MAC-Address would be sufficient.
We might take it from the Ethernet card I stored in a box in my basement. ;)

Toni Wilen 13 September 2009 09:57

Quote:

Originally Posted by Shadowfire (Post 594284)
Toni - here's a little background information on MAC addresses.

I do know that :)

Quote:

Needless to say, if you have devices on different ports with the same MAC address, you will have serious network problems. This is also why nobody in their right mind exposes a NIC's ability to choose a new MAC address to the user.
Even Windows nowadays allow manual MAC selection.

Quote:

Your proposed solution (00:80:01:XX:XX:XX on emulated side only) seems like the best compromise between compatibility and network safety.

Edit: Just saw that last part of your last post. That would definitely solve the problem. It is probably best to pass the real MAC address thru to the Amiga side, as I would be pissed if my network software was lying to me about the MAC address. Add-in 10/100/1000 NIC's are incredibly cheap, anyways.
It would never work because a2065 driver would just ignore the packet because it does not match 00:80:01:XX:X:XX. (00:80:01 is Commodore's MAC address range)

Hmm.. I guess using 00:80:01:XX:XX:XX in outside world would work if nic is set to promiscuos mode, not that it would solve any mac collision problems, user could have networked Amiga with real A2065 and there is only 16M mac adress space :D Better have collisions inside emulation only than in outside world where it can cause major problems.


and after all, this is emulation, better keep emulation as compatible as possible, including mac address :)

gilgamesh 13 September 2009 14:30

I'm not quite sure on the design of ethernet emulation. You take packages from inside WinUAE and copy them 1:1 on a real NIC?
Why don't you do something like qemu: dump the traffic to a software TAP device so the user can bridge that to his NIC, if neccessary?

Toni Wilen 13 September 2009 15:24

Quote:

Originally Posted by gilgamesh (Post 594381)
I'm not quite sure on the design of ethernet emulation. You take packages from inside WinUAE and copy them 1:1 on a real NIC?
Why don't you do something like qemu: dump the traffic to a software TAP device so the user can bridge that to his NIC, if neccessary?

I used tap originally with uaenet.device but there was some problems (I don't remember..) and it was too complex to configure.

EDIT: it was due to complex configuration and lack of promiscuous mode support (receive all packets, not just those that matches MAC or broadcast)

gilgamesh 13 September 2009 20:36

Did a bit of googling and found that WinPcap seems a cool choice for Windows. It can use the loopback device instead of a real NIC, too. It's just that I'm used to TAP.
I'm certainly not going to install another NIC. I got a laptop. :D

Here's my plan: Setup two virtual machines in VirtualBox, connected via private/virtual network. One has Windows, WinUAE and WinPcap, the other runs Linux. Installing emulated NICs is less problematic. Maybe that will result in a WinUAE network.


All times are GMT +2. The time now is 23:12.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.06897 seconds with 11 queries