Sensible World of Soccer 96/97 · DOS · ENGLISH.EXE · Versione italiana

SWOS ITA Mod Technical Manual

Documentation for anyone who wants to understand, extend or port the mod's patches: Serie C1 and C2, South American club cups (Libertadores, Supercopa, CONMEBOL), the Intercontinental Cup in career mode, real 1996-97 squads, classic tourneys (World Cup 1982, Mitropa Cup 1934, FA Cup 1871-72), Argentina's Apertura and Clausura, Australia, New Zealand and MLS 1997 (2.5), classic seasons with the DDR 1988-89 and that year's European cups (2.6), and the World 2026-27 career world with its shared engines (4.0). Everything below was worked out from the disassembly and checked with builds and test games.

State as of 2026-10-22 (release 4.0) ENGLISH.EXE build 1a0fa3d1… TEAM.020 bd44208c… Original ENGLISH.EXE aa21cd1c…

Foreword

A long time ago - in 2004 - in a galaxy far, far away, where the Internet was only just leaving behind the sound of the modem, artificial intelligence was the stuff of science fiction novels and video games were sold in elegant cardboard boxes in shops, yours truly - together with Ali Erdinc Koroglu, Jan Wickberg, Martin Binet, Zlatko Karakas, Ross Mayhew and Steve Smith - founded the Swos Working Group (web.archive.org) in honour of our all-time favourite video game: the 1996-1997 edition of Sensible World of Soccer. We were driven by a dream: to make that game even better by adding a few competitions whose absence we felt especially keenly. The Italian Serie C (split into C1 and C2), where players who would later become international stars, such as Simone Inzaghi and Gianluca Zambrotta, were playing, and the South American cups, above all the legendary Copa Libertadores, which, in an age when football on TV was still a novelty and far from plentiful, held for us the charm of exotic, faraway things. We would have loved to play these competitions above all in career mode, the SWOS players' absolute favourite: partly because in season mode and in the preset competitions we had already managed to add them, in a new edition of SWOS that was going to be called Swos 2004. The work was done by reverse engineering and hex editing; I remember the thrill of discovering the routines that add competitions, but also the bitter frustration of not being able to make them work in career mode, which would freeze every time. Today, in the year of grace 2026, I wanted to settle the score with this personal story that never left me over these two decades: the regret of having come close to a dream and never quite making it. After all, I told myself in an attempt at consolation, I ended up becoming a web and mobile developer; reverse engineering 1996 x86 code had already been a miracle, and hardly any of the many modern modders had managed the feat.

Today, thanks to AI, which has changed the very idea of programming forever, the feat is accomplished: you can now download the patch that adds, in every language of the game, Serie C1 and C2 to the Italian league, with the original squads of the time, and above all adds, for South America, the Copa Libertadores, the CONMEBOL and the Supercopa, with the entry rules of the day. And, as the icing on the cake, the Intercontinental Cup could not be missing. What matters to me, though, is not only the result but also the explanation of how we got there through AI. So here we publish, in English and Italian, the complete documentation of the method followed to create the patches, which finally revealed to me what we had not understood back in 2004, and which I hope will inspire other developers and lovers of the most beautiful video game in the world to expand its career mode even further. An immense thank you to the work of Zlatko Karakas, whose fundamental disassembly of the original executable I found after so many years of absence (github.com).

This patch is dedicated to the memory of Steve Smith, an extraordinary compiler of updated squads for SWOS, who left us far too soon. And to everyone who hopes to see, sooner or later, a dream come true, even one that has lasted 22 years…

— Davide Lorigliola

1Overview

The mod never touches the original files. A Python script reads orig/ITALIAN.EXE and orig/DATA/TEAM.020, applies every change deterministically and writes the installed files to c/SWOS/. Every address it needs is located in the executable by signature (unique byte sequences) and checked with assert: if a signature is missing or not unique, the build stops instead of producing a wrong exe.

AreaWhat it doesWhereStatus
Italy with 4 divisionsSerie A 18, B 20, C1 18, C2 18; 4 up and 4 down between adjacent levels; fixes the 1997 end-of-season freezepatch.pytested
C1/C2 teams36 real 1996-97 clubs with squads, coaches and calibrated strengthc1c2.py, c1c2_rosters.pytested
South American cupsLibertadores (real 1997 format: 5 groups of 4, holder straight into the round of 16, 2.0), Supercopa, CONMEBOL: menus, world view, career, qualifiers from the standings, holder rulessacups.pytested
Double participationSouth American clubs: Supercopa in slot 1 (the national cup slot, free in South America) + continental cup in slot 3sacups.pytested
PersistenceSouth American cup lists and Intercontinental finalists saved with the careersacups.py, salists.pytested
IntercontinentalSingle-match final in December between the Champions Cup winner and the Libertadores winner; finalists updated at season end; slot 2 or slot 4sacups.pyslot 2, season end slot 4
New countries (1.1–1.2)Costa Rica league; Egypt, Morocco, Tunisia, Nigeria, Cameroon, South Korea, China, Saudi Arabia, Guatemala, Honduras with league and national cup (real clubs, invented players)countries.py, africa.pytested (1 season)
Continental club cups (1.1–1.2)CAF Champions League, CAF Cup Winners Cup, CAF Cup, CONCACAF Champions Cup, Asian Club Championship, Asian Cup Winners Cup: menus, world view, career, qualifiers from the standings, saved in a trailer of the .CAR filecafcups.py, trailer.pytested (1 season)
Classic tourneys (2.0)World Cup 1982, Mitropa Cup 1934, FA Cup 1871-72 with real formats and squads, in Preset competitions only; odd group sizes, fixed draws, byes, drawing lotshistoric.py, lib97.pytested

2Environment and build

Folders

~/swos-mod/
  orig/            ITALIAN.EXE, ENGLISH.EXE, DATA/TEAM.020, swos9697ita.iso   (NEVER modify)
  c/SWOS/          game installed for DOSBox-X: ITALIAN.EXE, DATA/TEAM.020, *.CAR saves
  tools/           all the mod's code (Python + nasm sources inside sacups.py)
  ref/swos.asm     full IDA disassembly (labels = ENGLISH exe VAs), from github.com/zlatkok/swos-port
  ref/symbols.txt, ref/docs/SWOS/*.txt   file formats and notes (teams.txt, career.txt, ...)
  notes/STATUS.md  detailed log of every session (primary source)
  notes/addrmap.json  ENGLISH → ITALIAN delta map per object
  docs/            this manual (src/ = sources in both languages, tools/mkdocs.py builds the pages)

Commands

cd ~/swos-mod/tools && python3 patch.py      # writes c/SWOS/ITALIAN.EXE and c/SWOS/DATA/TEAM.020
python3 tools/salists.py c/SWOS/SAVE.CAR      # decodes a save's SA lists / Intercontinental pair
ndisasm -b32 -o 0xA1000 file.bin              # disassembler (Homebrew); nasm to assemble

Requirements: Python 3, nasm and ndisasm on the PATH. The game runs in DOSBox-X with the CD mounted from the original ISO. The build is deterministic: same inputs, same md5 (the random generator has a fixed seed, 1997).

Build order in patch.py:

  1. patch_teams: rebuilds TEAM.020 (original Serie A and B + 36 C1/C2 clubs) and returns the index remap table.
  2. patch_exe: adds a 4 KB page to object 1 (add_object_page), sets up the string pool, remaps Italian clubs in the European cup lists, applies the Italy patch (patch_italy), then all of sacups.patch (cups, tables, career, season end), sets object 1's vsize and flags, saves while rebuilding the fixup tables.

3Golden rules

Each of these rules comes from a real bug met during development.

Pointers across objects only through fixups. Object 1 (code) and object 2 (data) are not loaded at the same distance they have in the file. Every absolute address written into code or data needs an LE fixup pointing to the right object and offset. Never store an object-2-relative offset that points to object-1 data.
Name strings live in object 2. League and cup names are offsets relative to STR_BASE = obj2+0x16F8 (not "aChairmanScenes" as the English disassembly suggests). A name placed in object 1 shows up as garbage. New names go through strpool.py, which is almost full today.
Respect the game's checksums. At season end cseg_9487A checks that the 2000 bytes of leaguesTableCopy add up to 0 modulo 256; if not, the game freezes (int 3; jmp $). Any data parked in game tables must carry a balance byte.
No string instructions (movs, rep). ES is not guaranteed to equal DS where we enter. All copies in added code are byte loops through DS.
"Registers" D0–D7 and A0–A6 are memory variables. The game is a machine translation of 68000 (Amiga) code. Routines take parameters in these variables (D0 = obj2+0x3146D …). x86 registers are not preserved across game calls.
Search by signature, never fixed addresses. Every location is found with byte patterns and confirmed with assert. This makes porting to the other executables (English, French, German) possible and guards against silent errors.
Remove the fixup of an overwritten address. A hook that overwrites an instruction holding an absolute address must first remove its fixup (p.remove); otherwise the loader rewrites those bytes and the new call jumps to garbage (section 20).
Never drop teams that freeze. A team or save that causes a freeze must be kept and analysed: it is the proof of the bug.

4LE format and fixups

Each language executable (ENGLISH.EXE, ITALIAN.EXE, FRENCH.EXE, GERMAN.EXE) is a DOS/4GW program in LE (Linear Executable) format with two main objects. Values below are for ENGLISH.EXE:

ObjectContentLink baseNotes
obj1code0x10000original vsize 0xA0B79 → 0xA1000 (session 2) → 0xA2000 (added page). Made writable (flag 0x2) because the season-end code rewrites the cup lists stored in the new page.
obj2data0xC0000all game variables, career buffers, competition tables, strings

Addresses in the disassembly (cseg_8B2D3, dseg_D8CAA) are ENGLISH.EXE virtual addresses: object offset = VA − base. The other languages are shifted by small deltas (notes/addrmap.json maps ENGLISH → ITALIAN); the build never relies on them and finds every location by signature.

Fixups

Every absolute address in the file has an internal fixup record (source object, offset in page, target object, target offset). When an instruction holding an address is overwritten, its fixup must be removed (p.remove), or the loader corrupts the new bytes. When an address is added, the fixup must be added (p.add_ptr). lepatch.save rebuilds the fixup table; if it grows past the available room it moves the data pages forward (0x800 bytes so far) and updates the header offsets.

Added page

add_object_page(data, 1) appends a 4 KB physical page at the end of the file, inserts it into the page map right after object 1's pages, adds an empty entry to the fixup page table, shifts the header table offsets by +4/+8 and increments object 2's page_idx. All South American cup code and data live in this page, from obj1+0xA1000. Today it is used up to about obj1+0xA1932 (about 1.7 KB free). The rest of the old cave after the Italy league structure, 0xA0BC6–0xA1000 (about 1 KB), is still free.

5The tools

le.py
Read-only LE parser: objects, page → file map, obj_bytes(n), fixups() returning (source obj, offset, type, target obj, target offset, …). Used for all checks.
lepatch.py
LEPatch class: put/get by object and offset, target(obj, off) reads where a fixup points, add_ptr, remove, retarget, set_vsize, add_flags, save (fixup rebuild + data page move). add_object_page function. A round trip with no changes gives an identical file.
nasmcave.py
Assembles nasm sources (written as strings inside sacups.py) at a cave address. Symbols come as {name: (object, offset)}. The source is assembled three times: plain, with obj1 moved by 0x01000000 and with obj2 moved. Every dword that changes is an absolute reference and gets a fixup to the right object; relative jumps inside obj1 do not change and need none. labels() reads nasm's map file for label addresses.
strpool.py
Room for new strings in object 2: the never-referenced strings .COPPA AFRICANA CLUB****** and COPPA SUDAMERICANA*****, plus the asterisk padding of the second COPPA EUFA and of ERRORE DISCO (the text stays intact). Holds COPA LIBERTADORES, SUPERCOPA, COPA CONMEBOL, SERIE C1, SERIE C2 and a shortened name for COPPA INTERCONTINENTALE. Full: 1 byte left.
sacups.py
The heart of the mod: South American cup and Intercontinental structures, continental tables, nasm sources CAREER_ASM (season start and load) and QUALIFY_ASM (season end), all signature searches and hook installation.
patch.py
Build entry point: Italy (global number base, 4-division structure), TEAM.020, remap of Italian clubs in the European cups.
c1c2.py / c1c2_rosters.py
C1/C2 clubs (kits, division), real 1996-97 squads with coaches, strength targets, team record construction (section 8).
salists.py
Reads a .CAR and prints the saved lists: trailer 'C4'/'C5'/'C6' (1.2/1.3/2.0), else the 1.0/1.1 block (SA or S2, with checksum); Libertadores/Supercopa/CONMEBOL lists, Intercontinental pair.
addrmap.py
Builds notes/addrmap.json by comparing ENGLISH.EXE and ITALIAN.EXE in masked windows (fixup bytes excluded).
asmbytes.py
Extracts the db bytes of a data label from ref/swos.asm, handy to find the same tables in the other language executables.
mkdocs.py
Builds docs/index.html (English) and docs/it.html (Italian) for GitHub Pages from the sources in docs/src/.

6Memory map (ENGLISH.EXE)

Offsets relative to the object, in ENGLISH.EXE. In this executable every offset is exactly the disassembly address minus the object base (obj1 0x10000, obj2 0xC0000): dseg_D8CAA is obj2+0x18CAA. ITALIAN, FRENCH and GERMAN have the same layout at other offsets; the build finds all of them by signature (the Italian values are in the Italian manual).

Object 2: data

OffsetNameMeaning
0x16F8STR_BASEbase of league and cup name offsets
0x707Edseg_C707Elist of international contests (45 entries) → moved to obj1
0x7EE8italyTableoriginal Italy league structure (42 B) → replaced by one in obj1
0x8B1CcompetitionsTable256 pointers per nation/continent
0x8FD8southAmericaTableSouth America table → moved to obj1
0x958CcareerFileBufferstart of the career save (offset 0 of the .CAR)
0x16CD6selTeamNumberplayer's team (low byte = file, high = index)
0x16CDCdseg_D6CDCplayer's division
0x17E68someLeaguesTable2000 bytes, one per global team number (promotions/relegations); offset 0xE8DC in the .CAR
0x18CAAdseg_D8CAAcontest pointers of the 5 slots (+4 per slot, section 11)
0x18CBEdseg_D8CBEplayer's European cup kind (trophy, reputation, prize)
0x18CC0dseg_D8CC0play-off positions table (slot 4)
0x18D0A / 0x1985C / 0x1A0E2 / 0x19C9Fslot 1 / 2 / 3 / 4 buffers0x443 bytes each
0x1F4F6competitionFileBufferslot 0 buffer (the league)
0x1F533dseg_DF533league substitution rules (3 words: 5, 2, 8)
0x2092Fdseg_E092Fwhich cup is in slot 3 (0 CC, 1 CWC, 2 UEFA; the mod adds 3 Lib, 4 Sup, 5 CON; −1 none)
0x3146D …D0 D1 D2 … D7 A0 … A4pseudo-registers: D0 0x3146D, D1 0x31471, D2 0x31475, D7 0x31489, A0 0x3148D, A1 0x31491, A2 0x31495, A3 0x31499, A4 0x3149D
0x4EEA9DIY_competitionStart"working" contest: routines copy a slot here, process it and copy it back
0x593F2leaguesTableCopycopy of someLeaguesTable used at season end (checksum!)
0xC070Fdseg_18070FChampions Cup winner (holder); the mod also uses it for the Libertadores
36Release 3.2: tourney packs (CLASSIC TOURNEYS from data: groups, knockout, third place, replays and coin toss, real brackets); World Cup 1934passed (automated harness)

Object 1: code (game routines used by the mod)

OffsetRoutineRole
0x7B2D3cseg_8B2D3loads a contest into a slot (D0 = slot, A0 = contest, D1, D2)
0x7D661cseg_8D661is the player's club in this cup's list?
0x7DAC3cseg_8DAC3slot 4: the division's play-offs, with placeholder teams
0x7ECAEcseg_8ECAEleague end: real teams into the play-offs
0x82D55cseg_92D55Champions Cup end: winner → dseg_18070F
0x2930BGetCurrentSeasonPointerseason record (competition names at +1Ah, +1Eh…)
VA 0x914F180-team assertthe one that froze the game in 1997
0xA0B80(new)Italy 4-division league structure (70 B)
0xA1000–0xA1932(new)added page: SA cups, Intercontinental, tables, career and season-end code

7Italy with 4 divisions

The 1997 season-end freeze

Every team has a global number (0–1999) used as an index into someLeaguesTable. Italy started at 424 with only 51 numbers: adding teams overflowed into Latvia (475). The extra teams collided, and at season end the cseg_91428 assert (80 teams in the European lists, counters 16/32/32) ended in int 3; jmp $. In 1997 the original mod inserted bytes between Italy's structure and Latvia's: about 50 league structures reached through fixed pointers were read out of alignment and the game froze.

The fix: Italy's base moves to 1850 (numbers 1794–1999 are free) in the teamsCountryNumbers table, and the new league structure goes into the obj1 cave, with the italyTable fixup retargeted (and widened from 16 to 32 bits).

League structure

10-byte header: [num, type, country, start, end, nameOff, 0, 0, 0, nDiv]
02 03 35
6 bytes per division: [teams, direct promotions, promotion play-off teams, relegated, relegation play-off, play-off data offset]
00
2 dwords per division: name offsets (from STR_BASE)

The mod uses DIVISIONS in patch.py: A (18, 0, 0, 4), B (20, 4, 0, 4), C1 (18, 4, 0, 4), C2 (18, 4, 0, 0). England already has 4 divisions in the same format: the engine handles 4 levels with no code changes.

The "play-off data offset" byte (+12h from the division record, as the code sees it) decides whether slot 4 hosts play-offs. In the mod it is always 0: no Italian division has play-offs.

8C1/C2 teams and squads

TEAM.020

The file starts with a big-endian word (team count) followed by 684-byte records. In the record: +1 ordinal, +2 global number (big-endian), +5 name (17 B), +25 division (0 A, 1 B, 2 C1, 3 C2; 4 was "non-league"), +26 first kit (5 B), +31 second kit, +36 coach (23 B), +60 order of the 16 players in the line-up, +76 16 players of 38 bytes.

Player byteContent
+0nationality (18 Italy, 13 Germany, 68 Argentina, 109 Gabon…)
+2shirt number
+3name (23 B, zero-terminated: 22 characters max)
+26bits 5–7 position (0 G, 1 RB, 2 LB, 3 D, 4 RW, 5 LW, 6 M, 7 A), bits 3–4 skin (00 light, 10 dark, 01 ginger)
+28…+317 nibble skills: passing, shooting, heading, tackling, ball control, speed, finishing. Bit 3 of the nibble marks a key skill; the real value is v & 7
+32price (index 0–49: 25K … 15M+). Goalkeepers have no skills: the price is their quality

The final file has 74 teams (A 18, B 20, C1 18, C2 18), sorted alphabetically, and stays under the limit of about 93 teams per nation (teamFileBuffer, 64014 B). Since the order differs from the original, remap_italian_cup_teams fixes the indexes of Italian clubs in the European cup lists (by name).

How a club is built (c1c2.real_team)

  1. Real squad from the it.wikipedia page "<club> 1996-1997" (squad section), split into P/D/C/A. Known regulars come first; the rest follow the page order.
  2. A template is chosen among the 13 original non-league clubs with a compatible role mix (G/D/M/A counted over the 16 positions), at random among the best fits.
  3. Each template position gets the next name of the matching role; if the role runs out, a neighbouring role lends one. For clubs that already existed, a missing role (for example the second goalkeeper) is filled with an original SWOS player of that club.
  4. The template's skills and prices move by whole steps towards an average price target taken from the real standings (1 skill step = 2 price units, clamp −3…+2). C1: 15.5–19; C2: 12–15; the original Serie B averages 17.9.
  5. Names already in the file (mid-season transfers) go last in their role list, to avoid duplicates. Names over 22 characters: first-name initial (M. DAL COMPARE).
To change a squad, edit c1c2_rosters.py (the order decides who makes the 16) and rerun the build. To change a club's strength: TARGET.

9Contest structure

[0]  contest id          [1] type: 1 knockout, 2 groups + knockout
[2]  nation (FF = any)
[3],[4] months: 8 × month counted from January of the season's first year (≥ 12 = next year)
[5]  names at +5+[5]: two dwords, offsets from STR_BASE (strings in object 2!)
[7]  team list at +7+[7]: byte pairs (TEAM file number, index)
[8]  1 = fixed list (first stage in list order)
[9]  0 = every later round drawn by cseg_27F08 (random shuffle, then consecutive pairs, first named at home);
     otherwise i vs n−1−i, home/away random
[10] away goals: 0 off, 1 after 90 minutes, 2 after extra time (Champions Cup 1)
[11] meetings per group pair (2 = home and away)   [12] points for a win
type 1: [10] team count, [14..] one byte per round (0x94 two legs, 0x14 single-match final), then 00
type 2: [14] stage count, [15] team count, then one triple per stage from [16]:
        (teams, groups, teams per group); the next triple's first byte = teams going through,
        after the last stage the winners' count (01); groups FF = third-place match.
        The first stage's teams are [15] itself (all listed teams).
        From [34] (0x22) one byte per stage: bits 7-6 legs (2 = two legs), 5-4 extra time (0 no, 1 yes,
        2 only in a replay), 3-2 penalties (same): 0x94 two legs + e.t. + penalties, 0x84 two legs, no e.t.,
        penalties, 0x14 single match. Teams per group must be even (int 3 otherwise; the mod lifts this).

Group formats of the original game (bytes from [14]): Champions Cup 04 10 04 04 | 08 00 08 | 04 00 04 | 02 00 02 | 01; World Cup 06 18 06 04 | 10 00 10 | 08 00 08 | 04 00 04 | 02 FF 02 | 02 00 02 | 01 (best thirds, third-place match); Copa América 1995 04 0C 03 04 | 08 00 08 … (2 best thirds); Asian Cup 05 1E 05 06 | 10 00 10 … (5 groups of 6 → 16). cseg_24DFA turns the struct into the DIY file (stage records of 0x76 bytes: +0x15D groups, +0x161 teams, +0x163 going through, +0x169/+0x16B groups / teams per group).

From groups to knockout (cseg_8A2CE; World Cup and European Championship have their own routines): q = going through ÷ groups, r = remainder. One merged table: the first q of each group in group order, then the (q+1)-th placed of every group sorted by their record, of which the first r go through as well. The draw (cseg_26A78) then pairs i with n−1−i with random home/away if [9] ≠ 0; with [9] = 0 it shuffles the list (cseg_27F08) and pairs consecutive teams, the first one at home in the first leg. The mod's hist_draw replaces that shuffle with fixed tables (DRAWS: contest id, teams in the round, permutation). The engine has no byes, but a team can sit out the first stage (see below).

Copa Libertadores 1997 (2.0, lib97.py). 21 clubs, the holder last. lib_bye replaces the call cseg_2573C at the end of cseg_24DFA (obj1+0x154EA) and sets the first stage of diyFileBufferCopy (obj2+0x4EA8A, +0x161) to 20: the groups take the first 20 clubs of the list A2+59h; the group records are indexed by team-table index (cseg_270C7), so the 21st plays no group and its index stays in A2+59h[20]. At the round of 16, lib_pre (called by hist_draw) puts it in place of the best 4th (16 ÷ 5 leaves 1) and swaps the 3rd of group 2 with the 3rd of the holder's country group (group number in A2+119h): the holder always meets the 3rd of its own group, as in 1996 and 1997. The real 1997 bracket follows (R16 11 15 9 4 13 1 12 0 6 8 10 3 14 2 7 5 on the list 1st A–E, 2nd A–E, 3rd A–E, holder; QF 1 0 3 2 4 5 7 6). lib_cal replaces mov esi,[A0] in cseg_89758 (obj1+0x79822), which takes each group match from a table per group size (dseg_11F356, 4 teams: 0-1 2-3, 0-2 1-3, 3-0 1-2; second cycle swapped when [5Fh] is odd): our groups use the real 1997 calendar instead (groups 1–4 exactly by matchday, group 5 the closest fit). Both run only for id 0x6C with 21 clubs, so a 1.3 contest in an old save keeps its format until the season ends.

IdCompetitionFormatMonths
0x6CCOPA LIBERTADORES2.0: Champions Cup header with its own stages 05 15 05 04 | 10 00 10 | 08 00 08 | 04 00 04 | 02 00 02 | 01, rounds 00 84 84 84 84, [9] = 0, [10] = 0: 21 teams (20 in 5 groups of 4, two countries per group as in 1997, real calendar; the holder skips the groups), top 3 + holder to the round of 16, real fixed bracket, two legs up to the final, no away goals, no extra time, penalties. (1.3: 20 teams, top 3 + best 4th, single-match final; 1.0–1.2: 16 teams, 4 groups.)as the European cups (September–May)
0x6DSUPERCOPA16 teams, two legs, single-match final (Cup Winners' Cup clone)same
0x6ECOPA CONMEBOLsamesame
0x6FCOPPA INTERCONTINENTALEtype 1, 2 teams, one 0x14 round (single match); default Juventus – River Plate (Tokyo, November 1996)0x58–0x60: December, window to January

Free ids: 0x70–0x7B (leagues use 0x24–0x6B, 0x7C custom, 0x7D–0xB1 cups). South American teams come from TEAM.043 (ARG), 045 (BOL), 046 (BRA), 048 (CHI), 049 (COL), 050 (ECU), 064 (PAR), 065 (PER), 071 (URU), 077 (VEN).

10Continental tables and world view

ViewWorldMenu → ChooseCompetitionMenu → SelectTeamsFinalMenu: every pointer in the continent's competitionsTable entry becomes a button. The European cups get no special treatment, so adding pointers is enough.

When a competition is picked, cseg_3AA17 checks whether it is one of the player's 4 slots (real state). Otherwise cseg_3ABB2 regenerates it on the fly: random seed = contest id << 8 | season, then it simulates up to the current date. Competitions the player is not in have no persistent state: to show them, a structure and a team list are all that is needed.

11Career: the 5 slots

In career mode every team has 5 competition slots. For each slot the game keeps a contest pointer (dseg_D8CAA + 4 × slot, 0 = empty) and a 0x443-byte buffer with the running competition. The calendar walks the slots and plays the week's matches.

SlotPointerBufferOriginal useUse in the mod
00x18CAA0x1F4F6leagueunchanged
10x18CAE0x18D0Anational cupSupercopa for South American clubs (no national cup in South America)
20x18CB20x1985Cleague cup, or friendlies and toursIntercontinental when the slot is free (Italy, all South American countries)
30x18CB60x1A0E2European cupalso Libertadores / Supercopa / CONMEBOL
40x18CBA0x19C9Fdivision play-offsIntercontinental for countries with a league cup, when the division has no play-offs

Buffer header

+0 type (word), +27h name pointer, +2Bh slot number (word), +2Dh contest id, +3Dh/+3Fh/+41h substitution rules (5 on the bench, 2 changes, 8).

cseg_8B2D3 (load a contest into a slot)

A sixth slot was evaluated and dropped: the slot pointers are immediately followed by other variables, there are about 250 references in about 100 routines, and it would change the save format.

12Season start

ContinueCareerNextSeason (and InitCareer) call InitializeNewSeason: slots 0, 1, 2 from the nation's table, then the European cup chain (cseg_8D661 with D7 = 0, 1, 2 on Champions Cup, Cup Winners' Cup, UEFA), finally call cseg_8DAC3 (slot 4, play-offs).

flowchart TD
  A[InitializeNewSeason: slots 0, 1, 2] --> B{Club in a European cup?}
  B -- yes --> F[euro_found: int_step, then E092F = D7]
  B -- no --> I[init_sa]
  I --> I1{Saved block 'S2' or 'SA'?}
  I1 -- no, new career --> I2[DEFAULTS into lists + INTLIST, lists_out]
  I1 -- yes --> I3
  I2 --> I3{Slot 1 empty and club in the Supercopa?}
  I3 -- yes --> I4[Supercopa into slot 1]
  I3 -- no --> I5
  I4 --> I5[int_step: Intercontinental into slot 2 if free and club is a finalist]
  I5 --> I6[Slot 3: Libertadores, Supercopa unless already in slot 1, CONMEBOL; D8CBE = D7 - 3]
  F --> D[call cseg_8DAC3 redirected to int4_step]
  I6 --> D
  D --> D1[cseg_8DAC3: play-offs into slot 4 if the division has them]
  D1 --> D2{Slot 4 empty, club a finalist, Intercontinental not in slot 2?}
  D2 -- yes --> D3[Intercontinental into slot 4 via the buffer swap]
  D2 -- no --> Z[done]
  D3 --> Z

Intercontinental in slot 4: the buffer swap

Loading the cup straight into slot 4 would give a "your team against your team" match with no dates. int4_step instead:

  1. calls the real cseg_8DAC3; if slot 4 is taken (play-offs) it stops;
  2. clears buffer 4's id (so an old buffer is not restored on load);
  3. copies the slot 2 buffer (league cup) into buffer 4;
  4. calls cseg_8B2D3 with slot 2: the Intercontinental is built in full, with the finalists and the dates;
  5. swaps the two 0x443-byte buffers: Intercontinental in slot 4, league cup back intact in slot 2;
  6. +2Bh = 4, substitution rules from the league (as the game does for play-offs), restores the slot 2 pointer, D8CBA = INT.

The playoffs hook at the entry of cseg_8ECAE returns at once when slot 4 holds the Intercontinental: otherwise at the league's end the game would rebuild it from a play-off table that does not exist.

13Loading a save

ProcessCareerFile rebuilds the slot pointers from the nation's table (slots 0–2), the division record (slot 4) and E092F (slot 3). The slot buffers are in the save, the pointers are not: the mod restores them from the id stored in the buffers.

14Season end

cseg_91428: combines the lists; for the player's nation and then every European nation it simulates or reads the standings (cseg_9153F), promotions, cups; cseg_92D55 / 9307A / 9339D close the Champions Cup, Cup Winners' Cup and UEFA; cseg_93974 adds the qualifiers; final 80-team assert (16/32/32); cseg_92BBF re-admits the holders.

The mod redirects the call to cseg_92D55 (obj1+0x81470) to sa_qualify:

  1. [A4] = Libertadores and call cseg_92D55 + 10 (skips the first instruction, which would select the Champions Cup): closes the Libertadores (played by the player or simulated with cseg_3ADAE) and writes the winner into dseg_18070F → LIBWIN.
  2. For each South American nation: simulates the top division with cseg_915ED (the same simulation as the world view, so the standings match). For the player's own division it reads slot 0 instead. From the DIY: +6Dh row offsets in finishing order (rows of 12h bytes), +12Dh team number per row.
  3. Writes the qualifiers: Libertadores = champion and runner-up of each of the 10 countries (1.3: 5 groups BOL+PAR, ARG+ECU, CHI+VEN, BRA+PER, URU+COL, LIB_Q); CONMEBOL = the next places (CON_Q, 8 pairs: ARG 3–5, BRA 3–5, CHI and URU 3–4, the others 3rd). Supercopa: fixed list of former champions.
  4. Holder rules (real 1997, 2.0): LIBWIN becomes the 21st club and enters at the round of 16. If it also qualified through its league, that berth goes to its country's 3rd, taken from the CONMEBOL list, whose place goes to the next club (SPARE: the rank after the country's last CONMEBOL rank, read with the standings); if it is in the CONMEBOL list, SPARE takes that place. If it is not in the Supercopa, it takes the last place.
  5. The real call cseg_92D55: closes the Champions Cup. Both branches end in cseg_92F1C, which always writes the winner to dseg_18070F.
  6. INTLIST[0] = [dseg_18070F], INTLIST[1] = LIBWIN (each skipped if 0FFFFh), then lists_out and ret.
flowchart LR
  S[cseg_91428 season end] --> Q[sa_qualify]
  Q --> L[Libertadores end: LIBWIN]
  L --> C[SA standings → Lib and CON lists]
  C --> H[Holder rules]
  H --> E[real cseg_92D55: CC winner]
  E --> N[INTLIST = CC, LIBWIN]
  N --> O[lists_out: saved block + checksum]
  O --> R[back to cseg_91428]

15Persistence in the save

From 1.2 the lists below live in the .CAR trailer (section 19); this section describes the 1.0/1.1 format, which the mod still reads from old saves.

The save holds someLeaguesTable (2000 bytes, one per global number). Numbers 1730–1849 belong to no team: the mod parks its data from number 1740 (obj2+0x18534), mirrored in leaguesTableCopy (obj2+0x59ABE), because at season end the game copies one table onto the other (cseg_8CC0A and cseg_8CC4E). InitCareer clears the table: an all-zero table means a new career.

OffsetS2 format (current)SA format (session 12)
+0marker 'S2' (word 0x3253)marker 'SA' (0x4153)
+2Libertadores: 16 × (file, index)same
+34Supercopasame
+66CONMEBOLsame
+98Intercontinental: 2 × (file, index)balance byte
+102balance byte—

The balance byte is −(sum of the block's preceding bytes) mod 256, so the whole block sums to 0 and the table stays at 0 for cseg_9487A's check. Reading: 'S2' everything from the save; 'SA' the three lists plus the default Juventus – River pair; no marker → 1997 values (DEFAULTS, 100 bytes). The first season end of an 'SA' career rewrites it as 'S2'.

# check in Python
blk = save[SAVED:SAVED + 103]
assert blk[:2] == b'S2' and sum(blk) % 256 == 0

16Trophies and reputation

Trophy bits are built in cseg_39392 from the flags D6C64 (Champions Cup, bit 2, reputation +100), D6C68 (UEFA, bit 3, +50) and D6C66 (Cup Winners' Cup, bit 4, +50). cseg_3D7CB picks the flag from dseg_D8CBE, cseg_5DEB9 the prize. The mod sets D8CBE = D7 − 3 when a South American cup is entered:

The season record (ManagementRecordMenu) already shows the right name ("COPA LIBERTADORES - WINNERS"). Dedicated names and bits (bits 10–15 are free) would need new strings, and the pool is full.

17Hook table

Each hook overwrites original instructions with a jmp or changes a call target; the fixups of the overwritten instructions are removed.

Site (obj1)BytesOriginalBecomes
0x7D4B311mov [E092F],-1; jmp done (no European cup)jmp init_sa
0x7D4BE12mov ax,[D7]; mov [E092F],ax (European cup found)jmp euro_found
0x7D4CArel32call cseg_8DAC3call int4_step
0x2396D10cmp [E092F],-1; jz out (ProcessCareerFile)jmp load_slot1
0x239A912cmp [E092F],2; jz map; jmp outjmp load_slot3
0x7ECAE13cmp dword [D8CBA],0; jz out (cseg_8ECAE)jmp playoffs
0x81470rel32call cseg_92D55 (season end)call sa_qualify

Data changes: Italy's base in the global number table; italyTable fixup retargeted to the new structure; South America, Europe and international list tables retargeted into obj1; new names in the string pool; indexes of Italian clubs in the European lists; object 1 vsize and flags.

Label addresses in the added page (init_sa, sa_qualify…) change when the code grows: patch.py prints the main ones, and nasmcave.labels() returns them all.

18Verifying without playing

Before handing out a build for testing, these checks are run every time:

  1. The build passes every assert (unique signatures, expected targets).
  2. Re-read with le.py: the fixup tables parse without errors.
  3. ndisasm of the generated code and of every hook site: every jump goes to the right label.
  4. Every absolute operand has a fixup to the correct object and offset (the script annotates each disassembly line with its fixups).
  5. Comparison with the previous build: bytes change only where intended; the only fixups changed outside the added page must be the expected ones.
  6. For saved data: Python emulation of the checksum on a copy of a real save.

If a check fails and cannot be fixed, the previous build is put back (ITALIAN_S12.EXE is the last one tested in depth).

19New countries and continental club cups (1.1–1.2)

Versions 1.1 and 1.2 add eleven club countries (Costa Rica, Egypt, Morocco, Tunisia, Nigeria, Cameroon, South Korea, China, Saudi Arabia, Guatemala, Honduras), national cups for the ten new ones and six continental club cups (three African, the CONCACAF Champions Cup, two Asian). All of it is generated by countries.py, africa.py, asia.py, namerica.py, cafcups.py and trailer.py; every table is found by content, so the four languages share the same code.

How a country is registered

A country number is also its team file number: LoadTeamFile turns any number 0–255 into data/team.nnn (100 = CUSTOMS.EDT, at most 64000 bytes). The game knows a club country through these tables (ENGLISH.EXE offsets):

TableWhereEntryWhat the mod does
countriesTableobj2+0x6742, 256 dwordspointer to [continent byte, name, adjective]new record in the added obj2 page, new pointer + fixup
competitionsTableobj2+0x8B1C, 256 dwordspointer to [league pointers, -2, cup pointers, -1]new country table and league struct in the obj1 cave
teamsCountryNumbersobj2+0xB2A38, 256 wordsglobal number base (global = base + team ordinal, < 2000)free range checked against every team file
continent tablescompetitionsTable[80..85][contest pointers, -1] + country bytes + FFrebuilt in the cave with the new countries (and the CAF cups)
season-end listobj2+0x943A, FF-terminatedcountries whose leagues are processed at the end of a career seasoncopied to the cave + new countries; its single code reference retargeted

League struct byte 5 is the offset of the division names minus 5, not a flag: 0x15 only with 2 divisions, 9 + 6 × divisions in general (0 = default names). A one-division league with 0x15 froze the preset competitions menu (Costa Rica, fixed in 1.1).

Added pages and free numbers

The new countries

Continental club cups and the save trailer

20Classic tourneys (2.0)

Three historic tournaments with their real formats and squads, playable only in Preset competitions: they never show up in career, season, DIY, friendlies or team editing. Code in historic.py (bye: lib97.py), squads in mitropa34.py and facup72.py (sources in their docstrings).

21Argentina, Oceania and MLS (2.5)

Four leagues rebuilt as they were played in 1996-97. Code in arg97.py (Argentina), nsl97.py + nsl_lineups.py (Australia), nz97.py (New Zealand, and the shoot-out code shared with the MLS), mls97.py + mls_tm.py (USA), finals97.py (play-offs and season record). Sources are listed in each docstring; the downloaded pages stay out of the repository.

22Classic seasons: the DDR 1988-89 (2.6)

Do you want to take charge of a club of the 1988-89 East German Oberliga and try to win the league, the national cup and the European cup your club qualified for? Now you can! Since session 30 it is the season pack packs/ddr-1988-89 compiled by mkseason.py (chapter 23); in 2.6 the code was ddr89.py and euro8889.py, with small additions to historic.py, lib97.py and patch.py.

Serie A 1947-48 (3.0)

Season > CLASSIC SEASONS > ITALY 1947-48 (also in CLASSIC TOURNEYS as SERIE A 1947-48), pack packs/italia-1947-48, file TEAM.145. 21 clubs in the final order with their 1948 names, 42 rounds (one club rests each round), 2 points per win, 4 relegated; league only (no Coppa Italia 1943-58, no European cup). Calendar dates copied from Spain 1996-97 (22 clubs, 42 rounds). Torino's ratings from the SWOS 2020 "1900s Retro Pack Teams (1900-1970)" (FrancescoManetti82 and Gorzo), the other 20 clubs calibrated on the final points with 1996-97 records of the same strength (no level shift). The Season/Career league set-up ended in int 3; jmp $ with an odd number of clubs: patch odd_leagues, applied only when a pack has an odd division. Tool tools/itwiki_season.py drafts Italian seasons from it.wikipedia.

Real match days (3.3.5): the game's pair tables for an odd number of clubs (dseg_11F356[n - 2], n = 5..23) are no rounds: the league engine plays n // 2 pairs per match day (cseg_8922B), and for 21 clubs 15 of the 21 days had a club twice and another one missing. tools/oddtables.py (called by mkseason.odd_leagues, so only builds with an odd division) rewrites them in place with the circle method: the same pairs and length, one club at rest each round, home and away alternating (at most 3 running). In a career the old tables could also let the calendar builder (cseg_8B8D9) write two matches of the manager's club into one block and trap the next season. Scenario season4748: 6 match days of 10 matches with 20 different clubs.

DDR recalibrated (3.0): calibrate's level shifts distorted strength (1 level = about 9 price points of skills, the price moves only 2): league templates are now chosen by strength, without shifts, and the skills follow the 1988-89 table (TEAM.092). Rule from now on: before releasing a historic season or world, the built skills are checked against the real tables and a simulated season must look like the real one.

23Season packs and classic careers (3.0)

A season pack is a folder of plain data (packs/<id>/: pack.json + clubs.csv, players.csv, ties.csv, format in packs/README.md) that tools/mkseason.py compiles into team files and exe tables, deterministically. The DDR 1988-89 of chapter 22 is now the pack packs/ddr-1988-89 (byte-identical to 2.6; ddr89.py and euro8889.py were removed). Several packs go into one build (mkseason.ENABLED); a squad is built by calibrate (target strength), game (players already in the game) or explicit (every value given). Country numbers 101–251 are free and work (team file names are built from 0–255).

A career pack ("kind": "career") is a pack played as a career, from the CLASSIC CAREERS button (pseudo-continent 98) of the career team selector: career_sel replaces call ChooseTeamsDialog in SelectTeamToManage and swaps competitionsTable[254] for a world table with 98. Its league may have several divisions with promotion and relegation (divisions + the division column of clubs.csv = record byte +25). A world is a set of career packs with the same world number: a career started with one of its clubs only sees the world's countries and European cups (tools/careerworld.py). Status: menu and divisions playtested (M1); world switch (M2) and season year, world view, holders (M3) playtested over two seasons with a 4-country test world.

How the career European cups really work

The world switch (M2)

Era shirt numbers (3.3.4)

24SWOS++ (2.7)

From 2.7 the mod works with SWOS++ by Zlatko Karakas (network play, full replays, DIY editor, shirt numbers up to 255, joystick calibration), on the English executable only (CD or GOG). Zlatko asked for it (via Playaveli). Study and tool: notes/swospp.md, tools/swospp.py. Addresses are ENGLISH.EXE object offsets.

25Home and away kits (3.0)

The game picks the kits by itself, and many classic pairings (Juventus-Milan, Milan-Inter, Inter-Juventus, Chelsea against Juventus, Newcastle or Manchester City) never met in home kits. Analysis of the colour graph: DaniSwos, SWOS United forum thread "Home-Away kit automatic selection". Tools: tools/kitsim.py (simulator), tools/kitcolors.py (patch).

26Europe 1984-85 and European cups (3.0)

The CLASSIC CAREERS button of the career lists the historic worlds (pseudo-continent 98 → entry 200 + world number → countries). The first one is EUROPE 1984-85: 32 countries, 949 clubs, real squads from the database by DaniSwos (CM01/02 Retro Update Team), leagues in the 1983-84 final order, real 1984-85 national cups for 15 countries, European cups 32/32/64 with the real first-round ties. The data are in packs/europe-1984-85/<country>: anyone can complete them (for example the missing coaches, column coach of clubs.csv).

27National teams of Europe 1984-85 (3.1)

In the Europe 1984-85 world the national teams are those of the era and play the 1984-88 cycle. Data in packs/europe-1984-85/national (built from DaniSwos's database: per nationality the internationals of 1984 first, born 1951 or later), engine in tools/careerworld.py, compiler in tools/mkseason.py (NationalPack).

28Classic tourneys from data (3.2)

A tourney pack (kind: tourney, guide packs/TOURNEYS.md) adds a tournament to CLASSIC TOURNEYS with data only; the first one is packs/world-cup-1934. Compiler: Pack.tourney in tools/mkseason.py; exe: historic.patch.

29World 2026-27: the 4.0 engine

The World 2026-27 is a career world of the pack machinery (section 23): its world byte is someLeaguesTable[1845], its packs come from packs/, the build is tools/patch.py. On top of it 4.0 adds a set of shared engines, each a C file compiled into its own obj1 pages (nasmcave) and a Python module with the hooks. Every one of them works from data: no competition has code of its own. The design rules they follow are in notes/CONVENTIONS.md (read it before any change); the work notes are in notes/world-2025-26*.md and notes/continental-cups.md.

The engine block

Continental cups (conti)

UEFA: league phase and qualifying

Play-offs and the knockout rules (gplay, dplay)

Coppa Italia Serie D (slot 2)

Splits, long tables, zone colours and the legend

The WINNERS page (winners.py)

Quick season end (quietend.py)

Off-file pools (ripool)

The one-click folder patcher

Conventions and tests

4.0.1 additions

4.0.2 additions

4.0.5 additions

4.1 additions (the old 4.0.6 and 4.0.7 merged)

30Limits and open issues

31History and next steps

SessionContentTest
1–2LE tools; cause of the 1997 freeze; Italy with 4 divisions, base 1850passed
5Real C1/C2 1996-97 clubspassed
9South American cups in menus and world view; string poolpassed
10South American clubs in the cups in career mode; qualifiers from the standings; holderpassed
11Supercopa in slot 1; page added to object 1passed
12List persistence with checksum; CONMEBOL swap; trophies; Intercontinental in menus and in slot 2persistence, slot 2, CONMEBOL trophies
13Intercontinental finalists at season end; S2 format; Intercontinental in slot 4season end, S2 slot 4
14Real 1996-97 squads and calibrated strength for all 36 C1/C2 clubspassed
15–16Port to ENGLISH/FRENCH/GERMAN; HTML patcher; release 1.0 and 1.0.1 (GOG)passed
17–20Analysis of how a country is registered; added obj2 pages; Costa Rica; five African countries with national cups; CAF cups in career; save trailer; release 1.1passed (1 season)
21–24CONCACAF Champions Cup; all saved lists in the .CAR trailer (global numbers 1730–1846 freed); South Korea, China, Saudi Arabia and the Asian cups; Guatemala and Honduras; release 1.2passed (1 season)
25Group formats decoded; Copa Libertadores with 5 groups of 4 (20 clubs, top 3 + best 4th), trailer 'C5' (report by Playaveli, Swos2020); release 1.3passed (1 season)
26Classic tourneys: World Cup 1982 (real formula, 4 groups of 3), Mitropa Cup 1934, FA Cup 1871-72 (bye, replays, drawing lots); squads from SWOS 2020 DLCs and period sourcespassed
27Copa Libertadores with the real 1997 format: holder straight into the round of 16, real group calendar and bracket, no away goals or extra time, two-leg final; trailer 'C6'passed (preset, career, saves)
28Argentina Apertura/Clausura with aggregate table and promedio; Australia NSL 1996-97 with NSL Cup and NSL Finals; New Zealand NSSL with shoot-out bonus point and play-offs; MLS 1997; play-off final scheduled (rounds count fix); season record: play-off winner = champion, club missing from its cup; trailer 'C7'passed (IT; NSSL final and EN/FR/DE to replay)
29Classic seasons: DDR 1988-89 (Oberliga, FDGB-Pokal with the real bracket, 1988-89 European cups with real participants, brackets, squads and coaches) in the new CLASSIC SEASONS menu of Season mode; Oberliga also among the classic tourneys; incremental update in the patcher (2.5.1)passed (IT)
30Season packs: data folders compiled by mkseason.py (DDR 1988-89 = first pack), several packs per build, explicit squads, countries 101–251; classic careers M1: CLASSIC CAREERS menu, leagues with divisionspassed (IT)
31Career European chain decoded (in-save cup copies, place tables, holders, checksum); classic career worlds: world byte, world European cups, worldNN.tmd (M2)passed (IT, 2 seasons)
32Release 2.6.1: a new career started with a club in a European cup is set up at once (the 'S3' mark and the first-season lists of the other continents' cups were only written in the other branch since 1.2). Classic careers M3: world start year, world view and foreign-player browser limited to the world, no national-team jobs, holders with a place of their ownpassed (IT, 2 seasons)
33Release 2.7.0: SWOS++ compatibility on the English exe (CD and GOG): tools/swospp.py, patcher outputs ENGLISH.EXE + SWOS++passed (EN, SWOS++ 1.9.2.2)
34Release 3.0: classic careers Europe 1984-85 (DaniSwos's data), European cups up to 128 clubs, no same-country ties in rounds 1-2, holder rule, Intercontinental fix, KITS editorpassed (automated harness + Davide's playtest)
35Release 3.1: test harness about ten times faster; national teams of Europe 1984-85 (143 teams, jobs, call-ups, World Cup 1986 / Euro 88 cycle with the real qualifying groups), nationalities GDR / URS / FRGpassed (automated harness + Davide's playtest)

Roadmap

  1. Classic careers: a name per world in the menus, long careers, more worlds (e.g. South America for its national teams).
  2. Long careers: 6–8 season tests with the 1.1–1.2 additions; real squads for the new clubs from the community.
  3. Europe: Intertoto Cup, European Super Cup, 1997-98 Champions League format.
  4. Backlog: 5-man bench for English clubs; Intercontinental in slot 4 test; C1 with two groups.

Credits: disassembly and file format documentation from swos-port (zlatkok). Mod: Davide Lorigliola, with Claude.