Skip to content

USB: add Namco UE PCB (AN986 USB-Ethernet) device with built-in netplay - #105

Open
boostedmans-hub wants to merge 1 commit into
PS2Homebrew-arcade:masterfrom
boostedmans-hub:netplay-uepcb
Open

USB: add Namco UE PCB (AN986 USB-Ethernet) device with built-in netplay#105
boostedmans-hub wants to merge 1 commit into
PS2Homebrew-arcade:masterfrom
boostedmans-hub:netplay-uepcb

Conversation

@boostedmans-hub

Copy link
Copy Markdown

Description of Changes

Adds a new USB device: UE PCB (Namco arcade net) — the ADMtek AN986 "Pegasus" USB-Ethernet board Namco used for cabinet-to-cabinet versus play on System 246/256, with a built-in TCP netplay transport.

  • The AN986 is emulated at the register/endpoint level (vendor register file, MII PHY, EEPROM MAC words, link-up event, bulk RX/TX framing). The game's own AN986.IRX driver and AVE-TCP stack run unmodified on the emulated IOP.
  • Ethernet frames are tunneled over plain TCP between emulator instances: 1P listens and acts as an N-way hub, 2P-4P connect. One topology covers 2-4 players, same PC or across a LAN/VPN.
  • Role auto-detection from a single "1P's IP" setting (same value on every PC; the PC whose own IP matches becomes host). Blank = host, 127.0.0.1 = same-PC join.
  • Unique MAC auto-generated per instance (Namco OUI 00:90:2e + random), overridable.
  • Windows host auto-adds an inbound firewall rule for the port (one-time UAC).
  • Three runtime IOP-side patches (pattern-matched, idempotent) fix stock-stack behaviors that break without real PHY hardware: NETIF_FLAG_LINK_UP never set, netif broadcast left as 255.255.255.255 (same fix Play!'s Iop_NetDev applies), RX dispatch state gate.
  • VMManager: non-lightgun .acgame can specify USB1 via [data] usb= so the UE PCB selection survives reboots.

Register-level behavior was modeled on captures from a real UE PCB.

Rationale behind Changes

Restores arcade versus play for System 246/256 network games without real UE PCB hardware. Verified with Gundam SEED Destiny: Rengou vs. Z.A.F.T. II — full 2P and 4P matches, no comm errors, same-PC and cross-PC (VPN).

Limitations: emu-to-real-cabinet play connects and boot-syncs but desyncs in-match (pure lockstep + cycle mismatch) — a raw-L2/pcap transport for real-cab experiments exists locally, possible follow-up PR. Netplay sessions aren't savestate-safe.

Suggested Testing Steps

Same-PC 2P (two portable installs, each with its own ini):

  1. Instance A (1P): Settings -> USB -> USB1 = UE PCB -> leave "1P's IP" blank
  2. Instance B (2P): "1P's IP" = 127.0.0.1, game NetworkID = 2 (test menu)
  3. Boot A first (console: "UePCB: netplay HOST listening"), then B
  4. NETWORK SETUP finds both -> run a versus match

Cross-PC: enter the 1P PC's LAN IP in "1P's IP" on every PC (same value); TCP 7500 reachable on the host (added automatically on Windows).

Related GameIDs

renza2 (Gundam SEED Destiny: Rengou vs. Z.A.F.T. II). Other UE PCB titles (A.E.U.G. vs. Titans DX etc.) untested.

Did you use AI to help find, test, or implement this issue or feature?

Yes — substantially, and I want to be fully transparent: the reverse-engineering (IOP/IRX disassembly, real UE PCB protocol captures) and most of the implementation were done with AI assistance (Claude). I did the direction, all hardware/real-cabinet testing, multi-PC playtesting, and debugging iterations. I understand if this doesn't fit the LLM usage policy as-is — happy to walk through any part of the design and adapt as maintainers prefer.

🤖 Generated with Claude Code

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting a contribution to PCSX2

As this is your first pull request, please be aware of the contributing guidelines.

Additionally, as per recent changes in GitHub Actions, your pull request will need to be approved by a maintainer before GitHub Actions can run against it. You can find more information about this change here.

Please be patient until this happens. In the meantime if you'd like to confirm the builds are passing, you have the option of opening a PR on your own fork, just make sure your fork's master branch is up to date!

@Tovarichtch

Copy link
Copy Markdown

Thanks for your transparency and PR!

I will take a look soon. Quick glance shows some bloating in the code, but nothing serious.

@israpps israpps added the needs-testers Needs testers. notifies testers at discord label Jul 7, 2026
Emulates the ADMtek AN986 "Pegasus" USB-Ethernet board Namco used for
cabinet-to-cabinet versus play on System 246/256. The game's own
AN986.IRX driver and AVE-TCP stack run unmodified on the emulated IOP;
ethernet frames are tunneled over TCP between emulator instances
(1P hosts and acts as an N-way hub, 2P-4P join), so 2-4 player versus
works on one PC or across a LAN/VPN.

Register-level AN986 behavior (MII PHY, EEPROM MAC, link events) was
modeled on captures from a real UE PCB. Includes three runtime IOP-side
patches for stock-stack behaviors that break without real PHY hardware
(link-up flag, netif broadcast address, RX dispatch gate).

Verified with Gundam SEED Destiny: Rengou vs. Z.A.F.T. II - full 2P and
4P matches, same-PC and cross-PC.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Hydreigon223

Copy link
Copy Markdown

Taito was also known for using a slightly different AN986 based USB-ethernet adapter that's only compatible with Battle Gear 3 and Zoids. The Namco UE PCB on the other hand isn't compatible with said two mentioned games even on hardware. It's possible Taito used different USB descriptors from this adapter too compared to the Namco UE pcb.

Here are two pics of the adapter itself:
20260620_234815
20260620_234840

@Manjaruntu

Copy link
Copy Markdown

The Namco UE PCB is also used for stuff like ALL.Net server connectivity for things like Tekken 5 (5.0, 5.1, 5DR)'s Live Monitor or for niche stuff (to this emulator, probably) like Akemasu (The IDOLM@STER) and it's idol-to-producer text messaging (one of the most iconic IM@S mechanics in later console-based titles).

Hydreigon does have a point. Zoids and BG3 use a "Pegasus II"-based "LANEGG" USB NIC that has extra registers compared to the "Pegasus"-based Namco UE PCB, but being able to have head-to-head or two-on-two Gundam matches is a good start, of course.

Once someone manages to follow Isra's lead and implement card emulation (only if Isra is unable to source an EX-CARD PCB), we could definitely have the possibility for Tekken.Net or NESYS emulation, or most likely Druaga Online finally being playable. Only time will tell!

@israpps

israpps commented Jul 8, 2026

Copy link
Copy Markdown
Member

The Namco UE PCB is also used for stuff like ALL.Net server connectivity for things like Tekken 5 (5.0, 5.1, 5DR)'s Live Monitor or for niche stuff (to this emulator, probably) like Akemasu (The IDOLM@STER) and it's idol-to-producer text messaging (one of the most iconic IM@S mechanics in later console-based titles).

Hydreigon does have a point. Zoids and BG3 use a "Pegasus II"-based "LANEGG" USB NIC that has extra registers compared to the "Pegasus"-based Namco UE PCB, but being able to have head-to-head or two-on-two Gundam matches is a good start, of course.

Once someone manages to follow Isra's lead and implement card emulation (only if Isra is unable to source an EX-CARD PCB), we could definitely have the possibility for Tekken.Net or NESYS emulation, or most likely Druaga Online finally being playable. Only time will tell!

Card reader is coming one way or another

there is a bounty for making an app that can reset the usage counter for the IC Cards on SDBZ (or remove the card necessity altogether)

@Keropon

Keropon commented Jul 25, 2026

Copy link
Copy Markdown

Card reader is coming one way or another

So happy to read this! Is the pcsx2x6-imas fork of any utility or is it too hacky for now? I developed a tool that uses the same named pipe that fork provides for the card reader comms and would love it if it's kept as is, dunno what could be the negatives about that implmentation

there is a bounty for making an app that can reset the usage counter for the IC Cards on SDBZ (or remove the card necessity altogether)

I just RE'd the death counter on the Akemasu cards... maybe I could give it a chance

@Wing0195

Wing0195 commented Aug 9, 2026

Copy link
Copy Markdown

I had test other gundam vs games, Gundam vs Gundam Next has failed to link.

@mmclub2000

Copy link
Copy Markdown

How to run this plugin?

@kozanryusui

Copy link
Copy Markdown

I got Druaga Online working based on this patch with some additional changes plus an ALL.Net emulator.
I'll push some PRs for that soon-ish, mainly revolving around network and IP settings because the fixed values don't work for Druaga.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants