mamedev / mame

MAME
https://www.mamedev.org/
Other
7.75k stars 1.95k forks source link

NEWS-OS 4.2.1aR networking issues with the NWS-5000X and SONIC drivers #12491

Open briceonk opened 1 week ago

briceonk commented 1 week ago

MAME version

0.266 (and latest master)

System information

Linux (Fedora Workstation 40) i9-12900K, 64GB RAM US English locale and display language

INI configuration details

No response

Emulated system/software

nws5000x

Incorrect behaviour

XDMCP sessions do not function on versions of MAME built after commit d98993d7ff92cf07b9378bd79f358e37dc8e2084 (git bisect pointed to this commit)

Telnet and some other basic things still function. The sxdm login screen shows up, but typing just results in nothing being echoed back in the username field and the system doesn't respond to the packets in the expected way (shown in the Wireshark capture below): image

Good capture from the commit before: image

Expected behaviour

XDMCP sessions should function normally, and allow the user to type in their login credentials.

Steps to reproduce

  1. On an affected version, boot NEWS-OS 4.2.1aR
  2. Enable networking, and start sxdm on the emulated NWS-5000X
  3. Attempt to start an X session from the host system using the Xephyr program: Xephyr -query 192.168.2.5 -screen 1920x1080x8 -fp <font path with NEWS-OS fonts> +byteswappedclients :2
  4. Try to type in a username into the sxdm login prompt

Additional details

I suspect this is related to how the SONIC emulation interacts with MAME's networking layer, given the commit in question didn't touch the SONIC driver but did change some other networking stuff, and the fact that the nws3260 driver, which uses the LANCE chip instead, is not affected on NEWS-OS 4.1R. I also would not be surprised if the NWS-5000X driver's configuration of the SONIC/networking is causing this somehow.

I'm not very familiar with the internals of MAME's networking stack, but I will try to debug this when I can. Maybe someone else already knows what could have happened here :) I can work with anyone on this if needed (OS images, further testing, etc) as well.