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

What it is
----------
The XCOTA TAG v3 game (see the two-player package's README) for four people on one board:
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 and knockouts.
- There are no Start or Coin buttons on this wiring, 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.

Controllers
-----------
It needs the native CPS-2 four-controller input profile, the same one the Cross Fever
four-player builds for Marvel vs. Capcom, MSHvsSF and XMvsSF use:
  P1  IN0 low byte    P2  IN0 high byte    P3  IN1 low byte    P4  IN1 high byte
      each byte: Right, Left, Down, Up, LP, MP, HP, LK (active low)
  MK  on IN2 bits 8-11 (the Start lines), HK on IN2 bits 12-15 (the Coin lines), P1-P4
An emulator whose xmcota driver offers only two players cannot drive P3 and P4.

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-v3-4p-preview.cmd
macOS/Linux:  python3 xcota_tag_4p_patch.py /path/to/xmcota.zip
It writes xmcota_tag_v3_4p.zip and a receipt beside your ZIP. Copy it into a separate ROM
folder and rename the copy to xmcota.zip.

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

How it was tested (and what was not)
------------------------------------
- MAME 0.264 with the four-controller wiring emulated at the input ports: four humans
  joined, picked and fought; P1 and P3 called Cross Over Fever while P2 tagged P4 in, each
  fighter on its owner's controller, with no resets or freezes.
- Fightcade's FBNeo core, built with the same four-controller input profile: the same
  four-player recording replays with every sync point reached (joins, picks, the fight, the
  call), no resets or freezes.
- Installer gate: the three 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: four physical controllers, a CPS-2 cabinet's wiring, Fightcade (its
  xmcota is two-player only), Windows PowerShell 5.1.
