XCOTA TAG v4 four-player (preview) -- 2v2 tag teams for X-Men: Children of the Atom (CPS-2)
=========================================================================================

What it is
----------
The XCOTA TAG v4 game (see the two-player package's README) for four people: P1 and P3
against P2 and P4, each X-Man on its own controller.
- P1 and P2 pick their side's first X-Man, P3 and P4 the second. Each fighter keeps its
  owner's controller through tags, team supers, Cross Over Fever, COMBO BREAKERs and
  knockouts.
- There are no Start or Coin buttons, so the game runs in free play: a fresh HP+HK is a
  Start for that player's side (to join, or to challenge the CPU). In a fight between
  humans HP+HK keeps its meaning (tag; with QCF or QCB at Level Max, team super or Cross
  Over Fever).
- A 1P to 4P marker sits over every human-owned X-Man.
- Six colours: the button each player confirms a pick with picks that X-Man's colours (LP
  the game's own, LK/MP/HP/MK/HK Marvel vs. Capcom 2's LK/HP/A1/HK/A2).

Where it runs
-------------
The XCOTA TAG RetroArch core (xcota-tag-v4-retroarch-core). It has the four-player game
"xmcota4p" built in, on Windows and Linux, and builds on macOS from its source folder. Four
pads on one computer, four people online through Parsec (the host runs RetroArch, three
guests connect), or RetroArch netplay. The core's README walks through each.
Stock emulators (MAME, stock FBNeo, Fightcade) only read two players for this game.

Supported set
-------------
  xmcota     Euro 950331 (the MAME parent), clean and unmodified; non-merged or merged,
             with or without xmcota.key. The clones are not supported by this build.

How to patch
------------
Windows:      drag your clean xmcota.zip onto xcota-tag-v4-4p-preview.cmd
macOS/Linux:  python3 xcota_tag_4p_patch.py /path/to/xmcota.zip
It writes xmcota4p.zip and a receipt beside your ZIP: the name the XCOTA TAG core loads.
Put it in your ROM folder. For RetroArch netplay everyone makes their own from a clean
xmcota.zip: the file comes out the same.

Controllers (the core's RetroPad layout)
----------------------------------------
  Y LP   X MP   L HP   B LK   A MK   R HK   L2 LP+MP+HP   R2 LK+MK+HK
  Ports 1 and 3 are one team, 2 and 4 the other.
The game itself reads the native CPS-2 four-controller profile of the Cross Fever
four-player builds (P1 IN0 low byte, P2 IN0 high, P3 IN1 low, P4 IN1 high; MK on the Start
lines, HK on the Coin lines), so a CPS-2 board wired for four works the same way.

What is in this package
-----------------------
  xcota-tag-v4-4p-preview.cmd   Windows installer (runs the embedded PowerShell script)
  xcota_tag_4p_patch.py         the same patch in Python 3.8+
  xcota_tag_v4_4p.spec.json     the patch itself: hashes, replacement bytes and offsets
No ROM data is included: the new code (26,401 bytes in the 05 program ROM, which was empty
there, with the two-player build's colour tables), short jumps in the 03 program ROM, and the
HUD and platform tiles of the two-player build.

How it was tested (and what was not)
------------------------------------
- The XCOTA TAG RetroArch core (Linux build): every button and direction of all four ports
  reaches the game, no cross-talk; a four-player take played through (four joins, four
  picks, a tag with the full-screen kick, P3 and P4 moving their own X-Men).
- MAME 0.264 with the four-controller wiring emulated at the input ports: see RELEASE-4P.json.
- Installer gate: the layouts through the Python patcher and the installer's own PowerShell
  code (PowerShell 7.4.6 on Linux) give the MAME-tested build's members; every refusal case
  writes nothing. The count is in RELEASE-4P.json.
- Not tested: the Windows core on a Windows PC, Parsec and netplay sessions with four
  people, four physical controllers on a CPS-2 cabinet, Windows PowerShell 5.1.
